@shepai/cli 1.202.1-pr606.60460ac → 1.202.2
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.
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +47 -47
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/control-center/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/control-center/page/server-reference-manifest.json +35 -35
- package/web/.next/server/app/(dashboard)/control-center/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/control-center/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +38 -38
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +47 -47
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agent-questions/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/agent-questions/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/agent-questions/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents/[agentType]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/agents/[agentType]/page/server-reference-manifest.json +13 -13
- package/web/.next/server/app/agents/[agentType]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/agents/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/agents/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/application/[id]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/application/[id]/supervisor/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/application/[id]/supervisor/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/application/[id]/supervisor/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/applications/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/applications/page/server-reference-manifest.json +20 -20
- package/web/.next/server/app/applications/page.js.nft.json +1 -1
- package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/features/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/features/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/onboarding/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/onboarding/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page/server-reference-manifest.json +16 -16
- package/web/.next/server/app/projects/[slug]/items/[itemId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/projects/[slug]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/pages/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/projects/[slug]/pages/page/server-reference-manifest.json +12 -12
- package/web/.next/server/app/projects/[slug]/pages/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/[slug]/settings/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/projects/[slug]/settings/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/projects/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/projects/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/settings/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/skills/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/supervisor/feature/[featureId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/supervisor/feature/[featureId]/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/supervisor/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/supervisor/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/supervisor/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/supervisor/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/supervisor/repo/[repositoryId]/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/supervisor/repo/[repositoryId]/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/supervisor/repo/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/tools/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/react-loadable-manifest.json +4 -4
- package/web/.next/server/app/version/page/server-reference-manifest.json +9 -9
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0af8610a._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0af8610a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b652a2f._.js +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__8b73253b._.js → [root-of-the-server]__2e388ba3._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__8b73253b._.js.map → [root-of-the-server]__2e388ba3._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__648730d4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a12d0ad7._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__52ca7f88._.js.map → [root-of-the-server]__a12d0ad7._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0741ee1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ea26ff90._.js +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ff0095e3._.js +1 -1
- package/web/.next/server/chunks/ssr/_07036593._.js +1 -1
- package/web/.next/server/chunks/ssr/_07036593._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0d2a7595._.js +1 -1
- package/web/.next/server/chunks/ssr/_0d2a7595._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_101de7c3._.js +1 -1
- package/web/.next/server/chunks/ssr/_101de7c3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_db111d21._.js → _10f54ace._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_db111d21._.js.map → _10f54ace._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_24fca3cf._.js +1 -1
- package/web/.next/server/chunks/ssr/_24fca3cf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_6ff832ad._.js → _2759af76._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_6ff832ad._.js.map → _2759af76._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_2bc48f3d._.js +1 -1
- package/web/.next/server/chunks/ssr/_2bc48f3d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_fb539286._.js → _2bef1982._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fb539286._.js.map → _2bef1982._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_32f66845._.js +1 -1
- package/web/.next/server/chunks/ssr/_408848e6._.js +1 -1
- package/web/.next/server/chunks/ssr/_408848e6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_40e02782._.js +1 -1
- package/web/.next/server/chunks/ssr/_40e02782._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_486d45d6._.js +1 -1
- package/web/.next/server/chunks/ssr/_486d45d6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_824d5772._.js → _498cba11._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_824d5772._.js.map → _498cba11._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5cbb0e22._.js +1 -1
- package/web/.next/server/chunks/ssr/_5cbb0e22._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_5a3edc88._.js → _673be4f1._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_5a3edc88._.js.map → _673be4f1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_7ba67729._.js +1 -1
- package/web/.next/server/chunks/ssr/_7ba67729._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_805ae1aa._.js +1 -1
- package/web/.next/server/chunks/ssr/_805ae1aa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_87cf18c3._.js +1 -1
- package/web/.next/server/chunks/ssr/_87cf18c3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_8a700ff4._.js +1 -1
- package/web/.next/server/chunks/ssr/_8a700ff4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_95b97274._.js +1 -1
- package/web/.next/server/chunks/ssr/_95b97274._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_fbcfaf3a._.js → _9d18d1b1._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fbcfaf3a._.js.map → _9d18d1b1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_70ff64a1._.js → _a93687e6._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_70ff64a1._.js.map → _a93687e6._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_c2e196ee._.js +1 -1
- package/web/.next/server/chunks/ssr/_c2e196ee._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ca3b7bf7._.js +1 -1
- package/web/.next/server/chunks/ssr/_ca3b7bf7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d53224a9._.js +1 -1
- package/web/.next/server/chunks/ssr/_d53224a9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_d573dcc2._.js +1 -1
- package/web/.next/server/chunks/ssr/_e2671e14._.js +1 -1
- package/web/.next/server/chunks/ssr/_e2671e14._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_ecd45b17._.js +1 -1
- package/web/.next/server/chunks/ssr/_ecd45b17._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_f0d45e47._.js → _f46d2018._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_f0d45e47._.js.map → _f46d2018._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_f602cc9f._.js +1 -1
- package/web/.next/server/chunks/ssr/_f602cc9f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_20a56008._.js → _f71954a5._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_20a56008._.js.map → _f71954a5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_40673f0c._.js → src_presentation_web_16c83ab4._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_40673f0c._.js.map → src_presentation_web_16c83ab4._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_246617fe._.js +3 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_e812a69b._.js → src_presentation_web_cb0d2c28._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_e812a69b._.js.map → src_presentation_web_cb0d2c28._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +111 -111
- package/web/.next/static/chunks/{5faa828877b1e669.js → 03dda23205877d8b.js} +1 -1
- package/web/.next/static/chunks/{4bf4f333302e24a4.js → 054e3a5f5ff4db71.js} +1 -1
- package/web/.next/static/chunks/{a868014dbe1b4e42.js → 06e58041911c290b.js} +1 -1
- package/web/.next/static/chunks/{b5ff852fee23795d.js → 089ef5b749d79ebd.js} +1 -1
- package/web/.next/static/chunks/{1a093b13a9d6952e.js → 0d106010c498c198.js} +2 -2
- package/web/.next/static/chunks/193e5a0540757f5e.js +1 -0
- package/web/.next/static/chunks/{9abc3e68af98e636.js → 25111a2f2597f500.js} +1 -1
- package/web/.next/static/chunks/285e724d07901ef6.js +1 -0
- package/web/.next/static/chunks/{3c396f63ebefe875.js → 2b2bfc0465b18a7d.js} +1 -1
- package/web/.next/static/chunks/{6af99a08ccacdbce.js → 2b436562e69d2827.js} +1 -1
- package/web/.next/static/chunks/{8c96a835b3b0dc44.js → 2e3844d0ac487ac7.js} +1 -1
- package/web/.next/static/chunks/325859b8a9482427.js +1 -0
- package/web/.next/static/chunks/{2773e7b2587bc9cc.js → 44ab458ceb89d85d.js} +1 -1
- package/web/.next/static/chunks/4fdf36904f5421a6.js +1 -0
- package/web/.next/static/chunks/59004c65d552581c.js +1 -0
- package/web/.next/static/chunks/{0edcdc8a2dd06b7a.js → 5c4837e88a3431b8.js} +1 -1
- package/web/.next/static/chunks/{a131f868af7f1f7c.js → 74cdd562eb663f72.js} +1 -1
- package/web/.next/static/chunks/{0315591c972888a6.js → 7670d76d4ee743e6.js} +1 -1
- package/web/.next/static/chunks/{02d88da9fd656fcd.js → 83fc784ce05a701e.js} +1 -1
- package/web/.next/static/chunks/{460cedaa85c821e7.js → 8dd4fdd20b103a66.js} +1 -1
- package/web/.next/static/chunks/9336bdc7fc319282.js +1 -0
- package/web/.next/static/chunks/9d285565922b2de7.js +1 -0
- package/web/.next/static/chunks/{45eeca36eabbed23.js → 9f7f2a11937d87eb.js} +1 -1
- package/web/.next/static/chunks/{c3931fdbae836be6.js → a7c7bcfb6f7696a3.js} +1 -1
- package/web/.next/static/chunks/{9f7985e2a73929a2.js → a8f57d2a12849f32.js} +1 -1
- package/web/.next/static/chunks/{0e1c933065a1100a.js → abe98954ccdf29db.js} +1 -1
- package/web/.next/static/chunks/{4378715fa2b5e7de.js → b05808da85e8b34c.js} +1 -1
- package/web/.next/static/chunks/{b5dc7979d66caa38.js → b5f83e5e1dad23d5.js} +1 -1
- package/web/.next/static/chunks/{6d2074fa3453d333.js → b8293a56f257e5a2.js} +1 -1
- package/web/.next/static/chunks/{bc5b87e4068ba11d.js → c61c5e97c76dc733.js} +1 -1
- package/web/.next/static/chunks/c6b411bf31744ca7.js +1 -0
- package/web/.next/static/chunks/{bdaa907bf3d1d932.js → c732d6cc4c5e4343.js} +1 -1
- package/web/.next/static/chunks/{25a200f055ae5cba.js → d214d6a670f48d79.js} +1 -1
- package/web/.next/static/chunks/{6901861cb53ab483.js → d7b17a93a26e97c8.js} +1 -1
- package/web/.next/static/chunks/{a0325f77bbccc63d.js → d8f14fac959a6bd0.js} +1 -1
- package/web/.next/static/chunks/{24ea54516dc249c0.js → d98912f5b6cf4938.js} +1 -1
- package/web/.next/static/chunks/{21500b3fe3754296.js → df79667c16344317.js} +1 -1
- package/web/.next/static/chunks/{05e8df10619fb980.js → ec8f19328ad1ecd4.js} +1 -1
- package/web/.next/static/chunks/{e6e6ba783b2e4d14.js → f0157331838ac962.js} +1 -1
- package/web/.next/static/chunks/{c687ed21b9518d73.js → f757d865fae71faf.js} +1 -1
- package/web/.next/static/chunks/fb3cbb7f575a7128.js +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__52ca7f88._.js +0 -3
- package/web/.next/static/chunks/03d7b81c2554d52f.js +0 -1
- package/web/.next/static/chunks/15acdaaea57bb459.js +0 -1
- package/web/.next/static/chunks/39fe1c1397d5483b.js +0 -1
- package/web/.next/static/chunks/495883829026f13f.js +0 -1
- package/web/.next/static/chunks/4b3a4f416a6eb1ac.js +0 -1
- package/web/.next/static/chunks/4b4160f36cf2a3d6.js +0 -1
- package/web/.next/static/chunks/7269537b2188650d.js +0 -1
- package/web/.next/static/chunks/b1534b2f3d814fef.js +0 -1
- package/web/.next/static/chunks/f6dc1ba364203bb2.js +0 -1
- /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_buildManifest.js +0 -0
- /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{My4IQDygZ4BFTXkkKanja → 9zd-B2rWybTaAgE74IKiK}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,338573,e=>{"use strict";let t=(0,e.i(903645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],338573)},730702,e=>{"use strict";let t=(0,e.i(903645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],730702)},602287,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(90033),r=e.i(860253),l=e.i(131777);let n=a.Dialog.Root,i=a.Dialog.Trigger,o=a.Dialog.Portal,c=a.Dialog.Close,d=s.forwardRef(({className:e,onClick:s,...r},n)=>(0,t.jsx)(a.Dialog.Overlay,{ref:n,className:(0,l.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),s?.(e)},...r}));d.displayName=a.Dialog.Overlay.displayName;let u=s.forwardRef(({className:e,children:s,...n},i)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(a.Dialog.Content,{ref:i,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...n,children:[s,(0,t.jsxs)(a.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=a.Dialog.Content.displayName;let p=({className:e,...s})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...s});p.displayName="DialogHeader";let f=({className:e,...s})=>(0,t.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});f.displayName="DialogFooter";let m=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(a.Dialog.Title,{ref:r,className:(0,l.cn)("text-lg leading-none font-semibold tracking-tight",e),...s}));m.displayName=a.Dialog.Title.displayName;let x=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)(a.Dialog.Description,{ref:r,className:(0,l.cn)("text-muted-foreground text-sm",e),...s}));x.displayName=a.Dialog.Description.displayName,e.s(["Dialog",()=>n,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>x,"DialogFooter",()=>f,"DialogHeader",()=>p,"DialogTitle",()=>m,"DialogTrigger",()=>i])},724042,e=>{"use strict";let t=(0,e.i(903645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],724042)},873504,634087,142896,481605,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(317406),r=e.i(508893);let l=(0,r.createServerReference)("40aa1efa0fed8941c16c9537ba0c5d988cf13fecaf",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),n=(0,r.createServerReference)("403a844cbb36e5d50051fe552f050ed35a8b88f317",r.callServer,void 0,r.findSourceMapURL,"deployRepository");e.s(["deployRepository",()=>n],634087);let i=(0,r.createServerReference)("40559cc32878be443a5d902e563fa65ac29566c575",r.callServer,void 0,r.findSourceMapURL,"deployApplication"),o=(0,r.createServerReference)("403c93928208c54fe25784ff60dcb073f25d1055c1",r.callServer,void 0,r.findSourceMapURL,"stopDeployment");e.s(["stopDeployment",()=>o],142896);let c=(0,r.createServerReference)("402a545f24583952d99d18566abf474dd10d07741b",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus");var d=e.i(118354);let u={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class p{entries=new Map;listeners=new Map;globalListeners=new Set;fullyHydrated=!1;isFullyHydrated(){return this.fullyHydrated}hydrate(e){let t=new Set;for(let s of e)t.add(s.targetId),this.update(s.targetId,{status:s.state,url:s.url,targetType:s.targetType,hydrated:!0});for(let[e,s]of this.entries)!t.has(e)&&s.hydrated&&null!==s.status?this.update(e,{status:null,url:null}):t.has(e)||s.hydrated||this.update(e,{hydrated:!0});this.fullyHydrated=!0}getEntry(e){return this.entries.get(e)??u}update(e,t){let s={...this.entries.get(e)??u,...t};this.entries.set(e,s),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let s=this.listeners.get(e);return s||(s=new Set,this.listeners.set(e,s)),s.add(t),()=>{s?.delete(t),s?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>p,"EMPTY_ENTRY",0,u],481605);let f=(0,d.createLogger)("[DeploymentStatusProvider]"),m=new Set([a.DeploymentState.Booting,a.DeploymentState.Ready]),x=(0,s.createContext)(null);function h({initialDeployments:e,children:r}){let d=(0,s.useRef)(null);d.current||(d.current=new p,d.current.hydrate(e));let u=d.current;(0,s.useEffect)(()=>{u.hydrate(e)},[e,u]);let h=(0,s.useRef)(new Map),g=(0,s.useCallback)(e=>{let t=h.current.get(e);t&&(clearInterval(t),h.current.delete(e))},[]),y=(0,s.useCallback)(e=>{if(h.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await c(e)}catch(t){f.warn(`poll failed for "${e}"`,t),u.setStatus(e,null),g(e);return}if(!t||t.state===a.DeploymentState.Stopped){u.setStatus(e,null),g(e);return}u.setStatus(e,t)},3e3);h.current.set(e,t)},[u,g]);(0,s.useEffect)(()=>{let e=h.current,t=u.subscribeAll(()=>{for(let[t]of e){let e=u.getEntry(t);e.status&&m.has(e.status)||g(t)}});return()=>{for(let[,s]of(t(),e))clearInterval(s);e.clear()}},[u,g]);let v=(0,s.useCallback)(e=>{if(e&&!u.getEntry(e).hydrated){if(u.isFullyHydrated())return void u.update(e,{hydrated:!0});u.update(e,{hydrated:!0}),(async()=>{try{let t=await c(e);u.setStatus(e,t),t&&m.has(t.state)&&y(e)}catch(t){f.warn(`ensureHydrated failed for "${e}"`,t)}})()}},[u,y]),b=(0,s.useCallback)(async e=>{u.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await l(e.targetId):"application"===e.targetType?await i(e.targetId):await n(e.repositoryPath);if(!t.success)return void u.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});u.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),y(e.targetId)}catch(s){let t=s instanceof Error?s.message:"An unexpected error occurred";u.update(e.targetId,{deployLoading:!1,deployError:t})}},[u,y]),j=(0,s.useCallback)(async e=>{if(e){u.update(e,{stopLoading:!0});try{(await o(e)).success?(g(e),u.update(e,{stopLoading:!1,status:null,url:null})):u.update(e,{stopLoading:!1})}catch(t){f.warn("stop error (non-critical)",t),u.update(e,{stopLoading:!1})}}},[u,g]),w=(0,s.useMemo)(()=>({store:u,deploy:b,stop:j,ensureHydrated:v}),[u,b,j,v]);return(0,t.jsx)(x.Provider,{value:w,children:r})}function g(){let e=(0,s.useContext)(x);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function y(){let e=(0,s.useContext)(x);return e||v}let v={store:new p,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>h,"useDeploymentStatusContext",()=>g,"useDeploymentStatusContextOptional",()=>y],873504)},8537,e=>{"use strict";var t=e.i(152155),s=e.i(873504);function a(){}function r(e){let{store:r,deploy:l,stop:n,ensureHydrated:i}=(0,s.useDeploymentStatusContextOptional)(),o=e?.targetId??"",c=(0,t.useCallback)(e=>o?r.subscribe(o,e):a,[r,o]),d=(0,t.useCallback)(()=>o?r.getEntry(o):r.getEntry(""),[r,o]),u=(0,t.useSyncExternalStore)(c,d,d);return(0,t.useEffect)(()=>{o&&i(o)},[o,i]),{deploy:(0,t.useCallback)(async()=>{e&&await l(e)},[l,e]),stop:(0,t.useCallback)(async()=>{o&&await n(o)},[n,o]),deployLoading:u.deployLoading,stopLoading:u.stopLoading,deployError:u.deployError,status:u.status,url:u.url}}e.s(["useDeployAction",()=>r])},511495,872714,81803,917466,199348,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(948249),r=e.i(724042),l=e.i(64970),n=e.i(294237),i=e.i(131777),o=e.i(83428),c=e.i(151251),d=e.i(735364),u=e.i(808361);function p({label:e,onClick:s,loading:a,error:r,icon:l,iconOnly:n=!1,variant:p="outline",size:f="sm"}){let m=(0,u.useSoundAction)("click");return(0,t.jsxs)(d.Button,{variant:p,size:f,"aria-label":e,disabled:a,onClick:()=>{m.play(),s()},className:(0,i.cn)("gap-1.5",r&&"text-destructive hover:text-destructive",!r&&n&&"ghost"===p&&"text-muted-foreground cursor-pointer rounded-full transition-colors hover:text-blue-500"),children:[a?(0,t.jsx)(o.Loader2,{className:"size-4 animate-spin"}):r?(0,t.jsx)(c.CircleAlert,{className:"size-4"}):(0,t.jsx)(l,{className:"size-4"}),n?null:e]})}e.s(["ActionButton",()=>p],872714),e.s([],81803);var f=e.i(730702),m=e.i(338573),x=e.i(317406),h=e.i(102828),g=e.i(602287),y=e.i(508893);let v=(0,y.createServerReference)("40e827f64795e580b75e126ddfefa3a9a722da877c",y.callServer,void 0,y.findSourceMapURL,"getDeploymentLogs");function b({open:e,onOpenChange:a,targetId:r}){let{logs:l,isConnected:n}=function(e){let[t,a]=(0,s.useState)([]),[r,l]=(0,s.useState)(!1),n=(0,s.useRef)(null),i=(0,s.useCallback)(()=>{n.current&&(n.current.close(),n.current=null),l(!1)},[]);return(0,s.useEffect)(()=>{if(!e){a([]),l(!1);return}v(e).then(e=>{e&&a(e)}).catch(()=>{});let t=new EventSource(`/api/deployment-logs?targetId=${e}`);return n.current=t,t.onopen=()=>{l(!0)},t.addEventListener("log",e=>{let t=JSON.parse(e.data);a(e=>[...e,t])}),t.onerror=()=>{l(!1)},()=>{t.close(),n.current=null}},[e,i]),{logs:t,isConnected:r}}(e?r:null);return(0,t.jsx)(j,{open:e,onOpenChange:a,logs:l,isConnected:n})}function j({open:e,onOpenChange:a,logs:r,isConnected:l}){let n=(0,s.useRef)(null),i=(0,s.useRef)(!0),o=(0,s.useCallback)(()=>{let e=n.current;e&&(i.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);return(0,s.useEffect)(()=>{i.current&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[r]),(0,t.jsx)(g.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(g.DialogContent,{className:"flex h-[calc(100vh-48px)] max-h-[calc(100vh-48px)] w-full max-w-[calc(100vw-48px)] flex-col gap-0 bg-zinc-950 p-0 text-zinc-100 sm:rounded-lg","aria-describedby":void 0,children:[(0,t.jsxs)(g.DialogHeader,{className:"flex flex-row items-center justify-between border-b border-zinc-800 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Terminal,{className:"h-4 w-4 text-zinc-400"}),(0,t.jsx)(g.DialogTitle,{className:"text-sm font-medium text-zinc-100",children:"Server Logs"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 pe-8",children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${l?"bg-green-500":"bg-zinc-500"}`}),(0,t.jsx)("span",{className:"text-xs text-zinc-400",children:l?"Connected":"Disconnected"})]})]}),(0,t.jsxs)("div",{ref:n,onScroll:o,className:"flex-1 overflow-auto p-4 font-mono text-sm leading-relaxed",children:[0===r.length?(0,t.jsx)("p",{className:"text-zinc-500",children:"Waiting for log output..."}):r.map(e=>(0,t.jsx)(w,{entry:e},`${e.timestamp}-${e.stream}-${e.line}`)),!l&&r.length>0&&(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-800 pt-2 text-zinc-500",children:"[Server stopped]"})]})]})})}function w({entry:e}){return(0,t.jsx)("div",{"data-stream":e.stream,className:"stderr"===e.stream?"text-red-400":"text-zinc-200",children:(0,t.jsx)("span",{className:"break-all whitespace-pre-wrap",children:e.line})})}let N="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-7 items-center justify-center rounded-[3px]";function k({status:e,url:a,targetId:r}){let[l,n]=(0,s.useState)(!1),i=r&&(e===x.DeploymentState.Booting||e===x.DeploymentState.Ready);switch(e){case x.DeploymentState.Booting:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1 pl-1",children:[(0,t.jsx)(o.Loader2,{className:"size-3 animate-spin text-blue-500"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Starting..."}),i?(0,t.jsx)(h.TooltipProvider,{delayDuration:300,children:(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:N,onClick:e=>{e.stopPropagation(),n(!0)},children:(0,t.jsx)(m.Terminal,{className:"size-3.5"})})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",className:"text-xs",children:"Server logs"})]})}):null]}),i?(0,t.jsx)(b,{open:l,onOpenChange:n,targetId:r}):null]});case x.DeploymentState.Ready:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex translate-y-px items-center gap-1 pl-1",children:[(0,t.jsx)("span",{className:"inline-block size-1.5 rounded-full bg-green-500"}),a?(0,t.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-[11px] text-green-600 hover:text-green-500 dark:text-green-400 dark:hover:text-green-300",onClick:e=>e.stopPropagation(),children:[a,(0,t.jsx)(f.ExternalLink,{className:"size-2.5 shrink-0"})]}):(0,t.jsx)("span",{className:"text-[11px] text-green-600 dark:text-green-400",children:"Ready"}),i?(0,t.jsx)(h.TooltipProvider,{delayDuration:300,children:(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"View server logs",className:N,onClick:e=>{e.stopPropagation(),n(!0)},children:(0,t.jsx)(m.Terminal,{className:"size-3.5"})})}),(0,t.jsx)(h.TooltipContent,{side:"bottom",className:"text-xs",children:"Server logs"})]})}):null]}),i?(0,t.jsx)(b,{open:l,onOpenChange:n,targetId:r}):null]});default:return null}}e.s(["DeploymentStatusBadge",()=>k],917466),e.s([],199348);var C=e.i(845811),S=e.i(425235);e.i(541001);var T=e.i(64780),D=e.i(8537),R=e.i(175921);let z=(0,n.cva)("",{variants:{size:{sm:"w-96",md:"w-2xl",lg:"w-[772px]"}},defaultVariants:{size:"sm"}});function I({open:e,onClose:r,modal:l=!1,dismissOnOutsideClick:n=!1,title:o="Drawer",size:c,header:d,children:u,footer:p,className:f,"data-testid":m,deployTarget:x}){let{i18n:h}=(0,T.useTranslation)(),g=(0,R.useFeatureFlags)(),y=(0,s.useRef)(null),v="rtl"===h.dir()?"left":"right";return(0,s.useEffect)(()=>{if(!e||l)return;let t=e=>{let t=e.target;!document.body.contains(t)||y.current?.contains(t)||t.closest(n?'[role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]':'[data-no-drawer-close], [role="alertdialog"], [role="dialog"], [role="menu"], [role="listbox"], [data-radix-popper-content-wrapper]')||r()};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)},[e,l,r,n]),(0,t.jsxs)(C.Drawer,{direction:v,modal:l,handleOnly:!0,open:e,onOpenChange:e=>{e||r()},children:[l?(0,t.jsx)(C.DrawerOverlay,{}):null,(0,t.jsxs)(C.DrawerContent,{ref:y,direction:v,showCloseButton:!1,className:(0,i.cn)(z({size:c}),"bg-white/85 backdrop-blur-xl dark:bg-neutral-800/85",f),"data-testid":m,onInteractOutside:l?void 0:e=>e.preventDefault(),children:[(0,t.jsx)(C.DrawerTitle,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:o})}),(0,t.jsx)(C.DrawerDescription,{asChild:!0,children:(0,t.jsx)("span",{className:"sr-only",children:o})}),(0,t.jsxs)("button",{type:"button","aria-label":"Close",onClick:r,className:"ring-offset-background focus:ring-ring absolute end-3 top-2 z-50 rounded-sm p-1 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden","data-testid":m?`${m}-close-button`:void 0,children:[(0,t.jsx)(a.XIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]}),d?(0,t.jsx)(C.DrawerHeader,{className:"shrink-0",children:d}):null,d?(0,t.jsx)(S.Separator,{}):null,g.envDeploy&&x?(0,t.jsx)(E,{deployTarget:x}):null,(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:u}),p?(0,t.jsx)(C.DrawerFooter,{className:"shrink-0",children:p}):null]})]})}function E({deployTarget:e}){let s=(0,D.useDeployAction)(e),a="Booting"===s.status||"Ready"===s.status;return(0,t.jsxs)("div",{"data-testid":"base-drawer-deploy-bar",className:"flex items-center gap-2 px-4 pt-3 pb-3",children:[(0,t.jsx)(h.TooltipProvider,{children:(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{children:(0,t.jsx)(p,{label:a?"Stop Dev Server":"Start Dev Server",onClick:a?s.stop:s.deploy,loading:s.deployLoading||s.stopLoading,error:!!s.deployError,icon:a?l.Square:r.Play,iconOnly:!0,variant:"outline",size:"icon-sm"})})}),(0,t.jsx)(h.TooltipContent,{children:a?"Stop Dev Server":"Start Dev Server"})]})}),a?(0,t.jsx)(k,{status:s.status,url:s.url,targetId:e.targetId}):null]})}e.s(["BaseDrawer",()=>I],511495)},468304,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(291967),r=e.i(922528),l=e.i(151080),n=e.i(685995),i=e.i(287620),o=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[p,f]=(0,r.createContextScope)(u,[l.createRovingFocusGroupScope]),m=(0,l.createRovingFocusGroupScope)(),[x,h]=p(u),g=s.forwardRef((e,s)=>{let{__scopeTabs:a,value:r,onValueChange:l,defaultValue:n,orientation:p="horizontal",dir:f,activationMode:m="automatic",...h}=e,g=(0,o.useDirection)(f),[y,v]=(0,c.useControllableState)({prop:r,onChange:l,defaultProp:n??"",caller:u});return(0,t.jsx)(x,{scope:a,baseId:(0,d.useId)(),value:y,onValueChange:v,orientation:p,dir:g,activationMode:m,children:(0,t.jsx)(i.Primitive.div,{dir:g,"data-orientation":p,...h,ref:s})})});g.displayName=u;var y="TabsList",v=s.forwardRef((e,s)=>{let{__scopeTabs:a,loop:r=!0,...n}=e,o=h(y,a),c=m(a);return(0,t.jsx)(l.Root,{asChild:!0,...c,orientation:o.orientation,dir:o.dir,loop:r,children:(0,t.jsx)(i.Primitive.div,{role:"tablist","aria-orientation":o.orientation,...n,ref:s})})});v.displayName=y;var b="TabsTrigger",j=s.forwardRef((e,s)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...c}=e,d=h(b,r),u=m(r),p=k(d.baseId,n),f=C(d.baseId,n),x=n===d.value;return(0,t.jsx)(l.Item,{asChild:!0,...u,focusable:!o,active:x,children:(0,t.jsx)(i.Primitive.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":f,"data-state":x?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:p,...c,ref:s,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(n)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(n)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;x||o||!e||d.onValueChange(n)})})})});j.displayName=b;var w="TabsContent",N=s.forwardRef((e,a)=>{let{__scopeTabs:r,value:l,forceMount:o,children:c,...d}=e,u=h(w,r),p=k(u.baseId,l),f=C(u.baseId,l),m=l===u.value,x=s.useRef(m);return s.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(n.Presence,{present:o||m,children:({present:s})=>(0,t.jsx)(i.Primitive.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!s,id:f,tabIndex:0,...d,ref:a,style:{...e.style,animationDuration:x.current?"0s":void 0},children:s&&c})})});function k(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}N.displayName=w,e.s(["Content",()=>N,"List",()=>v,"Root",()=>g,"Tabs",()=>g,"TabsContent",()=>N,"TabsList",()=>v,"TabsTrigger",()=>j,"Trigger",()=>j,"createTabsScope",()=>f],743133);var S=e.i(743133),S=S,T=e.i(131777);let D=S.Root,R=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(S.List,{ref:a,className:(0,T.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...s}));R.displayName=S.List.displayName;let z=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(S.Trigger,{ref:a,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...s}));z.displayName=S.Trigger.displayName;let I=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)(S.Content,{ref:a,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...s}));I.displayName=S.Content.displayName,e.s(["Tabs",()=>D,"TabsContent",()=>I,"TabsList",()=>R,"TabsTrigger",()=>z],468304)},435e3,e=>{"use strict";var t=e.i(980986);e.s(["CheckCircle2",()=>t.default])},295230,e=>{"use strict";let t=(0,e.i(903645).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"}]]);e.s(["default",()=>t])},495812,e=>{"use strict";let t=(0,e.i(903645).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",()=>t],495812)},949228,e=>{"use strict";let t=(0,e.i(903645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],949228)},723925,301012,e=>{"use strict";let t=(0,e.i(903645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],301012),e.s(["Check",()=>t],723925)},787342,e=>{"use strict";var t=e.i(152155),s=e.i(922528),a=e.i(205978),r=e.i(786874),l=e.i(679606);function n(e){let n=e+"CollectionProvider",[i,o]=(0,s.createContextScope)(n),[c,d]=i(n,{collectionRef:{current:null},itemMap:new Map}),u=e=>{let{scope:s,children:a}=e,r=t.default.useRef(null),n=t.default.useRef(new Map).current;return(0,l.jsx)(c,{scope:s,itemMap:n,collectionRef:r,children:a})};u.displayName=n;let p=e+"CollectionSlot",f=(0,r.createSlot)(p),m=t.default.forwardRef((e,t)=>{let{scope:s,children:r}=e,n=d(p,s),i=(0,a.useComposedRefs)(t,n.collectionRef);return(0,l.jsx)(f,{ref:i,children:r})});m.displayName=p;let x=e+"CollectionItemSlot",h="data-radix-collection-item",g=(0,r.createSlot)(x),y=t.default.forwardRef((e,s)=>{let{scope:r,children:n,...i}=e,o=t.default.useRef(null),c=(0,a.useComposedRefs)(s,o),u=d(x,r);return t.default.useEffect(()=>(u.itemMap.set(o,{ref:o,...i}),()=>void u.itemMap.delete(o))),(0,l.jsx)(g,{...{[h]:""},ref:c,children:n})});return y.displayName=x,[{Provider:u,Slot:m,ItemSlot:y},function(s){let a=d(e+"CollectionConsumer",s);return t.default.useCallback(()=>{let e=a.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(a.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[a.collectionRef,a.itemMap])},o]}var i=new WeakMap;function o(e,t){var s,a;let r,l,n;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let i=(s=e,a=t,r=s.length,(n=(l=c(a))>=0?l:r+l)<0||n>=r?-1:n);return -1===i?void 0:e[i]}function c(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],i.set(this,!0)}set(e,t){return i.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,s){let a,r=this.has(t),l=this.#e.length,n=c(e),i=n>=0?n:l+n,o=i<0||i>=l?-1:i;if(o===this.size||r&&o===this.size-1||-1===o)return this.set(t,s),this;let d=this.size+ +!r;n<0&&i++;let u=[...this.#e],p=!1;for(let e=i;e<d;e++)if(i===e){let l=u[e];u[e]===t&&(l=u[e+1]),r&&this.delete(t),a=this.get(l),this.set(t,s)}else{p||u[e-1]!==t||(p=!0);let s=u[p?e:e-1],r=a;a=this.get(s),this.delete(s),this.set(s,r)}return this}with(t,s,a){let r=new e(this);return r.insert(t,s,a),r}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a,t,s)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,s){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a+1,t,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let s=this.indexOf(e);if(-1===s)return;let a=s+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,t){let s=this.indexOf(e);if(-1===s)return;let a=s+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return a;s++}}findIndex(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return s;s++}return -1}filter(t,s){let a=[],r=0;for(let e of this)Reflect.apply(t,s,[e,r,this])&&a.push(e),r++;return new e(a)}map(t,s){let a=[],r=0;for(let e of this)a.push([e[0],Reflect.apply(t,s,[e,r,this])]),r++;return new e(a)}reduce(...e){let[t,s]=e,a=0,r=s??this.at(0);for(let s of this)r=0===a&&1===e.length?s:Reflect.apply(t,this,[r,s,a,this]),a++;return r}reduceRight(...e){let[t,s]=e,a=s??this.at(-1);for(let s=this.size-1;s>=0;s--){let r=this.at(s);a=s===this.size-1&&1===e.length?r:Reflect.apply(t,this,[a,r,s,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let s=this.keyAt(e),a=this.get(s);t.set(s,a)}return t}toSpliced(...t){let s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){let a=new e,r=this.size-1;if(void 0===t)return a;t<0&&(t+=this.size),void 0!==s&&s>0&&(r=s-1);for(let e=t;e<=r;e++){let t=this.keyAt(e),s=this.get(t);a.set(t,s)}return a}every(e,t){let s=0;for(let a of this){if(!Reflect.apply(e,t,[a,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(let a of this){if(Reflect.apply(e,t,[a,s,this]))return!0;s++}return!1}}),e.s(["createCollection",()=>n])},151080,e=>{"use strict";var t=e.i(152155),s=e.i(291967),a=e.i(787342),r=e.i(205978),l=e.i(922528),n=e.i(713123),i=e.i(287620),o=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),p="rovingFocusGroup.onEntryFocus",f={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[x,h,g]=(0,a.createCollection)(m),[y,v]=(0,l.createContextScope)(m,[g]),[b,j]=y(m),w=t.forwardRef((e,t)=>(0,u.jsx)(x.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(x.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));w.displayName=m;var N=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:l,orientation:n,loop:x=!1,dir:g,currentTabStopId:y,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:j,onEntryFocus:w,preventScrollOnEntryFocus:N=!1,...k}=e,C=t.useRef(null),S=(0,r.useComposedRefs)(a,C),D=(0,d.useDirection)(g),[R,z]=(0,c.useControllableState)({prop:y,defaultProp:v??null,onChange:j,caller:m}),[I,E]=t.useState(!1),L=(0,o.useCallbackRef)(w),A=h(l),M=t.useRef(!1),[P,F]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(p,L),()=>e.removeEventListener(p,L)},[L]),(0,u.jsx)(b,{scope:l,orientation:n,dir:D,loop:x,currentTabStopId:R,onItemFocus:t.useCallback(e=>z(e),[z]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,u.jsx)(i.Primitive.div,{tabIndex:I||0===P?-1:0,"data-orientation":n,...k,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,()=>{M.current=!0}),onFocus:(0,s.composeEventHandlers)(e.onFocus,e=>{let t=!M.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(p,f);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),N)}}M.current=!1}),onBlur:(0,s.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),k="RovingFocusGroupItem",C=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:r,focusable:l=!0,active:o=!1,tabStopId:c,children:d,...p}=e,f=(0,n.useId)(),m=c||f,g=j(k,r),y=g.currentTabStopId===m,v=h(r),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:N}=g;return t.useEffect(()=>{if(l)return b(),()=>w()},[l,b,w]),(0,u.jsx)(x.ItemSlot,{scope:r,id:m,focusable:l,active:o,children:(0,u.jsx)(i.Primitive.span,{tabIndex:y?0:-1,"data-orientation":g.orientation,...p,ref:a,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{l?g.onItemFocus(m):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,s){var a;let r=(a=e.key,"rtl"!==s?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return S[r]}(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){var s,a;"prev"===t&&r.reverse();let l=r.indexOf(e.currentTarget);r=g.loop?(s=r,a=l+1,s.map((e,t)=>s[(a+t)%s.length])):r.slice(l+1)}setTimeout(()=>T(r))}}),children:"function"==typeof d?d({isCurrentTabStop:y,hasTabStop:null!=N}):d})})});C.displayName=k;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let s=document.activeElement;for(let a of e)if(a===s||(a.focus({preventScroll:t}),document.activeElement!==s))return}e.s(["Item",()=>C,"Root",()=>w,"createRovingFocusGroupScope",()=>v])},681181,e=>{"use strict";var t=e.i(295230);e.s(["Download",()=>t.default])},993192,e=>{"use strict";let t=(0,e.i(903645).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",()=>t],993192)},483902,e=>{"use strict";let t=(0,e.i(903645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],483902)},909388,e=>{"use strict";let t=(0,e.i(903645).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",()=>t],909388)},144412,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(181975),r=e.i(468304),l=e.i(131777),n=e.i(83428),i=e.i(483902),o=e.i(681181),c=e.i(909388),d=e.i(338573),u=e.i(949228),p=e.i(954277),f=e.i(495812),m=e.i(435e3),x=e.i(993192),h=e.i(735364),g=e.i(102828),y=e.i(433548),v=e.i(723925),b=e.i(730702),j=e.i(511495);let w={linux:"Linux",darwin:"macOS",win32:"Windows"},N={ide:{label:"IDE",icon:c.Monitor},"cli-agent":{label:"CLI Agent",icon:d.Terminal},vcs:{label:"VCS",icon:u.GitBranch},terminal:{label:"Terminal",icon:d.Terminal}};function k({status:e}){return"available"===e?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-100 px-2 py-0.5 text-xs font-medium text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400",children:[(0,t.jsx)(v.Check,{className:"h-3 w-3"}),"Installed"]}):"error"===e?(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-red-100 px-2 py-0.5 text-xs font-medium text-red-700 dark:bg-red-900/30 dark:text-red-400",children:"Error"}):(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",children:"Missing"})}function C({tool:e,open:a,onClose:r,onRefresh:l,autoStart:d}){let[u,p]=(0,s.useState)(!1),[f,m]=(0,s.useState)(!1),{logs:g,status:C,startInstall:S}=function(e){let[t,a]=(0,s.useState)([]),[r,l]=(0,s.useState)("idle"),[n,i]=(0,s.useState)(null),o=(0,s.useRef)(null),c=(0,s.useCallback)(()=>{o.current&&(o.current.close(),o.current=null)},[]);return(0,s.useEffect)(()=>c,[c]),{logs:t,status:r,result:n,startInstall:(0,s.useCallback)(()=>{c(),a([]),i(null),l("streaming");let t=new EventSource(`/api/tools/${e}/install/stream`);o.current=t,t.onmessage=e=>{a(t=>[...t,e.data])},t.addEventListener("done",e=>{let t=JSON.parse(e.data);i(t),l("error"===t.status?"error":"done"),c()}),t.onerror=()=>{l("error"),c()}},[e,c])}}(e.id),T=(0,s.useRef)(null),D=(0,s.useRef)(!0),R=(0,s.useRef)(!1),z="available"===e.status.status,I="error"===e.status.status,E=z&&!!e.openDirectory,L=!z&&!I&&e.autoInstall;async function A(){m(!0);try{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})}finally{m(!1)}}(0,s.useEffect)(()=>{a&&d&&L&&"idle"===C&&!R.current&&(R.current=!0,S()),a||(R.current=!1)},[a,d,L,C,S]);let M=(0,s.useCallback)(()=>{let e=T.current;e&&(D.current=e.scrollTop+e.clientHeight>=e.scrollHeight-50)},[]);(0,s.useEffect)(()=>{D.current&&T.current&&(T.current.scrollTop=T.current.scrollHeight)},[g,C]),(0,s.useEffect)(()=>{"done"===C&&l&&l()},[C,l]);let P=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 pe-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:24,height:24,className:"shrink-0 dark:invert"}):(0,t.jsx)(x.Package,{className:"text-muted-foreground h-6 w-6 shrink-0"}),(0,t.jsx)("h2",{className:"text-base font-bold",children:e.name}),(0,t.jsx)(k,{status:e.status.status})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:e.tags.map(e=>{let s=N[e]??{label:e,icon:c.Monitor},a=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[10px]",children:[(0,t.jsx)(a,{className:"h-3 w-3"}),s.label]},e)})})]});return(0,t.jsx)(j.BaseDrawer,{open:a,onClose:r,size:"md",modal:!0,title:e.name,header:P,"data-testid":"tool-detail-drawer",children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:e.description}),e.author||e.platforms?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs",children:[e.author?(0,t.jsxs)("span",{className:"text-muted-foreground",children:["by"," ",e.website?(0,t.jsx)("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:underline",children:e.author}):(0,t.jsx)("span",{className:"text-foreground",children:e.author})]}):null,e.platforms&&e.platforms.length>0?(0,t.jsx)("span",{className:"text-muted-foreground",children:e.platforms.map(e=>w[e]??e).join(" · ")}):null]}):null,e.installCommand?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install command"}),(0,t.jsxs)("div",{className:"relative rounded-md bg-zinc-900 text-zinc-100",children:[(0,t.jsx)("pre",{className:"overflow-x-auto px-3 py-2.5 pe-16 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap",children:(0,t.jsx)("code",{children:e.installCommand})}),(0,t.jsxs)(h.Button,{variant:"ghost",size:"sm",className:"absolute top-1.5 right-1.5 h-7 cursor-pointer px-2 text-zinc-400 hover:text-zinc-100",onClick:function(){e.installCommand&&navigator.clipboard.writeText(e.installCommand).then(()=>{p(!0),setTimeout(()=>p(!1),2e3)})},"aria-label":u?"Copied!":"Copy install command",children:[u?(0,t.jsx)(v.Check,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(y.Copy,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"ms-1 text-[10px]",children:u?"Copied!":"Copy"})]})]})]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[L?(0,t.jsxs)(h.Button,{size:"sm",onClick:S,disabled:"streaming"===C,"aria-label":`Install ${e.name}`,className:"cursor-pointer",children:["streaming"===C?(0,t.jsx)(n.Loader2,{className:"me-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(o.Download,{className:"me-1.5 h-3.5 w-3.5"}),"streaming"===C?"Installing...":"Install"]}):null,E?(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",onClick:()=>void A(),disabled:f,"aria-label":`Launch ${e.name}`,className:"cursor-pointer",children:[f?(0,t.jsx)(n.Loader2,{className:"me-1.5 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(i.Rocket,{className:"me-1.5 h-3.5 w-3.5"}),"Launch"]}):null,e.documentationUrl?(0,t.jsx)(h.Button,{variant:"outline",size:"sm",className:"cursor-pointer",asChild:!0,children:(0,t.jsxs)("a",{href:e.documentationUrl,target:"_blank",rel:"noopener noreferrer",children:["Docs",(0,t.jsx)(b.ExternalLink,{className:"ms-1 h-3 w-3"})]})}):null]}),("streaming"===C||"done"===C||"error"===C)&&g.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs font-semibold tracking-wide uppercase",children:"Install log"}),(0,t.jsxs)("div",{ref:T,onScroll:M,className:"max-h-60 overflow-auto rounded-md bg-zinc-900 p-3 font-mono text-xs leading-relaxed text-zinc-100","data-testid":"tool-install-log",children:[g.map((e,s)=>(0,t.jsx)("div",{className:"break-all whitespace-pre-wrap",children:e},s)),"done"===C?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-emerald-400",children:"Installation complete"}):null,"error"===C?(0,t.jsx)("div",{className:"mt-2 border-t border-zinc-700 pt-2 text-red-400",children:"Installation failed"}):null]})]}):null]})})}let S={ide:{label:"IDE",icon:c.Monitor},"cli-agent":{label:"CLI Agent",icon:d.Terminal},vcs:{label:"VCS",icon:u.GitBranch},terminal:{label:"Terminal",icon:d.Terminal}};function T({tool:e,onRefresh:a,className:r}){let[d,u]=(0,s.useState)(!1),[y,v]=(0,s.useState)(!1),[b,j]=(0,s.useTransition)(),w="available"===e.status.status,N="error"===e.status.status,k=w&&!!e.openDirectory;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{"data-testid":"tool-card",onClick:function(){v(!1),u(!0)},className:(0,l.cn)("bg-card group flex h-30 w-full cursor-pointer flex-col rounded-lg border p-3 transition-shadow hover:shadow-md",r),children:[(0,t.jsxs)("div",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[e.iconUrl?(0,t.jsx)("img",{src:e.iconUrl,alt:"",width:20,height:20,className:"shrink-0 dark:invert"}):(0,t.jsx)(x.Package,{className:"text-muted-foreground h-5 w-5 shrink-0"}),(0,t.jsx)("h3",{"data-testid":"tool-card-name",className:"truncate text-sm font-bold",children:e.name})]}),(0,t.jsx)("div",{"data-testid":"tool-card-tags",className:"flex shrink-0 items-center gap-1",children:e.tags.map(e=>{let s=S[e]??{label:e,icon:c.Monitor},a=s.icon;return(0,t.jsxs)("span",{className:"text-muted-foreground/70 inline-flex items-center gap-0.5 text-[9px]",children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5"}),s.label]},e)})})]}),(0,t.jsx)("p",{"data-testid":"tool-card-summary",className:"text-muted-foreground mt-1 truncate text-xs",children:e.summary}),(0,t.jsxs)("div",{className:"mt-auto flex items-center justify-between pt-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N&&"error"===e.status.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 truncate text-[10px] text-red-600 dark:text-red-400",title:e.status.errorMessage,children:[(0,t.jsx)(p.CircleX,{className:"h-3 w-3 shrink-0"}),e.status.errorMessage??"Error"]}):w?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)(m.CheckCircle2,{className:"h-3 w-3"}),"Installed"]}):(0,t.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1 text-[10px]",children:[(0,t.jsx)(f.Circle,{className:"h-3 w-3"}),"Not installed"]}),e.required?(0,t.jsx)(g.TooltipProvider,{children:(0,t.jsxs)(g.Tooltip,{children:[(0,t.jsx)(g.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"rounded bg-amber-100 px-1.5 py-0.5 text-[9px] font-medium text-amber-700 dark:bg-amber-900/50 dark:text-amber-400",children:"Required"})}),(0,t.jsx)(g.TooltipContent,{side:"top",children:"This tool is required for Shep to function properly"})]})}):null]}),(0,t.jsx)("div",{className:"flex items-center gap-1",children:w&&k?(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",onClick:function(t){t.stopPropagation(),j(async()=>{await fetch(`/api/tools/${e.id}/launch`,{method:"POST"})})},disabled:b,"aria-label":`Launch ${e.name}`,"data-testid":"tool-card-launch-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[b?(0,t.jsx)(n.Loader2,{className:"me-1 h-3 w-3 animate-spin"}):(0,t.jsx)(i.Rocket,{className:"me-1 h-3 w-3"}),"Launch"]}):w||N?null:(0,t.jsxs)(h.Button,{size:"sm",variant:"default",onClick:function(t){t.stopPropagation(),v(e.autoInstall),u(!0)},"aria-label":`Install ${e.name}`,"data-testid":"tool-card-install-button",className:"h-7 cursor-pointer rounded-md px-3 text-xs",children:[(0,t.jsx)(o.Download,{className:"me-1 h-3 w-3"}),"Install"]})})]})]}),(0,t.jsx)(C,{tool:e,open:d,onClose:()=>u(!1),onRefresh:a,autoStart:y})]})}let D={all:()=>!0,ide:e=>e.tags.includes("ide"),"cli-agent":e=>e.tags.includes("cli-agent"),vcs:e=>e.tags.includes("vcs"),terminal:e=>e.tags.includes("terminal")};function R({tools:e,className:n}){let[i,o]=(0,s.useState)(e),[c,d]=(0,s.useState)("all"),u=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/tools");if(e.ok){let t=await e.json();o(t)}}catch{}},[]),p=i.filter(D[c]);return(0,t.jsxs)("div",{"data-testid":"tools-page-client",className:(0,l.cn)("space-y-4",n),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.Wrench,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Tools"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[i.filter(e=>"available"===e.status.status).length,"/",i.length," installed"]})]}),(0,t.jsxs)(r.Tabs,{value:c,onValueChange:e=>d(e),"data-testid":"tools-page-tabs",children:[(0,t.jsxs)(r.TabsList,{className:"h-7",children:[(0,t.jsx)(r.TabsTrigger,{value:"all","data-testid":"tools-tab-all",className:"px-2.5 text-xs",children:"All"}),(0,t.jsx)(r.TabsTrigger,{value:"ide","data-testid":"tools-tab-ide",className:"px-2.5 text-xs",children:"IDEs"}),(0,t.jsx)(r.TabsTrigger,{value:"cli-agent","data-testid":"tools-tab-cli-agent",className:"px-2.5 text-xs",children:"CLI Agents"}),(0,t.jsx)(r.TabsTrigger,{value:"vcs","data-testid":"tools-tab-vcs",className:"px-2.5 text-xs",children:"Version Control"}),(0,t.jsx)(r.TabsTrigger,{value:"terminal","data-testid":"tools-tab-terminal",className:"px-2.5 text-xs",children:"Terminals"})]}),(0,t.jsx)(r.TabsContent,{value:c,className:"mt-3",children:0===p.length?(0,t.jsxs)("div",{"data-testid":"tools-page-empty",className:"text-muted-foreground flex flex-col items-center justify-center py-12 text-center",children:[(0,t.jsx)(a.Wrench,{className:"mb-2 h-6 w-6 opacity-20"}),(0,t.jsx)("p",{className:"text-xs",children:"No tools in this category."})]}):(0,t.jsx)("div",{"data-testid":"tools-page-grid",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:p.map(e=>(0,t.jsx)(T,{tool:e,onRefresh:u},e.id))})})]})]})}e.s(["ToolsPageClient",()=>R],144412)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),r=e.i(131777);let n=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:a,...s}){return(0,t.jsx)("div",{className:(0,r.cn)(n({variant:a}),e),...s})}e.s(["Badge",()=>s])},951911,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),n=e.i(205978),s=e.i(922528),i=e.i(936589),o=e.i(23405),l=e.i(277624),d=e.i(287620),c="Switch",[u,h]=(0,s.createContextScope)(c),[p,m]=u(c),f=a.forwardRef((e,s)=>{let{__scopeSwitch:o,name:l,checked:u,defaultChecked:h,required:m,disabled:f,value:x="on",onCheckedChange:g,form:y,...j}=e,[w,k]=a.useState(null),N=(0,n.useComposedRefs)(s,e=>k(e)),S=a.useRef(!1),C=!w||y||!!w.closest("form"),[D,E]=(0,i.useControllableState)({prop:u,defaultProp:h??!1,onChange:g,caller:c});return(0,t.jsxs)(p,{scope:o,checked:D,disabled:f,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":D,"aria-required":m,"data-state":v(D),"data-disabled":f?"":void 0,disabled:f,value:x,...j,ref:N,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{E(e=>!e),C&&(S.current=e.isPropagationStopped(),S.current||e.stopPropagation())})}),C&&(0,t.jsx)(b,{control:w,bubbles:!S.current,name:l,value:x,checked:D,required:m,disabled:f,form:y,style:{transform:"translateX(-100%)"}})]})});f.displayName=c;var x="SwitchThumb",g=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...n}=e,s=m(x,r);return(0,t.jsx)(d.Primitive.span,{"data-state":v(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:a})});g.displayName=x;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:i=!0,...d},c)=>{let u=a.useRef(null),h=(0,n.useComposedRefs)(u,c),p=(0,o.usePrevious)(s),m=(0,l.useSize)(r);return a.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(p!==s&&t){let a=new Event("click",{bubbles:i});t.call(e,s),e.dispatchEvent(a)}},[p,s,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:h,style:{...d.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>f,"Switch",()=>f,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>h],595291);var y=e.i(595291),y=y,j=e.i(131777);function w({className:e,size:a="default",...r}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":a,className:(0,j.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...r,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,j.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]")})})}e.s(["Switch",()=>w],951911)},283843,e=>{"use strict";let t=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],283843)},731463,e=>{"use strict";let t=(0,e.i(903645).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",()=>t],731463)},454793,207729,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({icon:e,title:r,description:n,action:s,className:i,...o}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...o,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r}),n?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:n}):null,s?(0,t.jsx)("div",{className:"mt-2",children:s}):null]})}e.s(["EmptyState",()=>r],207729),e.s([],454793)},809443,185871,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({title:e,description:r,children:n,className:s}){return(0,t.jsxs)("header",{className:(0,a.cn)("flex items-center justify-between gap-4",s),children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),r?(0,t.jsx)("p",{className:"text-muted-foreground",children:r}):null]}),n?(0,t.jsx)("div",{"data-slot":"actions",children:n}):null]})}e.s(["PageHeader",()=>r],185871),e.s([],809443)},440106,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(711719),n=e.i(935946),s=e.i(83428),i=e.i(542049),o=e.i(453360),l=e.i(941698),d=e.i(99105),c=e.i(723925),u=e.i(860253);e.i(541001);var h=e.i(64780),p=e.i(131777),m=e.i(508893);let f=(0,m.createServerReference)("40ba17f62f174f4f88aa0ea4a373db347247ae1171",m.callServer,void 0,m.findSourceMapURL,"createProjectAndFeature"),x=(0,m.createServerReference)("40f744f8f8785a86cc8dc9487da8d64ca353d264af",m.callServer,void 0,m.findSourceMapURL,"createApplication");var g=e.i(283237),b=e.i(41413);e.i(650032);var v=e.i(486254);e.i(692233);var y=e.i(210025),j=e.i(102828),w=e.i(470646),k=e.i(731151);let N=["application","fast","spec"],S={application:{icon:i.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:o.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:l.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function C({onRepositorySelect:e,onApplicationCreated:i,onClose:o,className:l}){let{t:m}=(0,h.useTranslation)("web"),[C,D]=(0,a.useState)(""),[E,R]=(0,a.useState)(void 0),[P,M]=(0,a.useState)(void 0);(0,a.useEffect)(()=>{(0,g.getDefaultAgentAndModel)().then(e=>{R(t=>t??e.agentType),M(t=>t??e.model)})},[]);let[z,A]=(0,a.useState)("application"),[F,T]=(0,a.useState)(!1),[L,_]=(0,a.useState)(null),[O,B]=(0,a.useState)(!1),H=(0,a.useRef)(null),I=(0,k.useAttachments)(),U=!!e,$=U?z:"application",K=(0,a.useCallback)(()=>{A(e=>{let t=N.indexOf(e);return N[(t+1)%N.length]})},[]);(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&o&&o(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),K())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[o,K,e]);let q=(0,a.useCallback)(async()=>{if(C.trim()&&!F){T(!0),_(null);try{if("application"!==$&&e){let t=await f({description:C.trim(),attachments:I.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:E,model:P,fast:"fast"===$});if(t.error){_(t.error),T(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}else{let e=await x({description:C.trim(),agentType:E,modelOverride:P,initialPrompt:C.trim()});if(e.error){_(e.error),T(!1);return}e.application&&i?.(e.application.id)}}catch{_("Something went wrong. Please try again."),T(!1)}}},[C,F,$,I.completedAttachments,E,P,e,i]),Z=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),q())},[q]),V=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let a=await t.json();I.addAttachment(a)}}catch{}},[I.addAttachment]),X=(0,a.useCallback)(e=>{D(e),H.current?.focus()},[]),G=S[$],J=G.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,p.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",l),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),o?(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(y.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>B(!0),onBlur:()=>B(!1),onDragEnter:I.handleDragEnter,onDragLeave:I.handleDragLeave,onDragOver:I.handleDragOver,onDrop:I.handleDrop,className:(0,p.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",O&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",I.isDragOver&&"border-primary/50 bg-primary/5",F&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:H,rows:2,autoFocus:!0,value:C,onChange:e=>D(e.target.value),onKeyDown:Z,onPaste:I.handlePaste,placeholder:G.placeholder,disabled:F,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),I.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:I.attachments.map(e=>(0,t.jsx)(v.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>I.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>I.updateNotes(e.id,t)},e.id))}):null,I.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:I.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(b.AgentModelPicker,{initialAgentType:E??"",initialModel:P??"",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{R(e),M(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),U?(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)(J,{className:"h-3.5 w-3.5"}),G.label]},$),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:N.map(e=>{let a=S[e],r=a.icon,n=$===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>A(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:a.label}),n?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:V,disabled:F,"aria-label":m("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(n.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(j.TooltipContent,{side:"top",children:m("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:q,disabled:!C.trim()||F,className:(0,p.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:F?(0,t.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(r.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),L?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:L}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:G.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>X(e),disabled:F,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},$)]})]})}e.s(["ControlCenterEmptyState",()=>C],440106)},998798,e=>{"use strict";let t=(0,e.i(903645).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],998798)},13322,961201,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(276016);let n=(0,e.i(903645).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var s=e.i(619933),i=e.i(83428),o=e.i(998798),l=e.i(360112),d=e.i(602287),c=e.i(735364),u=e.i(835340);async function h(e){let t=new URLSearchParams;e&&t.set("path",e);let a=await fetch(`/api/directory/list?${t.toString()}`);if(!a.ok)throw Error((await a.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return a.json()}function p({currentPath:e,isEditing:n,onToggleEdit:s,onNavigate:i}){let l=(0,a.useRef)(null),[d,c]=(0,a.useState)(e);function u(){c(e),s()}(0,a.useEffect)(()=>{c(e)},[e]),(0,a.useEffect)(()=>{n&&l.current&&(l.current.focus(),l.current.select())},[n]);let h=function(e){if(!e)return[];let t=/^[a-zA-Z]:/.test(e),a=t?"\\":"/",r=e.split(/[\\/]/).filter(Boolean),n=[];for(let e=0;e<r.length;e++){let s=t?r.slice(0,e+1).join(a):a+r.slice(0,e+1).join(a);n.push({label:r[e],path:s})}return n}(e),p=h.length>3,m=p?h.slice(-3):h;return(0,t.jsxs)("div",{className:"border-b px-4 py-3",children:[(0,t.jsx)("h2",{className:"text-foreground mb-2.5 text-sm font-semibold tracking-[-0.01em]",children:"Select Folder"}),n?(0,t.jsx)("input",{ref:l,type:"text",value:d,onChange:e=>c(e.target.value),onKeyDown:e=>{if("Enter"===e.key){let t;e.preventDefault(),(t=d.trim())&&i(t)}"Escape"===e.key&&(e.preventDefault(),u())},onBlur:u,className:"bg-muted/60 border-border focus:ring-ring/20 focus:border-ring w-full rounded-lg border px-3 py-2 font-mono text-xs transition-all outline-none focus:ring-2",placeholder:"Type a path and press Enter...",spellCheck:!1,autoComplete:"off"}):(0,t.jsxs)("div",{className:"bg-muted/40 flex items-center gap-1 rounded-lg px-2.5 py-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>i("/"),className:"text-muted-foreground hover:text-foreground hover:bg-background shrink-0 rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:"/"}),p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/40 font-mono text-xs",children:"..."})]}):null,m.map((e,a)=>{let n=a===m.length-1;return(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3"}),n?(0,t.jsx)("span",{className:"bg-primary/10 text-primary rounded px-2 py-0.5 font-mono text-xs font-medium",children:e.label}):(0,t.jsx)("button",{type:"button",onClick:()=>i(e.path),className:"text-muted-foreground hover:text-foreground hover:bg-background rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:e.label})]},e.path)}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"text-muted-foreground/40 hover:text-foreground hover:bg-background shrink-0 rounded p-1 transition-colors","aria-label":"Edit path",children:(0,t.jsx)(o.Pencil,{className:"h-3 w-3"})})]})]})}function m({open:e,onOpenChange:o,onSelect:m,initialPath:f}){let[x,g]=(0,a.useState)([]),[b,v]=(0,a.useState)(""),[y,j]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),N=(0,a.useRef)(!1),[S,C]=(0,a.useState)(0),D=(0,a.useCallback)(async e=>{j(!0),k(!1);try{let t=await h(e);g(t.entries),v(t.currentPath),C(e=>e+1)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{j(!1)}},[]);function E(e){D(e)}function R(){m(null),o(!1)}return(0,a.useEffect)(()=>{e&&!N.current&&(N.current=!0,D(f)),e||(N.current=!1,k(!1))},[e,f,D]),(0,t.jsx)(d.Dialog,{open:e,onOpenChange:e=>{e||R()},children:(0,t.jsxs)(d.DialogContent,{className:"flex h-[min(520px,85dvh)] w-full max-w-[460px] flex-col gap-0 overflow-hidden p-0",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsx)(d.DialogTitle,{className:"sr-only",children:"Select Folder"}),(0,t.jsx)(d.DialogDescription,{className:"sr-only",children:"Navigate to a folder and select it"}),(0,t.jsx)(p,{currentPath:b,isEditing:w,onToggleEdit:()=>k(e=>!e),onNavigate:E}),(0,t.jsx)(u.ScrollArea,{className:"min-h-0 flex-1",children:y&&0===x.length?(0,t.jsx)("div",{className:"space-y-0.5 p-2",children:Array.from({length:8}).map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",style:{opacity:1-.1*a},children:[(0,t.jsx)("div",{className:"bg-muted h-4 w-4 animate-pulse rounded"}),(0,t.jsx)("div",{className:"bg-muted h-3.5 animate-pulse rounded",style:{width:`${40+35*Math.random()}%`}})]},`skeleton-${a}`))}):0===x.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,t.jsx)(s.FolderOpen,{className:"text-muted-foreground/25 mb-3 h-10 w-10"}),(0,t.jsx)("p",{className:"text-muted-foreground/60 text-sm",children:"Empty folder"})]}):(0,t.jsx)("div",{className:"p-2",children:x.map((e,a)=>(0,t.jsxs)("button",{type:"button",onClick:()=>E(e.path),className:"folder-row group flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-all hover:bg-[var(--color-primary)]/[0.06] active:scale-[0.997]",style:{animationDelay:`${20*a}ms`},children:[(0,t.jsx)(n,{className:"text-muted-foreground/50 group-hover:text-primary h-[18px] w-[18px] shrink-0 transition-colors"}),(0,t.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-[13px] font-medium",children:e.name}),(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/0 group-hover:text-muted-foreground/40 h-3.5 w-3.5 shrink-0 transition-all"})]},e.path))},S)}),(0,t.jsxs)("div",{className:"flex items-center gap-2 border-t px-4 py-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground min-w-0 flex-1 truncate font-mono text-[11px] leading-none",children:b||" "}),(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",onClick:R,className:"text-muted-foreground h-8 shrink-0 px-3 text-xs",children:"Cancel"}),(0,t.jsxs)(c.Button,{size:"sm",onClick:function(){b&&(m(b),o(!1))},disabled:!b||y,className:"h-8 shrink-0 px-5 text-xs font-medium",children:[y?(0,t.jsx)(i.Loader2,{className:"mr-1.5 h-3 w-3 animate-spin"}):null,"Select"]})]})]})})}e.s(["ReactFileManagerDialog",()=>m],961201),e.s([],13322)},591925,e=>{"use strict";let t=(0,e.i(903645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],591925)},236232,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("40d4837169557e75f0be6d0f89f7fea0ff41eb89fc",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>a])},713005,371127,744263,327810,e=>{"use strict";let t=(0,e.i(903645).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",()=>t],713005);var a=e.i(679606),r=e.i(152155),n=e.i(3214),s=e.i(83428),i=e.i(860253);e.i(541001);var o=e.i(64780),l=e.i(131777),d=e.i(735364);function c({actions:e,className:t,style:c}){let{t:u}=(0,o.useTranslation)("web"),[h,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(h)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&p(!1)}},[h]),(0,a.jsxs)(a.Fragment,{children:[h?(0,a.jsx)("div",{"data-testid":"fab-overlay",className:"fixed inset-0 z-40",onClick:()=>p(!1),"aria-hidden":"true"}):null,(0,a.jsxs)("div",{"data-testid":"floating-action-button",className:(0,l.cn)("relative z-50",t),style:c,children:[(0,a.jsx)("div",{className:(0,l.cn)("absolute start-0 bottom-[calc(100%+24px)] flex flex-col items-start gap-2",!h&&"pointer-events-none"),"data-testid":"fab-actions",children:e.map((t,r)=>{let n=(e.length-1-r)*50;return(0,a.jsxs)("button",{"data-testid":`fab-action-${t.id}`,"aria-label":t.label,disabled:t.disabled??t.loading,className:(0,l.cn)("flex h-10 items-center gap-2.5 rounded-full px-4","bg-background text-foreground shadow-md","border-border border","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50","text-sm font-medium whitespace-nowrap",h?"translate-y-0 opacity-100":"pointer-events-none translate-y-0 opacity-0"),style:{transition:`opacity ${h?250:120}ms ease-out ${h?n:0}ms, transform ${h?250:120}ms ease-out ${h?n:0}ms`},onClick:()=>{t.onClick(),p(!1)},children:[(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:t.loading?(0,a.jsx)(s.Loader2,{className:"h-4 w-4 animate-spin"}):t.icon}),(0,a.jsx)("span",{children:t.label})]},t.id)})}),(0,a.jsxs)(d.Button,{size:"icon","data-testid":"fab-trigger","aria-label":u(h?"fab.closeActions":"fab.createNew"),className:(0,l.cn)("relative h-14 w-14 rounded-full shadow-lg","bg-indigo-500 text-white hover:bg-indigo-400 dark:bg-indigo-500 dark:hover:bg-indigo-400","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95"),onClick:()=>p(e=>!e),children:[(0,a.jsx)(n.Plus,{className:(0,l.cn)("absolute h-7 w-7 stroke-[2.5] transition-all",h?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100"),style:{transitionDuration:"250ms"}}),(0,a.jsx)(i.X,{className:(0,l.cn)("absolute h-6 w-6 stroke-[2.5] transition-all",h?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0"),style:{transitionDuration:"250ms"}})]})]})]})}e.s(["FloatingActionButton",()=>c],371127),e.s([],744263);var u=e.i(602287),h=e.i(698127),p=e.i(508893);let m=(0,p.createServerReference)("40c4d25fb30555d92bf75dd650e2cce9b8be92dc0b",p.callServer,void 0,p.findSourceMapURL,"createProjectFolder");function f({open:e,onOpenChange:t,onCreated:n}){let[i,o]=(0,r.useState)(""),[l,c]=(0,r.useState)(!1),[p,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(o(""),c(!1),f(null))},[e]);let x=async e=>{e.preventDefault();let a=i.trim();if(!a||l)return;c(!0),f(null);let r=await m(a);if(!r.ok||!r.path){f(r.error??"Failed to create project."),c(!1);return}n(r.path),t(!1)};return(0,a.jsx)(u.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(u.DialogContent,{className:"max-w-sm",children:(0,a.jsxs)("form",{onSubmit:x,children:[(0,a.jsxs)(u.DialogHeader,{children:[(0,a.jsx)(u.DialogTitle,{children:"New project"}),(0,a.jsx)(u.DialogDescription,{children:"Create an empty project folder inside your Shep home directory. Git will be initialised automatically when the project is added."})]}),(0,a.jsxs)("div",{className:"py-4",children:[(0,a.jsx)(h.Input,{autoFocus:!0,value:i,onChange:e=>{o(e.target.value),p&&f(null)},placeholder:"my-prototype",disabled:l,"data-testid":"new-project-name-input"}),p?(0,a.jsx)("p",{className:"text-destructive mt-2 text-xs",role:"alert",children:p}):null]}),(0,a.jsxs)(u.DialogFooter,{children:[(0,a.jsx)(d.Button,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),(0,a.jsx)(d.Button,{type:"submit",disabled:!i.trim()||l,children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create project"})]})]})})})}e.s(["NewProjectDialog",()=>f],327810)},856983,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("40d0ac4c8ca5c179014f909f203d903942417295df",t.callServer,void 0,t.findSourceMapURL,"archiveFeature");e.s(["archiveFeature",()=>a])},587149,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("40c64b253cb9310f09f151401d5eb06957db761efa",t.callServer,void 0,t.findSourceMapURL,"unarchiveFeature");e.s(["unarchiveFeature",()=>a])},591461,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("783175472a45c2823bb1c4751b36e777308131d27d",t.callServer,void 0,t.findSourceMapURL,"deleteFeature");e.s(["deleteFeature",()=>a])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),r=e.i(131777);let n=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s({className:e,variant:a,...s}){return(0,t.jsx)("div",{className:(0,r.cn)(n({variant:a}),e),...s})}e.s(["Badge",()=>s])},951911,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),n=e.i(205978),s=e.i(922528),i=e.i(936589),o=e.i(23405),l=e.i(277624),d=e.i(287620),c="Switch",[u,h]=(0,s.createContextScope)(c),[p,m]=u(c),f=a.forwardRef((e,s)=>{let{__scopeSwitch:o,name:l,checked:u,defaultChecked:h,required:m,disabled:f,value:x="on",onCheckedChange:g,form:y,...j}=e,[w,k]=a.useState(null),N=(0,n.useComposedRefs)(s,e=>k(e)),S=a.useRef(!1),C=!w||y||!!w.closest("form"),[D,E]=(0,i.useControllableState)({prop:u,defaultProp:h??!1,onChange:g,caller:c});return(0,t.jsxs)(p,{scope:o,checked:D,disabled:f,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":D,"aria-required":m,"data-state":v(D),"data-disabled":f?"":void 0,disabled:f,value:x,...j,ref:N,onClick:(0,r.composeEventHandlers)(e.onClick,e=>{E(e=>!e),C&&(S.current=e.isPropagationStopped(),S.current||e.stopPropagation())})}),C&&(0,t.jsx)(b,{control:w,bubbles:!S.current,name:l,value:x,checked:D,required:m,disabled:f,form:y,style:{transform:"translateX(-100%)"}})]})});f.displayName=c;var x="SwitchThumb",g=a.forwardRef((e,a)=>{let{__scopeSwitch:r,...n}=e,s=m(x,r);return(0,t.jsx)(d.Primitive.span,{"data-state":v(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:a})});g.displayName=x;var b=a.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:i=!0,...d},c)=>{let u=a.useRef(null),h=(0,n.useComposedRefs)(u,c),p=(0,o.usePrevious)(s),m=(0,l.useSize)(r);return a.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(p!==s&&t){let a=new Event("click",{bubbles:i});t.call(e,s),e.dispatchEvent(a)}},[p,s,i]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...d,tabIndex:-1,ref:h,style:{...d.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function v(e){return e?"checked":"unchecked"}b.displayName="SwitchBubbleInput",e.s(["Root",()=>f,"Switch",()=>f,"SwitchThumb",()=>g,"Thumb",()=>g,"createSwitchScope",()=>h],595291);var y=e.i(595291),y=y,j=e.i(131777);function w({className:e,size:a="default",...r}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":a,className:(0,j.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...r,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,j.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]")})})}e.s(["Switch",()=>w],951911)},283843,e=>{"use strict";let t=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],283843)},731463,e=>{"use strict";let t=(0,e.i(903645).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["MoreHorizontal",()=>t],731463)},454793,207729,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({icon:e,title:r,description:n,action:s,className:i,...o}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",i),...o,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r}),n?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:n}):null,s?(0,t.jsx)("div",{className:"mt-2",children:s}):null]})}e.s(["EmptyState",()=>r],207729),e.s([],454793)},809443,185871,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function r({title:e,description:r,children:n,className:s}){return(0,t.jsxs)("header",{className:(0,a.cn)("flex items-center justify-between gap-4",s),children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:e}),r?(0,t.jsx)("p",{className:"text-muted-foreground",children:r}):null]}),n?(0,t.jsx)("div",{"data-slot":"actions",children:n}):null]})}e.s(["PageHeader",()=>r],185871),e.s([],809443)},440106,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(711719),n=e.i(935946),s=e.i(83428),i=e.i(542049),o=e.i(453360),l=e.i(941698),d=e.i(99105),c=e.i(723925),u=e.i(860253);e.i(541001);var h=e.i(64780),p=e.i(131777),m=e.i(508893);let f=(0,m.createServerReference)("402a7da73158b6bd6c8fb8ab5b0344dc0e0f08e228",m.callServer,void 0,m.findSourceMapURL,"createProjectAndFeature"),x=(0,m.createServerReference)("402b7881a750d5c7c7125153b65fdd64c555ddcdc2",m.callServer,void 0,m.findSourceMapURL,"createApplication");var g=e.i(684632),b=e.i(41413);e.i(650032);var v=e.i(486254);e.i(692233);var y=e.i(210025),j=e.i(102828),w=e.i(470646),k=e.i(731151);let N=["application","fast","spec"],S={application:{icon:i.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:o.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:l.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function C({onRepositorySelect:e,onApplicationCreated:i,onClose:o,className:l}){let{t:m}=(0,h.useTranslation)("web"),[C,D]=(0,a.useState)(""),[E,R]=(0,a.useState)(void 0),[P,M]=(0,a.useState)(void 0);(0,a.useEffect)(()=>{(0,g.getDefaultAgentAndModel)().then(e=>{R(t=>t??e.agentType),M(t=>t??e.model)})},[]);let[z,A]=(0,a.useState)("application"),[F,T]=(0,a.useState)(!1),[L,_]=(0,a.useState)(null),[O,B]=(0,a.useState)(!1),H=(0,a.useRef)(null),I=(0,k.useAttachments)(),U=!!e,$=U?z:"application",K=(0,a.useCallback)(()=>{A(e=>{let t=N.indexOf(e);return N[(t+1)%N.length]})},[]);(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&o&&o(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),K())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[o,K,e]);let q=(0,a.useCallback)(async()=>{if(C.trim()&&!F){T(!0),_(null);try{if("application"!==$&&e){let t=await f({description:C.trim(),attachments:I.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:E,model:P,fast:"fast"===$});if(t.error){_(t.error),T(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}else{let e=await x({description:C.trim(),agentType:E,modelOverride:P,initialPrompt:C.trim()});if(e.error){_(e.error),T(!1);return}e.application&&i?.(e.application.id)}}catch{_("Something went wrong. Please try again."),T(!1)}}},[C,F,$,I.completedAttachments,E,P,e,i]),Z=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),q())},[q]),V=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let a=await t.json();I.addAttachment(a)}}catch{}},[I.addAttachment]),X=(0,a.useCallback)(e=>{D(e),H.current?.focus()},[]),G=S[$],J=G.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,p.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",l),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),o?(0,t.jsx)("button",{type:"button",onClick:o,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(y.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>B(!0),onBlur:()=>B(!1),onDragEnter:I.handleDragEnter,onDragLeave:I.handleDragLeave,onDragOver:I.handleDragOver,onDrop:I.handleDrop,className:(0,p.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",O&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",I.isDragOver&&"border-primary/50 bg-primary/5",F&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:H,rows:2,autoFocus:!0,value:C,onChange:e=>D(e.target.value),onKeyDown:Z,onPaste:I.handlePaste,placeholder:G.placeholder,disabled:F,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),I.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:I.attachments.map(e=>(0,t.jsx)(v.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>I.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>I.updateNotes(e.id,t)},e.id))}):null,I.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:I.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(b.AgentModelPicker,{initialAgentType:E??"",initialModel:P??"",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{R(e),M(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),U?(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)(J,{className:"h-3.5 w-3.5"}),G.label]},$),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:N.map(e=>{let a=S[e],r=a.icon,n=$===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>A(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:a.label}),n?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(j.Tooltip,{children:[(0,t.jsx)(j.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:V,disabled:F,"aria-label":m("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(n.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(j.TooltipContent,{side:"top",children:m("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:q,disabled:!C.trim()||F,className:(0,p.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:F?(0,t.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(r.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),L?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:L}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:G.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>X(e),disabled:F,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},$)]})]})}e.s(["ControlCenterEmptyState",()=>C],440106)},998798,e=>{"use strict";let t=(0,e.i(903645).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",()=>t],998798)},13322,961201,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(276016);let n=(0,e.i(903645).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var s=e.i(619933),i=e.i(83428),o=e.i(998798),l=e.i(360112),d=e.i(602287),c=e.i(735364),u=e.i(835340);async function h(e){let t=new URLSearchParams;e&&t.set("path",e);let a=await fetch(`/api/directory/list?${t.toString()}`);if(!a.ok)throw Error((await a.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return a.json()}function p({currentPath:e,isEditing:n,onToggleEdit:s,onNavigate:i}){let l=(0,a.useRef)(null),[d,c]=(0,a.useState)(e);function u(){c(e),s()}(0,a.useEffect)(()=>{c(e)},[e]),(0,a.useEffect)(()=>{n&&l.current&&(l.current.focus(),l.current.select())},[n]);let h=function(e){if(!e)return[];let t=/^[a-zA-Z]:/.test(e),a=t?"\\":"/",r=e.split(/[\\/]/).filter(Boolean),n=[];for(let e=0;e<r.length;e++){let s=t?r.slice(0,e+1).join(a):a+r.slice(0,e+1).join(a);n.push({label:r[e],path:s})}return n}(e),p=h.length>3,m=p?h.slice(-3):h;return(0,t.jsxs)("div",{className:"border-b px-4 py-3",children:[(0,t.jsx)("h2",{className:"text-foreground mb-2.5 text-sm font-semibold tracking-[-0.01em]",children:"Select Folder"}),n?(0,t.jsx)("input",{ref:l,type:"text",value:d,onChange:e=>c(e.target.value),onKeyDown:e=>{if("Enter"===e.key){let t;e.preventDefault(),(t=d.trim())&&i(t)}"Escape"===e.key&&(e.preventDefault(),u())},onBlur:u,className:"bg-muted/60 border-border focus:ring-ring/20 focus:border-ring w-full rounded-lg border px-3 py-2 font-mono text-xs transition-all outline-none focus:ring-2",placeholder:"Type a path and press Enter...",spellCheck:!1,autoComplete:"off"}):(0,t.jsxs)("div",{className:"bg-muted/40 flex items-center gap-1 rounded-lg px-2.5 py-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>i("/"),className:"text-muted-foreground hover:text-foreground hover:bg-background shrink-0 rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:"/"}),p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/40 font-mono text-xs",children:"..."})]}):null,m.map((e,a)=>{let n=a===m.length-1;return(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/30 h-3 w-3"}),n?(0,t.jsx)("span",{className:"bg-primary/10 text-primary rounded px-2 py-0.5 font-mono text-xs font-medium",children:e.label}):(0,t.jsx)("button",{type:"button",onClick:()=>i(e.path),className:"text-muted-foreground hover:text-foreground hover:bg-background rounded px-1.5 py-0.5 font-mono text-xs transition-colors",children:e.label})]},e.path)}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"text-muted-foreground/40 hover:text-foreground hover:bg-background shrink-0 rounded p-1 transition-colors","aria-label":"Edit path",children:(0,t.jsx)(o.Pencil,{className:"h-3 w-3"})})]})]})}function m({open:e,onOpenChange:o,onSelect:m,initialPath:f}){let[x,g]=(0,a.useState)([]),[b,v]=(0,a.useState)(""),[y,j]=(0,a.useState)(!1),[w,k]=(0,a.useState)(!1),N=(0,a.useRef)(!1),[S,C]=(0,a.useState)(0),D=(0,a.useCallback)(async e=>{j(!0),k(!1);try{let t=await h(e);g(t.entries),v(t.currentPath),C(e=>e+1)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{j(!1)}},[]);function E(e){D(e)}function R(){m(null),o(!1)}return(0,a.useEffect)(()=>{e&&!N.current&&(N.current=!0,D(f)),e||(N.current=!1,k(!1))},[e,f,D]),(0,t.jsx)(d.Dialog,{open:e,onOpenChange:e=>{e||R()},children:(0,t.jsxs)(d.DialogContent,{className:"flex h-[min(520px,85dvh)] w-full max-w-[460px] flex-col gap-0 overflow-hidden p-0",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsx)(d.DialogTitle,{className:"sr-only",children:"Select Folder"}),(0,t.jsx)(d.DialogDescription,{className:"sr-only",children:"Navigate to a folder and select it"}),(0,t.jsx)(p,{currentPath:b,isEditing:w,onToggleEdit:()=>k(e=>!e),onNavigate:E}),(0,t.jsx)(u.ScrollArea,{className:"min-h-0 flex-1",children:y&&0===x.length?(0,t.jsx)("div",{className:"space-y-0.5 p-2",children:Array.from({length:8}).map((e,a)=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",style:{opacity:1-.1*a},children:[(0,t.jsx)("div",{className:"bg-muted h-4 w-4 animate-pulse rounded"}),(0,t.jsx)("div",{className:"bg-muted h-3.5 animate-pulse rounded",style:{width:`${40+35*Math.random()}%`}})]},`skeleton-${a}`))}):0===x.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-20",children:[(0,t.jsx)(s.FolderOpen,{className:"text-muted-foreground/25 mb-3 h-10 w-10"}),(0,t.jsx)("p",{className:"text-muted-foreground/60 text-sm",children:"Empty folder"})]}):(0,t.jsx)("div",{className:"p-2",children:x.map((e,a)=>(0,t.jsxs)("button",{type:"button",onClick:()=>E(e.path),className:"folder-row group flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-all hover:bg-[var(--color-primary)]/[0.06] active:scale-[0.997]",style:{animationDelay:`${20*a}ms`},children:[(0,t.jsx)(n,{className:"text-muted-foreground/50 group-hover:text-primary h-[18px] w-[18px] shrink-0 transition-colors"}),(0,t.jsx)("span",{className:"text-foreground min-w-0 flex-1 truncate text-[13px] font-medium",children:e.name}),(0,t.jsx)(r.ChevronRight,{className:"text-muted-foreground/0 group-hover:text-muted-foreground/40 h-3.5 w-3.5 shrink-0 transition-all"})]},e.path))},S)}),(0,t.jsxs)("div",{className:"flex items-center gap-2 border-t px-4 py-3",children:[(0,t.jsx)("p",{className:"text-muted-foreground min-w-0 flex-1 truncate font-mono text-[11px] leading-none",children:b||" "}),(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",onClick:R,className:"text-muted-foreground h-8 shrink-0 px-3 text-xs",children:"Cancel"}),(0,t.jsxs)(c.Button,{size:"sm",onClick:function(){b&&(m(b),o(!1))},disabled:!b||y,className:"h-8 shrink-0 px-5 text-xs font-medium",children:[y?(0,t.jsx)(i.Loader2,{className:"mr-1.5 h-3 w-3 animate-spin"}):null,"Select"]})]})]})})}e.s(["ReactFileManagerDialog",()=>m],961201),e.s([],13322)},591925,e=>{"use strict";let t=(0,e.i(903645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],591925)},172637,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("40a8e46a1833838a96e4b3f97741ab37054dc3a415",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>a])},713005,371127,744263,327810,e=>{"use strict";let t=(0,e.i(903645).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",()=>t],713005);var a=e.i(679606),r=e.i(152155),n=e.i(3214),s=e.i(83428),i=e.i(860253);e.i(541001);var o=e.i(64780),l=e.i(131777),d=e.i(735364);function c({actions:e,className:t,style:c}){let{t:u}=(0,o.useTranslation)("web"),[h,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(h)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){"Escape"===e.key&&p(!1)}},[h]),(0,a.jsxs)(a.Fragment,{children:[h?(0,a.jsx)("div",{"data-testid":"fab-overlay",className:"fixed inset-0 z-40",onClick:()=>p(!1),"aria-hidden":"true"}):null,(0,a.jsxs)("div",{"data-testid":"floating-action-button",className:(0,l.cn)("relative z-50",t),style:c,children:[(0,a.jsx)("div",{className:(0,l.cn)("absolute start-0 bottom-[calc(100%+24px)] flex flex-col items-start gap-2",!h&&"pointer-events-none"),"data-testid":"fab-actions",children:e.map((t,r)=>{let n=(e.length-1-r)*50;return(0,a.jsxs)("button",{"data-testid":`fab-action-${t.id}`,"aria-label":t.label,disabled:t.disabled??t.loading,className:(0,l.cn)("flex h-10 items-center gap-2.5 rounded-full px-4","bg-background text-foreground shadow-md","border-border border","hover:bg-accent hover:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50","text-sm font-medium whitespace-nowrap",h?"translate-y-0 opacity-100":"pointer-events-none translate-y-0 opacity-0"),style:{transition:`opacity ${h?250:120}ms ease-out ${h?n:0}ms, transform ${h?250:120}ms ease-out ${h?n:0}ms`},onClick:()=>{t.onClick(),p(!1)},children:[(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:t.loading?(0,a.jsx)(s.Loader2,{className:"h-4 w-4 animate-spin"}):t.icon}),(0,a.jsx)("span",{children:t.label})]},t.id)})}),(0,a.jsxs)(d.Button,{size:"icon","data-testid":"fab-trigger","aria-label":u(h?"fab.closeActions":"fab.createNew"),className:(0,l.cn)("relative h-14 w-14 rounded-full shadow-lg","bg-indigo-500 text-white hover:bg-indigo-400 dark:bg-indigo-500 dark:hover:bg-indigo-400","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95"),onClick:()=>p(e=>!e),children:[(0,a.jsx)(n.Plus,{className:(0,l.cn)("absolute h-7 w-7 stroke-[2.5] transition-all",h?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100"),style:{transitionDuration:"250ms"}}),(0,a.jsx)(i.X,{className:(0,l.cn)("absolute h-6 w-6 stroke-[2.5] transition-all",h?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0"),style:{transitionDuration:"250ms"}})]})]})]})}e.s(["FloatingActionButton",()=>c],371127),e.s([],744263);var u=e.i(602287),h=e.i(698127),p=e.i(508893);let m=(0,p.createServerReference)("40da762c4b34966ae0ac466fdc38dd417bb5f12247",p.callServer,void 0,p.findSourceMapURL,"createProjectFolder");function f({open:e,onOpenChange:t,onCreated:n}){let[i,o]=(0,r.useState)(""),[l,c]=(0,r.useState)(!1),[p,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(o(""),c(!1),f(null))},[e]);let x=async e=>{e.preventDefault();let a=i.trim();if(!a||l)return;c(!0),f(null);let r=await m(a);if(!r.ok||!r.path){f(r.error??"Failed to create project."),c(!1);return}n(r.path),t(!1)};return(0,a.jsx)(u.Dialog,{open:e,onOpenChange:t,children:(0,a.jsx)(u.DialogContent,{className:"max-w-sm",children:(0,a.jsxs)("form",{onSubmit:x,children:[(0,a.jsxs)(u.DialogHeader,{children:[(0,a.jsx)(u.DialogTitle,{children:"New project"}),(0,a.jsx)(u.DialogDescription,{children:"Create an empty project folder inside your Shep home directory. Git will be initialised automatically when the project is added."})]}),(0,a.jsxs)("div",{className:"py-4",children:[(0,a.jsx)(h.Input,{autoFocus:!0,value:i,onChange:e=>{o(e.target.value),p&&f(null)},placeholder:"my-prototype",disabled:l,"data-testid":"new-project-name-input"}),p?(0,a.jsx)("p",{className:"text-destructive mt-2 text-xs",role:"alert",children:p}):null]}),(0,a.jsxs)(u.DialogFooter,{children:[(0,a.jsx)(d.Button,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),(0,a.jsx)(d.Button,{type:"submit",disabled:!i.trim()||l,children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create project"})]})]})})})}e.s(["NewProjectDialog",()=>f],327810)},573324,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("405f73e1d0740c127aafceadc63304676969dbb19a",t.callServer,void 0,t.findSourceMapURL,"archiveFeature");e.s(["archiveFeature",()=>a])},71622,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("4047cfaa45cd7417712356735bfbb78f93a103592a",t.callServer,void 0,t.findSourceMapURL,"unarchiveFeature");e.s(["unarchiveFeature",()=>a])},311530,e=>{"use strict";var t=e.i(508893);let a=(0,t.createServerReference)("782094d73ba803f25ee4b483796e8b0625c3c6564f",t.callServer,void 0,t.findSourceMapURL,"deleteFeature");e.s(["deleteFeature",()=>a])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let a=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>a],283843)},187752,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(66459),r=e.i(131777);let o=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));o.displayName="Command";let n=t.forwardRef(({className:e,...t},o)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:o,className:(0,r.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));n.displayName="CommandInput";let l=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));l.displayName="CommandList";let c=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));c.displayName="CommandEmpty";let i=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-foreground overflow-hidden p-1",e),...t}));i.displayName="CommandGroup";let d=t.forwardRef(({className:e,selected:t,...s},o)=>(0,a.jsx)("button",{ref:o,type:"button","data-selected":t,className:(0,r.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));d.displayName="CommandItem";let m=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-border -mx-1 h-px",e),...t}));m.displayName="CommandSeparator",e.s(["Command",()=>o,"CommandEmpty",()=>c,"CommandGroup",()=>i,"CommandInput",()=>n,"CommandItem",()=>d,"CommandList",()=>l,"CommandSeparator",()=>m])},936479,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(711434),r=e.i(360112),o=e.i(508893);let n=(0,o.createServerReference)("40e6b7cb38cc5a6706122401cee8720b8acd895c2f",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("407ee8890c70ba855c04fd8d9ec67b3e40e7a0c66c",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(723925),i=e.i(197667),d=e.i(283843),m=e.i(949228),p=e.i(83428);e.i(1650);var u=e.i(511495),h=e.i(845811),x=e.i(735364),f=e.i(698127),b=e.i(141957),v=e.i(187752),g=e.i(390382),j=e.i(131777);function C({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:C,onRepositoryChange:w,branches:y=[],branchesLoading:N=!1}){let[S,k]=(0,t.useState)(""),[R,L]=(0,t.useState)(!1),[E,B]=(0,t.useState)(""),P=(0,t.useRef)(null),[D,I]=(0,t.useState)(!1),[T,U]=(0,t.useState)(""),A=(0,t.useRef)(null),G=l.find(e=>e.path===C),O=!!C;(0,t.useEffect)(()=>{e||(k(""),B(""),L(!1),I(!1),U(""))},[e]),(0,t.useEffect)(()=>{k(""),B("")},[C]);let F=(0,t.useCallback)(e=>{e.preventDefault();let a=S.trim();a&&C&&!o&&r(a,C)},[S,C,o,r]),K=(0,t.useCallback)(()=>{k(""),B(""),s()},[s]),M=(0,t.useCallback)(e=>{k(e),B(e),L(!1)},[]),$=(0,t.useCallback)(e=>{B(e.target.value),R||L(!0)},[R]),z=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=E.trim();a&&(k(a),L(!1))}"Escape"===e.key&&(L(!1),B(S))},[E,S]),W=(0,t.useCallback)(e=>{w?.(e),I(!1),U("")},[w]),q=y.filter(e=>e.toLowerCase().includes(E.toLowerCase())),H=T.trim()?l.filter(e=>e.name.toLowerCase().includes(T.toLowerCase())||e.path.toLowerCase().includes(T.toLowerCase())):l;(0,t.useEffect)(()=>{D?setTimeout(()=>A.current?.focus(),0):U("")},[D]);let J=!S.trim()||!C||o,Q=(0,a.jsxs)("div",{children:[(0,a.jsxs)(h.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(m.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(h.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:K,size:"sm",modal:!1,header:Q,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:F,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(g.Popover,{open:D,onOpenChange:I,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":D,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,j.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",!G&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:G?G.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:A,placeholder:"Search repositories...",value:T,onChange:e=>U(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===H.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):H.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":C===e.path,onClick:()=>W(e.path),className:(0,j.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",C===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,j.cn)("h-4 w-4 shrink-0",C!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(g.Popover,{open:R,onOpenChange:L,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":R,disabled:o||!O,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:O?N?"Loading branches...":S||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(v.Command,{children:[(0,a.jsx)(v.CommandInput,{ref:P,placeholder:"Search branches...",value:E,onChange:$,onKeyDown:z,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(v.CommandList,{children:[!N&&0===q.length&&(0,a.jsx)(v.CommandEmpty,{children:0===y.length?"No branches found.":E?"No match — press Enter to use this value.":"No branches available."}),N?(0,a.jsx)(v.CommandEmpty,{children:(0,a.jsx)(p.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,q.length>0&&(0,a.jsx)(v.CommandGroup,{children:q.map(e=>(0,a.jsxs)(v.CommandItem,{selected:e===S,onClick:()=>M(e),children:[(0,a.jsx)(c.Check,{className:(0,j.cn)("me-2 h-4 w-4",e===S?"opacity-100":"opacity-0")}),(0,a.jsx)(m.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:O?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:K,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:J,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function w({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,m]=(0,t.useState)(!1),[p,u]=(0,t.useState)(),[h,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&m(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let y=(0,t.useCallback)(()=>{c.push("/control-center")},[c]),N=(0,t.useCallback)(e=>{g(e)},[]),S=(0,t.useCallback)((e,a)=>{u(void 0),m(!0),c.push("/control-center"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),m(!1)})},[c]);return(0,a.jsx)(C,{open:w,onClose:y,onSubmit:S,isSubmitting:d,error:p,repositories:o,selectedRepositoryPath:v,onRepositoryChange:N,branches:h,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>w],936479)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let a=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>a],283843)},187752,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(66459),r=e.i(131777);let o=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));o.displayName="Command";let n=t.forwardRef(({className:e,...t},o)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:o,className:(0,r.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));n.displayName="CommandInput";let l=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));l.displayName="CommandList";let c=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));c.displayName="CommandEmpty";let i=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-foreground overflow-hidden p-1",e),...t}));i.displayName="CommandGroup";let d=t.forwardRef(({className:e,selected:t,...s},o)=>(0,a.jsx)("button",{ref:o,type:"button","data-selected":t,className:(0,r.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));d.displayName="CommandItem";let m=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-border -mx-1 h-px",e),...t}));m.displayName="CommandSeparator",e.s(["Command",()=>o,"CommandEmpty",()=>c,"CommandGroup",()=>i,"CommandInput",()=>n,"CommandItem",()=>d,"CommandList",()=>l,"CommandSeparator",()=>m])},936479,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(711434),r=e.i(360112),o=e.i(508893);let n=(0,o.createServerReference)("40b516325d5f899e047390324747102a5a48765308",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("4090447456216ffa86995271dd2a1a32bb30613b8f",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(723925),i=e.i(197667),d=e.i(283843),m=e.i(949228),p=e.i(83428);e.i(1650);var u=e.i(511495),h=e.i(845811),x=e.i(735364),f=e.i(698127),b=e.i(141957),v=e.i(187752),g=e.i(390382),j=e.i(131777);function C({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:C,onRepositoryChange:w,branches:y=[],branchesLoading:N=!1}){let[S,k]=(0,t.useState)(""),[R,L]=(0,t.useState)(!1),[E,B]=(0,t.useState)(""),P=(0,t.useRef)(null),[D,I]=(0,t.useState)(!1),[T,U]=(0,t.useState)(""),A=(0,t.useRef)(null),G=l.find(e=>e.path===C),O=!!C;(0,t.useEffect)(()=>{e||(k(""),B(""),L(!1),I(!1),U(""))},[e]),(0,t.useEffect)(()=>{k(""),B("")},[C]);let F=(0,t.useCallback)(e=>{e.preventDefault();let a=S.trim();a&&C&&!o&&r(a,C)},[S,C,o,r]),K=(0,t.useCallback)(()=>{k(""),B(""),s()},[s]),M=(0,t.useCallback)(e=>{k(e),B(e),L(!1)},[]),$=(0,t.useCallback)(e=>{B(e.target.value),R||L(!0)},[R]),z=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=E.trim();a&&(k(a),L(!1))}"Escape"===e.key&&(L(!1),B(S))},[E,S]),W=(0,t.useCallback)(e=>{w?.(e),I(!1),U("")},[w]),q=y.filter(e=>e.toLowerCase().includes(E.toLowerCase())),H=T.trim()?l.filter(e=>e.name.toLowerCase().includes(T.toLowerCase())||e.path.toLowerCase().includes(T.toLowerCase())):l;(0,t.useEffect)(()=>{D?setTimeout(()=>A.current?.focus(),0):U("")},[D]);let J=!S.trim()||!C||o,Q=(0,a.jsxs)("div",{children:[(0,a.jsxs)(h.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(m.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(h.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:K,size:"sm",modal:!1,header:Q,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:F,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(g.Popover,{open:D,onOpenChange:I,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":D,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,j.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",!G&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:G?G.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:A,placeholder:"Search repositories...",value:T,onChange:e=>U(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===H.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):H.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":C===e.path,onClick:()=>W(e.path),className:(0,j.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",C===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,j.cn)("h-4 w-4 shrink-0",C!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(g.Popover,{open:R,onOpenChange:L,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":R,disabled:o||!O,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:O?N?"Loading branches...":S||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(v.Command,{children:[(0,a.jsx)(v.CommandInput,{ref:P,placeholder:"Search branches...",value:E,onChange:$,onKeyDown:z,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(v.CommandList,{children:[!N&&0===q.length&&(0,a.jsx)(v.CommandEmpty,{children:0===y.length?"No branches found.":E?"No match — press Enter to use this value.":"No branches available."}),N?(0,a.jsx)(v.CommandEmpty,{children:(0,a.jsx)(p.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,q.length>0&&(0,a.jsx)(v.CommandGroup,{children:q.map(e=>(0,a.jsxs)(v.CommandItem,{selected:e===S,onClick:()=>M(e),children:[(0,a.jsx)(c.Check,{className:(0,j.cn)("me-2 h-4 w-4",e===S?"opacity-100":"opacity-0")}),(0,a.jsx)(m.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:O?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:K,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:J,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function w({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,m]=(0,t.useState)(!1),[p,u]=(0,t.useState)(),[h,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&m(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let y=(0,t.useCallback)(()=>{c.push("/control-center")},[c]),N=(0,t.useCallback)(e=>{g(e)},[]),S=(0,t.useCallback)((e,a)=>{u(void 0),m(!0),c.push("/control-center"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),m(!1)})},[c]);return(0,a.jsx)(C,{open:w,onClose:y,onSubmit:S,isSubmitting:d,error:p,repositories:o,selectedRepositoryPath:v,onRepositoryChange:N,branches:h,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>w],936479)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),s=e.i(294237),a=e.i(131777);let r=(0,s.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:s,...l}){return(0,t.jsx)("div",{className:(0,a.cn)(r({variant:s}),e),...l})}e.s(["Badge",()=>l])},267669,e=>{"use strict";let t=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],267669)},938518,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],938518)},204461,143972,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(735364),r=e.i(81846),l=e.i(317406),d=e.i(508893);let i=(0,d.createServerReference)("6029f453c2666dcb7c2d2c5e83694f898834d610ae",d.callServer,void 0,d.findSourceMapURL,"updatePmProject");e.s(["updatePmProject",()=>i],143972);let n=[{value:l.EstimateType.None,label:"None",description:"No estimates"},{value:l.EstimateType.Category,label:"T-Shirt Sizes",description:"XS, S, M, L, XL"},{value:l.EstimateType.Points,label:"Fibonacci Points",description:"1, 2, 3, 5, 8, 13, 21"}];function c({projectId:e,currentEstimateType:l,onEstimateTypeChange:d,className:c}){let[o,m]=(0,s.useState)(l),[u,x]=(0,s.useState)(!1),h=async t=>{t!==o&&(m(t),x(!0),await i(e,{estimateType:t}),x(!1),d?.(t))};return(0,t.jsxs)("div",{"data-testid":"estimate-settings",className:c,children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("h3",{className:"text-xs font-medium",children:"Estimate System"}),u?(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:"Saving..."}):null]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>(0,t.jsx)(a.Button,{variant:o===e.value?"default":"outline",size:"sm",className:"h-auto w-full justify-start px-3 py-2 text-left",onClick:()=>h(e.value),"data-testid":`estimate-option-${e.value}`,children:(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.label}),(0,t.jsx)("span",{className:"text-muted-foreground ml-2 text-[10px]",children:e.description})]}),o===e.value?(0,t.jsx)(r.Badge,{variant:"secondary",className:"text-[10px]",children:"Active"}):null]})},e.value))})]})}e.s(["EstimateSettings",()=>c],204461)},649749,e=>{"use strict";var t=e.i(679606),s=e.i(152155),a=e.i(711434),r=e.i(938518),l=e.i(939200),d=e.i(267669),i=e.i(3214),n=e.i(131777),c=e.i(735364),o=e.i(698127),m=e.i(81846),u=e.i(204461),x=e.i(141957),h=e.i(547373),p=e.i(317406);let b={Admin:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",Member:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",Guest:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"};function j({projectId:e,members:a,currentUserId:r,onAddMember:l,onRemoveMember:d,onUpdateRole:i}){let[n,u]=(0,s.useState)(a),[j,v]=(0,s.useState)(""),[g,f]=(0,s.useState)(p.ProjectRole.Member),[N,S]=(0,s.useState)(null),[y,w]=(0,s.useState)(!1),k=n.some(e=>e.userId===r&&e.role===p.ProjectRole.Admin),C=(0,s.useCallback)(async()=>{if(!j.trim())return;w(!0),S(null);let t=await l({projectId:e,userId:j.trim(),role:g,actorId:r});t.error?S(t.error):t.member&&(u(e=>[...e,t.member]),v(""),f(p.ProjectRole.Member)),w(!1)},[j,g,e,r,l]),R=(0,s.useCallback)(async t=>{S(null);let s=await d({projectId:e,userId:t,actorId:r});s.error?S(s.error):u(e=>e.filter(e=>e.userId!==t))},[e,r,d]),I=(0,s.useCallback)(async(t,s)=>{S(null);let a=await i({projectId:e,userId:t,newRole:s,actorId:r});a.error?S(a.error):u(e=>e.map(e=>e.userId===t?{...e,role:s}:e))},[e,r,i]);return(0,t.jsxs)("div",{"data-testid":"project-members-panel",className:"space-y-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Project Members"}),N?(0,t.jsx)("div",{"data-testid":"members-error",className:"rounded border border-red-200 bg-red-50 p-3 text-sm text-red-800 dark:border-red-800 dark:bg-red-950 dark:text-red-300",children:N}):null,(0,t.jsxs)("div",{className:"divide-y rounded border",children:[n.map(e=>(0,t.jsxs)("div",{"data-testid":`member-row-${e.userId}`,className:"flex items-center justify-between p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.userId}),(0,t.jsx)(m.Badge,{className:b[e.role]??"",variant:"secondary",children:e.role})]}),k&&e.userId!==r?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(h.Select,{value:e.role,onValueChange:t=>I(e.userId,t),children:[(0,t.jsx)(h.SelectTrigger,{className:"w-[120px]",children:(0,t.jsx)(h.SelectValue,{})}),(0,t.jsxs)(h.SelectContent,{children:[(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Admin,children:"Admin"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Member,children:"Member"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Guest,children:"Guest"})]})]}),(0,t.jsx)(c.Button,{variant:"destructive",size:"sm",onClick:()=>R(e.userId),children:"Remove"})]}):null]},e.id)),0===n.length&&(0,t.jsx)("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No members in this project."})]}),k?(0,t.jsxs)("div",{"data-testid":"add-member-form",className:"flex items-end gap-3 rounded border p-3",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(x.Label,{htmlFor:"new-user-id",children:"User ID"}),(0,t.jsx)(o.Input,{id:"new-user-id",value:j,onChange:e=>v(e.target.value),placeholder:"Enter user ID",disabled:y})]}),(0,t.jsxs)("div",{className:"w-[140px]",children:[(0,t.jsx)(x.Label,{htmlFor:"new-role",children:"Role"}),(0,t.jsxs)(h.Select,{value:g,onValueChange:e=>f(e),children:[(0,t.jsx)(h.SelectTrigger,{id:"new-role",children:(0,t.jsx)(h.SelectValue,{})}),(0,t.jsxs)(h.SelectContent,{children:[(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Admin,children:"Admin"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Member,children:"Member"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Guest,children:"Guest"})]})]})]}),(0,t.jsx)(c.Button,{onClick:C,disabled:y||!j.trim(),children:y?"Adding...":"Add Member"})]}):null]})}var v=e.i(143972),g=e.i(508893);let f=(0,g.createServerReference)("40289a4e863f54f78381dfbe15c63e8a178430576a",g.callServer,void 0,g.findSourceMapURL,"deletePmProject"),N=(0,g.createServerReference)("4030a2f311e416baf7edadcebe8c87c71dc09539fb",g.callServer,void 0,g.findSourceMapURL,"createWorkItemState"),S=(0,g.createServerReference)("402e71f701be517941a93d5eef136a547831f34527",g.callServer,void 0,g.findSourceMapURL,"deleteWorkItemState"),y=(0,g.createServerReference)("40d046f0c0e592036d89328c22271fd61610900338",g.callServer,void 0,g.findSourceMapURL,"createLabel"),w=(0,g.createServerReference)("40d2670c7ce03e2093c350e67b3c5d659067343118",g.callServer,void 0,g.findSourceMapURL,"deleteLabel"),k=(0,g.createServerReference)("408a61da1b8e721521f0bed672fc7870960ed3ed89",g.callServer,void 0,g.findSourceMapURL,"addProjectMember"),C=(0,g.createServerReference)("40e07ae6b9d836379d413f0ed53da44b07e0f06b26",g.callServer,void 0,g.findSourceMapURL,"removeProjectMember"),R=(0,g.createServerReference)("406d28830ca590cdcd0368927f56f1b8f2eadb6ed2",g.callServer,void 0,g.findSourceMapURL,"updateProjectMemberRole"),I={backlog:"bg-gray-400",unstarted:"bg-blue-400",started:"bg-yellow-400",completed:"bg-green-400",cancelled:"bg-red-400"};function P({project:e,states:x,labels:h,members:p=[],className:b}){let g=(0,a.useRouter)(),[P,M]=(0,s.useState)(e.name),[L,B]=(0,s.useState)(e.description??""),[T,A]=(0,s.useState)(!1),[U,z]=(0,s.useState)(x),[D,E]=(0,s.useState)(h),[G,V]=(0,s.useState)(""),[$,K]=(0,s.useState)(""),[F,O]=(0,s.useState)("#6366f1"),[W,H]=(0,s.useState)(""),X=(0,s.useCallback)(async()=>{A(!0),await (0,v.updatePmProject)(e.id,{name:P.trim(),description:L.trim()||void 0}),A(!1)},[e.id,P,L]),Z=(0,s.useCallback)(async()=>{if(!G.trim())return;let t=await N({projectId:e.id,name:G.trim(),color:"#6366f1",stateGroup:"unstarted"});t.state&&(z(e=>[...e,t.state]),V(""))},[e.id,G]),q=(0,s.useCallback)(async e=>{(await S(e)).error||z(t=>t.filter(t=>t.id!==e))},[]),J=(0,s.useCallback)(async()=>{if(!$.trim())return;let t=await y({projectId:e.id,name:$.trim(),color:F});t.label&&(E(e=>[...e,t.label]),K(""))},[e.id,$,F]),Q=(0,s.useCallback)(async e=>{(await w(e)).error||E(t=>t.filter(t=>t.id!==e))},[]),Y=(0,s.useCallback)(async()=>{W!==e.name||(await f(e.id)).error||g.push("/projects")},[e.id,e.name,W,g]);return(0,t.jsxs)("div",{"data-testid":"project-settings",className:(0,n.cn)("max-w-2xl space-y-8",b),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>g.push(`/projects/${e.slug}`),"data-testid":"back-to-project",children:(0,t.jsx)(r.ArrowLeft,{className:"h-4 w-4"})}),(0,t.jsx)(l.Settings,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Project Settings"}),(0,t.jsx)(m.Badge,{variant:"outline",className:"text-[10px]",children:e.identifierPrefix})]}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"general-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"General"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:"Project Name"}),(0,t.jsx)(o.Input,{value:P,onChange:e=>M(e.target.value),className:"h-8 text-xs","data-testid":"project-name-input"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:"Description"}),(0,t.jsx)(o.Input,{value:L,onChange:e=>B(e.target.value),placeholder:"Optional description",className:"h-8 text-xs","data-testid":"project-description-input"})]}),(0,t.jsx)(c.Button,{size:"sm",className:"h-7 text-xs",onClick:X,disabled:T||!P.trim(),"data-testid":"save-general-btn",children:T?"Saving...":"Save Changes"})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)("section",{"data-testid":"estimate-settings-section",children:(0,t.jsx)(u.EstimateSettings,{projectId:e.id,currentEstimateType:e.estimateType})}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"states-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"Work Item States"}),(0,t.jsx)("div",{className:"space-y-1",children:U.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-sm px-2 py-1 text-xs","data-testid":`state-${e.id}`,children:[(0,t.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"flex-1",children:e.name}),(0,t.jsx)(m.Badge,{variant:"outline",className:(0,n.cn)("text-[9px]",I[e.stateGroup]??"bg-gray-400"),children:e.stateGroup}),e.isDefault?(0,t.jsx)(m.Badge,{variant:"secondary",className:"text-[9px]",children:"default"}):(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",className:"text-destructive hidden h-5 w-5 p-0 group-hover:flex",onClick:()=>q(e.id),title:"Delete state",children:(0,t.jsx)(d.Trash2,{className:"h-3 w-3"})})]},e.id))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:G,onChange:e=>V(e.target.value),placeholder:"New state name",className:"h-7 flex-1 text-xs","data-testid":"new-state-input",onKeyDown:e=>{"Enter"===e.key&&Z()}}),(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:Z,disabled:!G.trim(),"data-testid":"add-state-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"Add"]})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"labels-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"Labels"}),0===D.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No labels yet"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-1 rounded-full border px-2 py-0.5","data-testid":`label-${e.id}`,children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"text-[10px]",children:e.name}),(0,t.jsx)("button",{type:"button",className:"text-destructive ml-0.5 hidden text-xs group-hover:inline",onClick:()=>Q(e.id),title:"Delete label",children:"×"})]},e.id))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"color",value:F,onChange:e=>O(e.target.value),className:"h-7 w-7 cursor-pointer rounded border-0 p-0","data-testid":"new-label-color"}),(0,t.jsx)(o.Input,{value:$,onChange:e=>K(e.target.value),placeholder:"New label name",className:"h-7 flex-1 text-xs","data-testid":"new-label-input",onKeyDown:e=>{"Enter"===e.key&&J()}}),(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:J,disabled:!$.trim(),"data-testid":"add-label-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"Add"]})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)("section",{"data-testid":"members-settings",children:(0,t.jsx)(j,{projectId:e.id,members:p,currentUserId:"",onAddMember:k,onRemoveMember:C,onUpdateRole:R})}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"danger-zone",children:[(0,t.jsx)("h2",{className:"text-destructive text-xs font-semibold tracking-wide uppercase",children:"Danger Zone"}),(0,t.jsxs)("div",{className:"border-destructive/20 rounded-md border p-3",children:[(0,t.jsx)("p",{className:"mb-2 text-xs",children:"Permanently delete this project and all its work items, cycles, modules, and pages."}),(0,t.jsxs)("p",{className:"text-muted-foreground mb-2 text-[10px]",children:["Type ",(0,t.jsx)("strong",{children:e.name})," to confirm."]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:W,onChange:e=>H(e.target.value),placeholder:e.name,className:"h-7 flex-1 text-xs","data-testid":"delete-confirm-input"}),(0,t.jsxs)(c.Button,{variant:"destructive",size:"sm",className:"h-7 text-xs",onClick:Y,disabled:W!==e.name,"data-testid":"delete-project-btn",children:[(0,t.jsx)(d.Trash2,{className:"mr-1 h-3 w-3"}),"Delete Project"]})]})]})]})]})}e.s(["ProjectSettingsClient",()=>P],649749)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),s=e.i(131777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:a,...l}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...l})}e.s(["Badge",()=>l])},267669,e=>{"use strict";let t=(0,e.i(903645).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],267669)},938518,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],938518)},204461,561306,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(735364),r=e.i(81846),l=e.i(317406),d=e.i(508893);let i=(0,d.createServerReference)("607abe1eb43e21b75d600961be2ea3d2e9574d38fc",d.callServer,void 0,d.findSourceMapURL,"updatePmProject");e.s(["updatePmProject",()=>i],561306);let n=[{value:l.EstimateType.None,label:"None",description:"No estimates"},{value:l.EstimateType.Category,label:"T-Shirt Sizes",description:"XS, S, M, L, XL"},{value:l.EstimateType.Points,label:"Fibonacci Points",description:"1, 2, 3, 5, 8, 13, 21"}];function c({projectId:e,currentEstimateType:l,onEstimateTypeChange:d,className:c}){let[o,m]=(0,a.useState)(l),[u,x]=(0,a.useState)(!1),h=async t=>{t!==o&&(m(t),x(!0),await i(e,{estimateType:t}),x(!1),d?.(t))};return(0,t.jsxs)("div",{"data-testid":"estimate-settings",className:c,children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("h3",{className:"text-xs font-medium",children:"Estimate System"}),u?(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:"Saving..."}):null]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>(0,t.jsx)(s.Button,{variant:o===e.value?"default":"outline",size:"sm",className:"h-auto w-full justify-start px-3 py-2 text-left",onClick:()=>h(e.value),"data-testid":`estimate-option-${e.value}`,children:(0,t.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.label}),(0,t.jsx)("span",{className:"text-muted-foreground ml-2 text-[10px]",children:e.description})]}),o===e.value?(0,t.jsx)(r.Badge,{variant:"secondary",className:"text-[10px]",children:"Active"}):null]})},e.value))})]})}e.s(["EstimateSettings",()=>c],204461)},649749,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),r=e.i(938518),l=e.i(939200),d=e.i(267669),i=e.i(3214),n=e.i(131777),c=e.i(735364),o=e.i(698127),m=e.i(81846),u=e.i(204461),x=e.i(141957),h=e.i(547373),p=e.i(317406);let b={Admin:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",Member:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",Guest:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"};function j({projectId:e,members:s,currentUserId:r,onAddMember:l,onRemoveMember:d,onUpdateRole:i}){let[n,u]=(0,a.useState)(s),[j,v]=(0,a.useState)(""),[g,f]=(0,a.useState)(p.ProjectRole.Member),[N,S]=(0,a.useState)(null),[y,w]=(0,a.useState)(!1),k=n.some(e=>e.userId===r&&e.role===p.ProjectRole.Admin),C=(0,a.useCallback)(async()=>{if(!j.trim())return;w(!0),S(null);let t=await l({projectId:e,userId:j.trim(),role:g,actorId:r});t.error?S(t.error):t.member&&(u(e=>[...e,t.member]),v(""),f(p.ProjectRole.Member)),w(!1)},[j,g,e,r,l]),R=(0,a.useCallback)(async t=>{S(null);let a=await d({projectId:e,userId:t,actorId:r});a.error?S(a.error):u(e=>e.filter(e=>e.userId!==t))},[e,r,d]),I=(0,a.useCallback)(async(t,a)=>{S(null);let s=await i({projectId:e,userId:t,newRole:a,actorId:r});s.error?S(s.error):u(e=>e.map(e=>e.userId===t?{...e,role:a}:e))},[e,r,i]);return(0,t.jsxs)("div",{"data-testid":"project-members-panel",className:"space-y-4",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold",children:"Project Members"}),N?(0,t.jsx)("div",{"data-testid":"members-error",className:"rounded border border-red-200 bg-red-50 p-3 text-sm text-red-800 dark:border-red-800 dark:bg-red-950 dark:text-red-300",children:N}):null,(0,t.jsxs)("div",{className:"divide-y rounded border",children:[n.map(e=>(0,t.jsxs)("div",{"data-testid":`member-row-${e.userId}`,className:"flex items-center justify-between p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.userId}),(0,t.jsx)(m.Badge,{className:b[e.role]??"",variant:"secondary",children:e.role})]}),k&&e.userId!==r?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(h.Select,{value:e.role,onValueChange:t=>I(e.userId,t),children:[(0,t.jsx)(h.SelectTrigger,{className:"w-[120px]",children:(0,t.jsx)(h.SelectValue,{})}),(0,t.jsxs)(h.SelectContent,{children:[(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Admin,children:"Admin"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Member,children:"Member"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Guest,children:"Guest"})]})]}),(0,t.jsx)(c.Button,{variant:"destructive",size:"sm",onClick:()=>R(e.userId),children:"Remove"})]}):null]},e.id)),0===n.length&&(0,t.jsx)("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No members in this project."})]}),k?(0,t.jsxs)("div",{"data-testid":"add-member-form",className:"flex items-end gap-3 rounded border p-3",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(x.Label,{htmlFor:"new-user-id",children:"User ID"}),(0,t.jsx)(o.Input,{id:"new-user-id",value:j,onChange:e=>v(e.target.value),placeholder:"Enter user ID",disabled:y})]}),(0,t.jsxs)("div",{className:"w-[140px]",children:[(0,t.jsx)(x.Label,{htmlFor:"new-role",children:"Role"}),(0,t.jsxs)(h.Select,{value:g,onValueChange:e=>f(e),children:[(0,t.jsx)(h.SelectTrigger,{id:"new-role",children:(0,t.jsx)(h.SelectValue,{})}),(0,t.jsxs)(h.SelectContent,{children:[(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Admin,children:"Admin"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Member,children:"Member"}),(0,t.jsx)(h.SelectItem,{value:p.ProjectRole.Guest,children:"Guest"})]})]})]}),(0,t.jsx)(c.Button,{onClick:C,disabled:y||!j.trim(),children:y?"Adding...":"Add Member"})]}):null]})}var v=e.i(561306),g=e.i(508893);let f=(0,g.createServerReference)("4017a70c5c1e2da830ce1a9c053d40c3f67e72d9cb",g.callServer,void 0,g.findSourceMapURL,"deletePmProject"),N=(0,g.createServerReference)("40ef962d6872be283839fc987699032959d5b66114",g.callServer,void 0,g.findSourceMapURL,"createWorkItemState"),S=(0,g.createServerReference)("40aab04f82dea5df4c7b0f176bf9d7e9c590c52ea7",g.callServer,void 0,g.findSourceMapURL,"deleteWorkItemState"),y=(0,g.createServerReference)("4097ac3d9da3a1fd6741976ecb84042481a920e8a6",g.callServer,void 0,g.findSourceMapURL,"createLabel"),w=(0,g.createServerReference)("4036ad604274b05ade8b75c7ed91b1aa99550036da",g.callServer,void 0,g.findSourceMapURL,"deleteLabel"),k=(0,g.createServerReference)("40b559ec5522a09d854d7b046575eceb8610c57161",g.callServer,void 0,g.findSourceMapURL,"addProjectMember"),C=(0,g.createServerReference)("40a2d46892357d491f2e95c0b6d19147256a62e455",g.callServer,void 0,g.findSourceMapURL,"removeProjectMember"),R=(0,g.createServerReference)("402f9a6fffdda99b6fbaba4f7d41f10bbc70d8cc38",g.callServer,void 0,g.findSourceMapURL,"updateProjectMemberRole"),I={backlog:"bg-gray-400",unstarted:"bg-blue-400",started:"bg-yellow-400",completed:"bg-green-400",cancelled:"bg-red-400"};function P({project:e,states:x,labels:h,members:p=[],className:b}){let g=(0,s.useRouter)(),[P,M]=(0,a.useState)(e.name),[L,B]=(0,a.useState)(e.description??""),[T,A]=(0,a.useState)(!1),[U,z]=(0,a.useState)(x),[D,E]=(0,a.useState)(h),[G,V]=(0,a.useState)(""),[$,K]=(0,a.useState)(""),[F,O]=(0,a.useState)("#6366f1"),[W,H]=(0,a.useState)(""),X=(0,a.useCallback)(async()=>{A(!0),await (0,v.updatePmProject)(e.id,{name:P.trim(),description:L.trim()||void 0}),A(!1)},[e.id,P,L]),Z=(0,a.useCallback)(async()=>{if(!G.trim())return;let t=await N({projectId:e.id,name:G.trim(),color:"#6366f1",stateGroup:"unstarted"});t.state&&(z(e=>[...e,t.state]),V(""))},[e.id,G]),q=(0,a.useCallback)(async e=>{(await S(e)).error||z(t=>t.filter(t=>t.id!==e))},[]),J=(0,a.useCallback)(async()=>{if(!$.trim())return;let t=await y({projectId:e.id,name:$.trim(),color:F});t.label&&(E(e=>[...e,t.label]),K(""))},[e.id,$,F]),Q=(0,a.useCallback)(async e=>{(await w(e)).error||E(t=>t.filter(t=>t.id!==e))},[]),Y=(0,a.useCallback)(async()=>{W!==e.name||(await f(e.id)).error||g.push("/projects")},[e.id,e.name,W,g]);return(0,t.jsxs)("div",{"data-testid":"project-settings",className:(0,n.cn)("max-w-2xl space-y-8",b),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>g.push(`/projects/${e.slug}`),"data-testid":"back-to-project",children:(0,t.jsx)(r.ArrowLeft,{className:"h-4 w-4"})}),(0,t.jsx)(l.Settings,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Project Settings"}),(0,t.jsx)(m.Badge,{variant:"outline",className:"text-[10px]",children:e.identifierPrefix})]}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"general-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"General"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:"Project Name"}),(0,t.jsx)(o.Input,{value:P,onChange:e=>M(e.target.value),className:"h-8 text-xs","data-testid":"project-name-input"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:"Description"}),(0,t.jsx)(o.Input,{value:L,onChange:e=>B(e.target.value),placeholder:"Optional description",className:"h-8 text-xs","data-testid":"project-description-input"})]}),(0,t.jsx)(c.Button,{size:"sm",className:"h-7 text-xs",onClick:X,disabled:T||!P.trim(),"data-testid":"save-general-btn",children:T?"Saving...":"Save Changes"})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)("section",{"data-testid":"estimate-settings-section",children:(0,t.jsx)(u.EstimateSettings,{projectId:e.id,currentEstimateType:e.estimateType})}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"states-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"Work Item States"}),(0,t.jsx)("div",{className:"space-y-1",children:U.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-sm px-2 py-1 text-xs","data-testid":`state-${e.id}`,children:[(0,t.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"flex-1",children:e.name}),(0,t.jsx)(m.Badge,{variant:"outline",className:(0,n.cn)("text-[9px]",I[e.stateGroup]??"bg-gray-400"),children:e.stateGroup}),e.isDefault?(0,t.jsx)(m.Badge,{variant:"secondary",className:"text-[9px]",children:"default"}):(0,t.jsx)(c.Button,{variant:"ghost",size:"sm",className:"text-destructive hidden h-5 w-5 p-0 group-hover:flex",onClick:()=>q(e.id),title:"Delete state",children:(0,t.jsx)(d.Trash2,{className:"h-3 w-3"})})]},e.id))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:G,onChange:e=>V(e.target.value),placeholder:"New state name",className:"h-7 flex-1 text-xs","data-testid":"new-state-input",onKeyDown:e=>{"Enter"===e.key&&Z()}}),(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:Z,disabled:!G.trim(),"data-testid":"add-state-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"Add"]})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"labels-settings",children:[(0,t.jsx)("h2",{className:"text-xs font-semibold tracking-wide uppercase",children:"Labels"}),0===D.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No labels yet"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:D.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-1 rounded-full border px-2 py-0.5","data-testid":`label-${e.id}`,children:[(0,t.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"text-[10px]",children:e.name}),(0,t.jsx)("button",{type:"button",className:"text-destructive ml-0.5 hidden text-xs group-hover:inline",onClick:()=>Q(e.id),title:"Delete label",children:"×"})]},e.id))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"color",value:F,onChange:e=>O(e.target.value),className:"h-7 w-7 cursor-pointer rounded border-0 p-0","data-testid":"new-label-color"}),(0,t.jsx)(o.Input,{value:$,onChange:e=>K(e.target.value),placeholder:"New label name",className:"h-7 flex-1 text-xs","data-testid":"new-label-input",onKeyDown:e=>{"Enter"===e.key&&J()}}),(0,t.jsxs)(c.Button,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:J,disabled:!$.trim(),"data-testid":"add-label-btn",children:[(0,t.jsx)(i.Plus,{className:"mr-1 h-3 w-3"}),"Add"]})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)("section",{"data-testid":"members-settings",children:(0,t.jsx)(j,{projectId:e.id,members:p,currentUserId:"",onAddMember:k,onRemoveMember:C,onUpdateRole:R})}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsxs)("section",{className:"space-y-3","data-testid":"danger-zone",children:[(0,t.jsx)("h2",{className:"text-destructive text-xs font-semibold tracking-wide uppercase",children:"Danger Zone"}),(0,t.jsxs)("div",{className:"border-destructive/20 rounded-md border p-3",children:[(0,t.jsx)("p",{className:"mb-2 text-xs",children:"Permanently delete this project and all its work items, cycles, modules, and pages."}),(0,t.jsxs)("p",{className:"text-muted-foreground mb-2 text-[10px]",children:["Type ",(0,t.jsx)("strong",{children:e.name})," to confirm."]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.Input,{value:W,onChange:e=>H(e.target.value),placeholder:e.name,className:"h-7 flex-1 text-xs","data-testid":"delete-confirm-input"}),(0,t.jsxs)(c.Button,{variant:"destructive",size:"sm",className:"h-7 text-xs",onClick:Y,disabled:W!==e.name,"data-testid":"delete-project-btn",children:[(0,t.jsx)(d.Trash2,{className:"mr-1 h-3 w-3"}),"Delete Project"]})]})]})]})]})}e.s(["ProjectSettingsClient",()=>P],649749)}]);
|