@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
|
@@ -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),s=e.i(131777);let i=(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 r({className:e,variant:a,...r}){return(0,t.jsx)("div",{className:(0,s.cn)(i({variant:a}),e),...r})}e.s(["Badge",()=>r])},935946,e=>{"use strict";var t=e.i(943698);e.s(["Paperclip",()=>t.default])},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)},943698,176505,57484,e=>{"use strict";var t=e.i(903645);let a=(0,t.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["default",()=>a],943698);let s=(0,t.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",()=>s],176505),e.s(["FileIcon",()=>s],57484)},602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),i=e.i(860253),r=e.i(131777);let l=s.Dialog.Root,n=s.Dialog.Trigger,d=s.Dialog.Portal,o=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...i},l)=>(0,t.jsx)(s.Dialog.Overlay,{ref:l,className:(0,r.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(),a?.(e)},...i}));c.displayName=s.Dialog.Overlay.displayName;let m=a.forwardRef(({className:e,children:a,...l},n)=>(0,t.jsxs)(d,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,r.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),...l,children:[a,(0,t.jsxs)(s.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)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName=s.Dialog.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});u.displayName="DialogHeader";let x=({className:e,...a})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});x.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Dialog.Title,{ref:i,className:(0,r.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=s.Dialog.Title.displayName;let h=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Dialog.Description,{ref:i,className:(0,r.cn)("text-muted-foreground text-sm",e),...a}));h.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>o,"DialogContent",()=>m,"DialogDescription",()=>h,"DialogFooter",()=>x,"DialogHeader",()=>u,"DialogTitle",()=>p,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},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])},958481,215131,e=>{"use strict";let t=(0,e.i(903645).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",()=>t],215131),e.s(["AlertTriangle",()=>t],958481)},976874,e=>{"use strict";let t=(0,e.i(903645).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",()=>t],976874)},681181,e=>{"use strict";var t=e.i(295230);e.s(["Download",()=>t.default])},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)},405682,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(602287),i=e.i(735364),r=e.i(698127),l=e.i(141957),n=e.i(48306),d=e.i(547373),o=e.i(508893);let c=(0,o.createServerReference)("4038611893fca35970b1c4b096c7c4dce49443e749",o.callServer,void 0,o.findSourceMapURL,"createWorkItem");function m({open:e,onOpenChange:o,projectId:m,states:u,onCreated:x,parentId:p}){let[h,g]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[N,b]=(0,a.useState)("None"),[k,w]=(0,a.useState)(null),[S,D]=(0,a.useState)(!1),I=async()=>{w(null),D(!0);try{let e=await c({projectId:m,title:h,description:f||void 0,stateId:v||void 0,priority:N||void 0,parentId:p??void 0});e.error?w(e.error):e.workItem&&(x(e.workItem),g(""),j(""),y(""),b("None"))}finally{D(!1)}};return(0,t.jsx)(s.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(s.DialogContent,{"data-testid":"create-work-item-dialog",children:[(0,t.jsx)(s.DialogHeader,{children:(0,t.jsx)(s.DialogTitle,{children:p?"Create Sub-item":"Create Work Item"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"work-item-title",children:"Title"}),(0,t.jsx)(r.Input,{id:"work-item-title",value:h,onChange:e=>g(e.target.value),placeholder:"What needs to be done?","data-testid":"work-item-title-input"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"work-item-desc",children:"Description (optional)"}),(0,t.jsx)(n.Textarea,{id:"work-item-desc",value:f,onChange:e=>j(e.target.value),placeholder:"Add more details...",rows:3,"data-testid":"work-item-desc-input"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:"State"}),(0,t.jsxs)(d.Select,{value:v,onValueChange:y,children:[(0,t.jsx)(d.SelectTrigger,{"data-testid":"work-item-state-select",children:(0,t.jsx)(d.SelectValue,{placeholder:"Default"})}),(0,t.jsx)(d.SelectContent,{children:u.map(e=>(0,t.jsx)(d.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:"Priority"}),(0,t.jsxs)(d.Select,{value:N,onValueChange:b,children:[(0,t.jsx)(d.SelectTrigger,{"data-testid":"work-item-priority-select",children:(0,t.jsx)(d.SelectValue,{placeholder:"None"})}),(0,t.jsxs)(d.SelectContent,{children:[(0,t.jsx)(d.SelectItem,{value:"None",children:"None"}),(0,t.jsx)(d.SelectItem,{value:"Low",children:"Low"}),(0,t.jsx)(d.SelectItem,{value:"Medium",children:"Medium"}),(0,t.jsx)(d.SelectItem,{value:"High",children:"High"}),(0,t.jsx)(d.SelectItem,{value:"Urgent",children:"Urgent"})]})]})]})]}),k?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"create-work-item-error",children:k}):null]}),(0,t.jsxs)(s.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>o(!1),disabled:S,children:"Cancel"}),(0,t.jsx)(i.Button,{onClick:I,disabled:!h.trim()||S,"data-testid":"create-work-item-submit",children:S?"Creating...":"Create"})]})]})})}e.s(["CreateWorkItemDialog",()=>m],405682)},149809,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),i=e.i(938518),r=e.i(131777),l=e.i(735364),n=e.i(81846),d=e.i(903645);let o=(0,d.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var c=e.i(860253),m=e.i(3214),u=e.i(83428),x=e.i(317406),p=e.i(508893);let h=(0,p.createServerReference)("4033c4021394916e42cdeece43333b1a1a531cd15a",p.callServer,void 0,p.findSourceMapURL,"listWorkItemRelations"),g=(0,p.createServerReference)("4071227318669ea1cb7748bed916e264b516fa38e0",p.callServer,void 0,p.findSourceMapURL,"deleteWorkItemRelation");var f=e.i(602287),j=e.i(698127),v=e.i(141957),y=e.i(547373);let N=(0,p.createServerReference)("40218e7c2ef388cf2deda721d08cfcebd63684fc61",p.callServer,void 0,p.findSourceMapURL,"createWorkItemRelation"),b=[{value:x.RelationType.Blocking,label:"Blocking"},{value:x.RelationType.RelatesTo,label:"Relates to"},{value:x.RelationType.Duplicate,label:"Duplicate"},{value:x.RelationType.StartsBefore,label:"Starts before"},{value:x.RelationType.FinishesBefore,label:"Finishes before"}];function k({open:e,onOpenChange:s,sourceWorkItemId:i,onCreated:r}){let[n,d]=(0,a.useState)(x.RelationType.RelatesTo),[o,c]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),[p,h]=(0,a.useState)(!1),g=async()=>{if(u(null),!o.trim())return void u("Target work item ID is required");h(!0);try{let e=await N({sourceWorkItemId:i,targetWorkItemId:o.trim(),relationType:n});e.error?u(e.error):e.relation&&(r(e.relation),c(""),d(x.RelationType.RelatesTo))}finally{h(!1)}};return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(f.DialogContent,{"data-testid":"add-relation-dialog",children:[(0,t.jsx)(f.DialogHeader,{children:(0,t.jsx)(f.DialogTitle,{children:"Add Relation"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Label,{htmlFor:"relation-type",children:"Relation Type"}),(0,t.jsxs)(y.Select,{value:n,onValueChange:d,children:[(0,t.jsx)(y.SelectTrigger,{"data-testid":"relation-type-select",children:(0,t.jsx)(y.SelectValue,{placeholder:"Select type"})}),(0,t.jsx)(y.SelectContent,{children:b.map(e=>(0,t.jsx)(y.SelectItem,{value:e.value,children:e.label},e.value))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Label,{htmlFor:"target-work-item",children:"Target Work Item ID"}),(0,t.jsx)(j.Input,{id:"target-work-item",value:o,onChange:e=>c(e.target.value),placeholder:"Enter work item ID or identifier","data-testid":"target-work-item-input"})]}),m?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"add-relation-error",children:m}):null]}),(0,t.jsxs)(f.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>s(!1),disabled:p,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:g,disabled:!o.trim()||p,"data-testid":"add-relation-submit",children:p?"Adding...":"Add Relation"})]})]})})}let w={[x.RelationType.Blocking]:"Blocking",[x.RelationType.RelatesTo]:"Relates to",[x.RelationType.Duplicate]:"Duplicate of",[x.RelationType.StartsBefore]:"Starts before",[x.RelationType.FinishesBefore]:"Finishes before"};function S({workItemId:e,workItemsMap:s,projectPrefix:i,initialRelations:d,className:x}){let[p,f]=(0,a.useState)(d??[]),[j,v]=(0,a.useState)(!d),[y,N]=(0,a.useState)(null),[b,S]=(0,a.useState)(!1),[D,I]=(0,a.useState)(null),C=(0,a.useCallback)(async()=>{v(!0),N(null);let t=await h(e);t.error?N(t.error):t.relations&&f(t.relations),v(!1)},[e]);(0,a.useEffect)(()=>{d||C()},[C,d]);let T=async e=>{I(e);let t=await g(e);t.error?N(t.error):f(t=>t.filter(t=>t.id!==e)),I(null)},R=function(e){let t=new Map;for(let a of e){let e=t.get(a.relationType)??[];e.push(a),t.set(a.relationType,e)}return Array.from(t.entries()).map(([e,t])=>({type:e,items:t}))}(p);return(0,t.jsxs)("div",{"data-testid":"work-item-relations-panel",className:(0,r.cn)("space-y-3",x),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(o,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Relations"}),p.length>0&&(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:p.length})]}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[10px]",onClick:()=>S(!0),"data-testid":"add-relation-btn",children:[(0,t.jsx)(m.Plus,{className:"mr-0.5 h-3 w-3"}),"Add"]})]}),j?(0,t.jsx)("div",{className:"flex items-center justify-center py-4","data-testid":"relations-loading",children:(0,t.jsx)(u.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"})}):null,y?(0,t.jsx)("p",{className:"text-destructive text-[10px]","data-testid":"relations-error",children:y}):null,!j&&0===p.length&&!y&&(0,t.jsx)("p",{className:"text-muted-foreground py-2 text-center text-[10px]","data-testid":"relations-empty",children:"No relations yet."}),!j&&R.length>0&&(0,t.jsx)("div",{className:"space-y-2","data-testid":"relations-list",children:R.map(({type:a,items:r})=>(0,t.jsxs)("div",{"data-testid":`relation-group-${a}`,children:[(0,t.jsx)("span",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:w[a]??a}),(0,t.jsx)("div",{className:"space-y-1",children:r.map(a=>{let r,d,o,m;return(0,t.jsxs)("div",{"data-testid":`relation-item-${a.id}`,className:"hover:bg-accent/50 flex items-center gap-2 rounded px-2 py-1 transition-colors",children:[(0,t.jsx)(n.Badge,{variant:"outline",className:"shrink-0 font-mono text-[10px]",children:(r=a.sourceWorkItemId===e?a.targetWorkItemId:a.sourceWorkItemId,(d=s.get(r))?`${i}-${d.sequenceId}`:r.substring(0,8))}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px]",children:(o=a.sourceWorkItemId===e?a.targetWorkItemId:a.sourceWorkItemId,m=s.get(o),m?.title??"Unknown item")}),(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 shrink-0 p-0",onClick:()=>T(a.id),disabled:D===a.id,"data-testid":`delete-relation-${a.id}`,children:D===a.id?(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(c.X,{className:"h-3 w-3"})})]},a.id)})})]},a))}),(0,t.jsx)(k,{open:b,onOpenChange:S,sourceWorkItemId:e,onCreated:e=>{f(t=>[...t,e]),S(!1)}})]})}var D=e.i(976874),I=e.i(958481),C=e.i(405682);let T={Urgent:"bg-red-500/10 text-red-500",High:"bg-orange-500/10 text-orange-500",Medium:"bg-yellow-500/10 text-yellow-500",Low:"bg-blue-500/10 text-blue-500",None:"bg-muted text-muted-foreground"};function R({workItem:e,allWorkItems:s,states:i,projectPrefix:d,projectId:o,currentDepth:c=0,onSubItemClick:u,className:x}){let[p,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)([]),j=new Map(i.map(e=>[e.id,e])),v=[...s.filter(t=>t.parentId===e.id),...g.filter(e=>!s.some(t=>t.id===e.id))],y=c>=2;return(0,t.jsxs)("div",{"data-testid":"sub-items-section",className:(0,r.cn)("space-y-3",x),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.Layers,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Sub-items"}),v.length>0&&(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:v.length})]}),!y&&(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[10px]",onClick:()=>h(!0),"data-testid":"add-sub-item-btn",children:[(0,t.jsx)(m.Plus,{className:"mr-0.5 h-3 w-3"}),"Add"]})]}),y?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded bg-yellow-500/10 px-2 py-1.5","data-testid":"max-depth-warning",children:[(0,t.jsx)(I.AlertTriangle,{className:"h-3 w-3 shrink-0 text-yellow-500"}),(0,t.jsxs)("span",{className:"text-[10px] text-yellow-600 dark:text-yellow-400",children:["Maximum nesting depth reached (",3," levels). Cannot add sub-items here."]})]}):null,0===v.length&&!y&&(0,t.jsx)("p",{className:"text-muted-foreground py-2 text-center text-[10px]","data-testid":"sub-items-empty",children:"No sub-items yet."}),v.length>0&&(0,t.jsx)("div",{className:"divide-y rounded-lg border","data-testid":"sub-items-list",children:v.map(e=>{let a=j.get(e.stateId),s=`${d}-${e.sequenceId}`;return(0,t.jsxs)("div",{"data-testid":`sub-item-${s}`,className:"hover:bg-accent/50 flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors",onClick:()=>u?.(e),role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&u?.(e)},children:[(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 font-mono text-[10px]",children:s}),a?(0,t.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:a.color},title:a.name}):null,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs",children:e.title}),e.priority&&"None"!==e.priority?(0,t.jsx)(n.Badge,{variant:"secondary",className:`shrink-0 text-[10px] ${T[e.priority]??""}`,children:e.priority}):null]},e.id)})}),!y&&(0,t.jsx)(C.CreateWorkItemDialog,{open:p,onOpenChange:h,projectId:o,states:i,onCreated:e=>{f(t=>[...t,e]),h(!1)},parentId:e.id})]})}var M=e.i(935946),B=e.i(267669),L=e.i(681181);let A=(0,d.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var z=e.i(57484);let $=(0,p.createServerReference)("4044cd38a2292132e1ee473b049c8f1f3f1c6e5546",p.callServer,void 0,p.findSourceMapURL,"deleteAttachment");function W({workItemId:e,attachments:s,className:i}){let[n,d]=(0,a.useState)(s),[o,c]=(0,a.useState)(!1),m=(0,a.useRef)(null),u=(0,a.useCallback)(async t=>{if(t&&0!==t.length){c(!0);try{for(let a of Array.from(t)){let t=new FormData;t.append("file",a),t.append("workItemId",e);let s=await fetch("/api/pm-attachments/upload",{method:"POST",body:t});if(s.ok){let t=await s.json(),a={id:t.id,workItemId:e,filename:t.filename,mimeType:t.mimeType,fileSize:t.fileSize,storagePath:"",createdAt:new Date(t.createdAt),updatedAt:new Date(t.createdAt),deletedAt:void 0};d(e=>[...e,a])}}}finally{c(!1),m.current&&(m.current.value="")}}},[e]),x=(0,a.useCallback)(async e=>{(await $(e)).error||d(t=>t.filter(t=>t.id!==e))},[]),p=(0,a.useCallback)(e=>{window.open(`/api/pm-attachments/download?id=${e}`,"_blank")},[]);return(0,t.jsxs)("div",{"data-testid":"attachment-list",className:(0,r.cn)("space-y-3",i),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.Paperclip,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"text-xs font-medium",children:["Attachments ",n.length>0?`(${String(n.length)})`:""]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{ref:m,type:"file",multiple:!0,className:"hidden",onChange:e=>u(e.target.files),"data-testid":"file-input"}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 text-xs",onClick:()=>m.current?.click(),disabled:o,"data-testid":"upload-btn",children:[(0,t.jsx)(A,{className:"h-3 w-3"}),o?"Uploading...":"Upload"]})]})]}),0===n.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No attachments"}):(0,t.jsx)("div",{className:"space-y-1",children:n.map(e=>{var a;return(0,t.jsxs)("div",{"data-testid":`attachment-${e.id}`,className:"group hover:bg-accent/50 flex items-center gap-2 rounded-sm px-2 py-1 text-xs",children:[(0,t.jsx)(z.FileIcon,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.filename}),(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:(a=e.fileSize)<1024?`${String(a)} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}),(0,t.jsxs)("div",{className:"hidden gap-0.5 group-hover:flex",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>p(e.id),title:"Download",children:(0,t.jsx)(L.Download,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"text-destructive h-5 w-5 p-0",onClick:()=>x(e.id),title:"Delete",children:(0,t.jsx)(B.Trash2,{className:"h-3 w-3"})})]})]},e.id)})})]})}var F=e.i(655016);let P=(0,p.createServerReference)("70f5c675911d985603f043cc8c7ef8decc099c297f",p.callServer,void 0,p.findSourceMapURL,"logTimeEntry"),U=(0,p.createServerReference)("40b9ee0a9c86c568adb39bc632b4684921e073da3e",p.callServer,void 0,p.findSourceMapURL,"deleteTimeEntry");function H(e){if(e<60)return`${String(e)}m`;let t=Math.floor(e/60),a=e%60;return a>0?`${String(t)}h ${String(a)}m`:`${String(t)}h`}function V({workItemId:e,timeEntries:s,totalMinutes:i,className:n}){let[d,o]=(0,a.useState)(s),[c,u]=(0,a.useState)(i),[x,p]=(0,a.useState)(!1),[h,g]=(0,a.useState)(""),[f,v]=(0,a.useState)(""),[y,N]=(0,a.useState)(""),[b,k]=(0,a.useState)(!1),w=(0,a.useCallback)(async t=>{t.preventDefault();let a=60*(parseInt(h,10)||0)+(parseInt(f,10)||0);if(!(a<=0)){k(!0);try{let t=await P(e,a,y||void 0);t.timeEntry&&(o(e=>[t.timeEntry,...e]),u(e=>e+a),g(""),v(""),N(""),p(!1))}finally{k(!1)}}},[e,h,f,y]),S=(0,a.useCallback)(async(e,t)=>{(await U(e)).error||(o(t=>t.filter(t=>t.id!==e)),u(e=>e-t))},[]);return(0,t.jsxs)("div",{"data-testid":"time-entry-list",className:(0,r.cn)("space-y-3",n),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(F.Clock,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Time Logged"}),c>0?(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:["(",H(c)," total)"]}):null]}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 text-xs",onClick:()=>p(!x),"data-testid":"log-time-btn",children:[(0,t.jsx)(m.Plus,{className:"h-3 w-3"}),"Log Time"]})]}),x?(0,t.jsxs)("form",{onSubmit:w,className:"bg-muted/50 space-y-2 rounded-md border p-2","data-testid":"log-time-form",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(j.Input,{type:"number",min:"0",placeholder:"0",value:h,onChange:e=>g(e.target.value),className:"h-7 w-14 text-xs","data-testid":"hours-input"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"h"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(j.Input,{type:"number",min:"0",max:"59",placeholder:"0",value:f,onChange:e=>v(e.target.value),className:"h-7 w-14 text-xs","data-testid":"minutes-input"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"m"})]})]}),(0,t.jsx)(j.Input,{placeholder:"Note (optional)",value:y,onChange:e=>N(e.target.value),className:"h-7 text-xs","data-testid":"note-input"}),(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(l.Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>p(!1),children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",size:"sm",className:"h-6 text-xs",disabled:b,"data-testid":"save-time-btn",children:b?"Saving...":"Save"})]})]}):null,0===d.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No time logged"}):(0,t.jsx)("div",{className:"space-y-1",children:d.map(e=>{var a;return(0,t.jsxs)("div",{"data-testid":`time-entry-${e.id}`,className:"group hover:bg-accent/50 flex items-center gap-2 rounded-sm px-2 py-1 text-xs",children:[(0,t.jsx)(F.Clock,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-medium",children:H(e.durationMinutes)}),e.note?(0,t.jsx)("span",{className:"text-muted-foreground flex-1 truncate",children:e.note}):(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:("string"==typeof(a=e.loggedAt)?new Date(a):a).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),(0,t.jsx)("div",{className:"hidden group-hover:flex",children:(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"text-destructive h-5 w-5 p-0",onClick:()=>S(e.id,e.durationMinutes),title:"Delete",children:(0,t.jsx)(B.Trash2,{className:"h-3 w-3"})})})]},e.id)})})]})}let E={Urgent:"bg-red-500/10 text-red-500",High:"bg-orange-500/10 text-orange-500",Medium:"bg-yellow-500/10 text-yellow-500",Low:"bg-blue-500/10 text-blue-500",None:"bg-muted text-muted-foreground"};function q({project:e,workItem:d,allWorkItems:o,states:c,relations:m,attachments:u,timeEntries:x,totalMinutes:p,className:h}){let g=(0,s.useRouter)(),f=new Map(c.map(e=>[e.id,e])),j=(0,a.useMemo)(()=>new Map(o.map(e=>[e.id,e])),[o]),v=f.get(d.stateId),y=`${e.identifierPrefix}-${d.sequenceId}`;return(0,t.jsxs)("div",{"data-testid":"work-item-detail",className:(0,r.cn)("space-y-6",h),children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.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)(i.ArrowLeft,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"text-muted-foreground font-mono text-xs",children:y}),v?(0,t.jsxs)(n.Badge,{variant:"outline",className:"text-[10px]",children:[(0,t.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full",style:{backgroundColor:v.color}}),v.name]}):null,d.priority&&"None"!==d.priority?(0,t.jsx)(n.Badge,{variant:"secondary",className:(0,r.cn)("text-[10px]",E[d.priority]),children:d.priority}):null]}),(0,t.jsx)("h1",{className:"text-lg font-bold tracking-tight",children:d.title}),d.description?(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:d.description}):null]}),(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Start Date"}),(0,t.jsx)("p",{className:"text-xs",children:d.startDate?new Date(d.startDate).toLocaleDateString():"—"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Due Date"}),(0,t.jsx)("p",{className:"text-xs",children:d.dueDate?new Date(d.dueDate).toLocaleDateString():"—"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Estimate"}),(0,t.jsx)("p",{className:"text-xs",children:d.estimateValue??"—"})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(R,{workItem:d,allWorkItems:o,states:c,projectPrefix:e.identifierPrefix,projectId:e.id,onSubItemClick:t=>{g.push(`/projects/${e.slug}/items/${t.id}`)}}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(S,{workItemId:d.id,workItemsMap:j,projectPrefix:e.identifierPrefix,initialRelations:m}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(W,{workItemId:d.id,attachments:u}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(V,{workItemId:d.id,timeEntries:x,totalMinutes:p})]})}e.s(["WorkItemDetailClient",()=>q],149809)}]);
|
|
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 i=(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 r({className:e,variant:a,...r}){return(0,t.jsx)("div",{className:(0,s.cn)(i({variant:a}),e),...r})}e.s(["Badge",()=>r])},935946,e=>{"use strict";var t=e.i(943698);e.s(["Paperclip",()=>t.default])},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)},943698,176505,57484,e=>{"use strict";var t=e.i(903645);let a=(0,t.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["default",()=>a],943698);let s=(0,t.default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);e.s(["default",()=>s],176505),e.s(["FileIcon",()=>s],57484)},602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),i=e.i(860253),r=e.i(131777);let l=s.Dialog.Root,n=s.Dialog.Trigger,d=s.Dialog.Portal,o=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...i},l)=>(0,t.jsx)(s.Dialog.Overlay,{ref:l,className:(0,r.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(),a?.(e)},...i}));c.displayName=s.Dialog.Overlay.displayName;let m=a.forwardRef(({className:e,children:a,...l},n)=>(0,t.jsxs)(d,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,r.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),...l,children:[a,(0,t.jsxs)(s.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)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName=s.Dialog.Content.displayName;let u=({className:e,...a})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});u.displayName="DialogHeader";let x=({className:e,...a})=>(0,t.jsx)("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});x.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Dialog.Title,{ref:i,className:(0,r.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=s.Dialog.Title.displayName;let h=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Dialog.Description,{ref:i,className:(0,r.cn)("text-muted-foreground text-sm",e),...a}));h.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>o,"DialogContent",()=>m,"DialogDescription",()=>h,"DialogFooter",()=>x,"DialogHeader",()=>u,"DialogTitle",()=>p,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},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])},958481,215131,e=>{"use strict";let t=(0,e.i(903645).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",()=>t],215131),e.s(["AlertTriangle",()=>t],958481)},976874,e=>{"use strict";let t=(0,e.i(903645).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",()=>t],976874)},681181,e=>{"use strict";var t=e.i(295230);e.s(["Download",()=>t.default])},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)},405682,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(602287),i=e.i(735364),r=e.i(698127),l=e.i(141957),n=e.i(48306),d=e.i(547373),o=e.i(508893);let c=(0,o.createServerReference)("40b8193b868912b90525c3da8f3766b0105732893b",o.callServer,void 0,o.findSourceMapURL,"createWorkItem");function m({open:e,onOpenChange:o,projectId:m,states:u,onCreated:x,parentId:p}){let[h,g]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[b,N]=(0,a.useState)("None"),[k,w]=(0,a.useState)(null),[S,D]=(0,a.useState)(!1),I=async()=>{w(null),D(!0);try{let e=await c({projectId:m,title:h,description:f||void 0,stateId:v||void 0,priority:b||void 0,parentId:p??void 0});e.error?w(e.error):e.workItem&&(x(e.workItem),g(""),j(""),y(""),N("None"))}finally{D(!1)}};return(0,t.jsx)(s.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(s.DialogContent,{"data-testid":"create-work-item-dialog",children:[(0,t.jsx)(s.DialogHeader,{children:(0,t.jsx)(s.DialogTitle,{children:p?"Create Sub-item":"Create Work Item"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"work-item-title",children:"Title"}),(0,t.jsx)(r.Input,{id:"work-item-title",value:h,onChange:e=>g(e.target.value),placeholder:"What needs to be done?","data-testid":"work-item-title-input"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{htmlFor:"work-item-desc",children:"Description (optional)"}),(0,t.jsx)(n.Textarea,{id:"work-item-desc",value:f,onChange:e=>j(e.target.value),placeholder:"Add more details...",rows:3,"data-testid":"work-item-desc-input"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:"State"}),(0,t.jsxs)(d.Select,{value:v,onValueChange:y,children:[(0,t.jsx)(d.SelectTrigger,{"data-testid":"work-item-state-select",children:(0,t.jsx)(d.SelectValue,{placeholder:"Default"})}),(0,t.jsx)(d.SelectContent,{children:u.map(e=>(0,t.jsx)(d.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(l.Label,{children:"Priority"}),(0,t.jsxs)(d.Select,{value:b,onValueChange:N,children:[(0,t.jsx)(d.SelectTrigger,{"data-testid":"work-item-priority-select",children:(0,t.jsx)(d.SelectValue,{placeholder:"None"})}),(0,t.jsxs)(d.SelectContent,{children:[(0,t.jsx)(d.SelectItem,{value:"None",children:"None"}),(0,t.jsx)(d.SelectItem,{value:"Low",children:"Low"}),(0,t.jsx)(d.SelectItem,{value:"Medium",children:"Medium"}),(0,t.jsx)(d.SelectItem,{value:"High",children:"High"}),(0,t.jsx)(d.SelectItem,{value:"Urgent",children:"Urgent"})]})]})]})]}),k?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"create-work-item-error",children:k}):null]}),(0,t.jsxs)(s.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>o(!1),disabled:S,children:"Cancel"}),(0,t.jsx)(i.Button,{onClick:I,disabled:!h.trim()||S,"data-testid":"create-work-item-submit",children:S?"Creating...":"Create"})]})]})})}e.s(["CreateWorkItemDialog",()=>m],405682)},149809,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),i=e.i(938518),r=e.i(131777),l=e.i(735364),n=e.i(81846),d=e.i(903645);let o=(0,d.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var c=e.i(860253),m=e.i(3214),u=e.i(83428),x=e.i(317406),p=e.i(508893);let h=(0,p.createServerReference)("40ebec3541c18e87efe1c82ca3ccb47ad8aac1bc72",p.callServer,void 0,p.findSourceMapURL,"listWorkItemRelations"),g=(0,p.createServerReference)("40cf75f6c631fa26f3ad2eee468c58dd22885dba94",p.callServer,void 0,p.findSourceMapURL,"deleteWorkItemRelation");var f=e.i(602287),j=e.i(698127),v=e.i(141957),y=e.i(547373);let b=(0,p.createServerReference)("40d20b87f427c51c0ca41ae672d7da742c7198ab34",p.callServer,void 0,p.findSourceMapURL,"createWorkItemRelation"),N=[{value:x.RelationType.Blocking,label:"Blocking"},{value:x.RelationType.RelatesTo,label:"Relates to"},{value:x.RelationType.Duplicate,label:"Duplicate"},{value:x.RelationType.StartsBefore,label:"Starts before"},{value:x.RelationType.FinishesBefore,label:"Finishes before"}];function k({open:e,onOpenChange:s,sourceWorkItemId:i,onCreated:r}){let[n,d]=(0,a.useState)(x.RelationType.RelatesTo),[o,c]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),[p,h]=(0,a.useState)(!1),g=async()=>{if(u(null),!o.trim())return void u("Target work item ID is required");h(!0);try{let e=await b({sourceWorkItemId:i,targetWorkItemId:o.trim(),relationType:n});e.error?u(e.error):e.relation&&(r(e.relation),c(""),d(x.RelationType.RelatesTo))}finally{h(!1)}};return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(f.DialogContent,{"data-testid":"add-relation-dialog",children:[(0,t.jsx)(f.DialogHeader,{children:(0,t.jsx)(f.DialogTitle,{children:"Add Relation"})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Label,{htmlFor:"relation-type",children:"Relation Type"}),(0,t.jsxs)(y.Select,{value:n,onValueChange:d,children:[(0,t.jsx)(y.SelectTrigger,{"data-testid":"relation-type-select",children:(0,t.jsx)(y.SelectValue,{placeholder:"Select type"})}),(0,t.jsx)(y.SelectContent,{children:N.map(e=>(0,t.jsx)(y.SelectItem,{value:e.value,children:e.label},e.value))})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(v.Label,{htmlFor:"target-work-item",children:"Target Work Item ID"}),(0,t.jsx)(j.Input,{id:"target-work-item",value:o,onChange:e=>c(e.target.value),placeholder:"Enter work item ID or identifier","data-testid":"target-work-item-input"})]}),m?(0,t.jsx)("p",{className:"text-destructive text-xs","data-testid":"add-relation-error",children:m}):null]}),(0,t.jsxs)(f.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>s(!1),disabled:p,children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:g,disabled:!o.trim()||p,"data-testid":"add-relation-submit",children:p?"Adding...":"Add Relation"})]})]})})}let w={[x.RelationType.Blocking]:"Blocking",[x.RelationType.RelatesTo]:"Relates to",[x.RelationType.Duplicate]:"Duplicate of",[x.RelationType.StartsBefore]:"Starts before",[x.RelationType.FinishesBefore]:"Finishes before"};function S({workItemId:e,workItemsMap:s,projectPrefix:i,initialRelations:d,className:x}){let[p,f]=(0,a.useState)(d??[]),[j,v]=(0,a.useState)(!d),[y,b]=(0,a.useState)(null),[N,S]=(0,a.useState)(!1),[D,I]=(0,a.useState)(null),C=(0,a.useCallback)(async()=>{v(!0),b(null);let t=await h(e);t.error?b(t.error):t.relations&&f(t.relations),v(!1)},[e]);(0,a.useEffect)(()=>{d||C()},[C,d]);let T=async e=>{I(e);let t=await g(e);t.error?b(t.error):f(t=>t.filter(t=>t.id!==e)),I(null)},R=function(e){let t=new Map;for(let a of e){let e=t.get(a.relationType)??[];e.push(a),t.set(a.relationType,e)}return Array.from(t.entries()).map(([e,t])=>({type:e,items:t}))}(p);return(0,t.jsxs)("div",{"data-testid":"work-item-relations-panel",className:(0,r.cn)("space-y-3",x),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(o,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Relations"}),p.length>0&&(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:p.length})]}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[10px]",onClick:()=>S(!0),"data-testid":"add-relation-btn",children:[(0,t.jsx)(m.Plus,{className:"mr-0.5 h-3 w-3"}),"Add"]})]}),j?(0,t.jsx)("div",{className:"flex items-center justify-center py-4","data-testid":"relations-loading",children:(0,t.jsx)(u.Loader2,{className:"text-muted-foreground h-4 w-4 animate-spin"})}):null,y?(0,t.jsx)("p",{className:"text-destructive text-[10px]","data-testid":"relations-error",children:y}):null,!j&&0===p.length&&!y&&(0,t.jsx)("p",{className:"text-muted-foreground py-2 text-center text-[10px]","data-testid":"relations-empty",children:"No relations yet."}),!j&&R.length>0&&(0,t.jsx)("div",{className:"space-y-2","data-testid":"relations-list",children:R.map(({type:a,items:r})=>(0,t.jsxs)("div",{"data-testid":`relation-group-${a}`,children:[(0,t.jsx)("span",{className:"text-muted-foreground mb-1 block text-[10px] font-medium",children:w[a]??a}),(0,t.jsx)("div",{className:"space-y-1",children:r.map(a=>{let r,d,o,m;return(0,t.jsxs)("div",{"data-testid":`relation-item-${a.id}`,className:"hover:bg-accent/50 flex items-center gap-2 rounded px-2 py-1 transition-colors",children:[(0,t.jsx)(n.Badge,{variant:"outline",className:"shrink-0 font-mono text-[10px]",children:(r=a.sourceWorkItemId===e?a.targetWorkItemId:a.sourceWorkItemId,(d=s.get(r))?`${i}-${d.sequenceId}`:r.substring(0,8))}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px]",children:(o=a.sourceWorkItemId===e?a.targetWorkItemId:a.sourceWorkItemId,m=s.get(o),m?.title??"Unknown item")}),(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 shrink-0 p-0",onClick:()=>T(a.id),disabled:D===a.id,"data-testid":`delete-relation-${a.id}`,children:D===a.id?(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(c.X,{className:"h-3 w-3"})})]},a.id)})})]},a))}),(0,t.jsx)(k,{open:N,onOpenChange:S,sourceWorkItemId:e,onCreated:e=>{f(t=>[...t,e]),S(!1)}})]})}var D=e.i(976874),I=e.i(958481),C=e.i(405682);let T={Urgent:"bg-red-500/10 text-red-500",High:"bg-orange-500/10 text-orange-500",Medium:"bg-yellow-500/10 text-yellow-500",Low:"bg-blue-500/10 text-blue-500",None:"bg-muted text-muted-foreground"};function R({workItem:e,allWorkItems:s,states:i,projectPrefix:d,projectId:o,currentDepth:c=0,onSubItemClick:u,className:x}){let[p,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)([]),j=new Map(i.map(e=>[e.id,e])),v=[...s.filter(t=>t.parentId===e.id),...g.filter(e=>!s.some(t=>t.id===e.id))],y=c>=2;return(0,t.jsxs)("div",{"data-testid":"sub-items-section",className:(0,r.cn)("space-y-3",x),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(D.Layers,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Sub-items"}),v.length>0&&(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:v.length})]}),!y&&(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-[10px]",onClick:()=>h(!0),"data-testid":"add-sub-item-btn",children:[(0,t.jsx)(m.Plus,{className:"mr-0.5 h-3 w-3"}),"Add"]})]}),y?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded bg-yellow-500/10 px-2 py-1.5","data-testid":"max-depth-warning",children:[(0,t.jsx)(I.AlertTriangle,{className:"h-3 w-3 shrink-0 text-yellow-500"}),(0,t.jsxs)("span",{className:"text-[10px] text-yellow-600 dark:text-yellow-400",children:["Maximum nesting depth reached (",3," levels). Cannot add sub-items here."]})]}):null,0===v.length&&!y&&(0,t.jsx)("p",{className:"text-muted-foreground py-2 text-center text-[10px]","data-testid":"sub-items-empty",children:"No sub-items yet."}),v.length>0&&(0,t.jsx)("div",{className:"divide-y rounded-lg border","data-testid":"sub-items-list",children:v.map(e=>{let a=j.get(e.stateId),s=`${d}-${e.sequenceId}`;return(0,t.jsxs)("div",{"data-testid":`sub-item-${s}`,className:"hover:bg-accent/50 flex cursor-pointer items-center gap-3 px-3 py-2 transition-colors",onClick:()=>u?.(e),role:"button",tabIndex:0,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&u?.(e)},children:[(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 font-mono text-[10px]",children:s}),a?(0,t.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:a.color},title:a.name}):null,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs",children:e.title}),e.priority&&"None"!==e.priority?(0,t.jsx)(n.Badge,{variant:"secondary",className:`shrink-0 text-[10px] ${T[e.priority]??""}`,children:e.priority}):null]},e.id)})}),!y&&(0,t.jsx)(C.CreateWorkItemDialog,{open:p,onOpenChange:h,projectId:o,states:i,onCreated:e=>{f(t=>[...t,e]),h(!1)},parentId:e.id})]})}var M=e.i(935946),B=e.i(267669),L=e.i(681181);let A=(0,d.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var z=e.i(57484);let $=(0,p.createServerReference)("40df373c6521d8ded793f0beced439d3a67835936e",p.callServer,void 0,p.findSourceMapURL,"deleteAttachment");function W({workItemId:e,attachments:s,className:i}){let[n,d]=(0,a.useState)(s),[o,c]=(0,a.useState)(!1),m=(0,a.useRef)(null),u=(0,a.useCallback)(async t=>{if(t&&0!==t.length){c(!0);try{for(let a of Array.from(t)){let t=new FormData;t.append("file",a),t.append("workItemId",e);let s=await fetch("/api/pm-attachments/upload",{method:"POST",body:t});if(s.ok){let t=await s.json(),a={id:t.id,workItemId:e,filename:t.filename,mimeType:t.mimeType,fileSize:t.fileSize,storagePath:"",createdAt:new Date(t.createdAt),updatedAt:new Date(t.createdAt),deletedAt:void 0};d(e=>[...e,a])}}}finally{c(!1),m.current&&(m.current.value="")}}},[e]),x=(0,a.useCallback)(async e=>{(await $(e)).error||d(t=>t.filter(t=>t.id!==e))},[]),p=(0,a.useCallback)(e=>{window.open(`/api/pm-attachments/download?id=${e}`,"_blank")},[]);return(0,t.jsxs)("div",{"data-testid":"attachment-list",className:(0,r.cn)("space-y-3",i),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(M.Paperclip,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"text-xs font-medium",children:["Attachments ",n.length>0?`(${String(n.length)})`:""]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{ref:m,type:"file",multiple:!0,className:"hidden",onChange:e=>u(e.target.files),"data-testid":"file-input"}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 text-xs",onClick:()=>m.current?.click(),disabled:o,"data-testid":"upload-btn",children:[(0,t.jsx)(A,{className:"h-3 w-3"}),o?"Uploading...":"Upload"]})]})]}),0===n.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No attachments"}):(0,t.jsx)("div",{className:"space-y-1",children:n.map(e=>{var a;return(0,t.jsxs)("div",{"data-testid":`attachment-${e.id}`,className:"group hover:bg-accent/50 flex items-center gap-2 rounded-sm px-2 py-1 text-xs",children:[(0,t.jsx)(z.FileIcon,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.filename}),(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:(a=e.fileSize)<1024?`${String(a)} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}),(0,t.jsxs)("div",{className:"hidden gap-0.5 group-hover:flex",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0",onClick:()=>p(e.id),title:"Download",children:(0,t.jsx)(L.Download,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"text-destructive h-5 w-5 p-0",onClick:()=>x(e.id),title:"Delete",children:(0,t.jsx)(B.Trash2,{className:"h-3 w-3"})})]})]},e.id)})})]})}var F=e.i(655016);let P=(0,p.createServerReference)("70b0419b7b76b0be91b873b9c59561f4be37895bb1",p.callServer,void 0,p.findSourceMapURL,"logTimeEntry"),U=(0,p.createServerReference)("40d35021d7d3db7606cde4af9b4b256d843f01cc05",p.callServer,void 0,p.findSourceMapURL,"deleteTimeEntry");function H(e){if(e<60)return`${String(e)}m`;let t=Math.floor(e/60),a=e%60;return a>0?`${String(t)}h ${String(a)}m`:`${String(t)}h`}function V({workItemId:e,timeEntries:s,totalMinutes:i,className:n}){let[d,o]=(0,a.useState)(s),[c,u]=(0,a.useState)(i),[x,p]=(0,a.useState)(!1),[h,g]=(0,a.useState)(""),[f,v]=(0,a.useState)(""),[y,b]=(0,a.useState)(""),[N,k]=(0,a.useState)(!1),w=(0,a.useCallback)(async t=>{t.preventDefault();let a=60*(parseInt(h,10)||0)+(parseInt(f,10)||0);if(!(a<=0)){k(!0);try{let t=await P(e,a,y||void 0);t.timeEntry&&(o(e=>[t.timeEntry,...e]),u(e=>e+a),g(""),v(""),b(""),p(!1))}finally{k(!1)}}},[e,h,f,y]),S=(0,a.useCallback)(async(e,t)=>{(await U(e)).error||(o(t=>t.filter(t=>t.id!==e)),u(e=>e-t))},[]);return(0,t.jsxs)("div",{"data-testid":"time-entry-list",className:(0,r.cn)("space-y-3",n),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(F.Clock,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Time Logged"}),c>0?(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:["(",H(c)," total)"]}):null]}),(0,t.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 text-xs",onClick:()=>p(!x),"data-testid":"log-time-btn",children:[(0,t.jsx)(m.Plus,{className:"h-3 w-3"}),"Log Time"]})]}),x?(0,t.jsxs)("form",{onSubmit:w,className:"bg-muted/50 space-y-2 rounded-md border p-2","data-testid":"log-time-form",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(j.Input,{type:"number",min:"0",placeholder:"0",value:h,onChange:e=>g(e.target.value),className:"h-7 w-14 text-xs","data-testid":"hours-input"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"h"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(j.Input,{type:"number",min:"0",max:"59",placeholder:"0",value:f,onChange:e=>v(e.target.value),className:"h-7 w-14 text-xs","data-testid":"minutes-input"}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:"m"})]})]}),(0,t.jsx)(j.Input,{placeholder:"Note (optional)",value:y,onChange:e=>b(e.target.value),className:"h-7 text-xs","data-testid":"note-input"}),(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(l.Button,{type:"button",variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>p(!1),children:"Cancel"}),(0,t.jsx)(l.Button,{type:"submit",size:"sm",className:"h-6 text-xs",disabled:N,"data-testid":"save-time-btn",children:N?"Saving...":"Save"})]})]}):null,0===d.length?(0,t.jsx)("p",{className:"text-muted-foreground text-[10px]",children:"No time logged"}):(0,t.jsx)("div",{className:"space-y-1",children:d.map(e=>{var a;return(0,t.jsxs)("div",{"data-testid":`time-entry-${e.id}`,className:"group hover:bg-accent/50 flex items-center gap-2 rounded-sm px-2 py-1 text-xs",children:[(0,t.jsx)(F.Clock,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-medium",children:H(e.durationMinutes)}),e.note?(0,t.jsx)("span",{className:"text-muted-foreground flex-1 truncate",children:e.note}):(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[10px]",children:("string"==typeof(a=e.loggedAt)?new Date(a):a).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),(0,t.jsx)("div",{className:"hidden group-hover:flex",children:(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",className:"text-destructive h-5 w-5 p-0",onClick:()=>S(e.id,e.durationMinutes),title:"Delete",children:(0,t.jsx)(B.Trash2,{className:"h-3 w-3"})})})]},e.id)})})]})}let E={Urgent:"bg-red-500/10 text-red-500",High:"bg-orange-500/10 text-orange-500",Medium:"bg-yellow-500/10 text-yellow-500",Low:"bg-blue-500/10 text-blue-500",None:"bg-muted text-muted-foreground"};function q({project:e,workItem:d,allWorkItems:o,states:c,relations:m,attachments:u,timeEntries:x,totalMinutes:p,className:h}){let g=(0,s.useRouter)(),f=new Map(c.map(e=>[e.id,e])),j=(0,a.useMemo)(()=>new Map(o.map(e=>[e.id,e])),[o]),v=f.get(d.stateId),y=`${e.identifierPrefix}-${d.sequenceId}`;return(0,t.jsxs)("div",{"data-testid":"work-item-detail",className:(0,r.cn)("space-y-6",h),children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.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)(i.ArrowLeft,{className:"h-4 w-4"})}),(0,t.jsx)("span",{className:"text-muted-foreground font-mono text-xs",children:y}),v?(0,t.jsxs)(n.Badge,{variant:"outline",className:"text-[10px]",children:[(0,t.jsx)("span",{className:"mr-1 inline-block h-2 w-2 rounded-full",style:{backgroundColor:v.color}}),v.name]}):null,d.priority&&"None"!==d.priority?(0,t.jsx)(n.Badge,{variant:"secondary",className:(0,r.cn)("text-[10px]",E[d.priority]),children:d.priority}):null]}),(0,t.jsx)("h1",{className:"text-lg font-bold tracking-tight",children:d.title}),d.description?(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:d.description}):null]}),(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Start Date"}),(0,t.jsx)("p",{className:"text-xs",children:d.startDate?new Date(d.startDate).toLocaleDateString():"—"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Due Date"}),(0,t.jsx)("p",{className:"text-xs",children:d.dueDate?new Date(d.dueDate).toLocaleDateString():"—"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-medium uppercase",children:"Estimate"}),(0,t.jsx)("p",{className:"text-xs",children:d.estimateValue??"—"})]})]}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(R,{workItem:d,allWorkItems:o,states:c,projectPrefix:e.identifierPrefix,projectId:e.id,onSubItemClick:t=>{g.push(`/projects/${e.slug}/items/${t.id}`)}}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(S,{workItemId:d.id,workItemsMap:j,projectPrefix:e.identifierPrefix,initialRelations:m}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(W,{workItemId:d.id,attachments:u}),(0,t.jsx)("hr",{className:"border-border"}),(0,t.jsx)(V,{workItemId:d.id,timeEntries:x,totalMinutes:p})]})}e.s(["WorkItemDetailClient",()=>q],149809)}]);
|
|
@@ -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 i=(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 o({className:e,variant:a,...o}){return(0,t.jsx)("div",{className:(0,r.cn)(i({variant:a}),e),...o})}e.s(["Badge",()=>o])},151080,e=>{"use strict";var t=e.i(152155),a=e.i(291967),r=e.i(787342),i=e.i(205978),o=e.i(922528),s=e.i(713123),n=e.i(287620),l=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,x,v]=(0,r.createCollection)(p),[b,h]=(0,o.createContextScope)(p,[v]),[y,w]=b(p),j=t.forwardRef((e,t)=>(0,u.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));j.displayName=p;var N=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:g=!1,dir:v,currentTabStopId:b,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:N=!1,...S}=e,D=t.useRef(null),R=(0,i.useComposedRefs)(r,D),C=(0,d.useDirection)(v),[k,I]=(0,c.useControllableState)({prop:b,defaultProp:h??null,onChange:w,caller:p}),[F,A]=t.useState(!1),E=(0,l.useCallbackRef)(j),H=x(o),L=t.useRef(!1),[G,P]=t.useState(0);return t.useEffect(()=>{let e=D.current;if(e)return e.addEventListener(f,E),()=>e.removeEventListener(f,E)},[E]),(0,u.jsx)(y,{scope:o,orientation:s,dir:C,loop:g,currentTabStopId:k,onItemFocus:t.useCallback(e=>I(e),[I]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:F||0===G?-1:0,"data-orientation":s,...S,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,a.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!F){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=H().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===k),...e].filter(Boolean).map(e=>e.ref.current),N)}}L.current=!1}),onBlur:(0,a.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),S="RovingFocusGroupItem",D=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...f}=e,m=(0,s.useId)(),p=c||m,v=w(S,i),b=v.currentTabStopId===p,h=x(i),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:N}=v;return t.useEffect(()=>{if(o)return y(),()=>j()},[o,y,j]),(0,u.jsx)(g.ItemSlot,{scope:i,id:p,focusable:o,active:l,children:(0,u.jsx)(n.Primitive.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...f,ref:r,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o?v.onItemFocus(p):e.preventDefault()}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(p)),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var r;let i=(r=e.key,"rtl"!==a?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return R[i]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var a,r;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=v.loop?(a=i,r=o+1,a.map((e,t)=>a[(r+t)%a.length])):i.slice(o+1)}setTimeout(()=>T(i))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=N}):d})})});D.displayName=S;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let a=document.activeElement;for(let r of e)if(r===a||(r.focus({preventScroll:t}),document.activeElement!==a))return}e.s(["Item",()=>D,"Root",()=>j,"createRovingFocusGroupScope",()=>h])},468304,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),i=e.i(922528),o=e.i(151080),s=e.i(685995),n=e.i(287620),l=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,m]=(0,i.createContextScope)(u,[o.createRovingFocusGroupScope]),p=(0,o.createRovingFocusGroupScope)(),[g,x]=f(u),v=a.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,onValueChange:o,defaultValue:s,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,v=(0,l.useDirection)(m),[b,h]=(0,c.useControllableState)({prop:i,onChange:o,defaultProp:s??"",caller:u});return(0,t.jsx)(g,{scope:r,baseId:(0,d.useId)(),value:b,onValueChange:h,orientation:f,dir:v,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:v,"data-orientation":f,...x,ref:a})})});v.displayName=u;var b="TabsList",h=a.forwardRef((e,a)=>{let{__scopeTabs:r,loop:i=!0,...s}=e,l=x(b,r),c=p(r);return(0,t.jsx)(o.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:a})})});h.displayName=b;var y="TabsTrigger",w=a.forwardRef((e,a)=>{let{__scopeTabs:i,value:s,disabled:l=!1,...c}=e,d=x(y,i),u=p(i),f=S(d.baseId,s),m=D(d.baseId,s),g=s===d.value;return(0,t.jsx)(o.Item,{asChild:!0,...u,focusable:!l,active:g,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...c,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;g||l||!e||d.onValueChange(s)})})})});w.displayName=y;var j="TabsContent",N=a.forwardRef((e,r)=>{let{__scopeTabs:i,value:o,forceMount:l,children:c,...d}=e,u=x(j,i),f=S(u.baseId,o),m=D(u.baseId,o),p=o===u.value,g=a.useRef(p);return a.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(s.Presence,{present:l||p,children:({present:a})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!a,id:m,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:g.current?"0s":void 0},children:a&&c})})});function S(e,t){return`${e}-trigger-${t}`}function D(e,t){return`${e}-content-${t}`}N.displayName=j,e.s(["Content",()=>N,"List",()=>h,"Root",()=>v,"Tabs",()=>v,"TabsContent",()=>N,"TabsList",()=>h,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>m],743133);var R=e.i(743133),R=R,T=e.i(131777);let C=R.Root,k=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.List,{ref:r,className:(0,T.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...a}));k.displayName=R.List.displayName;let I=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Trigger,{ref:r,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),...a}));I.displayName=R.Trigger.displayName;let F=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Content,{ref:r,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),...a}));F.displayName=R.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>F,"TabsList",()=>k,"TabsTrigger",()=>I],468304)},602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(90033),i=e.i(860253),o=e.i(131777);let s=r.Dialog.Root,n=r.Dialog.Trigger,l=r.Dialog.Portal,c=r.Dialog.Close,d=a.forwardRef(({className:e,onClick:a,...i},s)=>(0,t.jsx)(r.Dialog.Overlay,{ref:s,className:(0,o.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(),a?.(e)},...i}));d.displayName=r.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...s},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(r.Dialog.Content,{ref:n,className:(0,o.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),...s,children:[a,(0,t.jsxs)(r.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)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.Dialog.Content.displayName;let f=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});f.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Title,{ref:i,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=r.Dialog.Title.displayName;let g=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Description,{ref:i,className:(0,o.cn)("text-muted-foreground text-sm",e),...a}));g.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>s,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>g,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(602287),i=e.i(468304),o=e.i(83428),s=e.i(698127),n=e.i(735364),l=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:r=!1}){let[i,d]=(0,a.useState)(""),[u,f]=(0,a.useState)("");function m(){let t=i.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(l.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),m())},disabled:r,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(n.Button,{onClick:m,disabled:r||!i.trim(),size:"sm",children:r?(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),m=e.i(66459),p=e.i(579687),g=e.i(81846),x=e.i(461238),v=e.i(547373),b=e.i(508893);let h=(0,b.createServerReference)("403ab98df2cf8db571b47142cd90ab7c7f297fa90f",b.callServer,void 0,b.findSourceMapURL,"listGitHubRepositories"),y=(0,b.createServerReference)("00613a83ba2b2619c9ef46303abae5aded26339bc3",b.callServer,void 0,b.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:r=!1,fetchRepos:i=h,fetchOrgs:n=y}){let[l,c]=(0,a.useState)([]),[d,b]=(0,a.useState)([]),[j,N]=(0,a.useState)(!0),[S,D]=(0,a.useState)(""),[R,T]=(0,a.useState)(""),[C,k]=(0,a.useState)(w),I=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await n();e.orgs&&b(e.orgs)}catch{}}()},[n]);let F=(0,a.useCallback)(async(e,t)=>{N(!0),D("");try{let a={};e&&(a.search=e),t&&t!==w&&(a.owner=t);let r=await i(Object.keys(a).length>0?a:void 0);r.error?(D(r.error),c([])):c(r.repos??[])}catch{D("Failed to fetch repositories"),c([])}finally{N(!1)}},[i]);return((0,a.useEffect)(()=>{F(R||void 0,C)},[F,C]),S&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:S})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(v.Select,{value:C,onValueChange:function(e){k(e),T("")},disabled:r,children:[(0,t.jsx)(v.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(v.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(v.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(s.Input,{placeholder:"Search repositories...",value:R,onChange:e=>{var t;T(t=e.target.value),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{F(t||void 0,C)},300)},className:"ps-9",disabled:r,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(x.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(x.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===l.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):l.map(a=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(a.nameWithOwner),disabled:r,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a.nameWithOwner}),(0,t.jsx)(g.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),a.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:a.description}):null]}),r?(0,t.jsx)(o.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let N=(0,b.createServerReference)("40e011f8f2f54f36460ff5310dd49178590a992d44",b.callServer,void 0,b.findSourceMapURL,"importGitHubRepository");function S({open:e,onOpenChange:o,onImportComplete:s}){let[n,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)("");async function f(e){l(!0),u("");try{let t=await N({url:e});t.error?u(t.error):t.repository&&(s(t.repository),o(!1))}catch{u("An unexpected error occurred")}finally{l(!1)}}return(0,t.jsx)(r.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(r.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(r.DialogHeader,{children:[(0,t.jsx)(r.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(r.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(i.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(i.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(i.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(i.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:n})}),(0,t.jsx)(i.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:n})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>S,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
|
|
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 i=(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 o({className:e,variant:a,...o}){return(0,t.jsx)("div",{className:(0,r.cn)(i({variant:a}),e),...o})}e.s(["Badge",()=>o])},151080,e=>{"use strict";var t=e.i(152155),a=e.i(291967),r=e.i(787342),i=e.i(205978),o=e.i(922528),s=e.i(713123),n=e.i(287620),l=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,x,v]=(0,r.createCollection)(p),[b,h]=(0,o.createContextScope)(p,[v]),[y,w]=b(p),j=t.forwardRef((e,t)=>(0,u.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));j.displayName=p;var N=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:g=!1,dir:v,currentTabStopId:b,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:N=!1,...S}=e,D=t.useRef(null),R=(0,i.useComposedRefs)(r,D),C=(0,d.useDirection)(v),[k,I]=(0,c.useControllableState)({prop:b,defaultProp:h??null,onChange:w,caller:p}),[F,A]=t.useState(!1),E=(0,l.useCallbackRef)(j),H=x(o),L=t.useRef(!1),[G,P]=t.useState(0);return t.useEffect(()=>{let e=D.current;if(e)return e.addEventListener(f,E),()=>e.removeEventListener(f,E)},[E]),(0,u.jsx)(y,{scope:o,orientation:s,dir:C,loop:g,currentTabStopId:k,onItemFocus:t.useCallback(e=>I(e),[I]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:F||0===G?-1:0,"data-orientation":s,...S,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,a.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!F){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=H().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===k),...e].filter(Boolean).map(e=>e.ref.current),N)}}L.current=!1}),onBlur:(0,a.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),S="RovingFocusGroupItem",D=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...f}=e,m=(0,s.useId)(),p=c||m,v=w(S,i),b=v.currentTabStopId===p,h=x(i),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:N}=v;return t.useEffect(()=>{if(o)return y(),()=>j()},[o,y,j]),(0,u.jsx)(g.ItemSlot,{scope:i,id:p,focusable:o,active:l,children:(0,u.jsx)(n.Primitive.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...f,ref:r,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o?v.onItemFocus(p):e.preventDefault()}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(p)),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var r;let i=(r=e.key,"rtl"!==a?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return R[i]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var a,r;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=v.loop?(a=i,r=o+1,a.map((e,t)=>a[(r+t)%a.length])):i.slice(o+1)}setTimeout(()=>T(i))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=N}):d})})});D.displayName=S;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let a=document.activeElement;for(let r of e)if(r===a||(r.focus({preventScroll:t}),document.activeElement!==a))return}e.s(["Item",()=>D,"Root",()=>j,"createRovingFocusGroupScope",()=>h])},468304,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),i=e.i(922528),o=e.i(151080),s=e.i(685995),n=e.i(287620),l=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,m]=(0,i.createContextScope)(u,[o.createRovingFocusGroupScope]),p=(0,o.createRovingFocusGroupScope)(),[g,x]=f(u),v=a.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,onValueChange:o,defaultValue:s,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,v=(0,l.useDirection)(m),[b,h]=(0,c.useControllableState)({prop:i,onChange:o,defaultProp:s??"",caller:u});return(0,t.jsx)(g,{scope:r,baseId:(0,d.useId)(),value:b,onValueChange:h,orientation:f,dir:v,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:v,"data-orientation":f,...x,ref:a})})});v.displayName=u;var b="TabsList",h=a.forwardRef((e,a)=>{let{__scopeTabs:r,loop:i=!0,...s}=e,l=x(b,r),c=p(r);return(0,t.jsx)(o.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:a})})});h.displayName=b;var y="TabsTrigger",w=a.forwardRef((e,a)=>{let{__scopeTabs:i,value:s,disabled:l=!1,...c}=e,d=x(y,i),u=p(i),f=S(d.baseId,s),m=D(d.baseId,s),g=s===d.value;return(0,t.jsx)(o.Item,{asChild:!0,...u,focusable:!l,active:g,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...c,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;g||l||!e||d.onValueChange(s)})})})});w.displayName=y;var j="TabsContent",N=a.forwardRef((e,r)=>{let{__scopeTabs:i,value:o,forceMount:l,children:c,...d}=e,u=x(j,i),f=S(u.baseId,o),m=D(u.baseId,o),p=o===u.value,g=a.useRef(p);return a.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(s.Presence,{present:l||p,children:({present:a})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!a,id:m,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:g.current?"0s":void 0},children:a&&c})})});function S(e,t){return`${e}-trigger-${t}`}function D(e,t){return`${e}-content-${t}`}N.displayName=j,e.s(["Content",()=>N,"List",()=>h,"Root",()=>v,"Tabs",()=>v,"TabsContent",()=>N,"TabsList",()=>h,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>m],743133);var R=e.i(743133),R=R,T=e.i(131777);let C=R.Root,k=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.List,{ref:r,className:(0,T.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...a}));k.displayName=R.List.displayName;let I=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Trigger,{ref:r,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),...a}));I.displayName=R.Trigger.displayName;let F=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Content,{ref:r,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),...a}));F.displayName=R.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>F,"TabsList",()=>k,"TabsTrigger",()=>I],468304)},602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(90033),i=e.i(860253),o=e.i(131777);let s=r.Dialog.Root,n=r.Dialog.Trigger,l=r.Dialog.Portal,c=r.Dialog.Close,d=a.forwardRef(({className:e,onClick:a,...i},s)=>(0,t.jsx)(r.Dialog.Overlay,{ref:s,className:(0,o.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(),a?.(e)},...i}));d.displayName=r.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...s},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(r.Dialog.Content,{ref:n,className:(0,o.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),...s,children:[a,(0,t.jsxs)(r.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)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.Dialog.Content.displayName;let f=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});f.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Title,{ref:i,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=r.Dialog.Title.displayName;let g=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Description,{ref:i,className:(0,o.cn)("text-muted-foreground text-sm",e),...a}));g.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>s,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>g,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(602287),i=e.i(468304),o=e.i(83428),s=e.i(698127),n=e.i(735364),l=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:r=!1}){let[i,d]=(0,a.useState)(""),[u,f]=(0,a.useState)("");function m(){let t=i.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(l.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),m())},disabled:r,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(n.Button,{onClick:m,disabled:r||!i.trim(),size:"sm",children:r?(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),m=e.i(66459),p=e.i(579687),g=e.i(81846),x=e.i(461238),v=e.i(547373),b=e.i(508893);let h=(0,b.createServerReference)("40d1082c73e97a2c5f99ef11d815cefe59a26e8998",b.callServer,void 0,b.findSourceMapURL,"listGitHubRepositories"),y=(0,b.createServerReference)("00c4af7e37cefa35ac7db65fa9b45995caf677a597",b.callServer,void 0,b.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:r=!1,fetchRepos:i=h,fetchOrgs:n=y}){let[l,c]=(0,a.useState)([]),[d,b]=(0,a.useState)([]),[j,N]=(0,a.useState)(!0),[S,D]=(0,a.useState)(""),[R,T]=(0,a.useState)(""),[C,k]=(0,a.useState)(w),I=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await n();e.orgs&&b(e.orgs)}catch{}}()},[n]);let F=(0,a.useCallback)(async(e,t)=>{N(!0),D("");try{let a={};e&&(a.search=e),t&&t!==w&&(a.owner=t);let r=await i(Object.keys(a).length>0?a:void 0);r.error?(D(r.error),c([])):c(r.repos??[])}catch{D("Failed to fetch repositories"),c([])}finally{N(!1)}},[i]);return((0,a.useEffect)(()=>{F(R||void 0,C)},[F,C]),S&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:S})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(v.Select,{value:C,onValueChange:function(e){k(e),T("")},disabled:r,children:[(0,t.jsx)(v.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(v.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(v.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(s.Input,{placeholder:"Search repositories...",value:R,onChange:e=>{var t;T(t=e.target.value),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{F(t||void 0,C)},300)},className:"ps-9",disabled:r,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(x.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(x.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===l.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):l.map(a=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(a.nameWithOwner),disabled:r,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a.nameWithOwner}),(0,t.jsx)(g.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),a.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:a.description}):null]}),r?(0,t.jsx)(o.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let N=(0,b.createServerReference)("405f5f5259eaed6742d1a59f416d4319ea63f3bb3d",b.callServer,void 0,b.findSourceMapURL,"importGitHubRepository");function S({open:e,onOpenChange:o,onImportComplete:s}){let[n,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)("");async function f(e){l(!0),u("");try{let t=await N({url:e});t.error?u(t.error):t.repository&&(s(t.repository),o(!1))}catch{u("An unexpected error occurred")}finally{l(!1)}}return(0,t.jsx)(r.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(r.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(r.DialogHeader,{children:[(0,t.jsx)(r.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(r.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(i.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(i.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(i.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(i.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:n})}),(0,t.jsx)(i.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:n})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>S,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,373552,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("403977b65265c2fd34e4541180b371a5c974c91cf4",t.callServer,void 0,t.findSourceMapURL,"createFeature");e.s(["createFeature",()=>r])},34562,630616,e=>{"use strict";var t=e.i(679606),r=e.i(152155);e.i(541001);var a=e.i(64780),s=e.i(216868),i=e.i(283843),o=e.i(197667),l=e.i(453360),n=e.i(655016),c=e.i(591925),d=e.i(83428),p=e.i(381542),u=e.i(670471),x=e.i(912103),h=e.i(43416),m=e.i(542049),f=e.i(941698),b=e.i(131777),g=e.i(808361);e.i(1650);var j=e.i(511495),w=e.i(845811),v=e.i(735364),y=e.i(698127),C=e.i(48306),k=e.i(141957),N=e.i(81846),D=e.i(390382),T=e.i(951911),S=e.i(102828),F=e.i(930153);e.i(650032);var P=e.i(486254),L=e.i(508893);let M=(0,L.createServerReference)("40b7b82f66bd9e710a727e7544c2fb50fda2cf3008",L.callServer,void 0,L.findSourceMapURL,"getViewerPermission");var z=e.i(41413),E=e.i(425235),B=e.i(478521);e.i(13322);var R=e.i(961201),A=e.i(175921),U=e.i(172637),I=e.i(317406),O=e.i(442076);let K=[I.BuildMode.Fast,I.BuildMode.Spec],$={[I.BuildMode.Application]:{icon:m.LayoutGrid,labelKey:"createDrawer.modeApplication"},[I.BuildMode.Fast]:{icon:l.Zap,labelKey:"createDrawer.modeFast"},[I.BuildMode.Spec]:{icon:f.ClipboardList,labelKey:"createDrawer.modeSpec"}},G=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".txt",".md",".csv",".json",".yaml",".yml",".xml",".ts",".tsx",".js",".jsx",".py",".rb",".go",".rs",".java",".c",".cpp",".h",".hpp",".cs",".swift",".kt",".html",".css",".scss",".less",".sh",".bash",".zsh",".fish",".toml",".ini",".cfg",".conf",".env",".zip",".tar",".gz",".log"]),q={allowPrd:!1,allowPlan:!1,allowMerge:!1};function W({open:e,onClose:i,onSubmit:o,repositoryPath:l,isSubmitting:c=!1,workflowDefaults:d,features:m,repositories:f,initialParentId:y,currentAgentType:D,currentModel:L,initialDescription:E,canPushDirectly:B,initialMode:R,initialApplicationId:A}){let U=void 0!==A,W=U&&!R?I.BuildMode.Spec:R,V=(0,g.useSoundAction)("create"),{t:H}=(0,a.useTranslation)("web"),Q=l&&(U||!f||0===f.length||f.some(e=>e.path===l))?l:"",X=d?.approvalGates??q,Y=d?.push??!1,_=d?.openPr??!1,ee=d?.ciWatchEnabled!==!1,et=d?.enableEvidence??!1,er=d?.commitEvidence??!1,ea=W||(d?.fast===!1?I.BuildMode.Spec:I.BuildMode.Fast),[es,ei]=(0,r.useState)(E??"");(0,r.useEffect)(()=>{E&&ei(E)},[E]);let[eo,el]=(0,r.useState)([]),[en,ec]=(0,r.useState)({...X}),[ed,ep]=(0,r.useState)(Y),[eu,ex]=(0,r.useState)(_),[eh,em]=(0,r.useState)(d?.ciWatchEnabled!==!1),[ef,eb]=(0,r.useState)(et),[eg,ej]=(0,r.useState)(er),[ew,ev]=(0,r.useState)(void 0),[ey,eC]=(0,r.useState)(ea),ek=ey===I.BuildMode.Fast,[eN,eD]=(0,r.useState)(!1),[eT,eS]=(0,r.useState)(!1),[eF,eP]=(0,r.useState)(!0),[eL,eM]=(0,r.useState)(!0),[ez,eE]=(0,r.useState)(d?.injectSkills??!1),[eB,eR]=(0,r.useState)(void 0),[eA,eU]=(0,r.useState)(void 0),[eI,eO]=(0,r.useState)(Q||void 0),[eK,e$]=(0,r.useState)(f??[]),[eG,eq]=(0,r.useState)(!1),[eW,eZ]=(0,r.useState)(null),[eJ,eV]=(0,r.useState)(!1),eH=(0,r.useRef)(crypto.randomUUID()),eQ=(0,r.useRef)(0),eX=(0,r.useRef)(null);(0,r.useEffect)(()=>{d&&(ec({...d.approvalGates}),ep(d.push),ex(d.openPr),em(!1!==d.ciWatchEnabled),eb(d.enableEvidence),ej(d.commitEvidence),W||eC(!1!==d.fast?I.BuildMode.Fast:I.BuildMode.Spec),eE(d.injectSkills??!1))},[d,W]),(0,r.useEffect)(()=>{e$(f??[])},[f]),(0,r.useEffect)(()=>{e&&y&&ev(y)},[e,y]);let[eY,e_]=(0,r.useState)(B??!1);(0,r.useEffect)(()=>{e_(B??!1)},[B]);let e0=(0,r.useRef)(eI);(0,r.useEffect)(()=>{eI&&eI!==e0.current&&(e0.current=eI,M(eI).then(e=>e_(e.canPushDirectly)).catch(()=>e_(!1)))},[eI]),(0,r.useEffect)(()=>{eY&&(eS(!1),ep(Y),ex(_),eP(!0))},[eY,Y,_]);let e1=(0,r.useCallback)(()=>{ei(""),el([]),ec({...X}),ep(Y),ex(_),em(ee),eb(et),ej(er),ev(void 0),eO(Q||void 0),e$(f??[]),eC(ea),eD(!1),eS(!1),eP(!0),eM(!0),eR(void 0),eU(void 0),eZ(null),eQ.current=0,eq(!1)},[X,Y,_,et,ee,er,ea,Q,f]),e5=""!==es.trim()||eo.length>0,{attemptClose:e2}=(0,F.useGuardedDrawerClose)({open:e,isDirty:e5,onClose:i,onReset:e1}),e4=(0,r.useCallback)(async e=>{for(let t of(eZ(null),e)){if(t.size>0xa00000)return void eZ(`"${t.name}" exceeds 10 MB limit`);let e=function(e){let t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""}(t.name);if(e&&!G.has(e))return void eZ(`File type "${e}" is not allowed`)}for(let t of e){let e=crypto.randomUUID();el(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:t.type||"application/octet-stream",path:"",loading:!0}]);try{let r=new FormData;r.append("file",t),r.append("sessionId",eH.current);let a=await fetch("/api/attachments/upload",{method:"POST",body:r});if(!a.ok){let t=await a.json().catch(()=>({error:"Upload failed"}));el(t=>t.filter(t=>t.id!==e)),eZ(t.error??"Upload failed");return}let s=await a.json();el(t=>t.some(t=>t.id!==e&&t.path===s.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...s,id:e,loading:!1}:t))}catch{el(t=>t.filter(t=>t.id!==e)),eZ("Upload failed")}}},[]),e3=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eQ.current+=1,1===eQ.current&&eq(!0)},[]),e6=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eQ.current-=1,0===eQ.current&&eq(!1)},[]),e8=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),e7=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eQ.current=0,eq(!1);let t=Array.from(e.dataTransfer.files);t.length>0&&e4(t)},[e4]),e9=(0,r.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let r=[];for(let e of Array.from(t))if("file"===e.kind){let t=e.getAsFile();t&&r.push(t)}r.length>0&&(e.preventDefault(),e4(r))},[e4]),te=(0,r.useCallback)(e=>{if(e.preventDefault(),!es.trim())return;let t=eI??Q;t&&(V.play(),o({description:es.trim(),attachments:eo.filter(e=>!e.loading),repositoryPath:t,approvalGates:{allowPrd:en.allowPrd??!1,allowPlan:en.allowPlan??!1,allowMerge:en.allowMerge??!1},push:!!eT||ed||eu,openPr:!!eT||eu,ciWatchEnabled:eh,enableEvidence:ef,commitEvidence:eg,fast:ek,forkAndPr:eT,commitSpecs:eF,rebaseBeforeBranch:eL,injectSkills:ez,...eN?{pending:eN}:{},...eB?{agentType:eB}:{},...eA?{model:eA}:{},...ew?{parentId:ew}:{},...A?{applicationId:A}:{},sessionId:eH.current}),e1())},[es,eo,en,eI,Q,o,ed,eu,ef,eh,eg,ek,eT,eF,eL,ez,eN,eB,eA,ew,A,V,e1]),tt=(0,r.useCallback)(async()=>{try{let e=await (0,O.pickFiles)();if(!e)return;for(let t of e){let e=crypto.randomUUID();el(r=>[...r,{id:e,name:t.name,size:t.size,mimeType:"application/octet-stream",path:"",loading:!0}]);try{let r=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t.path,sessionId:eH.current})});if(!r.ok){let t=await r.json().catch(()=>({error:"Upload failed"}));el(t=>t.filter(t=>t.id!==e)),eZ(t.error??"Upload failed");return}let a=await r.json();el(t=>t.some(t=>t.id!==e&&t.path===a.path)?t.filter(t=>t.id!==e):t.map(t=>t.id===e?{...a,id:e,loading:!1}:t))}catch{el(t=>t.filter(t=>t.id!==e)),eZ("Upload failed")}}}catch{}},[]),tr=(0,r.useCallback)(e=>{el(t=>t.filter(t=>t.id!==e))},[]),ta=(0,r.useCallback)((e,t)=>{el(r=>r.map(r=>r.id===e?{...r,notes:t}:r))},[]),ts=(0,r.useRef)(null),ti=(0,r.useCallback)(e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),ts.current?.requestSubmit())},[]),to=(0,r.useCallback)(()=>{eV(!0)},[]),tl=(0,r.useCallback)(()=>{setTimeout(()=>{let e=eX.current?.contains(document.activeElement),t=eX.current?.querySelector('[aria-expanded="true"]')!==null;e||t||eV(!1)},0)},[]),tn=m&&m.length>0,tc=!Q&&!eI,td=!Q&&void 0!==f,tp=[{id:"allowPrd",label:H("createDrawer.prd"),description:H("createDrawer.prdDescription")},{id:"allowPlan",label:H("createDrawer.plan"),description:H("createDrawer.planDescription")},{id:"allowMerge",label:H("createDrawer.merge"),description:H("createDrawer.mergeDescription")}];return(0,t.jsx)(j.BaseDrawer,{open:e,onClose:e2,size:"md",modal:!1,dismissOnOutsideClick:!0,"data-testid":"feature-create-drawer",header:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500"}),(0,t.jsx)(w.DrawerTitle,{children:H("createDrawer.title")})]}),c?(0,t.jsx)(w.DrawerDescription,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsx)(N.Badge,{variant:"secondary",children:H("createDrawer.creating")})})}):null]}),footer:(0,t.jsxs)("div",{className:"flex flex-row justify-end gap-2",children:[(0,t.jsx)(v.Button,{variant:"outline",onClick:e2,disabled:c,children:H("createDrawer.cancel")}),(0,t.jsx)(v.Button,{type:"submit",form:"create-feature-form",disabled:!es.trim()||c||tc,children:c?H("createDrawer.creating"):H("createDrawer.createFeature")})]}),children:(0,t.jsx)("div",{className:"overflow-y-auto p-4",children:(0,t.jsx)(S.TooltipProvider,{delayDuration:400,children:(0,t.jsxs)("form",{ref:ts,id:"create-feature-form",onSubmit:te,onKeyDown:ti,className:"flex flex-col gap-4",children:[U?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section","data-locked-by-application":"true",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:H("createDrawer.repository")}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("p",{className:"text-sm opacity-70","data-testid":"repo-readonly-label","aria-disabled":"true","aria-describedby":"locked-by-application-tooltip",title:H("createDrawer.lockedByApplication"),children:f?.find(e=>e.path===Q)?.name??(Q?Q.split("/").pop():"")??Q})}),(0,t.jsx)(S.TooltipContent,{id:"locked-by-application-tooltip",role:"tooltip",side:"bottom",children:H("createDrawer.lockedByApplication")})]})]}):td?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-selector-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:H("createDrawer.repository")}),(0,t.jsx)(J,{repositories:eK,value:eI,onChange:eO,onAddRepository:e=>{e$(t=>[...t,e]),eO(e.path)},disabled:c})]}):Q?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5","data-testid":"repo-readonly-section",children:[(0,t.jsx)(k.Label,{className:"text-muted-foreground text-xs font-semibold tracking-wider",children:H("createDrawer.repository")}),(0,t.jsx)("p",{className:"text-sm","data-testid":"repo-readonly-label",children:f?.find(e=>e.path===Q)?.name??Q.split("/").pop()})]}):null,(0,t.jsxs)("div",{role:"region","aria-label":H("createDrawer.fileDropZone"),"data-drag-over":eG?"true":"false",onDragEnter:e3,onDragLeave:e6,onDragOver:e8,onDrop:e7,className:(0,b.cn)("flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors",eG&&"border-primary/50 bg-primary/5"),children:[(0,t.jsx)(k.Label,{htmlFor:"feature-description",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:H("createDrawer.describeFeature")}),(0,t.jsxs)("div",{ref:eX,onFocus:to,onBlur:tl,className:(0,b.cn)("border-input flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow]",eJ&&"ring-ring/50 border-ring ring-[3px]"),children:[(0,t.jsx)(C.Textarea,{id:"feature-description",placeholder:H("createDrawer.featurePlaceholder"),value:es,onChange:e=>ei(e.target.value),onPaste:e9,required:!0,disabled:c,className:"min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0"}),eo.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 py-2",children:eo.map(e=>(0,t.jsx)(P.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>tr(e.id),disabled:c,loading:e.loading,notes:e.notes,onNotesChange:t=>ta(e.id,t)},e.id))}),eW?(0,t.jsx)("p",{className:"text-destructive px-3 pb-2 text-xs",children:eW}):null,(0,t.jsxs)("div",{className:"border-input flex items-center gap-3 border-t px-3 py-1.5",children:[(0,t.jsx)(z.AgentModelPicker,{initialAgentType:eB??D??"",initialModel:eA??L??"",mode:"override",onAgentModelChange:(e,t)=>{eR(e),eU(t)},disabled:c,className:"w-55"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"ml-auto flex cursor-pointer items-center gap-2",children:[(0,t.jsx)(T.Switch,{id:"pending-mode",checked:eN,onCheckedChange:eD,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"pending-mode",className:"flex cursor-pointer items-center gap-1 text-sm font-medium",children:[(0,t.jsx)(n.Clock,{className:"h-3.5 w-3.5"}),H("createDrawer.pendingMode")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.pendingModeDescription")})]}),(0,t.jsx)("div",{role:"group","aria-label":H("createDrawer.modeGroupLabel"),className:"border-input flex items-center gap-0.5 rounded-md border p-0.5",children:K.map(e=>{let r=$[e],a=r.icon,s=ey===e;return(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":`build-mode-${e}`,"aria-pressed":s,"aria-disabled":c,disabled:c,onClick:()=>eC(e),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 text-xs font-medium transition-colors",s?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground","disabled:cursor-not-allowed disabled:opacity-50"),children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),H(r.labelKey)]})}),(0,t.jsx)(S.TooltipContent,{role:"tooltip",side:"bottom",children:H(`${r.labelKey}Description`)})]},e)})}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:tt,disabled:c,"aria-label":H("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors",children:(0,t.jsx)(s.PaperclipIcon,{className:"h-4 w-4"})})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("chat.attachFiles")})]})]})]})]}),tn&&void 0!==y?(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)(k.Label,{htmlFor:"parent-feature",className:"text-muted-foreground text-xs font-semibold tracking-wider",children:H("createDrawer.parentFeature")}),(0,t.jsx)(Z,{features:m,value:ew,onChange:ev,disabled:c})]}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:H("createDrawer.approve")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.approveDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:tp.map(e=>(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:`approve-${e.id}`,size:"sm",checked:en[e.id]??!1,onCheckedChange:t=>ec(r=>({...r,[e.id]:t})),disabled:c||ek&&("allowPrd"===e.id||"allowPlan"===e.id)}),(0,t.jsx)(k.Label,{htmlFor:`approve-${e.id}`,className:"cursor-pointer text-xs font-medium",children:e.label})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:ek&&("allowPrd"===e.id||"allowPlan"===e.id)?H("createDrawer.skippedInFastMode"):e.description})]},e.id))}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{let e=tp.every(e=>en[e.id]),t={};for(let r of tp)t[r.id]=!e;ec(t)},disabled:c,className:(0,b.cn)("text-muted-foreground hover:text-foreground cursor-pointer rounded px-1.5 py-0.5 text-[10px] font-semibold tracking-wider uppercase transition-colors",tp.every(e=>en[e.id])&&"text-primary"),children:H("createDrawer.all")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.toggleAllApprovalGates")})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:H("createDrawer.evidence")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.evidenceDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"enable-evidence",size:"sm",checked:ef,onCheckedChange:e=>{eb(e),e||ej(!1)},disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"enable-evidence",className:"cursor-pointer text-xs font-medium",children:H("createDrawer.collect")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.collectDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-evidence",size:"sm",checked:eg,onCheckedChange:ej,disabled:c||!ef||!eu&&!eT}),(0,t.jsx)(k.Label,{htmlFor:"commit-evidence",className:(0,b.cn)("cursor-pointer text-xs font-medium",(!ef||!eu&&!eT)&&"opacity-50"),children:H("createDrawer.addToPr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:eu||eT?ef?H("createDrawer.addToPrDescription"):H("createDrawer.requiresEvidence"):H("createDrawer.requiresPr")})]})]})]}),(0,t.jsxs)("div",{className:"border-input flex items-center gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider",children:H("createDrawer.skills")})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.skillsDescription")})]}),(0,t.jsx)("div",{className:"flex flex-1 items-center gap-4",children:(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"inject-skills",size:"sm",checked:ez,onCheckedChange:eE,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"inject-skills",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(x.Puzzle,{className:"h-3 w-3"}),H("createDrawer.injectSkills")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.injectSkillsDescription")})]})})]}),(0,t.jsxs)("div",{className:"border-input flex items-start gap-4 rounded-md border px-3 py-2.5",children:[(0,t.jsx)("span",{className:"text-muted-foreground w-16 shrink-0 pt-0.5 text-xs font-semibold tracking-wider",children:H("createDrawer.git")}),(0,t.jsxs)("div",{className:"flex flex-1 flex-wrap items-center gap-4",children:[(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"push",size:"sm",checked:!!eT||ed||eu,onCheckedChange:e=>{ep(e),!e&&eu&&ex(!1)},disabled:c||eT}),(0,t.jsx)(k.Label,{htmlFor:"push",className:(0,b.cn)("cursor-pointer text-xs font-medium",eT&&"opacity-50"),children:H("createDrawer.push")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:eT?"Enabled — contributing to upstream":H("createDrawer.pushDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"open-pr",size:"sm",checked:!!eT||eu,onCheckedChange:e=>{ex(e),e||ej(!1)},disabled:c||eT}),(0,t.jsx)(k.Label,{htmlFor:"open-pr",className:(0,b.cn)("cursor-pointer text-xs font-medium",eT&&"opacity-50"),children:H("createDrawer.pr")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:eT?"Enabled — contributing to upstream":H("createDrawer.prDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"ci-watch",size:"sm",checked:eh,onCheckedChange:em,disabled:c}),(0,t.jsx)(k.Label,{htmlFor:"ci-watch",className:"cursor-pointer text-xs font-medium",children:H("createDrawer.watch")})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.watchDescription")})]}),(0,t.jsx)("div",{className:"bg-border h-4 w-px shrink-0"}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"rebase-before-branch",size:"sm",checked:eL,onCheckedChange:eM,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"rebase-before-branch",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(h.RefreshCw,{className:"h-3 w-3"}),H("createDrawer.sync")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.syncDescription")})]}),(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"commit-specs",size:"sm",checked:eF,onCheckedChange:eP,disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"commit-specs",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(u.FileText,{className:"h-3 w-3"}),H("createDrawer.commitSpecs")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.commitSpecsDescription")})]}),!eY&&(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"flex cursor-pointer items-center gap-1.5",children:[(0,t.jsx)(T.Switch,{id:"fork-and-pr",size:"sm",checked:eT,onCheckedChange:e=>{eS(e),e&&eP(!1)},disabled:c}),(0,t.jsxs)(k.Label,{htmlFor:"fork-and-pr",className:"flex cursor-pointer items-center gap-1 text-xs font-medium",children:[(0,t.jsx)(p.GitFork,{className:"h-3 w-3"}),H("createDrawer.forkAndPr")]})]})}),(0,t.jsx)(S.TooltipContent,{side:"bottom",children:H("createDrawer.forkAndPrDescription")})]})]})]})]})]})})})})}function Z({features:e,value:s,onChange:l,disabled:n}){let{t:c}=(0,a.useTranslation)("web"),[d,p]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),h=(0,r.useRef)(null),m=e.find(e=>e.id===s),f=u.trim()?e.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||e.id.toLowerCase().includes(u.toLowerCase())):e,g=(0,r.useCallback)(e=>{l(e),p(!1),x("")},[l]);return(0,r.useEffect)(()=>{d?setTimeout(()=>h.current?.focus(),0):x("")},[d]),(0,t.jsxs)(D.Popover,{open:d,onOpenChange:p,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{id:"parent-feature",type:"button",role:"combobox","aria-expanded":d,"aria-label":"Parent Feature",disabled:n,"data-testid":"parent-feature-combobox",className:(0,b.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",!m&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:m?`${m.name} (${m.id.slice(0,8)})`:c("createDrawer.selectParent")}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"parent-feature-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(y.Input,{ref:h,placeholder:c("createDrawer.searchFeatures"),value:u,onChange:e=>x(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"parent-feature-search"})}),(0,t.jsxs)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Features",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":void 0===s,onClick:()=>g(void 0),className:(0,b.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",void 0===s&&"bg-accent/50"),"data-testid":"parent-feature-option-none",children:[(0,t.jsx)(o.CheckIcon,{className:(0,b.cn)("h-4 w-4 shrink-0",void 0!==s&&"invisible")}),(0,t.jsx)("span",{className:"text-muted-foreground italic",children:c("createDrawer.noParent")})]}),0===f.length&&u?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:c("createDrawer.noFeaturesFound")}):f.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.id,onClick:()=>g(e.id),className:(0,b.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===e.id&&"bg-accent/50"),"data-testid":`parent-feature-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,b.cn)("h-4 w-4 shrink-0",s!==e.id&&"invisible")}),(0,t.jsxs)("span",{className:"truncate",children:[e.name," ",(0,t.jsxs)("span",{className:"text-muted-foreground font-mono text-xs",children:["(",e.id.slice(0,8),")"]})]})]},e.id))]})]})})]})}function J({repositories:e,value:s,onChange:l,onAddRepository:n,disabled:u}){let[x,h]=(0,r.useState)(!1),[m,f]=(0,r.useState)(""),[g,j]=(0,r.useState)(!1),[w,v]=(0,r.useState)(null),[C,k]=(0,r.useState)(!1),T=(0,r.useRef)(null),{reactFileManager:S}=(0,A.useFeatureFlags)(),{t:F}=(0,a.useTranslation)("web"),P=e.find(e=>e.path===s),L=m.trim()?e.filter(e=>e.name.toLowerCase().includes(m.toLowerCase())||e.path.toLowerCase().includes(m.toLowerCase())):e,M=(0,r.useCallback)(e=>{l(e),h(!1),f("")},[l]),z=(0,r.useCallback)(async e=>{let t=await (0,U.addRepository)({path:e});if(t.error){v(t.error),j(!1);return}if(t.repository){let e={id:t.repository.id,name:t.repository.name,path:t.repository.path};n?.(e),l(e.path),h(!1),f("")}},[n,l]),I=(0,r.useCallback)(async()=>{if(!g){if(S)return void k(!0);j(!0),v(null);try{let e=await (0,B.pickFolder)();if(!e)return void j(!1);await z(e)}catch{k(!0)}finally{j(!1)}}},[g,S,z]),O=(0,r.useCallback)(async e=>{if(k(!1),e){j(!0),v(null);try{await z(e)}catch(e){v(e instanceof Error?e.message:"Failed to add repository")}finally{j(!1)}}},[z]);return(0,r.useEffect)(()=>{x?setTimeout(()=>T.current?.focus(),0):f("")},[x]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(D.Popover,{open:x,onOpenChange:h,children:[(0,t.jsx)(D.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",role:"combobox","aria-expanded":x,"aria-label":"Repository",disabled:u,"data-testid":"repository-combobox",className:(0,b.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",!P&&"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"truncate",children:P?P.name:"Select repository..."}),(0,t.jsx)(i.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,t.jsx)(D.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"repository-combobox-content",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"border-b p-2",children:(0,t.jsx)(y.Input,{ref:T,placeholder:F("createDrawer.searchRepositories"),value:m,onChange:e=>f(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"repository-search"})}),(0,t.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===L.length?(0,t.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm","data-testid":"repository-empty",children:"No repositories found."}):L.map(e=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":s===e.path,onClick:()=>M(e.path),className:(0,b.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",s===e.path&&"bg-accent/50"),"data-testid":`repository-option-${e.id}`,children:[(0,t.jsx)(o.CheckIcon,{className:(0,b.cn)("h-4 w-4 shrink-0",s!==e.path&&"invisible")}),(0,t.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 truncate",children:[e.name,e.isFork?(0,t.jsxs)(N.Badge,{variant:"outline",className:"h-4 shrink-0 px-1 text-[10px]",children:[(0,t.jsx)(p.GitFork,{className:"mr-0.5 h-2.5 w-2.5"}),"Fork"]}):null]}),(0,t.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))}),(0,t.jsx)(E.Separator,{}),(0,t.jsxs)("button",{type:"button",onClick:I,disabled:g,className:"hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm","data-testid":"add-repository-item",children:[g?(0,t.jsx)(d.Loader2,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,t.jsx)(c.FolderPlus,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{children:"Add new repository..."})]}),w?(0,t.jsx)("p",{className:"px-3 pb-2 text-xs text-red-500","data-testid":"add-repository-error",children:w}):null]})})]}),(0,t.jsx)(R.ReactFileManagerDialog,{open:C,onOpenChange:e=>{e||k(!1)},onSelect:O})]})}e.s(["FeatureCreateDrawer",()=>W],630616),e.s([],34562)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},893741,a=>{"use strict";let b=(0,a.i(225700).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"}]]);a.s(["Pencil",()=>b],893741)},476945,a=>{"use strict";let b=(0,a.i(225700).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",()=>b],476945)},460704,a=>{"use strict";var b=a.i(289111);let c=(0,b.createServerReference)("60f4c819a13f54bcc8320595c03e11fb6cafe8913b",b.callServer,void 0,b.findSourceMapURL,"getGitRepoInfo");a.s(["getGitRepoInfo",()=>c])},833161,a=>{"use strict";let b=(0,a.i(225700).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);a.s(["Save",()=>b],833161)},87926,a=>{"use strict";let b=(0,a.i(225700).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"}]]);a.s(["Rocket",()=>b],87926)},42983,a=>{"use strict";let b=(0,a.i(225700).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"}]]);a.s(["Monitor",()=>b],42983)},887973,a=>{"use strict";function b(a){return`app-${a}`}a.s(["featureIdForApplication",()=>b])},670268,a=>{"use strict";var b=a.i(289111);let c=(0,b.createServerReference)("40af1b8d14947496efa0de09d2e46341cfadd226ac",b.callServer,void 0,b.findSourceMapURL,"deleteApplication");a.s(["deleteApplication",()=>c])},261189,a=>{"use strict";function b(a,b,c,d){return"processing"===b?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===b?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===d?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===d?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===d?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:c?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===a?{label:"Error",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:{label:"Ready",dotClass:"bg-sky-500",borderClass:"",pulse:!1,previewDisabled:!1}}a.s(["deriveAppLiveStatus",()=>b])},806130,a=>{"use strict";let b=(0,a.i(225700).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"}]]);a.s(["MoreHorizontal",()=>b],806130)},748957,a=>{"use strict";var b=a.i(556365),c=a.i(746847);function d({d:a,...c}){return(0,b.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...c,"aria-hidden":"true",children:(0,b.jsx)("path",{d:a})})}function e(a){return(0,b.jsx)(d,{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",...a})}let f={[c.CloudDeploymentProvider.CloudflarePages]:function(a){return(0,b.jsx)(d,{d:"M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z",...a})},[c.CloudDeploymentProvider.Vercel]:function(a){return(0,b.jsx)(d,{d:"m12 1.608 12 20.784H0Z",...a})},[c.CloudDeploymentProvider.Netlify]:function(a){return(0,b.jsx)(d,{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",...a})},[c.CloudDeploymentProvider.AwsAmplify]:function(a){return(0,b.jsx)(d,{d:"M11.58 2.1 1.15 20.87h4.33l1.9-3.5h9.24l1.9 3.5h4.33L12.42 2.1h-.84Zm.42 5.6 3.12 5.73H8.88L12 7.7Z",...a})},[c.CloudDeploymentProvider.GcpCloudRun]:function(a){return(0,b.jsx)(d,{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z",...a})}},g={[c.CloudDeploymentProvider.CloudflarePages]:"#F38020",[c.CloudDeploymentProvider.Vercel]:"#000000",[c.CloudDeploymentProvider.Netlify]:"#00C7B7",[c.CloudDeploymentProvider.AwsAmplify]:"#FF9900",[c.CloudDeploymentProvider.GcpCloudRun]:"#4285F4"};a.s(["CLOUD_PROVIDER_BRAND_HEX",0,g,"CLOUD_PROVIDER_ICONS",0,f,"GitHubIcon",()=>e])},793193,a=>{"use strict";var b=a.i(991857);a.s(["TriangleAlert",()=>b.default])},123483,a=>{"use strict";function b(a){return`Minified Redux error #${a}; visit https://redux.js.org/Errors?code=${a} for the full message or use the non-minified dev environment for full errors. `}var c="function"==typeof Symbol&&Symbol.observable||"@@observable",d=()=>Math.random().toString(36).substring(7).split("").join("."),e={INIT:`@@redux/INIT${d()}`,REPLACE:`@@redux/REPLACE${d()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${d()}`};function f(a){if("object"!=typeof a||null===a)return!1;let b=a;for(;null!==Object.getPrototypeOf(b);)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(a)===b||null===Object.getPrototypeOf(a)}function g(a,d,h){if("function"!=typeof a)throw Error(b(2));if("function"==typeof d&&"function"==typeof h||"function"==typeof h&&"function"==typeof arguments[3])throw Error(b(0));if("function"==typeof d&&void 0===h&&(h=d,d=void 0),void 0!==h){if("function"!=typeof h)throw Error(b(1));return h(g)(a,d)}let i=a,j=d,k=new Map,l=k,m=0,n=!1;function o(){l===k&&(l=new Map,k.forEach((a,b)=>{l.set(b,a)}))}function p(){if(n)throw Error(b(3));return j}function q(a){if("function"!=typeof a)throw Error(b(4));if(n)throw Error(b(5));let c=!0;o();let d=m++;return l.set(d,a),function(){if(c){if(n)throw Error(b(6));c=!1,o(),l.delete(d),k=null}}}function r(a){if(!f(a))throw Error(b(7));if(void 0===a.type)throw Error(b(8));if("string"!=typeof a.type)throw Error(b(17));if(n)throw Error(b(9));try{n=!0,j=i(j,a)}finally{n=!1}return(k=l).forEach(a=>{a()}),a}return r({type:e.INIT}),{dispatch:r,subscribe:q,getState:p,replaceReducer:function(a){if("function"!=typeof a)throw Error(b(10));i=a,r({type:e.REPLACE})},[c]:function(){return{subscribe(a){if("object"!=typeof a||null===a)throw Error(b(11));function c(){a.next&&a.next(p())}return c(),{unsubscribe:q(c)}},[c](){return this}}}}}function h(a){let c,d=Object.keys(a),f={};for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof a[c]&&(f[c]=a[c])}let g=Object.keys(f);try{Object.keys(f).forEach(a=>{let c=f[a];if(void 0===c(void 0,{type:e.INIT}))throw Error(b(12));if(void 0===c(void 0,{type:e.PROBE_UNKNOWN_ACTION()}))throw Error(b(13))})}catch(a){c=a}return function(a={},d){if(c)throw c;let e=!1,h={};for(let c=0;c<g.length;c++){let i=g[c],j=f[i],k=a[i],l=j(k,d);if(void 0===l)throw d&&d.type,Error(b(14));h[i]=l,e=e||l!==k}return(e=e||g.length!==Object.keys(a).length)?h:a}}function i(...a){return 0===a.length?a=>a:1===a.length?a[0]:a.reduce((a,b)=>(...c)=>a(b(...c)))}function j(...a){return c=>(d,e)=>{let f=c(d,e),g=()=>{throw Error(b(15))},h={getState:f.getState,dispatch:(a,...b)=>g(a,...b)};return g=i(...a.map(a=>a(h)))(f.dispatch),{...f,dispatch:g}}}function k(a){return f(a)&&"type"in a&&"string"==typeof a.type}a.s(["applyMiddleware",()=>j,"combineReducers",()=>h,"compose",()=>i,"createStore",()=>g,"isAction",()=>k,"isPlainObject",()=>f])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__52ca7f88._.js.map
|