tower-studio 0.2.5 → 0.2.7
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +45 -45
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
- package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +2 -3
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -3
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +2 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js +2 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +3 -4
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +75 -75
- package/.next/standalone/.next/server/app/missions/page.js +1 -1
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +45 -45
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +1 -1
- package/.next/standalone/.next/server/app/onboarding.rsc +16 -16
- package/.next/standalone/.next/server/app/onboarding.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +45 -45
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +58 -58
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +9 -9
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +102 -102
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +84 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +77 -77
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +74 -74
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +45 -45
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +84 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +88 -88
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +63 -63
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0h5yr8p.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00mjz~7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__028ucbo._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__03gi3ue._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05eviiz._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07f7~6u._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__09p152b._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b-ib~7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d~z6xs._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e44k3f._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0h.z9fm._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lioghc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mw.9lg._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ogh_qu._.js +20 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tys9pv._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wbndoc._.js +4 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12c9noi._.js +3 -0
- package/.next/standalone/.next/server/chunks/{_0u-~jqd._.js → _0_eodxe._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{src_0o_27yu._.js → src_0bkvm8c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0ba0ntr._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0q-~me1._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_ai_providers_index_ts_0.y.3vp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.ukame._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__006_qh0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01j8ix6._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02px.0y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03ebsif._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00wymqa._.js → [root-of-the-server]__04pq37d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cdz55-._.js → [root-of-the-server]__07_b6c.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08n5qbf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n8jy_r._.js → [root-of-the-server]__09kc.q_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ca_ueb._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsdplu._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-xoiaj._.js → [root-of-the-server]__0jo1r7k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l43.5g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n.cuy2._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nbj.ml._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0zjarb3._.js → [root-of-the-server]__0o8k4pc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pm2~fu._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ps55l6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ribsk4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rjue04._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tc6uh2._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ilem~v._.js → [root-of-the-server]__0u4gc4b._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0v2eslh._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wjg_.n._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wlmzzq._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wvyks.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zbmoit._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zujp5l._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~a-emb._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/_02v3fjp._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_04b71ua._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_05h.8a~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_07~0_w6._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_08w-r6e._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_l8.dg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_108e4..._.js → _0_q~7z7._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0lcigjh._.js → _0b0.-sj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0ybhyal._.js → _0bw-tx8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_13l5s-p._.js → _0c-49y3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0-t_os6._.js → _0c-jnbs._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ds6nk2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0wxd6t.._.js → _0f6u19w._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0l6vadw._.js → _0fob8fc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0i4__mf._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ihq._v._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0cie3rm._.js → _0niubv5._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_00pxhu2._.js → _0pd0.8f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0r9w-k8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0qu2yg4._.js → _0rbai5c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rbctq7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rt8hus._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_079ks~i._.js → _0y-7tle._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0_co86q._.js → _0ysygps._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_13fpu~5._.js → _0ysyq9g._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0a-rizg._.js → _0zgu282._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_07scffz._.js → _0zszi6-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0~80adm._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_095o8x6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_13jha60._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h36tj.._.js → src_lib_07rspg0._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h3ouzu._.js → src_lib_0_8frs_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~jyveg._.js → src_lib_0fjk3hr._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~rxy~0._.js → src_lib_0g-92s-._.js} +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +318 -318
- package/.next/standalone/.next/static/chunks/{14se8w2gb9pe0.js → 00.52653v5c~c.js} +1 -1
- package/.next/standalone/.next/static/chunks/00j0mdc41wa44.js +1 -0
- package/.next/standalone/.next/static/chunks/{15qi~69blu~3u.js → 02edbrlq~2uyx.js} +1 -1
- package/.next/standalone/.next/static/chunks/05-ui_o~3irq_.js +5 -0
- package/.next/standalone/.next/static/chunks/05hls.3r4bz.0.js +1 -0
- package/.next/standalone/.next/static/chunks/{00grznzz_zqq~.js → 08~e63d2q~cam.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0z0a_hlsye7mo.js → 0bw4ahlj4~l~g.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.p7x9h8h-..l.js → 0ft77ybyq903..js} +1 -1
- package/.next/standalone/.next/static/chunks/0fxm-wv..y_a_.js +5 -0
- package/.next/standalone/.next/static/chunks/0i55dediewjp5.js +1 -0
- package/.next/standalone/.next/static/chunks/{094hp8ak7su7z.js → 0l3mmc866npw4.js} +2 -2
- package/.next/standalone/.next/static/chunks/0nno5if2x1mvs.js +1 -0
- package/.next/standalone/.next/static/chunks/0q-u-hhre1uyw.js +1 -0
- package/.next/standalone/.next/static/chunks/0qazzw-pr_sv7.js +1 -0
- package/.next/standalone/.next/static/chunks/{0~p32xa2eu79e.js → 0r1mkt5qs~s6m.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0mijmksouoprl.js → 0v~pz9e87t99b.js} +1 -1
- package/.next/standalone/.next/static/chunks/{018vr5fdl426p.js → 0w3jww1m3k77x.js} +1 -1
- package/.next/standalone/.next/static/chunks/0z01g02xstbqe.js +1 -0
- package/.next/standalone/.next/static/chunks/0~27mkhc9s5k2.js +5 -0
- package/.next/standalone/.next/static/chunks/117qu902jput3.js +1 -0
- package/.next/standalone/.next/static/chunks/142w-q8.7m3kl.js +1 -0
- package/.next/standalone/package.json +2 -1
- package/bin/tower.mjs +3 -0
- package/dist/mcp-server.cjs +235 -34
- package/package.json +2 -1
- package/skills/tower/SKILL.md +381 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-eibah._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.9mj3v._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05353yb._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07h7qz8._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_a8-jq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_mbhor._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_q8qjf._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c1g5im._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jmqy_3._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ntb7n~._.js +0 -11
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0nwxhai._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o4z8qp._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0puw1af._.js +0 -20
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0py_jdb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qz9-me._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vasg9u._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.5rcav._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05kq890._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gaa~xc._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gcf4k3._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ghfuuv._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0q7ho54._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qe~p-n._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tf4zp_._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.nw7l._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__102siqc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11bequ2._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11ko84j._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12pnl8n._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/_0h0r8fk._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0j_v~sp._.js +0 -7
- package/.next/standalone/.next/server/chunks/ssr/_0xh9m4.._.js +0 -7
- package/.next/standalone/.next/static/chunks/0-wn9b_4jrs.9.js +0 -1
- package/.next/standalone/.next/static/chunks/00jlfmav1nk82.js +0 -1
- package/.next/standalone/.next/static/chunks/0a5u1~0._dmx8.js +0 -1
- package/.next/standalone/.next/static/chunks/0fe_jnfm0lqm..js +0 -5
- package/.next/standalone/.next/static/chunks/0jk6ji4j.3jod.js +0 -5
- package/.next/standalone/.next/static/chunks/0lq1_ynox5frw.js +0 -1
- package/.next/standalone/.next/static/chunks/0qy~pj-p.oh92.js +0 -1
- package/.next/standalone/.next/static/chunks/0y_vg.f~zs~zl.js +0 -1
- package/.next/standalone/.next/static/chunks/0~2v6ague-7-t.js +0 -5
- package/.next/standalone/.next/static/chunks/10ih_a9~empst.js +0 -1
- package/.next/standalone/.next/static/chunks/16.w_z6.3sf2v.js +0 -1
- package/.next/standalone/.next/static/chunks/17wptayhzwy6g.js +0 -1
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → om3SyUw4eAwMA0KLhpSGh}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → om3SyUw4eAwMA0KLhpSGh}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → om3SyUw4eAwMA0KLhpSGh}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},487486,e=>{"use strict";var t=e.i(565455),a=e.i(581263),s=e.i(294237),r=e.i(975157);let i=(0,s.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:s="default",render:l,...n}){var d;return d={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({variant:s}),e)},n),render:l,state:{slot:"badge",variant:s}},(0,a.useRenderElement)(d.defaultTagName??"div",d,d)}],487486)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,599069,e=>{"use strict";var t=e.i(289721),a=e.i(225061),s=e.i(975157),r=e.i(519455),i=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function n({className:e,...r}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,s.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...r})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:d,side:o="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(n,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,s.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[d,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(r.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...r})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,s.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,s.cn)("font-heading text-base font-medium text-foreground",e),...r})}],980376);var d=e.i(514798);let o=(0,d.createServerReference)("40c0f1f3358e69ad57657d2555cfee73e994dad43f",d.callServer,void 0,d.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,o],599069)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),s=e.i(980376),r=e.i(759684),i=e.i(487486),l=e.i(519455),n=e.i(533499),d=e.i(76848),o=e.i(599069),c=e.i(948986),u=e.i(744798),p=e.i(685149),m=e.i(606393),x=e.i(875840),h=e.i(245697),g=e.i(12659);function f({added:e,removed:a}){let{t:s}=(0,n.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:s("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var b=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:y,taskId:v}){let{t:j}=(0,n.useI18n)(),[w,k]=(0,a.useState)(null),[N,D]=(0,a.useTransition)(),[C,S]=(0,a.useState)(!1),[T,L]=(0,a.useState)([]);(0,a.useEffect)(()=>{v&&e?D(async()=>{let e=await (0,o.getTaskOverview)(v);e&&(k(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{L(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>L([])))}):k(null)},[v,e]);let O=w?p.BOARD_COLUMNS.find(e=>e.id===w.status):null,I=w?p.PRIORITY_CONFIG[w.priority]:null,R=w?.executions?.[0]??null,M=(()=>{let e=R?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),E=async e=>{if(w?.project)try{await (0,d.createTask)({...e,projectId:w.project.id}),b.toast.success(j("taskDrawer.duplicateSuccess")),S(!1),y(!1)}catch{b.toast.error(j("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(s.Sheet,{open:e,onOpenChange:y,children:[(0,t.jsxs)(s.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(s.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(s.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,t.jsx)(s.SheetDescription,{className:"sr-only",children:j("taskDrawer.title")}),w&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[O&&(0,t.jsxs)(i.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${O.color}`}),O.label]}),I&&(0,t.jsx)(i.Badge,{variant:"secondary",className:`text-xs ${I.color}`,children:I.label})]})]}),(0,t.jsx)(r.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:N&&!w?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:j("assets.loading")}):w?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:j("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||j("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:j("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(e=>(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(m.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:j("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(h.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:j("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:j("taskDrawer.fileChanges")}),M?(0,t.jsx)(f,{added:M.added,removed:M.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(g.PlayCircle,{className:"h-3.5 w-3.5"}),j("taskDrawer.lastExecution")]}),R?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:R.status}),R.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:R.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j("taskDrawer.noExecution")})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{w&&S(!0)},disabled:!w,children:[(0,t.jsx)(x.Copy,{className:"h-4 w-4"}),j("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,t.jsx)(u.CreateTaskDialog,{open:C,onOpenChange:S,onSubmit:E,labels:T,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(e=>e.label.id),baseBranch:w.baseBranch}})]})}],605005)},340873,e=>{"use strict";let t=(0,e.i(572989).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",0,t],340873)},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},487486,e=>{"use strict";var t=e.i(565455),a=e.i(581263),s=e.i(294237),r=e.i(975157);let i=(0,s.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:s="default",render:l,...n}){var d;return d={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(i({variant:s}),e)},n),render:l,state:{slot:"badge",variant:s}},(0,a.useRenderElement)(d.defaultTagName??"div",d,d)}],487486)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},259846,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],259846)},12659,e=>{"use strict";let t=(0,e.i(572989).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],12659)},875840,e=>{"use strict";let t=(0,e.i(572989).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],875840)},685149,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},980376,727402,e=>{"use strict";var t=e.i(289721),a=e.i(225061),s=e.i(975157),r=e.i(519455),i=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function n({className:e,...r}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,s.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...r})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:d,side:o="right",showCloseButton:c=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(n,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,s.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[d,c&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(r.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,s.cn)("text-sm text-muted-foreground",e),...r})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,s.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...r}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,s.cn)("font-heading text-base font-medium text-foreground",e),...r})}],980376);var d=e.i(514798);let o=(0,d.createServerReference)("40b36c864d4d23ff0d7f5c0345462b73016d89624e",d.callServer,void 0,d.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,o],727402)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),s=e.i(980376),r=e.i(759684),i=e.i(487486),l=e.i(519455),n=e.i(533499),d=e.i(436092),o=e.i(727402),c=e.i(814112),u=e.i(744798),p=e.i(685149),m=e.i(606393),x=e.i(875840),h=e.i(245697),g=e.i(12659);function f({added:e,removed:a}){let{t:s}=(0,n.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:s("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var b=e.i(360112);e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:y,taskId:v}){let{t:j}=(0,n.useI18n)(),[w,k]=(0,a.useState)(null),[N,D]=(0,a.useTransition)(),[C,S]=(0,a.useState)(!1),[T,L]=(0,a.useState)([]);(0,a.useEffect)(()=>{v&&e?D(async()=>{let e=await (0,o.getTaskOverview)(v);e&&(k(e),e.project?.workspaceId&&(0,c.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{L(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>L([])))}):k(null)},[v,e]);let O=w?p.BOARD_COLUMNS.find(e=>e.id===w.status):null,I=w?p.PRIORITY_CONFIG[w.priority]:null,R=w?.executions?.[0]??null,M=(()=>{let e=R?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),E=async e=>{if(w?.project)try{await (0,d.createTask)({...e,projectId:w.project.id}),b.toast.success(j("taskDrawer.duplicateSuccess")),S(!1),y(!1)}catch{b.toast.error(j("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(s.Sheet,{open:e,onOpenChange:y,children:[(0,t.jsxs)(s.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(s.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(s.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,t.jsx)(s.SheetDescription,{className:"sr-only",children:j("taskDrawer.title")}),w&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[O&&(0,t.jsxs)(i.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${O.color}`}),O.label]}),I&&(0,t.jsx)(i.Badge,{variant:"secondary",className:`text-xs ${I.color}`,children:I.label})]})]}),(0,t.jsx)(r.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:N&&!w?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:j("assets.loading")}):w?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:j("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||j("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:j("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(e=>(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(m.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:j("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(h.Package,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:j("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:j("taskDrawer.fileChanges")}),M?(0,t.jsx)(f,{added:M.added,removed:M.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(g.PlayCircle,{className:"h-3.5 w-3.5"}),j("taskDrawer.lastExecution")]}),R?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(i.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:R.status}),R.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:R.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j("taskDrawer.noExecution")})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{w&&S(!0)},disabled:!w,children:[(0,t.jsx)(x.Copy,{className:"h-4 w-4"}),j("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,t.jsx)(u.CreateTaskDialog,{open:C,onOpenChange:S,onSubmit:E,labels:T,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(e=>e.label.id),baseBranch:w.baseBranch}})]})}],605005)},340873,e=>{"use strict";let t=(0,e.i(572989).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",0,t],340873)},960518,e=>{"use strict";let t=(0,e.i(572989).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],960518)},707631,(e,t,a)=>{t.exports=e=>{if(!e||"string"!=typeof e||e.match(/^\s+$/))return[];let t=e.split(`
|
|
2
2
|
`);if(0===t.length)return[];let a=[],s=null,r=null,l=0,d=0,o=null,c=e=>{let[t,r]=i(e)??[];s={chunks:[],deletions:0,additions:0,from:t,to:r},a.push(s)},u=()=>{(!s||s.chunks.length)&&c()},p=e=>{if(!r)return;let[t]=r.changes.slice(-1);r.changes.push({type:t.type,[t.type]:!0,ln1:t.ln1,ln2:t.ln2,ln:t.ln,content:e})},m=[[/^diff\s/,c],[/^new file mode (\d+)$/,(e,t)=>{u(),s.new=!0,s.newMode=t[1],s.from="/dev/null"}],[/^deleted file mode (\d+)$/,(e,t)=>{u(),s.deleted=!0,s.oldMode=t[1],s.to="/dev/null"}],[/^old mode (\d+)$/,(e,t)=>{u(),s.oldMode=t[1]}],[/^new mode (\d+)$/,(e,t)=>{u(),s.newMode=t[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(e,t)=>{u(),s.index=e.split(" ").slice(1),t[1]&&(s.oldMode=s.newMode=t[1].trim())}],[/^---\s/,e=>{u(),s.from=n(e)}],[/^\+\+\+\s/,e=>{u(),s.to=n(e)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(e,t)=>{s||c(e);let[a,i,n,u]=t.slice(1);l=+a,d=+n,r={content:e,changes:[],oldStart:+a,oldLines:+(i||1),newStart:+n,newLines:+(u||1)},o={oldLines:+(i||1),newLines:+(u||1)},s.chunks.push(r)}],[/^\$/,p]],x=[[/^\$/,p],[/^-/,e=>{r&&(r.changes.push({type:"del",del:!0,ln:l++,content:e}),s.deletions++,o.oldLines--)}],[/^\+/,e=>{r&&(r.changes.push({type:"add",add:!0,ln:d++,content:e}),s.additions++,o.newLines--)}],[/^\s*/,e=>{r?.changes.push({type:"normal",normal:!0,ln1:l++,ln2:d++,content:e}),o.oldLines--,o.newLines--}]],h=e=>{o?(e=>{for(let[t,a]of x){let s=e.match(t);if(s){a(e,s);break}}0===o.oldLines&&0===o.newLines&&(o=null)})(e):(e=>{for(let[t,a]of m){let s=e.match(t);if(s){a(e,s);break}}})(e)};for(let e of t)h(e);return a};let s=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,r=/^(a|b|i|w|c|o|1|2)\//,i=e=>e?.match(s)?.map(e=>e.replace(r,"").replace(/("|')$/,"")),l=/^\\?['"]|\\?['"]$/g,n=e=>{let t=d(e,"-+").trim();return(t=c(t)).replace(l,"").replace(r,"")},d=(e,t)=>{if(e=p(e),!t&&String.prototype.trimLeft)return e.trimLeft();let a=u(t);return e.replace(RegExp(`^${a}+`),"")},o=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,c=e=>{let t=o.exec(e);return t&&(e=e.substring(0,t.index).trim()),e},u=e=>null==e?"\\s":e instanceof RegExp?e.source:`[${p(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,p=e=>`${e??""}`},196199,e=>{"use strict";var t=e.i(707631);function a(e){return e.replace(/\r\n/g,"\n")}e.s(["normalizeLF",0,a,"parseUnifiedDiff",0,function(e){return(0,t.default)(a(e))}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,783426,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),r=e.i(340966),l=e.i(572989);let n=(0,l.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var i=e.i(486077),o=e.i(533499);function c({totalTasks:e,runningTasks:s}){let{t:a}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 px-6 py-4",children:[(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-sky-500/10 p-2 ring-1 ring-sky-500/20",children:(0,t.jsx)(r.ClipboardList,{className:"h-4 w-4 text-sky-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.overview")}),(0,t.jsx)("p",{className:"text-2xl font-bold font-mono tracking-tight text-foreground",children:e})]})]})}),(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-primary/10 p-2 ring-1 ring-primary/20",children:(0,t.jsx)(n,{className:"h-4 w-4 text-primary"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.running")}),(0,t.jsx)("p",{className:"text-2xl font-bold font-mono tracking-tight text-foreground",children:s})]})]})}),(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-500/10 p-2 ring-1 ring-emerald-500/20",children:(0,t.jsx)(i.Lightbulb,{className:"h-4 w-4 text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:a("board.tip")}),(0,t.jsx)("p",{className:"text-xs font-medium text-foreground/80",children:a("board.tipText")})]})]})})]})}var d=e.i(210702),x=e.i(232545),m=e.i(738690),u=e.i(226145),h=e.i(519455),p=e.i(793479),f=e.i(918385);function g({searchQuery:e,onSearchChange:s,versions:a=[],versionFilter:r="all",onVersionFilterChange:l,versionsHref:n,onCreateTask:i}){let c,{t:j}=(0,o.useI18n)(),b="all"===r?j("board.allVersions"):"backlog"===r?j("board.backlogFilter"):(c=a.find(e=>e.id===r))?`${c.number} ${c.name}`:j("board.allVersions");return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-6 py-2",children:[l&&(0,t.jsxs)(f.Select,{value:r,onValueChange:e=>l(e||"all"),children:[(0,t.jsxs)(f.SelectTrigger,{className:"h-8 w-44 shrink-0 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.GitBranch,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:b})]}),(0,t.jsxs)(f.SelectContent,{children:[(0,t.jsx)(f.SelectItem,{value:"all",children:j("board.allVersions")}),(0,t.jsx)(f.SelectItem,{value:"backlog",children:j("board.backlogFilter")}),a.map(e=>(0,t.jsxs)(f.SelectItem,{value:e.id,children:[(0,t.jsx)("span",{className:"font-mono",children:e.number})," ",e.name]},e.id))]})]}),(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(m.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(p.Input,{type:"text",value:e,onChange:e=>s(e.target.value),placeholder:j("board.searchPlaceholder"),className:"pl-8 pr-3 text-xs"})]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[n&&(0,t.jsx)(d.default,{href:n,children:(0,t.jsxs)(h.Button,{variant:"outline",className:"h-8 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.GitBranch,{className:"h-3.5 w-3.5"}),j("version.timeline")]})}),(0,t.jsxs)(h.Button,{"data-tour":"create-task",variant:"outline",className:"gap-1.5 border-border text-xs text-muted-foreground hover:border-primary/30 hover:text-primary",onClick:i,children:[(0,t.jsx)(x.Plus,{className:"h-3.5 w-3.5"}),j("board.newTask")]})]})]})}var j=e.i(585012),b=e.i(597746),N=e.i(685149);function v({x:e,y:r,taskId:l,currentStatus:n,hasExecutions:i,workspaceId:c,onClose:d,onStatusChange:x,onLaunch:m}){let{t:u}=(0,o.useI18n)(),h=(0,a.useRouter)(),p=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&d()},t=e=>{"Escape"===e.key&&d()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[d]);let f="flex items-center px-3 py-1.5 text-xs cursor-pointer hover:bg-accent rounded-sm w-full text-left",g=(0,t.jsxs)("div",{ref:p,style:{position:"fixed",top:r,left:e,zIndex:9999},className:"bg-popover border border-border rounded-md shadow-md py-1 min-w-[180px]",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground uppercase tracking-wider",children:u("board.contextMenu.changeStatus")}),N.BOARD_COLUMNS.map(e=>(0,t.jsxs)("button",{type:"button",className:f,onClick:()=>{x(l,e.id),d()},children:[n===e.id?(0,t.jsx)(b.Check,{className:"h-3 w-3 mr-2 flex-shrink-0"}):(0,t.jsx)("span",{className:"w-5 flex-shrink-0"}),e.label]},e.id)),(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:`${f} ${i?"opacity-50 cursor-not-allowed":""}`,disabled:i,onClick:()=>{i||(m(l),d())},children:u("board.contextMenu.launch")}),"DONE"!==n&&"CANCELLED"!==n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:f,onClick:()=>{h.push(`/workspaces/${c}/tasks/${l}`),d()},children:u("board.contextMenu.goToDetail")})]})]});return"u"<typeof document?null:(0,j.createPortal)(g,document.body)}var y=e.i(720247),k=e.i(775712);let w=(0,l.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);var C=e.i(67013),S=e.i(49007),P=e.i(464249),T=e.i(998626);let D=(0,l.default)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var E=e.i(487486),I=e.i(755146);function B({task:e,onClick:s,onEdit:a,onDelete:r,onTogglePin:l,onContextMenu:n}){let{t:i}=(0,o.useI18n)(),{attributes:c,listeners:d,setNodeRef:x,transform:m,transition:u,isDragging:p}=(0,k.useSortable)({id:e.id,data:{type:"task",task:e}}),f={transform:C.CSS.Transform.toString(m),transition:u,opacity:p?.4:1},g=N.PRIORITY_CONFIG[e.priority];return(0,t.jsxs)("div",{ref:x,style:f,...c,...d,className:"group cursor-grab rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50 active:cursor-grabbing",onClick:s,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),n?.(e,t.clientX,t.clientY)},"data-testid":"task-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",className:`transition-all ${e.pinned?"text-primary opacity-100":"text-muted-foreground opacity-0 group-hover:opacity-100"}`,onClick:t=>{t.stopPropagation(),l?.(e.id)},"aria-label":i(e.pinned?"board.unpin":"board.pin"),children:(0,t.jsx)(D,{className:`h-3.5 w-3.5 ${e.pinned?"-rotate-45":""}`})}),(0,t.jsxs)(I.DropdownMenu,{children:[(0,t.jsx)(I.DropdownMenuTrigger,{render:(0,t.jsx)("button",{className:"rounded-md p-0.5 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:e=>e.stopPropagation()}),children:(0,t.jsx)(S.MoreHorizontal,{className:"h-4 w-4"})}),(0,t.jsxs)(I.DropdownMenuContent,{align:"end",children:[(0,t.jsxs)(I.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),a?.(e)},children:[(0,t.jsx)(P.Pencil,{className:"mr-2 h-3.5 w-3.5"}),i("common.edit")]}),(0,t.jsxs)(I.DropdownMenuItem,{className:"text-rose-400",onClick:t=>{t.stopPropagation(),r?.(e.id)},children:[(0,t.jsx)(T.Trash2,{className:"mr-2 h-3.5 w-3.5"}),i("common.delete")]})]})]})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-3 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsx)("div",{className:"mt-2.5",children:(0,t.jsx)(E.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${g.color}`,children:g.label})}),e.labels&&e.labels.length>0&&(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.labels.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id))})]})}var R=e.i(776639),L=e.i(759684);function $({open:e,onOpenChange:s,columnLabel:a,columnColor:r,tasks:l,onTaskClick:n}){let{t:i}=(0,o.useI18n)();return(0,t.jsx)(R.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-6xl max-h-[80vh]",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsxs)(R.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${r}`}),(0,t.jsx)("span",{children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs font-mono font-medium text-muted-foreground",children:l.length})]})}),(0,t.jsx)(L.ScrollArea,{className:"max-h-[680px]",children:(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3 pr-3",children:[l.map(e=>{let a=N.PRIORITY_CONFIG[e.priority];return(0,t.jsxs)("div",{className:"cursor-pointer rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50",onClick:()=>{n?.(e),s(!1)},children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground line-clamp-2",children:e.title}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 flex-wrap",children:[(0,t.jsx)(E.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${a.color}`,children:a.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id))]})]},e.id)}),0===l.length&&(0,t.jsx)("div",{className:"col-span-4 py-8 text-center text-sm text-muted-foreground",children:i("board.noTasks")})]})})]})})}function O({id:e,label:a,color:r,tasks:l,onTaskClick:n,onEditTask:i,onAddTask:c,onDeleteTask:d,onTogglePin:m,onContextMenu:u}){let{setNodeRef:p,isOver:f}=(0,y.useDroppable)({id:e}),[g,j]=(0,s.useState)(!1),{t:b}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:`flex w-0 min-w-[220px] flex-1 flex-col min-h-0 border-r border-border/50 last:border-r-0 transition-colors ${f?"bg-primary/[0.06]":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border/30",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2 w-2 rounded-full ${r}`}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-wide text-secondary-foreground",children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-mono font-medium text-muted-foreground",children:l.length})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>j(!0),className:"text-muted-foreground","aria-label":b("board.viewAll"),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:c,className:"text-muted-foreground","aria-label":"add",children:(0,t.jsx)(x.Plus,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)($,{open:g,onOpenChange:j,columnLabel:a,columnColor:r,tasks:l,onTaskClick:n}),(0,t.jsx)(L.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)("div",{ref:p,className:"flex flex-col gap-2 p-2",children:(0,t.jsx)(k.SortableContext,{items:l.map(e=>e.id),strategy:k.verticalListSortingStrategy,children:l.map(e=>(0,t.jsx)(B,{task:e,onClick:()=>n?.(e),onEdit:i,onDelete:d,onTogglePin:m,onContextMenu:u},e.id))})})})]})}function A({initialTasks:e,onTaskMove:a,onTaskClick:r,onEditTask:l,onAddTask:n,onDeleteTask:i,onTogglePin:o,onContextMenuStatusChange:c,onContextMenuLaunch:d,workspaceId:x}){let[m,u]=(0,s.useState)(e),[h,p]=(0,s.useState)(null),[f,g]=(0,s.useState)(null);(0,s.useEffect)(()=>{u(e)},[e]);let j=(0,y.useSensors)((0,y.useSensor)(y.PointerSensor,{activationConstraint:{distance:8}})),b=(0,s.useCallback)((e,t,s)=>{g({task:e,x:t,y:s})},[]),k=(0,s.useCallback)(e=>{let t=m.find(t=>t.id===e.active.id);t&&p(t)},[m]),w=(0,s.useCallback)(e=>{let t,{active:s,over:r}=e;if(p(null),!r)return;let l=s.id,n=r.id;if(N.BOARD_COLUMNS.some(e=>e.id===n))t=n;else{let e=m.find(e=>e.id===n);t=e?.status}t&&(u(e=>e.map(e=>e.id===l?{...e,status:t}:e)),a?.(l,t))},[m,a]);return(0,t.jsxs)(y.DndContext,{id:"kanban-board",sensors:j,collisionDetection:y.closestCorners,onDragStart:k,onDragEnd:w,children:[(0,t.jsx)("div",{className:"mx-2 flex h-full overflow-x-auto rounded-xl border border-border bg-card/50",children:N.BOARD_COLUMNS.map(e=>(0,t.jsx)(O,{id:e.id,label:e.label,color:e.color,tasks:m.filter(t=>t.status===e.id),onTaskClick:r,onEditTask:l,onAddTask:()=>n?.(e.id),onDeleteTask:i,onTogglePin:o,onContextMenu:b},e.id))}),(0,t.jsx)(y.DragOverlay,{children:h?(0,t.jsx)("div",{className:"rotate-3 scale-105",children:(0,t.jsx)(B,{task:h})}):null}),f&&(0,t.jsx)(v,{x:f.x,y:f.y,taskId:f.task.id,currentStatus:f.task.status,hasExecutions:(f.task._count?.executions??0)>0,workspaceId:x??"",onClose:()=>g(null),onStatusChange:(e,t)=>{c?.(e,t),g(null)},onLaunch:e=>{d?.(e),g(null)}})]})}var F=e.i(744798),M=e.i(232280),z=e.i(368490),U=e.i(242941),G=e.i(645378),_=e.i(453889);let V=(0,l.default)("git-commit-vertical",[["path",{d:"M12 3v6",key:"1holv5"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 15v6",key:"a9ows0"}]]);var W=e.i(938499),H=e.i(400355),K=e.i(233274),J=e.i(194358),Y=e.i(624687),q=e.i(514798);let X=(0,q.createServerReference)("604cfd61cf005b488dc365cfb233fd1f0db5e21428",q.callServer,void 0,q.findSourceMapURL,"updateProject");var Q=e.i(76958);let Z=(0,q.createServerReference)("40bad5a0ca1f19f6a0ecd2d5c4cc816552e9405e6e",q.callServer,void 0,q.findSourceMapURL,"deleteProject"),ee=(0,q.createServerReference)("40e673386ce29ba0afa3cedc513d447e16bb423111",q.callServer,void 0,q.findSourceMapURL,"getRecentLocalProjects"),et=(0,q.createServerReference)("405f319d9375c810e45a6ced3d136b541eed06d322",q.callServer,void 0,q.findSourceMapURL,"getOrCreateTowerTaskId");var es=e.i(401525),ea=e.i(360112),er=e.i(224277),el=e.i(905455),en=e.i(711554),ei=e.i(875840);function eo({commits:e}){let{t:a}=(0,o.useI18n)(),[r,l]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>l(!r),className:"flex w-full items-center justify-between py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:a("git.commitLog")}),r?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 text-muted-foreground"})]}),r&&(0,t.jsx)("div",{className:"mt-1.5 space-y-0.5 max-h-64 overflow-y-auto",children:e.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(V,{className:"h-3 w-3 shrink-0 text-muted-foreground mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-foreground line-clamp-1",children:e.message}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(e.shortHash),ea.toast.success(`Copied ${e.shortHash}`)},className:"flex items-center gap-0.5 font-mono text-[10px] text-primary/70 hover:text-primary transition-colors",children:[e.shortHash,(0,t.jsx)(ei.Copy,{className:"h-2.5 w-2.5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.author}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m`;let s=Math.floor(t/60);if(s<24)return`${s}h`;let a=Math.floor(s/24);return a<30?`${a}d`:`${Math.floor(a/30)}mo`}(e.date)})]})]})]},e.hash))})]})}var ec=e.i(487278),ed=e.i(375306),ex=e.i(244354);function em({localPath:e,stashes:a,hasChanges:r,onRefresh:l}){let{t:n}=(0,o.useI18n)(),[i,c]=(0,s.useState)(!1),[d,x]=(0,s.useState)(!1),[m,u]=(0,s.useState)(""),[f,g]=(0,s.useState)(null),j=async()=>{x(!0);try{await (0,ex.gitAction)(e,"stash-save",{message:m}),u(""),ea.toast.success(n("git.stashSaved")),await l()}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}finally{x(!1)}},b=async t=>{g(t);try{await (0,ex.gitAction)(e,"stash-pop",{index:t}),ea.toast.success(n("git.stashApplied")),await l()}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}finally{g(null)}},N=async t=>{g(t);try{await (0,ex.gitAction)(e,"stash-drop",{index:t}),ea.toast.success(n("git.stashDropped")),await l()}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}finally{g(null)}};return r||0!==a.length?(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{onClick:()=>c(!i),className:"flex w-full items-center justify-between py-1",children:[(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[n("git.stash")," ",a.length>0&&`(${a.length})`]}),i?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 text-muted-foreground"})]}),i&&(0,t.jsxs)("div",{className:"mt-1.5 space-y-2",children:[r&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(p.Input,{value:m,onChange:e=>u(e.target.value),placeholder:n("git.stashMsgPlaceholder"),className:"h-7 text-xs flex-1",onKeyDown:e=>"Enter"===e.key&&j()}),(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:j,disabled:d,className:"shrink-0",children:d?(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(ec.Archive,{className:"h-3 w-3"})})]}),a.length>0&&(0,t.jsx)("div",{className:"space-y-0.5",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(ec.Archive,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 min-w-0 truncate text-xs text-foreground",children:e.message||`stash@{${e.index}}`}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>b(e.index),disabled:f===e.index,className:"text-muted-foreground","aria-label":n("git.stashApply"),children:f===e.index?(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(ed.ArrowUpFromLine,{className:"h-3 w-3"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(e.index),disabled:f===e.index,className:"text-rose-400","aria-label":n("git.stashDrop"),children:(0,t.jsx)(T.Trash2,{className:"h-3 w-3"})})]})]},e.index))})]})]}):null}function eu({project:e,workspaceId:r}){let{t:l,locale:n}=(0,o.useI18n)(),i=(0,a.useRouter)(),[c,d]=(0,s.useState)(!0),[x,m]=(0,s.useState)(!0),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[N,v]=(0,s.useState)(""),[y,k]=(0,s.useState)(!1),[w,C]=(0,s.useState)(!1),[S,D]=(0,s.useState)(!1),[E,I]=(0,s.useState)(e.name),[B,L]=(0,s.useState)(e.alias??""),[$,O]=(0,s.useState)(e.description??""),[A,F]=(0,s.useState)(e.localPath??""),[J,q]=(0,s.useState)(e.projectType??"FRONTEND"),[ei,ec]=(0,s.useState)([]);(0,s.useEffect)(()=>{ee(100).then(ec)},[]);let[ed,ex]=(0,s.useState)(!1),[ep,ef]=(0,s.useState)(""),[eg,ej]=(0,s.useState)(""),[eb,eN]=(0,s.useState)(""),[ev,ey]=(0,s.useState)(""),[ek,ew]=(0,s.useState)("FRONTEND"),[eC,eS]=(0,s.useState)(!1),[eP,eT]=(0,s.useState)(!1),[eD,eE]=(0,s.useState)(null),[eI,eB]=(0,s.useState)(!1),[eR,eL]=(0,s.useState)(!1),[e$,eO]=(0,s.useState)(!1),eA=e=>{ea.toast.info(e)},eF=(0,s.useCallback)(async()=>{if(e.localPath){eB(!0);try{let t=await fetch(`/api/git?path=${encodeURIComponent(e.localPath)}`);t.ok&&eE(await t.json())}catch{}finally{eB(!1)}}},[e.localPath]);(0,s.useEffect)(()=>{eF()},[eF]);let eM=async()=>{if(e.localPath){eL(!0);try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"init",path:e.localPath})})).ok?(eA(l("git.initSuccess")),await eF()):eA(l("git.initFailed"))}catch{eA(l("git.initFailed"))}finally{eL(!1)}}},ez=async t=>{if(e.localPath)try{let s=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"checkout",path:e.localPath,branch:t})});if(s.ok)eA(`${l("git.switchSuccess")} ${t}`),await eF();else{let e=await s.json();eA(`${l("git.switchFailed")}: ${e.error}`)}}catch{eA(l("git.switchFailed"))}},eU=(e,t)=>{i.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1}),i.refresh()},eG=async()=>{if(eg.trim()){eS(!0);try{let e=await (0,Q.createProject)({name:eg.trim(),alias:eb.trim()||void 0,description:ev.trim()||void 0,localPath:ep,projectType:ek,workspaceId:r});ex(!1),eU(r,e.id)}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}finally{eS(!1)}}},e_=async()=>{if(A&&!eP){eT(!0);try{let e=await (0,es.analyzeProjectDirectory)(A.trim(),n);O(e)}catch{ea.toast.error(l("project.analyzeError"))}finally{eT(!1)}}},eV=async()=>{try{await X(e.id,{name:E.trim(),alias:B.trim()||void 0,description:$.trim()||void 0,localPath:A.trim()||void 0,projectType:J}),i.refresh(),g(!1)}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("aside",{className:"relative w-72 flex-shrink-0 overflow-y-auto border-l border-border bg-sidebar",children:[(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e.name}),e.alias&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{I(e.name),L(e.alias??""),O(e.description??""),F(e.localPath??""),g(!0)},className:"text-muted-foreground",children:(0,t.jsx)(P.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{v(""),b(!0)},className:"text-muted-foreground hover:text-rose-400",children:(0,t.jsx)(T.Trash2,{className:"h-3.5 w-3.5"})})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-sm text-secondary-foreground leading-relaxed line-clamp-4",children:e.description}),(0,t.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,t.jsx)("span",{className:`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-medium ${"GIT"===e.type?"bg-sky-500/15 text-sky-300 ring-1 ring-sky-500/20":"bg-muted text-muted-foreground ring-1 ring-border"}`,children:"GIT"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.GitBranch,{className:"h-3 w-3"}),l("sidebar.right.gitType")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(G.FileText,{className:"h-3 w-3"}),l("sidebar.right.normalType")]})})}),e.localPath&&(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-md bg-muted/50 px-2.5 py-2 text-xs",children:[(0,t.jsx)(_.FolderOpen,{className:"mt-0.5 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"break-all font-mono text-secondary-foreground",children:e.localPath})]}),e.gitUrl&&(0,t.jsxs)("div",{className:"mt-2 flex items-start gap-2 rounded-md bg-muted/50 px-2.5 py-2 text-xs",children:[(0,t.jsx)(U.Globe,{className:"mt-0.5 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"break-all text-secondary-foreground",children:e.gitUrl})]}),e.localPath&&(0,t.jsxs)(h.Button,{variant:"outline",className:"mt-3 w-full h-8 gap-1.5 text-xs",disabled:w,onClick:async()=>{C(!0);try{let t=await et(e.id);i.push(`/workspaces/${r}/tasks/${t}`)}catch{ea.toast.error(l("git.openStudioFailed"))}finally{C(!1)}},children:[w?(0,t.jsx)(H.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(_.FolderOpen,{className:"h-3.5 w-3.5"}),l("git.openStudio")]})]}),(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)(h.Button,{variant:"ghost",onClick:()=>d(!c),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("git.section")}),c?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),c&&(0,t.jsx)("div",{className:"mt-3",children:e.localPath?eI?(0,t.jsxs)("div",{className:"flex items-center justify-center py-4 text-muted-foreground",children:[(0,t.jsx)(H.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"ml-2 text-xs",children:l("git.loading")})]}):eD&&!eD.isGit?(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(W.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:l("git.notInitialized")})]}),(0,t.jsxs)(h.Button,{className:"mt-3 h-7 w-full gap-1.5 bg-primary/10 text-xs text-primary ring-1 ring-primary/20 hover:bg-primary/15",onClick:eM,disabled:eR,children:[eR?(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(V,{className:"h-3 w-3"}),l("git.initRepo")]})]}):eD?.isGit?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(eh,{localBranches:eD.branches??[],remoteBranches:(eD.remoteBranches??[]).filter(e=>!eD.branches?.includes(e)),currentBranch:eD.currentBranch??"",onSwitch:ez,onFetch:async()=>{e.localPath&&(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"fetch",path:e.localPath})}),await eF())},onCreateBranch:()=>eO(!0)}),(0,t.jsx)(eo,{commits:eD.commits??[]}),(0,t.jsx)(em,{localPath:e.localPath,stashes:eD.stashes??[],hasChanges:(eD.changedFiles??[]).length>0,onRefresh:eF})]}):null:(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(W.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:l("git.noLocalPath")})]})})})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)(h.Button,{variant:"ghost",onClick:()=>m(!x),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("sidebar.right.browseRepo")}),x?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),x&&(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)(h.Button,{variant:"outline",className:"w-full h-8 gap-1.5 text-xs",onClick:()=>D(!0),children:[(0,t.jsx)(_.FolderOpen,{className:"h-3.5 w-3.5"}),l("sidebar.right.browseRepo")]}),ei.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5 px-1",children:l("sidebar.right.recent")}),(0,t.jsx)("div",{className:"space-y-0.5",children:ei.map(s=>(0,t.jsxs)("button",{onClick:()=>{s.id!==e.id&&eU(s.workspaceId,s.id)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors ${s.id===e.id?"bg-primary/10 text-primary cursor-default":"hover:bg-accent cursor-pointer"}`,children:["GIT"===s.type?(0,t.jsx)(u.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}):(0,t.jsx)(_.FolderOpen,{className:"h-3 w-3 shrink-0 text-primary/70"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium text-foreground",children:s.name}),s.localPath&&(0,t.jsx)("p",{className:"truncate text-[10px] font-mono text-muted-foreground",children:s.localPath})]})]},s.id))})]})]})]}),(0,t.jsx)(R.Dialog,{open:f,onOpenChange:g,children:(0,t.jsxs)(R.DialogContent,{style:{maxWidth:"32rem"},children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{children:l("project.edit")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.name")}),(0,t.jsx)(p.Input,{value:E,onChange:e=>I(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(el.SegmentedControl,{options:[{value:"FRONTEND",label:l("project.type.frontend")},{value:"BACKEND",label:l("project.type.backend")}],value:J,onChange:q})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.alias")}),(0,t.jsx)(p.Input,{value:B,onChange:e=>L(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.description")}),(0,t.jsxs)(h.Button,{type:"button",variant:"ghost",onClick:e_,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!A||eP?"opacity-50":""}`,children:[eP?(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(K.Sparkles,{className:"h-3 w-3"}),eP?l("project.analyzing"):l("project.genDesc")]})]}),(0,t.jsx)(Y.Textarea,{value:$,onChange:e=>O(e.target.value),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.localPath")}),(0,t.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,t.jsx)(p.Input,{value:A,onChange:e=>F(e.target.value),placeholder:l("project.localPathPlaceholder"),className:"flex-1 font-mono text-xs"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>D(!0),className:"h-8 shrink-0",children:l("folder.browse")})]})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>g(!1),children:l("common.cancel")}),(0,t.jsx)(h.Button,{onClick:eV,disabled:!E.trim()||eP,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:l("common.save")})]})]})}),(0,t.jsx)(er.FolderBrowserDialog,{open:S,onOpenChange:D,onSelect:e=>{f?F(e):(e=>{let t=ei.find(t=>t.localPath===e);if(t)return eU(t.workspaceId,t.id);let s=e.split("/").filter(Boolean).pop()??"";ef(e),ej(s),eN(""),ey(""),ex(!0)})(e)}}),(0,t.jsx)(R.Dialog,{open:ed,onOpenChange:ex,children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{children:l("topbar.newProject")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:ep})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.name")}),(0,t.jsx)(p.Input,{value:eg,onChange:e=>ej(e.target.value),placeholder:l("project.namePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(el.SegmentedControl,{options:[{value:"FRONTEND",label:l("project.type.frontend")},{value:"BACKEND",label:l("project.type.backend")}],value:ek,onChange:ew})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.alias")}),(0,t.jsx)(p.Input,{value:eb,onChange:e=>eN(e.target.value),placeholder:l("project.aliasPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.description")}),(0,t.jsx)(Y.Textarea,{value:ev,onChange:e=>ey(e.target.value),placeholder:l("project.descPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>ex(!1),children:l("common.cancel")}),(0,t.jsxs)(h.Button,{onClick:eG,disabled:!eg.trim()||eC,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[eC?(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,l("common.create")]})]})]})}),eD?.isGit&&(0,t.jsx)(en.CreateBranchDialog,{open:e$,onOpenChange:eO,branches:eD.branches??[],currentBranch:eD.currentBranch??"",localPath:e.localPath,onCreated:async()=>{await eF(),eA(l("git.createSuccess"))},onError:e=>eA(`${l("git.createFailed")}: ${e}`)}),(0,t.jsx)(R.Dialog,{open:j,onOpenChange:e=>{b(e),e||v("")},children:(0,t.jsxs)(R.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(R.DialogHeader,{children:(0,t.jsx)(R.DialogTitle,{className:"text-rose-400",children:l("project.deleteTitle")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("project.deleteWarning",{name:e.name})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("project.deleteIrreversible")}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:l("project.deleteConfirmLabel")}),(0,t.jsx)(p.Input,{value:N,onChange:e=>v(e.target.value),placeholder:l("project.deleteConfirmPlaceholder"),className:"mt-1.5",autoFocus:!0})]})]}),(0,t.jsxs)(R.DialogFooter,{children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>b(!1),children:l("common.cancel")}),(0,t.jsxs)(h.Button,{variant:"destructive",disabled:N!==l("project.deleteConfirmText")||y,onClick:async()=>{k(!0);try{await Z(e.id),ea.toast.success(l("project.deleteSuccess")),i.push(`/workspaces/${r}`)}catch{ea.toast.error(l("project.deleteFailed"))}finally{k(!1),b(!1)}},children:[y&&(0,t.jsx)(H.Loader2,{className:"h-3 w-3 animate-spin mr-1"}),l("project.deleteButton")]})]})]})})]})}function eh({localBranches:e,remoteBranches:a,currentBranch:r,onSwitch:l,onFetch:n,onCreateBranch:i}){let{t:c}=(0,o.useI18n)(),[d,p]=(0,s.useState)(!1),[f,g]=(0,s.useState)(""),[j,N]=(0,s.useState)(!1),v=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(d)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){v.current&&!v.current.contains(e.target)&&p(!1)}},[d]);let y=f.toLowerCase(),k=e.filter(e=>e.toLowerCase().includes(y)),w=a.filter(e=>e.toLowerCase().includes(y)),C=k.length>0||w.length>0,S=async()=>{N(!0);try{await n()}finally{N(!1)}};return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:c("git.currentBranch")}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:S,disabled:j,className:"text-muted-foreground","aria-label":"Fetch",children:(0,t.jsx)(J.RefreshCw,{className:`h-3 w-3 ${j?"animate-spin":""}`})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:i,className:"text-muted-foreground","aria-label":c("git.createBranch"),children:(0,t.jsx)(x.Plus,{className:"h-3 w-3"})})]})]}),(0,t.jsxs)("div",{className:"relative",ref:v,children:[(0,t.jsxs)("button",{onClick:()=>{p(!d),g("")},className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(u.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:r||"—"})]}),(0,t.jsx)(M.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${d?"rotate-180":""}`})]}),d&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:f,onChange:e=>g(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsxs)("div",{className:"max-h-60 overflow-auto py-1",children:[!C&&(0,t.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"}),k.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-3 pt-1.5 pb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:c("git.localBranches")}),k.map(e=>{let s=e===r;return(0,t.jsxs)("button",{onClick:()=>{s||l(e),p(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${s?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(u.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e}),s&&(0,t.jsx)(b.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${e}`)})]}),w.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-3 pt-2.5 pb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:c("git.remoteBranches")}),w.map(e=>(0,t.jsxs)("button",{onClick:()=>{l(e),p(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,t.jsx)(U.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e})]},`remote-${e}`))]})]})]})]})]})}var ep=e.i(475958),ef=e.i(567860),eg=e.i(313029),ej=e.i(301348),eb=e.i(746798),eN=e.i(259846),ev=e.i(975157);function ey({title:e,description:s,branch:a,baseBranch:r,hasConversation:l,updatedAt:n,onBack:i}){let{t:c}=(0,o.useI18n)();return(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(K.Sparkles,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-primary",children:c("taskDetail.title")})]}),(0,t.jsxs)(h.Button,{variant:"ghost",onClick:i,className:"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground h-auto px-2 py-1",children:[(0,t.jsx)(eN.ArrowLeft,{className:"h-3.5 w-3.5"}),c("taskDetail.back")]})]}),(0,t.jsx)("h2",{className:"mt-2.5 text-lg font-bold tracking-tight text-foreground",children:e}),s&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:s}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[r?(0,t.jsxs)(E.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:[(0,t.jsx)(u.GitBranch,{className:"mr-1 h-3 w-3"}),r," · worktree"]}):a?(0,t.jsx)(E.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:c("taskDetail.directMode")}):null,l&&(0,t.jsx)(E.Badge,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-400 text-[10px] border border-emerald-500/20",children:c("taskDetail.hasConversation")}),(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[c("taskDetail.updatedAt")," ",(0,ev.formatRelativeTime)(n)]})]})]})}var ek=e.i(14842),ew=e.i(865514),eC=e.i(83434),eS=e.i(224645),eP=e.i(616301),eT=e.i(518367),eD=e.i(166682),eE=e.i(157097),eI=e.i(311348),eB=e.i(904010),eR=e.i(114142),eL=e.i(645703),e$=e.i(326883),eO=e.i(631675);let eA=(0,l.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);var eF=e.i(657153),eM=e.i(837193);let ez=(0,q.createServerReference)("40892623d563d6abb9b567b27602bfed2b3c8fcd2c",q.callServer,void 0,q.findSourceMapURL,"getTaskNotes");var eU=e.i(479829);let eG=(0,q.createServerReference)("400a553a5eee9c55e47f388a855599a509c1854cc9",q.callServer,void 0,q.findSourceMapURL,"getTaskAssets");var e_=e.i(854989),eV=e.i(720722);function eW({taskId:e,projectId:a}){let{t:r}=(0,o.useI18n)(),l=(0,s.useRef)(null),[n,i]=(0,s.useState)([]),[c,d]=(0,s.useState)([]),[m,u]=(0,s.useState)(!1),[p,f]=(0,s.useState)(""),[g,j]=(0,s.useState)(""),[b,N]=(0,s.useState)(!1);async function v(){p.trim()&&(await (0,eM.createNote)({title:p.trim(),content:g.trim(),projectId:a,taskId:e,category:"task"}),f(""),j(""),u(!1),ez(e).then(i))}async function y(e){await (0,eU.deleteNote)(e),i(t=>t.filter(t=>t.id!==e))}async function k(t){let s=t.target.files?.[0];if(s){N(!0);try{let t=new FormData;t.set("file",s),t.set("projectId",a),t.set("taskId",e),await (0,e_.uploadAsset)(t),eG(e).then(d)}finally{N(!1),l.current&&(l.current.value="")}}}async function w(e){await (0,eV.deleteAsset)(e),d(t=>t.filter(t=>t.id!==e))}return(0,s.useEffect)(()=>{ez(e).then(i),eG(e).then(d)},[e]),(0,t.jsx)(L.ScrollArea,{className:"h-full",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(G.FileText,{className:"h-3.5 w-3.5"}),r("taskPage.notes")]}),(0,t.jsxs)(h.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>u(!m),children:[m?(0,t.jsx)(eF.X,{className:"h-3 w-3"}):(0,t.jsx)(x.Plus,{className:"h-3 w-3"}),m?"":r("taskPage.addNote")]})]}),m&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:r("taskPage.noteTitle"),className:"h-8 w-full rounded-md border border-border bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary",autoFocus:!0}),(0,t.jsx)("textarea",{value:g,onChange:e=>j(e.target.value),placeholder:r("taskPage.noteContent"),rows:3,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),(0,t.jsx)(h.Button,{className:"text-xs",onClick:v,disabled:!p.trim(),children:r("taskPage.addNote")})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[0===n.length&&!m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noNotes")}),n.map(e=>(0,t.jsx)("div",{className:"group rounded-md border border-border bg-card p-3",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-3 whitespace-pre-wrap",children:e.content}),(0,t.jsx)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>y(e.id),className:"shrink-0 text-muted-foreground opacity-0 hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100",title:r("taskPage.deleteNote"),children:(0,t.jsx)(T.Trash2,{className:"h-3.5 w-3.5"})})]})},e.id))]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(eA,{className:"h-3.5 w-3.5"}),r("taskPage.attachments")]}),(0,t.jsxs)(h.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>l.current?.click(),disabled:b,children:[(0,t.jsx)(eO.Upload,{className:"h-3 w-3"}),r("taskPage.uploadFile")]}),(0,t.jsx)("input",{ref:l,type:"file",className:"hidden",onChange:k})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-1.5",children:[0===c.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noAttachments")}),c.map(e=>{var s;return(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2",children:[(0,t.jsx)(eA,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm",children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(s=e.size)?s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`:""}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:()=>w(e.id),className:"shrink-0 text-muted-foreground opacity-0 hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100",title:r("taskPage.deleteAttachment"),children:(0,t.jsx)(T.Trash2,{className:"h-3 w-3"})})]},e.id)})]})]})]})})}function eH({task:e,workspaceId:r,projectLocalPath:l,onClose:n}){let{t:i}=(0,o.useI18n)(),c=(0,a.useRouter)(),{removePortal:d}=(0,eC.useTerminalPortal)(),[x,m]=(0,s.useState)("terminal"),[u,p]=(0,s.useState)(null),[g,j]=(0,s.useState)(!1),[b,N]=(0,s.useState)(e.status);(0,s.useEffect)(()=>{N(e.status)},[e.status]);let[v,y]=(0,s.useState)(null),[k,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),[P,T]=(0,s.useState)([]);(0,s.useEffect)(()=>{y(null),w(!1),S(!1),T([]),p(null),m("terminal")},[e.id]);let[D,E]=(0,s.useState)([]),[I,B]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(0,eL.getPrompts)().then(t=>{if(e)return;E(t.map(e=>({id:e.id,name:e.name,isDefault:e.isDefault})));let s=t.find(e=>e.isDefault);s&&B(s.id)}),()=>{e=!0}},[]),(0,s.useEffect)(()=>{y(null),S(!1);let t=!1;return(0,eS.getTaskExecutions)(e.id).then(e=>{if(t)return;let s=e[0];if(s?.status==="RUNNING"){let e=s.worktreePath||l||null;e&&y(e)}T(e.filter(e=>"RUNNING"!==e.status)),S(!0)}),()=>{t=!0}},[e.id]),(0,s.useEffect)(()=>{if("changes"!==x||"TODO"===b||"CANCELLED"===b)return;let t=!1;return j(!0),fetch(`/api/tasks/${e.id}/diff`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{t||p(e?.files||e?.branchDeleted?e:null)}).catch(()=>{t||p(null)}).finally(()=>{t||j(!1)}),()=>{t=!0}},[x,b,e.id]);let R=(0,s.useCallback)(async()=>{if(!k){w(!0),d(e.id);try{let{worktreePath:t}=await (0,eP.startPtyExecution)(e.id,"",I);y(t),N("IN_PROGRESS")}catch(e){w(!1),ea.toast.error(e instanceof Error?e.message:String(e))}}},[e.id,k,I]),$=(0,s.useCallback)(t=>{w(!1),y(null),d(e.id),0===t&&N("IN_REVIEW"),(0,eS.getTaskExecutions)(e.id).then(e=>{T(e.filter(e=>"RUNNING"!==e.status))}),c.refresh()},[c,e.id]),O=(0,s.useCallback)(async()=>{await (0,eT.stopPtyExecution)(e.id),w(!1),d(e.id),y(null),N("IN_REVIEW"),(0,eS.getTaskExecutions)(e.id).then(e=>{T(e.filter(e=>"RUNNING"!==e.status))}),c.refresh()},[e.id,c]),A=(0,s.useCallback)(async t=>{w(!0),d(e.id),y(null);try{let{worktreePath:s}=await (0,eD.resumePtyExecution)(e.id,t);y(s),N("IN_PROGRESS")}catch{w(!1)}},[e.id,d]),F=(0,s.useCallback)(async()=>{w(!0),d(e.id),y(null);try{let{worktreePath:t}=await (0,eE.continueLatestPtyExecution)(e.id);y(t),N("IN_PROGRESS")}catch(e){w(!1),ea.toast.error(e instanceof Error?e.message:String(e))}},[e.id,d]),[M,z]=(0,s.useState)(!1),[U,_]=(0,s.useState)([]),V=(0,s.useCallback)(async()=>{try{let t=await (0,eB.checkWorktreeClean)(e.id);if(t.hasWorktree&&!t.clean)return void ea.toast.error(i("taskPage.uncommittedChanges",{count:String(t.files.length)}));if(t.hasWorktree&&t.clean&&!t.hasCommits)return void ea.toast.error(i("taskPage.noChangesToComplete"));if(t.hasWorktree&&t.hasCommits){_(t.commitLog),z(!0);return}await (0,eI.updateTaskStatus)(e.id,"DONE"),N("DONE"),ea.toast.success(i("taskPage.taskCompleted")),c.refresh()}catch{ea.toast.error("Failed to complete task")}},[e.id,c,i]),W=(0,s.useCallback)(()=>{N("DONE"),z(!1),ea.toast.success(i("taskPage.taskCompleted")),c.refresh()},[c,i]),K=(0,s.useCallback)(async t=>{try{let{hash:s}=await (0,eR.commitWorktreeChanges)(e.id,t);ea.toast.success(i("diff.commitSuccess",{hash:s})),c.refresh();let a=await fetch(`/api/tasks/${e.id}/diff`);if(a.ok){let e=await a.json();p(e?.files?e:null)}}catch(e){ea.toast.error(e instanceof Error?e.message:"Commit failed")}},[e.id,c,i]);return(0,t.jsxs)("div",{className:"flex h-full w-[600px] flex-shrink-0 flex-col border-l border-border bg-sidebar","data-testid":"task-detail-panel",children:[(0,t.jsx)(ey,{title:e.title,description:i("taskDetail.panelDescription"),branch:`task/${e.id}`,baseBranch:e.baseBranch,hasConversation:!1,updatedAt:e.updatedAt,onBack:n}),(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>m("terminal"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"terminal"===x?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(ef.Terminal,{className:"h-3 w-3"}),i("terminal.execute")]}),(0,t.jsx)("button",{onClick:()=>m("changes"),className:`px-3 py-1 text-xs font-medium rounded-md ${"changes"===x?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:i("taskPage.changes")}),(0,t.jsxs)("button",{onClick:()=>m("notes"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"notes"===x?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(G.FileText,{className:"h-3 w-3"}),i("taskPage.notes")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["IN_REVIEW"===b&&(0,t.jsxs)(h.Button,{size:"sm",onClick:V,className:"bg-emerald-500/15 text-emerald-400 ring-1 ring-emerald-500/20 hover:bg-emerald-500/25",children:[(0,t.jsx)(ej.CheckCircle2,{className:"h-3 w-3"}),i("taskPage.completeTask")]}),"DONE"!==b&&"CANCELLED"!==b&&(0,t.jsxs)(h.Button,{variant:"ghost",size:"sm",onClick:()=>c.push(`/workspaces/${r}/tasks/${e.id}`),className:"text-muted-foreground",children:[(0,t.jsx)(ep.ExternalLink,{className:"h-3 w-3"}),i("taskPage.viewDetails")]})]})]}),"terminal"===x?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:C?v?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center justify-between border-b border-neutral-800 px-3 py-2 bg-[#0f1419]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"}),i("execution.running")]}),(0,t.jsxs)(eb.Tooltip,{children:[(0,t.jsxs)(eb.TooltipTrigger,{onClick:O,className:"flex items-center gap-1.5 rounded-md bg-red-500/15 px-3 py-1 text-xs font-medium text-red-400 hover:bg-red-500/25 transition-colors",children:[(0,t.jsx)(eg.Square,{className:"h-3 w-3"}),i("terminal.stopExecution")]}),(0,t.jsx)(eb.TooltipContent,{side:"bottom",children:i("terminal.stopHint")})]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)(eC.TerminalOutlet,{taskId:e.id,worktreePath:v,onSessionEnd:$})})]}):"DONE"===b||"CANCELLED"===b?(0,t.jsx)("div",{className:"flex h-full flex-col overflow-hidden",children:(0,t.jsx)(L.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(e$.ExecutionTimeline,{executions:P})})}):(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center gap-2 border-b border-border px-4 py-3",children:[D.length>0&&(0,t.jsxs)(f.Select,{defaultValue:I??"none",onValueChange:e=>B("none"===e?null:e),children:[(0,t.jsx)(f.SelectTrigger,{size:"sm",className:"min-w-[120px]",children:(0,t.jsx)("span",{className:"text-left truncate",children:I?D.find(e=>e.id===I)?.name??i("terminal.noPrompt"):i("terminal.noPrompt")})}),(0,t.jsxs)(f.SelectContent,{className:"min-w-[200px]",children:[(0,t.jsx)(f.SelectItem,{value:"none",children:i("terminal.noPrompt")}),D.map(e=>(0,t.jsxs)(f.SelectItem,{value:e.id,children:[e.name,e.isDefault?" ★":""]},e.id))]})]},`prompt-${D.length}`),(0,t.jsxs)(h.Button,{onClick:R,disabled:k,size:"sm",className:"gap-2 px-4",children:[k?(0,t.jsx)(H.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(ef.Terminal,{className:"h-3.5 w-3.5"}),k?i("terminal.executing"):i("terminal.launch")]})]}),(0,t.jsx)(L.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(e$.ExecutionTimeline,{executions:P,onResume:A,onContinueLatest:F})})]}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 bg-[#0f1419]",children:[(0,t.jsx)(H.Loader2,{className:"size-5 animate-spin text-neutral-500"}),(0,t.jsx)("span",{className:"text-xs text-neutral-500",children:i("execution.loading")})]})}):"changes"===x?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:g?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.loadingDiff")})}):u?.branchDeleted?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.branchDeleted")})}):u?(0,t.jsx)(ek.TaskDiffView,{taskId:e.id,files:u.files,totalAdded:u.totalAdded,totalRemoved:u.totalRemoved,hasConflicts:u.hasConflicts,conflictFiles:u.conflictFiles,onCommit:K,hasUncommitted:u.hasUncommitted}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noChanges")})})}):"notes"===x?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,t.jsx)(eW,{taskId:e.id,projectId:e.projectId})}):null,(0,t.jsx)(ew.TaskMergeConfirmDialog,{open:M,onOpenChange:z,taskId:e.id,taskTitle:e.title,baseBranch:e.baseBranch??"main",fileCount:u?.files?.length??0,commitCount:u?.commitCount??0,commitLog:U,onMergeComplete:W})]})}var eK=e.i(436092),eJ=e.i(307144);let eY=(0,q.createServerReference)("40b864e02d048dabde7fce059da3bc8340153ec409",q.callServer,void 0,q.findSourceMapURL,"deleteTask"),eq=(0,q.createServerReference)("40cb62edcf28baf88be1c006416b1dc17a165a7708",q.callServer,void 0,q.findSourceMapURL,"toggleTaskPinned"),eX=(0,q.createServerReference)("40aa0b118228575abc653ff9aa04ca0f29e8547ef4",q.callServer,void 0,q.findSourceMapURL,"getVersionsForPicker");var eQ=e.i(19671);function eZ({projects:e,activeProjectId:a,onSelect:r}){let l=(0,s.useRef)(null),[n,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),d=()=>{let e=l.current;e&&(i(e.scrollLeft>0),c(e.scrollLeft<e.scrollWidth-e.clientWidth-1))};(0,s.useEffect)(()=>{d();let e=l.current;if(e){e.addEventListener("scroll",d);let t=new ResizeObserver(d);return t.observe(e),()=>{e.removeEventListener("scroll",d),t.disconnect()}}},[e]);let x=e=>{let t=l.current;t&&t.scrollBy({left:"left"===e?-150:150,behavior:"smooth"})};return(0,t.jsxs)("div",{className:"relative flex items-center",children:[n&&(0,t.jsx)("button",{onClick:()=>x("left"),className:"absolute left-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(eQ.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{ref:l,className:"flex items-center gap-1.5 overflow-x-auto scrollbar-none px-1 py-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>{let s=a===e.id;return(0,t.jsxs)("button",{onClick:()=>{s||r(e.id)},className:`shrink-0 rounded-lg border-b-2 px-4 py-2 text-sm font-medium transition-colors ${s?"border-primary bg-primary/10 text-primary ring-1 ring-primary/20 cursor-default":"border-transparent text-muted-foreground hover:bg-accent hover:text-foreground cursor-pointer"}`,children:[(0,t.jsx)("span",{children:e.name}),e.alias&&(0,t.jsx)("span",{className:"ml-1.5 text-xs text-muted-foreground font-normal",children:e.alias})]},e.id)})}),o&&(0,t.jsx)("button",{onClick:()=>x("right"),className:"absolute right-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(z.ChevronRight,{className:"h-4 w-4"})})]})}e.s(["BoardPageClient",0,function({workspaceId:e,projectId:r,project:l,projects:n,initialTasks:i,labels:o,openTaskId:d}){let x=(0,a.useRouter)(),[,m]=(0,s.useTransition)(),[u,h]=(0,s.useState)(""),[p,f]=(0,s.useState)("all"),[j,b]=(0,s.useState)(!1),[v,y]=(0,s.useState)("TODO"),[k,w]=(0,s.useState)(d??null),[C,S]=(0,s.useState)([]),P=k?i.find(e=>e.id===k)??null:null,[T,D]=(0,s.useState)(null);(0,s.useEffect)(()=>{eX(r).then(S).catch(()=>S([]))},[r]);let E=C.find(e=>e.isCurrent)?.id??null,I=(0,s.useCallback)(()=>{m(()=>{x.refresh()})},[x]);(0,s.useEffect)(()=>{if(j)return;let e=setInterval(()=>{m(()=>{x.refresh()})},5e3);return()=>clearInterval(e)},[x,j]);let B=(0,s.useCallback)(e=>{h(e)},[]),R=(0,s.useCallback)(async(e,t)=>{await (0,eI.updateTaskStatus)(e,t),I()},[I]),L=(0,s.useCallback)(async e=>{await (0,eK.createTask)({title:e.title,description:e.description,projectId:r,priority:e.priority,status:e.status,labelIds:e.labelIds,baseBranch:e.baseBranch,subPath:e.subPath,versionId:e.versionId??void 0}),I()},[r,I]),$=(0,s.useCallback)(async(e,t)=>{await (0,eJ.updateTask)(e,{...t,labelIds:t.labelIds}),D(null),I()},[I]),O=(0,s.useCallback)(async e=>{await eY(e),k===e&&w(null),I()},[I,k]),M=(0,s.useCallback)(async e=>{await eq(e),I()},[I]),z=(0,s.useCallback)(async t=>{try{await (0,eP.startPtyExecution)(t,"")}catch(e){ea.toast.error(e instanceof Error?e.message:String(e))}x.push(`/workspaces/${e}/tasks/${t}`)},[x,e]),U=(0,s.useCallback)(async(e,t)=>{await (0,eI.updateTaskStatus)(e,t),I()},[I]),G=(0,s.useCallback)(e=>{y(e),D(null),b(!0)},[]),_=(0,s.useCallback)(e=>{D(e),b(!0)},[]),V=i.filter(e=>!e.labels?.some(e=>e.label.name===N.TOWER_LABEL_NAME&&e.label.isBuiltin)),W=V.filter(e=>{if("backlog"===p){if(e.versionId)return!1}else if("all"!==p&&e.versionId!==p)return!1;if(u.trim()){let t=u.toLowerCase();if(!e.title.toLowerCase().includes(t)&&!e.description?.toLowerCase().includes(t))return!1}return!0});return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,t.jsx)("div",{className:"px-6 pt-3 pb-1",children:(0,t.jsx)(eZ,{projects:n,activeProjectId:r,onSelect:t=>x.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1})})}),(0,t.jsx)(c,{totalTasks:V.length,runningTasks:V.filter(e=>"IN_PROGRESS"===e.status).length}),(0,t.jsx)(g,{searchQuery:u,onSearchChange:B,versions:C,versionFilter:p,onVersionFilterChange:f,versionsHref:`/workspaces/${e}/projects/${r}/versions`,onCreateTask:()=>{D(null),b(!0)}}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-4",children:(0,t.jsx)(A,{initialTasks:W,onTaskMove:R,onTaskClick:e=>{w(e.id)},onEditTask:_,onAddTask:G,onDeleteTask:O,onTogglePin:M,workspaceId:e,onContextMenuStatusChange:U,onContextMenuLaunch:z})}),(0,t.jsx)(F.CreateTaskDialog,{open:j,onOpenChange:e=>{b(e),e||D(null)},onSubmit:L,onUpdate:$,defaultStatus:v,editTask:T,editTaskLabelIds:T?.labels?T.labels.map(e=>e.labelId):[],labels:o.filter(e=>!(e.name===N.TOWER_LABEL_NAME&&e.isBuiltin)),projectType:l.type,projectLocalPath:l.localPath,versions:C,defaultVersionId:E})]}),P?(0,t.jsx)(eH,{task:P,workspaceId:e,projectLocalPath:l.localPath,onClose:()=>w(null)}):(0,t.jsx)(eu,{project:l,workspaceId:e})]})}],783426)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},475958,e=>{"use strict";let t=(0,e.i(572989).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",0,t],475958)},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],181209)},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),l=e.i(821957),i=e.i(519455),n=e.i(793479),r=e.i(905455),o=e.i(746798),d=e.i(224277),c=e.i(975157);function m({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function x({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var h=e.i(400355),u=e.i(597746),p=e.i(657153),g=e.i(567860),f=e.i(301348),b=e.i(181209),j=e.i(533499);function v({adapterType:e,adapterLabel:a,provider:l,hideHeader:n,onResult:r}){let[o,d]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),{t:k}=(0,j.useI18n)();async function w(){if(!o){d(!0),y(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e,provider:l})}),s=await t.json();y(s),r?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};y(e),r?.(e)}finally{d(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[!n&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(g.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(m,{children:(0,t.jsxs)(x,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(i.Button,{onClick:w,disabled:o,variant:"outline",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),k("settings.aiTools.testing")]}):k("settings.aiTools.testConnection")})]}),N&&(0,t.jsxs)("div",{className:(0,c.cn)("rounded-lg border p-4 space-y-3",N.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N.ok?(0,t.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(b.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,c.cn)("text-sm font-medium",N.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:k(N.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:N.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(p.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,c.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var N=e.i(808677),y=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),L=e.i(15299),M=e.i(572989);let P=(0,M.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"}]]),B=(0,M.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var R=e.i(232545),$=e.i(998626),z=e.i(453889),I=e.i(475958),U=e.i(887911),H=e.i(988313),F=e.i(514798);let O=(0,F.createServerReference)("60df8249d72ac45826c0d808651a4f1b2646da9ef3",F.callServer,void 0,F.findSourceMapURL,"completeOnboarding"),E=(0,F.createServerReference)("602ecd9dd13c59e135814994afd7fa5c9fa0ffcf76",F.callServer,void 0,F.findSourceMapURL,"setOnboardingExtensions");function q({username:e,onComplete:a}){let{t:l}=(0,j.useI18n)(),n=(0,U.listExtensionMetadata)(),[r,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,x=r.size;async function u(){c(!0);let t=Array.from(r),s=[];if(t.length>0)for(let e of(await Promise.all(t.map(async e=>{try{let t=await (0,H.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await E(t,s),await O(e),c(!1),a()}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:l("onboarding.step4.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("onboarding.step4.desc")})]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>{let s=e.icon,a=r.has(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-background p-3 cursor-pointer hover:bg-accent/50 transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{var t;return t=e.id,void o(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},disabled:d,className:"mt-0.5 h-4 w-4 cursor-pointer accent-primary"}),(0,t.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(s,{className:"h-4 w-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(I.ExternalLink,{className:"h-3 w-3"}),l("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),x<m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:l("onboarding.step4.skipHint")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(i.Button,{onClick:u,disabled:d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),l("onboarding.step4.installing")]}):0===x?l("onboarding.step4.continueWithoutInstall"):l("onboarding.step4.continue")})})]})}function D({step:e}){let s=[y.User,g.Terminal,k.GitBranch,w.Package][e-1]??y.User,a=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let V={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,c,m,x=(0,a.useRouter)(),{t:h,locale:p,setLocale:f}=(0,j.useI18n)(),{theme:b,setTheme:M}=(0,l.useTheme)(),[I,U]=(0,s.useState)(!1),[H,F]=(0,s.useState)(1),[O,E]=(0,s.useState)(""),[_,A]=(0,s.useState)({}),G=Object.values(_).some(e=>e.ok),[W,X]=(0,s.useState)([]),[K,Z]=(0,s.useState)({...V}),[J,Q]=(0,s.useState)(!0),[Y,ee]=(0,s.useState)(0),[et,es]=(0,s.useState)(!1),[ea,el]=(0,s.useState)(!1);(0,s.useEffect)(()=>U(!0),[]);let ei=[{value:"light",label:(0,t.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(L.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function en(){F(e=>e+1)}function er(){F(e=>Math.max(1,e-1))}let eo=[{icon:y.User,label:h("onboarding.step1.title")},{icon:g.Terminal,label:h("onboarding.step2.title")},{icon:k.GitBranch,label:h("onboarding.step3.title")},{icon:w.Package,label:h("onboarding.step4.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(D,{step:H})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eo.map((e,s)=>{let a=s+1,l=a===H,i=a<H,n=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${i?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":i?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[i?(0,t.jsx)(u.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:h("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:O,onChange:e=>E(e.target.value),placeholder:h("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.language")})]}),(0,t.jsx)(r.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:p,onChange:e=>f(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.theme")})]}),I?(0,t.jsx)(r.SegmentedControl,{options:ei.map(e=>({value:e.value,label:e.label})),value:b??"system",onChange:e=>M(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(i.Button,{onClick:en,disabled:0===O.trim().length,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step2.desc")})]}),(0,t.jsx)(v,{adapterType:"claude_code",adapterLabel:"Claude CLI",provider:"claude",onResult:e=>A(t=>({...t,claude:e}))}),(0,t.jsx)(v,{adapterType:"codex_cli",adapterLabel:"Codex CLI",provider:"codex",hideHeader:!0,onResult:e=>A(t=>({...t,codex:e}))}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:en,disabled:!G,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===H&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:h("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void X(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),J?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.hostLabel")}),(0,t.jsx)(n.Input,{value:K.host,onChange:e=>Z(t=>({...t,host:e.target.value})),placeholder:h("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.ownerLabel")}),(0,t.jsx)(n.Input,{value:K.ownerMatch,onChange:e=>Z(t=>({...t,ownerMatch:e.target.value})),placeholder:h("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:h("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{value:K.localPathTemplate,onChange:e=>Z(t=>({...t,localPathTemplate:e.target.value})),placeholder:h("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:et?"default":"outline",size:"sm",type:"button",onClick:()=>{es(e=>(e||ee(2),!e))},className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(o.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:h("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:h("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>el(!0),children:(0,t.jsx)(z.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(o.TooltipContent,{children:h("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:h(et?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),K.localPathTemplate&&(e=K.localPathTemplate.trim().replace(/\/+$/,""),c=et?`${e}/{path}`:e,m=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:m.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>ee(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Y===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:m[Y].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],n=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",i).replace("{repo}",n).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${n}`}(c,m[Y].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(i.Button,{variant:"ghost",onClick:()=>Q(!1),children:h("settings.config.git.cancel")}),(0,t.jsxs)(i.Button,{onClick:function(){if(!K.host.trim()||!K.localPathTemplate.trim())return;let e=K.localPathTemplate.trim().replace(/\/+$/,""),t=et?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:K.host.trim(),ownerMatch:K.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};X(e=>[...e,s]),Z({...V}),es(!1),Q(!1)},disabled:!K.host.trim()||!K.localPathTemplate.trim(),children:[(0,t.jsx)(u.Check,{className:"h-4 w-4 mr-1"}),h("settings.config.git.save")]})]})]}):(0,t.jsxs)(i.Button,{variant:"outline",onClick:()=>{Z({...V}),Q(!0)},children:[(0,t.jsx)(R.Plus,{className:"h-4 w-4 mr-1"}),h("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:async()=>{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),F(e=>e+1)},className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===H&&(0,t.jsx)(q,{username:O,onComplete:()=>x.replace("/workspaces")})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:h("onboarding.stepIndicator").replace("{current}",String(H)).replace("{total}",String(4))})]})}),(0,t.jsx)(d.FolderBrowserDialog,{open:ea,onOpenChange:el,onSelect:e=>{Z(t=>({...t,localPathTemplate:e})),el(!1)}})]})}],566606)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},245697,e=>{"use strict";let t=(0,e.i(572989).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],245697)},19671,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],19671)},475958,e=>{"use strict";let t=(0,e.i(572989).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",0,t],475958)},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let s=(0,e.i(572989).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],181209)},567860,e=>{"use strict";let t=(0,e.i(572989).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],567860)},673984,e=>{"use strict";let t=(0,e.i(572989).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],673984)},566606,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),l=e.i(821957),i=e.i(519455),n=e.i(793479),r=e.i(905455),o=e.i(746798),d=e.i(224277),c=e.i(975157);function m({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,c.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function x({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var h=e.i(400355),u=e.i(597746),p=e.i(657153),g=e.i(567860),f=e.i(301348),b=e.i(181209),j=e.i(533499);function v({adapterType:e,adapterLabel:a,provider:l,hideHeader:n,onResult:r}){let[o,d]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),{t:k}=(0,j.useI18n)();async function w(){if(!o){d(!0),y(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e,provider:l})}),s=await t.json();y(s),r?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};y(e),r?.(e)}finally{d(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[!n&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(g.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:k("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:k("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(m,{children:(0,t.jsxs)(x,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(i.Button,{onClick:w,disabled:o,variant:"outline",children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),k("settings.aiTools.testing")]}):k("settings.aiTools.testConnection")})]}),N&&(0,t.jsxs)("div",{className:(0,c.cn)("rounded-lg border p-4 space-y-3",N.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[N.ok?(0,t.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(b.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,c.cn)("text-sm font-medium",N.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:k(N.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:N.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(p.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,c.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var N=e.i(464202),y=e.i(673984),k=e.i(226145),w=e.i(245697),C=e.i(19671),T=e.i(368490),S=e.i(387091),L=e.i(15299),M=e.i(572989);let P=(0,M.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"}]]),B=(0,M.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var R=e.i(232545),$=e.i(998626),z=e.i(453889),I=e.i(475958),U=e.i(887911),H=e.i(107378),F=e.i(514798);let O=(0,F.createServerReference)("6090b9072de227a79fc49dc75310ab3287833a57ad",F.callServer,void 0,F.findSourceMapURL,"completeOnboarding"),E=(0,F.createServerReference)("60cca945638d621516131c1789cc32678882a18731",F.callServer,void 0,F.findSourceMapURL,"setOnboardingExtensions");function q({username:e,onComplete:a}){let{t:l}=(0,j.useI18n)(),n=(0,U.listExtensionMetadata)(),[r,o]=(0,s.useState)(()=>new Set(n.map(e=>e.id))),[d,c]=(0,s.useState)(!1),m=n.length,x=r.size;async function u(){c(!0);let t=Array.from(r),s=[];if(t.length>0)for(let e of(await Promise.all(t.map(async e=>{try{let t=await (0,H.installExtension)(e);return{id:e,success:t.success}}catch{return{id:e,success:!1}}}))))e.success&&s.push(e.id);await E(t,s),await O(e),c(!1),a()}return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:l("onboarding.step4.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:l("onboarding.step4.desc")})]}),(0,t.jsx)("div",{className:"space-y-2",children:n.map(e=>{let s=e.icon,a=r.has(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border bg-background p-3 cursor-pointer hover:bg-accent/50 transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{var t;return t=e.id,void o(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},disabled:d,className:"mt-0.5 h-4 w-4 cursor-pointer accent-primary"}),(0,t.jsxs)("div",{className:"flex flex-1 items-start gap-3 min-w-0",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:(0,t.jsx)(s,{className:"h-4 w-4 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"shrink-0 text-xs text-muted-foreground",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description}),(0,t.jsxs)("a",{href:e.homepageUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(I.ExternalLink,{className:"h-3 w-3"}),l("settings.extensions.visitHomepage")]})]})]})]},e.id)})}),x<m&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground italic",children:l("onboarding.step4.skipHint")}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(i.Button,{onClick:u,disabled:d,children:d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),l("onboarding.step4.installing")]}):0===x?l("onboarding.step4.continueWithoutInstall"):l("onboarding.step4.continue")})})]})}function D({step:e}){let s=[y.User,g.Terminal,k.GitBranch,w.Package][e-1]??y.User,a=["Profile","Connect","Configure","Extensions"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let V={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,c,m,x=(0,a.useRouter)(),{t:h,locale:p,setLocale:f}=(0,j.useI18n)(),{theme:b,setTheme:M}=(0,l.useTheme)(),[I,U]=(0,s.useState)(!1),[H,F]=(0,s.useState)(1),[O,E]=(0,s.useState)(""),[_,A]=(0,s.useState)({}),G=Object.values(_).some(e=>e.ok),[W,X]=(0,s.useState)([]),[K,Z]=(0,s.useState)({...V}),[J,Q]=(0,s.useState)(!0),[Y,ee]=(0,s.useState)(0),[et,es]=(0,s.useState)(!1),[ea,el]=(0,s.useState)(!1);(0,s.useEffect)(()=>U(!0),[]);let ei=[{value:"light",label:(0,t.jsx)(S.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(L.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function en(){F(e=>e+1)}function er(){F(e=>Math.max(1,e-1))}let eo=[{icon:y.User,label:h("onboarding.step1.title")},{icon:g.Terminal,label:h("onboarding.step2.title")},{icon:k.GitBranch,label:h("onboarding.step3.title")},{icon:w.Package,label:h("onboarding.step4.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(D,{step:H})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eo.map((e,s)=>{let a=s+1,l=a===H,i=a<H,n=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${i?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":i?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[i?(0,t.jsx)(u.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(n,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:h("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:O,onChange:e=>E(e.target.value),placeholder:h("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.language")})]}),(0,t.jsx)(r.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:p,onChange:e=>f(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(S.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:h("settings.theme")})]}),I?(0,t.jsx)(r.SegmentedControl,{options:ei.map(e=>({value:e.value,label:e.label})),value:b??"system",onChange:e=>M(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(i.Button,{onClick:en,disabled:0===O.trim().length,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===H&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step2.desc")})]}),(0,t.jsx)(v,{adapterType:"claude_code",adapterLabel:"Claude CLI",provider:"claude",onResult:e=>A(t=>({...t,claude:e}))}),(0,t.jsx)(v,{adapterType:"codex_cli",adapterLabel:"Codex CLI",provider:"codex",hideHeader:!0,onResult:e=>A(t=>({...t,codex:e}))}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:en,disabled:!G,className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===H&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:h("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:h("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:h("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void X(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),J?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.hostLabel")}),(0,t.jsx)(n.Input,{value:K.host,onChange:e=>Z(t=>({...t,host:e.target.value})),placeholder:h("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.ownerLabel")}),(0,t.jsx)(n.Input,{value:K.ownerMatch,onChange:e=>Z(t=>({...t,ownerMatch:e.target.value})),placeholder:h("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:h("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Input,{value:K.localPathTemplate,onChange:e=>Z(t=>({...t,localPathTemplate:e.target.value})),placeholder:h("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:et?"default":"outline",size:"sm",type:"button",onClick:()=>{es(e=>(e||ee(2),!e))},className:"shrink-0 font-mono",children:"{path}"})}),(0,t.jsx)(o.TooltipContent,{side:"top",className:"max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsx)("div",{className:"font-medium",children:h("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:h("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:(0,t.jsx)(i.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>el(!0),children:(0,t.jsx)(z.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(o.TooltipContent,{children:h("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:h(et?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),K.localPathTemplate&&(e=K.localPathTemplate.trim().replace(/\/+$/,""),c=et?`${e}/{path}`:e,m=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:h("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:m.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>ee(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${Y===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:m[Y].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let i=a[0],n=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",i).replace("{repo}",n).replace(/\/+$/,"");let o=e.replace("{owner}",i).replace("{repo}","").replace(/\/+$/,"");return`${o}/${n}`}(c,m[Y].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(i.Button,{variant:"ghost",onClick:()=>Q(!1),children:h("settings.config.git.cancel")}),(0,t.jsxs)(i.Button,{onClick:function(){if(!K.host.trim()||!K.localPathTemplate.trim())return;let e=K.localPathTemplate.trim().replace(/\/+$/,""),t=et?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:K.host.trim(),ownerMatch:K.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};X(e=>[...e,s]),Z({...V}),es(!1),Q(!1)},disabled:!K.host.trim()||!K.localPathTemplate.trim(),children:[(0,t.jsx)(u.Check,{className:"h-4 w-4 mr-1"}),h("settings.config.git.save")]})]})]}):(0,t.jsxs)(i.Button,{variant:"outline",onClick:()=>{Z({...V}),Q(!0)},children:[(0,t.jsx)(R.Plus,{className:"h-4 w-4 mr-1"}),h("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(i.Button,{variant:"ghost",className:"text-muted-foreground",onClick:er,children:[(0,t.jsx)(C.ChevronLeft,{className:"h-4 w-4 mr-1"}),h("onboarding.back")]}),(0,t.jsxs)(i.Button,{onClick:async()=>{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),F(e=>e+1)},className:"px-5",children:[h("onboarding.step1.next"),(0,t.jsx)(T.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),4===H&&(0,t.jsx)(q,{username:O,onComplete:()=>x.replace("/workspaces")})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:h("onboarding.stepIndicator").replace("{current}",String(H)).replace("{total}",String(4))})]})}),(0,t.jsx)(d.FolderBrowserDialog,{open:ea,onOpenChange:el,onSelect:e=>{Z(t=>({...t,localPathTemplate:e})),el(!1)}})]})}],566606)}]);
|