@shepai/cli 1.84.0 → 1.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/apis/json-schema/Attachment.yaml +31 -0
  2. package/apis/json-schema/Feature.yaml +5 -0
  3. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
  4. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +35 -3
  6. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +7 -1
  7. package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
  8. package/dist/packages/core/src/domain/generated/output.d.ts +33 -0
  9. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/container.js +3 -0
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
  14. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +4 -0
  15. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +16 -0
  17. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts +31 -0
  18. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts.map +1 -0
  19. package/dist/packages/core/src/infrastructure/services/attachment-storage.service.js +136 -0
  20. package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
  21. package/dist/src/presentation/cli/commands/feat/new.command.js +21 -1
  22. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts +7 -0
  23. package/dist/src/presentation/web/app/actions/compose-user-input.d.ts.map +1 -0
  24. package/dist/src/presentation/web/app/actions/compose-user-input.js +7 -0
  25. package/dist/src/presentation/web/app/actions/create-feature.d.ts +1 -0
  26. package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
  27. package/dist/src/presentation/web/app/actions/create-feature.js +3 -9
  28. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts +4 -0
  29. package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -0
  30. package/dist/src/presentation/web/app/api/attachments/preview/route.js +47 -0
  31. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts +3 -0
  32. package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +1 -0
  33. package/dist/src/presentation/web/app/api/attachments/upload/route.js +100 -0
  34. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts +16 -0
  35. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -0
  36. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +53 -0
  37. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +12 -0
  38. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -0
  39. package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +55 -0
  40. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts +3 -0
  41. package/dist/src/presentation/web/components/common/attachment-card/index.d.ts.map +1 -0
  42. package/dist/src/presentation/web/components/common/attachment-card/index.js +1 -0
  43. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts +11 -0
  44. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map +1 -0
  45. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +34 -0
  46. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +10 -0
  47. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -0
  48. package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +44 -0
  49. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts +3 -0
  50. package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts.map +1 -0
  51. package/dist/src/presentation/web/components/common/attachment-chip/index.js +1 -0
  52. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +11 -2
  53. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +199 -60
  55. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +6 -0
  56. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
  57. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +18 -0
  58. package/dist/src/presentation/web/components/ui/dialog.js +1 -1
  59. package/dist/src/presentation/web/next.config.d.ts.map +1 -1
  60. package/dist/src/presentation/web/next.config.js +6 -0
  61. package/dist/tsconfig.build.tsbuildinfo +1 -1
  62. package/package.json +1 -1
  63. package/web/.next/BUILD_ID +1 -1
  64. package/web/.next/app-path-routes-manifest.json +2 -0
  65. package/web/.next/build-manifest.json +2 -2
  66. package/web/.next/fallback-build-manifest.json +2 -2
  67. package/web/.next/prerender-manifest.json +3 -3
  68. package/web/.next/required-server-files.js +4 -1
  69. package/web/.next/required-server-files.json +4 -1
  70. package/web/.next/routes-manifest.json +12 -0
  71. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
  72. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
  73. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
  76. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
  77. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  80. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
  81. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  82. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
  84. package/web/.next/server/app/(dashboard)/create/page.js +2 -2
  85. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  86. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
  88. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
  89. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
  92. package/web/.next/server/app/(dashboard)/page.js +2 -2
  93. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  94. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
  96. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
  97. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  98. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  99. package/web/.next/server/app/_global-error/page.js +2 -2
  100. package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
  101. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app/_global-error.html +2 -2
  103. package/web/.next/server/app/_global-error.rsc +1 -1
  104. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  105. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  106. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  107. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  108. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  109. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  110. package/web/.next/server/app/_not-found/page.js +2 -2
  111. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  112. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/api/attachments/preview/route/app-paths-manifest.json +3 -0
  114. package/web/.next/server/app/api/attachments/preview/route/build-manifest.json +11 -0
  115. package/web/.next/server/app/api/attachments/preview/route/server-reference-manifest.json +4 -0
  116. package/web/.next/server/app/api/attachments/preview/route.js +7 -0
  117. package/web/.next/server/app/api/attachments/preview/route.js.map +5 -0
  118. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -0
  119. package/web/.next/server/app/api/attachments/preview/route_client-reference-manifest.js +2 -0
  120. package/web/.next/server/app/api/attachments/upload/route/app-paths-manifest.json +3 -0
  121. package/web/.next/server/app/api/attachments/upload/route/build-manifest.json +11 -0
  122. package/web/.next/server/app/api/attachments/upload/route/server-reference-manifest.json +4 -0
  123. package/web/.next/server/app/api/attachments/upload/route.js +7 -0
  124. package/web/.next/server/app/api/attachments/upload/route.js.map +5 -0
  125. package/web/.next/server/app/api/attachments/upload/route.js.nft.json +1 -0
  126. package/web/.next/server/app/api/attachments/upload/route_client-reference-manifest.js +2 -0
  127. package/web/.next/server/app/api/feature-logs/route.js +1 -1
  128. package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
  129. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  130. package/web/.next/server/app/settings/page.js +2 -2
  131. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  132. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  133. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  134. package/web/.next/server/app/skills/page.js +2 -2
  135. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  136. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  138. package/web/.next/server/app/tools/page.js +2 -2
  139. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  140. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  141. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  142. package/web/.next/server/app/version/page.js +2 -2
  143. package/web/.next/server/app/version/page.js.nft.json +1 -1
  144. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app-paths-manifest.json +2 -0
  146. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  147. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js +3 -0
  148. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js.map +1 -0
  149. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js +3 -0
  150. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js.map +1 -0
  151. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +3 -0
  152. package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +1 -0
  153. package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js → [root-of-the-server]__52c318d1._.js} +2 -2
  154. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +3 -0
  155. package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -0
  156. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  157. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +3 -0
  159. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +1 -0
  160. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
  161. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
  163. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  171. package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js → [root-of-the-server]__8d9536c4._.js} +2 -2
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +10 -0
  177. package/web/.next/server/chunks/ssr/{[root-of-the-server]__c3694f82._.js.map → [root-of-the-server]__b14946f5._.js.map} +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
  179. package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
  180. package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +3 -0
  181. package/web/.next/server/chunks/ssr/{[root-of-the-server]__55f60c9d._.js.map → [root-of-the-server]__b65f78cf._.js.map} +1 -1
  182. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
  183. package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js → [root-of-the-server]__f1a05100._.js} +2 -2
  185. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8210f45._.js +3 -0
  186. package/web/.next/server/chunks/ssr/{[root-of-the-server]__01a37f7a._.js.map → [root-of-the-server]__f8210f45._.js.map} +1 -1
  187. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  188. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/_1bb131c4._.js +1 -1
  190. package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
  192. package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
  193. package/web/.next/server/chunks/ssr/_34fbed18._.js +1 -1
  194. package/web/.next/server/chunks/ssr/_34fbed18._.js.map +1 -1
  195. package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
  196. package/web/.next/server/chunks/ssr/_63868199._.js.map +1 -1
  197. package/web/.next/server/chunks/ssr/{_3785d5be._.js → _6bffa94a._.js} +2 -2
  198. package/web/.next/server/chunks/ssr/_6bffa94a._.js.map +1 -0
  199. package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
  200. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
  203. package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
  204. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js → _cf366ac8._.js} +2 -2
  205. package/web/.next/server/chunks/ssr/{_3e88ce9d._.js.map → _cf366ac8._.js.map} +1 -1
  206. package/web/.next/server/chunks/ssr/_d42594dd._.js +3 -0
  207. package/web/.next/server/chunks/ssr/_d42594dd._.js.map +1 -0
  208. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  209. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +3 -0
  211. package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +1 -0
  212. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
  213. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  215. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  217. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -3
  219. package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js +3 -0
  221. package/web/.next/server/chunks/ssr/src_presentation_web_components_80b5b4bc._.js.map +1 -0
  222. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js +3 -0
  223. package/web/.next/server/chunks/ssr/src_presentation_web_components_82416b8f._.js.map +1 -0
  224. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -3
  229. package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
  230. package/web/.next/server/pages/500.html +2 -2
  231. package/web/.next/server/server-reference-manifest.js +1 -1
  232. package/web/.next/server/server-reference-manifest.json +28 -28
  233. package/web/.next/static/chunks/{4de791d92c72ae58.js → 26f58bbf4766e1c4.js} +1 -1
  234. package/web/.next/static/chunks/30c827a88342741e.js +1 -0
  235. package/web/.next/static/chunks/{d00436ccde44862f.js → 31c1e96c4cfeb16b.js} +2 -2
  236. package/web/.next/static/chunks/50f89c3112f6dd23.css +2 -0
  237. package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
  238. package/web/.next/static/chunks/{48060fe38d7b8432.js → 5b707c839eafb404.js} +3 -3
  239. package/web/.next/static/chunks/79f610312f57dc66.js +1 -0
  240. package/web/.next/static/chunks/8fa4bf83842a3389.js +1 -0
  241. package/web/.next/static/chunks/{0fb7745c30469b39.js → b31f2c82654437a6.js} +1 -1
  242. package/web/.next/static/chunks/c9333b53106c0ca9.js +1 -0
  243. package/web/.next/static/chunks/ce7a578a83924232.js +1 -0
  244. package/web/.next/static/chunks/{de2515446676e0ae.js → d8e93250744112df.js} +1 -1
  245. package/web/.next/static/chunks/da7d7608abd1032f.js +1 -0
  246. package/web/.next/static/chunks/{6b4620c8b57a0683.js → df38705b7992b33f.js} +1 -1
  247. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js +0 -3
  248. package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js.map +0 -1
  249. package/web/.next/server/chunks/ssr/[root-of-the-server]__01a37f7a._.js +0 -3
  250. package/web/.next/server/chunks/ssr/[root-of-the-server]__55f60c9d._.js +0 -3
  251. package/web/.next/server/chunks/ssr/[root-of-the-server]__c3694f82._.js +0 -10
  252. package/web/.next/server/chunks/ssr/_0387eb83._.js +0 -3
  253. package/web/.next/server/chunks/ssr/_0387eb83._.js.map +0 -1
  254. package/web/.next/server/chunks/ssr/_3785d5be._.js.map +0 -1
  255. package/web/.next/server/chunks/ssr/_67dd9041._.js +0 -3
  256. package/web/.next/server/chunks/ssr/_67dd9041._.js.map +0 -1
  257. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js +0 -3
  258. package/web/.next/server/chunks/ssr/_c3a8bcb1._.js.map +0 -1
  259. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js +0 -5
  260. package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +0 -1
  261. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js +0 -3
  262. package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +0 -1
  263. package/web/.next/static/chunks/2a24ac257fc1c10b.js +0 -1
  264. package/web/.next/static/chunks/6d0190cd8484320c.js +0 -1
  265. package/web/.next/static/chunks/6f0622cb06faf358.js +0 -1
  266. package/web/.next/static/chunks/7e92542991a14568.js +0 -1
  267. package/web/.next/static/chunks/a56b3854d2169db0.js +0 -1
  268. package/web/.next/static/chunks/ae01d2be1d0bad47.css +0 -2
  269. package/web/.next/static/chunks/df0b93fbb9b512e6.js +0 -1
  270. package/web/.next/static/chunks/e405f0502431ea60.js +0 -3
  271. /package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js.map → [root-of-the-server]__52c318d1._.js.map} +0 -0
  272. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js.map → [root-of-the-server]__8d9536c4._.js.map} +0 -0
  273. /package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js.map → [root-of-the-server]__f1a05100._.js.map} +0 -0
  274. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_buildManifest.js +0 -0
  275. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_clientMiddlewareManifest.json +0 -0
  276. /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Lf0zFNsMS4qCNRm_LSgya}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},81280,e=>{"use strict";var t=e.i(22925),r=e.i(62995),n=e.i(14112),a=e.i(31716),o=e.i(16340),i=e.i(40522),s=e.i(21994),l=e.i(5802),u=e.i(17171),d=e.i(177),c=e.i(43685),p=e.i(84832),h=e.i(92435),f=e.i(41260),x=e.i(80556),v=e.i(93695);e.i(97230);var R=e.i(35162),g=e.i(40060),w=e.i(50227),m=e.i(60526),y=e.i(12714),E=e.i(2157);function C(e){return new Response(new ReadableStream({start(t){let r=new TextEncoder;t.enqueue(r.encode(`event: error
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},81280,e=>{"use strict";var t=e.i(22925),r=e.i(62995),n=e.i(14112),a=e.i(31716),o=e.i(16340),i=e.i(40522),s=e.i(21994),l=e.i(5802),u=e.i(17171),d=e.i(177),c=e.i(43685),p=e.i(84832),h=e.i(92435),f=e.i(41260),x=e.i(80556),v=e.i(93695);e.i(97230);var R=e.i(35162),g=e.i(40060),w=e.i(50227),m=e.i(60526),y=e.i(12714),E=e.i(2157);function C(e){return new Response(new ReadableStream({start(t){let r=new TextEncoder;t.enqueue(r.encode(`event: error
2
2
  data: ${JSON.stringify({error:e})}
3
3
 
4
4
  `)),t.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}async function b(e){try{let t=new URL(e.url).searchParams.get("featureId");if(!t?.trim())return C("featureId is required");let r=(0,g.resolve)("IFeatureRepository"),n=await r.findById(t);if(!n)return C(`Feature not found: ${t}`);if(!n.agentRunId)return C(`Feature "${n.name}" has no agent run`);let a=(0,w.join)((0,m.homedir)(),".shep","logs",`worker-${n.agentRunId}.log`),o=new ReadableStream({start(t){let r=new TextEncoder,n=!1,o=0,i=null,s=null;function l(e){if(!n)try{t.enqueue(r.encode(e))}catch{}}async function u(){try{if((await (0,y.stat)(a)).size<=o)return null;let e=await (0,y.readFile)(a,"utf-8"),t=e.slice(o);return o=e.length,t||null}catch{return null}}async function d(){if(!n)try{let e=await u();e&&l(`event: log
@@ -9,4 +9,4 @@ data: ${JSON.stringify({content:e})}
9
9
 
10
10
  `),n)return;try{(i=(0,E.watch)(a,{persistent:!1},()=>{d()})).on("error",()=>{})}catch{}s=setInterval(()=>{d()},2e3)}catch{}})();let c=setInterval(()=>{l(": heartbeat\n\n")},3e4);e.signal.addEventListener("abort",()=>{n=!0,i&&(i.close(),i=null),s&&(clearInterval(s),s=null),clearInterval(c);try{t.close()}catch{}},{once:!0})}});return new Response(o,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}catch(e){return console.error("[SSE route] GET /api/feature-logs error:",e),new Response(JSON.stringify({error:String(e)}),{status:500,headers:{"Content-Type":"application/json"}})}}e.s(["GET",()=>b,"dynamic",0,"force-dynamic"],91095);var T=e.i(91095);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/feature-logs/route",pathname:"/api/feature-logs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/feature-logs/route.ts",nextConfigOutput:"standalone",userland:T}),{workAsyncStorage:S,workUnitAsyncStorage:I,serverHooks:N}=A;function q(){return(0,n.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:I})}async function O(e,t,n){A.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/feature-logs/route";g=g.replace(/\/index$/,"")||"/";let w=await A.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:m,params:y,nextConfig:E,parsedUrl:C,isDraftMode:b,prerenderManifest:T,routerServerContext:S,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,resolvedPathname:q,clientReferenceManifest:O,serverActionsManifest:P}=w,k=(0,s.normalizeAppPath)(g),_=!!(T.dynamicRoutes[k]||T.routes[q]),j=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!b){let e=!!T.routes[q],t=T.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await j();throw new v.NoFallbackError}}let H=null;!_||A.isDev||b||(H="/index"===(H=q)?"/":H);let U=!0===A.isDev||!_,$=_&&!U;P&&O&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:P});let D=e.method||"GET",F=(0,o.getTracer)(),M=F.getActiveScopeSpan(),K={params:y,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>A.onRequestError(e,t,n,a,S)},sharedContext:{buildId:m}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let i=async e=>A.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${g}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&I&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(L,B,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);u&&(t[x.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:I})},!1,S),t}},d=await A.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:N,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:s});if(!_)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",I?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&_||v.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,f.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(L,B,new Response(d.value.body,{headers:v,status:d.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:$,isOnDemandRevalidate:I})},!1,S),_)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>q,"routeModule",()=>A,"serverHooks",()=>N,"workAsyncStorage",()=>S,"workUnitAsyncStorage",()=>I],81280)}];
11
11
 
12
- //# sourceMappingURL=%5Broot-of-the-server%5D__91d44424._.js.map
12
+ //# sourceMappingURL=%5Broot-of-the-server%5D__52c318d1._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},40060,e=>{"use strict";function t(e){let t=globalThis.__shepContainer;if(!t)throw Error("DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.");return t.resolve(e)}e.s(["resolve",()=>t])},27600,e=>{"use strict";var t=e.i(22925),r=e.i(62995),a=e.i(14112),n=e.i(31716),s=e.i(16340),o=e.i(40522),i=e.i(21994),l=e.i(5802),d=e.i(17171),p=e.i(177),u=e.i(43685),c=e.i(84832),h=e.i(92435),x=e.i(41260),m=e.i(80556),f=e.i(93695);e.i(97230);var v=e.i(35162),R=e.i(27980),g=e.i(40060);let w=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]);async function y(e){try{var t;let r,a=await e.formData(),n=a.get("file"),s=a.get("sessionId");if(!n||!s)return R.NextResponse.json({error:"Missing required fields: file, sessionId"},{status:400});if(n.size>0xa00000)return R.NextResponse.json({error:`File "${n.name}" exceeds 10 MB limit (${(n.size/1024/1024).toFixed(1)} MB)`},{status:413});let o=(r=(t=n.name).lastIndexOf("."))>=0?t.slice(r).toLowerCase():"";if(o&&!w.has(o))return R.NextResponse.json({error:`File type "${o}" is not allowed`},{status:400});let i=Buffer.from(await n.arrayBuffer()),l=(0,g.resolve)("AttachmentStorageService").store(i,n.name,n.type??"application/octet-stream",s);return R.NextResponse.json({id:l.id,name:l.name,size:Number(l.size),mimeType:l.mimeType,path:l.path,createdAt:l.createdAt})}catch(t){let e=t instanceof Error?t.message:"Upload failed";return R.NextResponse.json({error:e},{status:500})}}e.s(["POST",()=>y],55729);var E=e.i(55729);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/attachments/upload/route",pathname:"/api/attachments/upload",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/presentation/web/app/api/attachments/upload/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:N}=C;function j(){return(0,a.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function T(e,t,a){C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/attachments/upload/route";R=R.replace(/\/index$/,"")||"/";let g=await C.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:E,parsedUrl:b,isDraftMode:A,prerenderManifest:N,routerServerContext:j,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:k}=g,_=(0,i.normalizeAppPath)(R),q=!!(N.dynamicRoutes[_]||N.routes[O]),I=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,b,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!N.routes[O],t=N.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await I();throw new f.NoFallbackError}}let H=null;!q||C.isDev||A||(H="/index"===(H=O)?"/":H);let U=!0===C.isDev||!q,D=q&&!U;k&&S&&(0,o.setManifestsSingleton)({page:R,clientReferenceManifest:S,serverActionsManifest:k});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),z={params:y,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,j)},sharedContext:{buildId:w}},B=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),L=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let o=async e=>C.handle(L,z).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&T&&P&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=z.renderOpts.fetchMetrics;let l=z.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=z.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(B,K,s,z.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[m.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==z.renderOpts.collectedRevalidate&&!(z.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&z.renderOpts.collectedRevalidate,a=void 0===z.renderOpts.collectedExpire||z.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:z.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,j),t}},p=await C.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:P,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!q)return null;if((null==p||null==(s=p.value)?void 0:s.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",T?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return i&&q||f.delete(m.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(B,K,new Response(p.value.body,{headers:f,status:p.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(p.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:T})},!1,j),q)throw t;return await (0,c.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>T,"patchFetch",()=>j,"routeModule",()=>C,"serverHooks",()=>N,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],27600)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__b2f9a412._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/presentation/web/lib/server-container.ts","../../../../../../src/presentation/web/app/api/attachments/upload/route.ts","../../../../../../node_modules/.pnpm/next%4016.1.6_%40babel%2Bcore%407.29.0_%40playwright%2Btest%401.58.1_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Server Container Accessor\n *\n * Provides a `resolve()` helper for server components and API routes to\n * obtain DI-managed instances. The tsyringe container is placed on globalThis\n * by the CLI bootstrap (`shep ui`) or the dev-server (`pnpm dev:web`).\n */\n\nimport type { DependencyContainer, InjectionToken } from 'tsyringe';\n\nconst CONTAINER_KEY = '__shepContainer';\n\n/**\n * Resolve a dependency from the DI container.\n *\n * Usage in server components / API routes:\n * ```ts\n * import { resolve } from '@/lib/server-container';\n * import { ListFeaturesUseCase } from '@shepai/core/application/use-cases/features/list-features.use-case';\n *\n * const features = await resolve(ListFeaturesUseCase).execute();\n * ```\n */\nexport function resolve<T>(token: InjectionToken<T>): T {\n const container = (globalThis as Record<string, unknown>)[CONTAINER_KEY] as\n | DependencyContainer\n | undefined;\n\n if (!container) {\n throw new Error(\n 'DI container not available. Ensure the CLI bootstrap or dev-server has initialized it.'\n );\n }\n\n return container.resolve(token);\n}\n","import { NextResponse } from 'next/server';\nimport { resolve } from '@/lib/server-container';\nimport type { AttachmentStorageService } from '@shepai/core/infrastructure/services/attachment-storage.service';\n\nconst MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB\n\nconst ALLOWED_EXTENSIONS = new Set([\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.svg',\n '.bmp',\n '.ico',\n '.pdf',\n '.doc',\n '.docx',\n '.xls',\n '.xlsx',\n '.ppt',\n '.pptx',\n '.txt',\n '.md',\n '.csv',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.py',\n '.rb',\n '.go',\n '.rs',\n '.java',\n '.c',\n '.cpp',\n '.h',\n '.hpp',\n '.cs',\n '.swift',\n '.kt',\n '.html',\n '.css',\n '.scss',\n '.less',\n '.sh',\n '.bash',\n '.zsh',\n '.fish',\n '.toml',\n '.ini',\n '.cfg',\n '.conf',\n '.env',\n '.zip',\n '.tar',\n '.gz',\n '.log',\n]);\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nexport async function POST(request: Request): Promise<NextResponse> {\n try {\n const formData = await request.formData();\n const file = formData.get('file') as File | null;\n const sessionId = formData.get('sessionId') as string | null;\n\n if (!file || !sessionId) {\n return NextResponse.json(\n { error: 'Missing required fields: file, sessionId' },\n { status: 400 }\n );\n }\n\n // Validate file size\n if (file.size > MAX_FILE_SIZE) {\n return NextResponse.json(\n {\n error: `File \"${file.name}\" exceeds 10 MB limit (${(file.size / 1024 / 1024).toFixed(1)} MB)`,\n },\n { status: 413 }\n );\n }\n\n // Validate extension\n const ext = getExtension(file.name);\n if (ext && !ALLOWED_EXTENSIONS.has(ext)) {\n return NextResponse.json({ error: `File type \"${ext}\" is not allowed` }, { status: 400 });\n }\n\n const buffer = Buffer.from(await file.arrayBuffer());\n const service = resolve<AttachmentStorageService>('AttachmentStorageService');\n const attachment = service.store(\n buffer,\n file.name,\n file.type ?? 'application/octet-stream',\n sessionId\n );\n\n return NextResponse.json({\n id: attachment.id,\n name: attachment.name,\n size: Number(attachment.size),\n mimeType: attachment.mimeType,\n path: attachment.path,\n createdAt: attachment.createdAt,\n });\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Upload failed';\n return NextResponse.json({ error: message }, { status: 500 });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/attachments/upload/route\",\n pathname: \"/api/attachments/upload\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/presentation/web/app/api/attachments/upload/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/attachments/upload/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"m/BAuBO,SAAS,EAAW,CAAwB,EACjD,IAAM,EAAa,UAAsC,CAAC,AAdtC,eAcoD,CAIxE,GAAI,CAAC,EACH,MAAM,AAAI,GADI,GAEZ,0FAIJ,OAAO,EAAU,OAAO,CAAC,EAC3B,gDEnCA,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,MACA,EAAA,EAAA,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R,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[2]}
@@ -1,3 +1,3 @@
1
- module.exports=[93995,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(69845),e=a.i(52313),f=a.i(25674);let g=(0,f.createServerReference)("40d0faa4f546501ef93b80ac4ed9b7a741026d5e69",f.callServer,void 0,f.findSourceMapURL,"createFeature");var h=a.i(87148),h=h,i=a.i(25700);let j=(0,i.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var k=a.i(42642),k=k;let l=(0,i.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var m=a.i(40617),m=m,n=a.i(26915),n=n;let o=(0,i.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var p=a.i(51969),p=p,q=a.i(3942),r=a.i(85536),s=a.i(19884);a.i(78454);var t=a.i(24255),u=a.i(2824),v=a.i(18948),w=a.i(90920);function x({className:a,...c}){return(0,b.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...c})}var y=a.i(58860),z=a.i(58339),A=a.i(80646),B=a.i(96867),C=a.i(82934),D=a.i(96213),E=a.i(61781);async function F(){let a=await fetch("/api/dialog/pick-files",{method:"POST"});if(!a.ok)throw Error("Failed to open file dialog");let b=await a.json();return b.cancelled?null:b.files}let G=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],H={allowPrd:!1,allowPlan:!1,allowMerge:!1};function I({open:a,onClose:d,onSubmit:e,repositoryPath:f,isSubmitting:g=!1,workflowDefaults:i,features:j,initialParentId:k,currentAgentType:l,currentModel:m}){let n=(0,s.useSoundAction)("create"),o=i?.approvalGates??H,p=i?.push??!1,w=i?.openPr??!1,[A,I]=(0,c.useState)(""),[L,M]=(0,c.useState)([]),[N,O]=(0,c.useState)({...o}),[P,Q]=(0,c.useState)(p),[R,S]=(0,c.useState)(w),[T,U]=(0,c.useState)(void 0),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(void 0),[Z,$]=(0,c.useState)(void 0);(0,c.useEffect)(()=>{i&&(O({...i.approvalGates}),Q(i.push),S(i.openPr))},[i]),(0,c.useEffect)(()=>{a&&k&&U(k)},[a,k]);let _=(0,c.useCallback)(()=>{I(""),M([]),O({...o}),Q(p),S(w),U(void 0),W(!1),Y(void 0),$(void 0)},[o,p,w]),aa=""!==A.trim()||L.length>0,{attemptClose:ab}=(0,D.useGuardedDrawerClose)({open:a,isDirty:aa,onClose:d,onReset:_}),ac=(0,c.useCallback)(a=>{a.preventDefault(),A.trim()&&(n.play(),e({description:A.trim(),attachments:L,repositoryPath:f,approvalGates:{allowPrd:N.allowPrd??!1,allowPlan:N.allowPlan??!1,allowMerge:N.allowMerge??!1},push:P||R,openPr:R,fast:V,...X?{agentType:X}:{},...Z?{model:Z}:{},...T?{parentId:T}:{}}),_())},[A,L,N,f,e,P,R,V,X,Z,T,n,_]),ad=(0,c.useCallback)(async()=>{try{let a=await F();a&&M(b=>[...b,...a])}catch{}},[]),ae=(0,c.useCallback)(a=>{M(b=>b.filter(b=>b.path!==a))},[]),af=(0,c.useRef)(null),ag=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),af.current?.requestSubmit())},[]),ah=j&&j.length>0;return(0,b.jsx)(t.BaseDrawer,{open:a,onClose:ab,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsx)(u.DrawerTitle,{children:"NEW FEATURE"})]}),g?(0,b.jsx)(u.DrawerDescription,{asChild:!0,children:(0,b.jsx)("div",{children:(0,b.jsx)(z.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,b.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,b.jsx)(v.Button,{variant:"outline",onClick:ab,disabled:g,children:"Cancel"}),(0,b.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!A.trim()||g,children:g?"Creating...":"+ Create Feature"})]}),children:(0,b.jsx)("div",{className:"overflow-y-auto p-4",children:(0,b.jsx)(C.TooltipProvider,{delayDuration:400,children:(0,b.jsxs)("form",{ref:af,id:"create-feature-form",onSubmit:ac,className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(y.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,b.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,b.jsx)(x,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:A,onChange:a=>I(a.target.value),onKeyDown:ag,rows:7,required:!0,disabled:g,className:"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),(0,b.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,b.jsx)(E.AgentModelPicker,{initialAgentType:X??l??"claude-code",initialModel:Z??m??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(a,b)=>{Y(a),$(b)},disabled:g,className:"w-55"}),(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(B.Switch,{id:"fast-mode",checked:V,onCheckedChange:W,disabled:g}),(0,b.jsxs)(y.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(q.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]})]})]})]}),ah&&void 0!==k?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(y.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,b.jsx)(J,{features:j,value:T,onChange:U,disabled:g})]}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,b.jsx)("div",{className:"flex flex-1 items-center gap-4",children:G.map(a=>(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(B.Switch,{id:`approve-${a.id}`,size:"sm",checked:N[a.id]??!1,onCheckedChange:b=>O(c=>({...c,[a.id]:b})),disabled:g||V&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,b.jsx)(y.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:V&&("allowPrd"===a.id||"allowPlan"===a.id)?"Skipped in Fast Mode":a.description})]},a.id))}),(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=G.every(a=>N[a.id]),b={};for(let c of G)b[c.id]=!a;O(b)},disabled:g,className:(0,r.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",G.every(a=>N[a.id])&&"text-primary"),children:"All"})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider",children:"GIT"}),(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(B.Switch,{id:"push",size:"sm",checked:P||R,onCheckedChange:a=>{Q(a),!a&&R&&S(!1)},disabled:g}),(0,b.jsx)(y.Label,{htmlFor:"push",className:"cursor-pointer text-xs font-medium",children:"Push"})]})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:"Push branch to remote after implementation."})]}),(0,b.jsxs)(C.Tooltip,{children:[(0,b.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(B.Switch,{id:"open-pr",size:"sm",checked:R,onCheckedChange:S,disabled:g}),(0,b.jsx)(y.Label,{htmlFor:"open-pr",className:"cursor-pointer text-xs font-medium",children:"PR"})]})}),(0,b.jsx)(C.TooltipContent,{side:"bottom",children:"Open a pull request after pushing."})]})]})]})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)(y.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:["ATTACHMENTS",L.length>0&&(0,b.jsxs)("span",{className:"text-muted-foreground/60 ml-1.5",children:["(",L.length,")"]})]}),(0,b.jsxs)(v.Button,{type:"button",variant:"outline",size:"xs",onClick:ad,disabled:g,children:[(0,b.jsx)(h.default,{className:"size-3"}),"Add Files"]})]}),L.length>0&&(0,b.jsx)("div",{className:"flex flex-col gap-2",children:L.map(a=>(0,b.jsx)(K,{file:a,onRemove:()=>ae(a.path),disabled:g},a.path))})]})]})})})})}function J({features:a,value:d,onChange:e,disabled:f}){let[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(""),k=(0,c.useRef)(null),l=a.find(a=>a.id===d),m=i.trim()?a.filter(a=>a.name.toLowerCase().includes(i.toLowerCase())||a.id.toLowerCase().includes(i.toLowerCase())):a,n=(0,c.useCallback)(a=>{e(a),h(!1),j("")},[e]);return(0,c.useEffect)(()=>{g?setTimeout(()=>k.current?.focus(),0):j("")},[g]),(0,b.jsxs)(A.Popover,{open:g,onOpenChange:h,children:[(0,b.jsx)(A.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":g,"aria-label":"Parent Feature",disabled:f,"data-testid":"parent-feature-combobox",className:(0,r.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!l&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:l?`${l.name} (${l.id.slice(0,8)})`:"Select parent feature..."}),(0,b.jsx)(o,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(A.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(w.Input,{ref:k,placeholder:"Search features...",value:i,onChange:a=>j(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===d,onClick:()=>n(void 0),className:(0,r.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===d&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,b.jsx)(p.default,{className:(0,r.cn)("h-4 w-4 shrink-0",void 0!==d&&"invisible")}),(0,b.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===m.length&&i?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):m.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.id,onClick:()=>n(a.id),className:(0,r.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${a.id}`,children:[(0,b.jsx)(p.default,{className:(0,r.cn)("h-4 w-4 shrink-0",d!==a.id&&"invisible")}),(0,b.jsxs)("span",{className:"truncate",children:[a.name," ",(0,b.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",a.id.slice(0,8),")"]})]})]},a.id))]})]})})]})}function K({file:a,onRemove:c,disabled:d}){var e,f,g;let h,i=(h=(e=a.name).lastIndexOf("."))>=0?e.slice(h).toLowerCase():"",o=(f=i,L.has(f)?l:".pdf"===f?k.default:M.has(f)?m.default:j),p=".pdf"===(g=i)?"bg-red-50 text-red-600":L.has(g)?"bg-blue-50 text-blue-600":M.has(g)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600";return(0,b.jsxs)("div",{className:"flex items-center gap-3 rounded-md border p-2",children:[(0,b.jsx)("div",{className:(0,r.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded",p),children:(0,b.jsx)(o,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a.name}),(0,b.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:a.path}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:function(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return`${(a/Math.pow(1024,b)).toFixed(+(0!==b))} ${["B","KB","MB","GB"][b]}`}(a.size)})]}),(0,b.jsx)(v.Button,{type:"button",variant:"ghost",size:"icon-xs",onClick:c,disabled:d,"aria-label":`Remove ${a.name}`,children:(0,b.jsx)(n.default,{className:"h-3 w-3"})})]})}let L=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),M=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function N({repositoryPath:a,initialParentId:f,features:h,workflowDefaults:i,currentAgentType:j,currentModel:k}){let l=(0,d.useRouter)(),[m,n]=(0,c.useState)(!1),o=(0,d.usePathname)().startsWith("/create"),p=!m&&o;(0,c.useEffect)(()=>{!o&&m&&n(!1)},[o,m]);let q=(0,c.useCallback)(()=>{l.push("/")},[l]),r=(0,c.useCallback)(a=>{n(!0),l.push("/"),g(a).then(b=>{b.error?e.toast.error(b.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:b.feature.id,name:b.feature.name,description:b.feature.description,repositoryPath:b.feature.repositoryPath,parentId:a.parentId}}))}).catch(()=>{e.toast.error("Failed to create feature"),n(!1)})},[l]);return(0,b.jsx)(I,{open:p,onClose:q,onSubmit:r,repositoryPath:a,features:h,workflowDefaults:i,initialParentId:f,isSubmitting:m,currentAgentType:j,currentModel:k})}a.s(["CreateDrawerClient",()=>N],93995)}];
1
+ module.exports=[93995,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(69845),e=a.i(52313),f=a.i(25674);let g=(0,f.createServerReference)("40b3e847b00cc5d04b4cd350525b56bf1967df7459",f.callServer,void 0,f.findSourceMapURL,"createFeature");var h=a.i(25700);let i=(0,h.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),j=(0,h.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var k=a.i(51969),k=k,l=a.i(3942),m=a.i(85536),n=a.i(19884);a.i(78454);var o=a.i(24255),p=a.i(2824),q=a.i(18948),r=a.i(90920);function s({className:a,...c}){return(0,b.jsx)("textarea",{"data-slot":"textarea",className:(0,m.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...c})}var t=a.i(58860),u=a.i(58339),v=a.i(80646),w=a.i(96867),x=a.i(82934),y=a.i(96213),z=a.i(2807),A=a.i(7052),A=A,B=a.i(76096),B=B,C=a.i(45670),D=a.i(50049),D=D;let E=(0,h.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);var F=a.i(42642),F=F;let G=(0,h.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var H=a.i(40617),H=H;let I=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]),J=new Set([".ts",".tsx",".js",".jsx",".json",".yaml",".yml",".xml",".html",".css",".md"]);function K(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return`${(a/Math.pow(1024,b)).toFixed(+(0!==b))} ${["B","KB","MB","GB"][b]}`}let L=new Set([".png",".jpg",".jpeg",".gif",".svg",".webp",".ico",".bmp"]);function M(a,b){let c=new URLSearchParams({path:a,mimeType:b});return`/api/attachments/preview?${c.toString()}`}function N({name:a,size:c,mimeType:d,path:e,onRemove:f,loading:g=!1,disabled:h=!1}){let i,j,k=(i=a.lastIndexOf("."))>=0?a.slice(i).toLowerCase():"",l=I.has(k)?G:".pdf"===k?F.default:J.has(k)?H.default:E,n=".pdf"===k?"bg-red-50 text-red-600":I.has(k)?"bg-blue-50 text-blue-600":J.has(k)?"bg-emerald-50 text-emerald-600":"bg-gray-50 text-gray-600",o=(j=a.lastIndexOf("."))>=0&&L.has(a.slice(j).toLowerCase());return g?(0,b.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-md border",children:(0,b.jsx)(A.default,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):o?(0,b.jsxs)(C.Dialog,{children:[(0,b.jsxs)("div",{className:"group relative",children:[(0,b.jsx)(C.DialogTrigger,{asChild:!0,children:(0,b.jsx)("img",{src:M(e,d),alt:a,title:a,className:"h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80"})}),!h&&(0,b.jsx)("button",{type:"button",onClick:f,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,b.jsx)(z.X,{className:"h-3 w-3"})})]}),(0,b.jsxs)(C.DialogContent,{className:"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90",children:[(0,b.jsx)(D.Root,{children:(0,b.jsxs)(C.DialogTitle,{children:["Preview: ",a]})}),(0,b.jsx)("div",{className:"relative bg-black/90",children:(0,b.jsx)("img",{src:M(e,d),alt:a,className:"h-auto max-h-[70vh] w-full object-contain"})}),(0,b.jsxs)("div",{className:"bg-background flex items-center gap-3 px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"truncate text-sm font-medium",children:a}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K(c)})]}),(0,b.jsx)("a",{href:M(e,d),download:a,className:"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors","aria-label":`Download ${a}`,children:(0,b.jsx)(B.default,{className:"h-4 w-4"})})]})]})]}):(0,b.jsxs)("div",{className:"group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2",children:[(0,b.jsx)("div",{className:(0,m.cn)("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",n),children:(0,b.jsx)(l,{className:"h-3 w-3"})}),(0,b.jsx)("span",{className:"max-w-[120px] truncate text-sm",children:a}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K(c)}),!h&&(0,b.jsx)("button",{type:"button",onClick:f,className:"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex","aria-label":`Remove ${a}`,children:(0,b.jsx)(z.X,{className:"h-3 w-3"})})]})}var O=a.i(61781);async function P(){let a=await fetch("/api/dialog/pick-files",{method:"POST"});if(!a.ok)throw Error("Failed to open file dialog");let b=await a.json();return b.cancelled?null:b.files}let Q=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),R=[{id:"allowPrd",label:"PRD",description:"Auto-approve requirements move to planning."},{id:"allowPlan",label:"Plan",description:"Auto-approve planning move to implementation."},{id:"allowMerge",label:"Merge",description:"Auto-approve merge move to Done."}],S={allowPrd:!1,allowPlan:!1,allowMerge:!1};function T({open:a,onClose:d,onSubmit:e,repositoryPath:f,isSubmitting:g=!1,workflowDefaults:h,features:j,initialParentId:k,currentAgentType:r,currentModel:v}){let z=(0,n.useSoundAction)("create"),A=h?.approvalGates??S,B=h?.push??!1,C=h?.openPr??!1,[D,E]=(0,c.useState)(""),[F,G]=(0,c.useState)([]),[H,I]=(0,c.useState)({...A}),[J,K]=(0,c.useState)(B),[L,M]=(0,c.useState)(C),[T,V]=(0,c.useState)(void 0),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(void 0),[$,_]=(0,c.useState)(void 0),[aa,ab]=(0,c.useState)(!1),[ac,ad]=(0,c.useState)(null),ae=(0,c.useRef)(crypto.randomUUID()),af=(0,c.useRef)(0);(0,c.useEffect)(()=>{h&&(I({...h.approvalGates}),K(h.push),M(h.openPr))},[h]),(0,c.useEffect)(()=>{a&&k&&V(k)},[a,k]);let ag=(0,c.useCallback)(()=>{E(""),G([]),I({...A}),K(B),M(C),V(void 0),X(!1),Z(void 0),_(void 0),ad(null),af.current=0,ab(!1)},[A,B,C]),ah=""!==D.trim()||F.length>0,{attemptClose:ai}=(0,y.useGuardedDrawerClose)({open:a,isDirty:ah,onClose:d,onReset:ag}),aj=(0,c.useCallback)(async a=>{for(let b of(ad(null),a)){if(b.size>0xa00000)return void ad(`"${b.name}" exceeds 10 MB limit`);let a=function(a){let b=a.lastIndexOf(".");return b>=0?a.slice(b).toLowerCase():""}(b.name);if(a&&!Q.has(a))return void ad(`File type "${a}" is not allowed`)}for(let b of a){let a=crypto.randomUUID();G(c=>[...c,{id:a,name:b.name,size:b.size,mimeType:b.type||"application/octet-stream",path:"",loading:!0}]);try{let c=new FormData;c.append("file",b),c.append("sessionId",ae.current);let d=await fetch("/api/attachments/upload",{method:"POST",body:c});if(!d.ok){let b=await d.json().catch(()=>({error:"Upload failed"}));G(b=>b.filter(b=>b.id!==a)),ad(b.error??"Upload failed");return}let e=await d.json();G(b=>b.some(b=>b.id!==a&&b.path===e.path)?b.filter(b=>b.id!==a):b.map(b=>b.id===a?{...e,id:a,loading:!1}:b))}catch{G(b=>b.filter(b=>b.id!==a)),ad("Upload failed")}}},[]),ak=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),af.current+=1,1===af.current&&ab(!0)},[]),al=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),af.current-=1,0===af.current&&ab(!1)},[]),am=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),an=(0,c.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),af.current=0,ab(!1);let b=Array.from(a.dataTransfer.files);b.length>0&&aj(b)},[aj]),ao=(0,c.useCallback)(a=>{let b=a.clipboardData?.items;if(!b)return;let c=[];for(let a of Array.from(b))if("file"===a.kind){let b=a.getAsFile();b&&c.push(b)}c.length>0&&(a.preventDefault(),aj(c))},[aj]),ap=(0,c.useCallback)(a=>{a.preventDefault(),D.trim()&&(z.play(),e({description:D.trim(),attachments:F.filter(a=>!a.loading),repositoryPath:f,approvalGates:{allowPrd:H.allowPrd??!1,allowPlan:H.allowPlan??!1,allowMerge:H.allowMerge??!1},push:J||L,openPr:L,fast:W,...Y?{agentType:Y}:{},...$?{model:$}:{},...T?{parentId:T}:{},sessionId:ae.current}),ag())},[D,F,H,f,e,J,L,W,Y,$,T,z,ag]),aq=(0,c.useCallback)(async()=>{try{let a=await P();a&&G(b=>{let c=new Set(b.map(a=>a.path)),d=a.filter(a=>!c.has(a.path)).map(a=>({id:crypto.randomUUID(),name:a.name,size:a.size,mimeType:"application/octet-stream",path:a.path}));return d.length>0?[...b,...d]:b})}catch{}},[]),ar=(0,c.useCallback)(a=>{G(b=>b.filter(b=>b.id!==a))},[]),as=(0,c.useRef)(null),at=(0,c.useCallback)(a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),as.current?.requestSubmit())},[]),au=j&&j.length>0;return(0,b.jsx)(o.BaseDrawer,{open:a,onClose:ai,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,b.jsx)(p.DrawerTitle,{children:"NEW FEATURE"})]}),g?(0,b.jsx)(p.DrawerDescription,{asChild:!0,children:(0,b.jsx)("div",{children:(0,b.jsx)(u.Badge,{variant:"secondary",children:"Creating..."})})}):null]}),footer:(0,b.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,b.jsx)(q.Button,{variant:"outline",onClick:ai,disabled:g,children:"Cancel"}),(0,b.jsx)(q.Button,{type:"submit",form:"create-feature-form",disabled:!D.trim()||g,children:g?"Creating...":"+ Create Feature"})]}),children:(0,b.jsx)("div",{className:"overflow-y-auto p-4",children:(0,b.jsx)(x.TooltipProvider,{delayDuration:400,children:(0,b.jsxs)("form",{ref:as,id:"create-feature-form",onSubmit:ap,className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{role:"region","aria-label":"File drop zone","data-drag-over":aa?"true":"false",onDragEnter:ak,onDragLeave:al,onDragOver:am,onDrop:an,className:(0,m.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",aa&&"border-primary/50 bg-primary/5"),children:[(0,b.jsx)(t.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"DESCRIBE YOUR FEATURE"}),(0,b.jsxs)("div",{className:"border-input focus-within:ring-ring/50 focus-within:border-ring flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]",children:[(0,b.jsx)(s,{id:"feature-description",placeholder:"e.g. Add GitHub OAuth login with callback handling and token refresh...",value:D,onChange:a=>E(a.target.value),onKeyDown:at,onPaste:ao,required:!0,disabled:g,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),F.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:F.map(a=>(0,b.jsx)(N,{name:a.name,size:a.size,mimeType:a.mimeType,path:a.path,onRemove:()=>ar(a.id),disabled:g,loading:a.loading},a.id))}),ac?(0,b.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:ac}):null,(0,b.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,b.jsx)(O.AgentModelPicker,{initialAgentType:Y??r??"claude-code",initialModel:$??v??"claude-sonnet-4-6",mode:"override",onAgentModelChange:(a,b)=>{Z(a),_(b)},disabled:g,className:"w-55"}),(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,b.jsx)(w.Switch,{id:"fast-mode",checked:W,onCheckedChange:X,disabled:g}),(0,b.jsxs)(t.Label,{htmlFor:"fast-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,b.jsx)(l.Zap,{className:"h-3.5 w-3.5"}),"Fast Mode"]})]})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Skip SDLC phases and implement directly from your prompt."})]}),(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:aq,disabled:g,"aria-label":"Attach files",className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,b.jsx)(i,{className:"h-4 w-4"})})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Attach files"})]})]})]})]}),au&&void 0!==k?(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)(t.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:"PARENT FEATURE"}),(0,b.jsx)(U,{features:j,value:T,onChange:V,disabled:g})]}):null,(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:"APPROVE"})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Auto-approve phase transitions without manual review."})]}),(0,b.jsx)("div",{className:"flex flex-1 items-center gap-4",children:R.map(a=>(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(w.Switch,{id:`approve-${a.id}`,size:"sm",checked:H[a.id]??!1,onCheckedChange:b=>I(c=>({...c,[a.id]:b})),disabled:g||W&&("allowPrd"===a.id||"allowPlan"===a.id)}),(0,b.jsx)(t.Label,{htmlFor:`approve-${a.id}`,className:"cursor-pointer text-xs font-medium",children:a.label})]})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:W&&("allowPrd"===a.id||"allowPlan"===a.id)?"Skipped in Fast Mode":a.description})]},a.id))}),(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("button",{type:"button",onClick:()=>{let a=R.every(a=>H[a.id]),b={};for(let c of R)b[c.id]=!a;I(b)},disabled:g,className:(0,m.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",R.every(a=>H[a.id])&&"text-primary"),children:"All"})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Toggle all approval gates"})]})]}),(0,b.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,b.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider",children:"GIT"}),(0,b.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(w.Switch,{id:"push",size:"sm",checked:J||L,onCheckedChange:a=>{K(a),!a&&L&&M(!1)},disabled:g}),(0,b.jsx)(t.Label,{htmlFor:"push",className:"cursor-pointer text-xs font-medium",children:"Push"})]})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Push branch to remote after implementation."})]}),(0,b.jsxs)(x.Tooltip,{children:[(0,b.jsx)(x.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,b.jsx)(w.Switch,{id:"open-pr",size:"sm",checked:L,onCheckedChange:M,disabled:g}),(0,b.jsx)(t.Label,{htmlFor:"open-pr",className:"cursor-pointer text-xs font-medium",children:"PR"})]})}),(0,b.jsx)(x.TooltipContent,{side:"bottom",children:"Open a pull request after pushing."})]})]})]})]})]})})})})}function U({features:a,value:d,onChange:e,disabled:f}){let[g,h]=(0,c.useState)(!1),[i,l]=(0,c.useState)(""),n=(0,c.useRef)(null),o=a.find(a=>a.id===d),p=i.trim()?a.filter(a=>a.name.toLowerCase().includes(i.toLowerCase())||a.id.toLowerCase().includes(i.toLowerCase())):a,q=(0,c.useCallback)(a=>{e(a),h(!1),l("")},[e]);return(0,c.useEffect)(()=>{g?setTimeout(()=>n.current?.focus(),0):l("")},[g]),(0,b.jsxs)(v.Popover,{open:g,onOpenChange:h,children:[(0,b.jsx)(v.PopoverTrigger,{asChild:!0,children:(0,b.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":g,"aria-label":"Parent Feature",disabled:f,"data-testid":"parent-feature-combobox",className:(0,m.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!o&&"text-muted-foreground"),children:[(0,b.jsx)("span",{className:"truncate",children:o?`${o.name} (${o.id.slice(0,8)})`:"Select parent feature..."}),(0,b.jsx)(j,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,b.jsx)(v.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,b.jsxs)("div",{className:"flex flex-col",children:[(0,b.jsx)("div",{className:"border-b p-2",children:(0,b.jsx)(r.Input,{ref:n,placeholder:"Search features...",value:i,onChange:a=>l(a.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,b.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===d,onClick:()=>q(void 0),className:(0,m.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===d&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,b.jsx)(k.default,{className:(0,m.cn)("h-4 w-4 shrink-0",void 0!==d&&"invisible")}),(0,b.jsx)("span",{className:"text-muted-foreground italic",children:"No parent"})]}),0===p.length&&i?(0,b.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No features found."}):p.map(a=>(0,b.jsxs)("button",{type:"button",role:"option","aria-selected":d===a.id,onClick:()=>q(a.id),className:(0,m.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",d===a.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${a.id}`,children:[(0,b.jsx)(k.default,{className:(0,m.cn)("h-4 w-4 shrink-0",d!==a.id&&"invisible")}),(0,b.jsxs)("span",{className:"truncate",children:[a.name," ",(0,b.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",a.id.slice(0,8),")"]})]})]},a.id))]})]})})]})}function V({repositoryPath:a,initialParentId:f,features:h,workflowDefaults:i,currentAgentType:j,currentModel:k}){let l=(0,d.useRouter)(),[m,n]=(0,c.useState)(!1),o=(0,d.usePathname)().startsWith("/create"),p=!m&&o;(0,c.useEffect)(()=>{!o&&m&&n(!1)},[o,m]);let q=(0,c.useCallback)(()=>{l.push("/")},[l]),r=(0,c.useCallback)(a=>{n(!0),l.push("/"),g(a).then(b=>{b.error?e.toast.error(b.error):window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:b.feature.id,name:b.feature.name,description:b.feature.description,repositoryPath:b.feature.repositoryPath,parentId:a.parentId}}))}).catch(()=>{e.toast.error("Failed to create feature"),n(!1)})},[l]);return(0,b.jsx)(T,{open:p,onClose:q,onSubmit:r,repositoryPath:a,features:h,workflowDefaults:i,initialParentId:f,isSubmitting:m,currentAgentType:j,currentModel:k})}a.s(["CreateDrawerClient",()=>V],93995)}];
2
2
 
3
3
  //# sourceMappingURL=744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx","../../../../../../../src/presentation/web/app/actions/data%3A94cc3f%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/pick-files.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts"],"sourcesContent":["'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { createFeature } from '@/app/actions/create-feature';\nimport { FeatureCreateDrawer } from '@/components/common/feature-create-drawer';\nimport type { FeatureCreatePayload } from '@/components/common/feature-create-drawer';\nimport type { ParentFeatureOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\n\nexport interface CreateDrawerClientProps {\n repositoryPath: string;\n initialParentId?: string;\n features: ParentFeatureOption[];\n workflowDefaults?: WorkflowDefaults;\n currentAgentType?: string;\n currentModel?: string;\n}\n\nexport function CreateDrawerClient({\n repositoryPath,\n initialParentId,\n features,\n workflowDefaults,\n currentAgentType,\n currentModel,\n}: CreateDrawerClientProps) {\n const router = useRouter();\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n // Derive open state from the URL. Next.js parallel routes preserve slot\n // content during soft navigation, so this component is NOT unmounted when\n // navigating to `/`. We watch the pathname and let Vaul handle the close\n // animation when the path no longer matches the create route.\n // When submitting, force the drawer closed immediately — router.push('/')\n // is async and the pathname may not update before the next render.\n const pathname = usePathname();\n const isOnCreateRoute = pathname.startsWith('/create');\n const isOpen = !isSubmitting && isOnCreateRoute;\n\n // Reset isSubmitting once the route has actually changed away from /create,\n // so the drawer can reopen on future visits. Without this, isSubmitting\n // would stay true forever since parallel routes preserve component state.\n useEffect(() => {\n if (!isOnCreateRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnCreateRoute, isSubmitting]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const onSubmit = useCallback(\n (data: FeatureCreatePayload) => {\n setIsSubmitting(true);\n\n // Close the drawer immediately for responsive UI\n router.push('/');\n\n // Server action Phase 1 returns fast with real feature ID (DB record created)\n // Phase 2 (metadata, worktree, agent) runs in background on server\n createFeature(data)\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n // Dispatch event with real feature ID so control center adds it to featureMap\n window.dispatchEvent(\n new CustomEvent('shep:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n parentId: data.parentId,\n },\n })\n );\n })\n .catch(() => {\n toast.error('Failed to create feature');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <FeatureCreateDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n repositoryPath={repositoryPath}\n features={features}\n workflowDefaults={workflowDefaults}\n initialParentId={initialParentId}\n isSubmitting={isSubmitting}\n currentAgentType={currentAgentType}\n currentModel={currentModel}\n />\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40d0faa4f546501ef93b80ac4ed9b7a741026d5e69\":\"createFeature\"},\"src/presentation/web/app/actions/create-feature.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40d0faa4f546501ef93b80ac4ed9b7a741026d5e69\",callServer,void 0,findSourceMapURL,\"createFeature\");export{$$RSC_SERVER_ACTION_0 as createFeature};","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n PlusIcon,\n FileIcon,\n FileTextIcon,\n ImageIcon,\n CodeIcon,\n Trash2Icon,\n ChevronsUpDown,\n CheckIcon,\n Zap,\n} from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { useSoundAction } from '@/hooks/use-sound-action';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Textarea } from '@/components/ui/textarea';\nimport { Label } from '@/components/ui/label';\nimport { Badge } from '@/components/ui/badge';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { Switch } from '@/components/ui/switch';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useGuardedDrawerClose } from '@/hooks/drawer-close-guard';\nimport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\nimport { AgentModelPicker } from '@/components/features/settings/AgentModelPicker';\nimport { pickFiles } from './pick-files';\n\nexport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/** Minimal feature descriptor for the parent selector. */\nexport interface ParentFeatureOption {\n id: string;\n name: string;\n}\n\nexport interface FeatureCreatePayload {\n description: string;\n attachments: FileAttachment[];\n repositoryPath: string;\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model override for this feature run */\n model?: string;\n}\n\nconst AUTO_APPROVE_OPTIONS = [\n { id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },\n { id: 'allowPlan', label: 'Plan', description: 'Auto-approve planning move to implementation.' },\n { id: 'allowMerge', label: 'Merge', description: 'Auto-approve merge move to Done.' },\n];\n\nconst EMPTY_GATES: Record<string, boolean> = {\n allowPrd: false,\n allowPlan: false,\n allowMerge: false,\n};\n\nexport interface FeatureCreateDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (data: FeatureCreatePayload) => void;\n repositoryPath: string;\n isSubmitting?: boolean;\n workflowDefaults?: WorkflowDefaults;\n /** List of existing features available for selection as a parent. */\n features?: ParentFeatureOption[];\n /** Pre-select a parent feature when the drawer opens (e.g. from (+) button on a feature node). */\n initialParentId?: string;\n /** Current global agent type from settings */\n currentAgentType?: string;\n /** Current global model from settings */\n currentModel?: string;\n}\n\nexport function FeatureCreateDrawer({\n open,\n onClose,\n onSubmit,\n repositoryPath,\n isSubmitting = false,\n workflowDefaults,\n features,\n initialParentId,\n currentAgentType,\n currentModel,\n}: FeatureCreateDrawerProps) {\n const createSound = useSoundAction('create');\n const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;\n const defaultPush = workflowDefaults?.push ?? false;\n const defaultOpenPr = workflowDefaults?.openPr ?? false;\n\n const [description, setDescription] = useState('');\n const [attachments, setAttachments] = useState<FileAttachment[]>([]);\n const [approvalGates, setApprovalGates] = useState<Record<string, boolean>>({ ...defaultGates });\n const [push, setPush] = useState(defaultPush);\n const [openPr, setOpenPr] = useState(defaultOpenPr);\n const [parentId, setParentId] = useState<string | undefined>(undefined);\n const [fast, setFast] = useState(false);\n const [overrideAgent, setOverrideAgent] = useState<string | undefined>(undefined);\n const [overrideModel, setOverrideModel] = useState<string | undefined>(undefined);\n\n // Sync state when workflowDefaults load asynchronously\n useEffect(() => {\n if (workflowDefaults) {\n setApprovalGates({ ...workflowDefaults.approvalGates });\n setPush(workflowDefaults.push);\n setOpenPr(workflowDefaults.openPr);\n }\n }, [workflowDefaults]);\n\n // Pre-select parent when initialParentId changes (e.g. (+) button on feature node)\n useEffect(() => {\n if (open && initialParentId) {\n setParentId(initialParentId);\n }\n }, [open, initialParentId]);\n\n const resetForm = useCallback(() => {\n setDescription('');\n setAttachments([]);\n setApprovalGates({ ...defaultGates });\n setPush(defaultPush);\n setOpenPr(defaultOpenPr);\n setParentId(undefined);\n setFast(false);\n setOverrideAgent(undefined);\n setOverrideModel(undefined);\n }, [defaultGates, defaultPush, defaultOpenPr]);\n\n // Track whether the form has unsaved data\n const isDirty = description.trim() !== '' || attachments.length > 0;\n\n // Shared close guard — shows confirmation when dirty, prevents navigation\n const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n if (!description.trim()) return;\n createSound.play();\n onSubmit({\n description: description.trim(),\n attachments,\n repositoryPath,\n approvalGates: {\n allowPrd: approvalGates.allowPrd ?? false,\n allowPlan: approvalGates.allowPlan ?? false,\n allowMerge: approvalGates.allowMerge ?? false,\n },\n push: push || openPr,\n openPr,\n fast,\n ...(overrideAgent ? { agentType: overrideAgent } : {}),\n ...(overrideModel ? { model: overrideModel } : {}),\n ...(parentId ? { parentId } : {}),\n });\n resetForm();\n },\n [\n description,\n attachments,\n approvalGates,\n repositoryPath,\n onSubmit,\n push,\n openPr,\n fast,\n overrideAgent,\n overrideModel,\n parentId,\n createSound,\n resetForm,\n ]\n );\n\n const handleAddFiles = useCallback(async () => {\n try {\n const files = await pickFiles();\n if (files) {\n setAttachments((prev) => [...prev, ...files]);\n }\n } catch {\n // Native dialog failed — silently ignore (user can retry)\n }\n }, []);\n\n const handleRemoveFile = useCallback((path: string) => {\n setAttachments((prev) => prev.filter((f) => f.path !== path));\n }, []);\n\n const formRef = useRef<HTMLFormElement>(null);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {\n e.preventDefault();\n formRef.current?.requestSubmit();\n }\n }, []);\n\n const hasFeatures = features && features.length > 0;\n\n return (\n <BaseDrawer\n open={open}\n onClose={attemptClose}\n size=\"md\"\n modal={false}\n dismissOnOutsideClick\n data-testid=\"feature-create-drawer\"\n header={\n <>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500\" />\n <DrawerTitle>NEW FEATURE</DrawerTitle>\n </div>\n {isSubmitting ? (\n <DrawerDescription asChild>\n <div>\n <Badge variant=\"secondary\">Creating...</Badge>\n </div>\n </DrawerDescription>\n ) : null}\n </>\n }\n footer={\n <div className=\"flex flex-row justify-end gap-2\">\n <Button variant=\"outline\" onClick={attemptClose} disabled={isSubmitting}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n form=\"create-feature-form\"\n disabled={!description.trim() || isSubmitting}\n >\n {isSubmitting ? 'Creating...' : '+ Create Feature'}\n </Button>\n </div>\n }\n >\n {/* Form body */}\n <div className=\"overflow-y-auto p-4\">\n <TooltipProvider delayDuration={400}>\n <form\n ref={formRef}\n id=\"create-feature-form\"\n onSubmit={handleSubmit}\n className=\"flex flex-col gap-4\"\n >\n {/* Description + inline controls */}\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"feature-description\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n DESCRIBE YOUR FEATURE\n </Label>\n <div className=\"border-input focus-within:ring-ring/50 focus-within:border-ring overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]\">\n <Textarea\n id=\"feature-description\"\n placeholder=\"e.g. Add GitHub OAuth login with callback handling and token refresh...\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n onKeyDown={handleKeyDown}\n rows={7}\n required\n disabled={isSubmitting}\n className=\"field-sizing-fixed min-h-42! resize-none rounded-none border-0 shadow-none focus-visible:ring-0\"\n />\n <div className=\"border-input flex items-center gap-3 border-t px-3 py-1.5\">\n <AgentModelPicker\n initialAgentType={overrideAgent ?? currentAgentType ?? 'claude-code'}\n initialModel={overrideModel ?? currentModel ?? 'claude-sonnet-4-6'}\n mode=\"override\"\n onAgentModelChange={(agent, model) => {\n setOverrideAgent(agent);\n setOverrideModel(model);\n }}\n disabled={isSubmitting}\n className=\"w-55\"\n />\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"ml-auto flex cursor-pointer items-center gap-2\">\n <Switch\n id=\"fast-mode\"\n checked={fast}\n onCheckedChange={setFast}\n disabled={isSubmitting}\n />\n <Label\n htmlFor=\"fast-mode\"\n className=\"flex cursor-pointer items-center gap-1 text-sm font-medium\"\n >\n <Zap className=\"h-3.5 w-3.5\" />\n Fast Mode\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Skip SDLC phases and implement directly from your prompt.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Parent feature selector (only when opened from a feature node) */}\n {hasFeatures && initialParentId !== undefined ? (\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"parent-feature\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n PARENT FEATURE\n </Label>\n <ParentFeatureCombobox\n features={features}\n value={parentId}\n onChange={setParentId}\n disabled={isSubmitting}\n />\n </div>\n ) : null}\n\n {/* Approve + Git — compact switch groups */}\n <div className=\"flex flex-col gap-2\">\n {/* Approve row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider\">\n APPROVE\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Auto-approve phase transitions without manual review.\n </TooltipContent>\n </Tooltip>\n <div className=\"flex flex-1 items-center gap-4\">\n {AUTO_APPROVE_OPTIONS.map((opt) => (\n <Tooltip key={opt.id}>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id={`approve-${opt.id}`}\n size=\"sm\"\n checked={approvalGates[opt.id] ?? false}\n onCheckedChange={(v) =>\n setApprovalGates((prev) => ({ ...prev, [opt.id]: v }))\n }\n disabled={\n isSubmitting ||\n (fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan'))\n }\n />\n <Label\n htmlFor={`approve-${opt.id}`}\n className=\"cursor-pointer text-xs font-medium\"\n >\n {opt.label}\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')\n ? 'Skipped in Fast Mode'\n : opt.description}\n </TooltipContent>\n </Tooltip>\n ))}\n </div>\n {/* Select all shortcut */}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => {\n const allOn = AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]);\n const next: Record<string, boolean> = {};\n for (const o of AUTO_APPROVE_OPTIONS) next[o.id] = !allOn;\n setApprovalGates(next);\n }}\n disabled={isSubmitting}\n className={cn(\n 'text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors',\n AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]) && 'text-primary'\n )}\n >\n All\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">Toggle all approval gates</TooltipContent>\n </Tooltip>\n </div>\n\n {/* Git row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <span className=\"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider\">\n GIT\n </span>\n <div className=\"flex flex-1 items-center gap-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"push\"\n size=\"sm\"\n checked={push || openPr}\n onCheckedChange={(v) => {\n setPush(v);\n if (!v && openPr) setOpenPr(false);\n }}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"push\" className=\"cursor-pointer text-xs font-medium\">\n Push\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Push branch to remote after implementation.\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"open-pr\"\n size=\"sm\"\n checked={openPr}\n onCheckedChange={setOpenPr}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"open-pr\" className=\"cursor-pointer text-xs font-medium\">\n PR\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Open a pull request after pushing.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Attachments */}\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex items-center justify-between\">\n <Label className=\"text-muted-foreground text-xs font-semibold tracking-wider\">\n ATTACHMENTS\n {attachments.length > 0 && (\n <span className=\"text-muted-foreground/60 ml-1.5\">({attachments.length})</span>\n )}\n </Label>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"xs\"\n onClick={handleAddFiles}\n disabled={isSubmitting}\n >\n <PlusIcon className=\"size-3\" />\n Add Files\n </Button>\n </div>\n\n {attachments.length > 0 && (\n <div className=\"flex flex-col gap-2\">\n {attachments.map((file) => (\n <AttachmentCard\n key={file.path}\n file={file}\n onRemove={() => handleRemoveFile(file.path)}\n disabled={isSubmitting}\n />\n ))}\n </div>\n )}\n </div>\n </form>\n </TooltipProvider>\n </div>\n </BaseDrawer>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * ParentFeatureCombobox — searchable dropdown for parent feature selection\n * ------------------------------------------------------------------------- */\n\ninterface ParentFeatureComboboxProps {\n features: ParentFeatureOption[];\n value: string | undefined;\n onChange: (id: string | undefined) => void;\n disabled?: boolean;\n}\n\nfunction ParentFeatureCombobox({\n features,\n value,\n onChange,\n disabled,\n}: ParentFeatureComboboxProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const selectedFeature = features.find((f) => f.id === value);\n\n const filtered = query.trim()\n ? features.filter(\n (f) =>\n f.name.toLowerCase().includes(query.toLowerCase()) ||\n f.id.toLowerCase().includes(query.toLowerCase())\n )\n : features;\n\n const handleSelect = useCallback(\n (id: string | undefined) => {\n onChange(id);\n setOpen(false);\n setQuery('');\n },\n [onChange]\n );\n\n useEffect(() => {\n if (open) {\n setTimeout(() => inputRef.current?.focus(), 0);\n } else {\n setQuery('');\n }\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n id=\"parent-feature\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-label=\"Parent Feature\"\n disabled={disabled}\n data-testid=\"parent-feature-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedFeature && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedFeature\n ? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`\n : 'Select parent feature...'}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"parent-feature-combobox-content\"\n >\n <div className=\"flex flex-col\">\n {/* Search input */}\n <div className=\"border-b p-2\">\n <Input\n ref={inputRef}\n placeholder=\"Search features...\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"parent-feature-search\"\n />\n </div>\n\n {/* Options list */}\n <div className=\"max-h-48 overflow-y-auto py-1\" role=\"listbox\" aria-label=\"Features\">\n {/* No parent option */}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={value === undefined}\n onClick={() => handleSelect(undefined)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === undefined && 'bg-accent/50'\n )}\n data-testid=\"parent-feature-option-none\"\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== undefined && 'invisible')} />\n <span className=\"text-muted-foreground italic\">No parent</span>\n </button>\n\n {filtered.length === 0 && query ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">No features found.</p>\n ) : (\n filtered.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n role=\"option\"\n aria-selected={value === f.id}\n onClick={() => handleSelect(f.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === f.id && 'bg-accent/50'\n )}\n data-testid={`parent-feature-option-${f.id}`}\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== f.id && 'invisible')} />\n <span className=\"truncate\">\n {f.name}{' '}\n <span className=\"text-muted-foreground font-mono text-xs\">\n ({f.id.slice(0, 8)})\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * Private sub-components & utilities\n * ------------------------------------------------------------------------- */\n\nfunction AttachmentCard({\n file,\n onRemove,\n disabled,\n}: {\n file: FileAttachment;\n onRemove: () => void;\n disabled?: boolean;\n}) {\n const ext = getExtension(file.name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{file.name}</span>\n <span className=\"text-muted-foreground truncate text-xs\">{file.path}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(file.size)}</span>\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${file.name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nfunction getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nfunction getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/**\n * Opens a native OS file picker dialog via API route.\n * Returns the selected files with metadata, or null if the user cancelled.\n */\nexport async function pickFiles(): Promise<FileAttachment[] | null> {\n const res = await fetch('/api/dialog/pick-files', { method: 'POST' });\n\n if (!res.ok) {\n throw new Error('Failed to open file dialog');\n }\n\n const data: { files: FileAttachment[] | null; cancelled: boolean } = await res.json();\n return data.cancelled ? null : data.files;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxNSA1IDUgNS01IiAvPgogIDxwYXRoIGQ9Im03IDkgNS01IDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n"],"names":[],"mappings":"wDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCJwM,EAAA,EAAA,CAAA,CAAA,OAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,mDMyB7b,CAAA,CAAA,CAAA,CAAA,AAAM,CAAN,CAAM,CAAA,CAAA,CAAO,AAAP,CAAO,AAAP,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,AAlBvC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AFYH,CEZG,AFYH,CEZG,AFYH,gHEXK,EAET,CACA,CAAC,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EAElC,IAAM,EAAU,CAAA,EAAA,EAAA,WAAA,AAAW,EAAC,KAC1B,EAAO,IAAI,CAAC,IACd,EAAG,CAAC,EAAO,EAEL,EAAW,CAAA,EAAA,EAAA,WAAW,AAAX,EACf,AAAC,IACC,GAAgB,GAGhB,EAAO,IAAI,CAAC,KAIZ,EAAc,GACX,IAAI,CAAC,AAAC,IACL,AAAI,EAAO,KAAK,CACd,CADgB,CAChB,KAAK,CAAC,KAAK,CAAC,EAAO,KAAK,EAI1B,OAAO,aAAa,CAClB,IAAI,YAAY,uBAAwB,CACtC,OAAQ,CACN,UAAW,EAAO,OAAO,CAAE,EAAE,CAC7B,KAAM,EAAO,OAAO,CAAE,IAAI,CAC1B,YAAa,EAAO,OAAO,CAAE,WAAW,CACxC,eAAgB,EAAO,OAAO,CAAE,cAAc,CAC9C,SAAU,EAAK,QAAQ,AACzB,CACF,GAEJ,GACC,KAAK,CAAC,KACL,EAAA,KAAK,CAAC,KAAK,CAAC,4BACZ,GAAgB,EAClB,EACJ,EACA,CAAC,EAAO,EAGV,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CACC,KAAM,EACN,QAAS,EACT,SAAU,EACV,eAAgB,EAChB,SAAU,EACV,iBAAkB,EAClB,gBAAiB,EACjB,aAAc,EACd,iBAAkB,EAClB,aAAc,GAGpB","ignoreList":[5,6,7]}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/app/actions/data%3A874d49%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/common/attachment-chip/attachment-chip.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx","../../../../../../../src/presentation/web/components/common/control-center-drawer/create-drawer-client.tsx","../../../../../../../src/presentation/web/components/ui/textarea.tsx","../../../../../../../src/presentation/web/components/common/feature-create-drawer/pick-files.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/image.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/chevrons-up-down.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/file.ts","../../../../../../../node_modules/.pnpm/lucide-react%400.563.0_react%4019.2.4/node_modules/lucide-react/src/icons/paperclip.ts","../../../../../../../src/presentation/web/components/common/attachment-card/attachment-card.tsx"],"sourcesContent":["/* __next_internal_action_entry_do_not_use__ [{\"40b3e847b00cc5d04b4cd350525b56bf1967df7459\":\"createFeature\"},\"src/presentation/web/app/actions/create-feature.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40b3e847b00cc5d04b4cd350525b56bf1967df7459\",callServer,void 0,findSourceMapURL,\"createFeature\");export{$$RSC_SERVER_ACTION_0 as createFeature};","/* eslint-disable @next/next/no-img-element -- Local file preview requires raw <img>, not next/image */\n'use client';\n\nimport { X, Loader2Icon, DownloadIcon } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Dialog, DialogTrigger, DialogContent, DialogTitle } from '@/components/ui/dialog';\nimport { VisuallyHidden } from 'radix-ui';\nimport {\n formatFileSize,\n getFileIcon,\n getFileIconColor,\n} from '@/components/common/attachment-card/attachment-card';\n\nexport interface AttachmentChipProps {\n name: string;\n size: number;\n mimeType: string;\n path: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\n\nfunction isImage(name: string): boolean {\n const dot = name.lastIndexOf('.');\n return dot >= 0 && IMAGE_EXTS.has(name.slice(dot).toLowerCase());\n}\n\nfunction previewUrl(path: string, mimeType: string): string {\n const params = new URLSearchParams({ path, mimeType });\n return `/api/attachments/preview?${params.toString()}`;\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nexport function AttachmentChip({\n name,\n size,\n mimeType,\n path,\n onRemove,\n loading = false,\n disabled = false,\n}: AttachmentChipProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n const imageFile = isImage(name);\n\n if (loading) {\n return (\n <div className=\"flex h-12 w-12 items-center justify-center rounded-md border\">\n <Loader2Icon className=\"text-muted-foreground h-5 w-5 animate-spin\" />\n </div>\n );\n }\n\n if (imageFile) {\n return (\n <Dialog>\n <div className=\"group relative\">\n <DialogTrigger asChild>\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n title={name}\n className=\"h-12 w-12 cursor-pointer rounded-md border object-cover transition-opacity hover:opacity-80\"\n />\n </DialogTrigger>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n <DialogContent className=\"max-w-3xl gap-0 overflow-hidden border-0 p-0 [&>button:last-child]:!cursor-pointer [&>button:last-child]:!rounded-full [&>button:last-child]:!bg-black/70 [&>button:last-child]:!p-1.5 [&>button:last-child]:!text-white [&>button:last-child]:!opacity-100 [&>button:last-child]:!shadow-lg [&>button:last-child]:!backdrop-blur-md [&>button:last-child]:hover:!bg-black/90\">\n <VisuallyHidden.Root>\n <DialogTitle>Preview: {name}</DialogTitle>\n </VisuallyHidden.Root>\n <div className=\"relative bg-black/90\">\n <img\n src={previewUrl(path, mimeType)}\n alt={name}\n className=\"h-auto max-h-[70vh] w-full object-contain\"\n />\n </div>\n <div className=\"bg-background flex items-center gap-3 px-4 py-3\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n </div>\n <a\n href={previewUrl(path, mimeType)}\n download={name}\n className=\"text-muted-foreground hover:text-foreground shrink-0 cursor-pointer rounded p-1.5 transition-colors\"\n aria-label={`Download ${name}`}\n >\n <DownloadIcon className=\"h-4 w-4\" />\n </a>\n </div>\n </DialogContent>\n </Dialog>\n );\n }\n\n return (\n <div className=\"group relative flex items-center gap-2 rounded-full border py-1 pr-3 pl-2\">\n <div\n className={cn(\n 'flex h-6 w-6 shrink-0 items-center justify-center rounded-full',\n iconColorClass\n )}\n >\n <Icon className=\"h-3 w-3\" />\n </div>\n <span className=\"max-w-[120px] truncate text-sm\">{name}</span>\n <span className=\"text-muted-foreground text-xs\">{formatFileSize(size)}</span>\n {!disabled && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"absolute -top-1.5 -right-1.5 hidden h-5 w-5 cursor-pointer items-center justify-center rounded-full bg-black/70 text-white group-hover:flex\"\n aria-label={`Remove ${name}`}\n >\n <X className=\"h-3 w-3\" />\n </button>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useState, useCallback, useEffect, useRef } from 'react';\nimport { PaperclipIcon, ChevronsUpDown, CheckIcon, Zap } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { useSoundAction } from '@/hooks/use-sound-action';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Textarea } from '@/components/ui/textarea';\nimport { Label } from '@/components/ui/label';\nimport { Badge } from '@/components/ui/badge';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { Switch } from '@/components/ui/switch';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\nimport { useGuardedDrawerClose } from '@/hooks/drawer-close-guard';\nimport { AttachmentChip } from '@/components/common/attachment-chip';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\nimport { AgentModelPicker } from '@/components/features/settings/AgentModelPicker';\nimport { pickFiles } from './pick-files';\n\nexport type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/** Attachment record for the create form — supports both picker and upload sources. */\nexport interface FormAttachment {\n id: string;\n name: string;\n size: number;\n mimeType: string;\n path: string;\n loading?: boolean;\n}\n\n/** Minimal feature descriptor for the parent selector. */\nexport interface ParentFeatureOption {\n id: string;\n name: string;\n}\n\nexport interface FeatureCreatePayload {\n description: string;\n attachments: FormAttachment[];\n repositoryPath: string;\n approvalGates: {\n allowPrd: boolean;\n allowPlan: boolean;\n allowMerge: boolean;\n };\n push: boolean;\n openPr: boolean;\n parentId?: string;\n /** When true, skip SDLC phases and implement directly from the prompt. */\n fast: boolean;\n /** Optional agent type override for this feature run */\n agentType?: string;\n /** Optional model override for this feature run */\n model?: string;\n sessionId?: string;\n}\n\nconst MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB\n\nconst ALLOWED_EXTENSIONS = new Set([\n '.png',\n '.jpg',\n '.jpeg',\n '.gif',\n '.webp',\n '.svg',\n '.bmp',\n '.ico',\n '.pdf',\n '.doc',\n '.docx',\n '.xls',\n '.xlsx',\n '.ppt',\n '.pptx',\n '.txt',\n '.md',\n '.csv',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.py',\n '.rb',\n '.go',\n '.rs',\n '.java',\n '.c',\n '.cpp',\n '.h',\n '.hpp',\n '.cs',\n '.swift',\n '.kt',\n '.html',\n '.css',\n '.scss',\n '.less',\n '.sh',\n '.bash',\n '.zsh',\n '.fish',\n '.toml',\n '.ini',\n '.cfg',\n '.conf',\n '.env',\n '.zip',\n '.tar',\n '.gz',\n '.log',\n]);\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst AUTO_APPROVE_OPTIONS = [\n { id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },\n { id: 'allowPlan', label: 'Plan', description: 'Auto-approve planning move to implementation.' },\n { id: 'allowMerge', label: 'Merge', description: 'Auto-approve merge move to Done.' },\n];\n\nconst EMPTY_GATES: Record<string, boolean> = {\n allowPrd: false,\n allowPlan: false,\n allowMerge: false,\n};\n\nexport interface FeatureCreateDrawerProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (data: FeatureCreatePayload) => void;\n repositoryPath: string;\n isSubmitting?: boolean;\n workflowDefaults?: WorkflowDefaults;\n /** List of existing features available for selection as a parent. */\n features?: ParentFeatureOption[];\n /** Pre-select a parent feature when the drawer opens (e.g. from (+) button on a feature node). */\n initialParentId?: string;\n /** Current global agent type from settings */\n currentAgentType?: string;\n /** Current global model from settings */\n currentModel?: string;\n}\n\nexport function FeatureCreateDrawer({\n open,\n onClose,\n onSubmit,\n repositoryPath,\n isSubmitting = false,\n workflowDefaults,\n features,\n initialParentId,\n currentAgentType,\n currentModel,\n}: FeatureCreateDrawerProps) {\n const createSound = useSoundAction('create');\n const defaultGates = workflowDefaults?.approvalGates ?? EMPTY_GATES;\n const defaultPush = workflowDefaults?.push ?? false;\n const defaultOpenPr = workflowDefaults?.openPr ?? false;\n\n const [description, setDescription] = useState('');\n const [attachments, setAttachments] = useState<FormAttachment[]>([]);\n const [approvalGates, setApprovalGates] = useState<Record<string, boolean>>({ ...defaultGates });\n const [push, setPush] = useState(defaultPush);\n const [openPr, setOpenPr] = useState(defaultOpenPr);\n const [parentId, setParentId] = useState<string | undefined>(undefined);\n const [fast, setFast] = useState(false);\n const [overrideAgent, setOverrideAgent] = useState<string | undefined>(undefined);\n const [overrideModel, setOverrideModel] = useState<string | undefined>(undefined);\n const [isDragOver, setIsDragOver] = useState(false);\n const [uploadError, setUploadError] = useState<string | null>(null);\n\n // Stable sessionId per mount — used for upload dedup grouping\n const sessionIdRef = useRef(crypto.randomUUID());\n const dragCounterRef = useRef(0);\n\n // Sync state when workflowDefaults load asynchronously\n useEffect(() => {\n if (workflowDefaults) {\n setApprovalGates({ ...workflowDefaults.approvalGates });\n setPush(workflowDefaults.push);\n setOpenPr(workflowDefaults.openPr);\n }\n }, [workflowDefaults]);\n\n // Pre-select parent when initialParentId changes (e.g. (+) button on feature node)\n useEffect(() => {\n if (open && initialParentId) {\n setParentId(initialParentId);\n }\n }, [open, initialParentId]);\n\n const resetForm = useCallback(() => {\n setDescription('');\n setAttachments([]);\n setApprovalGates({ ...defaultGates });\n setPush(defaultPush);\n setOpenPr(defaultOpenPr);\n setParentId(undefined);\n setFast(false);\n setOverrideAgent(undefined);\n setOverrideModel(undefined);\n setUploadError(null);\n dragCounterRef.current = 0;\n setIsDragOver(false);\n }, [defaultGates, defaultPush, defaultOpenPr]);\n\n // Track whether the form has unsaved data\n const isDirty = description.trim() !== '' || attachments.length > 0;\n\n // Shared close guard — shows confirmation when dirty, prevents navigation\n const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });\n\n /** Validate and upload files from drop or paste. */\n const handleFiles = useCallback(async (fileList: File[]) => {\n setUploadError(null);\n\n for (const file of fileList) {\n // Client-side size validation\n if (file.size > MAX_FILE_SIZE) {\n setUploadError(`\"${file.name}\" exceeds 10 MB limit`);\n return;\n }\n // Client-side extension validation\n const ext = getExtension(file.name);\n if (ext && !ALLOWED_EXTENSIONS.has(ext)) {\n setUploadError(`File type \"${ext}\" is not allowed`);\n return;\n }\n }\n\n for (const file of fileList) {\n const tempId = crypto.randomUUID();\n\n // Optimistic loading placeholder\n setAttachments((prev) => [\n ...prev,\n {\n id: tempId,\n name: file.name,\n size: file.size,\n mimeType: file.type || 'application/octet-stream',\n path: '',\n loading: true,\n },\n ]);\n\n try {\n const formData = new FormData();\n formData.append('file', file);\n formData.append('sessionId', sessionIdRef.current);\n\n const res = await fetch('/api/attachments/upload', {\n method: 'POST',\n body: formData,\n });\n\n if (!res.ok) {\n const body = await res.json().catch(() => ({ error: 'Upload failed' }));\n // Remove loading placeholder on error\n setAttachments((prev) => prev.filter((a) => a.id !== tempId));\n setUploadError(body.error ?? 'Upload failed');\n return;\n }\n\n const uploaded = await res.json();\n // Server dedup may return the same path for identical content — drop the duplicate.\n setAttachments((prev) => {\n const isDupe = prev.some((a) => a.id !== tempId && a.path === uploaded.path);\n if (isDupe) return prev.filter((a) => a.id !== tempId);\n return prev.map((a) =>\n a.id === tempId ? { ...uploaded, id: tempId, loading: false } : a\n );\n });\n } catch {\n setAttachments((prev) => prev.filter((a) => a.id !== tempId));\n setUploadError('Upload failed');\n }\n }\n }, []);\n\n const handleDragEnter = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current += 1;\n if (dragCounterRef.current === 1) {\n setIsDragOver(true);\n }\n }, []);\n\n const handleDragLeave = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current -= 1;\n if (dragCounterRef.current === 0) {\n setIsDragOver(false);\n }\n }, []);\n\n const handleDragOver = useCallback((e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n\n const handleDrop = useCallback(\n (e: React.DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n dragCounterRef.current = 0;\n setIsDragOver(false);\n\n const files = Array.from(e.dataTransfer.files);\n if (files.length > 0) {\n handleFiles(files);\n }\n },\n [handleFiles]\n );\n\n const handlePaste = useCallback(\n (e: React.ClipboardEvent) => {\n const items = e.clipboardData?.items;\n if (!items) return;\n\n const files: File[] = [];\n for (const item of Array.from(items)) {\n if (item.kind === 'file') {\n const file = item.getAsFile();\n if (file) files.push(file);\n }\n }\n\n if (files.length > 0) {\n e.preventDefault();\n handleFiles(files);\n }\n },\n [handleFiles]\n );\n\n const handleSubmit = useCallback(\n (e: React.FormEvent) => {\n e.preventDefault();\n if (!description.trim()) return;\n createSound.play();\n onSubmit({\n description: description.trim(),\n attachments: attachments.filter((a) => !a.loading),\n repositoryPath,\n approvalGates: {\n allowPrd: approvalGates.allowPrd ?? false,\n allowPlan: approvalGates.allowPlan ?? false,\n allowMerge: approvalGates.allowMerge ?? false,\n },\n push: push || openPr,\n openPr,\n fast,\n ...(overrideAgent ? { agentType: overrideAgent } : {}),\n ...(overrideModel ? { model: overrideModel } : {}),\n ...(parentId ? { parentId } : {}),\n sessionId: sessionIdRef.current,\n });\n resetForm();\n },\n [\n description,\n attachments,\n approvalGates,\n repositoryPath,\n onSubmit,\n push,\n openPr,\n fast,\n overrideAgent,\n overrideModel,\n parentId,\n createSound,\n resetForm,\n ]\n );\n\n const handleAddFiles = useCallback(async () => {\n try {\n const files = await pickFiles();\n if (files) {\n setAttachments((prev) => {\n const existingPaths = new Set(prev.map((f) => f.path));\n const unique = files\n .filter((f) => !existingPaths.has(f.path))\n .map(\n (f): FormAttachment => ({\n id: crypto.randomUUID(),\n name: f.name,\n size: f.size,\n mimeType: 'application/octet-stream',\n path: f.path,\n })\n );\n return unique.length > 0 ? [...prev, ...unique] : prev;\n });\n }\n } catch {\n // Native dialog failed — silently ignore (user can retry)\n }\n }, []);\n\n const handleRemoveFile = useCallback((id: string) => {\n setAttachments((prev) => prev.filter((f) => f.id !== id));\n }, []);\n\n const formRef = useRef<HTMLFormElement>(null);\n\n const handleKeyDown = useCallback((e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {\n e.preventDefault();\n formRef.current?.requestSubmit();\n }\n }, []);\n\n const hasFeatures = features && features.length > 0;\n\n return (\n <BaseDrawer\n open={open}\n onClose={attemptClose}\n size=\"md\"\n modal={false}\n dismissOnOutsideClick\n data-testid=\"feature-create-drawer\"\n header={\n <>\n <div className=\"flex items-center gap-2\">\n <div className=\"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500\" />\n <DrawerTitle>NEW FEATURE</DrawerTitle>\n </div>\n {isSubmitting ? (\n <DrawerDescription asChild>\n <div>\n <Badge variant=\"secondary\">Creating...</Badge>\n </div>\n </DrawerDescription>\n ) : null}\n </>\n }\n footer={\n <div className=\"flex flex-row justify-end gap-2\">\n <Button variant=\"outline\" onClick={attemptClose} disabled={isSubmitting}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n form=\"create-feature-form\"\n disabled={!description.trim() || isSubmitting}\n >\n {isSubmitting ? 'Creating...' : '+ Create Feature'}\n </Button>\n </div>\n }\n >\n {/* Form body */}\n <div className=\"overflow-y-auto p-4\">\n <TooltipProvider delayDuration={400}>\n <form\n ref={formRef}\n id=\"create-feature-form\"\n onSubmit={handleSubmit}\n className=\"flex flex-col gap-4\"\n >\n {/* Description + inline controls with drop zone */}\n <div\n role=\"region\"\n aria-label=\"File drop zone\"\n data-drag-over={isDragOver ? 'true' : 'false'}\n onDragEnter={handleDragEnter}\n onDragLeave={handleDragLeave}\n onDragOver={handleDragOver}\n onDrop={handleDrop}\n className={cn(\n 'flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors',\n isDragOver && 'border-primary/50 bg-primary/5'\n )}\n >\n <Label\n htmlFor=\"feature-description\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n DESCRIBE YOUR FEATURE\n </Label>\n <div className=\"border-input focus-within:ring-ring/50 focus-within:border-ring flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]\">\n <Textarea\n id=\"feature-description\"\n placeholder=\"e.g. Add GitHub OAuth login with callback handling and token refresh...\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n required\n disabled={isSubmitting}\n className=\"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0\"\n />\n {/* Inline attachment chips — between textarea and controls */}\n {attachments.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-1.5 px-3 py-2\">\n {attachments.map((file) => (\n <AttachmentChip\n key={file.id}\n name={file.name}\n size={file.size}\n mimeType={file.mimeType}\n path={file.path}\n onRemove={() => handleRemoveFile(file.id)}\n disabled={isSubmitting}\n loading={file.loading}\n />\n ))}\n </div>\n )}\n {uploadError ? (\n <p className=\"text-destructive px-3 pb-2 text-xs\">{uploadError}</p>\n ) : null}\n <div className=\"border-input flex items-center gap-3 border-t px-3 py-1.5\">\n <AgentModelPicker\n initialAgentType={overrideAgent ?? currentAgentType ?? 'claude-code'}\n initialModel={overrideModel ?? currentModel ?? 'claude-sonnet-4-6'}\n mode=\"override\"\n onAgentModelChange={(agent, model) => {\n setOverrideAgent(agent);\n setOverrideModel(model);\n }}\n disabled={isSubmitting}\n className=\"w-55\"\n />\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"ml-auto flex cursor-pointer items-center gap-2\">\n <Switch\n id=\"fast-mode\"\n checked={fast}\n onCheckedChange={setFast}\n disabled={isSubmitting}\n />\n <Label\n htmlFor=\"fast-mode\"\n className=\"flex cursor-pointer items-center gap-1 text-sm font-medium\"\n >\n <Zap className=\"h-3.5 w-3.5\" />\n Fast Mode\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Skip SDLC phases and implement directly from your prompt.\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={handleAddFiles}\n disabled={isSubmitting}\n aria-label=\"Attach files\"\n className=\"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors\"\n >\n <PaperclipIcon className=\"h-4 w-4\" />\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">Attach files</TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n\n {/* Parent feature selector (only when opened from a feature node) */}\n {hasFeatures && initialParentId !== undefined ? (\n <div className=\"flex flex-col gap-1.5\">\n <Label\n htmlFor=\"parent-feature\"\n className=\"text-muted-foreground text-xs font-semibold tracking-wider\"\n >\n PARENT FEATURE\n </Label>\n <ParentFeatureCombobox\n features={features}\n value={parentId}\n onChange={setParentId}\n disabled={isSubmitting}\n />\n </div>\n ) : null}\n\n {/* Approve + Git — compact switch groups */}\n <div className=\"flex flex-col gap-2\">\n {/* Approve row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider\">\n APPROVE\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Auto-approve phase transitions without manual review.\n </TooltipContent>\n </Tooltip>\n <div className=\"flex flex-1 items-center gap-4\">\n {AUTO_APPROVE_OPTIONS.map((opt) => (\n <Tooltip key={opt.id}>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id={`approve-${opt.id}`}\n size=\"sm\"\n checked={approvalGates[opt.id] ?? false}\n onCheckedChange={(v) =>\n setApprovalGates((prev) => ({ ...prev, [opt.id]: v }))\n }\n disabled={\n isSubmitting ||\n (fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan'))\n }\n />\n <Label\n htmlFor={`approve-${opt.id}`}\n className=\"cursor-pointer text-xs font-medium\"\n >\n {opt.label}\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')\n ? 'Skipped in Fast Mode'\n : opt.description}\n </TooltipContent>\n </Tooltip>\n ))}\n </div>\n {/* Select all shortcut */}\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n onClick={() => {\n const allOn = AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]);\n const next: Record<string, boolean> = {};\n for (const o of AUTO_APPROVE_OPTIONS) next[o.id] = !allOn;\n setApprovalGates(next);\n }}\n disabled={isSubmitting}\n className={cn(\n 'text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors',\n AUTO_APPROVE_OPTIONS.every((o) => approvalGates[o.id]) && 'text-primary'\n )}\n >\n All\n </button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">Toggle all approval gates</TooltipContent>\n </Tooltip>\n </div>\n\n {/* Git row */}\n <div className=\"border-input flex items-center gap-4 rounded-md border px-3 py-2.5\">\n <span className=\"text-muted-foreground w-16 shrink-0 text-xs font-semibold tracking-wider\">\n GIT\n </span>\n <div className=\"flex flex-1 items-center gap-4\">\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"push\"\n size=\"sm\"\n checked={push || openPr}\n onCheckedChange={(v) => {\n setPush(v);\n if (!v && openPr) setOpenPr(false);\n }}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"push\" className=\"cursor-pointer text-xs font-medium\">\n Push\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Push branch to remote after implementation.\n </TooltipContent>\n </Tooltip>\n <Tooltip>\n <TooltipTrigger asChild>\n <div className=\"flex cursor-pointer items-center gap-1.5\">\n <Switch\n id=\"open-pr\"\n size=\"sm\"\n checked={openPr}\n onCheckedChange={setOpenPr}\n disabled={isSubmitting}\n />\n <Label htmlFor=\"open-pr\" className=\"cursor-pointer text-xs font-medium\">\n PR\n </Label>\n </div>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n Open a pull request after pushing.\n </TooltipContent>\n </Tooltip>\n </div>\n </div>\n </div>\n </form>\n </TooltipProvider>\n </div>\n </BaseDrawer>\n );\n}\n\n/* ---------------------------------------------------------------------------\n * ParentFeatureCombobox — searchable dropdown for parent feature selection\n * ------------------------------------------------------------------------- */\n\ninterface ParentFeatureComboboxProps {\n features: ParentFeatureOption[];\n value: string | undefined;\n onChange: (id: string | undefined) => void;\n disabled?: boolean;\n}\n\nfunction ParentFeatureCombobox({\n features,\n value,\n onChange,\n disabled,\n}: ParentFeatureComboboxProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const selectedFeature = features.find((f) => f.id === value);\n\n const filtered = query.trim()\n ? features.filter(\n (f) =>\n f.name.toLowerCase().includes(query.toLowerCase()) ||\n f.id.toLowerCase().includes(query.toLowerCase())\n )\n : features;\n\n const handleSelect = useCallback(\n (id: string | undefined) => {\n onChange(id);\n setOpen(false);\n setQuery('');\n },\n [onChange]\n );\n\n useEffect(() => {\n if (open) {\n setTimeout(() => inputRef.current?.focus(), 0);\n } else {\n setQuery('');\n }\n }, [open]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n id=\"parent-feature\"\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-label=\"Parent Feature\"\n disabled={disabled}\n data-testid=\"parent-feature-combobox\"\n className={cn(\n 'border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n !selectedFeature && 'text-muted-foreground'\n )}\n >\n <span className=\"truncate\">\n {selectedFeature\n ? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`\n : 'Select parent feature...'}\n </span>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-80 p-0\"\n align=\"start\"\n data-testid=\"parent-feature-combobox-content\"\n >\n <div className=\"flex flex-col\">\n {/* Search input */}\n <div className=\"border-b p-2\">\n <Input\n ref={inputRef}\n placeholder=\"Search features...\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n className=\"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0\"\n data-testid=\"parent-feature-search\"\n />\n </div>\n\n {/* Options list */}\n <div className=\"max-h-48 overflow-y-auto py-1\" role=\"listbox\" aria-label=\"Features\">\n {/* No parent option */}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={value === undefined}\n onClick={() => handleSelect(undefined)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === undefined && 'bg-accent/50'\n )}\n data-testid=\"parent-feature-option-none\"\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== undefined && 'invisible')} />\n <span className=\"text-muted-foreground italic\">No parent</span>\n </button>\n\n {filtered.length === 0 && query ? (\n <p className=\"text-muted-foreground px-3 py-2 text-sm\">No features found.</p>\n ) : (\n filtered.map((f) => (\n <button\n key={f.id}\n type=\"button\"\n role=\"option\"\n aria-selected={value === f.id}\n onClick={() => handleSelect(f.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm',\n value === f.id && 'bg-accent/50'\n )}\n data-testid={`parent-feature-option-${f.id}`}\n >\n <CheckIcon className={cn('h-4 w-4 shrink-0', value !== f.id && 'invisible')} />\n <span className=\"truncate\">\n {f.name}{' '}\n <span className=\"text-muted-foreground font-mono text-xs\">\n ({f.id.slice(0, 8)})\n </span>\n </span>\n </button>\n ))\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n","'use client';\n\nimport { useState, useCallback, useEffect } from 'react';\nimport { useRouter, usePathname } from 'next/navigation';\nimport { toast } from 'sonner';\nimport { createFeature } from '@/app/actions/create-feature';\nimport { FeatureCreateDrawer } from '@/components/common/feature-create-drawer';\nimport type { FeatureCreatePayload } from '@/components/common/feature-create-drawer';\nimport type { ParentFeatureOption } from '@/components/common/feature-create-drawer/feature-create-drawer';\nimport type { WorkflowDefaults } from '@/app/actions/get-workflow-defaults';\n\nexport interface CreateDrawerClientProps {\n repositoryPath: string;\n initialParentId?: string;\n features: ParentFeatureOption[];\n workflowDefaults?: WorkflowDefaults;\n currentAgentType?: string;\n currentModel?: string;\n}\n\nexport function CreateDrawerClient({\n repositoryPath,\n initialParentId,\n features,\n workflowDefaults,\n currentAgentType,\n currentModel,\n}: CreateDrawerClientProps) {\n const router = useRouter();\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n // Derive open state from the URL. Next.js parallel routes preserve slot\n // content during soft navigation, so this component is NOT unmounted when\n // navigating to `/`. We watch the pathname and let Vaul handle the close\n // animation when the path no longer matches the create route.\n // When submitting, force the drawer closed immediately — router.push('/')\n // is async and the pathname may not update before the next render.\n const pathname = usePathname();\n const isOnCreateRoute = pathname.startsWith('/create');\n const isOpen = !isSubmitting && isOnCreateRoute;\n\n // Reset isSubmitting once the route has actually changed away from /create,\n // so the drawer can reopen on future visits. Without this, isSubmitting\n // would stay true forever since parallel routes preserve component state.\n useEffect(() => {\n if (!isOnCreateRoute && isSubmitting) {\n setIsSubmitting(false);\n }\n }, [isOnCreateRoute, isSubmitting]);\n\n const onClose = useCallback(() => {\n router.push('/');\n }, [router]);\n\n const onSubmit = useCallback(\n (data: FeatureCreatePayload) => {\n setIsSubmitting(true);\n\n // Close the drawer immediately for responsive UI\n router.push('/');\n\n // Server action Phase 1 returns fast with real feature ID (DB record created)\n // Phase 2 (metadata, worktree, agent) runs in background on server\n createFeature(data)\n .then((result) => {\n if (result.error) {\n toast.error(result.error);\n return;\n }\n // Dispatch event with real feature ID so control center adds it to featureMap\n window.dispatchEvent(\n new CustomEvent('shep:feature-created', {\n detail: {\n featureId: result.feature!.id,\n name: result.feature!.name,\n description: result.feature!.description,\n repositoryPath: result.feature!.repositoryPath,\n parentId: data.parentId,\n },\n })\n );\n })\n .catch(() => {\n toast.error('Failed to create feature');\n setIsSubmitting(false);\n });\n },\n [router]\n );\n\n return (\n <FeatureCreateDrawer\n open={isOpen}\n onClose={onClose}\n onSubmit={onSubmit}\n repositoryPath={repositoryPath}\n features={features}\n workflowDefaults={workflowDefaults}\n initialParentId={initialParentId}\n isSubmitting={isSubmitting}\n currentAgentType={currentAgentType}\n currentModel={currentModel}\n />\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n","import type { FileAttachment } from '@shepai/core/infrastructure/services/file-dialog.service';\n\n/**\n * Opens a native OS file picker dialog via API route.\n * Returns the selected files with metadata, or null if the user cancelled.\n */\nexport async function pickFiles(): Promise<FileAttachment[] | null> {\n const res = await fetch('/api/dialog/pick-files', { method: 'POST' });\n\n if (!res.ok) {\n throw new Error('Failed to open file dialog');\n }\n\n const data: { files: FileAttachment[] | null; cancelled: boolean } = await res.json();\n return data.cancelled ? null : data.files;\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n];\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Image = createLucideIcon('image', __iconNode);\n\nexport default Image;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'm7 15 5 5 5-5', key: '1hf1tw' }],\n ['path', { d: 'm7 9 5-5 5 5', key: 'sgt6xg' }],\n];\n\n/**\n * @component @name ChevronsUpDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyAxNSA1IDUgNS01IiAvPgogIDxwYXRoIGQ9Im03IDkgNS01IDUgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-up-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronsUpDown = createLucideIcon('chevrons-up-down', __iconNode);\n\nexport default ChevronsUpDown;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n];\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon('file', __iconNode);\n\nexport default File;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'm16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551',\n key: '1miecu',\n },\n ],\n];\n\n/**\n * @component @name Paperclip\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNi04LjQxNCA4LjU4NmEyIDIgMCAwIDAgMi44MjkgMi44MjlsOC40MTQtOC41ODZhNCA0IDAgMSAwLTUuNjU3LTUuNjU3bC04LjM3OSA4LjU1MWE2IDYgMCAxIDAgOC40ODUgOC40ODVsOC4zNzktOC41NTEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/paperclip\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Paperclip = createLucideIcon('paperclip', __iconNode);\n\nexport default Paperclip;\n","import type { LucideIcon } from 'lucide-react';\nimport { FileIcon, FileTextIcon, ImageIcon, CodeIcon, Trash2Icon, Loader2Icon } from 'lucide-react';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\n\nexport interface AttachmentCardProps {\n name: string;\n size: number;\n mimeType: string;\n onRemove: () => void;\n loading?: boolean;\n disabled?: boolean;\n /** Optional secondary text shown below the filename (e.g. file path). */\n subtitle?: string;\n}\n\nexport function AttachmentCard({\n name,\n size,\n mimeType: _mimeType,\n onRemove,\n loading = false,\n disabled = false,\n subtitle,\n}: AttachmentCardProps) {\n const ext = getExtension(name);\n const Icon = getFileIcon(ext);\n const iconColorClass = getFileIconColor(ext);\n\n return (\n <div className=\"flex items-center gap-3 rounded-md border p-2\">\n <div\n className={cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass)}\n >\n <Icon className=\"h-4 w-4\" />\n </div>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"truncate text-sm font-medium\">{name}</span>\n {subtitle ? (\n <span className=\"text-muted-foreground truncate text-xs\">{subtitle}</span>\n ) : null}\n <span className=\"text-muted-foreground text-xs\">\n {loading ? 'Uploading...' : formatFileSize(size)}\n </span>\n </div>\n {loading ? (\n <Loader2Icon className=\"text-muted-foreground h-4 w-4 animate-spin\" />\n ) : (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={onRemove}\n disabled={disabled}\n aria-label={`Remove ${name}`}\n >\n <Trash2Icon className=\"h-3 w-3\" />\n </Button>\n )}\n </div>\n );\n}\n\nfunction getExtension(filename: string): string {\n const dot = filename.lastIndexOf('.');\n return dot >= 0 ? filename.slice(dot).toLowerCase() : '';\n}\n\nconst IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);\nconst CODE_EXTS = new Set([\n '.ts',\n '.tsx',\n '.js',\n '.jsx',\n '.json',\n '.yaml',\n '.yml',\n '.xml',\n '.html',\n '.css',\n '.md',\n]);\n\nexport function getFileIcon(ext: string): LucideIcon {\n if (IMAGE_EXTS.has(ext)) return ImageIcon;\n if (ext === '.pdf') return FileTextIcon;\n if (CODE_EXTS.has(ext)) return CodeIcon;\n return FileIcon;\n}\n\nexport function getFileIconColor(ext: string): string {\n if (ext === '.pdf') return 'bg-red-50 text-red-600';\n if (IMAGE_EXTS.has(ext)) return 'bg-blue-50 text-blue-600';\n if (CODE_EXTS.has(ext)) return 'bg-emerald-50 text-emerald-600';\n return 'bg-gray-50 text-gray-600';\n}\n\nexport function formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 B';\n const units = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;\n}\n"],"names":[],"mappings":"wDGEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OHJwM,EAAA,EAAA,CAAA,CAAA,OAAsG,IAAM,EAAmC,CAAA,EAAA,EAAA,iBAAb,IAAa,AAAqB,EAAC,KAAxB,wCAAqE,EAAA,UAAU,CAAC,KAAK,EAAE,EAAA,gBAAgB,CAAC,kCSwB7b,IAAA,EAAA,CAAA,EAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAjB,AAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,uIAhB/C,GAGX,kBFQwC,CCZ/B,ACAA,AFY+B,CAAA,ACZ/B,ACAA,CFY+B,ACZ/B,ACAA,CAAA,ADAA,ADY+B,CEZ/B,ADAA,ADY+B,CEZ/B,ADAA,ADY+B,CEZ/B,ADAA,ADY+B,CCZ/B,ADY+B,AEZ/B,CAAA,ADAA,ADY+B,CAAA,AEZ/B,ADAA,CCA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,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CACC,KAAM,EACN,QAAS,EACT,SAAU,EACV,eAAgB,EAChB,SAAU,EACV,iBAAkB,EAClB,gBAAiB,EACjB,aAAc,EACd,iBAAkB,EAClB,aAAc,GAGpB","ignoreList":[6,7,8,9]}
@@ -0,0 +1,3 @@
1
+ module.exports=[94132,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",()=>b],94132)},3410,a=>{"use strict";let b=(0,a.i(25700).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",()=>b],3410)},76096,a=>{"use strict";let b=(0,a.i(25700).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);a.s(["default",()=>b])}];
2
+
3
+ //# sourceMappingURL=7f428_lucide-react_dist_esm_icons_9751e686._.js.map