@shepai/cli 1.145.0 → 1.146.0-pr437.aa23c1e

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 (349) hide show
  1. package/apis/json-schema/Feature.yaml +25 -0
  2. package/apis/json-schema/FeatureFlags.yaml +5 -0
  3. package/apis/json-schema/PullRequest.yaml +11 -0
  4. package/apis/json-schema/SdlcLifecycle.yaml +1 -0
  5. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts +5 -0
  6. package/dist/packages/core/src/application/ports/output/agents/feature-agent-process.interface.d.ts.map +1 -1
  7. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts +132 -0
  8. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts.map +1 -0
  9. package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.js +12 -0
  10. package/dist/packages/core/src/application/ports/output/services/git-fork-service.interface.d.ts +79 -0
  11. package/dist/packages/core/src/application/ports/output/services/git-fork-service.interface.d.ts.map +1 -0
  12. package/dist/packages/core/src/application/ports/output/services/git-fork-service.interface.js +31 -0
  13. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  14. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  15. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.d.ts.map +1 -1
  16. package/dist/packages/core/src/application/use-cases/features/adopt-branch.use-case.js +5 -0
  17. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  18. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +10 -0
  19. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +10 -0
  20. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  21. package/dist/packages/core/src/application/use-cases/features/poll-upstream-pr.use-case.d.ts +23 -0
  22. package/dist/packages/core/src/application/use-cases/features/poll-upstream-pr.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/features/poll-upstream-pr.use-case.js +84 -0
  24. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.d.ts.map +1 -1
  25. package/dist/packages/core/src/application/use-cases/features/resume-feature.use-case.js +2 -0
  26. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  27. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
  28. package/dist/packages/core/src/domain/generated/output.d.ts +37 -0
  29. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  30. package/dist/packages/core/src/domain/generated/output.js +1 -0
  31. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  32. package/dist/packages/core/src/infrastructure/di/container.js +12 -0
  33. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +8 -0
  34. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  35. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +18 -0
  36. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +2 -0
  39. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.d.ts +11 -0
  40. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.d.ts.map +1 -0
  41. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.js +17 -0
  42. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-add-fork-and-pr-columns.d.ts +13 -0
  43. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-add-fork-and-pr-columns.d.ts.map +1 -0
  44. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-add-fork-and-pr-columns.js +30 -0
  45. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-per-feature-workflow-columns.d.ts +12 -0
  46. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-per-feature-workflow-columns.d.ts.map +1 -0
  47. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-per-feature-workflow-columns.js +23 -0
  48. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
  49. package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +23 -4
  50. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  51. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +3 -2
  52. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts +25 -0
  53. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/fast-feature-agent-graph.d.ts.map +1 -1
  54. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts +85 -0
  55. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-graph.d.ts.map +1 -1
  56. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts +5 -0
  57. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.d.ts.map +1 -1
  58. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-process.service.js +15 -0
  59. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts +5 -0
  60. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
  61. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +23 -0
  62. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts +2 -0
  63. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
  64. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +50 -0
  65. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts +8 -0
  66. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
  67. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +40 -1
  68. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.d.ts.map +1 -1
  69. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/analyze.prompt.js +11 -9
  70. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
  71. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +5 -1
  72. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.d.ts.map +1 -1
  73. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/plan.prompt.js +8 -6
  74. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.d.ts.map +1 -1
  75. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/requirements.prompt.js +11 -9
  76. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.d.ts.map +1 -1
  77. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/research.prompt.js +8 -6
  78. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/schemas/spec.schema.d.ts.map +1 -1
  79. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/schemas/spec.schema.js +3 -1
  80. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.d.ts +1 -0
  81. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.d.ts.map +1 -1
  82. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/schemas/validation.js +9 -0
  83. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts +5 -0
  84. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.d.ts.map +1 -1
  85. package/dist/packages/core/src/infrastructure/services/agents/feature-agent/state.js +20 -0
  86. package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts +42 -0
  87. package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts.map +1 -0
  88. package/dist/packages/core/src/infrastructure/services/coasts.service.js +185 -0
  89. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts +25 -0
  90. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.d.ts.map +1 -0
  91. package/dist/packages/core/src/infrastructure/services/git/git-fork.service.js +145 -0
  92. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.d.ts +17 -3
  93. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.d.ts.map +1 -1
  94. package/dist/packages/core/src/infrastructure/services/pr-sync/pr-sync-watcher.service.js +98 -15
  95. package/dist/src/presentation/cli/commands/coasts/index.d.ts +3 -0
  96. package/dist/src/presentation/cli/commands/coasts/index.d.ts.map +1 -0
  97. package/dist/src/presentation/cli/commands/coasts/index.js +7 -0
  98. package/dist/src/presentation/cli/commands/coasts/init.command.d.ts +3 -0
  99. package/dist/src/presentation/cli/commands/coasts/init.command.d.ts.map +1 -0
  100. package/dist/src/presentation/cli/commands/coasts/init.command.js +40 -0
  101. package/dist/src/presentation/cli/commands/ui.command.d.ts.map +1 -1
  102. package/dist/src/presentation/cli/commands/ui.command.js +2 -1
  103. package/dist/src/presentation/cli/index.js +2 -0
  104. package/dist/src/presentation/web/app/actions/check-coastfile.d.ts +5 -0
  105. package/dist/src/presentation/web/app/actions/check-coastfile.d.ts.map +1 -0
  106. package/dist/src/presentation/web/app/actions/check-coastfile.js +16 -0
  107. package/dist/src/presentation/web/app/actions/create-feature.d.ts +10 -0
  108. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  109. package/dist/src/presentation/web/app/actions/create-feature.js +8 -1
  110. package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts +7 -0
  111. package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts.map +1 -0
  112. package/dist/src/presentation/web/app/actions/generate-coastfile.js +22 -0
  113. package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
  114. package/dist/src/presentation/web/app/api/agent-events/route.js +1 -0
  115. package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
  116. package/dist/src/presentation/web/app/build-feature-node-data.js +5 -3
  117. package/dist/src/presentation/web/app/build-graph-nodes.js +5 -3
  118. package/dist/src/presentation/web/coasts-dev-server.d.ts +34 -0
  119. package/dist/src/presentation/web/coasts-dev-server.d.ts.map +1 -0
  120. package/dist/src/presentation/web/coasts-dev-server.js +69 -0
  121. package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +1 -1
  122. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +4 -0
  123. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  124. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +24 -7
  125. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +12 -0
  126. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  127. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +35 -0
  128. package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +7 -1
  129. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +5 -1
  130. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
  131. package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +12 -0
  132. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
  133. package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +1 -0
  134. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
  135. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.js +1 -0
  136. package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
  137. package/dist/src/presentation/web/components/common/repository-node/repository-node.js +9 -2
  138. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts +12 -0
  139. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts.map +1 -0
  140. package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.js +76 -0
  141. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  142. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -0
  143. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  144. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
  145. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  146. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +5 -0
  147. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  148. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
  149. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  150. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -0
  151. package/dist/src/presentation/web/dev-server.js +64 -2
  152. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  153. package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
  154. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
  155. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  156. package/dist/src/presentation/web/lib/feature-flags.js +5 -0
  157. package/dist/tsconfig.build.tsbuildinfo +1 -1
  158. package/package.json +2 -1
  159. package/web/.next/BUILD_ID +1 -1
  160. package/web/.next/build-manifest.json +2 -2
  161. package/web/.next/fallback-build-manifest.json +2 -2
  162. package/web/.next/prerender-manifest.json +3 -3
  163. package/web/.next/required-server-files.js +3 -3
  164. package/web/.next/required-server-files.json +3 -3
  165. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +86 -56
  166. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  167. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  168. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  169. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +86 -56
  170. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  171. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  172. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  173. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +102 -72
  174. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  175. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  176. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  177. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +102 -72
  178. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  179. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  180. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  181. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +82 -52
  182. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  183. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  184. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  185. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +86 -56
  186. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  187. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  188. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  189. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +102 -72
  190. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  191. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  192. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  193. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +102 -72
  194. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  195. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  196. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +82 -52
  198. package/web/.next/server/app/(dashboard)/page.js +1 -1
  199. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  200. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  201. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +82 -52
  202. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  203. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  204. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  205. package/web/.next/server/app/_global-error.html +2 -2
  206. package/web/.next/server/app/_global-error.rsc +1 -1
  207. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  208. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  209. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  210. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  211. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  212. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  213. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  214. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  215. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  216. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  217. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  218. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  219. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  220. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  221. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  222. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  223. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  224. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  225. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  226. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  227. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  228. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  229. package/web/.next/server/chunks/403f9_next_567de315._.js +2 -2
  230. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
  231. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
  232. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +2 -2
  233. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  234. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  235. package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js +1 -1
  236. package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
  237. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
  238. package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
  239. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  240. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js +1 -1
  242. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b150ddf._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  244. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js.map +1 -1
  245. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  246. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__581769f7._.js +4 -0
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__581769f7._.js.map +1 -0
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__6df523d1._.js +4 -0
  252. package/web/.next/server/chunks/ssr/[root-of-the-server]__6df523d1._.js.map +1 -0
  253. package/web/.next/server/chunks/ssr/[root-of-the-server]__8004c676._.js +4 -0
  254. package/web/.next/server/chunks/ssr/[root-of-the-server]__8004c676._.js.map +1 -0
  255. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  256. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  257. package/web/.next/server/chunks/ssr/[root-of-the-server]__815f85e7._.js +4 -0
  258. package/web/.next/server/chunks/ssr/[root-of-the-server]__815f85e7._.js.map +1 -0
  259. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  260. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  261. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  262. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  263. package/web/.next/server/chunks/ssr/[root-of-the-server]__df7c1cd3._.js +3 -0
  264. package/web/.next/server/chunks/ssr/[root-of-the-server]__df7c1cd3._.js.map +1 -0
  265. package/web/.next/server/chunks/ssr/_0020fddd._.js +1 -1
  266. package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -1
  267. package/web/.next/server/chunks/ssr/{_0c5f56e3._.js → _45117016._.js} +3 -3
  268. package/web/.next/server/chunks/ssr/{_0c5f56e3._.js.map → _45117016._.js.map} +1 -1
  269. package/web/.next/server/chunks/ssr/_4b432739._.js +1 -1
  270. package/web/.next/server/chunks/ssr/_4b432739._.js.map +1 -1
  271. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  272. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  273. package/web/.next/server/chunks/ssr/{_1fa6f5f0._.js → _7b12d338._.js} +2 -2
  274. package/web/.next/server/chunks/ssr/{_1fa6f5f0._.js.map → _7b12d338._.js.map} +1 -1
  275. package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
  276. package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
  277. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +3 -0
  278. package/web/.next/server/chunks/ssr/_8fcc39d4._.js.map +1 -0
  279. package/web/.next/server/chunks/ssr/{_b71645b4._.js → _9133ca98._.js} +2 -2
  280. package/web/.next/server/chunks/ssr/{_b71645b4._.js.map → _9133ca98._.js.map} +1 -1
  281. package/web/.next/server/chunks/ssr/{_1b719e7f._.js → _913a6589._.js} +2 -2
  282. package/web/.next/server/chunks/ssr/{_1b719e7f._.js.map → _913a6589._.js.map} +1 -1
  283. package/web/.next/server/chunks/ssr/_a93b44aa._.js +3 -0
  284. package/web/.next/server/chunks/ssr/{_2a415784._.js.map → _a93b44aa._.js.map} +1 -1
  285. package/web/.next/server/chunks/ssr/{_64bdfc6f._.js → _c7d0d381._.js} +3 -3
  286. package/web/.next/server/chunks/ssr/{_64bdfc6f._.js.map → _c7d0d381._.js.map} +1 -1
  287. package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  289. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  290. package/web/.next/server/chunks/ssr/{_55d763e2._.js → _e816b997._.js} +2 -2
  291. package/web/.next/server/chunks/ssr/{_37e8548b._.js.map → _e816b997._.js.map} +1 -1
  292. package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
  293. package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
  294. package/web/.next/server/chunks/ssr/{_37e8548b._.js → _f483d14b._.js} +2 -2
  295. package/web/.next/server/chunks/ssr/{_55d763e2._.js.map → _f483d14b._.js.map} +1 -1
  296. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  297. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_0c3330d7._.js +3 -0
  299. package/web/.next/server/chunks/ssr/{src_presentation_web_721fb773._.js.map → src_presentation_web_0c3330d7._.js.map} +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  311. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  312. package/web/.next/server/pages/500.html +2 -2
  313. package/web/.next/server/server-reference-manifest.js +1 -1
  314. package/web/.next/server/server-reference-manifest.json +506 -350
  315. package/web/.next/static/chunks/{74ee98538b63a4b2.css → 080d853d319c5cc5.css} +1 -1
  316. package/web/.next/static/chunks/{41667f7f505952e6.js → 179c3052fd19c46d.js} +1 -1
  317. package/web/.next/static/chunks/{18c49ba954b15750.js → 1f4814c4adb31418.js} +1 -1
  318. package/web/.next/static/chunks/{149c88eadafaf835.js → 47d12705199052e7.js} +1 -1
  319. package/web/.next/static/chunks/{7559d0ac9e155de8.js → 524add4103e8a3b9.js} +2 -2
  320. package/web/.next/static/chunks/{c0fd9ae3d7b3ebe3.js → 6b7a1e5e9f1b014a.js} +1 -1
  321. package/web/.next/static/chunks/{08baac5434d9528e.js → 7d5e500fab64cfb5.js} +7 -7
  322. package/web/.next/static/chunks/816b98cd7e8330b5.js +1 -0
  323. package/web/.next/static/chunks/{f2a6406394a41d3c.js → 8e26be828072d7f6.js} +1 -1
  324. package/web/.next/static/chunks/9d6689f6cc4f825f.js +1 -0
  325. package/web/.next/static/chunks/{e2e3d8a7d339c110.js → a511514839eda467.js} +1 -1
  326. package/web/.next/static/chunks/{266fe61224d14058.js → d540d45e05b43599.js} +1 -1
  327. package/web/.next/static/chunks/{ed43f5ec24322234.js → ee3fb116e420b158.js} +1 -1
  328. package/web/.next/static/chunks/{37b065777853153c.js → f5a7f4c2313fad01.js} +2 -2
  329. package/web/.next/static/chunks/fa556c575c788679.js +1 -0
  330. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +0 -4
  331. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +0 -1
  332. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +0 -4
  333. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +0 -1
  334. package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js +0 -3
  335. package/web/.next/server/chunks/ssr/[root-of-the-server]__cb850066._.js.map +0 -1
  336. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +0 -4
  337. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +0 -1
  338. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +0 -4
  339. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +0 -1
  340. package/web/.next/server/chunks/ssr/_2a415784._.js +0 -3
  341. package/web/.next/server/chunks/ssr/_a9f57758._.js +0 -3
  342. package/web/.next/server/chunks/ssr/_a9f57758._.js.map +0 -1
  343. package/web/.next/server/chunks/ssr/src_presentation_web_721fb773._.js +0 -3
  344. package/web/.next/static/chunks/6a370f2709c81d83.js +0 -1
  345. package/web/.next/static/chunks/a6f8230f1756f318.js +0 -1
  346. package/web/.next/static/chunks/d1c52a649f1c7704.js +0 -1
  347. /package/web/.next/static/{CrBDjRQwzIQuEXTobFPfK → MsLpLuZsb_IZtZfJuzG81}/_buildManifest.js +0 -0
  348. /package/web/.next/static/{CrBDjRQwzIQuEXTobFPfK → MsLpLuZsb_IZtZfJuzG81}/_clientMiddlewareManifest.json +0 -0
  349. /package/web/.next/static/{CrBDjRQwzIQuEXTobFPfK → MsLpLuZsb_IZtZfJuzG81}/_ssgManifest.js +0 -0
