@shepai/cli 1.183.0-pr544.e380504 → 1.183.0-pr553.cd3d150
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/README.md +1 -0
- 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 +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +32 -32
- 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/server-reference-manifest.json +30 -30
- 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/server-reference-manifest.json +33 -33
- 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/server-reference-manifest.json +41 -41
- 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/server-reference-manifest.json +41 -41
- 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/server-reference-manifest.json +31 -31
- 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/server-reference-manifest.json +31 -31
- 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/server-reference-manifest.json +30 -30
- 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)/create/page/server-reference-manifest.json +33 -33
- 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/server-reference-manifest.json +41 -41
- 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/server-reference-manifest.json +41 -41
- 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)/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
- 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/server-reference-manifest.json +31 -31
- 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/server-reference-manifest.json +7 -7
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +16 -16
- 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/applications/page/server-reference-manifest.json +15 -15
- 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/server-reference-manifest.json +7 -7
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +10 -10
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +13 -13
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +7 -7
- 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_(dashboard)_@drawer_adopt_page_actions_4f9eef62.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_4f9eef62.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_ffa16a22.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_chat_page_actions_ffa16a22.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_a1a998f9.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_chat_page_actions_a1a998f9.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.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/[root-of-the-server]__288ffaa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__288ffaa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4101a4a8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4101a4a8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__538580df._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__538580df._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5de261._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5c5de261._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__638955bc._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ac9ab3c5._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ac9ab3c5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b88acc3c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b88acc3c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3d233f3._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3d233f3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c6dba2b8._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__eacd32e9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ef0b8905._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ef0b8905._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f94e4165._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f94e4165._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ff5a5243._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ff5a5243._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_1e3ebc6f._.js → _06fde7cf._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_1e3ebc6f._.js.map → _06fde7cf._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_33a243dd._.js +1 -1
- package/web/.next/server/chunks/ssr/_519d77a9._.js +1 -1
- package/web/.next/server/chunks/ssr/_519d77a9._.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/_615e07af._.js +3 -0
- package/web/.next/server/chunks/ssr/{_9cbe2952._.js.map → _615e07af._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_b52bc5de._.js → _64d1b6ab._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_b52bc5de._.js.map → _64d1b6ab._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_6b254164._.js +1 -1
- package/web/.next/server/chunks/ssr/_6b254164._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_3210e961._.js → _87fc28df._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_3210e961._.js.map → _87fc28df._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_55f19af3._.js → _8b845c2a._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_55f19af3._.js.map → _8b845c2a._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_8e101e0b._.js +2 -2
- package/web/.next/server/chunks/ssr/_8e101e0b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_c08ef004._.js → _dfbeab70._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_c08ef004._.js.map → _dfbeab70._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_e65abbd1._.js +1 -1
- package/web/.next/server/chunks/ssr/_e65abbd1._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f86fc1bf._.js +1 -1
- package/web/.next/server/chunks/ssr/_f86fc1bf._.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_47181610._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_47181610._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_5d3f4199._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_5d3f4199._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_61d96ba8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_61d96ba8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6994959a._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6994959a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_77dadf68._.js +3 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_77dadf68._.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_(dashboard)_page_actions_c3f6f57e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_c3f6f57e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_8514dfcd._.js +3 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_b95ed206._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b95ed206._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c543cf3e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c543cf3e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.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/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +54 -54
- package/web/.next/static/chunks/{bafb955a46126844.js → 04c38e109dd4d082.js} +2 -2
- package/web/.next/static/chunks/{f83ba609e7e57cec.js → 0658b69414ca5ecc.js} +1 -1
- package/web/.next/static/chunks/{f6ad93e60f00394a.js → 1a0d47b7acf662f8.js} +1 -1
- package/web/.next/static/chunks/{32647ba32c50071d.js → 31f0d4fdd800c3ec.js} +1 -1
- package/web/.next/static/chunks/{d84b58ff43d005d5.js → 36d968c44c52dccd.js} +1 -1
- package/web/.next/static/chunks/{e60c7856d3e6ea21.js → 4ac64eaceef16292.js} +1 -1
- package/web/.next/static/chunks/{97529adb71357f29.js → 4d7751c92a531b4c.js} +1 -1
- package/web/.next/static/chunks/{62105cbfe8101d42.js → 4f4945ed1c4b793f.js} +3 -3
- package/web/.next/static/chunks/{71f92087b4615a27.js → 7aaf68f557255f3d.js} +1 -1
- package/web/.next/static/chunks/91548fae41232f24.js +1 -0
- package/web/.next/static/chunks/930ceb2e741b0343.js +1 -0
- package/web/.next/static/chunks/{1f396935ae96efdb.js → 9619faa56afb8dee.js} +1 -1
- package/web/.next/static/chunks/{97cf6e83c89e3a5d.js → 966f57938829b729.js} +1 -1
- package/web/.next/static/chunks/{cfdce755f4d925d2.js → 97a6e70bf3c1e782.js} +1 -1
- package/web/.next/static/chunks/{45d179f6d733f636.js → 9a6c59ac77000a57.js} +1 -1
- package/web/.next/static/chunks/{7fdb7d9b1fcf1ce3.js → a19c77561ecb59d0.js} +1 -1
- package/web/.next/static/chunks/{859df714bcb951b5.js → c9dde6d26ec1357f.js} +1 -1
- package/web/.next/static/chunks/{a3ad2d0cd55879ae.js → f89f13e73f1306e0.js} +1 -1
- package/web/.next/server/chunks/ssr/_9cbe2952._.js +0 -3
- package/web/.next/static/chunks/6268bddcc10f13c3.js +0 -1
- package/web/.next/static/chunks/aae2e4b2e4dd2a04.js +0 -1
- /package/web/.next/static/{4LsoI-IfCVyMl_3wukdtL → s9Tl6ka-fGtxB11GslSv7}/_buildManifest.js +0 -0
- /package/web/.next/static/{4LsoI-IfCVyMl_3wukdtL → s9Tl6ka-fGtxB11GslSv7}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{4LsoI-IfCVyMl_3wukdtL → s9Tl6ka-fGtxB11GslSv7}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87292,e=>{"use strict";var t=e.i(79606),a=e.i(52155),s=e.i(11434);e.i(41001);var i=e.i(64780),r=e.i(84840),n=e.i(57638),o=e.i(3645);let l=(0,o.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var c=e.i(42049);let u=(0,o.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),d=(0,o.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),h=(0,o.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),m=(0,o.default)("volume-off",[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]]);var p=e.i(53360);let f=(0,o.default)("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var g=e.i(81975),x=e.i(12103),b=e.i(39200);let y=(0,o.default)("table-properties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);var v=e.i(35340),w=e.i(56460),j=e.i(8361);function k({icon:e,label:a,href:s,active:i=!1}){let r=(0,j.useSoundAction)("navigate");return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"sidebar-nav-item",children:(0,t.jsx)(n.SidebarMenuButton,{asChild:!0,isActive:i,tooltip:a,children:(0,t.jsxs)(w.default,{href:s,onClick:()=>r.play(),children:[(0,t.jsx)(e,{}),(0,t.jsx)("span",{children:a})]})})})}var N=e.i(71379),N=N,S=e.i(35364),C=e.i(31777);function M({className:e}){let{toggleSidebar:a,open:s}=(0,n.useSidebar)(),i=(0,j.useSoundAction)("expand"),r=(0,j.useSoundAction)("collapse");return(0,t.jsx)("div",{className:(0,C.cn)("flex",e),children:(0,t.jsx)(S.Button,{"data-testid":"sidebar-collapse-toggle",variant:"ghost",size:"icon",className:"size-7 cursor-pointer group-data-[collapsible=icon]:size-8!",onClick:()=>{s?r.play():i.play(),a()},"aria-label":s?"Collapse sidebar":"Expand sidebar",children:(0,t.jsx)(N.default,{className:"size-4"})})})}e.i(92233);var T=e.i(10025),E=e.i(2828);function A({version:e,branch:s,commitHash:r,isDev:n=!1,packageName:o="@shepai/cli",description:l,instancePath:c}){let{t:u}=(0,i.useTranslation)("web"),d=r?.slice(0,7),{latest:h,updateAvailable:m}=function(e){let[t,s]=(0,a.useState)(null),[i,r]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/npm-version");if(!t.ok)return;let a=await t.json();!e&&a.latest&&s(a.latest)}catch{}finally{e||r(!1)}}(),()=>{e=!0}},[]);let n=null!==t&&function(e,t){let a=e=>e.split("-")[0].split(".").map(Number),s=a(e),i=a(t);for(let e=0;e<3;e++){let t=s[e]??0,a=i[e]??0;if(t>a)return 1;if(t<a)return -1}return 0}(t,e)>0;return{latest:t,updateAvailable:n,loading:i}}(e),{status:p,startUpgrade:f}=function(){let[e,t]=(0,a.useState)("idle"),[s,i]=(0,a.useState)(""),[r,n]=(0,a.useState)(),o=(0,a.useRef)(null),l=(0,a.useRef)(!1),c=(0,a.useCallback)(()=>{if("upgrading"===e||"restarting"===e)return;t("upgrading"),i(""),n(void 0),l.current=!1;let a=new AbortController;return o.current=a,fetch("/api/cli-upgrade",{method:"POST",signal:a.signal}).then(async e=>{if(!e.ok||!e.body){t("error"),n(`Server returned ${e.status}`);return}let a=e.body.getReader(),s=new TextDecoder,r="";for(;;){let{done:e,value:o}=await a.read();if(e)break;let c=(r+=s.decode(o,{stream:!0})).split("\n");for(let e of(r=c.pop()??"",c)){if(e.startsWith("event: restarting")){l.current=!0,t("restarting"),function(e,t){let a=Date.now()+3e4,s=()=>{Date.now()>a||fetch("/api/version",{method:"GET",cache:"no-store"}).then(e=>{e.ok?window.location.reload():setTimeout(s,500)}).catch(()=>{setTimeout(s,500)})};setTimeout(s,500)}(0,0);continue}if(!e.startsWith("event: done")&&e.startsWith("data: ")){let a=e.slice(6);try{let e=JSON.parse(a);"upgraded"===e.status?t("upgraded"):"up-to-date"===e.status?t("up-to-date"):"error"===e.status&&(t("error"),n(e.errorMessage))}catch{i(e=>e+a)}}}}}).catch(e=>{l.current||e instanceof DOMException&&"AbortError"===e.name||(t("error"),n(e instanceof Error?e.message:"Upgrade failed"))}),()=>{a.abort()}},[e]);return{status:e,output:s,errorMessage:r,startUpgrade:c}}(),g=n?`${e}-dev`:`v${e}`,x="upgrading"===p,b="restarting"===p,y="upgraded"===p;return(0,t.jsx)(E.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground/80 hover:text-muted-foreground relative cursor-default text-[11px] leading-tight transition-colors","data-testid":"version-label",children:[g,!m||y||b?null:(0,t.jsx)("span",{className:"absolute -top-0.5 -right-1.5 size-1.5 rounded-full bg-emerald-400","data-testid":"update-dot"})]})}),(0,t.jsxs)(E.TooltipContent,{side:"right",className:"max-w-[280px] space-y-1 p-3 text-start",children:[(0,t.jsx)("div",{className:"mb-1.5 text-xs font-semibold",children:o}),l?(0,t.jsx)("div",{className:"text-[10px] leading-snug opacity-70",children:l}):null,(0,t.jsxs)("div",{className:"border-t border-white/10 pt-1.5",children:[(0,t.jsx)(P,{label:u("versionBadge.version"),value:g}),n&&s?(0,t.jsx)(P,{label:u("versionBadge.branch"),value:s}):null,n&&d?(0,t.jsx)(P,{label:u("versionBadge.commit"),value:d,mono:!0}):null,n&&c?(0,t.jsx)(P,{label:u("versionBadge.path"),value:c,mono:!0}):null,h?(0,t.jsx)(P,{label:"Latest",value:`v${h}`,highlight:m}):null]}),b?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-restarting",children:"Restarting..."})}):y?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-success",children:"Upgraded successfully"})}):"error"===p?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-red-400","data-testid":"upgrade-error",children:"Upgrade failed"})}):m?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("button",{type:"button",onClick:f,disabled:x||b,className:"inline-flex items-center gap-1 text-[10px] font-medium text-emerald-400 transition-colors hover:text-emerald-300 disabled:opacity-50","data-testid":"upgrade-button",children:x?"Upgrading...":b?"Restarting...":`Upgrade to v${h}`})}):null]})]})})}function P({label:e,value:a,highlight:s,mono:i}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[(0,t.jsx)("span",{className:"opacity-60",children:e}),(0,t.jsx)("span",{className:[s?"font-medium text-emerald-400":"",i||!s?"font-mono":""].filter(Boolean).join(" "),children:a})]})}function D({startedAt:e}){let[s,i]=(0,a.useState)(()=>Date.now()-e);return(0,a.useEffect)(()=>{let t=setInterval(()=>{(0,a.startTransition)(()=>i(Date.now()-e))},1e3);return()=>clearInterval(t)},[e]),(0,t.jsx)("span",{"data-testid":"elapsed-time",className:"tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t>=3600){let e=Math.floor(t/3600);return`${e}h`}let a=Math.floor(t/60);return`${String(a).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}(s)})}var O=e.i(51251),q=e.i(83428),L=e.i(34119),I=e.i(94819),Q=e.i(54277),R=e.i(55016);let z={"action-needed":{icon:O.CircleAlert,iconClass:"text-amber-500",bgClass:"bg-amber-500/10",labelKey:"sidebar.statusActionNeeded"},"in-progress":{icon:q.Loader2,iconClass:"text-blue-500 animate-spin",bgClass:"bg-blue-500/10",labelKey:"sidebar.statusInProgress"},pending:{icon:R.Clock,iconClass:"text-slate-400",bgClass:"bg-slate-400/10",labelKey:"sidebar.statusPending"},blocked:{icon:I.Ban,iconClass:"text-gray-400",bgClass:"bg-gray-400/10",labelKey:"sidebar.statusBlocked"},error:{icon:Q.CircleX,iconClass:"text-red-500",bgClass:"bg-red-500/10",labelKey:"sidebar.statusError"},done:{icon:L.CircleCheck,iconClass:"text-emerald-500",bgClass:"bg-emerald-500/10",labelKey:"sidebar.statusDone"}},F=["action-needed","error","blocked","in-progress","pending","done"];var K=e.i(86782),H=e.i(29847);function B({name:e,status:a,startedAt:s,duration:i,agentType:r,modelId:o,onClick:l}){let{icon:c,iconClass:u}=z[a],d=r?(0,K.getAgentTypeIcon)(r):null;return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"feature-list-item",children:(0,t.jsxs)(n.SidebarMenuButton,{size:"sm",onClick:l,tooltip:e,className:"cursor-pointer",children:[(0,t.jsx)(c,{className:u}),(0,t.jsx)("span",{className:"flex-1 truncate font-medium",children:e}),"in-progress"===a&&null!=s?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:(0,t.jsx)(D,{startedAt:s})}):null,"done"===a&&i?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:i}):null,d?(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"ml-auto shrink-0",children:(0,t.jsx)(d,{className:"h-3.5 w-3.5"})})}),(0,t.jsxs)(E.TooltipContent,{side:"right",children:[(0,t.jsx)("span",{className:"font-medium",children:K.agentTypeLabels[r]??r}),o?(0,t.jsxs)("span",{className:"ms-1 opacity-70",children:["· ",(0,H.getModelMeta)(o).displayName||o]}):null]})]})}):null]})})}var _=e.i(73709);let G="shep-animations-enabled",$="shep:animations-toggle",U="no-animations",X="shep-theme";function W({label:e,count:a,children:s}){return(0,t.jsxs)(n.SidebarGroup,{"data-testid":"feature-status-group",className:"px-2 py-1",children:[(0,t.jsxs)(n.SidebarGroupLabel,{className:"text-muted-foreground h-6 px-2 text-[0.65rem] font-semibold tracking-wider uppercase",children:[e,(0,t.jsx)("span",{"aria-label":`${a} items`,className:"bg-sidebar-accent text-sidebar-accent-foreground ms-1.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:a})]}),(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)(n.SidebarMenu,{className:"gap-0.5",children:s})})]})}var Y=e.i(99105),V=e.i(81542),Z=e.i(3214);function J({repoName:e,featureCount:s,children:i,defaultOpen:r=!0,onAddFeature:n}){let[o,l]=(0,a.useState)(r);return(0,t.jsxs)("div",{"data-testid":"repo-group",className:"group/repo mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(!o),className:(0,C.cn)("text-sidebar-foreground hover:bg-sidebar-accent flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs font-semibold","transition-colors duration-100"),"aria-expanded":o,children:[(0,t.jsx)(Y.ChevronDown,{className:(0,C.cn)("text-muted-foreground h-3.5 w-3.5 shrink-0 transition-transform duration-200",!o&&"-rotate-90")}),(0,t.jsx)(V.GitFork,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{"aria-label":`${s} features`,className:"bg-sidebar-accent text-sidebar-accent-foreground ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:s})]}),n?(0,t.jsx)("button",{type:"button","data-testid":"repo-add-feature",onClick:e=>{e.stopPropagation(),n()},className:(0,C.cn)("text-muted-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent mr-2 shrink-0 rounded-md p-1 opacity-0 transition-all duration-100 group-hover/repo:opacity-100","focus-visible:ring-ring focus-visible:opacity-100 focus-visible:ring-1 focus-visible:outline-none"),"aria-label":`Add feature to ${e}`,children:(0,t.jsx)(Z.Plus,{className:"h-3.5 w-3.5"})}):null]}),o?(0,t.jsx)("div",{className:"pl-2",children:i}):null]})}function ee({label:e,className:a}){return(0,t.jsx)(n.SidebarGroup,{"data-testid":"sidebar-section-header",className:(0,C.cn)("px-2 py-1",a),children:(0,t.jsx)("div",{className:"text-sidebar-foreground flex h-7 w-full shrink-0 items-center px-2 text-sm font-medium",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})})})}let et={version:"unknown",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform",branch:"",commitHash:"",instancePath:"",isDev:!1};function ea({features:e,featureFlags:r,onFeatureClick:o,onAddFeature:w}){let{t:N,i18n:S}=(0,i.useTranslation)("web"),C=(0,s.usePathname)(),{state:P}=(0,n.useSidebar)(),D="collapsed"===P,{mounted:O,visible:q}=function(e,t){let[s,i]=(0,a.useState)(!e),[r,n]=(0,a.useState)(!e);return(0,a.useEffect)(()=>{if(!e){i(!0);let e=requestAnimationFrame(()=>n(!0));return()=>cancelAnimationFrame(e)}n(!1);let t=window.setTimeout(()=>i(!1),200);return()=>window.clearTimeout(t)},[e,200]),{mounted:s,visible:r}}(D,0),L=function(){let[e,t]=(0,a.useState)(et);return(0,a.useEffect)(()=>{let e=!1;return async function(){try{let a=await fetch("/api/version");if(!a.ok)return;let s=await a.json();e||t(s)}catch{}}(),()=>{e=!0}},[]),e}(),{enabled:I,toggle:Q}=(0,_.useSoundEnabled)(),{enabled:R,toggle:K}=function(){let[e,t]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem(G)&&(t(!1),document.body.classList.add(U));let e=e=>{let a=e.detail;t(a),document.body.classList.toggle(U,!a)};return window.addEventListener($,e),()=>window.removeEventListener($,e)},[]);let s=(0,a.useCallback)(()=>{let a=!e;localStorage.setItem(G,String(a)),t(a),document.body.classList.toggle(U,!a),window.dispatchEvent(new CustomEvent($,{detail:a}))},[e]);return{enabled:e,toggle:s}}(),{resolvedTheme:H,theme:Y,setTheme:V}=function(){let[e,t]=(0,a.useState)("system"),[s,i]=(0,a.useState)("light"),r=(0,a.useCallback)(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),n=(0,a.useCallback)(e=>"system"===e?r():e,[r]),o=(0,a.useCallback)(e=>{if("u"<typeof document)return;let t=document.documentElement;t.classList.remove("light","dark"),t.classList.add(e),i(e)},[]),l=(0,a.useCallback)(e=>{t(e),"u">typeof localStorage&&localStorage.setItem(X,e),o(n(e))},[n,o]);return(0,a.useEffect)(()=>{let e=localStorage.getItem(X)??"system";t(e),o(n(e))},[n,o]),(0,a.useEffect)(()=>{let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{"system"===e&&o(n("system"))};return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,n,o]),{theme:e,resolvedTheme:s,setTheme:l}}(),Z=(0,j.useSoundAction)("toggle-on"),ea=(0,j.useSoundAction)("toggle-off"),es=(0,j.useSoundAction)("navigate"),ei=(0,a.useMemo)(()=>{let t=new Map;for(let a of e){let e=a.repositoryPath,s=t.get(e);s||(s={repoName:a.repositoryName,features:[]},t.set(e,s)),s.features.push(a)}return Array.from(t.entries()).map(([e,{repoName:t,features:a}])=>({repoPath:e,repoName:t,featureCount:a.length,statusGroups:F.map(e=>({statusKey:e,label:N(z[e].labelKey),items:a.filter(t=>t.status===e)})).filter(e=>e.items.length>0)}))},[e,N]);return(0,t.jsxs)(n.Sidebar,{"data-testid":"app-sidebar","data-no-drawer-close":!0,collapsible:"icon",side:"rtl"===S.dir()?"right":"left",children:[(0,t.jsx)(n.SidebarHeader,{children:(0,t.jsxs)(n.SidebarMenu,{children:[(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsxs)("div",{className:"flex h-8 items-center group-data-[collapsible=icon]:justify-center",children:[O?(0,t.jsxs)("div",{className:["flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2 transition-opacity duration-200 ease-out",q?"opacity-100":"opacity-0"].join(" "),"aria-hidden":!q,children:[(0,t.jsx)(T.ShepLogo,{className:"shrink-0",size:20,variant:L.isDev?"dev":"default"}),(0,t.jsx)("span",{className:"truncate text-sm font-semibold tracking-tight",children:"Shep"}),(0,t.jsx)(A,{version:L.version,branch:L.branch||void 0,commitHash:L.commitHash||void 0,isDev:L.isDev,packageName:L.packageName,description:L.description,instancePath:L.instancePath||void 0})]}):null,(0,t.jsx)(M,{className:"shrink-0 transition-all duration-200"})]})}),(0,t.jsx)(k,{icon:l,label:N("navigation.controlCenter"),href:"/",active:"/"===C}),r.inventory?(0,t.jsx)(k,{icon:y,label:N("navigation.inventory"),href:"/features",active:"/features"===C}):null,(0,t.jsx)(k,{icon:c.LayoutGrid,label:N("navigation.applications"),href:"/applications",active:"/applications"===C}),(0,t.jsx)(k,{icon:g.Wrench,label:N("navigation.tools"),href:"/tools",active:"/tools"===C}),r.skills?(0,t.jsx)(k,{icon:x.Puzzle,label:N("navigation.skills"),href:"/skills",active:"/skills"===C}):null,(0,t.jsx)(k,{icon:b.Settings,label:N("navigation.settings"),href:"/settings",active:"/settings"===C})]})}),(0,t.jsx)(n.SidebarContent,{children:O?(0,t.jsxs)("div",{className:["flex min-h-0 flex-1 flex-col overflow-hidden transition-opacity duration-200 ease-out [&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none",q?"opacity-100":"opacity-0"].join(" "),children:[(0,t.jsx)(ee,{label:N("sidebar.features")}),(0,t.jsx)(v.ScrollArea,{className:"min-h-0 flex-1",children:ei.map(({repoPath:e,repoName:a,featureCount:s,statusGroups:i})=>(0,t.jsx)(J,{repoName:a,featureCount:s,onAddFeature:w?()=>w(e):void 0,children:i.map(({statusKey:e,label:a,items:s})=>(0,t.jsx)(W,{label:a,count:s.length,children:s.map(e=>(0,t.jsx)(B,{name:e.name,status:e.status,startedAt:e.startedAt,duration:e.duration,agentType:e.agentType,modelId:e.modelId,onClick:o?()=>o(e.featureId):void 0},e.featureId))},e))},e))})]}):null}),(0,t.jsx)(n.SidebarFooter,{className:"border-t p-2",children:(0,t.jsx)(n.SidebarMenu,{children:(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsxs)(E.TooltipProvider,{children:[(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:e=>{let t="system"===Y?"dark"===H?"light":"dark":"dark"===Y?"light":"dark";"dark"!==("system"===Y?H:Y)?Z.play():ea.play();let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"startViewTransition"in document&&!a?(document.documentElement.style.setProperty("--x",`${e.clientX}px`),document.documentElement.style.setProperty("--y",`${e.clientY}px`),document.startViewTransition(()=>{V(t)})):V(t)},"aria-label":"dark"===H?N("sidebar.switchToLight"):N("sidebar.switchToDark"),children:[(0,t.jsx)(d,{className:"h-4 w-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,t.jsx)(u,{className:"absolute h-4 w-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"})]})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:"dark"===H?N("sidebar.switchToLight"):N("sidebar.switchToDark")})]}),!D&&(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{es.play(),Q()},"aria-label":I?N("sidebar.muteSounds"):N("sidebar.unmuteSounds"),children:I?(0,t.jsx)(h,{className:"h-4 w-4"}):(0,t.jsx)(m,{className:"h-4 w-4"})})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:I?N("sidebar.muteSounds"):N("sidebar.unmuteSounds")})]}),!D&&(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{es.play(),K()},"aria-label":R?"Disable animations":"Enable animations",children:R?(0,t.jsx)(p.Zap,{className:"h-4 w-4"}):(0,t.jsx)(f,{className:"h-4 w-4"})})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:R?"Disable animations":"Enable animations"})]})]})})})})}),(0,t.jsx)(n.SidebarRail,{})]})}e.i(13322);var es=e.i(61201),ei=e.i(48109),er=e.i(60253),en=e.i(26370);let eo=(0,o.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);var el=e.i(87538);let ec=(0,o.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var eu=e.i(28112),ed=e.i(57779),eh=e.i(80554),em=e.i(38373),ep=e.i(5147);let ef="shep-global-chat";function eg(){try{let e=localStorage.getItem(ef);if(!e)return{pos:null,size:null};let t=JSON.parse(e),a=t.size??null;return a&&(a.w<360||a.h<300)&&(a={w:Math.max(360,a.w),h:Math.max(300,a.h)}),{pos:t.pos??null,size:a}}catch{return{pos:null,size:null}}}function ex(){let{t:e}=(0,i.useTranslation)("web"),[s,r]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),d=(0,eh.useTurnStatus)("global"),{swapPosition:h}=(0,em.useFabLayout)(),{state:m}=(0,n.useSidebar)(),{hasRepositories:p}=(0,ep.useSidebarFeaturesContext)(),[f,g]=(0,a.useState)(()=>eg().pos),[x,b]=(0,a.useState)(()=>eg().size),y=(0,a.useCallback)(e=>{g(t=>"function"==typeof e?e(t):e)},[]),v=(0,a.useCallback)(e=>{b(t=>"function"==typeof e?e(t):e)},[]),w=(0,a.useRef)(null),j=(0,a.useRef)(null),k=(0,a.useRef)(null),N=(0,a.useCallback)(()=>{r(e=>(e||l(!0),!e))},[]),M=(0,a.useRef)({pos:null,size:null}),T=(0,a.useCallback)(()=>{s||(r(!0),l(!0)),u(e=>(e?(y(M.current.pos),v(M.current.size)):M.current={pos:f,size:x},!e))},[s,f,x,y,v]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&("k"===e.key||"K"===e.key)&&(e.preventDefault(),c&&u(!1),N(),requestAnimationFrame(()=>{setTimeout(()=>{let e=w.current?.querySelector("textarea");e?.focus()},100)})),(e.metaKey||e.ctrlKey)&&e.shiftKey&&("m"===e.key||"M"===e.key)&&(e.preventDefault(),T())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[N,T,c]),(0,a.useEffect)(()=>{let e=setTimeout(()=>(function(e,t){try{localStorage.setItem(ef,JSON.stringify({pos:e,size:t}))}catch{}})(f,x),300);return()=>clearTimeout(e)},[f,x]);let E=(0,a.useCallback)((e,t,a)=>({x:Math.max(-a+100,Math.min(e,window.innerWidth-100)),y:Math.max(0,Math.min(t,window.innerHeight-48))}),[]),A=(0,a.useCallback)(e=>{e.preventDefault();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=f?.x??a.left,i=f?.y??a.top;j.current={startX:e.clientX,startY:e.clientY,startPosX:s,startPosY:i};let r=x?.w??a.width,n=e=>{if(!j.current)return;let t=e.clientX-j.current.startX,a=e.clientY-j.current.startY;y(E(j.current.startPosX+t,j.current.startPosY+a,r))},o=()=>{j.current=null,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",o)},[f,x,y,E]),P=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=x?.w??a.width,i=x?.h??a.height,r=e.clientX,n=e.clientY,o=f?.y??a.top;k.current={startX:r,startY:n,startW:s,startH:i},f||y({x:a.left,y:a.top});let l=e=>{if(!k.current)return;let t=e.clientX-r,l=e.clientY-n,c=Math.max(360,s+t),u=Math.max(300,i-l),d=Math.max(0,o+l);v({w:c,h:u}),y(e=>E(e?.x??a.left,d,c))},c=()=>{k.current=null,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},[x,f,y,v,E]),D=(0,a.useCallback)(()=>{r(!1),u(!1)},[]),O=c?{}:f?{position:"fixed",left:f.x,top:f.y,width:x?.w??520,height:x?.h??"70vh"}:{width:x?.w??520,height:x?.h??"70vh"};return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsxs)("div",{ref:w,className:(0,C.cn)(c?"bg-background fixed inset-0 z-[60] flex flex-col overflow-hidden dark:bg-neutral-900":(0,C.cn)(!f&&(h?"fixed start-8 bottom-24":"fixed end-8 bottom-24"),"z-[60] flex flex-col overflow-hidden rounded-lg","border-border/60 border dark:border-white/10","bg-background dark:bg-neutral-900","shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]"),"transition-opacity duration-300 ease-out",s?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:O,children:[c?null:(0,t.jsx)("div",{className:"h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent"}),c?null:(0,t.jsx)("div",{onMouseDown:P,className:"absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize"}),(0,t.jsxs)("div",{onMouseDown:c?void 0:A,className:(0,C.cn)("relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]",!c&&"cursor-grab active:cursor-grabbing"),children:[(0,t.jsx)("div",{className:"from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent"}),c?null:(0,t.jsx)(eo,{className:"text-foreground/15 relative h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("div",{className:"relative flex h-5 w-5 items-center justify-center",children:(0,t.jsx)(en.Bot,{className:"text-foreground/50 h-4 w-4"})}),(0,t.jsxs)("div",{className:"relative flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-foreground/90 text-base font-bold tracking-tight",children:"Shep"}),(0,t.jsx)("span",{className:"text-foreground/30 text-xs font-medium tracking-widest uppercase",children:"global"})]}),(0,t.jsxs)("div",{className:"relative ms-auto flex items-center gap-0.5",children:[(0,t.jsx)("button",{type:"button",onClick:T,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:c?"Restore (⌘⇧M)":"Maximize (⌘⇧M)",children:c?(0,t.jsx)(ec,{className:"h-3.5 w-3.5"}):(0,t.jsx)(el.Maximize2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:D,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:"Close (⌘⇧K)",children:(0,t.jsx)(er.X,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(eu.ChatTab,{featureId:"global"})}),c?null:(0,t.jsx)("div",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=e.clientX,i=e.clientY,r=x?.w??a.width,n=x?.h??a.height;f||y({x:a.left,y:a.top});let o=e=>{let t=window.innerHeight-(f?.y??a.top);v({w:Math.max(360,r+(e.clientX-s)),h:Math.max(300,Math.min(n+(e.clientY-i),t))})},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},className:"absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize"})]}):null,p?(0,t.jsxs)(eb,{swapPosition:h,sidebarState:m,isMaximized:c,children:[(0,t.jsxs)(S.Button,{size:"icon",onClick:N,className:(0,C.cn)("relative h-14 w-14 rounded-full shadow-lg","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95",s?"bg-violet-600 text-white hover:bg-violet-500":"bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400",!s&&"processing"===d&&"chat-fab-spinning",!s&&"unread"===d&&"chat-fab-glow-unread",!s&&"awaiting_input"===d&&"chat-fab-glow-awaiting"),children:[(0,t.jsx)(ei.MessageSquare,{className:(0,C.cn)("absolute h-7 w-7 stroke-[2.5] transition-all duration-200",s?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100")}),(0,t.jsx)(er.X,{className:(0,C.cn)("absolute h-6 w-6 stroke-[2.5] transition-all duration-200",s?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0")}),!s&&(0,t.jsx)(ed.ChatDotIndicator,{status:d,className:"end-0 top-0"})]}),(0,t.jsx)("div",{className:"pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100",children:(0,t.jsxs)("div",{className:"bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg",children:[(0,t.jsx)("p",{className:"text-background text-xs font-medium whitespace-nowrap",children:e("chat.shepChat")}),(0,t.jsxs)("p",{className:"text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]",children:[(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⌘"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⇧"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"K"})]})]})})]}):null]})}function eb({swapPosition:e,sidebarState:a,isMaximized:s,children:r}){let{i18n:n}=(0,i.useTranslation)("web"),o="rtl"===n.dir();if(!e)return(0,t.jsx)("div",{className:(0,C.cn)("group/fab fixed end-8 bottom-6 z-30",s&&"hidden"),children:r});let l="expanded"===a?"calc(var(--sidebar-width) + 32px)":"calc(var(--sidebar-width-icon) + 32px)";return(0,t.jsx)("div",{className:(0,C.cn)("group/fab fixed bottom-6 z-30",s&&"hidden"),style:o?{right:l,transition:"right 200ms ease-in-out"}:{left:l,transition:"left 200ms ease-in-out"},children:r})}var ey=e.i(78521),ev=e.i(2287),ew=e.i(68304),ej=e.i(98127),ek=e.i(41957);let eN=/^(?: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 eS({onSubmit:e,loading:s=!1}){let[i,r]=(0,a.useState)(""),[n,o]=(0,a.useState)("");function l(){let t=i.trim();t?eN.test(t.trim())?(o(""),e(t)):o("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):o("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(ek.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(ej.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{r(e.target.value),n&&o("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),l())},disabled:s,"aria-invalid":!!n,"aria-describedby":n?"github-url-error":void 0}),(0,t.jsx)(S.Button,{onClick:l,disabled:s||!i.trim(),size:"sm",children:s?(0,t.jsx)(q.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),n?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:n}):null]})}let eC=(0,o.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"}]]);var eM=e.i(32494),eT=e.i(66459),eE=e.i(79687),eA=e.i(81846),eP=e.i(61238),eD=e.i(47373),eO=e.i(8893);let eq=(0,eO.createServerReference)("40d0a4802d12d260c9bc8ae0dacd13a0ca7d4e9284",eO.callServer,void 0,eO.findSourceMapURL,"listGitHubRepositories"),eL=(0,eO.createServerReference)("00f55f446333960806e2328f57ca189a3e25cb78ff",eO.callServer,void 0,eO.findSourceMapURL,"listGitHubOrganizations"),eI="__personal__";function eQ({onSelect:e,loading:s=!1,fetchRepos:i=eq,fetchOrgs:r=eL}){let[n,o]=(0,a.useState)([]),[l,c]=(0,a.useState)([]),[u,d]=(0,a.useState)(!0),[h,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,x]=(0,a.useState)(eI),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await r();e.orgs&&c(e.orgs)}catch{}}()},[r]);let y=(0,a.useCallback)(async(e,t)=>{d(!0),m("");try{let a={};e&&(a.search=e),t&&t!==eI&&(a.owner=t);let s=await i(Object.keys(a).length>0?a:void 0);s.error?(m(s.error),o([])):o(s.repos??[])}catch{m("Failed to fetch repositories"),o([])}finally{d(!1)}},[i]);return((0,a.useEffect)(()=>{y(p||void 0,g)},[y,g]),h&&!u)?(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)(eE.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:h})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[l.length>0?(0,t.jsxs)(eD.Select,{value:g,onValueChange:function(e){x(e),f("")},disabled:s,children:[(0,t.jsx)(eD.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(eD.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(eD.SelectContent,{children:[(0,t.jsx)(eD.SelectItem,{value:eI,children:"My repositories"}),l.map(e=>(0,t.jsx)(eD.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(eT.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(ej.Input,{placeholder:"Search repositories...",value:p,onChange:e=>{var t;f(t=e.target.value),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{y(t||void 0,g)},300)},className:"ps-9",disabled:s,"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:u?(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)(eP.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(eP.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.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:s,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)(eA.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eC,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eM.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]}),s?(0,t.jsx)(q.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let eR=(0,eO.createServerReference)("402274cec43c00d226cb179f28cc106cc056c54b74",eO.callServer,void 0,eO.findSourceMapURL,"importGitHubRepository");function ez({open:e,onOpenChange:s,onImportComplete:i}){let[r,n]=(0,a.useState)(!1),[o,l]=(0,a.useState)("");async function c(e){n(!0),l("");try{let t=await eR({url:e});t.error?l(t.error):t.repository&&(i(t.repository),s(!1))}catch{l("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(ev.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(ev.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(ev.DialogHeader,{children:[(0,t.jsx)(ev.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(ev.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(ew.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(ew.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(ew.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(ew.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(ew.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(eS,{onSubmit:c,loading:r})}),(0,t.jsx)(ew.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(eQ,{onSelect:c,loading:r})})]}),o?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:o}):null]})})}var eF=e.i(48034),eK=e.i(30153),eH=e.i(60112),eB=e.i(17406);let e_={[eB.NotificationSeverity.Success]:"success",[eB.NotificationSeverity.Error]:"error",[eB.NotificationSeverity.Warning]:"warning",[eB.NotificationSeverity.Info]:"info"},eG={[eB.NotificationSeverity.Success]:"notification-success",[eB.NotificationSeverity.Error]:"notification-error",[eB.NotificationSeverity.Warning]:"notification-warning",[eB.NotificationSeverity.Info]:"notification-info"};var e$=e.i(75921);function eU({children:e,sidebarOpen:i}){let r=(0,s.useRouter)(),{guardedNavigate:o}=(0,eK.useDrawerCloseGuard)(),l=(0,e$.useFeatureFlags)();!function(){let e=(0,s.useRouter)(),{events:t}=(0,eF.useAgentEventsContext)(),i=(0,j.useSoundAction)("notification-success"),r=(0,j.useSoundAction)("notification-error"),n=(0,j.useSoundAction)("notification-warning"),o=(0,j.useSoundAction)("notification-info"),l=(0,a.useMemo)(()=>({"notification-success":i,"notification-error":r,"notification-warning":n,"notification-info":o}),[i,r,n,o]),c=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(t.length<=c.current)return;let a=t.slice(c.current);for(let s of(c.current=t.length,a)){if(s.eventType!==eB.NotificationEventType.MergeReviewReady&&s.severity!==eB.NotificationSeverity.Error&&s.severity!==eB.NotificationSeverity.Warning&&s.severity!==eB.NotificationSeverity.Success)continue;!function(e,t){let a=e_[e.severity]??"info",s=e.eventType===eB.NotificationEventType.WaitingApproval||e.eventType===eB.NotificationEventType.MergeReviewReady;eH.toast[a](e.featureName,{description:e.message,...s&&t&&{action:{label:"Review",onClick:()=>{t(`/feature/${e.featureId}`)}}}})}(s,t=>e.push(t));let t=eG[s.severity];l[t]?.play()}},[t,l,e])}();let{features:c}=(0,ep.useSidebarFeaturesContext)(),u=(0,a.useCallback)(e=>{o(()=>r.push(`/feature/${e}`))},[r,o]),d=(0,a.useCallback)(e=>{o(()=>r.push(`/create?repo=${encodeURIComponent(e)}`))},[r,o]),[h,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{if(!h){if(l.reactFileManager)return void x(!0);m(!0);try{let e=await (0,ey.pickFolder)();e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}}))}catch{x(!0)}finally{m(!1)}}},[h,l.reactFileManager]);(0,a.useEffect)(()=>{let e=()=>{b()};return window.addEventListener("shep:pick-folder",e),()=>window.removeEventListener("shep:pick-folder",e)},[b]),(0,a.useEffect)(()=>{let e=()=>f(!0);return window.addEventListener("shep:open-github-import",e),()=>window.removeEventListener("shep:open-github-import",e)},[]);let y=(0,a.useCallback)(e=>{e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}})),x(!1)},[]),v=(0,a.useCallback)(e=>{e.path&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e.path}}))},[]);return(0,t.jsxs)(n.SidebarProvider,{defaultOpen:i??!1,children:[(0,t.jsx)(ea,{features:c,featureFlags:l,onFeatureClick:u,onAddFeature:d}),(0,t.jsx)(n.SidebarInset,{children:(0,t.jsxs)("div",{className:"relative h-full",children:[(0,t.jsx)("main",{className:"h-full",children:e}),(0,t.jsx)(ex,{}),l.githubImport?(0,t.jsx)(ez,{open:p,onOpenChange:f,onImportComplete:v}):null]})}),(0,t.jsx)(es.ReactFileManagerDialog,{open:g,onOpenChange:e=>{e||x(!1)},onSelect:y})]})}function eX({children:e}){return(0,t.jsx)(eh.TurnStatusesProvider,{children:e})}function eW({children:e,sidebarOpen:a}){let{i18n:s}=(0,i.useTranslation)(),n=s.dir();return(0,t.jsx)(r.Direction.Provider,{dir:n,children:(0,t.jsx)(eF.AgentEventsProvider,{children:(0,t.jsx)(eK.DrawerCloseGuardProvider,{children:(0,t.jsx)(ep.SidebarFeaturesProvider,{children:(0,t.jsx)(eX,{children:(0,t.jsx)(eU,{sidebarOpen:a,children:e})})})})})})}e.s(["AppShell",()=>eW],87292)},25251,e=>{"use strict";var t=e.i(79606),a=e.i(60112);let s=({...e})=>(0,t.jsx)(a.Toaster,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});e.s(["Toaster",()=>s])},4858,e=>{"use strict";var t=e.i(79606),a=e.i(3),s=e.i(28574),i=e.i(6786),r=e.i(77501),n=class extends r.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,i){let r=t.queryKey,n=t.queryHash??(0,a.hashQueryKeyByOptions)(r,t),o=this.get(n);return o||(o=new s.Query({client:e,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.matchQuery)(e,t)):t}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(87975),l=r,c=class extends l.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#a=new Map,this.#s=0}#t;#a;#s;build(e,t,a){let s=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#t.add(e);let t=u(e);if("string"==typeof t){let a=this.#a.get(t);a?a.push(e):this.#a.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=u(e);if("string"==typeof t){let a=this.#a.get(t);if(a)if(a.length>1){let t=a.indexOf(e);-1!==t&&a.splice(t,1)}else a[0]===e&&this.#a.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let a=this.#a.get(t),s=a?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let a=this.#a.get(t)?.find(t=>t!==e&&t.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){i.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#a.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.matchMutation)(e,t))}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.noop))))}};function u(e){return e.options.scope?.id}var d=e.i(4520),h=e.i(13598);function m(e){return{onFetch:(t,s)=>{let i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,u=async()=>{let s=!1,u=(0,a.ensureQueryFn)(t.options,t.fetchOptions),d=async(e,i,r)=>{let n;if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let o=(n={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta},(0,a.addConsumeAwareSignal)(n,()=>t.signal,()=>s=!0),n),l=await u(o),{maxPages:c}=t.options,d=r?a.addToStart:a.addToEnd;return{pages:d(e.pages,l,c),pageParams:d(e.pageParams,i,c)}};if(r&&n.length){let e="backward"===r,t={pages:n,pageParams:o},a=(e?function(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}:p)(i,t);l=await d(t,a,e)}else{let t=e??n.length;do{let e=0===c?o[0]??i.initialPageParam:p(i,l);if(c>0&&null==e)break;l=await d(l,e),c++}while(c<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=u}}}function p(e,{pages:t,pageParams:a}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}var f=class{#i;#r;#n;#o;#l;#c;#u;#d;constructor(e={}){this.#i=e.queryCache||new n,this.#r=e.mutationCache||new c,this.#n=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=d.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onFocus())}),this.#d=h.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#i.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#i.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#i.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),r=this.#i.get(i.queryHash),n=r?.state.data,o=(0,a.functionalUpdate)(t,n);if(void 0!==o)return this.#i.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(e,t,a){return i.notifyManager.batch(()=>this.#i.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,a)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state}removeQueries(e){let t=this.#i;i.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let a=this.#i;return i.notifyManager.batch(()=>(a.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(i.notifyManager.batch(()=>this.#i.findAll(e).map(e=>e.cancel(s)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return i.notifyManager.batch(()=>(this.#i.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.notifyManager.batch(()=>this.#i.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#i.build(this,t);return s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#i}getMutationCache(){return this.#r}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#l.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#i.clear(),this.#r.clear()}},g=e.i(34682),x=e.i(52155);function b({children:e}){let[a]=(0,x.useState)(()=>new f({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1}}}));return(0,t.jsx)(g.QueryClientProvider,{client:a,children:e})}e.s(["QueryProvider",()=>b],4858)},10644,e=>{"use strict";let t;var a=e.i(79606),s=e.i(52155);e.i(41001);var i=e.i(14827),r=e.i(99065),n=e.i(83100),o=e.i(37465),l=e.i(51193),c=e.i(16912),u=e.i(88687),d=e.i(55431),h=e.i(60280),m=e.i(40266),p=e.i(50784),f=e.i(28191),g=e.i(71363),x=e.i(53493),b=e.i(22307),y=e.i(44225),v=e.i(62305),w=e.i(51943),j=e.i(88158),k=e.i(39711),N=e.i(32456);let S=((t=r.default.createInstance()).use(n.initReactI18next).init({lng:"en",fallbackLng:"en",defaultNS:"common",ns:["common","web"],resources:{en:{common:o.default,web:l.default},uk:{common:c.default,web:u.default},ru:{common:d.default,web:h.default},pt:{common:m.default,web:p.default},es:{common:f.default,web:g.default},ar:{common:x.default,web:b.default},he:{common:y.default,web:v.default},fr:{common:w.default,web:j.default},de:{common:k.default,web:N.default}},interpolation:{escapeValue:!1},react:{useSuspense:!1}}),t),C={ar:{family:"Noto Sans Arabic",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap"},he:{family:"Noto Sans Hebrew",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;500;600;700&display=swap"}};function M(e){let t=C[e];if(document.documentElement.classList.remove("font-rtl-arabic","font-rtl-hebrew"),!t)return void document.documentElement.style.removeProperty("--font-rtl");document.documentElement.style.setProperty("--font-rtl",`"${t.family}"`),document.documentElement.classList.add("ar"===e?"font-rtl-arabic":"font-rtl-hebrew");let a=`rtl-font-${e}`;if(!document.getElementById(a)){let e=document.createElement("link");e.id=a,e.rel="stylesheet",e.href=t.cssUrl,document.head.appendChild(e)}}function T({initialLanguage:e,children:t}){return(0,s.useEffect)(()=>{S.language!==e&&S.changeLanguage(e),M(e)},[e]),(0,s.useEffect)(()=>{function e(e){M(e)}return S.on("languageChanged",e),()=>{S.off("languageChanged",e)}},[]),(0,a.jsx)(i.I18nextProvider,{i18n:S,children:t})}e.s(["I18nProvider",()=>T],10644)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87292,e=>{"use strict";var t=e.i(79606),a=e.i(52155),s=e.i(11434);e.i(41001);var i=e.i(64780),r=e.i(84840),n=e.i(57638),o=e.i(3645);let l=(0,o.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var u=e.i(42049);let c=(0,o.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),d=(0,o.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),h=(0,o.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),m=(0,o.default)("volume-off",[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]]);var p=e.i(53360);let f=(0,o.default)("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var g=e.i(81975),x=e.i(12103),b=e.i(39200);let y=(0,o.default)("table-properties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);var v=e.i(35340),w=e.i(56460),j=e.i(8361);function k({icon:e,label:a,href:s,active:i=!1}){let r=(0,j.useSoundAction)("navigate");return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"sidebar-nav-item",children:(0,t.jsx)(n.SidebarMenuButton,{asChild:!0,isActive:i,tooltip:a,children:(0,t.jsxs)(w.default,{href:s,onClick:()=>r.play(),children:[(0,t.jsx)(e,{}),(0,t.jsx)("span",{children:a})]})})})}var N=e.i(71379),N=N,S=e.i(35364),C=e.i(31777);function M({className:e}){let{toggleSidebar:a,open:s}=(0,n.useSidebar)(),i=(0,j.useSoundAction)("expand"),r=(0,j.useSoundAction)("collapse");return(0,t.jsx)("div",{className:(0,C.cn)("flex",e),children:(0,t.jsx)(S.Button,{"data-testid":"sidebar-collapse-toggle",variant:"ghost",size:"icon",className:"size-7 cursor-pointer group-data-[collapsible=icon]:size-8!",onClick:()=>{s?r.play():i.play(),a()},"aria-label":s?"Collapse sidebar":"Expand sidebar",children:(0,t.jsx)(N.default,{className:"size-4"})})})}e.i(92233);var T=e.i(10025),E=e.i(2828);function A({version:e,branch:s,commitHash:r,isDev:n=!1,packageName:o="@shepai/cli",description:l,instancePath:u}){let{t:c}=(0,i.useTranslation)("web"),d=r?.slice(0,7),{latest:h,updateAvailable:m}=function(e){let[t,s]=(0,a.useState)(null),[i,r]=(0,a.useState)(!0);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/npm-version");if(!t.ok)return;let a=await t.json();!e&&a.latest&&s(a.latest)}catch{}finally{e||r(!1)}}(),()=>{e=!0}},[]);let n=null!==t&&function(e,t){let a=e=>e.split("-")[0].split(".").map(Number),s=a(e),i=a(t);for(let e=0;e<3;e++){let t=s[e]??0,a=i[e]??0;if(t>a)return 1;if(t<a)return -1}return 0}(t,e)>0;return{latest:t,updateAvailable:n,loading:i}}(e),{status:p,startUpgrade:f}=function(){let[e,t]=(0,a.useState)("idle"),[s,i]=(0,a.useState)(""),[r,n]=(0,a.useState)(),o=(0,a.useRef)(null),l=(0,a.useRef)(!1),u=(0,a.useCallback)(()=>{if("upgrading"===e||"restarting"===e)return;t("upgrading"),i(""),n(void 0),l.current=!1;let a=new AbortController;return o.current=a,fetch("/api/cli-upgrade",{method:"POST",signal:a.signal}).then(async e=>{if(!e.ok||!e.body){t("error"),n(`Server returned ${e.status}`);return}let a=e.body.getReader(),s=new TextDecoder,r="";for(;;){let{done:e,value:o}=await a.read();if(e)break;let u=(r+=s.decode(o,{stream:!0})).split("\n");for(let e of(r=u.pop()??"",u)){if(e.startsWith("event: restarting")){l.current=!0,t("restarting"),function(e,t){let a=Date.now()+3e4,s=()=>{Date.now()>a||fetch("/api/version",{method:"GET",cache:"no-store"}).then(e=>{e.ok?window.location.reload():setTimeout(s,500)}).catch(()=>{setTimeout(s,500)})};setTimeout(s,500)}(0,0);continue}if(!e.startsWith("event: done")&&e.startsWith("data: ")){let a=e.slice(6);try{let e=JSON.parse(a);"upgraded"===e.status?t("upgraded"):"up-to-date"===e.status?t("up-to-date"):"error"===e.status&&(t("error"),n(e.errorMessage))}catch{i(e=>e+a)}}}}}).catch(e=>{l.current||e instanceof DOMException&&"AbortError"===e.name||(t("error"),n(e instanceof Error?e.message:"Upgrade failed"))}),()=>{a.abort()}},[e]);return{status:e,output:s,errorMessage:r,startUpgrade:u}}(),g=n?`${e}-dev`:`v${e}`,x="upgrading"===p,b="restarting"===p,y="upgraded"===p;return(0,t.jsx)(E.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("span",{className:"text-muted-foreground/80 hover:text-muted-foreground relative cursor-default text-[11px] leading-tight transition-colors","data-testid":"version-label",children:[g,!m||y||b?null:(0,t.jsx)("span",{className:"absolute -top-0.5 -right-1.5 size-1.5 rounded-full bg-emerald-400","data-testid":"update-dot"})]})}),(0,t.jsxs)(E.TooltipContent,{side:"right",className:"max-w-[280px] space-y-1 p-3 text-start",children:[(0,t.jsx)("div",{className:"mb-1.5 text-xs font-semibold",children:o}),l?(0,t.jsx)("div",{className:"text-[10px] leading-snug opacity-70",children:l}):null,(0,t.jsxs)("div",{className:"border-t border-white/10 pt-1.5",children:[(0,t.jsx)(P,{label:c("versionBadge.version"),value:g}),n&&s?(0,t.jsx)(P,{label:c("versionBadge.branch"),value:s}):null,n&&d?(0,t.jsx)(P,{label:c("versionBadge.commit"),value:d,mono:!0}):null,n&&u?(0,t.jsx)(P,{label:c("versionBadge.path"),value:u,mono:!0}):null,h?(0,t.jsx)(P,{label:"Latest",value:`v${h}`,highlight:m}):null]}),b?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-restarting",children:"Restarting..."})}):y?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-emerald-400","data-testid":"upgrade-success",children:"Upgraded successfully"})}):"error"===p?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("span",{className:"text-[10px] font-medium text-red-400","data-testid":"upgrade-error",children:"Upgrade failed"})}):m?(0,t.jsx)("div",{className:"border-t border-white/10 pt-1.5",children:(0,t.jsx)("button",{type:"button",onClick:f,disabled:x||b,className:"inline-flex items-center gap-1 text-[10px] font-medium text-emerald-400 transition-colors hover:text-emerald-300 disabled:opacity-50","data-testid":"upgrade-button",children:x?"Upgrading...":b?"Restarting...":`Upgrade to v${h}`})}):null]})]})})}function P({label:e,value:a,highlight:s,mono:i}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[(0,t.jsx)("span",{className:"opacity-60",children:e}),(0,t.jsx)("span",{className:[s?"font-medium text-emerald-400":"",i||!s?"font-mono":""].filter(Boolean).join(" "),children:a})]})}function D({startedAt:e}){let[s,i]=(0,a.useState)(()=>Date.now()-e);return(0,a.useEffect)(()=>{let t=setInterval(()=>{(0,a.startTransition)(()=>i(Date.now()-e))},1e3);return()=>clearInterval(t)},[e]),(0,t.jsx)("span",{"data-testid":"elapsed-time",className:"tabular-nums",children:function(e){let t=Math.floor(e/1e3);if(t>=3600){let e=Math.floor(t/3600);return`${e}h`}let a=Math.floor(t/60);return`${String(a).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`}(s)})}var O=e.i(51251),q=e.i(83428),L=e.i(34119),I=e.i(94819),Q=e.i(54277),R=e.i(55016);let z={"action-needed":{icon:O.CircleAlert,iconClass:"text-amber-500",bgClass:"bg-amber-500/10",labelKey:"sidebar.statusActionNeeded"},"in-progress":{icon:q.Loader2,iconClass:"text-blue-500 animate-spin",bgClass:"bg-blue-500/10",labelKey:"sidebar.statusInProgress"},pending:{icon:R.Clock,iconClass:"text-slate-400",bgClass:"bg-slate-400/10",labelKey:"sidebar.statusPending"},blocked:{icon:I.Ban,iconClass:"text-gray-400",bgClass:"bg-gray-400/10",labelKey:"sidebar.statusBlocked"},error:{icon:Q.CircleX,iconClass:"text-red-500",bgClass:"bg-red-500/10",labelKey:"sidebar.statusError"},done:{icon:L.CircleCheck,iconClass:"text-emerald-500",bgClass:"bg-emerald-500/10",labelKey:"sidebar.statusDone"}},F=["action-needed","error","blocked","in-progress","pending","done"];var K=e.i(86782),H=e.i(29847);function B({name:e,status:a,startedAt:s,duration:i,agentType:r,modelId:o,onClick:l}){let{icon:u,iconClass:c}=z[a],d=r?(0,K.getAgentTypeIcon)(r):null;return(0,t.jsx)(n.SidebarMenuItem,{"data-testid":"feature-list-item",children:(0,t.jsxs)(n.SidebarMenuButton,{size:"sm",onClick:l,tooltip:e,className:"cursor-pointer",children:[(0,t.jsx)(u,{className:c}),(0,t.jsx)("span",{className:"flex-1 truncate font-medium",children:e}),"in-progress"===a&&null!=s?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:(0,t.jsx)(D,{startedAt:s})}):null,"done"===a&&i?(0,t.jsx)("span",{"data-testid":"feature-list-item-meta",className:"text-muted-foreground ml-auto text-xs tabular-nums",children:i}):null,d?(0,t.jsx)(E.TooltipProvider,{children:(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{className:"ml-auto shrink-0",children:(0,t.jsx)(d,{className:"h-3.5 w-3.5"})})}),(0,t.jsxs)(E.TooltipContent,{side:"right",children:[(0,t.jsx)("span",{className:"font-medium",children:K.agentTypeLabels[r]??r}),o?(0,t.jsxs)("span",{className:"ms-1 opacity-70",children:["· ",(0,H.getModelMeta)(o).displayName||o]}):null]})]})}):null]})})}var _=e.i(73709);let G="shep-animations-enabled",$="shep:animations-toggle",U="no-animations",X="shep-theme";function W({label:e,count:a,children:s}){return(0,t.jsxs)(n.SidebarGroup,{"data-testid":"feature-status-group",className:"px-2 py-1",children:[(0,t.jsxs)(n.SidebarGroupLabel,{className:"text-muted-foreground h-6 px-2 text-[0.65rem] font-semibold tracking-wider uppercase",children:[e,(0,t.jsx)("span",{"aria-label":`${a} items`,className:"bg-sidebar-accent text-sidebar-accent-foreground ms-1.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:a})]}),(0,t.jsx)(n.SidebarGroupContent,{children:(0,t.jsx)(n.SidebarMenu,{className:"gap-0.5",children:s})})]})}var Y=e.i(99105),V=e.i(81542),Z=e.i(3214);function J({repoName:e,featureCount:s,children:i,defaultOpen:r=!0,onAddFeature:n}){let[o,l]=(0,a.useState)(r);return(0,t.jsxs)("div",{"data-testid":"repo-group",className:"group/repo mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(!o),className:(0,C.cn)("text-sidebar-foreground hover:bg-sidebar-accent flex min-w-0 flex-1 items-center gap-1.5 rounded-md px-2 py-1.5 text-left text-xs font-semibold","transition-colors duration-100"),"aria-expanded":o,children:[(0,t.jsx)(Y.ChevronDown,{className:(0,C.cn)("text-muted-foreground h-3.5 w-3.5 shrink-0 transition-transform duration-200",!o&&"-rotate-90")}),(0,t.jsx)(V.GitFork,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{"aria-label":`${s} features`,className:"bg-sidebar-accent text-sidebar-accent-foreground ml-auto inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 text-[0.6rem] font-medium tabular-nums",role:"img",children:s})]}),n?(0,t.jsx)("button",{type:"button","data-testid":"repo-add-feature",onClick:e=>{e.stopPropagation(),n()},className:(0,C.cn)("text-muted-foreground hover:text-sidebar-foreground hover:bg-sidebar-accent mr-2 shrink-0 rounded-md p-1 opacity-0 transition-all duration-100 group-hover/repo:opacity-100","focus-visible:ring-ring focus-visible:opacity-100 focus-visible:ring-1 focus-visible:outline-none"),"aria-label":`Add feature to ${e}`,children:(0,t.jsx)(Z.Plus,{className:"h-3.5 w-3.5"})}):null]}),o?(0,t.jsx)("div",{className:"pl-2",children:i}):null]})}function ee({label:e,className:a}){return(0,t.jsx)(n.SidebarGroup,{"data-testid":"sidebar-section-header",className:(0,C.cn)("px-2 py-1",a),children:(0,t.jsx)("div",{className:"text-sidebar-foreground flex h-7 w-full shrink-0 items-center px-2 text-sm font-medium",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})})})}let et={version:"unknown",packageName:"@shepai/cli",description:"Autonomous AI Native SDLC Platform",branch:"",commitHash:"",instancePath:"",isDev:!1};function ea({features:e,featureFlags:r,onFeatureClick:o,onAddFeature:w}){let{t:N,i18n:S}=(0,i.useTranslation)("web"),C=(0,s.usePathname)(),{state:P}=(0,n.useSidebar)(),D="collapsed"===P,{mounted:O,visible:q}=function(e,t){let[s,i]=(0,a.useState)(!e),[r,n]=(0,a.useState)(!e);return(0,a.useEffect)(()=>{if(!e){i(!0);let e=requestAnimationFrame(()=>n(!0));return()=>cancelAnimationFrame(e)}n(!1);let t=window.setTimeout(()=>i(!1),200);return()=>window.clearTimeout(t)},[e,200]),{mounted:s,visible:r}}(D,0),L=function(){let[e,t]=(0,a.useState)(et);return(0,a.useEffect)(()=>{let e=!1;return async function(){try{let a=await fetch("/api/version");if(!a.ok)return;let s=await a.json();e||t(s)}catch{}}(),()=>{e=!0}},[]),e}(),{enabled:I,toggle:Q}=(0,_.useSoundEnabled)(),{enabled:R,toggle:K}=function(){let[e,t]=(0,a.useState)(!0);(0,a.useEffect)(()=>{"false"===localStorage.getItem(G)&&(t(!1),document.body.classList.add(U));let e=e=>{let a=e.detail;t(a),document.body.classList.toggle(U,!a)};return window.addEventListener($,e),()=>window.removeEventListener($,e)},[]);let s=(0,a.useCallback)(()=>{let a=!e;localStorage.setItem(G,String(a)),t(a),document.body.classList.toggle(U,!a),window.dispatchEvent(new CustomEvent($,{detail:a}))},[e]);return{enabled:e,toggle:s}}(),{resolvedTheme:H,theme:Y,setTheme:V}=function(){let[e,t]=(0,a.useState)("system"),[s,i]=(0,a.useState)("light"),r=(0,a.useCallback)(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),n=(0,a.useCallback)(e=>"system"===e?r():e,[r]),o=(0,a.useCallback)(e=>{if("u"<typeof document)return;let t=document.documentElement;t.classList.remove("light","dark"),t.classList.add(e),i(e)},[]),l=(0,a.useCallback)(e=>{t(e),"u">typeof localStorage&&localStorage.setItem(X,e),o(n(e))},[n,o]);return(0,a.useEffect)(()=>{let e=localStorage.getItem(X)??"system";t(e),o(n(e))},[n,o]),(0,a.useEffect)(()=>{let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{"system"===e&&o(n("system"))};return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,n,o]),{theme:e,resolvedTheme:s,setTheme:l}}(),Z=(0,j.useSoundAction)("toggle-on"),ea=(0,j.useSoundAction)("toggle-off"),es=(0,j.useSoundAction)("navigate"),ei=(0,a.useMemo)(()=>{let t=new Map;for(let a of e){let e=a.repositoryPath,s=t.get(e);s||(s={repoName:a.repositoryName,features:[]},t.set(e,s)),s.features.push(a)}return Array.from(t.entries()).map(([e,{repoName:t,features:a}])=>({repoPath:e,repoName:t,featureCount:a.length,statusGroups:F.map(e=>({statusKey:e,label:N(z[e].labelKey),items:a.filter(t=>t.status===e)})).filter(e=>e.items.length>0)}))},[e,N]);return(0,t.jsxs)(n.Sidebar,{"data-testid":"app-sidebar","data-no-drawer-close":!0,collapsible:"icon",side:"rtl"===S.dir()?"right":"left",children:[(0,t.jsx)(n.SidebarHeader,{children:(0,t.jsxs)(n.SidebarMenu,{children:[(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsxs)("div",{className:"flex h-8 items-center group-data-[collapsible=icon]:justify-center",children:[O?(0,t.jsxs)("div",{className:["flex min-w-0 flex-1 items-center gap-2 overflow-hidden px-2 transition-opacity duration-200 ease-out",q?"opacity-100":"opacity-0"].join(" "),"aria-hidden":!q,children:[(0,t.jsx)(T.ShepLogo,{className:"shrink-0",size:20,variant:L.isDev?"dev":"default"}),(0,t.jsx)("span",{className:"truncate text-sm font-semibold tracking-tight",children:"Shep"}),(0,t.jsx)(A,{version:L.version,branch:L.branch||void 0,commitHash:L.commitHash||void 0,isDev:L.isDev,packageName:L.packageName,description:L.description,instancePath:L.instancePath||void 0})]}):null,(0,t.jsx)(M,{className:"shrink-0 transition-all duration-200"})]})}),(0,t.jsx)(k,{icon:l,label:N("navigation.controlCenter"),href:"/",active:"/"===C}),r.inventory?(0,t.jsx)(k,{icon:y,label:N("navigation.inventory"),href:"/features",active:"/features"===C}):null,(0,t.jsx)(k,{icon:u.LayoutGrid,label:N("navigation.applications"),href:"/applications",active:"/applications"===C}),(0,t.jsx)(k,{icon:g.Wrench,label:N("navigation.tools"),href:"/tools",active:"/tools"===C}),r.skills?(0,t.jsx)(k,{icon:x.Puzzle,label:N("navigation.skills"),href:"/skills",active:"/skills"===C}):null,(0,t.jsx)(k,{icon:b.Settings,label:N("navigation.settings"),href:"/settings",active:"/settings"===C})]})}),(0,t.jsx)(n.SidebarContent,{children:O?(0,t.jsxs)("div",{className:["flex min-h-0 flex-1 flex-col overflow-hidden transition-opacity duration-200 ease-out [&_[data-sidebar=group-label]]:!mt-0 [&_[data-sidebar=group-label]]:!opacity-100 [&_[data-sidebar=group-label]]:!transition-none",q?"opacity-100":"opacity-0"].join(" "),children:[(0,t.jsx)(ee,{label:N("sidebar.features")}),(0,t.jsx)(v.ScrollArea,{className:"min-h-0 flex-1",children:ei.map(({repoPath:e,repoName:a,featureCount:s,statusGroups:i})=>(0,t.jsx)(J,{repoName:a,featureCount:s,onAddFeature:w?()=>w(e):void 0,children:i.map(({statusKey:e,label:a,items:s})=>(0,t.jsx)(W,{label:a,count:s.length,children:s.map(e=>(0,t.jsx)(B,{name:e.name,status:e.status,startedAt:e.startedAt,duration:e.duration,agentType:e.agentType,modelId:e.modelId,onClick:o?()=>o(e.featureId):void 0},e.featureId))},e))},e))})]}):null}),(0,t.jsx)(n.SidebarFooter,{className:"border-t p-2",children:(0,t.jsx)(n.SidebarMenu,{children:(0,t.jsx)(n.SidebarMenuItem,{children:(0,t.jsx)("div",{className:"flex items-center gap-1",children:(0,t.jsxs)(E.TooltipProvider,{children:[(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:e=>{let t="system"===Y?"dark"===H?"light":"dark":"dark"===Y?"light":"dark";"dark"!==("system"===Y?H:Y)?Z.play():ea.play();let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"startViewTransition"in document&&!a?(document.documentElement.style.setProperty("--x",`${e.clientX}px`),document.documentElement.style.setProperty("--y",`${e.clientY}px`),document.startViewTransition(()=>{V(t)})):V(t)},"aria-label":"dark"===H?N("sidebar.switchToLight"):N("sidebar.switchToDark"),children:[(0,t.jsx)(d,{className:"h-4 w-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,t.jsx)(c,{className:"absolute h-4 w-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"})]})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:"dark"===H?N("sidebar.switchToLight"):N("sidebar.switchToDark")})]}),!D&&(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{es.play(),Q()},"aria-label":I?N("sidebar.muteSounds"):N("sidebar.unmuteSounds"),children:I?(0,t.jsx)(h,{className:"h-4 w-4"}):(0,t.jsx)(m,{className:"h-4 w-4"})})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:I?N("sidebar.muteSounds"):N("sidebar.unmuteSounds")})]}),!D&&(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(n.SidebarMenuButton,{className:"w-auto flex-none",onClick:()=>{es.play(),K()},"aria-label":R?"Disable animations":"Enable animations",children:R?(0,t.jsx)(p.Zap,{className:"h-4 w-4"}):(0,t.jsx)(f,{className:"h-4 w-4"})})}),(0,t.jsx)(E.TooltipContent,{side:"top",children:R?"Disable animations":"Enable animations"})]})]})})})})}),(0,t.jsx)(n.SidebarRail,{})]})}e.i(13322);var es=e.i(61201),ei=e.i(48109),er=e.i(60253),en=e.i(26370);let eo=(0,o.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);var el=e.i(87538);let eu=(0,o.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);var ec=e.i(28112),ed=e.i(57779),eh=e.i(80554),em=e.i(38373),ep=e.i(5147);let ef="shep-global-chat";function eg(){try{let e=localStorage.getItem(ef);if(!e)return{pos:null,size:null};let t=JSON.parse(e),a=t.size??null;return a&&(a.w<360||a.h<300)&&(a={w:Math.max(360,a.w),h:Math.max(300,a.h)}),{pos:t.pos??null,size:a}}catch{return{pos:null,size:null}}}function ex(){let{t:e}=(0,i.useTranslation)("web"),[s,r]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1),[u,c]=(0,a.useState)(!1),d=(0,eh.useTurnStatus)("global"),{swapPosition:h}=(0,em.useFabLayout)(),{state:m}=(0,n.useSidebar)(),{hasRepositories:p}=(0,ep.useSidebarFeaturesContext)(),[f,g]=(0,a.useState)(()=>eg().pos),[x,b]=(0,a.useState)(()=>eg().size),y=(0,a.useCallback)(e=>{g(t=>"function"==typeof e?e(t):e)},[]),v=(0,a.useCallback)(e=>{b(t=>"function"==typeof e?e(t):e)},[]),w=(0,a.useRef)(null),j=(0,a.useRef)(null),k=(0,a.useRef)(null),N=(0,a.useCallback)(()=>{r(e=>(e||l(!0),!e))},[]),M=(0,a.useRef)({pos:null,size:null}),T=(0,a.useCallback)(()=>{s||(r(!0),l(!0)),c(e=>(e?(y(M.current.pos),v(M.current.size)):M.current={pos:f,size:x},!e))},[s,f,x,y,v]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.shiftKey&&("k"===e.key||"K"===e.key)&&(e.preventDefault(),u&&c(!1),N(),requestAnimationFrame(()=>{setTimeout(()=>{let e=w.current?.querySelector("textarea");e?.focus()},100)})),(e.metaKey||e.ctrlKey)&&e.shiftKey&&("m"===e.key||"M"===e.key)&&(e.preventDefault(),T())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[N,T,u]),(0,a.useEffect)(()=>{let e=setTimeout(()=>(function(e,t){try{localStorage.setItem(ef,JSON.stringify({pos:e,size:t}))}catch{}})(f,x),300);return()=>clearTimeout(e)},[f,x]);let E=(0,a.useCallback)((e,t,a)=>({x:Math.max(-a+100,Math.min(e,window.innerWidth-100)),y:Math.max(0,Math.min(t,window.innerHeight-48))}),[]),A=(0,a.useCallback)(e=>{e.preventDefault();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=f?.x??a.left,i=f?.y??a.top;j.current={startX:e.clientX,startY:e.clientY,startPosX:s,startPosY:i};let r=x?.w??a.width,n=e=>{if(!j.current)return;let t=e.clientX-j.current.startX,a=e.clientY-j.current.startY;y(E(j.current.startPosX+t,j.current.startPosY+a,r))},o=()=>{j.current=null,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",o)},[f,x,y,E]),P=(0,a.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=x?.w??a.width,i=x?.h??a.height,r=e.clientX,n=e.clientY,o=f?.y??a.top;k.current={startX:r,startY:n,startW:s,startH:i},f||y({x:a.left,y:a.top});let l=e=>{if(!k.current)return;let t=e.clientX-r,l=e.clientY-n,u=Math.max(360,s+t),c=Math.max(300,i-l),d=Math.max(0,o+l);v({w:u,h:c}),y(e=>E(e?.x??a.left,d,u))},u=()=>{k.current=null,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",u)},[x,f,y,v,E]),D=(0,a.useCallback)(()=>{r(!1),c(!1)},[]),O=u?{}:f?{position:"fixed",left:f.x,top:f.y,width:x?.w??520,height:x?.h??"70vh"}:{width:x?.w??520,height:x?.h??"70vh"};return(0,t.jsxs)(t.Fragment,{children:[o?(0,t.jsxs)("div",{ref:w,className:(0,C.cn)(u?"bg-background fixed inset-0 z-[60] flex flex-col overflow-hidden dark:bg-neutral-900":(0,C.cn)(!f&&(h?"fixed start-8 bottom-24":"fixed end-8 bottom-24"),"z-[60] flex flex-col overflow-hidden rounded-lg","border-border/60 border dark:border-white/10","bg-background dark:bg-neutral-900","shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]"),"transition-opacity duration-300 ease-out",s?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),style:O,children:[u?null:(0,t.jsx)("div",{className:"h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent"}),u?null:(0,t.jsx)("div",{onMouseDown:P,className:"absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize"}),(0,t.jsxs)("div",{onMouseDown:u?void 0:A,className:(0,C.cn)("relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]",!u&&"cursor-grab active:cursor-grabbing"),children:[(0,t.jsx)("div",{className:"from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent"}),u?null:(0,t.jsx)(eo,{className:"text-foreground/15 relative h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("div",{className:"relative flex h-5 w-5 items-center justify-center",children:(0,t.jsx)(en.Bot,{className:"text-foreground/50 h-4 w-4"})}),(0,t.jsxs)("div",{className:"relative flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-foreground/90 text-base font-bold tracking-tight",children:"Shep"}),(0,t.jsx)("span",{className:"text-foreground/30 text-xs font-medium tracking-widest uppercase",children:"global"})]}),(0,t.jsxs)("div",{className:"relative ms-auto flex items-center gap-0.5",children:[(0,t.jsx)("button",{type:"button",onClick:T,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:u?"Restore (⌘⇧M)":"Maximize (⌘⇧M)",children:u?(0,t.jsx)(eu,{className:"h-3.5 w-3.5"}):(0,t.jsx)(el.Maximize2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:D,className:"text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors",title:"Close (⌘⇧K)",children:(0,t.jsx)(er.X,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(ec.ChatTab,{featureId:"global"})}),u?null:(0,t.jsx)("div",{onMouseDown:e=>{e.preventDefault(),e.stopPropagation();let t=w.current;if(!t)return;let a=t.getBoundingClientRect(),s=e.clientX,i=e.clientY,r=x?.w??a.width,n=x?.h??a.height;f||y({x:a.left,y:a.top});let o=e=>{let t=window.innerHeight-(f?.y??a.top);v({w:Math.max(360,r+(e.clientX-s)),h:Math.max(300,Math.min(n+(e.clientY-i),t))})},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},className:"absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize"})]}):null,p?(0,t.jsxs)(eb,{swapPosition:h,sidebarState:m,isMaximized:u,children:[(0,t.jsxs)(S.Button,{size:"icon",onClick:N,className:(0,C.cn)("relative h-14 w-14 rounded-full shadow-lg","transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95",s?"bg-violet-600 text-white hover:bg-violet-500":"bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400",!s&&"processing"===d&&"chat-fab-spinning",!s&&"unread"===d&&"chat-fab-glow-unread",!s&&"awaiting_input"===d&&"chat-fab-glow-awaiting"),children:[(0,t.jsx)(ei.MessageSquare,{className:(0,C.cn)("absolute h-7 w-7 stroke-[2.5] transition-all duration-200",s?"scale-0 rotate-90 opacity-0":"scale-100 rotate-0 opacity-100")}),(0,t.jsx)(er.X,{className:(0,C.cn)("absolute h-6 w-6 stroke-[2.5] transition-all duration-200",s?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-90 opacity-0")}),!s&&(0,t.jsx)(ed.ChatDotIndicator,{status:d,className:"end-0 top-0"})]}),(0,t.jsx)("div",{className:"pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100",children:(0,t.jsxs)("div",{className:"bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg",children:[(0,t.jsx)("p",{className:"text-background text-xs font-medium whitespace-nowrap",children:e("chat.shepChat")}),(0,t.jsxs)("p",{className:"text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]",children:[(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⌘"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"⇧"}),(0,t.jsx)("kbd",{className:"bg-background/15 rounded px-1 py-px font-mono",children:"K"})]})]})})]}):null]})}function eb({swapPosition:e,sidebarState:a,isMaximized:s,children:r}){let{i18n:n}=(0,i.useTranslation)("web"),o="rtl"===n.dir();if(!e)return(0,t.jsx)("div",{className:(0,C.cn)("group/fab fixed end-8 bottom-6 z-30",s&&"hidden"),children:r});let l="expanded"===a?"calc(var(--sidebar-width) + 32px)":"calc(var(--sidebar-width-icon) + 32px)";return(0,t.jsx)("div",{className:(0,C.cn)("group/fab fixed bottom-6 z-30",s&&"hidden"),style:o?{right:l,transition:"right 200ms ease-in-out"}:{left:l,transition:"left 200ms ease-in-out"},children:r})}var ey=e.i(78521),ev=e.i(2287),ew=e.i(68304),ej=e.i(98127),ek=e.i(41957);let eN=/^(?: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 eS({onSubmit:e,loading:s=!1}){let[i,r]=(0,a.useState)(""),[n,o]=(0,a.useState)("");function l(){let t=i.trim();t?eN.test(t.trim())?(o(""),e(t)):o("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):o("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(ek.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(ej.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{r(e.target.value),n&&o("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),l())},disabled:s,"aria-invalid":!!n,"aria-describedby":n?"github-url-error":void 0}),(0,t.jsx)(S.Button,{onClick:l,disabled:s||!i.trim(),size:"sm",children:s?(0,t.jsx)(q.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),n?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:n}):null]})}let eC=(0,o.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"}]]);var eM=e.i(32494),eT=e.i(66459),eE=e.i(79687),eA=e.i(81846),eP=e.i(61238),eD=e.i(47373),eO=e.i(8893);let eq=(0,eO.createServerReference)("4004cdb7a983c2b2e8118d003269c00b8ca8328770",eO.callServer,void 0,eO.findSourceMapURL,"listGitHubRepositories"),eL=(0,eO.createServerReference)("00d7abf076433b9b7ad65f140828f000e60b100ef4",eO.callServer,void 0,eO.findSourceMapURL,"listGitHubOrganizations"),eI="__personal__";function eQ({onSelect:e,loading:s=!1,fetchRepos:i=eq,fetchOrgs:r=eL}){let[n,o]=(0,a.useState)([]),[l,u]=(0,a.useState)([]),[c,d]=(0,a.useState)(!0),[h,m]=(0,a.useState)(""),[p,f]=(0,a.useState)(""),[g,x]=(0,a.useState)(eI),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await r();e.orgs&&u(e.orgs)}catch{}}()},[r]);let y=(0,a.useCallback)(async(e,t)=>{d(!0),m("");try{let a={};e&&(a.search=e),t&&t!==eI&&(a.owner=t);let s=await i(Object.keys(a).length>0?a:void 0);s.error?(m(s.error),o([])):o(s.repos??[])}catch{m("Failed to fetch repositories"),o([])}finally{d(!1)}},[i]);return((0,a.useEffect)(()=>{y(p||void 0,g)},[y,g]),h&&!c)?(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)(eE.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:h})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[l.length>0?(0,t.jsxs)(eD.Select,{value:g,onValueChange:function(e){x(e),f("")},disabled:s,children:[(0,t.jsx)(eD.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(eD.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(eD.SelectContent,{children:[(0,t.jsx)(eD.SelectItem,{value:eI,children:"My repositories"}),l.map(e=>(0,t.jsx)(eD.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(eT.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(ej.Input,{placeholder:"Search repositories...",value:p,onChange:e=>{var t;f(t=e.target.value),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{y(t||void 0,g)},300)},className:"ps-9",disabled:s,"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:c?(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)(eP.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(eP.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===n.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):n.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:s,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)(eA.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eC,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eM.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]}),s?(0,t.jsx)(q.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let eR=(0,eO.createServerReference)("406a8f4dd973018b040e39bcf5a54ab1d632e55520",eO.callServer,void 0,eO.findSourceMapURL,"importGitHubRepository");function ez({open:e,onOpenChange:s,onImportComplete:i}){let[r,n]=(0,a.useState)(!1),[o,l]=(0,a.useState)("");async function u(e){n(!0),l("");try{let t=await eR({url:e});t.error?l(t.error):t.repository&&(i(t.repository),s(!1))}catch{l("An unexpected error occurred")}finally{n(!1)}}return(0,t.jsx)(ev.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(ev.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(ev.DialogHeader,{children:[(0,t.jsx)(ev.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(ev.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(ew.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(ew.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(ew.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(ew.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(ew.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(eS,{onSubmit:u,loading:r})}),(0,t.jsx)(ew.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(eQ,{onSelect:u,loading:r})})]}),o?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:o}):null]})})}var eF=e.i(48034),eK=e.i(30153),eH=e.i(60112),eB=e.i(17406);let e_={[eB.NotificationSeverity.Success]:"success",[eB.NotificationSeverity.Error]:"error",[eB.NotificationSeverity.Warning]:"warning",[eB.NotificationSeverity.Info]:"info"},eG={[eB.NotificationSeverity.Success]:"notification-success",[eB.NotificationSeverity.Error]:"notification-error",[eB.NotificationSeverity.Warning]:"notification-warning",[eB.NotificationSeverity.Info]:"notification-info"};var e$=e.i(75921);function eU({children:e,sidebarOpen:i}){let r=(0,s.useRouter)(),{guardedNavigate:o}=(0,eK.useDrawerCloseGuard)(),l=(0,e$.useFeatureFlags)();!function(){let e=(0,s.useRouter)(),{events:t}=(0,eF.useAgentEventsContext)(),i=(0,j.useSoundAction)("notification-success"),r=(0,j.useSoundAction)("notification-error"),n=(0,j.useSoundAction)("notification-warning"),o=(0,j.useSoundAction)("notification-info"),l=(0,a.useMemo)(()=>({"notification-success":i,"notification-error":r,"notification-warning":n,"notification-info":o}),[i,r,n,o]),u=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(t.length<=u.current)return;let a=t.slice(u.current);for(let s of(u.current=t.length,a)){if(s.eventType!==eB.NotificationEventType.MergeReviewReady&&s.severity!==eB.NotificationSeverity.Error&&s.severity!==eB.NotificationSeverity.Warning&&s.severity!==eB.NotificationSeverity.Success)continue;!function(e,t){let a=e_[e.severity]??"info",s=e.eventType===eB.NotificationEventType.WaitingApproval||e.eventType===eB.NotificationEventType.MergeReviewReady;eH.toast[a](e.featureName,{description:e.message,...s&&t&&{action:{label:"Review",onClick:()=>{t(`/feature/${e.featureId}`)}}}})}(s,t=>e.push(t));let t=eG[s.severity];l[t]?.play()}},[t,l,e])}();let{features:u}=(0,ep.useSidebarFeaturesContext)(),c=(0,a.useCallback)(e=>{o(()=>r.push(`/feature/${e}`))},[r,o]),d=(0,a.useCallback)(e=>{o(()=>r.push(`/create?repo=${encodeURIComponent(e)}`))},[r,o]),[h,m]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),b=(0,a.useCallback)(async()=>{if(!h){if(l.reactFileManager)return void x(!0);m(!0);try{let e=await (0,ey.pickFolder)();e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}}))}catch{x(!0)}finally{m(!1)}}},[h,l.reactFileManager]);(0,a.useEffect)(()=>{let e=()=>{b()};return window.addEventListener("shep:pick-folder",e),()=>window.removeEventListener("shep:pick-folder",e)},[b]),(0,a.useEffect)(()=>{let e=()=>f(!0);return window.addEventListener("shep:open-github-import",e),()=>window.removeEventListener("shep:open-github-import",e)},[]);let y=(0,a.useCallback)(e=>{e&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e}})),x(!1)},[]),v=(0,a.useCallback)(e=>{e.path&&window.dispatchEvent(new CustomEvent("shep:add-repository",{detail:{path:e.path}}))},[]);return(0,t.jsxs)(n.SidebarProvider,{defaultOpen:i??!1,children:[(0,t.jsx)(ea,{features:u,featureFlags:l,onFeatureClick:c,onAddFeature:d}),(0,t.jsx)(n.SidebarInset,{children:(0,t.jsxs)("div",{className:"relative h-full",children:[(0,t.jsx)("main",{className:"h-full",children:e}),(0,t.jsx)(ex,{}),l.githubImport?(0,t.jsx)(ez,{open:p,onOpenChange:f,onImportComplete:v}):null]})}),(0,t.jsx)(es.ReactFileManagerDialog,{open:g,onOpenChange:e=>{e||x(!1)},onSelect:y})]})}function eX({children:e}){return(0,t.jsx)(eh.TurnStatusesProvider,{children:e})}function eW({children:e,sidebarOpen:a}){let{i18n:s}=(0,i.useTranslation)(),n=s.dir();return(0,t.jsx)(r.Direction.Provider,{dir:n,children:(0,t.jsx)(eF.AgentEventsProvider,{children:(0,t.jsx)(eK.DrawerCloseGuardProvider,{children:(0,t.jsx)(ep.SidebarFeaturesProvider,{children:(0,t.jsx)(eX,{children:(0,t.jsx)(eU,{sidebarOpen:a,children:e})})})})})})}e.s(["AppShell",()=>eW],87292)},25251,e=>{"use strict";var t=e.i(79606),a=e.i(60112);let s=({...e})=>(0,t.jsx)(a.Toaster,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});e.s(["Toaster",()=>s])},4858,e=>{"use strict";var t=e.i(79606),a=e.i(3),s=e.i(28574),i=e.i(6786),r=e.i(77501),n=class extends r.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,i){let r=t.queryKey,n=t.queryHash??(0,a.hashQueryKeyByOptions)(r,t),o=this.get(n);return o||(o=new s.Query({client:e,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a.matchQuery)(e,t)):t}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},o=e.i(87975),l=r,u=class extends l.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#a=new Map,this.#s=0}#t;#a;#s;build(e,t,a){let s=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#t.add(e);let t=c(e);if("string"==typeof t){let a=this.#a.get(t);a?a.push(e):this.#a.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=c(e);if("string"==typeof t){let a=this.#a.get(t);if(a)if(a.length>1){let t=a.indexOf(e);-1!==t&&a.splice(t,1)}else a[0]===e&&this.#a.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;{let a=this.#a.get(t),s=a?.find(e=>"pending"===e.state.status);return!s||s===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let a=this.#a.get(t)?.find(t=>t!==e&&t.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){i.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#a.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.matchMutation)(e,t))}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return i.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.noop))))}};function c(e){return e.options.scope?.id}var d=e.i(4520),h=e.i(13598);function m(e){return{onFetch:(t,s)=>{let i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],o=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,c=async()=>{let s=!1,c=(0,a.ensureQueryFn)(t.options,t.fetchOptions),d=async(e,i,r)=>{let n;if(s)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let o=(n={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta},(0,a.addConsumeAwareSignal)(n,()=>t.signal,()=>s=!0),n),l=await c(o),{maxPages:u}=t.options,d=r?a.addToStart:a.addToEnd;return{pages:d(e.pages,l,u),pageParams:d(e.pageParams,i,u)}};if(r&&n.length){let e="backward"===r,t={pages:n,pageParams:o},a=(e?function(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}:p)(i,t);l=await d(t,a,e)}else{let t=e??n.length;do{let e=0===u?o[0]??i.initialPageParam:p(i,l);if(u>0&&null==e)break;l=await d(l,e),u++}while(u<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=c}}}function p(e,{pages:t,pageParams:a}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}var f=class{#i;#r;#n;#o;#l;#u;#c;#d;constructor(e={}){this.#i=e.queryCache||new n,this.#r=e.mutationCache||new u,this.#n=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#u=0}mount(){this.#u++,1===this.#u&&(this.#c=d.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onFocus())}),this.#d=h.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onOnline())}))}unmount(){this.#u--,0===this.#u&&(this.#c?.(),this.#c=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#i.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),s=this.#i.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#i.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){let i=this.defaultQueryOptions({queryKey:e}),r=this.#i.get(i.queryHash),n=r?.state.data,o=(0,a.functionalUpdate)(t,n);if(void 0!==o)return this.#i.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(e,t,a){return i.notifyManager.batch(()=>this.#i.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,a)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state}removeQueries(e){let t=this.#i;i.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let a=this.#i;return i.notifyManager.batch(()=>(a.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let s={revert:!0,...t};return Promise.all(i.notifyManager.batch(()=>this.#i.findAll(e).map(e=>e.cancel(s)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return i.notifyManager.batch(()=>(this.#i.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let s={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(i.notifyManager.batch(()=>this.#i.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let s=this.#i.build(this,t);return s.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#i}getMutationCache(){return this.#r}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#l.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],s={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#i.clear(),this.#r.clear()}},g=e.i(34682),x=e.i(52155);function b({children:e}){let[a]=(0,x.useState)(()=>new f({defaultOptions:{queries:{staleTime:1e3,refetchOnWindowFocus:!1}}}));return(0,t.jsx)(g.QueryClientProvider,{client:a,children:e})}e.s(["QueryProvider",()=>b],4858)},10644,e=>{"use strict";let t;var a=e.i(79606),s=e.i(52155);e.i(41001);var i=e.i(14827),r=e.i(99065),n=e.i(83100),o=e.i(37465),l=e.i(51193),u=e.i(16912),c=e.i(88687),d=e.i(55431),h=e.i(60280),m=e.i(40266),p=e.i(50784),f=e.i(28191),g=e.i(71363),x=e.i(53493),b=e.i(22307),y=e.i(44225),v=e.i(62305),w=e.i(51943),j=e.i(88158),k=e.i(39711),N=e.i(32456);let S=((t=r.default.createInstance()).use(n.initReactI18next).init({lng:"en",fallbackLng:"en",defaultNS:"common",ns:["common","web"],resources:{en:{common:o.default,web:l.default},uk:{common:u.default,web:c.default},ru:{common:d.default,web:h.default},pt:{common:m.default,web:p.default},es:{common:f.default,web:g.default},ar:{common:x.default,web:b.default},he:{common:y.default,web:v.default},fr:{common:w.default,web:j.default},de:{common:k.default,web:N.default}},interpolation:{escapeValue:!1},react:{useSuspense:!1}}),t),C={ar:{family:"Noto Sans Arabic",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap"},he:{family:"Noto Sans Hebrew",cssUrl:"https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;500;600;700&display=swap"}};function M(e){let t=C[e];if(document.documentElement.classList.remove("font-rtl-arabic","font-rtl-hebrew"),!t)return void document.documentElement.style.removeProperty("--font-rtl");document.documentElement.style.setProperty("--font-rtl",`"${t.family}"`),document.documentElement.classList.add("ar"===e?"font-rtl-arabic":"font-rtl-hebrew");let a=`rtl-font-${e}`;if(!document.getElementById(a)){let e=document.createElement("link");e.id=a,e.rel="stylesheet",e.href=t.cssUrl,document.head.appendChild(e)}}function T({initialLanguage:e,children:t}){return(0,s.useEffect)(()=>{S.language!==e&&S.changeLanguage(e),M(e)},[e]),(0,s.useEffect)(()=>{function e(e){M(e)}return S.on("languageChanged",e),()=>{S.off("languageChanged",e)}},[]),(0,a.jsx)(i.I18nextProvider,{i18n:S,children:t})}e.s(["I18nProvider",()=>T],10644)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8986,48923,71750,74121,e=>{"use strict";var t=e.i(3645);let a=(0,t.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>a],8986);let r=(0,t.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",()=>r],48923);var s=e.i(8893);let l=(0,s.createServerReference)("40fd47b2584338a8b93650c528927d40c46ae67053",s.callServer,void 0,s.findSourceMapURL,"openIde");e.s(["openIde",()=>l],71750);let o=(0,s.createServerReference)("40d691e34b0308a359a3dc73e8658535afabf17ab0",s.callServer,void 0,s.findSourceMapURL,"openShell");e.s(["openShell",()=>o],74121)},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},6910,e=>{"use strict";let t=(0,e.i(3645).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>t],6910)},73504,81605,e=>{"use strict";var t=e.i(79606),a=e.i(52155),r=e.i(8893);let s=(0,r.createServerReference)("4066b9bfa7e61b8d2202e66c06861a38b2e51bef92",r.callServer,void 0,r.findSourceMapURL,"deployFeature"),l=(0,r.createServerReference)("40a4a1e771c92cd0d06aa2dc0a7ec6b31ae7123ca6",r.callServer,void 0,r.findSourceMapURL,"deployRepository"),o=(0,r.createServerReference)("402bfe71166e82bb52614ec73f319bc660b4b227be",r.callServer,void 0,r.findSourceMapURL,"deployApplication"),n=(0,r.createServerReference)("403189b40c857fc998c2f200b2d221dd58bc2ea48e",r.callServer,void 0,r.findSourceMapURL,"stopDeployment"),i=(0,r.createServerReference)("406ac6a35f8e8ba5721118fc9ea2b7c88c03327ffc",r.callServer,void 0,r.findSourceMapURL,"getDeploymentStatus");var d=e.i(18354);let c={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class u{entries=new Map;listeners=new Map;globalListeners=new Set;hydrate(e){let t=new Set;for(let a of e)t.add(a.targetId),this.update(a.targetId,{status:a.state,url:a.url,targetType:a.targetType,hydrated:!0});for(let[e,a]of this.entries)!t.has(e)&&a.hydrated&&null!==a.status?this.update(e,{status:null,url:null}):t.has(e)||a.hydrated||this.update(e,{hydrated:!0})}getEntry(e){return this.entries.get(e)??c}update(e,t){let a={...this.entries.get(e)??c,...t};this.entries.set(e,a),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let a=this.listeners.get(e);return a||(a=new Set,this.listeners.set(e,a)),a.add(t),()=>{a?.delete(t),a?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>u,"EMPTY_ENTRY",0,c],81605);let p=(0,d.createLogger)("[DeploymentStatusProvider]"),h=new Set(["Booting","Ready"]),f=(0,a.createContext)(null);function b({initialDeployments:e,children:r}){let d=(0,a.useRef)(null);d.current||(d.current=new u,d.current.hydrate(e));let c=d.current;(0,a.useEffect)(()=>{c.hydrate(e)},[e,c]);let b=(0,a.useRef)(new Map),y=(0,a.useCallback)(e=>{let t=b.current.get(e);t&&(clearInterval(t),b.current.delete(e))},[]),m=(0,a.useCallback)(e=>{if(b.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await i(e)}catch(t){p.warn(`poll failed for "${e}"`,t),c.setStatus(e,null),y(e);return}if(!t||"Stopped"===t.state){c.setStatus(e,null),y(e);return}c.setStatus(e,t)},3e3);b.current.set(e,t)},[c,y]);(0,a.useEffect)(()=>{let e=b.current,t=c.subscribeAll(()=>{for(let[t]of e){let e=c.getEntry(t);e.status&&h.has(e.status)||y(t)}});return()=>{for(let[,a]of(t(),e))clearInterval(a);e.clear()}},[c,y]);let g=(0,a.useCallback)(e=>{!e||c.getEntry(e).hydrated||(c.update(e,{hydrated:!0}),(async()=>{try{let t=await i(e);c.setStatus(e,t),t&&h.has(t.state)&&m(e)}catch(t){p.warn(`ensureHydrated failed for "${e}"`,t)}})())},[c,m]),x=(0,a.useCallback)(async e=>{c.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await s(e.targetId):"application"===e.targetType?await o(e.targetId):await l(e.repositoryPath);if(!t.success)return void c.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});c.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),m(e.targetId)}catch(a){let t=a instanceof Error?a.message:"An unexpected error occurred";c.update(e.targetId,{deployLoading:!1,deployError:t})}},[c,m]),v=(0,a.useCallback)(async e=>{if(e){c.update(e,{stopLoading:!0});try{(await n(e)).success?(y(e),c.update(e,{stopLoading:!1,status:null,url:null})):c.update(e,{stopLoading:!1})}catch(t){p.warn("stop error (non-critical)",t),c.update(e,{stopLoading:!1})}}},[c,y]),w=(0,a.useMemo)(()=>({store:c,deploy:x,stop:v,ensureHydrated:g}),[c,x,v,g]);return(0,t.jsx)(f.Provider,{value:w,children:r})}function y(){let e=(0,a.useContext)(f);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function m(){let e=(0,a.useContext)(f);return e||g}let g={store:new u,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>b,"useDeploymentStatusContext",()=>y,"useDeploymentStatusContextOptional",()=>m],73504)},8537,e=>{"use strict";var t=e.i(52155),a=e.i(73504);function r(){}function s(e){let{store:s,deploy:l,stop:o,ensureHydrated:n}=(0,a.useDeploymentStatusContextOptional)(),i=e?.targetId??"",d=(0,t.useCallback)(e=>i?s.subscribe(i,e):r,[s,i]),c=(0,t.useCallback)(()=>i?s.getEntry(i):s.getEntry(""),[s,i]),u=(0,t.useSyncExternalStore)(d,c,c);return(0,t.useEffect)(()=>{i&&n(i)},[i,n]),{deploy:(0,t.useCallback)(async()=>{e&&await l(e)},[l,e]),stop:(0,t.useCallback)(async()=>{i&&await o(i)},[o,i]),deployLoading:u.deployLoading,stopLoading:u.stopLoading,deployError:u.deployError,status:u.status,url:u.url}}e.s(["useDeployAction",()=>s])},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},78925,e=>{"use strict";var t=e.i(8893);let a=(0,t.createServerReference)("400b6475d2866a5a1a29ba4e4da18e7cfac25e0699",t.callServer,void 0,t.findSourceMapURL,"openFolder");e.s(["openFolder",()=>a])},37260,e=>{"use strict";let t=(0,e.i(3645).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",()=>t],37260)},76852,e=>{"use strict";var t=e.i(52155),a=e.i(71750),r=e.i(74121),s=e.i(78925),l=e.i(8893);let o=(0,l.createServerReference)("408fe0b6ea589aca6eacd0f616b8e9add53bd622bc",l.callServer,void 0,l.findSourceMapURL,"syncRepository");function n(e){let[l,n]=(0,t.useState)(!1),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[f,b]=(0,t.useState)(null),[y,m]=(0,t.useState)(null),[g,x]=(0,t.useState)(null),[v,w]=(0,t.useState)(null),S=(0,t.useRef)(null),k=(0,t.useRef)(null),C=(0,t.useRef)(null),j=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{S.current&&clearTimeout(S.current),k.current&&clearTimeout(k.current),C.current&&clearTimeout(C.current),j.current&&clearTimeout(j.current)},[]);let M=(0,t.useCallback)(async(t,a,r,s,l)=>{if(e&&!l){s.current&&clearTimeout(s.current),a(!0),r(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";r(t),s.current=setTimeout(()=>r(null),5e3)}}catch(e){r(e instanceof Error?e.message:"An unexpected error occurred"),s.current=setTimeout(()=>r(null),5e3)}finally{a(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>M(()=>(0,a.openIde)({repositoryPath:e.repositoryPath}),n,b,S,l),[M,l,e]),openInShell:(0,t.useCallback)(()=>M(()=>(0,r.openShell)({repositoryPath:e.repositoryPath}),d,m,k,i),[M,i,e]),openFolder:(0,t.useCallback)(()=>M(()=>(0,s.openFolder)(e.repositoryPath),u,x,C,c),[M,c,e]),syncMain:(0,t.useCallback)(()=>M(()=>o(e.repositoryId??""),h,w,j,p),[M,p,e]),ideLoading:l,shellLoading:i,folderLoading:c,syncLoading:p,ideError:f,shellError:y,folderError:g,syncError:v}}e.s(["useRepositoryActions",()=>n],76852)},6288,e=>{"use strict";let t=(0,e.i(3645).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>t],6288)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},62122,e=>{"use strict";var t=e.i(8893);let a=(0,t.createServerReference)("40f7240b6fe37d7f6c1dd3c8cc9c1fb711e8a5a7ae",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>a])},54793,7729,e=>{"use strict";var t=e.i(79606),a=e.i(31777);function r({icon:e,title:r,description:s,action:l,className:o,...n}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",o),...n,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:r}),s?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:s}):null,l?(0,t.jsx)("div",{className:"mt-2",children:l}):null]})}e.s(["EmptyState",()=>r],7729),e.s([],54793)},13005,e=>{"use strict";let t=(0,e.i(3645).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",()=>t],13005)},70002,57365,e=>{"use strict";var t=e.i(15131);function a(e,t,a,r){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===r?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===r?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===r?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:a?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{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}}e.s(["TriangleAlert",()=>t.default],70002),e.s(["deriveAppLiveStatus",()=>a],57365)},76127,e=>{"use strict";var t=e.i(8893);let a=(0,t.createServerReference)("40c51384a6fbf7754e1d3137a3f52bf31795e3a8d3",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>a])},40106,e=>{"use strict";var t=e.i(79606),a=e.i(52155),r=e.i(11719),s=e.i(35946),l=e.i(83428),o=e.i(42049),n=e.i(53360),i=e.i(41698),d=e.i(99105),c=e.i(23925),u=e.i(60253);e.i(41001);var p=e.i(64780),h=e.i(31777),f=e.i(8893);let b=(0,f.createServerReference)("4078a65eb4d4fd4b8e816a67bf5dbeccca49ffc01c",f.callServer,void 0,f.findSourceMapURL,"createProjectAndFeature"),y=(0,f.createServerReference)("40029df416b0936887e791cd01898eaac39c6ea5c3",f.callServer,void 0,f.findSourceMapURL,"createApplication");var m=e.i(41413);e.i(50032);var g=e.i(86254);e.i(92233);var x=e.i(10025),v=e.i(2828),w=e.i(70646),S=e.i(31151);let k=["application","fast","spec"],C={application:{icon:o.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:n.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:i.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function j({onRepositorySelect:e,onApplicationCreated:o,onClose:n,className:i}){let{t:f}=(0,p.useTranslation)("web"),[j,M]=(0,a.useState)(""),[R,L]=(0,a.useState)(void 0),[D,N]=(0,a.useState)(void 0),[A,E]=(0,a.useState)("application"),[T,P]=(0,a.useState)(!1),[I,_]=(0,a.useState)(null),[z,F]=(0,a.useState)(!1),q=(0,a.useRef)(null),O=(0,S.useAttachments)(),U=(0,a.useCallback)(()=>{E(e=>{let t=k.indexOf(e);return k[(t+1)%k.length]})},[]);(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n&&n(),"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),U())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,U]);let H=(0,a.useCallback)(async()=>{if(j.trim()&&!T){P(!0),_(null);try{if("application"===A){let e=await y({description:j.trim(),agentType:R,modelOverride:D,initialPrompt:j.trim()});if(e.error){_(e.error),P(!1);return}e.application&&o?.(e.application.id)}else{let t=await b({description:j.trim(),attachments:O.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:R,model:D,fast:"fast"===A});if(t.error){_(t.error),P(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}}catch{_("Something went wrong. Please try again."),P(!1)}}},[j,T,A,O.completedAttachments,R,D,e,o]),B=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),H())},[H]),K=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let a=await t.json();O.addAttachment(a)}}catch{}},[O.addAttachment]),G=(0,a.useCallback)(e=>{M(e),q.current?.focus()},[]),V=C[A],$=V.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",i),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(x.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>F(!0),onBlur:()=>F(!1),onDragEnter:O.handleDragEnter,onDragLeave:O.handleDragLeave,onDragOver:O.handleDragOver,onDrop:O.handleDrop,className:(0,h.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",z&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",O.isDragOver&&"border-primary/50 bg-primary/5",T&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:q,rows:2,autoFocus:!0,value:j,onChange:e=>M(e.target.value),onKeyDown:B,onPaste:O.handlePaste,placeholder:V.placeholder,disabled:T,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),O.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:O.attachments.map(e=>(0,t.jsx)(g.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>O.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>O.updateNotes(e.id,t)},e.id))}):null,O.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:O.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(m.AgentModelPicker,{initialAgentType:R??"claude-code",initialModel:D??"claude-sonnet-4-6",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{L(e),N(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)($,{className:"h-3.5 w-3.5"}),V.label]},A),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:k.map(e=>{let a=C[e],r=a.icon,s=A===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>E(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:a.label}),s?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}),(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:K,disabled:T,"aria-label":f("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(s.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(v.TooltipContent,{side:"top",children:f("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:H,disabled:!j.trim()||T,className:(0,h.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:T?(0,t.jsx)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(r.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),I?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:I}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:V.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>G(e),disabled:T,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},A)]})]})}e.s(["ControlCenterEmptyState",()=>j],40106)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8986,48923,14683,68529,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",()=>r],8986);let a=(0,t.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",()=>a],48923);var s=e.i(8893);let l=(0,s.createServerReference)("40170e0928a2ea6b74017ad47a4c57117dd019d7c1",s.callServer,void 0,s.findSourceMapURL,"openIde");e.s(["openIde",()=>l],14683);let o=(0,s.createServerReference)("40b218f168a724496cc86feff20259b942c948b18a",s.callServer,void 0,s.findSourceMapURL,"openShell");e.s(["openShell",()=>o],68529)},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},6910,e=>{"use strict";let t=(0,e.i(3645).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>t],6910)},73504,81605,e=>{"use strict";var t=e.i(79606),r=e.i(52155),a=e.i(8893);let s=(0,a.createServerReference)("40ef324b5c8df3d4d9f7a55860b3e1c565ff78158c",a.callServer,void 0,a.findSourceMapURL,"deployFeature"),l=(0,a.createServerReference)("40de173f92137f456a64448e1d39e9737079d5b8d9",a.callServer,void 0,a.findSourceMapURL,"deployRepository"),o=(0,a.createServerReference)("4007e6cf85c903d65686ff4b0e96b69bb3fb8b5dd6",a.callServer,void 0,a.findSourceMapURL,"deployApplication"),n=(0,a.createServerReference)("40d2b3d3f6017dff4d6be8016943a0bc41ef6d2119",a.callServer,void 0,a.findSourceMapURL,"stopDeployment"),i=(0,a.createServerReference)("40cda6828bcd7caf3c94b1d714873a18189513dfeb",a.callServer,void 0,a.findSourceMapURL,"getDeploymentStatus");var d=e.i(18354);let c={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class u{entries=new Map;listeners=new Map;globalListeners=new Set;hydrate(e){let t=new Set;for(let r of e)t.add(r.targetId),this.update(r.targetId,{status:r.state,url:r.url,targetType:r.targetType,hydrated:!0});for(let[e,r]of this.entries)!t.has(e)&&r.hydrated&&null!==r.status?this.update(e,{status:null,url:null}):t.has(e)||r.hydrated||this.update(e,{hydrated:!0})}getEntry(e){return this.entries.get(e)??c}update(e,t){let r={...this.entries.get(e)??c,...t};this.entries.set(e,r),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let r=this.listeners.get(e);return r||(r=new Set,this.listeners.set(e,r)),r.add(t),()=>{r?.delete(t),r?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>u,"EMPTY_ENTRY",0,c],81605);let p=(0,d.createLogger)("[DeploymentStatusProvider]"),h=new Set(["Booting","Ready"]),f=(0,r.createContext)(null);function b({initialDeployments:e,children:a}){let d=(0,r.useRef)(null);d.current||(d.current=new u,d.current.hydrate(e));let c=d.current;(0,r.useEffect)(()=>{c.hydrate(e)},[e,c]);let b=(0,r.useRef)(new Map),y=(0,r.useCallback)(e=>{let t=b.current.get(e);t&&(clearInterval(t),b.current.delete(e))},[]),m=(0,r.useCallback)(e=>{if(b.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await i(e)}catch(t){p.warn(`poll failed for "${e}"`,t),c.setStatus(e,null),y(e);return}if(!t||"Stopped"===t.state){c.setStatus(e,null),y(e);return}c.setStatus(e,t)},3e3);b.current.set(e,t)},[c,y]);(0,r.useEffect)(()=>{let e=b.current,t=c.subscribeAll(()=>{for(let[t]of e){let e=c.getEntry(t);e.status&&h.has(e.status)||y(t)}});return()=>{for(let[,r]of(t(),e))clearInterval(r);e.clear()}},[c,y]);let g=(0,r.useCallback)(e=>{!e||c.getEntry(e).hydrated||(c.update(e,{hydrated:!0}),(async()=>{try{let t=await i(e);c.setStatus(e,t),t&&h.has(t.state)&&m(e)}catch(t){p.warn(`ensureHydrated failed for "${e}"`,t)}})())},[c,m]),x=(0,r.useCallback)(async e=>{c.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await s(e.targetId):"application"===e.targetType?await o(e.targetId):await l(e.repositoryPath);if(!t.success)return void c.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});c.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),m(e.targetId)}catch(r){let t=r instanceof Error?r.message:"An unexpected error occurred";c.update(e.targetId,{deployLoading:!1,deployError:t})}},[c,m]),v=(0,r.useCallback)(async e=>{if(e){c.update(e,{stopLoading:!0});try{(await n(e)).success?(y(e),c.update(e,{stopLoading:!1,status:null,url:null})):c.update(e,{stopLoading:!1})}catch(t){p.warn("stop error (non-critical)",t),c.update(e,{stopLoading:!1})}}},[c,y]),w=(0,r.useMemo)(()=>({store:c,deploy:x,stop:v,ensureHydrated:g}),[c,x,v,g]);return(0,t.jsx)(f.Provider,{value:w,children:a})}function y(){let e=(0,r.useContext)(f);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function m(){let e=(0,r.useContext)(f);return e||g}let g={store:new u,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>b,"useDeploymentStatusContext",()=>y,"useDeploymentStatusContextOptional",()=>m],73504)},8537,e=>{"use strict";var t=e.i(52155),r=e.i(73504);function a(){}function s(e){let{store:s,deploy:l,stop:o,ensureHydrated:n}=(0,r.useDeploymentStatusContextOptional)(),i=e?.targetId??"",d=(0,t.useCallback)(e=>i?s.subscribe(i,e):a,[s,i]),c=(0,t.useCallback)(()=>i?s.getEntry(i):s.getEntry(""),[s,i]),u=(0,t.useSyncExternalStore)(d,c,c);return(0,t.useEffect)(()=>{i&&n(i)},[i,n]),{deploy:(0,t.useCallback)(async()=>{e&&await l(e)},[l,e]),stop:(0,t.useCallback)(async()=>{i&&await o(i)},[o,i]),deployLoading:u.deployLoading,stopLoading:u.stopLoading,deployError:u.deployError,status:u.status,url:u.url}}e.s(["useDeployAction",()=>s])},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},1650,e=>{"use strict";e.i(11495),e.s([])},39071,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("40b2e1bc96b30cbdb0430af9925ac38dd4b704b0f3",t.callServer,void 0,t.findSourceMapURL,"openFolder");e.s(["openFolder",()=>r])},37260,e=>{"use strict";let t=(0,e.i(3645).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",()=>t],37260)},76852,e=>{"use strict";var t=e.i(52155),r=e.i(14683),a=e.i(68529),s=e.i(39071),l=e.i(8893);let o=(0,l.createServerReference)("406d43f7d0c30b6b0b43e3aa4b78d5de248a765a10",l.callServer,void 0,l.findSourceMapURL,"syncRepository");function n(e){let[l,n]=(0,t.useState)(!1),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[f,b]=(0,t.useState)(null),[y,m]=(0,t.useState)(null),[g,x]=(0,t.useState)(null),[v,w]=(0,t.useState)(null),S=(0,t.useRef)(null),k=(0,t.useRef)(null),C=(0,t.useRef)(null),j=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{S.current&&clearTimeout(S.current),k.current&&clearTimeout(k.current),C.current&&clearTimeout(C.current),j.current&&clearTimeout(j.current)},[]);let M=(0,t.useCallback)(async(t,r,a,s,l)=>{if(e&&!l){s.current&&clearTimeout(s.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),s.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),s.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>M(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),n,b,S,l),[M,l,e]),openInShell:(0,t.useCallback)(()=>M(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),d,m,k,i),[M,i,e]),openFolder:(0,t.useCallback)(()=>M(()=>(0,s.openFolder)(e.repositoryPath),u,x,C,c),[M,c,e]),syncMain:(0,t.useCallback)(()=>M(()=>o(e.repositoryId??""),h,w,j,p),[M,p,e]),ideLoading:l,shellLoading:i,folderLoading:c,syncLoading:p,ideError:f,shellError:y,folderError:g,syncError:v}}e.s(["useRepositoryActions",()=>n],76852)},6288,e=>{"use strict";let t=(0,e.i(3645).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>t],6288)},91925,e=>{"use strict";let t=(0,e.i(3645).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",()=>t],91925)},71978,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("402c21b8b8b3488320789af44e231a3b03336742fb",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",()=>r])},54793,7729,e=>{"use strict";var t=e.i(79606),r=e.i(31777);function a({icon:e,title:a,description:s,action:l,className:o,...n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",o),...n,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),s?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:s}):null,l?(0,t.jsx)("div",{className:"mt-2",children:l}):null]})}e.s(["EmptyState",()=>a],7729),e.s([],54793)},13005,e=>{"use strict";let t=(0,e.i(3645).default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",()=>t],13005)},70002,57365,e=>{"use strict";var t=e.i(15131);function r(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{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}}e.s(["TriangleAlert",()=>t.default],70002),e.s(["deriveAppLiveStatus",()=>r],57365)},22947,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("40b8ce83c1d49acef485ad48493fec9a73813972ee",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},40106,e=>{"use strict";var t=e.i(79606),r=e.i(52155),a=e.i(11719),s=e.i(35946),l=e.i(83428),o=e.i(42049),n=e.i(53360),i=e.i(41698),d=e.i(99105),c=e.i(23925),u=e.i(60253);e.i(41001);var p=e.i(64780),h=e.i(31777),f=e.i(8893);let b=(0,f.createServerReference)("401fd96509b2150c7fc78d04070496418625ad3bb8",f.callServer,void 0,f.findSourceMapURL,"createProjectAndFeature"),y=(0,f.createServerReference)("40e2b1ed706b39956f9d1c0c7231efa9d7c4c0760a",f.callServer,void 0,f.findSourceMapURL,"createApplication");var m=e.i(41413);e.i(50032);var g=e.i(86254);e.i(92233);var x=e.i(10025),v=e.i(2828),w=e.i(70646),S=e.i(31151);let k=["application","fast","spec"],C={application:{icon:o.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:n.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:i.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function j({onRepositorySelect:e,onApplicationCreated:o,onClose:n,className:i}){let{t:f}=(0,p.useTranslation)("web"),[j,M]=(0,r.useState)(""),[R,L]=(0,r.useState)(void 0),[D,N]=(0,r.useState)(void 0),[A,E]=(0,r.useState)("application"),[T,P]=(0,r.useState)(!1),[I,_]=(0,r.useState)(null),[z,F]=(0,r.useState)(!1),q=(0,r.useRef)(null),O=(0,S.useAttachments)(),U=(0,r.useCallback)(()=>{E(e=>{let t=k.indexOf(e);return k[(t+1)%k.length]})},[]);(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&n&&n(),"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),U())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,U]);let H=(0,r.useCallback)(async()=>{if(j.trim()&&!T){P(!0),_(null);try{if("application"===A){let e=await y({description:j.trim(),agentType:R,modelOverride:D,initialPrompt:j.trim()});if(e.error){_(e.error),P(!1);return}e.application&&o?.(e.application.id)}else{let t=await b({description:j.trim(),attachments:O.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:R,model:D,fast:"fast"===A});if(t.error){_(t.error),P(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}}catch{_("Something went wrong. Please try again."),P(!1)}}},[j,T,A,O.completedAttachments,R,D,e,o]),B=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),H())},[H]),K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let r=await t.json();O.addAttachment(r)}}catch{}},[O.addAttachment]),G=(0,r.useCallback)(e=>{M(e),q.current?.focus()},[]),V=C[A],$=V.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",i),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(u.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(x.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>F(!0),onBlur:()=>F(!1),onDragEnter:O.handleDragEnter,onDragLeave:O.handleDragLeave,onDragOver:O.handleDragOver,onDrop:O.handleDrop,className:(0,h.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",z&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",O.isDragOver&&"border-primary/50 bg-primary/5",T&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:q,rows:2,autoFocus:!0,value:j,onChange:e=>M(e.target.value),onKeyDown:B,onPaste:O.handlePaste,placeholder:V.placeholder,disabled:T,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),O.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:O.attachments.map(e=>(0,t.jsx)(g.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>O.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>O.updateNotes(e.id,t)},e.id))}):null,O.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:O.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(m.AgentModelPicker,{initialAgentType:R??"claude-code",initialModel:D??"claude-sonnet-4-6",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{L(e),N(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)($,{className:"h-3.5 w-3.5"}),V.label]},A),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:k.map(e=>{let r=C[e],a=r.icon,s=A===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>E(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:r.label}),s?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}),(0,t.jsxs)(v.Tooltip,{children:[(0,t.jsx)(v.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:K,disabled:T,"aria-label":f("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(s.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(v.TooltipContent,{side:"top",children:f("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:H,disabled:!j.trim()||T,className:(0,h.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:T?(0,t.jsx)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(a.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),I?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:I}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:V.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>G(e),disabled:T,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},A)]})]})}e.s(["ControlCenterEmptyState",()=>j],40106)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[50488,92548,85017,25232,a=>{"use strict";var b=a.i(25700);let c=(0,b.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);a.s(["Code2",()=>c],50488);let d=(0,b.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);a.s(["GitCommitHorizontal",()=>d],92548);var e=a.i(89111);let f=(0,e.createServerReference)("40fd47b2584338a8b93650c528927d40c46ae67053",e.callServer,void 0,e.findSourceMapURL,"openIde");a.s(["openIde",()=>f],85017);let g=(0,e.createServerReference)("40d691e34b0308a359a3dc73e8658535afabf17ab0",e.callServer,void 0,e.findSourceMapURL,"openShell");a.s(["openShell",()=>g],25232)},53170,a=>{"use strict";let b=(0,a.i(25700).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);a.s(["GitBranch",()=>b],53170)},71238,a=>{"use strict";let b=(0,a.i(25700).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",()=>b],71238)},50490,a=>{"use strict";let b=(0,a.i(25700).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);a.s(["Play",()=>b],50490)},5698,a=>{"use strict";let b=(0,a.i(25700).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",()=>b],5698)},66691,24434,a=>{"use strict";var b=a.i(41176),c=a.i(44592),d=a.i(89111);let e=(0,d.createServerReference)("4066b9bfa7e61b8d2202e66c06861a38b2e51bef92",d.callServer,void 0,d.findSourceMapURL,"deployFeature"),f=(0,d.createServerReference)("40a4a1e771c92cd0d06aa2dc0a7ec6b31ae7123ca6",d.callServer,void 0,d.findSourceMapURL,"deployRepository"),g=(0,d.createServerReference)("402bfe71166e82bb52614ec73f319bc660b4b227be",d.callServer,void 0,d.findSourceMapURL,"deployApplication"),h=(0,d.createServerReference)("403189b40c857fc998c2f200b2d221dd58bc2ea48e",d.callServer,void 0,d.findSourceMapURL,"stopDeployment"),i=(0,d.createServerReference)("406ac6a35f8e8ba5721118fc9ea2b7c88c03327ffc",d.callServer,void 0,d.findSourceMapURL,"getDeploymentStatus");var j=a.i(87139);let k={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class l{entries=new Map;listeners=new Map;globalListeners=new Set;hydrate(a){let b=new Set;for(let c of a)b.add(c.targetId),this.update(c.targetId,{status:c.state,url:c.url,targetType:c.targetType,hydrated:!0});for(let[a,c]of this.entries)!b.has(a)&&c.hydrated&&null!==c.status?this.update(a,{status:null,url:null}):b.has(a)||c.hydrated||this.update(a,{hydrated:!0})}getEntry(a){return this.entries.get(a)??k}update(a,b){let c={...this.entries.get(a)??k,...b};this.entries.set(a,c),this.notify(a)}setStatus(a,b){null===b?this.update(a,{status:null,url:null,hydrated:!0}):this.update(a,{status:b.state,url:b.url,hydrated:!0})}subscribe(a,b){let c=this.listeners.get(a);return c||(c=new Set,this.listeners.set(a,c)),c.add(b),()=>{c?.delete(b),c?.size===0&&this.listeners.delete(a)}}subscribeAll(a){return this.globalListeners.add(a),()=>{this.globalListeners.delete(a)}}notify(a){let b=this.listeners.get(a);if(b)for(let a of b)a();for(let a of this.globalListeners)a()}}a.s(["DeploymentStatusStore",()=>l,"EMPTY_ENTRY",0,k],24434);let m=(0,j.createLogger)("[DeploymentStatusProvider]"),n=new Set(["Booting","Ready"]),o=(0,c.createContext)(null);function p({initialDeployments:a,children:d}){let j=(0,c.useRef)(null);j.current||(j.current=new l,j.current.hydrate(a));let k=j.current;(0,c.useEffect)(()=>{k.hydrate(a)},[a,k]);let p=(0,c.useRef)(new Map),q=(0,c.useCallback)(a=>{let b=p.current.get(a);b&&(clearInterval(b),p.current.delete(a))},[]),r=(0,c.useCallback)(a=>{if(p.current.has(a))return;let b=setInterval(async()=>{let b;try{b=await i(a)}catch(b){m.warn(`poll failed for "${a}"`,b),k.setStatus(a,null),q(a);return}if(!b||"Stopped"===b.state){k.setStatus(a,null),q(a);return}k.setStatus(a,b)},3e3);p.current.set(a,b)},[k,q]);(0,c.useEffect)(()=>{let a=p.current,b=k.subscribeAll(()=>{for(let[b]of a){let a=k.getEntry(b);a.status&&n.has(a.status)||q(b)}});return()=>{for(let[,c]of(b(),a))clearInterval(c);a.clear()}},[k,q]);let s=(0,c.useCallback)(a=>{!a||k.getEntry(a).hydrated||(k.update(a,{hydrated:!0}),(async()=>{try{let b=await i(a);k.setStatus(a,b),b&&n.has(b.state)&&r(a)}catch(b){m.warn(`ensureHydrated failed for "${a}"`,b)}})())},[k,r]),t=(0,c.useCallback)(async a=>{k.update(a.targetId,{deployLoading:!0,deployError:null});try{let b="feature"===a.targetType?await e(a.targetId):"application"===a.targetType?await g(a.targetId):await f(a.repositoryPath);if(!b.success)return void k.update(a.targetId,{deployLoading:!1,deployError:b.error??"An unexpected error occurred"});k.update(a.targetId,{deployLoading:!1,status:b.state??null,url:null,hydrated:!0,targetType:a.targetType}),r(a.targetId)}catch(c){let b=c instanceof Error?c.message:"An unexpected error occurred";k.update(a.targetId,{deployLoading:!1,deployError:b})}},[k,r]),u=(0,c.useCallback)(async a=>{if(a){k.update(a,{stopLoading:!0});try{(await h(a)).success?(q(a),k.update(a,{stopLoading:!1,status:null,url:null})):k.update(a,{stopLoading:!1})}catch(b){m.warn("stop error (non-critical)",b),k.update(a,{stopLoading:!1})}}},[k,q]),v=(0,c.useMemo)(()=>({store:k,deploy:t,stop:u,ensureHydrated:s}),[k,t,u,s]);return(0,b.jsx)(o.Provider,{value:v,children:d})}function q(){let a=(0,c.useContext)(o);if(!a)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return a}function r(){let a=(0,c.useContext)(o);return a||s}let s={store:new l,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};a.s(["DeploymentStatusProvider",()=>p,"useDeploymentStatusContext",()=>q,"useDeploymentStatusContextOptional",()=>r],66691)},18662,a=>{"use strict";var b=a.i(44592),c=a.i(66691);function d(){}function e(a){let{store:e,deploy:f,stop:g,ensureHydrated:h}=(0,c.useDeploymentStatusContextOptional)(),i=a?.targetId??"",j=(0,b.useCallback)(a=>i?e.subscribe(i,a):d,[e,i]),k=(0,b.useCallback)(()=>i?e.getEntry(i):e.getEntry(""),[e,i]),l=(0,b.useSyncExternalStore)(j,k,k);return(0,b.useEffect)(()=>{i&&h(i)},[i,h]),{deploy:(0,b.useCallback)(async()=>{a&&await f(a)},[f,a]),stop:(0,b.useCallback)(async()=>{i&&await g(i)},[g,i]),deployLoading:l.deployLoading,stopLoading:l.stopLoading,deployError:l.deployError,status:l.status,url:l.url}}a.s(["useDeployAction",()=>e])},63698,a=>{"use strict";let b=(0,a.i(25700).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",()=>b],63698)},78454,a=>{"use strict";a.i(24255),a.s([])},93689,a=>{"use strict";var b=a.i(89111);let c=(0,b.createServerReference)("400b6475d2866a5a1a29ba4e4da18e7cfac25e0699",b.callServer,void 0,b.findSourceMapURL,"openFolder");a.s(["openFolder",()=>c])},33511,a=>{"use strict";let b=(0,a.i(25700).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);a.s(["Archive",()=>b],33511)},55628,a=>{"use strict";var b=a.i(44592),c=a.i(85017),d=a.i(25232),e=a.i(93689),f=a.i(89111);let g=(0,f.createServerReference)("408fe0b6ea589aca6eacd0f616b8e9add53bd622bc",f.callServer,void 0,f.findSourceMapURL,"syncRepository");function h(a){let[f,h]=(0,b.useState)(!1),[i,j]=(0,b.useState)(!1),[k,l]=(0,b.useState)(!1),[m,n]=(0,b.useState)(!1),[o,p]=(0,b.useState)(null),[q,r]=(0,b.useState)(null),[s,t]=(0,b.useState)(null),[u,v]=(0,b.useState)(null),w=(0,b.useRef)(null),x=(0,b.useRef)(null),y=(0,b.useRef)(null),z=(0,b.useRef)(null);(0,b.useEffect)(()=>()=>{w.current&&clearTimeout(w.current),x.current&&clearTimeout(x.current),y.current&&clearTimeout(y.current),z.current&&clearTimeout(z.current)},[]);let A=(0,b.useCallback)(async(b,c,d,e,f)=>{if(a&&!f){e.current&&clearTimeout(e.current),c(!0),d(null);try{let a=await b();if(!a.success){let b=a.error??"An unexpected error occurred";d(b),e.current=setTimeout(()=>d(null),5e3)}}catch(a){d(a instanceof Error?a.message:"An unexpected error occurred"),e.current=setTimeout(()=>d(null),5e3)}finally{c(!1)}}},[a]);return{openInIde:(0,b.useCallback)(()=>A(()=>(0,c.openIde)({repositoryPath:a.repositoryPath}),h,p,w,f),[A,f,a]),openInShell:(0,b.useCallback)(()=>A(()=>(0,d.openShell)({repositoryPath:a.repositoryPath}),j,r,x,i),[A,i,a]),openFolder:(0,b.useCallback)(()=>A(()=>(0,e.openFolder)(a.repositoryPath),l,t,y,k),[A,k,a]),syncMain:(0,b.useCallback)(()=>A(()=>g(a.repositoryId??""),n,v,z,m),[A,m,a]),ideLoading:f,shellLoading:i,folderLoading:k,syncLoading:m,ideError:o,shellError:q,folderError:s,syncError:u}}a.s(["useRepositoryActions",()=>h],55628)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_9cbe2952._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16489,35749,e=>{"use strict";let s=(0,e.i(3645).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",()=>s],16489);var t=e.i(91909);e.s(["FileEdit",()=>t.default],35749)},59311,e=>{"use strict";let s=(0,e.i(3645).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>s],59311)},91909,e=>{"use strict";let s=(0,e.i(3645).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["default",()=>s])},12919,e=>{"use strict";let s=(0,e.i(3645).default)("file-plus",[["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"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",()=>s],12919)},49283,e=>{"use strict";var s=e.i(8893);let t=(0,s.createServerReference)("603e60b738e2273f594dbc2edf3d236c833dbc1105",s.callServer,void 0,s.findSourceMapURL,"getGitRepoInfo");e.s(["getGitRepoInfo",()=>t])},10661,e=>{"use strict";var s=e.i(79606),t=e.i(52155),a=e.i(11434),r=e.i(8986),n=e.i(38573),i=e.i(19933),l=e.i(59311),o=e.i(24042),d=e.i(6910),c=e.i(33548),x=e.i(23925),h=e.i(83428),m=e.i(16489),p=e.i(48109),u=e.i(49228),g=e.i(48923),j=e.i(58481),f=e.i(32494),b=e.i(3645);let v=(0,b.default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var y=e.i(37260),N=e.i(35749),k=e.i(12919);let C=(0,b.default)("file-check-corner",[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]]);var T=e.i(31777);e.i(1650);var z=e.i(11495);e.i(99348);var w=e.i(5259),P=e.i(2828),L=e.i(68304),S=e.i(76852),M=e.i(8537),R=e.i(75921),I=e.i(28112),D=e.i(49283);let F="text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40",B="bg-border/60 mx-1.5 h-5 w-px shrink-0";function A({data:e,initialTab:u}){let g=(0,R.useFeatureFlags)(),j=(0,a.useRouter)(),f=(0,a.usePathname)().startsWith("/repository/"),[b,v]=(0,t.useState)(u??"overview"),[y,N]=(0,t.useState)(!1),k=(0,S.useRepositoryActions)(e.repositoryPath?{repositoryId:e.id,repositoryPath:e.repositoryPath}:null),C=(0,t.useCallback)(()=>{j.push("/")},[j]),D=(0,M.useDeployAction)(e.repositoryPath?{targetId:e.repositoryPath,targetType:"repository",repositoryPath:e.repositoryPath}:null),A="Booting"===D.status||"Ready"===D.status,O=(0,t.useCallback)(()=>{e.repositoryPath&&(navigator.clipboard.writeText(e.repositoryPath),N(!0),setTimeout(()=>N(!1),2e3))},[e.repositoryPath]),G=e.id?`repo-${e.id}`:`repo-${e.name}`;return(0,s.jsx)(z.BaseDrawer,{open:f,onClose:C,size:"lg",modal:!1,"data-testid":"repository-drawer",children:(0,s.jsxs)(L.Tabs,{value:b,onValueChange:v,className:"flex min-h-0 flex-1 flex-col",children:[(0,s.jsxs)(L.TabsList,{className:"bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0",children:[(0,s.jsxs)(L.TabsTrigger,{value:"overview",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,s.jsx)(m.LayoutDashboard,{className:"mr-1.5 size-4"}),"Overview"]}),(0,s.jsxs)(L.TabsTrigger,{value:"chat",className:"text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none",children:[(0,s.jsx)(p.MessageSquare,{className:"mr-1.5 size-4"}),"Chat"]})]}),(0,s.jsxs)("div",{className:"bg-muted/40 shrink-0 border-b",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 pe-10 pt-2.5 pb-2","data-testid":"repository-drawer-header",children:[(0,s.jsx)("h2",{className:"text-foreground min-w-0 truncate text-base font-semibold tracking-tight",children:e.name}),e.repositoryPath?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-muted-foreground/40 text-xs",children:"/"}),(0,s.jsx)("span",{className:"text-muted-foreground min-w-0 truncate font-mono text-[11px]",children:e.repositoryPath})]}):null]}),e.repositoryPath?(0,s.jsx)("div",{"data-testid":"repository-drawer-toolbar",children:(0,s.jsxs)("div",{className:"flex h-9 items-center px-1.5",children:[(0,s.jsxs)(P.TooltipProvider,{delayDuration:300,children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",className:F,onClick:k.openInIde,disabled:k.ideLoading,"aria-label":"Open in IDE",children:k.ideLoading?(0,s.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):(0,s.jsx)(r.Code2,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open in IDE"})]}),(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",className:F,onClick:k.openInShell,disabled:k.shellLoading,"aria-label":"Open terminal",children:k.shellLoading?(0,s.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):(0,s.jsx)(n.Terminal,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open terminal"})]}),(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",className:F,onClick:k.openFolder,disabled:k.folderLoading,"aria-label":"Open folder",children:k.folderLoading?(0,s.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):(0,s.jsx)(i.FolderOpen,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Open folder"})]}),(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",className:F,onClick:O,"aria-label":"Copy path",children:y?(0,s.jsx)(x.Check,{className:"size-3.5 text-green-500"}):(0,s.jsx)(c.Copy,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:y?"Copied!":"Copy path"})]})]}),e.id&&g.gitRebaseSync?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:B}),(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",className:F,onClick:k.syncMain,disabled:k.syncLoading,"aria-label":"Sync main",children:k.syncLoading?(0,s.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):(0,s.jsx)(l.RefreshCw,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:"Sync main"})]})]}):null,g.envDeploy?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:B}),(0,s.jsxs)(P.Tooltip,{children:[(0,s.jsx)(P.TooltipTrigger,{asChild:!0,children:(0,s.jsx)("button",{type:"button",disabled:D.deployLoading||D.stopLoading,onClick:A?D.stop:D.deploy,className:(0,T.cn)("inline-flex size-7 items-center justify-center rounded-[3px] disabled:opacity-40",A?"text-red-500 hover:bg-red-500/10 hover:text-red-400":"text-green-500 hover:bg-green-500/10 hover:text-green-400"),"aria-label":A?"Stop dev server":"Start dev server",children:D.deployLoading||D.stopLoading?(0,s.jsx)(h.Loader2,{className:"size-3.5 animate-spin"}):A?(0,s.jsx)(d.Square,{className:"size-4"}):(0,s.jsx)(o.Play,{className:"size-4"})})}),(0,s.jsx)(P.TooltipContent,{side:"bottom",className:"text-xs",children:A?"Stop dev server":"Start dev server"})]}),A?(0,s.jsx)(w.DeploymentStatusBadge,{status:D.status,url:D.url,targetId:e.repositoryPath}):null]}):null]}),(0,s.jsx)("div",{className:"flex-1"})]})}):null]}),(0,s.jsx)(L.TabsContent,{value:"overview",className:"mt-0 flex-1 overflow-y-auto",children:(0,s.jsx)(E,{data:e,syncError:k.syncError})}),(0,s.jsx)(L.TabsContent,{value:"chat",className:"mt-0 flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,s.jsx)(I.ChatTab,{featureId:G,worktreePath:e.repositoryPath})})]})})}function O({icon:e,title:t,children:a}){return(0,s.jsxs)("div",{className:"px-3 pt-4 pb-1",children:[(0,s.jsxs)("div",{className:"text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase",children:[(0,s.jsx)(e,{className:"size-4 opacity-50"}),t]}),a]})}function G({children:e,className:t}){return(0,s.jsx)("div",{className:(0,T.cn)("bg-muted/60 rounded-md border border-transparent p-3",t),children:e})}function $({label:e,children:t}){return(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-foreground/40 text-[11px] font-medium tracking-wider uppercase",children:e}),(0,s.jsx)("span",{className:"text-sm leading-snug",children:t})]})}function E({data:e,syncError:a}){let[r,n]=(0,t.useState)(null),[i,l]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{if(!e.repositoryPath)return;let s=!1;return l(!0),(0,D.getGitRepoInfo)(e.repositoryPath,8).then(e=>{s||n(e)}).catch(()=>{}).finally(()=>{s||l(!1)}),()=>{s=!0}},[e.repositoryPath]),!e.repositoryPath)return null;let o=r?.workingTree,d=o&&(o.staged>0||o.modified>0||o.untracked>0),c=r?.diffStats;return(0,s.jsxs)("div",{className:"pb-4",children:[i?(0,s.jsxs)("div",{className:"text-foreground/40 flex items-center gap-2 px-4 py-8 text-sm",children:[(0,s.jsx)(h.Loader2,{className:"size-4 animate-spin"})," Loading repository info..."]}):null,r?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 px-3 pt-3",children:[(0,s.jsx)(G,{children:(0,s.jsxs)($,{label:"Branch",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)(u.GitBranch,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,s.jsx)("code",{className:"font-mono text-sm",children:r.currentBranch??e.branch??"—"})]}),null!=e.behindCount&&e.behindCount>0?(0,s.jsxs)("span",{className:"mt-0.5 block text-xs text-orange-600 dark:text-orange-400",children:[e.behindCount," behind default"]}):null]})}),(0,s.jsx)(G,{children:(0,s.jsx)($,{label:"Working Tree",children:d?(0,s.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-0.5",children:[o.staged>0?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-green-600 dark:text-green-400",children:[(0,s.jsx)(C,{className:"size-3.5"})," ",o.staged," staged"]}):null,o.modified>0?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600 dark:text-amber-400",children:[(0,s.jsx)(N.FileEdit,{className:"size-3.5"})," ",o.modified," modified"]}):null,o.untracked>0?(0,s.jsxs)("span",{className:"text-foreground/50 inline-flex items-center gap-1 text-sm",children:[(0,s.jsx)(k.FilePlus,{className:"size-3.5"})," ",o.untracked," untracked"]}):null]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm text-green-600 dark:text-green-400",children:[(0,s.jsx)(x.Check,{className:"size-3.5"})," Clean"]})})}),c?(0,s.jsx)(G,{children:(0,s.jsx)($,{label:"Uncommitted Changes",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,s.jsxs)("span",{children:[c.filesChanged," file",1!==c.filesChanged?"s":""]}),(0,s.jsxs)("span",{className:"text-green-600 dark:text-green-400",children:["+",c.insertions]}),(0,s.jsxs)("span",{className:"text-red-500 dark:text-red-400",children:["-",c.deletions]})]})})}):null,r.remotes.length>0?(0,s.jsx)(G,{children:(0,s.jsx)($,{label:"Remote",children:r.remotes.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,s.jsx)(f.Globe,{className:"text-foreground/30 size-3.5 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:e.url.replace(/\.git$/,"").replace(/^https?:\/\/([^@]+@)?/,"").replace(/x-access-token:[^@]+@/,"")})]},e.name))})}):null,r.stashCount>0?(0,s.jsx)(G,{children:(0,s.jsx)($,{label:"Stashes",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[(0,s.jsx)(y.Archive,{className:"text-foreground/30 size-3.5 shrink-0"}),r.stashCount," stash",1!==r.stashCount?"es":""]})})}):null,r.tags.length>0?(0,s.jsx)(G,{children:(0,s.jsx)($,{label:"Tags",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.tags.map(e=>(0,s.jsxs)("span",{className:"bg-foreground/[0.04] inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-xs",children:[(0,s.jsx)(v,{className:"text-foreground/30 size-2.5"}),e]},e))})})}):null]}):null,r&&r.commits.length>0?(0,s.jsx)(O,{icon:g.GitCommitHorizontal,title:"Recent Commits",children:(0,s.jsxs)("div",{className:"relative ml-3",children:[(0,s.jsx)("div",{className:"bg-border absolute top-2 bottom-2 left-[5px] w-px"}),r.commits.map((e,t)=>(0,s.jsxs)("div",{className:"group relative flex gap-3 py-1.5",children:[(0,s.jsx)("div",{className:(0,T.cn)("relative z-10 mt-1.5 size-[11px] shrink-0 rounded-full border-2",0===t?"border-primary bg-primary":"border-border bg-background group-hover:border-foreground/30")}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("p",{className:"min-w-0 truncate text-sm leading-snug",children:e.subject}),(0,s.jsx)("code",{className:"text-foreground/30 shrink-0 font-mono text-[11px]",children:e.shortHash})]}),(0,s.jsxs)("div",{className:"text-foreground/40 mt-0.5 flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{children:e.author}),(0,s.jsx)("span",{children:"·"}),(0,s.jsx)("span",{children:e.relativeDate}),e.branch?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:"·"}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-0.5",children:[(0,s.jsx)(u.GitBranch,{className:"size-3"}),e.branch]})]}):null]})]})]},e.hash))]})}):null,r&&r.branches.length>1?(0,s.jsx)(O,{icon:u.GitBranch,title:"Branches",children:(0,s.jsx)("div",{className:"flex flex-col",children:[...r.branches].sort((e,s)=>{let t,a,r,n;return e.isCurrent&&!s.isCurrent?-1:!e.isCurrent&&s.isCurrent?1:(t=e.name,/^(main|master)$/.test(t)&&(a=s.name,!/^(main|master)$/.test(a)))?-1:+(r=e.name,!!(!/^(main|master)$/.test(r)&&(n=s.name,/^(main|master)$/.test(n))))}).map(e=>(0,s.jsxs)("div",{className:(0,T.cn)("flex items-center justify-between rounded px-2 py-1.5",e.isCurrent&&"bg-muted/60"),children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-sm",children:[e.isCurrent?(0,s.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-green-500"}):/^(main|master)$/.test(e.name)?(0,s.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-blue-500"}):(0,s.jsx)("span",{className:"bg-foreground/10 size-2 shrink-0 rounded-full"}),(0,s.jsx)("code",{className:"font-mono text-[13px]",children:e.name}),e.isCurrent?(0,s.jsx)("span",{className:"text-foreground/40 text-[10px]",children:"current"}):null]}),(0,s.jsx)("span",{className:"text-foreground/40 text-xs",children:e.lastCommitDate})]},e.name))})}):null,a?(0,s.jsx)(O,{icon:j.AlertTriangle,title:"Issues",children:(0,s.jsx)(G,{className:"bg-destructive/5 border-transparent",children:(0,s.jsx)("p",{className:"text-destructive text-sm",children:a})})}):null]})}e.s(["RepositoryDrawerClient",()=>A],10661)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,49283,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("603e60b738e2273f594dbc2edf3d236c833dbc1105",t.callServer,void 0,t.findSourceMapURL,"getGitRepoInfo");e.s(["getGitRepoInfo",()=>r])},76127,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("40c51384a6fbf7754e1d3137a3f52bf31795e3a8d3",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},70002,57365,e=>{"use strict";var t=e.i(15131);function r(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{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}}e.s(["TriangleAlert",()=>t.default],70002),e.s(["deriveAppLiveStatus",()=>r],57365)},81181,e=>{"use strict";var t=e.i(95230);e.s(["Download",()=>t.default])},38227,e=>{"use strict";let t=(0,e.i(3645).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],38227)},41698,e=>{"use strict";let t=(0,e.i(3645).default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);e.s(["ClipboardList",()=>t],41698)},87889,e=>{"use strict";let t=(0,e.i(3645).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],87889)},10714,e=>{"use strict";let t=(0,e.i(3645).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>t])},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},73504,81605,e=>{"use strict";var t=e.i(79606),r=e.i(52155),a=e.i(8893);let l=(0,a.createServerReference)("4066b9bfa7e61b8d2202e66c06861a38b2e51bef92",a.callServer,void 0,a.findSourceMapURL,"deployFeature"),s=(0,a.createServerReference)("40a4a1e771c92cd0d06aa2dc0a7ec6b31ae7123ca6",a.callServer,void 0,a.findSourceMapURL,"deployRepository"),d=(0,a.createServerReference)("402bfe71166e82bb52614ec73f319bc660b4b227be",a.callServer,void 0,a.findSourceMapURL,"deployApplication"),i=(0,a.createServerReference)("403189b40c857fc998c2f200b2d221dd58bc2ea48e",a.callServer,void 0,a.findSourceMapURL,"stopDeployment"),u=(0,a.createServerReference)("406ac6a35f8e8ba5721118fc9ea2b7c88c03327ffc",a.callServer,void 0,a.findSourceMapURL,"getDeploymentStatus");var n=e.i(18354);let o={status:null,url:null,targetType:null,hydrated:!1,deployLoading:!1,stopLoading:!1,deployError:null};class c{entries=new Map;listeners=new Map;globalListeners=new Set;hydrate(e){let t=new Set;for(let r of e)t.add(r.targetId),this.update(r.targetId,{status:r.state,url:r.url,targetType:r.targetType,hydrated:!0});for(let[e,r]of this.entries)!t.has(e)&&r.hydrated&&null!==r.status?this.update(e,{status:null,url:null}):t.has(e)||r.hydrated||this.update(e,{hydrated:!0})}getEntry(e){return this.entries.get(e)??o}update(e,t){let r={...this.entries.get(e)??o,...t};this.entries.set(e,r),this.notify(e)}setStatus(e,t){null===t?this.update(e,{status:null,url:null,hydrated:!0}):this.update(e,{status:t.state,url:t.url,hydrated:!0})}subscribe(e,t){let r=this.listeners.get(e);return r||(r=new Set,this.listeners.set(e,r)),r.add(t),()=>{r?.delete(t),r?.size===0&&this.listeners.delete(e)}}subscribeAll(e){return this.globalListeners.add(e),()=>{this.globalListeners.delete(e)}}notify(e){let t=this.listeners.get(e);if(t)for(let e of t)e();for(let e of this.globalListeners)e()}}e.s(["DeploymentStatusStore",()=>c,"EMPTY_ENTRY",0,o],81605);let p=(0,n.createLogger)("[DeploymentStatusProvider]"),y=new Set(["Booting","Ready"]),f=(0,r.createContext)(null);function h({initialDeployments:e,children:a}){let n=(0,r.useRef)(null);n.current||(n.current=new c,n.current.hydrate(e));let o=n.current;(0,r.useEffect)(()=>{o.hydrate(e)},[e,o]);let h=(0,r.useRef)(new Map),b=(0,r.useCallback)(e=>{let t=h.current.get(e);t&&(clearInterval(t),h.current.delete(e))},[]),g=(0,r.useCallback)(e=>{if(h.current.has(e))return;let t=setInterval(async()=>{let t;try{t=await u(e)}catch(t){p.warn(`poll failed for "${e}"`,t),o.setStatus(e,null),b(e);return}if(!t||"Stopped"===t.state){o.setStatus(e,null),b(e);return}o.setStatus(e,t)},3e3);h.current.set(e,t)},[o,b]);(0,r.useEffect)(()=>{let e=h.current,t=o.subscribeAll(()=>{for(let[t]of e){let e=o.getEntry(t);e.status&&y.has(e.status)||b(t)}});return()=>{for(let[,r]of(t(),e))clearInterval(r);e.clear()}},[o,b]);let v=(0,r.useCallback)(e=>{!e||o.getEntry(e).hydrated||(o.update(e,{hydrated:!0}),(async()=>{try{let t=await u(e);o.setStatus(e,t),t&&y.has(t.state)&&g(e)}catch(t){p.warn(`ensureHydrated failed for "${e}"`,t)}})())},[o,g]),k=(0,r.useCallback)(async e=>{o.update(e.targetId,{deployLoading:!0,deployError:null});try{let t="feature"===e.targetType?await l(e.targetId):"application"===e.targetType?await d(e.targetId):await s(e.repositoryPath);if(!t.success)return void o.update(e.targetId,{deployLoading:!1,deployError:t.error??"An unexpected error occurred"});o.update(e.targetId,{deployLoading:!1,status:t.state??null,url:null,hydrated:!0,targetType:e.targetType}),g(e.targetId)}catch(r){let t=r instanceof Error?r.message:"An unexpected error occurred";o.update(e.targetId,{deployLoading:!1,deployError:t})}},[o,g]),S=(0,r.useCallback)(async e=>{if(e){o.update(e,{stopLoading:!0});try{(await i(e)).success?(b(e),o.update(e,{stopLoading:!1,status:null,url:null})):o.update(e,{stopLoading:!1})}catch(t){p.warn("stop error (non-critical)",t),o.update(e,{stopLoading:!1})}}},[o,b]),w=(0,r.useMemo)(()=>({store:o,deploy:k,stop:S,ensureHydrated:v}),[o,k,S,v]);return(0,t.jsx)(f.Provider,{value:w,children:a})}function b(){let e=(0,r.useContext)(f);if(!e)throw Error("useDeploymentStatusContext must be used within a <DeploymentStatusProvider>");return e}function g(){let e=(0,r.useContext)(f);return e||v}let v={store:new c,deploy:async()=>{},stop:async()=>{},ensureHydrated:()=>{}};e.s(["DeploymentStatusProvider",()=>h,"useDeploymentStatusContext",()=>b,"useDeploymentStatusContextOptional",()=>g],73504)},6910,e=>{"use strict";let t=(0,e.i(3645).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",()=>t],6910)},24042,e=>{"use strict";let t=(0,e.i(3645).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>t],24042)},8537,e=>{"use strict";var t=e.i(52155),r=e.i(73504);function a(){}function l(e){let{store:l,deploy:s,stop:d,ensureHydrated:i}=(0,r.useDeploymentStatusContextOptional)(),u=e?.targetId??"",n=(0,t.useCallback)(e=>u?l.subscribe(u,e):a,[l,u]),o=(0,t.useCallback)(()=>u?l.getEntry(u):l.getEntry(""),[l,u]),c=(0,t.useSyncExternalStore)(n,o,o);return(0,t.useEffect)(()=>{u&&i(u)},[u,i]),{deploy:(0,t.useCallback)(async()=>{e&&await s(e)},[s,e]),stop:(0,t.useCallback)(async()=>{u&&await d(u)},[d,u]),deployLoading:c.deployLoading,stopLoading:c.stopLoading,deployError:c.deployError,status:c.status,url:c.url}}e.s(["useDeployAction",()=>l])},49228,e=>{"use strict";let t=(0,e.i(3645).default)("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);e.s(["GitBranch",()=>t],49228)},78925,e=>{"use strict";var t=e.i(8893);let r=(0,t.createServerReference)("400b6475d2866a5a1a29ba4e4da18e7cfac25e0699",t.callServer,void 0,t.findSourceMapURL,"openFolder");e.s(["openFolder",()=>r])},12919,e=>{"use strict";let t=(0,e.i(3645).default)("file-plus",[["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"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",()=>t],12919)},91909,e=>{"use strict";let t=(0,e.i(3645).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["default",()=>t])},86076,e=>{"use strict";let t=(0,e.i(3645).default)("file-code",[["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"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",()=>t],86076)},34808,e=>{"use strict";var t=e.i(10714);e.s(["Minus",()=>t.default])},9388,e=>{"use strict";let t=(0,e.i(3645).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",()=>t],9388)},63812,e=>{e.v(t=>Promise.all(["static/chunks/222b9305593e47c2.js"].map(t=>e.l(t))).then(()=>t(58480)))}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|