@@ -0,0 +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)},62228,46211,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("00cdf9ff60c3f978758dcb5b1aeeec8e234537d2d5",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],62228);let d=(0,b.createServerReference)("6093b436564ca06cee6fff6a143a2ef46ee41851af",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],46211)},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(62228),B=a.i(46211),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
+
3
+ //# sourceMappingURL=src_presentation_web_0c3330d7._.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%3A3276c2%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A0d7a59%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__ [{\"00e9d3ee099b88ce23c4e2b1716c36dbcfcd34f934\":\"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(\"00e9d3ee099b88ce23c4e2b1716c36dbcfcd34f934\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"6084e82b6aabbeeea2f370022b8e87f6ff292db6f7\":\"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(\"6084e82b6aabbeeea2f370022b8e87f6ff292db6f7\",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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,EAAC,OAAA,CAAK,UAAU,yCAAiC,EAAE,WAAW,MAE/D,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,KAAK,CAAA,CAAC,UAAU,sCACf,OAfC,EAAE,EAAE,CAkBf,MAEA,gBAKX,CAAQ,GAAU,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,oCAA4B,MAGlE","ignoreList":[0,4]}
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%3Adccce7%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A75614c%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__ [{\"00cdf9ff60c3f978758dcb5b1aeeec8e234537d2d5\":\"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(\"00cdf9ff60c3f978758dcb5b1aeeec8e234537d2d5\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"6093b436564ca06cee6fff6a143a2ef46ee41851af\":\"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(\"6093b436564ca06cee6fff6a143a2ef46ee41851af\",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,CAAQ,aACd,CAAW,cACX,CAAY,OACZ,GAAQ,CAAK,CACd,CAAG,EACE,EAAc,EAAe,GAC7B,EAAa,EAAA,MAAY,CAAC,MAC1B,CAAC,EAAiB,EAAmB,CAAG,EAAA,QAAc,EAAC,GACvD,CAAC,EAAM,EAAQ,CAAG,CAAA,EAAA,EAAA,oBAAA,AAAoB,EAAC,CAC3C,KAAM,EACN,YAAa,IAAe,EAC5B,SAAU,EACV,OAAQ,CACV,GACA,MAAuB,CAAA,AAAhB,EAAgB,EAAA,GAAA,AAAG,EAAC,EAAA,EAAP,EAA2B,CAAE,CAAE,GAAG,CAA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B,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,WAAW,CAAA,CAAC,UAAU,gBACtB,EAAY,KAAK,IAInB,EAAY,MAAM,CAAC,GAAG,CAAC,AAAC,IACvB,IAAM,EAAa,IAAc,EAAY,SAAS,EAAI,IAAU,EAAE,EAAE,CACxE,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,SAAA,CAEC,KAAK,SACL,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EACX,sFACA,+CACA,GAAc,gBAEhB,QAAS,IAAM,EAAa,EAAY,SAAS,CAAE,EAAE,EAAE,YAEvD,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,yCACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,+BAAuB,EAAE,WAAW,GACpD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,yCAAiC,EAAE,WAAW,MAE/D,EACC,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,KAAK,CAAA,CAAC,UAAU,sCACf,OAfC,EAAE,EAAE,CAkBf,MAEA,gBAKX,CAAQ,GAAU,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,oCAA4B,MAGlE","ignoreList":[0,4]}
@@ -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(["0056f6bee8ae507093135ac915eedcca2e60082747",()=>b.pickFolder,"4004fbc8f5ca1efb87fcf4b7bc973150ed0c3bd55f",()=>e.getDeploymentLogs,"402c0d0ed7d3e5eb824a1bc3de0d508f8f01216e22",()=>d.importGitHubRepository,"404bfa5f29d435fbf4184181864dfc6b2f60389227",()=>f.deployFeature,"405fd74e26d72606330ce68835653f29ff064388d1",()=>c.listGitHubRepositories,"4094d01287db8949ff8312221ae18bf5c2af6ac2e3",()=>g.deployRepository,"40ad6bf3c0097e89791e00377888605462fc008f53",()=>i.getDeploymentStatus,"40f8bb7b8333b8b989ae7e9170f31c894d2aee61a5",()=>h.stopDeployment],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(["00d8a3eb76062fde74d6a25355b20e5003a8850768",()=>b.pickFolder,"400f29107df46cfbc0d496ef02ff92f21653b75d07",()=>h.stopDeployment,"4042994e3892947e75b405b4d8eebda6bb4b40489e",()=>c.listGitHubRepositories,"40809cd27d071c54bf02556c2233f7b945c19f6ae9",()=>g.deployRepository,"408270afd453d78155861c940c22360f29b6e4b66a",()=>d.importGitHubRepository,"40a41695ba74312aaa746cac78b4e475b661499fac",()=>e.getDeploymentLogs,"40b26d1ab2984460515325b3f95f86f463ffa41b77",()=>f.deployFeature,"40d1c8ac253602b55c11055909f9e6e82a4e38f99f",()=>i.getDeploymentStatus],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 '0056f6bee8ae507093135ac915eedcca2e60082747'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '405fd74e26d72606330ce68835653f29ff064388d1'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '402c0d0ed7d3e5eb824a1bc3de0d508f8f01216e22'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4004fbc8f5ca1efb87fcf4b7bc973150ed0c3bd55f'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '404bfa5f29d435fbf4184181864dfc6b2f60389227'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '4094d01287db8949ff8312221ae18bf5c2af6ac2e3'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40f8bb7b8333b8b989ae7e9170f31c894d2aee61a5'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40ad6bf3c0097e89791e00377888605462fc008f53'} 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 '00d8a3eb76062fde74d6a25355b20e5003a8850768'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '4042994e3892947e75b405b4d8eebda6bb4b40489e'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '408270afd453d78155861c940c22360f29b6e4b66a'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '40a41695ba74312aaa746cac78b4e475b661499fac'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40b26d1ab2984460515325b3f95f86f463ffa41b77'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40809cd27d071c54bf02556c2233f7b945c19f6ae9'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '400f29107df46cfbc0d496ef02ff92f21653b75d07'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40d1c8ac253602b55c11055909f9e6e82a4e38f99f'} 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(["0056f6bee8ae507093135ac915eedcca2e60082747",()=>b.pickFolder,"4004fbc8f5ca1efb87fcf4b7bc973150ed0c3bd55f",()=>e.getDeploymentLogs,"402c0d0ed7d3e5eb824a1bc3de0d508f8f01216e22",()=>d.importGitHubRepository,"404bfa5f29d435fbf4184181864dfc6b2f60389227",()=>f.deployFeature,"405fd74e26d72606330ce68835653f29ff064388d1",()=>c.listGitHubRepositories,"4094d01287db8949ff8312221ae18bf5c2af6ac2e3",()=>g.deployRepository,"40ad6bf3c0097e89791e00377888605462fc008f53",()=>i.getDeploymentStatus,"40f8bb7b8333b8b989ae7e9170f31c894d2aee61a5",()=>h.stopDeployment],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(["00d8a3eb76062fde74d6a25355b20e5003a8850768",()=>b.pickFolder,"400f29107df46cfbc0d496ef02ff92f21653b75d07",()=>h.stopDeployment,"4042994e3892947e75b405b4d8eebda6bb4b40489e",()=>c.listGitHubRepositories,"40809cd27d071c54bf02556c2233f7b945c19f6ae9",()=>g.deployRepository,"408270afd453d78155861c940c22360f29b6e4b66a",()=>d.importGitHubRepository,"40a41695ba74312aaa746cac78b4e475b661499fac",()=>e.getDeploymentLogs,"40b26d1ab2984460515325b3f95f86f463ffa41b77",()=>f.deployFeature,"40d1c8ac253602b55c11055909f9e6e82a4e38f99f",()=>i.getDeploymentStatus],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 '0056f6bee8ae507093135ac915eedcca2e60082747'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '405fd74e26d72606330ce68835653f29ff064388d1'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '402c0d0ed7d3e5eb824a1bc3de0d508f8f01216e22'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4004fbc8f5ca1efb87fcf4b7bc973150ed0c3bd55f'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '404bfa5f29d435fbf4184181864dfc6b2f60389227'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '4094d01287db8949ff8312221ae18bf5c2af6ac2e3'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40f8bb7b8333b8b989ae7e9170f31c894d2aee61a5'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40ad6bf3c0097e89791e00377888605462fc008f53'} 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 '00d8a3eb76062fde74d6a25355b20e5003a8850768'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '4042994e3892947e75b405b4d8eebda6bb4b40489e'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '408270afd453d78155861c940c22360f29b6e4b66a'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '40a41695ba74312aaa746cac78b4e475b661499fac'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40b26d1ab2984460515325b3f95f86f463ffa41b77'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40809cd27d071c54bf02556c2233f7b945c19f6ae9'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '400f29107df46cfbc0d496ef02ff92f21653b75d07'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40d1c8ac253602b55c11055909f9e6e82a4e38f99f'} 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,"40d3a4ae4b31dbe0bbd68f6533df4a4d58ceb50e77",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,"402b419ecf67f61347fd4809eb6b7e67d2719cc2bf",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,"40bfa1802716f77329f537c05481bbceee8ea547d0",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40acf4ea57d7d80f44533fc4e0fde07ecc72a67016",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"004dba8480f11e8c4ce2f988c7f299badf1127719e",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,"0003d81e7f6d5f551e0ca842f4e4ebaca97abc55a7",null),a.s(["checkAgentAuth",()=>v],9959),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"006d40ca90608a6e58fb4e75bea34a5f81b989fd43",null),a.s(["checkToolStatus",()=>x],79124),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"4067829240a689d6c21c815d94d7ee8efd3dc88874",null),a.s(["archiveFeature",()=>y],10528),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"785800ca1e39521bae0dca8c796c7d6f039ecaae9c",null),a.s(["deleteFeature",()=>z],50845),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"40f95f3a5c9adca0c2c4b1ad86b06457d9c7ee1160",null),a.s(["resumeFeature",()=>A],26604),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"40e1721a8fb97a6dc755957d2f9c8507231042983e",null),a.s(["startFeature",()=>B],54723),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"409b17d999b7bc5ca58387a2f062454f466cc9d473",null),a.s(["stopFeature",()=>C],18942),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"406b86bd76a128357f6d1067817cde533bebf8e4f8",null),a.s(["unarchiveFeature",()=>D],42886),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"408d5af13d81bf4d4c1d68e6a7006f0ed2427e6c44",null),a.s(["addRepository",()=>E],49560),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"408ceddacdd8d8070ae30e08f776099cafcb9a52b4",null),a.s(["deleteRepository",()=>F],39353),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"409cd53896d23949e6fa8855c296d2f4e56b433429",null),a.s(["getFeatureMetadata",()=>G],29207)}];
1
+ module.exports=[84095,56799,80496,93225,17199,98411,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,"40b4f5483f60af11cee24fcf392be7784e75acb910",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,"40e7b2f391398aae85b0219e69b98f4cb68722441c",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(a){if(!a||!c.default.isAbsolute(a))return{success:!1,error:"repositoryPath must be an absolute path"};if(!(0,h.existsSync)(a))return{success:!1,error:`Directory does not exist: ${a}`};try{let b=(0,e.resolve)("ICoastsService"),c=await b.generateCoastfile(a);return await b.build(a),{success:!0,coastfilePath:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to generate Coastfile"}}}async function r(a){if(!a||!c.default.isAbsolute(a))return{exists:!1};try{let b=(0,e.resolve)("ICoastsService");return{exists:await b.hasCoastfile(a)}}catch{return{exists:!1}}}async function s(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"403d6461ddcacccb6cb7060b8c561b6248d36eacf9",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"405bcc5f2bd5490bdc299a80a3f33765efaac23d5c",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"401a5c98fb7405b6f5d25d745339b980af3fb44103",null),a.s(["generateCoastfileAction",()=>q],17199),(0,f.ensureServerEntryExports)([r]),(0,b.registerServerReference)(r,"40624ea26a312e59ac8d8c963b70a4cec55a245eab",null),a.s(["checkCoastfileAction",()=>r],98411),(0,f.ensureServerEntryExports)([s]),(0,b.registerServerReference)(s,"00ffd71e7857ba96d54ec42d61cdc8dbfb1ca0d219",null),a.s(["isAgentSetupComplete",()=>s],41872);var t=a.i(76437);let u={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},v={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},w={"claude-code":"claude",cursor:"cursor-agent","gemini-cli":"gemini"};async function x(){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=u[b]??b,g=v[b]??null,k=w[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=t.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 y(a,b){return new Promise(c=>{try{let d=t.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 z(){let[a,b,c]=await Promise.all([y("git",["--version"]),y("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 A(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 B(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 C(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 D(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 E(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 F(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 G(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 H(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 I(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"00742c01afe908dea7d758408b4ff5ff2e8d20afc9",null),a.s(["checkAgentAuth",()=>x],9959),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"00da455561f99c2f29fe025548d777e677b1df7e92",null),a.s(["checkToolStatus",()=>z],79124),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"404c088f403bf08939a87fb5643c7c042e276063dc",null),a.s(["archiveFeature",()=>A],10528),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"783fe123d6da5717a4d611a9e4f08c964de382564c",null),a.s(["deleteFeature",()=>B],50845),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"400d830426e48fa9f10b4eb8f3613aa7bd9eaf7292",null),a.s(["resumeFeature",()=>C],26604),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"40596084f037a7178655797c91d00eb027687c362e",null),a.s(["startFeature",()=>D],54723),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"40fa588a04f28cb6d1348d3b76d53f6026078a2101",null),a.s(["stopFeature",()=>E],18942),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"40dd59d2aafd73adb9b35c35386dc251a00c79cb2c",null),a.s(["unarchiveFeature",()=>F],42886),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"40c6e0ebbe4af5fca086fcad37407bb0fa2957444f",null),a.s(["addRepository",()=>G],49560),(0,f.ensureServerEntryExports)([H]),(0,b.registerServerReference)(H,"40e67d33480c9c6047d9502c6822b6bba9d14fd947",null),a.s(["deleteRepository",()=>H],39353),(0,f.ensureServerEntryExports)([I]),(0,b.registerServerReference)(I,"4013d6370b81cd57bb2f291a79a71353748f5e63fd",null),a.s(["getFeatureMetadata",()=>I],29207)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/open-ide.ts","../../../../../../../src/presentation/web/app/actions/open-shell.ts","../../../../../../../src/presentation/web/app/actions/open-folder.ts","../../../../../../../src/presentation/web/app/actions/sync-repository.ts","../../../../../../../src/presentation/web/app/actions/agent-setup-flag.ts","../../../../../../../src/presentation/web/app/actions/check-agent-auth.ts","../../../../../../../src/presentation/web/app/actions/check-tool-status.ts","../../../../../../../src/presentation/web/app/actions/archive-feature.ts","../../../../../../../src/presentation/web/app/actions/delete-feature.ts","../../../../../../../src/presentation/web/app/actions/resume-feature.ts","../../../../../../../src/presentation/web/app/actions/start-feature.ts","../../../../../../../src/presentation/web/app/actions/stop-feature.ts","../../../../../../../src/presentation/web/app/actions/unarchive-feature.ts","../../../../../../../src/presentation/web/app/actions/add-repository.ts","../../../../../../../src/presentation/web/app/actions/delete-repository.ts","../../../../../../../src/presentation/web/app/actions/get-feature-metadata.ts"],"sourcesContent":["'use server';\n\nimport { isAbsolute } from 'node:path';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { LaunchIdeUseCase } from '@shepai/core/application/use-cases/ide/launch-ide.use-case';\nimport { resolve } from '@/lib/server-container';\n\ninterface OpenIdeInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openIde(\n input: OpenIdeInput\n): Promise<{ success: boolean; error?: string; editor?: string; path?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n const settings = getSettings();\n const editor = settings.environment.defaultEditor;\n\n const useCase = resolve<LaunchIdeUseCase>('LaunchIdeUseCase');\n const result = await useCase.execute({\n editorId: editor,\n repositoryPath,\n branch,\n checkAvailability: true,\n });\n\n if (!result.ok) {\n return { success: false, error: result.message };\n }\n\n return { success: true, editor: result.editorName, path: result.worktreePath };\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport { resolve } from '@/lib/server-container';\nimport type { IToolInstallerService } from '@shepai/core/application/ports/output/services/tool-installer.service';\n\n// Fallback commands for the \"system\" terminal when no tool metadata entry exists.\n// Uses a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst SYSTEM_TERMINAL_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> =\n {\n darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },\n linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },\n win32: {\n cmd: 'cmd.exe',\n args: (p) => ['/c', 'start', 'powershell', '-NoExit', '-Command', `Set-Location \"${p}\"`],\n },\n };\n\ninterface OpenShellInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openShell(\n input: OpenShellInput\n): Promise<{ success: boolean; error?: string; path?: string; shell?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n const settings = getSettings();\n const shell = settings.environment.shellPreference;\n const terminalPref = settings.environment.terminalPreference ?? 'system';\n const targetPath = branch ? computeWorktreePath(repositoryPath, branch) : repositoryPath;\n\n if (!existsSync(targetPath)) {\n return { success: false, error: `Path does not exist: ${targetPath}` };\n }\n\n // Try to find the terminal in tool metadata via DI container.\n // Using DI (not a direct import from tool-metadata) ensures that\n // TOOL_METADATA is read from the correct tools/ directory path — it is loaded once\n // in the Node.js CLI bootstrap context where import.meta.url resolves correctly.\n // Direct imports of tool-metadata break in standalone production builds.\n if (terminalPref !== 'system') {\n try {\n const service = resolve<IToolInstallerService>('IToolInstallerService');\n const config = service.getTerminalOpenConfig(terminalPref);\n\n if (config?.openDirectory.includes('{dir}')) {\n const resolved = config.openDirectory.replace('{dir}', targetPath);\n\n if (config.shell) {\n const child = spawn(resolved, [], {\n detached: true,\n stdio: 'ignore',\n shell: true,\n });\n child.on('error', () => undefined);\n child.unref();\n } else {\n const [command, ...args] = resolved.split(/\\s+/);\n const child = spawn(command, args, {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined);\n child.unref();\n }\n\n return { success: true, path: targetPath, shell };\n }\n } catch {\n // DI container not available — fall through to system terminal\n }\n }\n\n // Fallback to system terminal\n const entry = SYSTEM_TERMINAL_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(targetPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: targetPath, shell };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open shell';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\n\n// Use a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst FOLDER_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> = {\n darwin: { cmd: 'open', args: (p) => [p] },\n linux: { cmd: 'xdg-open', args: (p) => [p] },\n win32: { cmd: 'explorer', args: (p) => [p] },\n};\n\nexport async function openFolder(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; path?: string }> {\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n return { success: false, error: 'Directory not found' };\n }\n\n const entry = FOLDER_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(repositoryPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: repositoryPath };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { SyncRepositoryMainUseCase } from '@shepai/core/application/use-cases/repositories/sync-repository-main.use-case';\n\nexport async function syncRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'Repository id is required' };\n }\n\n try {\n const useCase = resolve<SyncRepositoryMainUseCase>('SyncRepositoryMainUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to sync repository';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\n/**\n * Check whether onboarding has been completed.\n * Delegates to the in-memory settings singleton (zero DB overhead).\n */\nexport async function isAgentSetupComplete(): Promise<boolean> {\n try {\n return getSettings().onboardingComplete;\n } catch {\n return false;\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { homedir } from 'node:os';\nimport { execFile } from 'node:child_process';\nimport { IS_WINDOWS } from '@shepai/core/infrastructure/platform';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { resolve } from '@/lib/server-container';\nimport type { ListToolsUseCase } from '@shepai/core/application/use-cases/tools/list-tools.use-case';\n\nexport interface AgentAuthStatus {\n agentType: string;\n /** Whether the CLI tool binary is installed */\n installed: boolean;\n /** Whether credentials / auth appear valid */\n authenticated: boolean;\n /** Human-readable label for the agent */\n label: string;\n /** CLI binary name (e.g. \"claude\", \"gemini\") */\n binaryName: string | null;\n /** Shell command to install the tool (e.g. \"npm install -g @anthropic-ai/claude-code\") */\n installCommand: string | null;\n /** Instructions to authenticate if not authenticated */\n authCommand: string | null;\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor Agent',\n 'gemini-cli': 'Gemini CLI',\n aider: 'Aider',\n continue: 'Continue',\n dev: 'Demo',\n};\n\nconst AGENT_TOOL_MAP: Record<string, string> = {\n 'claude-code': 'claude-code',\n cursor: 'cursor-cli',\n 'gemini-cli': 'gemini-cli',\n};\n\nconst AGENT_BINARY_MAP: Record<string, string> = {\n 'claude-code': 'claude',\n cursor: 'cursor-agent',\n 'gemini-cli': 'gemini',\n};\n\n/**\n * Tier 1: Instant credential/env check (~5ms, no subprocess).\n * Returns true if credentials likely exist.\n */\nfunction tier1AuthCheck(agentType: string): boolean {\n const home = homedir();\n\n switch (agentType) {\n case 'claude-code': {\n if (process.env['ANTHROPIC_API_KEY']) return true;\n if (process.env['CLAUDE_CODE_USE_BEDROCK']) return true;\n if (process.env['CLAUDE_CODE_USE_VERTEX']) return true;\n if (process.env['CLAUDE_CODE_OAUTH_TOKEN']) return true;\n const credPath = join(home, '.claude', '.credentials.json');\n return existsSync(credPath);\n }\n case 'cursor': {\n if (process.env['CURSOR_API_KEY']) return true;\n // Cursor Agent stores creds after `agent login` — check common locations\n const cursorDir = join(home, '.cursor');\n return existsSync(cursorDir);\n }\n case 'gemini-cli': {\n if (process.env['GEMINI_API_KEY']) return true;\n if (process.env['GOOGLE_API_KEY']) return true;\n if (process.env['GOOGLE_APPLICATION_CREDENTIALS']) return true;\n const accountsPath = join(home, '.gemini', 'google_accounts.json');\n return existsSync(accountsPath);\n }\n default:\n // dev, aider, continue — assume no auth needed\n return true;\n }\n}\n\n/**\n * Tier 2: Subprocess verification (~200ms).\n * Only called if tier 1 passes, to confirm tokens aren't expired.\n */\nfunction tier2AuthVerify(agentType: string, binaryName: string): Promise<boolean> {\n return new Promise((resolve) => {\n let cmd: string;\n let args: string[];\n\n switch (agentType) {\n case 'claude-code':\n cmd = binaryName;\n args = ['auth', 'status'];\n break;\n case 'cursor':\n cmd = binaryName;\n args = ['status'];\n break;\n default:\n // No tier 2 command available — trust tier 1\n resolve(true);\n return;\n }\n\n try {\n const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };\n execFile(cmd, args, opts, (error) => {\n resolve(!error);\n });\n } catch {\n resolve(false);\n }\n });\n}\n\n/**\n * Check agent tool installation + auth status.\n * Uses two-tier detection: instant file/env check, then optional subprocess verify.\n */\nexport async function checkAgentAuth(): Promise<AgentAuthStatus> {\n let agentType: string;\n try {\n agentType = getSettings().agent.type;\n } catch {\n return {\n agentType: 'unknown',\n installed: false,\n authenticated: false,\n label: 'Unknown',\n binaryName: null,\n installCommand: null,\n authCommand: null,\n };\n }\n\n const label = AGENT_LABELS[agentType] ?? agentType;\n const toolId = AGENT_TOOL_MAP[agentType] ?? null;\n const binaryName = AGENT_BINARY_MAP[agentType] ?? null;\n\n // Dev/demo agents — always good\n if (!toolId) {\n return {\n agentType,\n installed: true,\n authenticated: true,\n label,\n binaryName: null,\n installCommand: null,\n authCommand: null,\n };\n }\n\n // Check if tool is installed (also grab install command from metadata)\n let installed = false;\n let installCommand: string | null = null;\n try {\n const useCase = resolve<ListToolsUseCase>('ListToolsUseCase');\n const tools = await useCase.execute();\n const tool = tools.find((t) => t.id === toolId);\n installed = tool?.status.status === 'available';\n installCommand = tool?.installCommand ?? null;\n } catch {\n installed = false;\n }\n\n if (!installed) {\n return {\n agentType,\n installed: false,\n authenticated: false,\n label,\n binaryName,\n installCommand,\n authCommand: binaryName ? `Install ${label} first` : null,\n };\n }\n\n // Tier 1: instant file/env check\n const tier1 = tier1AuthCheck(agentType);\n\n if (!tier1) {\n return {\n agentType,\n installed: true,\n authenticated: false,\n label,\n binaryName,\n installCommand,\n authCommand: binaryName,\n };\n }\n\n // Tier 2: subprocess verify (best effort, ~200ms)\n let authenticated = true;\n if (binaryName) {\n authenticated = await tier2AuthVerify(agentType, binaryName);\n }\n\n return {\n agentType,\n installed: true,\n authenticated,\n label,\n binaryName,\n installCommand,\n authCommand: authenticated ? null : binaryName,\n };\n}\n","'use server';\n\nimport { execFile } from 'node:child_process';\nimport { IS_WINDOWS } from '@shepai/core/infrastructure/platform';\nimport { resolve } from '@/lib/server-container';\nimport type { ListToolsUseCase } from '@shepai/core/application/use-cases/tools/list-tools.use-case';\n\nexport interface ToolStatusEntry {\n installed: boolean;\n version: string | null;\n /** Platform-specific install command from tool JSON metadata */\n installCommand: string | null;\n /** Documentation/website URL */\n installUrl: string | null;\n}\n\nexport interface ToolStatusResult {\n git: ToolStatusEntry;\n gh: ToolStatusEntry;\n}\n\nfunction getVersion(\n command: string,\n args: string[]\n): Promise<{ installed: boolean; version: string | null }> {\n return new Promise((resolve) => {\n try {\n const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };\n execFile(command, args, opts, (error, stdout) => {\n if (error) {\n resolve({ installed: false, version: null });\n return;\n }\n // Extract version number from output like \"git version 2.43.0\" or \"gh version 2.40.1\"\n const match = stdout.match(/(\\d+\\.\\d+(?:\\.\\d+)?)/);\n resolve({ installed: true, version: match?.[1] ?? null });\n });\n } catch {\n resolve({ installed: false, version: null });\n }\n });\n}\n\nexport async function checkToolStatus(): Promise<ToolStatusResult> {\n // Run version checks and tool metadata lookup in parallel\n const [gitVersion, ghVersion, tools] = await Promise.all([\n getVersion('git', ['--version']),\n getVersion('gh', ['--version']),\n (async () => {\n try {\n const useCase = resolve<ListToolsUseCase>('ListToolsUseCase');\n return await useCase.execute();\n } catch {\n return [];\n }\n })(),\n ]);\n\n const gitTool = tools.find((t) => t.id === 'git');\n const ghTool = tools.find((t) => t.id === 'gh');\n\n return {\n git: {\n ...gitVersion,\n installCommand: gitTool?.installCommand ?? null,\n installUrl: gitTool?.website ?? 'https://git-scm.com',\n },\n gh: {\n ...ghVersion,\n installCommand: ghTool?.installCommand ?? null,\n installUrl: ghTool?.website ?? 'https://cli.github.com',\n },\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ArchiveFeatureUseCase } from '@shepai/core/application/use-cases/features/archive-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function archiveFeature(\n featureId: string\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const archiveFeatureUseCase = resolve<ArchiveFeatureUseCase>('ArchiveFeatureUseCase');\n const feature = await archiveFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to archive feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteFeatureUseCase } from '@shepai/core/application/use-cases/features/delete-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function deleteFeature(\n featureId: string,\n cleanup?: boolean,\n cascadeDelete?: boolean,\n closePr?: boolean\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const deleteFeatureUseCase = resolve<DeleteFeatureUseCase>('DeleteFeatureUseCase');\n const options: { cleanup?: boolean; cascadeDelete?: boolean; closePr?: boolean } = {};\n if (cleanup !== undefined) options.cleanup = cleanup;\n if (cascadeDelete !== undefined) options.cascadeDelete = cascadeDelete;\n if (closePr !== undefined) options.closePr = closePr;\n const feature =\n Object.keys(options).length > 0\n ? await deleteFeatureUseCase.execute(featureId, options)\n : await deleteFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ResumeFeatureUseCase } from '@shepai/core/application/use-cases/features/resume-feature.use-case';\n\nexport async function resumeFeature(\n featureId: string\n): Promise<{ resumed: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { resumed: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<ResumeFeatureUseCase>('ResumeFeatureUseCase');\n await useCase.execute(featureId);\n return { resumed: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to resume feature';\n return { resumed: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StartFeatureUseCase } from '@shepai/core/application/use-cases/features/start-feature.use-case';\n\nexport async function startFeature(\n featureId: string\n): Promise<{ started: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { started: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<StartFeatureUseCase>('StartFeatureUseCase');\n await useCase.execute(featureId);\n return { started: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to start feature';\n return { started: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StopAgentRunUseCase } from '@shepai/core/application/use-cases/agents/stop-agent-run.use-case';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\n\nexport async function stopFeature(\n featureId: string\n): Promise<{ stopped: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { stopped: false, error: 'Feature id is required' };\n }\n\n try {\n // Find the active agent run for this feature\n const runRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const allRuns = await runRepo.list();\n const activeRun = allRuns.find(\n (r) =>\n r.featureId === featureId &&\n r.status !== 'completed' &&\n r.status !== 'failed' &&\n r.status !== 'interrupted' &&\n r.status !== 'cancelled'\n );\n\n if (!activeRun) {\n return { stopped: false, error: 'No active agent run found for this feature' };\n }\n\n const useCase = resolve<StopAgentRunUseCase>('StopAgentRunUseCase');\n const result = await useCase.execute(activeRun.id);\n\n if (!result.stopped) {\n return { stopped: false, error: result.reason };\n }\n return { stopped: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to stop agent';\n return { stopped: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { UnarchiveFeatureUseCase } from '@shepai/core/application/use-cases/features/unarchive-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function unarchiveFeature(\n featureId: string\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const unarchiveFeatureUseCase = resolve<UnarchiveFeatureUseCase>('UnarchiveFeatureUseCase');\n const feature = await unarchiveFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to unarchive feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { AddRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/add-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\n\ninterface AddRepositoryInput {\n path: string;\n name?: string;\n}\n\nexport async function addRepository(\n input: AddRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { path, name } = input;\n\n if (!path?.trim()) {\n return { error: 'path is required' };\n }\n\n try {\n const addRepoUseCase = resolve<AddRepositoryUseCase>('AddRepositoryUseCase');\n const repository = await addRepoUseCase.execute({ path, name });\n return { repository };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to add repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/delete-repository.use-case';\n\nexport async function deleteRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'id is required' };\n }\n\n try {\n const useCase = resolve<DeleteRepositoryUseCase>('DeleteRepositoryUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete repository';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\n/**\n * Lightweight server action to fetch a single feature's name and description.\n * Used by the SSE effect to update node metadata after AI metadata generation\n * without a full graph reconcile (which can overwrite SSE-driven state).\n */\nexport async function getFeatureMetadata(\n featureId: string\n): Promise<{ name: string; description: string } | null> {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n if (!feature) return null;\n return { name: feature.name, description: feature.description };\n}\n"],"names":[],"mappings":"iJAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBAOO,eAAe,EACpB,CAAmB,EAEnB,GAAM,gBAAE,CAAc,QAAE,CAAM,CAAE,CAAG,EAEnC,GAAI,CAAC,GAAkB,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GACjC,MAAO,CAAE,OADyC,EAChC,EAAO,MAAO,yCAA0C,EAI5E,IAAM,EADW,AACF,CADE,EAAA,EAAA,WAAA,AAAW,IACJ,WAAW,CAAC,aAAa,CAE3C,EAAU,CAAA,EAAA,EAAA,OAAA,AAAO,EAAmB,oBACpC,EAAS,MAAM,EAAQ,OAAO,CAAC,CACnC,SAAU,iBACV,SACA,EACA,mBAAmB,CACrB,UAEA,AAAK,EAAO,EAAR,AAAU,CAIP,CAJS,AAIP,SAAS,EAAM,OAAQ,EAAO,UAAU,CAAE,KAAM,EAAO,YAAa,AAAD,EAHnE,CAAE,QAAS,GAAO,MAAO,EAAO,OAAO,AAAC,CAInD,iCAzBsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,mCCVtB,IAAA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,C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,EAAgB,CAEvB,MAAO,CAAE,SAAS,EAAO,MADT,CACgB,YADC,MAAQ,EAAM,OAAO,CAAG,6BACjB,CAC1C,CACF,CCVO,eAAe,EACpB,CAAiB,EAEjB,IAAM,EAAc,CAAA,EAAA,EAAA,OAAO,AAAP,EAA4B,sBAC1C,EAAU,MAAM,EAAY,QAAQ,CAAC,UAC3C,AAAK,EACE,CAAE,CADL,IACW,CADD,CACS,IAAI,CAAE,YAAa,EAAQ,WAAY,AAAD,EADxC,IAEvB,iCVyGsB,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yEC/EA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,2ECrCA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,0ECAA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECDA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECAA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,wECCA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,uECAA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,4ECKA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,yECNA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA,4ECKA,IAAA,CAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,6CAAA"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/open-ide.ts","../../../../../../../src/presentation/web/app/actions/open-shell.ts","../../../../../../../src/presentation/web/app/actions/open-folder.ts","../../../../../../../src/presentation/web/app/actions/sync-repository.ts","../../../../../../../src/presentation/web/app/actions/generate-coastfile.ts","../../../../../../../src/presentation/web/app/actions/check-coastfile.ts","../../../../../../../src/presentation/web/app/actions/agent-setup-flag.ts","../../../../../../../src/presentation/web/app/actions/check-agent-auth.ts","../../../../../../../src/presentation/web/app/actions/check-tool-status.ts","../../../../../../../src/presentation/web/app/actions/archive-feature.ts","../../../../../../../src/presentation/web/app/actions/delete-feature.ts","../../../../../../../src/presentation/web/app/actions/resume-feature.ts","../../../../../../../src/presentation/web/app/actions/start-feature.ts","../../../../../../../src/presentation/web/app/actions/stop-feature.ts","../../../../../../../src/presentation/web/app/actions/unarchive-feature.ts","../../../../../../../src/presentation/web/app/actions/add-repository.ts","../../../../../../../src/presentation/web/app/actions/delete-repository.ts","../../../../../../../src/presentation/web/app/actions/get-feature-metadata.ts"],"sourcesContent":["'use server';\n\nimport { isAbsolute } from 'node:path';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport type { LaunchIdeUseCase } from '@shepai/core/application/use-cases/ide/launch-ide.use-case';\nimport { resolve } from '@/lib/server-container';\n\ninterface OpenIdeInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openIde(\n input: OpenIdeInput\n): Promise<{ success: boolean; error?: string; editor?: string; path?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n const settings = getSettings();\n const editor = settings.environment.defaultEditor;\n\n const useCase = resolve<LaunchIdeUseCase>('LaunchIdeUseCase');\n const result = await useCase.execute({\n editorId: editor,\n repositoryPath,\n branch,\n checkAvailability: true,\n });\n\n if (!result.ok) {\n return { success: false, error: result.message };\n }\n\n return { success: true, editor: result.editorName, path: result.worktreePath };\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { computeWorktreePath } from '@shepai/core/infrastructure/services/ide-launchers/compute-worktree-path';\nimport { resolve } from '@/lib/server-container';\nimport type { IToolInstallerService } from '@shepai/core/application/ports/output/services/tool-installer.service';\n\n// Fallback commands for the \"system\" terminal when no tool metadata entry exists.\n// Uses a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst SYSTEM_TERMINAL_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> =\n {\n darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },\n linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },\n win32: {\n cmd: 'cmd.exe',\n args: (p) => ['/c', 'start', 'powershell', '-NoExit', '-Command', `Set-Location \"${p}\"`],\n },\n };\n\ninterface OpenShellInput {\n repositoryPath: string;\n branch?: string;\n}\n\nexport async function openShell(\n input: OpenShellInput\n): Promise<{ success: boolean; error?: string; path?: string; shell?: string }> {\n const { repositoryPath, branch } = input;\n\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n const settings = getSettings();\n const shell = settings.environment.shellPreference;\n const terminalPref = settings.environment.terminalPreference ?? 'system';\n const targetPath = branch ? computeWorktreePath(repositoryPath, branch) : repositoryPath;\n\n if (!existsSync(targetPath)) {\n return { success: false, error: `Path does not exist: ${targetPath}` };\n }\n\n // Try to find the terminal in tool metadata via DI container.\n // Using DI (not a direct import from tool-metadata) ensures that\n // TOOL_METADATA is read from the correct tools/ directory path — it is loaded once\n // in the Node.js CLI bootstrap context where import.meta.url resolves correctly.\n // Direct imports of tool-metadata break in standalone production builds.\n if (terminalPref !== 'system') {\n try {\n const service = resolve<IToolInstallerService>('IToolInstallerService');\n const config = service.getTerminalOpenConfig(terminalPref);\n\n if (config?.openDirectory.includes('{dir}')) {\n const resolved = config.openDirectory.replace('{dir}', targetPath);\n\n if (config.shell) {\n const child = spawn(resolved, [], {\n detached: true,\n stdio: 'ignore',\n shell: true,\n });\n child.on('error', () => undefined);\n child.unref();\n } else {\n const [command, ...args] = resolved.split(/\\s+/);\n const child = spawn(command, args, {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined);\n child.unref();\n }\n\n return { success: true, path: targetPath, shell };\n }\n } catch {\n // DI container not available — fall through to system terminal\n }\n }\n\n // Fallback to system terminal\n const entry = SYSTEM_TERMINAL_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(targetPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: targetPath, shell };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open shell';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { platform } from 'node:os';\nimport { isAbsolute } from 'node:path';\nimport { spawn } from 'node:child_process';\n\n// Use a record lookup instead of if/else to prevent the bundler from\n// tree-shaking platform branches at build time. Turbopack evaluates\n// os.platform() during the build and dead-code-eliminates unused branches,\n// baking in the CI platform (linux) and breaking macOS/Windows installs.\nconst FOLDER_COMMANDS: Record<string, { cmd: string; args: (path: string) => string[] }> = {\n darwin: { cmd: 'open', args: (p) => [p] },\n linux: { cmd: 'xdg-open', args: (p) => [p] },\n win32: { cmd: 'explorer', args: (p) => [p] },\n};\n\nexport async function openFolder(\n repositoryPath: string\n): Promise<{ success: boolean; error?: string; path?: string }> {\n if (!repositoryPath || !isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n try {\n if (!existsSync(repositoryPath)) {\n return { success: false, error: 'Directory not found' };\n }\n\n const entry = FOLDER_COMMANDS[platform()];\n if (!entry) {\n return {\n success: false,\n error: `Unsupported platform: ${platform()}`,\n };\n }\n\n const child = spawn(entry.cmd, entry.args(repositoryPath), {\n detached: true,\n stdio: 'ignore',\n });\n child.on('error', () => undefined); // Prevent uncaught exception on spawn failure\n child.unref();\n\n return { success: true, path: repositoryPath };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to open folder';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { SyncRepositoryMainUseCase } from '@shepai/core/application/use-cases/repositories/sync-repository-main.use-case';\n\nexport async function syncRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'Repository id is required' };\n }\n\n try {\n const useCase = resolve<SyncRepositoryMainUseCase>('SyncRepositoryMainUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to sync repository';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport path from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { resolve } from '@/lib/server-container';\nimport type { ICoastsService } from '@shepai/core/application/ports/output/services/coasts-service.interface';\n\nexport interface GenerateCoastfileResult {\n success: boolean;\n coastfilePath?: string;\n error?: string;\n}\n\nexport async function generateCoastfileAction(\n repositoryPath: string\n): Promise<GenerateCoastfileResult> {\n if (!repositoryPath || !path.isAbsolute(repositoryPath)) {\n return { success: false, error: 'repositoryPath must be an absolute path' };\n }\n\n if (!existsSync(repositoryPath)) {\n return { success: false, error: `Directory does not exist: ${repositoryPath}` };\n }\n\n try {\n const coastsService = resolve<ICoastsService>('ICoastsService');\n const coastfilePath = await coastsService.generateCoastfile(repositoryPath);\n await coastsService.build(repositoryPath);\n return { success: true, coastfilePath };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to generate Coastfile';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport path from 'node:path';\nimport { resolve } from '@/lib/server-container';\nimport type { ICoastsService } from '@shepai/core/application/ports/output/services/coasts-service.interface';\n\nexport interface CheckCoastfileResult {\n exists: boolean;\n}\n\nexport async function checkCoastfileAction(repositoryPath: string): Promise<CheckCoastfileResult> {\n if (!repositoryPath || !path.isAbsolute(repositoryPath)) {\n return { exists: false };\n }\n\n try {\n const coastsService = resolve<ICoastsService>('ICoastsService');\n const exists = await coastsService.hasCoastfile(repositoryPath);\n return { exists };\n } catch {\n return { exists: false };\n }\n}\n","'use server';\n\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\n\n/**\n * Check whether onboarding has been completed.\n * Delegates to the in-memory settings singleton (zero DB overhead).\n */\nexport async function isAgentSetupComplete(): Promise<boolean> {\n try {\n return getSettings().onboardingComplete;\n } catch {\n return false;\n }\n}\n","'use server';\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { homedir } from 'node:os';\nimport { execFile } from 'node:child_process';\nimport { IS_WINDOWS } from '@shepai/core/infrastructure/platform';\nimport { getSettings } from '@shepai/core/infrastructure/services/settings.service';\nimport { resolve } from '@/lib/server-container';\nimport type { ListToolsUseCase } from '@shepai/core/application/use-cases/tools/list-tools.use-case';\n\nexport interface AgentAuthStatus {\n agentType: string;\n /** Whether the CLI tool binary is installed */\n installed: boolean;\n /** Whether credentials / auth appear valid */\n authenticated: boolean;\n /** Human-readable label for the agent */\n label: string;\n /** CLI binary name (e.g. \"claude\", \"gemini\") */\n binaryName: string | null;\n /** Shell command to install the tool (e.g. \"npm install -g @anthropic-ai/claude-code\") */\n installCommand: string | null;\n /** Instructions to authenticate if not authenticated */\n authCommand: string | null;\n}\n\nconst AGENT_LABELS: Record<string, string> = {\n 'claude-code': 'Claude Code',\n cursor: 'Cursor Agent',\n 'gemini-cli': 'Gemini CLI',\n aider: 'Aider',\n continue: 'Continue',\n dev: 'Demo',\n};\n\nconst AGENT_TOOL_MAP: Record<string, string> = {\n 'claude-code': 'claude-code',\n cursor: 'cursor-cli',\n 'gemini-cli': 'gemini-cli',\n};\n\nconst AGENT_BINARY_MAP: Record<string, string> = {\n 'claude-code': 'claude',\n cursor: 'cursor-agent',\n 'gemini-cli': 'gemini',\n};\n\n/**\n * Tier 1: Instant credential/env check (~5ms, no subprocess).\n * Returns true if credentials likely exist.\n */\nfunction tier1AuthCheck(agentType: string): boolean {\n const home = homedir();\n\n switch (agentType) {\n case 'claude-code': {\n if (process.env['ANTHROPIC_API_KEY']) return true;\n if (process.env['CLAUDE_CODE_USE_BEDROCK']) return true;\n if (process.env['CLAUDE_CODE_USE_VERTEX']) return true;\n if (process.env['CLAUDE_CODE_OAUTH_TOKEN']) return true;\n const credPath = join(home, '.claude', '.credentials.json');\n return existsSync(credPath);\n }\n case 'cursor': {\n if (process.env['CURSOR_API_KEY']) return true;\n // Cursor Agent stores creds after `agent login` — check common locations\n const cursorDir = join(home, '.cursor');\n return existsSync(cursorDir);\n }\n case 'gemini-cli': {\n if (process.env['GEMINI_API_KEY']) return true;\n if (process.env['GOOGLE_API_KEY']) return true;\n if (process.env['GOOGLE_APPLICATION_CREDENTIALS']) return true;\n const accountsPath = join(home, '.gemini', 'google_accounts.json');\n return existsSync(accountsPath);\n }\n default:\n // dev, aider, continue — assume no auth needed\n return true;\n }\n}\n\n/**\n * Tier 2: Subprocess verification (~200ms).\n * Only called if tier 1 passes, to confirm tokens aren't expired.\n */\nfunction tier2AuthVerify(agentType: string, binaryName: string): Promise<boolean> {\n return new Promise((resolve) => {\n let cmd: string;\n let args: string[];\n\n switch (agentType) {\n case 'claude-code':\n cmd = binaryName;\n args = ['auth', 'status'];\n break;\n case 'cursor':\n cmd = binaryName;\n args = ['status'];\n break;\n default:\n // No tier 2 command available — trust tier 1\n resolve(true);\n return;\n }\n\n try {\n const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };\n execFile(cmd, args, opts, (error) => {\n resolve(!error);\n });\n } catch {\n resolve(false);\n }\n });\n}\n\n/**\n * Check agent tool installation + auth status.\n * Uses two-tier detection: instant file/env check, then optional subprocess verify.\n */\nexport async function checkAgentAuth(): Promise<AgentAuthStatus> {\n let agentType: string;\n try {\n agentType = getSettings().agent.type;\n } catch {\n return {\n agentType: 'unknown',\n installed: false,\n authenticated: false,\n label: 'Unknown',\n binaryName: null,\n installCommand: null,\n authCommand: null,\n };\n }\n\n const label = AGENT_LABELS[agentType] ?? agentType;\n const toolId = AGENT_TOOL_MAP[agentType] ?? null;\n const binaryName = AGENT_BINARY_MAP[agentType] ?? null;\n\n // Dev/demo agents — always good\n if (!toolId) {\n return {\n agentType,\n installed: true,\n authenticated: true,\n label,\n binaryName: null,\n installCommand: null,\n authCommand: null,\n };\n }\n\n // Check if tool is installed (also grab install command from metadata)\n let installed = false;\n let installCommand: string | null = null;\n try {\n const useCase = resolve<ListToolsUseCase>('ListToolsUseCase');\n const tools = await useCase.execute();\n const tool = tools.find((t) => t.id === toolId);\n installed = tool?.status.status === 'available';\n installCommand = tool?.installCommand ?? null;\n } catch {\n installed = false;\n }\n\n if (!installed) {\n return {\n agentType,\n installed: false,\n authenticated: false,\n label,\n binaryName,\n installCommand,\n authCommand: binaryName ? `Install ${label} first` : null,\n };\n }\n\n // Tier 1: instant file/env check\n const tier1 = tier1AuthCheck(agentType);\n\n if (!tier1) {\n return {\n agentType,\n installed: true,\n authenticated: false,\n label,\n binaryName,\n installCommand,\n authCommand: binaryName,\n };\n }\n\n // Tier 2: subprocess verify (best effort, ~200ms)\n let authenticated = true;\n if (binaryName) {\n authenticated = await tier2AuthVerify(agentType, binaryName);\n }\n\n return {\n agentType,\n installed: true,\n authenticated,\n label,\n binaryName,\n installCommand,\n authCommand: authenticated ? null : binaryName,\n };\n}\n","'use server';\n\nimport { execFile } from 'node:child_process';\nimport { IS_WINDOWS } from '@shepai/core/infrastructure/platform';\nimport { resolve } from '@/lib/server-container';\nimport type { ListToolsUseCase } from '@shepai/core/application/use-cases/tools/list-tools.use-case';\n\nexport interface ToolStatusEntry {\n installed: boolean;\n version: string | null;\n /** Platform-specific install command from tool JSON metadata */\n installCommand: string | null;\n /** Documentation/website URL */\n installUrl: string | null;\n}\n\nexport interface ToolStatusResult {\n git: ToolStatusEntry;\n gh: ToolStatusEntry;\n}\n\nfunction getVersion(\n command: string,\n args: string[]\n): Promise<{ installed: boolean; version: string | null }> {\n return new Promise((resolve) => {\n try {\n const opts = IS_WINDOWS ? { timeout: 5000, windowsHide: true } : { timeout: 5000 };\n execFile(command, args, opts, (error, stdout) => {\n if (error) {\n resolve({ installed: false, version: null });\n return;\n }\n // Extract version number from output like \"git version 2.43.0\" or \"gh version 2.40.1\"\n const match = stdout.match(/(\\d+\\.\\d+(?:\\.\\d+)?)/);\n resolve({ installed: true, version: match?.[1] ?? null });\n });\n } catch {\n resolve({ installed: false, version: null });\n }\n });\n}\n\nexport async function checkToolStatus(): Promise<ToolStatusResult> {\n // Run version checks and tool metadata lookup in parallel\n const [gitVersion, ghVersion, tools] = await Promise.all([\n getVersion('git', ['--version']),\n getVersion('gh', ['--version']),\n (async () => {\n try {\n const useCase = resolve<ListToolsUseCase>('ListToolsUseCase');\n return await useCase.execute();\n } catch {\n return [];\n }\n })(),\n ]);\n\n const gitTool = tools.find((t) => t.id === 'git');\n const ghTool = tools.find((t) => t.id === 'gh');\n\n return {\n git: {\n ...gitVersion,\n installCommand: gitTool?.installCommand ?? null,\n installUrl: gitTool?.website ?? 'https://git-scm.com',\n },\n gh: {\n ...ghVersion,\n installCommand: ghTool?.installCommand ?? null,\n installUrl: ghTool?.website ?? 'https://cli.github.com',\n },\n };\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ArchiveFeatureUseCase } from '@shepai/core/application/use-cases/features/archive-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function archiveFeature(\n featureId: string\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const archiveFeatureUseCase = resolve<ArchiveFeatureUseCase>('ArchiveFeatureUseCase');\n const feature = await archiveFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to archive feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteFeatureUseCase } from '@shepai/core/application/use-cases/features/delete-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function deleteFeature(\n featureId: string,\n cleanup?: boolean,\n cascadeDelete?: boolean,\n closePr?: boolean\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const deleteFeatureUseCase = resolve<DeleteFeatureUseCase>('DeleteFeatureUseCase');\n const options: { cleanup?: boolean; cascadeDelete?: boolean; closePr?: boolean } = {};\n if (cleanup !== undefined) options.cleanup = cleanup;\n if (cascadeDelete !== undefined) options.cascadeDelete = cascadeDelete;\n if (closePr !== undefined) options.closePr = closePr;\n const feature =\n Object.keys(options).length > 0\n ? await deleteFeatureUseCase.execute(featureId, options)\n : await deleteFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { ResumeFeatureUseCase } from '@shepai/core/application/use-cases/features/resume-feature.use-case';\n\nexport async function resumeFeature(\n featureId: string\n): Promise<{ resumed: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { resumed: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<ResumeFeatureUseCase>('ResumeFeatureUseCase');\n await useCase.execute(featureId);\n return { resumed: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to resume feature';\n return { resumed: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StartFeatureUseCase } from '@shepai/core/application/use-cases/features/start-feature.use-case';\n\nexport async function startFeature(\n featureId: string\n): Promise<{ started: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { started: false, error: 'Feature id is required' };\n }\n\n try {\n const useCase = resolve<StartFeatureUseCase>('StartFeatureUseCase');\n await useCase.execute(featureId);\n return { started: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to start feature';\n return { started: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { StopAgentRunUseCase } from '@shepai/core/application/use-cases/agents/stop-agent-run.use-case';\nimport type { IAgentRunRepository } from '@shepai/core/application/ports/output/agents/agent-run-repository.interface';\n\nexport async function stopFeature(\n featureId: string\n): Promise<{ stopped: boolean; error?: string }> {\n if (!featureId.trim()) {\n return { stopped: false, error: 'Feature id is required' };\n }\n\n try {\n // Find the active agent run for this feature\n const runRepo = resolve<IAgentRunRepository>('IAgentRunRepository');\n const allRuns = await runRepo.list();\n const activeRun = allRuns.find(\n (r) =>\n r.featureId === featureId &&\n r.status !== 'completed' &&\n r.status !== 'failed' &&\n r.status !== 'interrupted' &&\n r.status !== 'cancelled'\n );\n\n if (!activeRun) {\n return { stopped: false, error: 'No active agent run found for this feature' };\n }\n\n const useCase = resolve<StopAgentRunUseCase>('StopAgentRunUseCase');\n const result = await useCase.execute(activeRun.id);\n\n if (!result.stopped) {\n return { stopped: false, error: result.reason };\n }\n return { stopped: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to stop agent';\n return { stopped: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { UnarchiveFeatureUseCase } from '@shepai/core/application/use-cases/features/unarchive-feature.use-case';\nimport type { Feature } from '@shepai/core/domain/generated/output';\n\nexport async function unarchiveFeature(\n featureId: string\n): Promise<{ feature?: Feature; error?: string }> {\n if (!featureId?.trim()) {\n return { error: 'id is required' };\n }\n\n try {\n const unarchiveFeatureUseCase = resolve<UnarchiveFeatureUseCase>('UnarchiveFeatureUseCase');\n const feature = await unarchiveFeatureUseCase.execute(featureId);\n return { feature };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to unarchive feature';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { AddRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/add-repository.use-case';\nimport type { Repository } from '@shepai/core/domain/generated/output';\n\ninterface AddRepositoryInput {\n path: string;\n name?: string;\n}\n\nexport async function addRepository(\n input: AddRepositoryInput\n): Promise<{ repository?: Repository; error?: string }> {\n const { path, name } = input;\n\n if (!path?.trim()) {\n return { error: 'path is required' };\n }\n\n try {\n const addRepoUseCase = resolve<AddRepositoryUseCase>('AddRepositoryUseCase');\n const repository = await addRepoUseCase.execute({ path, name });\n return { repository };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to add repository';\n return { error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { DeleteRepositoryUseCase } from '@shepai/core/application/use-cases/repositories/delete-repository.use-case';\n\nexport async function deleteRepository(\n repositoryId: string\n): Promise<{ success: boolean; error?: string }> {\n if (!repositoryId?.trim()) {\n return { success: false, error: 'id is required' };\n }\n\n try {\n const useCase = resolve<DeleteRepositoryUseCase>('DeleteRepositoryUseCase');\n await useCase.execute(repositoryId);\n return { success: true };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Failed to delete repository';\n return { success: false, error: message };\n }\n}\n","'use server';\n\nimport { resolve } from '@/lib/server-container';\nimport type { IFeatureRepository } from '@shepai/core/application/ports/output/repositories/feature-repository.interface';\n\n/**\n * Lightweight server action to fetch a single feature's name and description.\n * Used by the SSE effect to update node metadata after AI metadata generation\n * without a full graph reconcile (which can overwrite SSE-driven state).\n */\nexport async function getFeatureMetadata(\n featureId: string\n): Promise<{ name: string; description: string } | null> {\n const featureRepo = resolve<IFeatureRepository>('IFeatureRepository');\n const feature = await featureRepo.findById(featureId);\n if (!feature) return null;\n return { name: feature.name, description: feature.description };\n}\n"],"names":[],"mappings":"6JAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBAOO,eAAe,EACpB,CAAmB,EAEnB,GAAM,CAAE,gBAAc,QAAE,CAAM,CAAE,CAAG,EAEnC,GAAI,CAAC,GAAkB,CA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