tower-studio 0.2.4 → 0.2.6
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 +49 -49
- 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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
- 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 -1
- 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 +1 -1
- 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.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 +1 -1
- 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.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.nft.json +1 -1
- 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 +1 -1
- 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 +83 -83
- 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 +49 -49
- 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 +49 -49
- 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 +62 -62
- 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 +104 -104
- 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 +79 -79
- 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 +78 -78
- 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 +49 -49
- 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 +96 -96
- 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_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.9mj3v._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05353yb._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05eviiz._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07h7qz8._.js → [root-of-the-server]__09h3i6m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_a8-jq._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dsv3wl._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0c1g5im._.js → [root-of-the-server]__0j~qauc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0p_ii~p._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0puw1af._.js +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ntb7n~._.js → [root-of-the-server]__0qie1gs._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w2w3x.._.js +20 -0
- package/.next/standalone/.next/server/chunks/{_0u-~jqd._.js → _0trog_r._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{src_0o_27yu._.js → src_01ztl3b._.js} +2 -2
- 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-yld.d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.5rcav._.js +1 -1
- 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]__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]__05kq890._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-xoiaj._.js → [root-of-the-server]__079.nog._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rp_09h._.js → [root-of-the-server]__0c4.z1s._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gaa~xc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gcf4k3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ghfuuv._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n8jy_r._.js → [root-of-the-server]__0k3isnk._.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]__0ty48g5._.js → [root-of-the-server]__0nwue~m._.js} +2 -2
- 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]__0q7ho54._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qe~p-n._.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]__0tf4zp_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00wymqa._.js → [root-of-the-server]__0vh-egg._.js} +2 -2
- 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]__0wvyks.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.nw7l._.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]__11bequ2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11ko84j._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12pnl8n._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cdz55-._.js → [root-of-the-server]__13k4vkg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_008xdn0._.js → _0-pqb_c._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0p8de_7._.js → _00d1y-k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0xp-.5k._.js → _03xwww2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0qu2yg4._.js → _049.box._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_04b71ua._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0w_jwhc._.js → _05-r00y._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0_obsmv._.js → _054w82_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_05h.8a~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_108e4..._.js → _086yn8o._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0c-z9co._.js → _08t2xag._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0cie3rm._.js → _0_gqtgq._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0_l8.dg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0lul2~5._.js → _0_~ftjv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0a-rizg._.js → _0ah80pn._.js} +1 -1
- 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/{_079ks~i._.js → _0ep3sg_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_13l5s-p._.js → _0f8jvpw._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0popc9v._.js → _0fri5n~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_02_8bze._.js → _0h_~oum._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_07scffz._.js → _0i2usny._.js} +1 -1
- 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/_0r9w-k8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rbctq7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0gc6xfk._.js → _0rfo51k._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rt8hus._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0no3ok_._.js → _0vqyzrr._.js} +2 -2
- 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_08n755q._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h3ouzu._.js → src_lib_0tb2yya._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~jyveg._.js → src_lib_123jf_a._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~rxy~0._.js → src_lib_12ulcxj._.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 +347 -347
- package/.next/standalone/.next/static/chunks/{06aef6liyecnz.js → 0.zipr1bga3lu.js} +1 -1
- package/.next/standalone/.next/static/chunks/037-verumdykv.js +5 -0
- package/.next/standalone/.next/static/chunks/04-7c5m91nvj1.js +1 -0
- package/.next/standalone/.next/static/chunks/06shpikm5rcmu.js +1 -0
- package/.next/standalone/.next/static/chunks/{0xt_3903v1zad.js → 07i~~ygu~oi26.js} +1 -1
- package/.next/standalone/.next/static/chunks/082cedbq4pp.-.js +1 -0
- package/.next/standalone/.next/static/chunks/089ktlh~nim1x.js +1 -0
- package/.next/standalone/.next/static/chunks/{0bswzaqeengiv.js → 0ee.~~ae-vl_q.js} +1 -1
- package/.next/standalone/.next/static/chunks/{030zalmk5.98l.js → 0fovq74l0wh7c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0uzgie3q9h20b.js → 0hxgzql5.szyz.js} +1 -1
- package/.next/standalone/.next/static/chunks/0jscst0zjd2az.js +1 -0
- package/.next/standalone/.next/static/chunks/{0t0pq7y~7s7j_.js → 0m2lubto0vt0x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ptiiywcgt9lq.js → 0mfgulw-d49o9.js} +1 -1
- package/.next/standalone/.next/static/chunks/0m~ltp.wfnbf7.js +5 -0
- package/.next/standalone/.next/static/chunks/{0siyzg11n09zl.js → 0nrbltth-7m~e.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0d.m9b-ln~cns.js → 0r7jm27~cp-vs.js} +1 -1
- package/.next/standalone/.next/static/chunks/0tk-ju9xhoh68.js +5 -0
- package/.next/standalone/.next/static/chunks/{0~zg.626i--lj.js → 0v9ahxdsn0mse.js} +1 -1
- package/.next/standalone/.next/static/chunks/0w9x-ap4dcwy..js +1 -0
- package/.next/standalone/.next/static/chunks/17cayeebhpt~w.js +2 -0
- package/.next/standalone/.next/static/chunks/186ahmq856rfj.js +1 -0
- package/.next/standalone/package.json +3 -1
- package/bin/tower.mjs +16 -0
- package/dist/mcp-server.cjs +12 -1
- package/package.json +3 -1
- package/prisma/pre-migration.sql +23 -0
- 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_q8qjf._.js +0 -20
- 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]__0sw9hqr._.js +0 -3
- package/.next/standalone/.next/static/chunks/00kag1vn1xq-h.js +0 -1
- package/.next/standalone/.next/static/chunks/06b1pibint3_6.js +0 -5
- package/.next/standalone/.next/static/chunks/07h0wys36zya1.js +0 -1
- package/.next/standalone/.next/static/chunks/08qc-i9nlpeuj.js +0 -1
- package/.next/standalone/.next/static/chunks/0cgu7kw00ijog.js +0 -1
- package/.next/standalone/.next/static/chunks/0dbuddzi1ktpc.js +0 -5
- package/.next/standalone/.next/static/chunks/0dchz9lk.idgp.js +0 -1
- package/.next/standalone/.next/static/chunks/0f6q8.wnwub-h.js +0 -2
- package/.next/standalone/.next/static/chunks/0ji8xfnts~7s6.js +0 -1
- package/.next/standalone/.next/static/chunks/0zf927936chqj.js +0 -1
- package/.next/standalone/.next/static/chunks/12vd_.lx4r~dd.js +0 -5
- /package/.next/standalone/.next/static/{1lmBVxqYafZ25FnbSpFe2 → VGoiH5uRfCRm6SKXNPZoz}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{1lmBVxqYafZ25FnbSpFe2 → VGoiH5uRfCRm6SKXNPZoz}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{1lmBVxqYafZ25FnbSpFe2 → VGoiH5uRfCRm6SKXNPZoz}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,113399,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),i=e.i(821957),n=e.i(533499),r=e.i(519455),l=e.i(793479),o=e.i(624687),c=e.i(110204),d=e.i(487486),m=e.i(699375),u=e.i(776639),x=e.i(975157),g=e.i(386343),h=e.i(572989);let p=(0,h.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var f=e.i(645378);let b=(0,h.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var j=e.i(125177),v=e.i(256753),N=e.i(245697),y=e.i(657153),w=e.i(232545);let k=(0,h.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var C=e.i(998626);let S=(0,h.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),T=(0,h.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var M=e.i(400355),B=e.i(301348),R=e.i(181209),D=e.i(453889),P=e.i(185403),L=e.i(763948),F=e.i(606576),I=e.i(514798);let U=(0,I.createServerReference)("0017c96cfbba10eb5558b07c346d467fafc74ba32f",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps");var H=e.i(237988);let E=(0,I.createServerReference)("40343ae474f890964308647b5803f9734a720deef0",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),V=(0,I.createServerReference)("60bdd2a7ccc15ab629dbd3b67bf89065dc538f8ab7",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),z=(0,I.createServerReference)("40cd9b519d904a0706b64e8fd24705179724ddd0c3",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),$=(0,I.createServerReference)("60a34b51fb2262ccba1c2c6ff9922c1590410877d1",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),K=(0,I.createServerReference)("00fb534e304521d2ab6e925523e7aeb649ff3ea889",I.callServer,void 0,I.findSourceMapURL,"getAvailableProviders");var O=e.i(746798),A=e.i(224277);let q=(0,h.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var G=e.i(631675);let X=(0,h.default)("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);var Z=e.i(922541),_=e.i(759686),J=e.i(487278),Q=e.i(360112);let W=(0,I.createServerReference)("407abd4aa36b770f2265d7cbbaa557a527750b2506",I.callServer,void 0,I.findSourceMapURL,"createBackup"),Y=(0,I.createServerReference)("000954c6f27f4d69faa86e15e63685925a4f8faeb2",I.callServer,void 0,I.findSourceMapURL,"listBackupFiles"),ee=(0,I.createServerReference)("40faf7b2db8208042b242644342fd1495a8bf48b1e",I.callServer,void 0,I.findSourceMapURL,"deleteBackupFile"),et=(0,I.createServerReference)("4048be6d65d70b2ecae5a4768692f2385626bd405f",I.callServer,void 0,I.findSourceMapURL,"restoreBackup"),es=(0,I.createServerReference)("40034b20322e2ecbaef263acd7b497e2366d115e92",I.callServer,void 0,I.findSourceMapURL,"resetSystem"),ea=(0,I.createServerReference)("007bb940710c3f7bc9a04600b0182aee115892be0d",I.callServer,void 0,I.findSourceMapURL,"getBackupDir"),ei=(0,I.createServerReference)("402438d53819ed830899efe0a550056a3593392d22",I.callServer,void 0,I.findSourceMapURL,"setBackupDir");function en(){let{t:e,locale:i}=(0,n.useI18n)(),o=(0,a.useRouter)(),[c,d]=(0,s.useState)([]),[m,x]=(0,s.useState)(""),[g,h]=(0,s.useState)(!1),[p,f]=(0,s.useState)(!0),[b,j]=(0,s.useState)(null),[v,N]=(0,s.useState)(!1),[y,w]=(0,s.useState)(""),k=(0,s.useRef)(null),[S,T]=(0,s.useState)(!1),[B,R]=(0,s.useState)(""),D=(0,s.useCallback)(async()=>{f(!0);try{let[e,t]=await Promise.all([Y(),ea()]);d(e),x(t)}finally{f(!1)}},[]);(0,s.useEffect)(()=>{D()},[D]);let P=async()=>{let t=y.trim()||void 0;N(!1),w(""),j("create");try{await W(t),Q.toast.success(e("settings.backup.createSuccess")),await D()}catch{Q.toast.error(e("settings.backup.createError"))}finally{j(null)}},L=async t=>{if(confirm(e("settings.backup.restoreConfirm"))){j("restore");try{await et(t),Q.toast.success(e("settings.backup.restoreSuccess"),{action:{label:e("settings.backup.reload"),onClick:()=>window.location.reload()},duration:15e3}),await D()}catch{Q.toast.error(e("settings.backup.restoreError"))}finally{j(null)}}},F=async t=>{if(confirm(e("settings.backup.deleteConfirm")))try{await ee(t),Q.toast.success(e("settings.backup.deleteSuccess")),d(e=>e.filter(e=>e.filename!==t))}catch{Q.toast.error(e("settings.backup.deleteError"))}},I=async t=>{h(!1);try{await ei(t),x(t),Q.toast.success(e("settings.backup.dirSaved")),await D()}catch{Q.toast.error(e("settings.backup.dirError"))}},U=async t=>{let s=t.target.files?.[0];if(s){t.target.value="",j("import");try{let t=new FormData;t.append("file",s);let a=await fetch("/api/internal/backup/import",{method:"POST",body:t});if(!a.ok){let t=await a.json();Q.toast.error("Invalid backup archive"===t.error?e("settings.backup.importInvalid"):(t.error,e("settings.backup.importError")));return}Q.toast.success(e("settings.backup.importSuccess")),await D()}catch{Q.toast.error(e("settings.backup.importError"))}finally{j(null)}}},H=async()=>{if("RESET"===B){T(!1),R(""),j("reset");try{await es("RESET"),Q.toast.success(e("settings.backup.resetSuccess")),o.push("/")}catch{Q.toast.error(e("settings.backup.resetError"))}finally{j(null)}}},E=null!==b;return(0,t.jsxs)("div",{className:"space-y-6",children:[("restore"===b||"reset"===b)&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,t.jsx)(M.Loader2,{className:"h-8 w-8 animate-spin text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"restore"===b?e("settings.backup.restoring"):e("settings.backup.resetting")})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold",children:e("settings.backup.sectionTitle")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{children:[e("settings.backup.dir"),":"]}),(0,t.jsx)("code",{className:"rounded bg-muted px-2 py-0.5 text-xs",children:m}),(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>h(!0),className:"text-xs text-muted-foreground",children:e("settings.backup.dirChange")})]}),(0,t.jsx)(A.FolderBrowserDialog,{open:g,onOpenChange:h,onSelect:I})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Button,{onClick:()=>{w(""),N(!0)},disabled:E,className:"gap-2",children:"create"===b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-4 w-4 animate-spin"})," ",e("settings.backup.creating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{className:"h-4 w-4"})," ",e("settings.backup.create")]})}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsxs)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",disabled:E,onClick:()=>k.current?.click(),className:"gap-2"}),children:[(0,t.jsx)(X,{className:"h-4 w-4"}),e("settings.backup.import")]}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.importHint")})]}),(0,t.jsx)("input",{ref:k,type:"file",accept:".tar.gz,.gz",className:"hidden",onChange:U})]}),(0,t.jsx)(u.Dialog,{open:v,onOpenChange:N,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(u.DialogHeader,{children:(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.create")})}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.createLabel")}),(0,t.jsx)(l.Input,{value:y,onChange:e=>w(e.target.value),onKeyDown:e=>"Enter"===e.key&&P(),placeholder:e("settings.backup.createLabelPlaceholder"),className:"mt-1.5",autoFocus:!0})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>N(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{onClick:P,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:e("settings.backup.create")})]})]})}),p?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(M.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):0===c.length?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[(0,t.jsx)(J.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.backup.empty")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("settings.backup.emptyDesc")})]}):(0,t.jsx)("div",{className:"space-y-3",children:c.map(s=>{var a,n;return(0,t.jsx)("div",{className:"group rounded-lg border border-border bg-card p-4 transition-colors hover:bg-accent/30",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.label?(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:s.label}):(0,t.jsx)("span",{className:"truncate text-sm font-medium font-mono text-foreground",children:s.filename}),s.autoBackup&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-500 ring-1 ring-amber-500/20",children:e("settings.backup.autoLabel")})]}),s.label&&(0,t.jsx)("div",{className:"mt-0.5 text-[11px] font-mono text-muted-foreground/60",children:s.filename}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-muted-foreground",children:[(a=s.size)<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`," · ",(n=s.createdAt,new Date(n).toLocaleString("zh"===i?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}))]}),s.preview.length>0&&(0,t.jsxs)("div",{className:"mt-1.5 text-xs text-muted-foreground",children:[s.preview.map((e,s)=>(0,t.jsxs)("span",{children:[s>0&&" ",e.workspace,"(",e.projects.join(", "),")"]},s)),s.stats.workspaces>s.preview.length&&(0,t.jsxs)("span",{children:[" ",e("settings.backup.workspaces",{count:String(s.stats.workspaces)})]})]}),(0,t.jsxs)("div",{className:"mt-0.5 text-xs text-muted-foreground",children:[e("settings.backup.projects",{count:String(s.stats.projects)})," · ",e("settings.backup.tasks",{count:String(s.stats.tasks)})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>L(s.filename),disabled:E,className:"text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(G.Upload,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.restore")})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-xs",onClick:()=>F(s.filename),disabled:E,className:"text-muted-foreground hover:text-rose-400"}),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(O.TooltipContent,{side:"bottom",sideOffset:4,children:e("settings.backup.delete")})]})]})]})},s.filename)})}),(0,t.jsxs)("div",{className:"border-t border-border pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-rose-400",children:[(0,t.jsx)(_.AlertTriangle,{className:"h-4 w-4"}),e("settings.backup.dangerZone")]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground leading-relaxed",children:e("settings.backup.resetDesc")}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{R(""),T(!0)},disabled:E,className:"mt-3 border-rose-500/30 text-rose-400 hover:bg-rose-500/10 hover:text-rose-400",children:[(0,t.jsx)(Z.RotateCcw,{className:"mr-2 h-3.5 w-3.5"}),e("settings.backup.reset")]})]}),(0,t.jsx)(u.Dialog,{open:S,onOpenChange:T,children:(0,t.jsxs)(u.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:e("settings.backup.resetConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:e("settings.backup.resetConfirmDesc")})]}),(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:e("settings.backup.resetConfirmInput")}),(0,t.jsx)(l.Input,{value:B,onChange:e=>R(e.target.value),placeholder:"RESET",className:"mt-1.5 font-mono"})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>T(!1),children:e("common.cancel")}),(0,t.jsx)(r.Button,{disabled:"RESET"!==B,onClick:H,className:"border-rose-500/30 bg-rose-500/10 text-rose-400 hover:bg-rose-500/20",children:e("settings.backup.reset")})]})]})})]})}var er=e.i(887911);let el=(0,h.default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var eo=e.i(475958),ec=e.i(194358),ed=e.i(991838);function em({extension:e}){let{t:a}=(0,n.useI18n)(),{status:i,loading:l,isInstalling:o,install:c,uninstall:d,refresh:m}=(0,ed.useExtension)(e.id),[u,x]=(0,s.useState)(!1),g=e.icon,h=i.installed,p=async()=>{let t=await c();t.success?Q.toast.success(a("settings.extensions.installSuccess").replace("{name}",e.name)):Q.toast.error(a("settings.extensions.installFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},f=async()=>{let t=await d();t.success?Q.toast.success(a("settings.extensions.uninstallSuccess").replace("{name}",e.name)):Q.toast.error(a("settings.extensions.uninstallFailed").replace("{name}",e.name)+(t.error?`: ${t.error.slice(0,200)}`:""))},b=async()=>{x(!0);try{await m()}finally{x(!1)}};return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-background ring-1 ring-border",children:(0,t.jsx)(g,{className:"h-5 w-5 text-muted-foreground"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:e.name}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.description})]})]}),(0,t.jsxs)("span",{className:"shrink-0 rounded-md bg-background px-2 py-0.5 text-xs text-muted-foreground ring-1 ring-border",children:["~",e.sizeMB," MB"]})]}),(0,t.jsx)("div",{className:"mt-4 flex items-center gap-2 text-xs",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("common.loading")})]}):h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.CheckCircle2,{className:"h-3.5 w-3.5 text-emerald-500"}),(0,t.jsxs)("span",{className:"text-foreground",children:[a("settings.extensions.installed"),i.version?` v${i.version}`:""]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(el,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:a("settings.extensions.notInstalledShort")})]})}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"default",onClick:p,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.reinstalling")]}):a("settings.extensions.reinstall")}),(0,t.jsx)(r.Button,{variant:"outline",onClick:f,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.uninstalling")]}):a("settings.extensions.uninstall")})]}):(0,t.jsx)(r.Button,{variant:"default",onClick:p,disabled:o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),a("settings.extensions.installing")]}):a("settings.extensions.install")}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:b,disabled:u,children:[(0,t.jsx)(ec.RefreshCw,{className:`h-3.5 w-3.5 ${u?"animate-spin":""}`}),a("settings.extensions.recheck")]}),(0,t.jsxs)(r.Button,{variant:"ghost",onClick:()=>{window.open(e.homepageUrl,"_blank","noopener,noreferrer")},children:[(0,t.jsx)(eo.ExternalLink,{className:"h-3.5 w-3.5"}),a("settings.extensions.visitHomepage")]})]})]})}function eu(){let{t:e}=(0,n.useI18n)(),s=(0,er.listExtensionMetadata)();return(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("header",{children:[(0,t.jsx)("h2",{className:"text-base font-semibold",children:e("settings.extensions.title")}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("settings.extensions.desc")})]}),(0,t.jsx)("div",{className:"space-y-3",children:s.map(e=>(0,t.jsx)(em,{extension:e},e.id))})]})}function ex({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,x.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function eg({label:e,description:s,children:a,className:i}){return(0,t.jsxs)("div",{className:(0,x.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",i),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let eh=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:g.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:p,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:f.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:b,accent:"amber"},{id:"extensions",labelKey:"settings.extensions.title",descKey:"settings.extensions.navDesc",icon:N.Package,accent:"indigo"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"},{id:"backup",labelKey:"settings.backup.title",descKey:"settings.backup.navDesc",icon:v.HardDrive,accent:"cyan"}],ep={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},indigo:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},ef="ai-manager:default-cli-adapter",eb={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function ej(){let e=(0,a.useRouter)(),{t:g}=(0,n.useI18n)(),{theme:h,setTheme:p}=(0,i.useTheme)(),{locale:f,setLocale:b}=(0,n.useI18n)(),[j,v]=(0,s.useState)("general"),N=(0,s.useRef)(null),[I,q]=(0,s.useState)({left:0,width:0}),[G,X]=(0,s.useState)(!1),[Z,_]=(0,s.useState)("Terminal"),[J,Q]=(0,s.useState)([]),[W,Y]=(0,s.useState)(180),[ee,et]=(0,s.useState)([]),[es,ea]=(0,s.useState)("claude"),[ei,er]=(0,s.useState)(null),[el,eo]=(0,s.useState)({}),[ec,ed]=(0,s.useState)([]),[em,ej]=(0,s.useState)(!1),[ev,eN]=(0,s.useState)(null),[ey,ew]=(0,s.useState)(null),[ek,eC]=(0,s.useState)(""),[eS,eT]=(0,s.useState)(""),[eM,eB]=(0,s.useState)(""),[eR,eD]=(0,s.useState)([]),[eP,eL]=(0,s.useState)(null),[eF,eI]=(0,s.useState)({...eb}),[eU,eH]=(0,s.useState)(!1),[eE,eV]=(0,s.useState)({...eb}),[ez,e$]=(0,s.useState)(!1),[eK,eO]=(0,s.useState)(!1),[eA,eq]=(0,s.useState)(0),[eG,eX]=(0,s.useState)(null),[eZ,e_]=(0,s.useState)(null),[eJ,eQ]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3,maxReadableMb:5}),[eW,eY]=(0,s.useState)({timeoutSec:30}),[e0,e1]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80,codeTimeoutSec:30}),[e2,e5]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e3,e4]=(0,s.useState)(null),[e7,e8]=(0,s.useState)(!1),[e6,e9]=(0,s.useState)(""),[te,tt]=(0,s.useState)(!0);(0,s.useEffect)(()=>X(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(_),(0,P.getConfigValue)("terminal.idleTimeoutSec",180).then(Y),U().then(Q)},[]),(0,s.useEffect)(()=>{K().then(et);let e=localStorage.getItem(ef);e&&ea(e)},[]),(0,s.useEffect)(()=>{(0,H.getPrompts)().then(ed)},[]);let ts=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();e4(t)}}catch{}};async function ta(){await (0,L.setConfigValue)("terminal.app",Z)}async function ti(){let e=Math.max(180,W);Y(e),await (0,L.setConfigValue)("terminal.idleTimeoutSec",e)}async function tn(e){if(!ei){er(e),eo(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),s=await t.json();eo(t=>({...t,[e]:s}))}catch{eo(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{er(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(e=>{let t=new Set,s=!1,a=e.map(e=>{if(!e.id||t.has(e.id)){s=!0;let a={...e,id:crypto.randomUUID()};return t.add(a.id),a}return t.add(e.id),e});eD(a),s&&(0,L.setConfigValue)("git.pathMappingRules",a)}),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{e9(e.join(", "))}),ts(),(0,F.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","system.maxReadableFileBytes","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","search.codeTimeoutSec","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{let t=e["system.maxUploadBytes"]??0x3200000,s=e["system.maxReadableFileBytes"]??5242880;eQ({maxUploadMb:Math.round(t/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3,maxReadableMb:Math.round(s/1024/1024)}),eY({timeoutSec:e["git.timeoutSec"]??30}),e1({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80,codeTimeoutSec:e["search.codeTimeoutSec"]??30}),e5({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(tt)},[]);let tr=(0,s.useCallback)(()=>{eN(null),eC(""),eT(""),eB(""),ej(!0)},[]),tl=(0,s.useCallback)(e=>{eN(e),eC(e.name),eT(e.description??""),eB(e.content),ej(!0)},[]),to=(0,s.useCallback)(async()=>{ek.trim()&&eM.trim()&&(ev?await V(ev.id,{name:ek.trim(),description:eS.trim()||void 0,content:eM.trim()}):await E({name:ek.trim(),description:eS.trim()||void 0,content:eM.trim()}),ej(!1),ed(await (0,H.getPrompts)()),e.refresh())},[ek,eS,eM,ev,e]),tc=(0,s.useCallback)(async()=>{ey&&(await z(ey),ew(null),ed(await (0,H.getPrompts)()),e.refresh())},[ey,e]),td=(0,s.useCallback)(async t=>{await $(t),ed(await (0,H.getPrompts)()),e.refresh()},[e]),tm=async()=>{await (0,L.setConfigValue)("system.maxUploadBytes",1024*eJ.maxUploadMb*1024),await (0,L.setConfigValue)("system.maxConcurrentExecutions",eJ.maxConcurrent),await (0,L.setConfigValue)("system.maxReadableFileBytes",1024*eJ.maxReadableMb*1024)},tu=async()=>{await (0,L.setConfigValue)("git.timeoutSec",eW.timeoutSec)},tx=async()=>{await (0,L.setConfigValue)("search.resultLimit",e0.resultLimit),await (0,L.setConfigValue)("search.allModeCap",e0.allModeCap),await (0,L.setConfigValue)("search.debounceMs",e0.debounceMs),await (0,L.setConfigValue)("search.snippetLength",e0.snippetLength),await (0,L.setConfigValue)("search.codeTimeoutSec",e0.codeTimeoutSec)},tg=async()=>{let e=Math.min(e2.minCols,e2.maxCols),t=Math.max(e2.minCols,e2.maxCols),s=Math.min(e2.minRows,e2.maxRows),a=Math.max(e2.minRows,e2.maxRows);e5({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,L.setConfigValue)("missions.grid.minCols",e),await (0,L.setConfigValue)("missions.grid.maxCols",t),await (0,L.setConfigValue)("missions.grid.minRows",s),await (0,L.setConfigValue)("missions.grid.maxRows",a)},th=async()=>{let e=e6.split(",").map(e=>e.trim()).filter(Boolean);await (0,L.setConfigValue)("hooks.autoUploadTypes",e)},tp=async()=>{if(e3){e8(!0);try{let e=e3.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await ts()}finally{e8(!1)}}},tf=async()=>{if(!eE.host.trim()||!eE.localPathTemplate.trim())return;let e=eE.localPathTemplate.trim().replace(/\/+$/,""),t=ez?`${e}/{path}`:e,s=[...eR,{id:crypto.randomUUID(),host:eE.host.trim(),ownerMatch:eE.ownerMatch.trim()||"*",localPathTemplate:t,priority:eE.priority}];await (0,L.setConfigValue)("git.pathMappingRules",s),eD(s),eV({...eb}),e$(!1),eH(!1)},tb=async e=>{if(!eF.host.trim()||!eF.localPathTemplate.trim())return;let t=eF.localPathTemplate.trim().replace(/\/+$/,""),s=eK?`${t}/{path}`:t,a=eR.map(t=>t.id===e?{...t,host:eF.host.trim(),ownerMatch:eF.ownerMatch.trim()||"*",localPathTemplate:s,priority:eF.priority}:t);await (0,L.setConfigValue)("git.pathMappingRules",a),eD(a),eL(null),eO(!1)},tj=async e=>{let t=eR.filter(t=>t.id!==e);await (0,L.setConfigValue)("git.pathMappingRules",t),eD(t),eX(null)};async function tv(){let e=!te;tt(e),await (0,L.setConfigValue)("notification.enabled",e)}let tN=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=N.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();q({left:a.left-s.left,width:a.width})},[j]);let ty=eh.find(e=>e.id===j),tw=ty?ep[ty.accent]:ep.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:g("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g("settings.configDesc")})]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:tN,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(y.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:N,className:"relative flex gap-1 overflow-x-auto",children:[eh.map(e=>{let s=e.icon,a=j===e.id,i=ep[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>v(e.id),className:(0,x.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?`${i.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,x.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?i.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:g(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,x.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tw.indicator),style:{left:I.left,width:I.width}})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[ty&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,x.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tw.bg,tw.text,tw.ring),children:(0,t.jsx)(ty.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:g(ty.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:g(ty.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(j){case"general":let e;return e=[{value:"light",label:g("settings.themeLight")},{value:"dark",label:g("settings.themeDark")},{value:"system",label:g("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(eg,{label:g("settings.theme"),description:g("settings.themeDesc"),children:G?(0,t.jsx)(ex,{options:e,value:h??"system",onChange:e=>p(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(eg,{label:g("settings.language"),description:g("settings.languageDesc"),children:(0,t.jsx)(ex,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:f,onChange:e=>b(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.terminal.desc")})]})}),(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[J.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{_(e.value),(0,L.setConfigValue)("terminal.app",e.value)},className:(0,x.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",Z===e.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:e.name},e.value))}),(0,t.jsx)("input",{type:"text",value:Z,onChange:e=>_(e.target.value),onBlur:ta,placeholder:g("settings.terminal.placeholder"),className:"h-9 w-64 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/30"})]})]}),(0,t.jsx)(eg,{label:g("settings.terminal.idleTimeout"),description:g("settings.terminal.idleTimeoutDesc"),children:(0,t.jsx)("input",{type:"number",value:W,onChange:e=>Y(Number(e.target.value)),onBlur:ti,min:180,className:"h-9 w-28 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm text-right focus:outline-none focus:ring-2 focus:ring-blue-500/30"})})]});case"ai-tools":return(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ee.map(e=>{let s=es===e.name,a=ei===e.name,i=el[e.name];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.displayName}),(0,t.jsx)(d.Badge,{variant:"outline",children:g("label.builtin")}),s&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(k,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]}),i&&(0,t.jsx)(d.Badge,{variant:i.ok?"secondary":"destructive",className:(0,x.cn)("shrink-0",i.ok&&"bg-green-600 text-white hover:bg-green-700"),children:i.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.CheckCircle2,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.XCircle,{className:"h-3 w-3 mr-1"}),g("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.cli.available&&e.cli.version?`${e.name} \xb7 ${e.cli.version}`:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{var t;ea(t=e.name),localStorage.setItem(ef,t)},children:[(0,t.jsx)(k,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),g("settings.prompts.setDefault")]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>tn(e.name),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),g("settings.aiTools.testing")]}):g("settings.aiTools.testConnection")})]})]}),i&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:i.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,x.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,x.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.name}-${s.name}`))})})]})},e.name)})});case"prompts":return G?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(r.Button,{onClick:tr,variant:"default",children:[(0,t.jsx)(w.Plus,{className:"h-4 w-4 mr-2"}),g("settings.prompts.newPrompt")]})}),0===ec.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:g("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:g("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:ec.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.isDefault&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,t.jsx)(k,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),g("settings.prompts.default")]})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>td(e.id),title:g("settings.prompts.setDefault"),children:(0,t.jsx)(k,{className:(0,x.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tl(e),title:g("settings.prompts.editPrompt"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ew(e.id),className:"text-destructive",title:g("settings.prompts.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(u.Dialog,{open:em,onOpenChange:ej,children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:ev?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")}),(0,t.jsx)(u.DialogDescription,{children:ev?g("settings.prompts.editPrompt"):g("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-name",children:g("settings.prompts.promptName")}),(0,t.jsx)(l.Input,{id:"prompt-name",value:ek,onChange:e=>eC(e.target.value),placeholder:g("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-description",children:g("settings.prompts.promptDescription")}),(0,t.jsx)(l.Input,{id:"prompt-description",value:eS,onChange:e=>eT(e.target.value),placeholder:g("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-content",children:g("settings.prompts.promptContent")}),(0,t.jsx)(o.Textarea,{id:"prompt-content",value:eM,onChange:e=>eB(e.target.value),placeholder:g("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ej(!1),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{onClick:to,disabled:!ek.trim()||!eM.trim(),children:g("settings.prompts.save")})]})]})}),(0,t.jsx)(u.Dialog,{open:!!ey,onOpenChange:e=>!e&&ew(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ew(null),children:g("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:tc,children:g("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,i;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.git.desc")})]}),(0,t.jsxs)(r.Button,{onClick:()=>{eV({...eb}),eH(!0)},children:[(0,t.jsx)(w.Plus,{className:"mr-2 h-4 w-4"}),g("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eR.length||eU?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eR.map(e=>eP===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eF.host,onChange:e=>eI(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eF.ownerMatch,onChange:e=>eI(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5 col-span-2",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eF.localPathTemplate,onChange:e=>eI(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:eK?"default":"outline",size:"sm",type:"button",onClick:()=>eO(e=>!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:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>e_("edit"),children:(0,t.jsx)(D.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eK?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs text-muted-foreground",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eF.priority,onChange:e=>eI(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>{eL(null),eO(!1)},children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>tb(e.id),children:g("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(d.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[g("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t,s,a;return t=e.localPathTemplate,a=(s=/\/\{path\}\/?$/.test(t))?t.replace(/\/?\{path\}\/?$/,"").replace(/\/+$/,""):t,void(eL(e.id),eI({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:a,priority:e.priority}),eO(s))},title:g("settings.config.git.edit"),children:(0,t.jsx)(S,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>eX(e.id),className:"text-destructive",title:g("settings.config.git.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:g("settings.config.git.noRules")})}),eU&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eE.host,onChange:e=>eV(t=>({...t,host:e.target.value})),placeholder:g("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:g("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eE.ownerMatch,onChange:e=>eV(t=>({...t,ownerMatch:e.target.value})),placeholder:g("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eE.localPathTemplate,onChange:e=>eV(t=>({...t,localPathTemplate:e.target.value})),placeholder:g("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:ez?"default":"outline",size:"sm",type:"button",onClick:()=>e$(e=>!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:g("settings.config.git.pathTooltipTitle")}),(0,t.jsx)("div",{className:"opacity-80",children:g("settings.config.git.pathTooltipDetail")})]})})]}),(0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)(r.Button,{variant:"outline",size:"icon",type:"button",onClick:()=>e_("add"),children:(0,t.jsx)(D.FolderOpen,{className:"h-4 w-4"})})}),(0,t.jsx)(O.TooltipContent,{children:g("settings.config.git.pickFolder")})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ez?g("onboarding.step3.pathHintFull"):g("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"block text-xs font-medium",children:g("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eE.priority,onChange:e=>eV(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),eE.localPathTemplate&&(s=eE.localPathTemplate.trim().replace(/\/+$/,""),a=ez?`${s}/{path}`:s,i=[{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:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:g("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:i.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>eq(s),className:(0,x.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eA===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:i[eA].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],i=s.match(/^git@[^:]+:(.+)$/);if(i)a=i[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 n=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",n).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,i[eA].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>eH(!1),children:g("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{size:"sm",onClick:tf,disabled:!eE.host.trim()||!eE.localPathTemplate.trim(),children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 mr-1.5"}),g("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:500,value:eJ.maxUploadMb,onChange:e=>eQ(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eJ.maxConcurrent,onChange:e=>eQ(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.system.maxReadable")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.system.maxReadableHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:50,value:eJ.maxReadableMb,onChange:e=>eQ(t=>({...t,maxReadableMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tm,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,value:eW.timeoutSec,onChange:e=>eY(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(r.Button,{onClick:tu,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:5,max:100,value:e0.resultLimit,onChange:e=>e1(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:20,value:e0.allModeCap,onChange:e=>e1(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:50,max:1e3,value:e0.debounceMs,onChange:e=>e1(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:20,max:500,value:e0.snippetLength,onChange:e=>e1(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.search.codeTimeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.search.codeTimeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,step:5,value:e0.codeTimeoutSec,onChange:e=>e1(t=>({...t,codeTimeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]})]}),(0,t.jsx)(r.Button,{onClick:tx,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e2.minCols,onChange:e=>e5(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e2.maxCols,onChange:e=>e5(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.minRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e2.minRows,onChange:e=>e5(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:g("settings.config.missions.maxRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:e2.maxRows,onChange:e=>e5(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:tg,className:"rounded-lg",children:g("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:g("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:g("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:g("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(l.Input,{value:e6,onChange:e=>e9(e.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsx)(r.Button,{onClick:th,className:"rounded-lg",children:g("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:e3?.installed?g("settings.config.hooks.installed"):g("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:g("settings.config.hooks.installHint")})]}),(0,t.jsx)(r.Button,{variant:e3?.installed?"destructive":"default",onClick:tp,disabled:e7||!e3,className:"rounded-lg",children:e3?.installed?g("settings.config.hooks.uninstall"):g("settings.config.hooks.install")})]})]}),(0,t.jsx)(u.Dialog,{open:!!eG,onOpenChange:e=>!e&&eX(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:g("settings.config.git.deleteConfirm")}),(0,t.jsx)(u.DialogDescription,{children:g("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eX(null),children:g("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:()=>eG&&tj(eG),children:g("settings.config.git.delete")})]})]})})]});case"notifications":return(0,t.jsx)("div",{className:"divide-y divide-border/50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:g("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:g("settings.notifications.enableDesc")})]}),(0,t.jsx)(m.Switch,{checked:te,onCheckedChange:tv})]})});case"backup":return(0,t.jsx)(en,{});case"extensions":return(0,t.jsx)(eu,{})}}()]})}),(0,t.jsx)(A.FolderBrowserDialog,{open:null!==eZ,onOpenChange:e=>{e||e_(null)},onSelect:e=>{"add"===eZ?eV(t=>({...t,localPathTemplate:e})):"edit"===eZ&&eI(t=>({...t,localPathTemplate:e})),e_(null)}})]})}e.s(["default",0,function(){return(0,t.jsx)(ej,{})}],113399)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,565893,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return s},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function s(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,i(e));else t.set(r,i(a));return t}function o(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},204575,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return o},isResSent:function(){return f},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return S}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&f(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let p="u">typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function S(e){return JSON.stringify({message:e.message,stack:e.stack})}},619172,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},464249,e=>{"use strict";let t=(0,e.i(572989).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],464249)},949295,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40e0ac89b080f5ef618a53d9c811e487609f9a3290",t.callServer,void 0,t.findSourceMapURL,"getLabelsForWorkspace");e.s(["getLabelsForWorkspace",0,r])},821957,e=>{"use strict";var t=e.i(965652),r=(e,t,r,a,n,s,i,l)=>{let o=document.documentElement,c=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&s?n.map(e=>s[e]||e):n;r?(o.classList.remove(...a),o.classList.add(s&&s[t]?s[t]:t)):o.setAttribute(e,t)}),r=t,l&&c.includes(r)&&(o.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",s="u"<typeof window,i=t.createContext(void 0),l={setTheme:e=>{},themes:[]},o=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:m=o,defaultTheme:p=s?"system":"light",attribute:g="data-theme",value:v,children:y,nonce:b,scriptProps:x})=>{let[k,S]=t.useState(()=>u(c,p)),[w,C]=t.useState(()=>"system"===k?h():k),j=v?Object.values(v):m,E=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=h());let n=v?v[t]:t,i=r?f(b):null,o=document.documentElement,c=e=>{"class"===e?(o.classList.remove(...j),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),l){let e=a.includes(p)?p:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==i||i()},[b]),N=t.useCallback(e=>{let t="function"==typeof e?e(k):e;S(t);try{localStorage.setItem(c,t)}catch(e){}},[k]),M=t.useCallback(t=>{C(h(t)),"system"===k&&s&&!e&&E("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(M),M(e),()=>e.removeListener(M)},[M]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?S(e.newValue):N(p))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[N]),t.useEffect(()=>{E(null!=e?e:k)},[e,k]);let P=t.useMemo(()=>({theme:k,setTheme:N,forcedTheme:e,resolvedTheme:"system"===k?w:k,themes:s?[...m,"system"]:m,systemTheme:s?w:void 0}),[k,N,e,w,s,m]);return t.createElement(i.Provider,{value:P},t.createElement(d,{forcedTheme:e,storageKey:c,attribute:g,enableSystem:s,enableColorScheme:l,defaultTheme:p,value:v,themes:m,nonce:b,scriptProps:x}),y)},d=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:s,enableColorScheme:i,defaultTheme:l,value:o,themes:c,nonce:d,scriptProps:u})=>{let f=JSON.stringify([n,a,l,e,c,o,s,i]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${f})`}})}),u=(e,t)=>{let r;if(!s){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},f=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},h=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(i)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(i))?e:l}])},433171,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("001e1fa1609fa6f321934af3c930363baeed8b3d15",t.callServer,void 0,t.findSourceMapURL,"getActualWsPort");e.s(["getActualWsPort",0,r])},902539,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);e.s(["ChevronsLeft",0,t],902539)},966001,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(938499),n=e.i(194358),s=e.i(519455);class i extends r.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,t.jsx)(a.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,t.jsxs)(s.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,t.jsx)(n.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}e.s(["ErrorBoundary",0,i])},324978,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40baad4a3c5f68100f528509be2170b43469cbcbc6",t.callServer,void 0,t.findSourceMapURL,"installExtension");e.s(["installExtension",0,r])},812983,e=>{"use strict";let t=(0,e.i(572989).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],812983)},887911,e=>{"use strict";var t=e.i(738690),r=e.i(812983);let a={rg:{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:t.Search,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation"},monaco:{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:r.FileCode,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/"}},n=[a.rg,a.monaco];e.s(["listExtensionMetadata",0,function(){return n}])},763948,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("602a9baca17d1dfb46d6920ffa0a228eef5457ab33",t.callServer,void 0,t.findSourceMapURL,"setConfigValue");e.s(["setConfigValue",0,r])},387091,15299,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,r],387091);let a=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],15299)},699375,e=>{"use strict";var t,r=e.i(289721);e.s([],159880),e.i(159880),e.i(708878);var a=e.i(965652),n=e.i(314757),s=e.i(887642),i=e.i(362891),l=e.i(804849),o=e.i(416369),c=e.i(954588),d=e.i(581263),u=e.i(565455),f=e.i(207516),h=e.i(282109),m=e.i(462902);let p=a.createContext(void 0);var g=e.i(551974);let v=((t={}).checked="data-checked",t.unchecked="data-unchecked",t.disabled="data-disabled",t.readonly="data-readonly",t.required="data-required",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),y={...g.fieldValidityMapping,checked:e=>e?{[v.checked]:""}:{[v.unchecked]:""}};var b=e.i(421689),x=e.i(890514),k=e.i(571870),S=e.i(179279),w=e.i(103353),C=e.i(67077),j=e.i(586622),E=e.i(353052);let N=a.forwardRef(function(e,t){let{checked:m,className:g,defaultChecked:v,"aria-labelledby":N,id:M,inputRef:P,name:T,nativeButton:O=!1,onCheckedChange:I,readOnly:R=!1,required:L=!1,disabled:F=!1,render:A,uncheckedValue:z,value:D,...V}=e,{clearErrors:B}=(0,k.useFormContext)(),{state:U,setTouched:_,setDirty:H,validityData:$,setFilled:K,setFocused:J,shouldValidateOnChange:q,validationMode:W,disabled:G,name:Y,validation:Z}=(0,x.useFieldRootContext)(),{labelId:Q}=(0,S.useLabelableContext)(),X=G||F,ee=Y??T,et=(0,s.useStableCallback)(I),er=a.useRef(null),ea=(0,i.useMergedRefs)(er,P,Z.inputRef),en=a.useRef(null),es=(0,f.useBaseUiId)(),ei=(0,w.useLabelableId)({id:M,implicit:!1,controlRef:en}),el=O?void 0:ei,[eo,ec]=(0,n.useControlled)({controlled:m,default:!!v,name:"Switch",state:"checked"});(0,b.useField)({id:es,commit:Z.commit,value:eo,controlRef:en,name:ee,getValue:()=>eo}),(0,l.useIsoLayoutEffect)(()=>{er.current&&K(er.current.checked)},[er,K]),(0,E.useValueChanged)(eo,()=>{B(ee),H(eo!==$.initialValue),K(eo),q()?Z.commit(eo):Z.commit(eo,!0)});let{getButtonProps:ed,buttonRef:eu}=(0,h.useButton)({disabled:X,native:O}),ef=function(e,t,r,n=!0,s){let[i,o]=a.useState(),c=(0,f.useBaseUiId)(s?`${s}-label`:void 0),d=e??t??i;return(0,l.useIsoLayoutEffect)(()=>{let a=e||t||!n?void 0:function(e,t){let r=function(e){if(!e)return;let t=e.parentElement;if(t&&"LABEL"===t.tagName)return t;let r=e.id;if(r){let t=e.nextElementSibling;if(t&&t.htmlFor===r)return t}let a=e.labels;return a&&a[0]}(e);if(r)return!r.id&&t&&(r.id=t),r.id||void 0}(r.current,c);i!==a&&o(a)}),d}(N,Q,er,!O,el),eh=a.useMemo(()=>(0,u.mergeProps)({checked:eo,disabled:X,id:el,name:ee,required:L,style:ee?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ea,onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked,r=(0,C.createChangeEventDetails)(j.REASONS.none,e.nativeEvent);et?.(t,r),r.isCanceled||ec(t)},onFocus(){en.current?.focus()}},Z.getInputValidationProps,void 0!==D?{value:D}:c.EMPTY_OBJECT),[eo,X,ea,el,ee,et,L,ec,Z,D]),em=a.useMemo(()=>({...U,checked:eo,disabled:X,readOnly:R,required:L}),[U,eo,X,R,L]),ep=(0,d.useRenderElement)("span",e,{state:em,ref:[t,en,eu],props:[{id:O?ei:es,role:"switch","aria-checked":eo,"aria-readonly":R||void 0,"aria-required":L||void 0,"aria-labelledby":ef,onFocus(){X||J(!0)},onBlur(){let e=er.current;e&&!X&&(_(!0),J(!1),"onBlur"===W&&Z.commit(e.checked))},onClick(e){R||X||(e.preventDefault(),er.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},Z.getValidationProps,V,ed],stateAttributesMapping:y});return(0,r.jsxs)(p.Provider,{value:em,children:[ep,!eo&&ee&&void 0!==z&&(0,r.jsx)("input",{type:"hidden",name:ee,value:z}),(0,r.jsx)("input",{...eh})]})}),M=a.forwardRef(function(e,t){let{render:r,className:n,...s}=e,{state:i}=(0,x.useFieldRootContext)(),l=function(){let e=a.useContext(p);if(void 0===e)throw Error((0,m.default)(63));return e}(),o={...i,...l};return(0,d.useRenderElement)("span",e,{state:o,ref:t,stateAttributesMapping:y,props:s})});e.s(["Root",0,N,"Thumb",0,M],803205);var P=e.i(803205),P=P,T=e.i(975157);e.s(["Switch",0,function({className:e,size:t="default",...a}){return(0,r.jsx)(P.Root,{"data-slot":"switch","data-size":t,className:(0,T.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...a,children:(0,r.jsx)(P.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],699375)},263938,e=>{"use strict";let t=(0,e.i(572989).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",0,t],263938)},989548,338187,e=>{"use strict";let t=(0,e.i(572989).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],989548);var r=e.i(289721),a=e.i(965652),n=e.i(185403);let s="tower-assistant-sessions",i="tower-assistant-active-session";function l(){try{let e=localStorage.getItem(s);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t}catch{return[]}}function o(){return localStorage.getItem(i)}function c(e){null===e?localStorage.removeItem(i):localStorage.setItem(i,e)}let d=(0,a.createContext)(null);function u(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`msg-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}let f="assistant-attachment-cache";function h(e,t,r){try{let a=sessionStorage.getItem(f),n=a?JSON.parse(a):{};n[e]||(n[e]={}),n[e][t]=r,sessionStorage.setItem(f,JSON.stringify(n))}catch{}}e.s(["AssistantProvider",0,function({children:e}){let[t,i]=(0,a.useState)(!1),[m,p]=(0,a.useState)(!1),[g,v]=(0,a.useState)("sidebar"),[y,b]=(0,a.useState)(null),[x,k]=(0,a.useState)([]),[S,w]=(0,a.useState)("idle"),[C,j]=(0,a.useState)(!1),E=(0,a.useRef)([]),N=(0,a.useRef)(null),M=(0,a.useRef)(null),[P,T]=(0,a.useState)([]),[O,I]=(0,a.useState)(null),R=(0,a.useRef)(!1),L=(0,a.useCallback)(()=>{k([...E.current])},[]),F=(0,a.useCallback)(async()=>{v("dialog"===await (0,n.getConfigValue)("assistant.displayMode","sidebar")?"dialog":"sidebar")},[]);(0,a.useEffect)(()=>{F()},[F]);let A=(0,a.useCallback)(async()=>{T(l())},[]),z=(0,a.useCallback)(async e=>{j(!0);try{let t=await fetch(`/api/internal/assistant/sessions?sessionId=${encodeURIComponent(e)}`);if(!t.ok)return;let r=await t.json();if(Array.isArray(r.messages)){E.current=r.messages;let t=function(e){try{let t=sessionStorage.getItem(f);if(!t)return{};return JSON.parse(t)[e]??{}}catch{return{}}}(e);if(Object.keys(t).length>0){let e=0;E.current=E.current.map(r=>{if("user"===r.role){let a=t[e];if(e++,a?.length)return{...r,attachmentFilenames:a}}return r})}k([...E.current])}}catch{}finally{j(!1)}},[]);(0,a.useEffect)(()=>{A();let e=o();e&&(I(e),N.current=e,z(e))},[A,z]);let D=(0,a.useCallback)(()=>{M.current?.abort(),N.current=null,R.current=!1,I(null),c(null),E.current=[],k([]),w("idle")},[]),V=(0,a.useCallback)(e=>{M.current?.abort(),N.current=e,R.current=!0,I(e),c(e),E.current=[],k([]),w("idle"),z(e)},[z]),B=(0,a.useCallback)(e=>{let t;t=l().filter(t=>t.id!==e),localStorage.setItem(s,JSON.stringify(t)),o()===e&&c(null),T(l()),O===e&&D()},[O,D]),U=(0,a.useCallback)(async()=>{p(!0);try{await F(),i(!0)}finally{p(!1)}},[F]),_=(0,a.useCallback)(()=>{i(!1),M.current?.abort()},[]),H=(0,a.useCallback)(()=>{t||m?_():U()},[t,m,_,U]);(0,a.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"l"===e.key&&(e.preventDefault(),H())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[H]);let $=(0,a.useCallback)(async(e,t)=>{if(!e.trim()&&!t?.attachmentFilenames?.length)return;M.current?.abort();let r=new AbortController;M.current=r;let a=0!==E.current.length||R.current?null:e,n=u();if(E.current=[...E.current,{id:u(),role:"user",content:e,attachmentFilenames:t?.attachmentFilenames?.length?t.attachmentFilenames:void 0},{id:n,role:"thinking",content:"",isStreaming:!0}],L(),t?.attachmentFilenames?.length&&N.current){let e=E.current.filter(e=>"user"===e.role).length-1;h(N.current,e,t.attachmentFilenames)}w("connecting");let i=null;try{let o=await fetch("/api/internal/assistant/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e,sessionId:N.current,attachmentFilenames:t?.attachmentFilenames??[]}),signal:r.signal});if(!o.ok||!o.body)throw Error(`HTTP ${o.status}`);w("streaming");let d=o.body.getReader(),f=new TextDecoder,m="";for(;;){let{done:e,value:r}=await d.read();if(e)break;let o=(m+=f.decode(r,{stream:!0})).split("\n");for(let e of(m=o.pop()??"",o)){let r;if(e.startsWith("data: ")){try{r=JSON.parse(e.slice(6).trim())}catch{continue}if(r.sessionId){let e=N.current;if(N.current=r.sessionId,a&&!R.current&&r.sessionId!==e){R.current=!0;let e=new Date().toISOString(),n={id:r.sessionId,title:function(e){let t=e.trim();return t?t.length>30?t.slice(0,30):t:"New Session"}(a),createdAt:e,updatedAt:e};!function(e){let t=[e,...l().filter(t=>t.id!==e.id)].slice(0,10);localStorage.setItem(s,JSON.stringify(t))}(n),T(l()),I(r.sessionId),c(r.sessionId),t?.attachmentFilenames?.length&&h(r.sessionId,0,t.attachmentFilenames)}}switch(r.type){case"text_delta":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:e.content+(r.content??""),isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"text":{let e=E.current.filter(e=>e.id!==n);i?E.current=e.map(e=>e.id===i?{...e,content:r.content??e.content,isStreaming:!0}:e):(i=u(),E.current=[...e,{id:i,role:"assistant",content:r.content??"",isStreaming:!0}]),L();break}case"tool_start":{let e=E.current.filter(e=>e.id!==n);i?(E.current=e.map(e=>e.id===i?{...e,isStreaming:!1}:e),i=null):E.current=e,E.current=[...E.current,{id:u(),role:"tool",content:`Calling ${r.content??"tool"}...`,toolName:r.content,isStreaming:!0}],L();break}case"tool_use":{let e=E.current.filter(e=>e.id!==n),t=i?e.map(e=>e.id===i?{...e,isStreaming:!1}:e):e;i=null,E.current=[...t,{id:u(),role:"tool",content:JSON.stringify(r.toolInput??{},null,2),toolName:r.content}],L();break}case"tool_result":E.current=[...E.current,{id:u(),role:"tool",content:String(r.toolOutput??""),toolName:`${r.content??"tool"} (result)`}],L();break;case"error":E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Error: ${r.content??"Unknown error"}`}],L(),w("error");break;case"done":i&&(E.current=E.current.map(e=>e.id===i?{...e,isStreaming:!1}:e)),E.current=E.current.filter(e=>e.id!==n),L(),w("idle")}}}}E.current=E.current.filter(e=>e.id!==n),L(),w(e=>"streaming"===e?"idle":e),A()}catch(e){if("AbortError"===e.name)return;E.current=[...E.current.filter(e=>e.id!==n),{id:u(),role:"assistant",content:`Connection error: ${e.message??"Unknown error"}`}],L(),w("error")}},[L,A]),K=(0,a.useCallback)(()=>{M.current?.abort(),M.current=null;let e=[...E.current].reverse().find(e=>"user"===e.role),t=e?.content??null;if(e){let t=E.current.lastIndexOf(e);E.current=E.current.slice(0,t),k([...E.current])}return w("idle"),t},[]),J=x[x.length-1],q="connecting"===S||"streaming"===S||J?.role==="thinking"&&!0===J.isStreaming;return(0,r.jsx)(d.Provider,{value:{isOpen:t,isStarting:m,displayMode:g,worktreePath:y,toggleAssistant:H,closeAssistant:_,chatMessages:x,chatStatus:S,isChatThinking:q,isLoadingHistory:C,sendChatMessage:$,cancelChat:K,sessions:P,activeSessionId:O,createNewSession:D,switchSession:V,removeSession:B,refreshSessions:A},children:e})},"useAssistant",0,function(){let e=(0,a.useContext)(d);if(!e)throw Error("useAssistant must be used within an AssistantProvider");return e}],338187)},275360,e=>{"use strict";let t=(0,e.i(572989).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",0,t],275360)},431828,763131,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",0,r],431828);let a=(0,t.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,a],763131)},256753,e=>{"use strict";let t=(0,e.i(572989).default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);e.s(["HardDrive",0,t],256753)},224277,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(977982),n=e.i(431828),s=e.i(763131),i=e.i(472074),l=e.i(738690),o=e.i(256753),c=e.i(275360),d=e.i(597746),u=e.i(657153),f=e.i(776639),h=e.i(519455),m=e.i(793479),p=e.i(746798),g=e.i(533499),v=e.i(759684);e.s(["FolderBrowserDialog",0,function({open:e,onOpenChange:y,onSelect:b,gitOnly:x=!1}){let{t:k}=(0,g.useI18n)(),[S,w]=(0,r.useState)(null),[C,j]=(0,r.useState)(!1),[E,N]=(0,r.useState)(null),[M,P]=(0,r.useState)(""),[T,O]=(0,r.useState)(""),[I,R]=(0,r.useState)(!1),L=(0,r.useRef)(null),[F,A]=(0,r.useState)(!1),[z,D]=(0,r.useState)(""),V=(0,r.useRef)(null),B=(0,r.useCallback)(async e=>{j(!0),N(null),O(""),R(!1);try{let t=e?`/api/browse-fs?path=${encodeURIComponent(e)}`:"/api/browse-fs",r=await fetch(t);if(!r.ok){let e=await r.json();N(e.error||"Failed");return}let a=await r.json();w(a),P(a.currentPath)}catch{N("Failed to browse filesystem")}finally{j(!1)}},[]);(0,r.useEffect)(()=>{e&&(B(),setTimeout(()=>L.current?.focus(),200))},[e,B]);let U=()=>{M.trim()&&B(M.trim())},_=async()=>{let e=z.trim();if(e&&S?.currentPath)try{let t=await fetch("/api/browse-fs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:S.currentPath,name:e})});if(!t.ok){let e=await t.json();N(e.error||k("folder.newFolderError"));return}A(!1),D(""),B(S.currentPath)}catch{N(k("folder.newFolderError"))}},H=()=>{A(!1),D("")},$=S?.folders.filter(e=>e.name.toLowerCase().includes(T.toLowerCase()))??[];return(0,t.jsx)(f.Dialog,{open:e,onOpenChange:y,children:(0,t.jsx)(f.DialogContent,{className:"p-0 gap-0",style:{maxWidth:"36rem",overflow:"hidden"},children:(0,t.jsxs)("div",{className:"flex flex-col max-h-[60vh] overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-5 pt-5 pb-3 shrink-0",children:[(0,t.jsx)(f.DialogTitle,{children:x?k("folder.selectGitRepo"):k("folder.selectFolder")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:k("folder.hint")})]}),(0,t.jsxs)("div",{className:"border-t border-border px-4 pt-3 pb-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.manualInput")}),(0,t.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,t.jsx)(m.Input,{ref:L,value:M,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&U(),placeholder:"/path/to/your/project",title:M,className:"flex-1 min-w-0"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:U,className:"h-8 px-3 shrink-0",children:k("folder.goTo")})]})]}),(0,t.jsxs)("div",{className:"px-4 py-2 shrink-0",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("folder.searchDir")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsx)(l.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("input",{value:T,onChange:e=>O(e.target.value),placeholder:"Filter folders and files...",className:"h-8 w-full rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-y border-border px-4 py-2 shrink-0 min-w-0",children:[(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>S?.homePath&&B(S.homePath),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(s.Home,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Home"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{S&&("__DRIVES__"===S.parentPath?R(!0):(R(!1),B(S.parentPath)))},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(i.ChevronUp,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Parent"})]}),S?.drives&&S.drives.length>0&&(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:I?"default":"outline",size:"icon-sm",onClick:()=>R(e=>!e),className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(o.HardDrive,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:"Drives"})]}),(0,t.jsxs)(p.Tooltip,{children:[(0,t.jsx)(p.TooltipTrigger,{render:(0,t.jsx)(h.Button,{variant:"outline",size:"icon-sm",onClick:()=>{A(!0),D(""),setTimeout(()=>V.current?.focus(),50)},className:"shrink-0 text-muted-foreground"}),children:(0,t.jsx)(c.FolderPlus,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(p.TooltipContent,{side:"bottom",sideOffset:4,children:k("folder.newFolder")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground font-mono",title:S?.currentPath??"",children:S?.currentPath??"..."})]}),(0,t.jsxs)(v.ScrollArea,{className:"min-h-0 flex-1",children:[F&&(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-border/30 px-4 py-2",children:[(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("input",{ref:V,value:z,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&_(),"Escape"===e.key&&H()},placeholder:k("folder.newFolderPlaceholder"),className:"h-7 flex-1 rounded-md border border-border bg-background px-2 text-sm text-foreground placeholder-muted-foreground outline-none focus:border-ring focus:ring-1 focus:ring-ring"}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:_,disabled:!z.trim(),className:"text-emerald-400 hover:text-emerald-300",children:(0,t.jsx)(d.Check,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:H,className:"text-muted-foreground",children:(0,t.jsx)(u.X,{className:"h-3.5 w-3.5"})})]}),C&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}),E&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-rose-400",children:E}),I&&S?.drives&&S.drives.map(e=>(0,t.jsxs)("button",{onClick:()=>{var t;return t=e.path,void(R(!1),B(t))},className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[(0,t.jsx)(o.HardDrive,{className:"h-4 w-4 text-blue-400 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:e.path})]},e.path)),!I&&!C&&!E&&0===$.length&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:k("folder.empty")}),!I&&!C&&!E&&$.map(e=>(0,t.jsxs)("button",{onClick:()=>{e.isGit||x?(b(e.path),y(!1)):B(e.path)},onDoubleClick:()=>B(e.path),className:"flex w-full items-center gap-3 border-b border-border/30 px-4 py-2.5 text-left transition-colors hover:bg-accent last:border-b-0",children:[e.isGit?(0,t.jsx)(n.FolderGit2,{className:"h-4 w-4 text-emerald-400 shrink-0"}):(0,t.jsx)(a.Folder,{className:"h-4 w-4 text-primary/70 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-sm text-foreground truncate",children:e.name}),e.isGit&&(0,t.jsx)("span",{className:"shrink-0 rounded-md bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-400 ring-1 ring-emerald-500/20",children:"git"})]},e.path))]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 px-5 py-3 shrink-0 border-t border-border",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>y(!1),children:k("common.cancel")}),(0,t.jsx)(h.Button,{onClick:()=>{S?.currentPath&&(b(S.currentPath),y(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:k("folder.selectPath")})]})]})})})}])},905455,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["SegmentedControl",0,function({options:e,value:a,onChange:n,className:s}){return(0,t.jsx)("div",{className:(0,r.cn)("inline-flex rounded-md border border-border bg-muted p-1 gap-1",s),children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e.value),className:(0,r.cn)("rounded px-3 py-1 text-sm transition-colors",a===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}])},233274,e=>{"use strict";let t=(0,e.i(572989).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],233274)},614318,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("60d844213b06bdf9b556f80d11cf318691a6b9ea5e",t.callServer,void 0,t.findSourceMapURL,"analyzeProjectDirectory");e.s(["analyzeProjectDirectory",0,r])},188013,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a854914e1c3d19dad8786e65c306c87611ade1f8",t.callServer,void 0,t.findSourceMapURL,"createProject");e.s(["createProject",0,r])},232545,e=>{"use strict";let t=(0,e.i(572989).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],232545)},538059,(e,t,r)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:r,name:a,state:n="value"}){let{current:s}=t.useRef(void 0!==e),[i,l]=t.useState(r),o=t.useCallback(e=>{s||l(e)},[]);return[s?e:i,o]}])},890514,551974,e=>{"use strict";e.i(708878);var t,r=e.i(462902),a=e.i(965652),n=e.i(954588);let s=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),i={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},l={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...l};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,l,"DEFAULT_VALIDITY_STATE",0,i,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[s.valid]:""}:{[s.invalid]:""}}],551974);let c=a.createContext({invalid:void 0,name:void 0,validityData:{state:i,errors:[],error:"",value:"",initialValue:null},setValidityData:n.NOOP,disabled:void 0,touched:l.touched,setTouched:n.NOOP,dirty:l.dirty,setDirty:n.NOOP,filled:l.filled,setFilled:n.NOOP,focused:l.focused,setFocused:n.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=n.EMPTY_OBJECT)=>e,getInputValidationProps:(e=n.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,c,"useFieldRootContext",0,function(e=!0){let t=a.useContext(c);if(t.setValidityData===n.NOOP&&!e)throw Error((0,r.default)(28));return t}],890514)},571870,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(a)}])},179279,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let a=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,a,"useLabelableContext",0,function(){return t.useContext(a)}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},397791,e=>{"use strict";var t=e.i(92615),r=e.i(102094),a=e.i(887642),n=e.i(682354),s=e.i(804849),i=e.i(207516),l=e.i(179279);e.s(["useLabel",0,function(e={}){let o,{id:c,fallbackControlId:d,native:u=!1,setLabelId:f,focusControl:h}=e,{controlId:m,setLabelId:p}=(0,l.useLabelableContext)(),g=(0,a.useStableCallback)(e=>{p(e),f?.(e)}),v=(o=(0,i.useBaseUiId)(c),(0,s.useIsoLayoutEffect)(()=>(g(o),()=>{g(void 0)}),[o,g]),o),y=m??d;function b(e){let a=(0,n.getTarget)(e.nativeEvent);a?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),u||function(e){if(h)return h(e,y);if(!y)return;let a=(0,r.ownerDocument)(e.currentTarget).getElementById(y);(0,t.isHTMLElement)(a)&&a.focus({focusVisible:!0})}(e))}return u?{id:v,htmlFor:y??void 0,onMouseDown:b}:{id:v,onClick:b,onPointerDown(e){e.preventDefault()}}}],397791)},103353,e=>{"use strict";var t=e.i(965652),r=e.i(804849),a=e.i(887642),n=e.i(903224),s=e.i(92615),i=e.i(954588),l=e.i(207516),o=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:c,implicit:d=!1,controlRef:u}=e,{controlId:f,registerControlId:h}=(0,o.useLabelableContext)(),m=(0,l.useBaseUiId)(c),p=d?f:void 0,g=(0,n.useRefWithInit)(()=>Symbol("labelable-control")),v=t.useRef(!1),y=t.useRef(null!=c),b=(0,a.useStableCallback)(()=>{v.current&&h!==i.NOOP&&(v.current=!1,h(g.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(h!==i.NOOP){if(d){let t=u?.current;e=(0,s.isElement)(t)&&null!=t.closest("label")?c??null:p??m}else if(null!=c)y.current=!0,e=c;else{if(!y.current)return void b();e=m}if(void 0===e)return void b();v.current=!0,h(g.current,e)}},[c,u,p,h,d,m,g,b]),t.useEffect(()=>b,[b]),f??m}])},421689,e=>{"use strict";var t=e.i(585012),r=e.i(804849),a=e.i(887642),n=e.i(956181),s=e.i(571870),i=e.i(890514);e.s(["useField",0,function(e){let{enabled:l=!0,value:o,id:c,name:d,controlRef:u,commit:f}=e,{formRef:h}=(0,s.useFormContext)(),{invalid:m,markedDirtyRef:p,validityData:g,setValidityData:v}=(0,i.useFieldRootContext)(),y=(0,a.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!l)return;let e=o;void 0===e&&(e=y()),null===g.initialValue&&null!==e&&v(t=>({...t,initialValue:e}))},[l,v,o,g.initialValue,y]),(0,r.useIsoLayoutEffect)(()=>{l&&c&&h.current.fields.set(c,{getValue:y,name:d,controlRef:u,validityData:(0,n.getCombinedFieldValidityData)(g,m),validate(e=!0){let r=o;void 0===r&&(r=y()),p.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,u,l,h,y,c,m,p,d,g,o]),(0,r.useIsoLayoutEffect)(()=>{let e=h.current.fields;return()=>{c&&e.delete(c)}},[h,c])}])},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},453889,e=>{"use strict";let t=(0,e.i(572989).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],453889)},998626,e=>{"use strict";let t=(0,e.i(572989).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],998626)},59737,e=>{"use strict";let t=(0,e.i(572989).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},977982,472074,e=>{"use strict";let t=(0,e.i(572989).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],977982);var r=e.i(792566);e.s(["ChevronUp",()=>r.default],472074)},194358,e=>{"use strict";let t=(0,e.i(572989).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],194358)},567098,e=>{"use strict";let t=(0,e.i(572989).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},770303,e=>{"use strict";var t=e.i(289721),r=e.i(965652),a=e.i(514798);let n=(0,a.createServerReference)("40a72d2e11016792a7be09074a65e6daa439d5a87a",a.callServer,void 0,a.findSourceMapURL,"checkExtension");var s=e.i(324978);let i=(0,a.createServerReference)("4020cafb3c50ccfd1680566c22b87061c1447e23f8",a.callServer,void 0,a.findSourceMapURL,"uninstallExtension");var l=e.i(887911);let o={installed:!1},c=(0,r.createContext)(null);e.s(["ExtensionContext",0,c,"ExtensionProvider",0,function({children:e,initialStatus:a}){let[d,u]=(0,r.useState)(()=>a??Object.fromEntries((0,l.listExtensionMetadata)().map(e=>[e.id,o]))),[f,h]=(0,r.useState)(new Set),m=(0,r.useRef)(new Set),p=(0,r.useCallback)(async e=>{let t=await n(e);u(r=>({...r,[e]:t}))},[]),g=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"install already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await (0,s.installExtension)(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),v=(0,r.useCallback)(async e=>{if(m.current.has(e))return{success:!1,error:"operation already in progress"};m.current.add(e),h(t=>{let r=new Set(t);return r.add(e),r});try{let t=await i(e);return t.success&&await p(e),t}finally{m.current.delete(e),h(t=>{let r=new Set(t);return r.delete(e),r})}},[p]),y=(0,r.useMemo)(()=>({statusMap:d,loading:!1,installing:f,refresh:p,install:g,uninstall:v}),[d,f,p,g,v]);return(0,t.jsx)(c.Provider,{value:y,children:e})}],770303)},185403,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("601406ecac79b3ad03802ebdad7fee412b1cd242a3",t.callServer,void 0,t.findSourceMapURL,"getConfigValue");e.s(["getConfigValue",0,r])},386343,125177,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,r],386343);let a=(0,t.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["Bell",0,a],125177)},243288,e=>{e.v(t=>Promise.all(["static/chunks/0fovq74l0wh7c.js","static/chunks/0ep-qrl_zzch8.js","static/chunks/17oc2l.ekcs8b.css"].map(t=>e.l(t))).then(()=>t(346069)))},427768,e=>{e.v(t=>Promise.all(["static/chunks/05lky664ou92k.js","static/chunks/0o6zqtzz_7ysr.js"].map(t=>e.l(t))).then(()=>t(103363)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487976,e=>{"use strict";var r=e.i(289721),t=e.i(965652),n=e.i(946822),l=e.i(40448),a=e.i(821957),o=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487976,e=>{"use strict";var r=e.i(289721),t=e.i(965652),n=e.i(946822),l=e.i(40448),a=e.i(821957),o=e.i(433171),c=e.i(461526);e.s(["PreviewLogTerminal",0,function({previewKey:e,taskId:i}){let{resolvedTheme:u}=(0,a.useTheme)(),s=(0,t.useRef)(null),d=(0,t.useRef)(null),f=(0,t.useRef)(null),m=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!s.current)return;let r="light"!==u,t=new n.Terminal({fontFamily:"Menlo, Monaco, 'Courier New', monospace",fontSize:12,scrollback:5e3,cursorBlink:!1,disableStdin:!0,allowTransparency:!1,convertEol:!0,theme:r?{background:"#0a0a0a",foreground:"#e5e5e5"}:{background:"#fafafa",foreground:"#171717"}}),a=new l.FitAddon;t.loadAddon(a),t.open(s.current);let w=s.current.querySelector(".xterm-helper-textarea");w&&(w.style.opacity="0"),d.current=t,m.current=a;try{a.fit()}catch{}let y=!1,g=null;(async()=>{let r=await (0,o.getActualWsPort)();if(y)return;let n=new URLSearchParams({taskId:c.PREVIEW_TASK_ID,role:"terminal",previewKey:e,connectionId:crypto.randomUUID(),clientTaskId:i});(g=new WebSocket(`ws://localhost:${r}/?${n.toString()}`)).binaryType="arraybuffer",f.current=g,g.onmessage=e=>{let r="string"==typeof e.data?e.data:new TextDecoder().decode(e.data);t.write(r)}})();let b=()=>{try{m.current?.fit()}catch{}};return window.addEventListener("resize",b),()=>{y=!0,window.removeEventListener("resize",b),f.current?.close(),f.current=null,d.current&&(d.current.dispose(),d.current=null),m.current=null}},[e,i,u]),(0,r.jsx)("div",{ref:s,className:"size-full bg-black"})}])},461834,e=>{e.n(e.i(487976))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,645119,e=>{"use strict";var t=e.i(289721),s=e.i(965652),r=e.i(538059),n=e.i(210702),a=e.i(232545),i=e.i(487278),o=e.i(368490),l=e.i(259846),d=e.i(572989);let c=(0,d.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var x=e.i(519455),m=e.i(759684),u=e.i(606393),p=e.i(226145),h=e.i(340873),f=e.i(263938),g=e.i(960518),b=e.i(453889),v=e.i(645378);let j=(0,d.default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var N=e.i(464249);let y=(0,d.default)("package-check",[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 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.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]),w=(0,d.default)("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);var C=e.i(746798),S=e.i(685149),k=e.i(533499);let D=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function T(e){return D[function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)>>>0;return t}(e)%D.length]}let E={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};function B({name:e}){let{t:s}=(0,k.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${T(e)}`,children:e}):(0,t.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:s("version.type.uncategorized")})}function I({status:e}){let{t:s}=(0,k.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${E[e]}`,children:s(`version.status.${e}`)})}function L(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${s}-${r}`}let R=Object.fromEntries(S.BOARD_COLUMNS.map(e=>[e.id,e.color]));function $({children:e,className:s}){return(0,t.jsx)("span",{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground ${s??""}`,children:e})}function _({task:e,onOpenDetail:r}){let{t:n}=(0,k.useI18n)(),[a,i]=(0,s.useState)(!1),l="CANCELLED"===e.status?"text-muted-foreground line-through decoration-muted-foreground/40":"DONE"===e.status?"text-muted-foreground":"text-foreground";return(0,t.jsxs)("div",{className:"rounded-[10px]",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center gap-2.5 rounded-[10px] px-2.5 py-2.5 text-left transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(o.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${a?"rotate-90":""}`}),(0,t.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${R[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:`text-[13.5px] font-medium ${l}`,children:e.title}),e.labels.map(({label:e})=>(0,t.jsx)("span",{className:"rounded-full border border-border px-1.5 py-px text-[10.5px] text-muted-foreground",style:e.color?{borderColor:e.color+"55",color:e.color}:void 0,children:e.name},e.id)),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"flex w-16 flex-none justify-center",children:(0,t.jsx)("span",{className:`rounded-[5px] px-1.5 py-px text-[10.5px] font-bold ${S.PRIORITY_CONFIG[e.priority]?.color??S.PRIORITY_CONFIG.LOW.color}`,children:e.priority})}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsxs)("span",{className:"flex w-[72px] flex-none items-center gap-1.5",children:[(0,t.jsx)("span",{className:`h-1.5 w-1.5 flex-none rounded-full ${R[e.status]??"bg-slate-400"}`}),(0,t.jsx)("span",{className:"truncate text-[10.5px] text-muted-foreground",children:n(`version.taskStatus.${e.status}`)})]}),(0,t.jsx)("span",{className:"h-3 w-px bg-border flex-none"}),(0,t.jsx)("span",{className:"flex w-6 flex-none justify-center",children:r&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground",onClick:t=>{t.stopPropagation(),r(e.id)}}),children:(0,t.jsx)(w,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:n("version.detail")})]})})]}),a&&(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 pb-3 pl-[30px] pr-3 pt-1",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(b.FolderOpen,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.resources")})]}),0===e.assets.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.resources")}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.assets.map(e=>{var s;let r=e.mimeType?.startsWith("image/");return(0,t.jsxs)("span",{className:"inline-flex cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-[12px] text-foreground shadow-sm transition-colors hover:border-primary/50",children:[r?(0,t.jsx)(j,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(v.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{children:e.filename}),null!=e.size&&(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/60",children:(s=e.size)<1024?`${s} B`:s<1048576?`${Math.round(s/1024)} KB`:`${(s/1048576).toFixed(1)} MB`})]},e.id)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(v.FileText,{className:"h-3 w-3 text-muted-foreground/60"}),(0,t.jsx)("span",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground/60",children:n("version.notes")})]}),0===e.notes.length?(0,t.jsx)("p",{className:"text-[12px] italic text-muted-foreground/60",children:n("version.empty.notes")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:e.notes.map(e=>(0,t.jsx)("div",{className:"rounded-lg border border-border border-l-violet-500/50 bg-background px-2.5 py-2 shadow-sm [border-left-width:3px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[12.5px] font-semibold text-foreground",children:e.title}),e.category&&(0,t.jsx)("span",{className:"rounded-[5px] border border-violet-500/30 bg-violet-500/15 px-1.5 py-px text-[10px] font-bold text-violet-300",children:e.category})]})},e.id))})]})]})]})}function A({version:e,diffStat:r,onEdit:n,onRelease:a,onViewDiff:i,onOpenTaskDetail:l}){var d;let c,{t:m}=(0,k.useI18n)(),[b,v]=(0,s.useState)(e.isCurrent),j="RELEASED"===e.status,w="ACTIVE"===e.status,S=e.tasks.length,D=e.tasks.filter(e=>"DONE"===e.status).length,T=!!(e.releaseCommit||r),E=(c=`${S} ${m("version.tasksCount")}`,D>0&&D<S?`${c} \xb7 ${D} ${m("version.doneCount")}`:D>0&&D===S?`${c} \xb7 ${m("version.allDone")}`:c);return(0,t.jsxs)("div",{className:["overflow-hidden rounded-[14px] border bg-card shadow-sm transition-shadow duration-150 hover:shadow-md",e.isCurrent?"border-border border-l-2 border-l-primary ring-1 ring-primary/20":"border-border",j?"opacity-[.96]":""].filter(Boolean).join(" "),children:[(0,t.jsx)("button",{type:"button",onClick:()=>v(e=>!e),className:"w-full text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsxs)("div",{className:"px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(o.ChevronRight,{className:`h-4 w-4 flex-none text-muted-foreground/60 transition-transform duration-150 ${b?"rotate-90":""}`}),(0,t.jsx)("span",{className:"font-mono text-[14.5px] font-bold text-foreground",children:e.number}),(0,t.jsx)("span",{className:"text-[14.5px] font-semibold text-foreground",children:e.name}),(0,t.jsx)(B,{name:e.type?.name??null}),(0,t.jsx)(I,{status:e.status}),e.isCurrent&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-primary/30 bg-primary/15 px-2.5 py-0.5 text-[11px] font-bold text-primary shadow-sm",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-primary opacity-90"}),m("version.current")]}),(0,t.jsx)("span",{className:"flex-1"}),S>0&&(0,t.jsx)("span",{className:"text-[11.5px] text-muted-foreground",children:E}),(0,t.jsxs)("span",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[n&&(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{render:(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>n(e.id)}),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(C.TooltipContent,{children:m("version.edit")})]}),w&&a&&(0,t.jsxs)(x.Button,{variant:"outline",className:"h-7 px-2 text-xs font-semibold",onClick:()=>a(e.id),children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5"}),m("version.release")]})]})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-2",children:[j&&e.releasedAt?(0,t.jsxs)($,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),m("version.releasedAt"),(0,t.jsx)("strong",{className:"text-foreground",children:L(e.releasedAt)})]}):e.startDate||e.targetDate?(0,t.jsxs)($,{children:[(0,t.jsx)(u.Calendar,{className:"h-3 w-3"}),e.startDate?L(e.startDate):"—"," → ",e.targetDate?(0,t.jsx)("strong",{className:"text-foreground",children:L(e.targetDate)}):"—"]}):null,e.baseBranch&&(0,t.jsxs)($,{children:[(0,t.jsx)(p.GitBranch,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.baseBranch})]}),e.baseCommit&&(0,t.jsxs)($,{children:[(0,t.jsx)(h.GitCommitHorizontal,{className:"h-3 w-3"}),m("version.field.baseCommit"),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:(d=e.baseCommit)?d.slice(0,7):""})]}),j&&(0,t.jsxs)($,{children:[(0,t.jsx)(f.Tag,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-mono text-[11px] text-foreground",children:e.number})]}),r&&(0,t.jsxs)($,{children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),!j&&(0,t.jsx)("span",{className:"text-muted-foreground",children:m("version.diff.live")}),(0,t.jsxs)("span",{className:"font-bold text-emerald-400",children:["+",r.additions.toLocaleString()]}),(0,t.jsxs)("span",{className:"font-bold text-rose-400",children:["−",r.deletions.toLocaleString()]}),(0,t.jsxs)("span",{className:"text-muted-foreground",children:["· ",r.files," ",m("version.diff.files")]})]}),T&&i&&(0,t.jsxs)(x.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground",onClick:t=>{t.stopPropagation(),i(e.id)},children:[(0,t.jsx)(g.GitCompare,{className:"h-3 w-3"}),m("version.diff.view")," →"]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:e.description})]})}),b&&S>0&&(0,t.jsx)("div",{className:"border-t border-dashed border-border bg-muted/40 px-2 pb-2 pt-1.5",children:e.tasks.map(e=>(0,t.jsx)(_,{task:e,onOpenDetail:l},e.id))})]})}var O=e.i(360112),P=e.i(597746),V=e.i(456346),z=e.i(776639),M=e.i(793479),F=e.i(110204),U=e.i(918385),H=e.i(337822),G=e.i(317056),K=e.i(699375),W=e.i(624687),Y=e.i(514798);let q=(0,Y.createServerReference)("40fb4338ef5b6898b84f59d2da6e6504301acb3023",Y.callServer,void 0,Y.findSourceMapURL,"createVersion"),J=(0,Y.createServerReference)("603c6cfff512fe1ee85089665d8aeab407397fefe5",Y.callServer,void 0,Y.findSourceMapURL,"updateVersion"),Q=(0,Y.createServerReference)("40f34adc3a4bc44349becebf545a2bf9a587af72c4",Y.callServer,void 0,Y.findSourceMapURL,"getVersionTypes");var X=e.i(886893),Z=e.i(8089),ee=e.i(998626);let et=(0,Y.createServerReference)("40cbba956dbece8fd6d8b86e5d9b977244a93c3d2d",Y.callServer,void 0,Y.findSourceMapURL,"createVersionType"),es=(0,Y.createServerReference)("60c2746f2b48f56b61f8f62ba7dffa1dece49fa766",Y.callServer,void 0,Y.findSourceMapURL,"updateVersionType"),er=(0,Y.createServerReference)("403c823aaf576e14530429fc747485a789f83f6f80",Y.callServer,void 0,Y.findSourceMapURL,"deleteVersionType");function en({open:e,onOpenChange:r,workspaceId:n,onChanged:a}){let{t:i}=(0,k.useI18n)(),[o,l]=(0,s.useState)([]),[d,c]=(0,s.useState)(""),[m,u]=(0,s.useState)({}),[p,h]=(0,s.useTransition)(),f=async()=>{let e=await Q(n);l(e),u(t=>{let s={};return e.forEach(e=>{s[e.id]=e.id in t?t[e.id]:e.name}),s})};(0,s.useEffect)(()=>{e&&(f(),c(""))},[e,n]);let g=()=>{let e=d.trim();e&&h(async()=>{try{await et({workspaceId:n,name:e}),c(""),await f(),a?.(),O.toast.success(i("version.type.add"))}catch(e){O.toast.error(e instanceof Error?e.message:String(e))}})};return(0,t.jsx)(z.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(z.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(z.DialogHeader,{children:(0,t.jsx)(z.DialogTitle,{children:i("version.manageTypes")})}),(0,t.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(M.Input,{value:d,onChange:e=>c(e.target.value),placeholder:i("version.type.namePlaceholder"),disabled:p,onKeyDown:e=>{"Enter"===e.key&&g()},className:"flex-1"}),(0,t.jsx)(x.Button,{onClick:g,disabled:p||!d.trim(),children:i("version.type.add")})]}),0===o.length?(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground py-4",children:i("version.type.empty")}):(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:o.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsx)("span",{className:`inline-flex h-2.5 w-2.5 flex-none rounded-full ${T(m[e.id]??e.name).split(" ").filter(e=>e.startsWith("bg-"))[0]??"bg-muted"}`}),(0,t.jsx)(M.Input,{value:m[e.id]??e.name,onChange:t=>u(s=>({...s,[e.id]:t.target.value})),onBlur:()=>(e=>{let t=(m[e]??"").trim();if(!t)return;let s=o.find(t=>t.id===e);s?.name!==t&&h(async()=>{try{await es(e,{name:t}),await f(),a?.()}catch(t){O.toast.error(t instanceof Error?t.message:String(t)),u(t=>({...t,[e]:s?.name??""}))}})})(e.id),onKeyDown:e=>{"Enter"===e.key&&e.target.blur()},disabled:p,className:"h-7 flex-1 border-transparent bg-transparent shadow-none focus-visible:border-input focus-visible:bg-background focus-visible:shadow-sm"}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-none text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void(window.confirm(i("version.type.deleteConfirm"))&&h(async()=>{try{await er(t),await f(),a?.()}catch(e){O.toast.error(e instanceof Error?e.message:String(e))}}))},disabled:p,children:(0,t.jsx)(ee.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))})]})]})})}function ea(e){if(!e)return"";let t="string"==typeof e?new Date(e):e;if(isNaN(t.getTime()))return"";let s=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0");return`${s}-${r}-${n}`}function ei(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function eo({open:e,onOpenChange:r,projectId:n,workspaceId:a,editVersion:i,defaultBaseBranch:o,projectLocalPath:l,onSuccess:d}){let{t:c}=(0,k.useI18n)(),m=!!i,[u,h]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,v]=(0,s.useState)(""),[j,N]=(0,s.useState)([]),[y,w]=(0,s.useState)(!1),[C,S]=(0,s.useState)(""),[D,T]=(0,s.useState)(""),[E,B]=(0,s.useState)(""),[I,L]=(0,s.useState)(""),[R,$]=(0,s.useState)(!1),[_,A]=(0,s.useState)([]),[Y,ee]=(0,s.useState)(!1),[et,es]=(0,s.useState)(!1),er=!!l,[el,ed]=(0,s.useTransition)();return(0,s.useEffect)(()=>{e&&(i?(h(i.number),g(i.name),v(i.typeId??""),S(i.baseBranch??""),T(ea(i.startDate)),B(ea(i.targetDate)),L(i.description??"")):(h(""),g(""),v(""),S(o??""),T(""),B(""),L("")),$(!1))},[e,i,o]),(0,s.useEffect)(()=>{e&&Q(a).then(N).catch(()=>N([]))},[e,a]),(0,s.useEffect)(()=>{e&&er?(ee(!0),(0,X.getProjectBranches)(l).then(A).catch(()=>A([])).finally(()=>ee(!1)),(0,Z.fetchRemoteBranches)(l).then(()=>(0,X.getProjectBranches)(l).then(A)).catch(()=>{})):A([])},[e,er,l]),(0,t.jsxs)(z.Dialog,{open:e,onOpenChange:r,children:[(0,t.jsxs)(z.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(z.DialogHeader,{children:(0,t.jsx)(z.DialogTitle,{children:m?c("version.edit"):c("version.new")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(F.Label,{htmlFor:"version-number",children:[c("version.field.number"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(M.Input,{id:"version-number",value:u,onChange:e=>h(e.target.value),placeholder:c("version.placeholder.number"),disabled:el})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsxs)(F.Label,{htmlFor:"version-name",children:[c("version.field.name"),(0,t.jsx)("span",{className:"text-destructive ml-0.5",children:"*"})]}),(0,t.jsx)(M.Input,{id:"version-name",value:f,onChange:e=>g(e.target.value),placeholder:c("version.placeholder.name"),disabled:el})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(F.Label,{children:c("version.field.type")}),(0,t.jsxs)(U.Select,{value:b||"__none__",onValueChange:e=>{v(e&&"__none__"!==e?e:"")},children:[(0,t.jsx)(U.SelectTrigger,{className:"w-full",disabled:el,children:(0,t.jsx)("span",{className:"truncate",children:b?j.find(e=>e.id===b)?.name??c("version.type.uncategorized"):c("version.type.uncategorized")})}),(0,t.jsxs)(U.SelectContent,{children:[(0,t.jsx)(U.SelectItem,{value:"__none__",children:c("version.type.uncategorized")}),j.map(e=>(0,t.jsx)(U.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)(x.Button,{type:"button",variant:"ghost",size:"sm",className:"h-auto justify-start px-0 py-0.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>w(!0),disabled:el,children:["+ ",c("version.manageTypes")]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(F.Label,{children:c("version.field.baseBranch")}),Y?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:c("task.branchLoading")}):er&&_.length>0?(0,t.jsxs)(H.Popover,{open:et,onOpenChange:es,children:[(0,t.jsxs)(H.PopoverTrigger,{className:"flex h-8 w-full items-center gap-2 rounded-lg border border-input bg-transparent px-3 text-sm transition-colors hover:bg-accent focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",disabled:el,"data-testid":"version-branch-selector",children:[(0,t.jsx)(p.GitBranch,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:`flex-1 truncate text-left text-xs ${C?"font-mono":"text-muted-foreground"}`,children:C||c("version.field.noBranch")}),(0,t.jsx)(V.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(H.PopoverContent,{className:"p-0",align:"start",children:(0,t.jsxs)(G.Command,{children:[(0,t.jsx)(G.CommandInput,{placeholder:c("task.branchSearch")}),(0,t.jsxs)(G.CommandList,{children:[(0,t.jsx)(G.CommandEmpty,{children:c("task.branchNone")}),(0,t.jsxs)(G.CommandGroup,{children:[(0,t.jsxs)(G.CommandItem,{value:"__none__",onSelect:()=>{S(""),es(!1)},children:[(0,t.jsx)("span",{className:"flex-1 truncate text-muted-foreground",children:c("version.field.noBranch")}),!C&&(0,t.jsx)(P.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]}),_.map(e=>(0,t.jsxs)(G.CommandItem,{value:e,onSelect:()=>{S(e),es(!1)},children:[(0,t.jsx)(p.GitBranch,{className:"mr-2 h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",children:e}),e===C&&(0,t.jsx)(P.Check,{className:"ml-auto h-3 w-3 shrink-0 text-primary"})]},e))]})]})]})})]}):(0,t.jsx)(M.Input,{id:"version-base-branch",value:C,onChange:e=>S(e.target.value),placeholder:"main",disabled:el})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(F.Label,{htmlFor:"version-start-date",children:c("version.field.startDate")}),(0,t.jsx)("input",{id:"version-start-date",type:"date",value:D,onChange:e=>T(e.target.value),disabled:el,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(F.Label,{htmlFor:"version-target-date",children:c("version.field.targetDate")}),(0,t.jsx)("input",{id:"version-target-date",type:"date",value:E,onChange:e=>B(e.target.value),disabled:el,className:"h-8 w-full rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)(F.Label,{htmlFor:"version-description",children:c("version.field.description")}),(0,t.jsx)(W.Textarea,{id:"version-description",value:I,onChange:e=>L(e.target.value),rows:3,disabled:el})]}),!m&&(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(K.Switch,{id:"version-set-current",checked:R,onCheckedChange:$,disabled:el}),(0,t.jsx)(F.Label,{htmlFor:"version-set-current",className:"cursor-pointer",children:c("version.field.setCurrent")})]})]}),(0,t.jsxs)(z.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:el,children:c("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{u.trim()&&f.trim()&&ed(async()=>{try{m&&i?await J(i.id,{number:u.trim(),name:f.trim(),typeId:b||null,baseBranch:C.trim()||null,startDate:ei(D)??null,targetDate:ei(E)??null,description:I.trim()||null}):await q({projectId:n,number:u.trim(),name:f.trim(),typeId:b||void 0,baseBranch:C.trim()||void 0,startDate:ei(D),targetDate:ei(E),description:I.trim()||void 0,setCurrent:R}),O.toast.success(m?c("version.edit"):c("version.new")),r(!1),d?.()}catch(e){O.toast.error(e instanceof Error?e.message:String(e))}})},disabled:el||!u.trim()||!f.trim(),children:m?c("common.save"):c("common.create")})]})]}),(0,t.jsx)(en,{open:y,onOpenChange:w,workspaceId:a,onChanged:()=>Q(a).then(N)})]})}let el=(0,Y.createServerReference)("6035c458218064df3e57b0f419986fa4d1f81193f3",Y.callServer,void 0,Y.findSourceMapURL,"releaseVersion");function ed({open:e,onOpenChange:r,version:n,candidates:a,onSuccess:i}){let{t:o}=(0,k.useI18n)(),[l,d]=(0,s.useState)(""),[c,m]=(0,s.useTransition)();(0,s.useEffect)(()=>{e&&d("")},[e,n]);let u=a.find(e=>e.id===l),p=a.length>0,h=p&&!!l&&!c;return(0,t.jsx)(z.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(z.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(z.DialogHeader,{children:(0,t.jsx)(z.DialogTitle,{children:o("version.releaseAction")})}),(0,t.jsxs)("div",{className:"grid gap-4 py-2",children:[n&&(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[n.number," · ",n.name]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{children:o("version.release.rolloverHint")}),n?.unfinishedCount!==void 0&&n.unfinishedCount>0&&(0,t.jsxs)("span",{className:"ml-1 font-medium text-foreground",children:["(",n.unfinishedCount,")"]})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:o("version.release.nextVersion")}),p?(0,t.jsxs)(U.Select,{value:l,onValueChange:e=>{e&&d(e)},disabled:c,children:[(0,t.jsx)(U.SelectTrigger,{className:"w-full",children:(0,t.jsx)("span",{className:"truncate",children:u?`${u.number} \xb7 ${u.name}`:""})}),(0,t.jsx)(U.SelectContent,{children:a.map(e=>(0,t.jsxs)(U.SelectItem,{value:e.id,children:[e.number," · ",e.name]},e.id))})]}):(0,t.jsx)("p",{className:"text-xs text-destructive",children:o("version.release.noCandidates")})]})]}),(0,t.jsxs)(z.DialogFooter,{children:[(0,t.jsx)(x.Button,{variant:"outline",onClick:()=>r(!1),disabled:c,children:o("common.cancel")}),(0,t.jsx)(x.Button,{onClick:()=>{n&&l&&m(async()=>{try{await el(n.id,l),O.toast.success(o("version.release")),r(!1),i?.()}catch(e){O.toast.error(e instanceof Error?e.message:String(e))}})},disabled:!h,children:o("version.release")})]})]})})}var ec=e.i(400355);let ex=(0,Y.createServerReference)("40735d39dcaad4613132bd765ebf878e8b6cdb32e6",Y.callServer,void 0,Y.findSourceMapURL,"getVersionDiff");var em=e.i(196199);function eu({file:e}){let{t:r}=(0,k.useI18n)(),[n,a]=(0,s.useState)(!0),i=e.to&&"/dev/null"!==e.to?e.to:e.from??"",l=e.additions??0,d=e.deletions??0,c=[];for(let t of e.chunks)for(let e of(c.push({type:"normal",content:t.content,chunkHeader:t.content}),t.changes))c.push({type:e.type,content:e.content});let x=c.length>500,m=x?c.slice(0,500):c;return(0,t.jsxs)("div",{className:"overflow-hidden rounded-[10px] border border-border",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)(o.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${n?"rotate-90":""}`}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono text-[12px] font-medium text-foreground",children:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-emerald-400",children:["+",l]}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] font-bold text-rose-400",children:["−",d]})]}),n&&(0,t.jsxs)("div",{className:"overflow-x-auto",children:[(0,t.jsx)("pre",{className:"m-0 p-0",children:m.map((e,s)=>void 0!==e.chunkHeader?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground bg-muted/40",children:e.content},s):"add"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-emerald-300 bg-emerald-500/10",children:e.content},s):"del"===e.type?(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-rose-300 bg-rose-500/10",children:e.content},s):(0,t.jsx)("div",{className:"whitespace-pre px-3 py-px font-mono text-xs text-muted-foreground",children:e.content},s))}),x&&(0,t.jsx)("p",{className:"border-t border-border px-3 py-2 text-[11px] text-muted-foreground/70 italic",children:r("version.diff.truncated")})]})]})}function ep({open:e,onOpenChange:r,versionId:n,versionLabel:a}){let{t:i}=(0,k.useI18n)(),[o,l]=(0,s.useTransition)(),[d,c]=(0,s.useState)(null),[x,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&n&&(c(null),m(!1),l(async()=>{let e=await ex(n);if(!e)return void m(!0);let t=(0,em.parseUnifiedDiff)(e.patch);0===t.length||""===e.patch?m(!0):c(t)}))},[e,n]),(0,t.jsx)(z.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(z.DialogContent,{className:"sm:max-w-3xl max-h-[80vh] overflow-auto",children:[(0,t.jsx)(z.DialogHeader,{children:(0,t.jsxs)(z.DialogTitle,{children:[i("version.diff.title"),a?` — ${a}`:""]})}),o&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-muted-foreground",children:[(0,t.jsx)(ec.Loader2,{className:"h-5 w-5 animate-spin"}),(0,t.jsx)("span",{className:"text-sm",children:i("version.diff.loading")})]}),!o&&x&&(0,t.jsx)("p",{className:"py-10 text-center text-sm text-muted-foreground",children:i("version.diff.empty")}),!o&&d&&d.length>0&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:d.map((e,s)=>(0,t.jsx)(eu,{file:e},s))})]})})}var eh=e.i(605005);function ef({version:e,isFirst:s,isLast:r,dashed:n=!1,diffStat:a,onEdit:i,onRelease:o,onViewDiff:l,onOpenTaskDetail:d}){return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:["w-px flex-none",s?"h-0":"h-6",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].filter(Boolean).join(" ")}),(0,t.jsx)("div",{className:["z-10 h-3.5 w-3.5 flex-none rounded-full border-2",e.isCurrent?"border-primary bg-primary ring-2 ring-primary/30":"ACTIVE"===e.status?"border-emerald-400 bg-emerald-400":"RELEASED"===e.status?"border-zinc-500 bg-zinc-500":"border-muted-foreground/40 bg-transparent border-dashed"].join(" ")}),!r&&(0,t.jsx)("div",{className:["w-px flex-1",n?"bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]":"bg-border"].join(" ")})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsx)(A,{version:e,diffStat:a??null,onEdit:i,onRelease:o,onViewDiff:l,onOpenTaskDetail:d})})]})}e.s(["VersionTimelineClient",0,function({project:e,workspaceId:d,versions:u,diffStats:p,backlog:h}){let f,{t:g}=(0,k.useI18n)(),b=(0,r.useRouter)(),[v,j]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),[w,C]=(0,s.useState)(!1),[S,D]=(0,s.useState)(!1),[T,E]=(0,s.useState)(null),[B,I]=(0,s.useState)(null),[L,R]=(0,s.useState)(null),[$,A]=(0,s.useState)(!1),O=[...[...u.filter(e=>"RELEASED"!==e.status)].sort((e,t)=>{if(!e.targetDate&&!t.targetDate)return 0;if(!e.targetDate)return 1;if(!t.targetDate)return -1;let s=new Date(t.targetDate).getTime()-new Date(e.targetDate).getTime();return 0!==s?s:new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}),...[...u.filter(e=>"RELEASED"===e.status)].sort((e,t)=>e.releasedAt||t.releasedAt?e.releasedAt?t.releasedAt?new Date(t.releasedAt).getTime()-new Date(e.releasedAt).getTime():-1:1:0)],P=e=>{let t=u.find(t=>t.id===e);t&&(y({id:t.id,number:t.number,name:t.name,typeId:t.typeId??null,baseBranch:t.baseBranch,startDate:t.startDate,targetDate:t.targetDate,description:t.description}),j(!0))},V=e=>{let t=u.find(t=>t.id===e);t&&(E(t),D(!0))},z=e=>{I(e)},M=()=>{y(null),j(!0)},F=()=>{b.refresh()},U=T?u.filter(e=>e.id!==T.id&&("PLANNED"===e.status||"ACTIVE"===e.status)).map(e=>({id:e.id,number:e.number,name:e.name})):[],H=T?T.tasks.filter(e=>"DONE"!==e.status&&"CANCELLED"!==e.status).length:void 0;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"header-xl flex shrink-0 items-center gap-4 border-b px-6",children:[(0,t.jsxs)(n.default,{href:`/workspaces/${d}`,className:"flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[(0,t.jsx)(l.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:g("archive.backToBoard")})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{className:"truncate font-medium",children:e.name}),(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("span",{children:g("version.timeline")})]}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:()=>C(!0),children:[(0,t.jsx)(c,{className:"h-4 w-4"}),g("version.manageTypes")]}),(0,t.jsxs)(x.Button,{onClick:M,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),(0,t.jsx)(m.ScrollArea,{className:"min-h-0 flex-1",children:(0,t.jsx)("div",{className:"px-6 py-6",children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl",children:[0===u.length&&0===h.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-20 text-center text-muted-foreground",children:[(0,t.jsx)("p",{className:"text-sm",children:g("version.empty.list")}),(0,t.jsxs)(x.Button,{variant:"outline",onClick:M,children:[(0,t.jsx)(a.Plus,{className:"h-4 w-4"}),g("version.new")]})]}),O.length>0&&(0,t.jsx)("div",{className:"relative",children:O.map((e,s)=>(0,t.jsx)(ef,{version:e,isFirst:0===s,isLast:s===O.length-1&&0===h.length,diffStat:p[e.id],onEdit:P,onRelease:V,onViewDiff:z,onOpenTaskDetail:R},e.id))}),h.length>0&&(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsxs)("div",{className:"relative flex w-5 flex-none flex-col items-center",children:[(0,t.jsx)("div",{className:"h-6 w-px bg-[repeating-linear-gradient(to_bottom,var(--border)_0_4px,transparent_4px_8px)]"}),(0,t.jsx)("div",{className:"z-10 h-3.5 w-3.5 flex-none rounded-full border-2 border-dashed border-muted-foreground/40 bg-transparent"})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 pb-5",children:(0,t.jsxs)("div",{className:"overflow-hidden rounded-[14px] border border-dashed bg-muted/40 shadow-sm",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>A(e=>!e),className:"w-full px-4 py-3 text-left transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(o.ChevronRight,{className:`h-3.5 w-3.5 flex-none text-muted-foreground/60 transition-transform duration-150 ${$?"rotate-90":""}`}),(0,t.jsx)(i.Archive,{className:"h-4 w-4 flex-none text-muted-foreground/70"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-foreground",children:g("version.history")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:g("version.historySub")}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsxs)("span",{className:"text-[11.5px] text-muted-foreground",children:[h.length," ",g("version.tasksCount")]})]}),(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground/70",children:g("version.historyHint")})]}),$&&(0,t.jsx)("div",{className:"border-t border-dashed border-border px-2 pb-2 pt-1.5",children:h.map(e=>(0,t.jsx)(_,{task:e,onOpenDetail:R},e.id))})]})})]})]})})}),(0,t.jsx)(eo,{open:v,onOpenChange:e=>{j(e),e||y(null)},projectId:e.id,workspaceId:d,editVersion:N,defaultBaseBranch:null,projectLocalPath:e.localPath,onSuccess:F}),(0,t.jsx)(en,{open:w,onOpenChange:C,workspaceId:d,onChanged:()=>b.refresh()}),(0,t.jsx)(ed,{open:S,onOpenChange:e=>{D(e),e||E(null)},version:T?{id:T.id,number:T.number,name:T.name,unfinishedCount:H}:null,candidates:U,onSuccess:F}),(0,t.jsx)(ep,{open:!!B,onOpenChange:e=>{e||I(null)},versionId:B,versionLabel:B&&(f=u.find(e=>e.id===B))?`${f.number} ${f.name}`:void 0}),(0,t.jsx)(eh.TaskOverviewDrawer,{open:!!L,onOpenChange:e=>{e||R(null)},taskId:L})]})}],645119)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487486,e=>{"use strict";var t=e.i(565455),r=e.i(581263),s=e.i(294237),a=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:n,...l}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(i({variant:s}),e)},l),render:n,state:{slot:"badge",variant:s}},(0,r.useRenderElement)(o.defaultTagName??"div",o,o)}],487486)},110204,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.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"])},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let r=(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,r],181209)},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)},534490,532035,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40617f6bb0cfbfa10b3120b9a745ef21cf13c88ec8",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],534490);let s=(0,t.createServerReference)("403cb6ed8dcccb6c9e842cd454cf07369dbe3a5bd6",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,s],532035)},313029,e=>{"use strict";let t=(0,e.i(572989).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],313029)},340966,e=>{"use strict";let t=(0,e.i(572989).default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);e.s(["ClipboardList",0,t],340966)},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},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)},981754,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("409012eddb41678dc5ae8edc7c1b5803525520ad94",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,r])},507571,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40773d0bbb088b24951dd0e83d50256f273952e3d1",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},912505,e=>{"use strict";var t=e.i(289721),r=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:s,description:a,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a}),i&&(0,t.jsx)("div",{className:"mt-2",children:i})]})}])},653023,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("7ca389c42512b842416808d6f06c3cfd7f9528d5c1",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},94306,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40f92f8b71e63a406af9b55259ff16d1d1c17578b6",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},659470,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("609c70ee21d50fe0fdbaf2eb9d679dfd044a4b0f22",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r])},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)},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)},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},237988,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("408accb4cc4036960ffbe673d3c54faf7a444d87b1",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},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)},486077,e=>{"use strict";let t=(0,e.i(572989).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],486077)},711554,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(226145),a=e.i(232280),i=e.i(738690),n=e.i(597746),l=e.i(400355),o=e.i(776639),c=e.i(519455),d=e.i(793479),u=e.i(624687),x=e.i(533499);e.s(["CreateBranchDialog",0,function({open:e,onOpenChange:m,branches:h,currentBranch:f,localPath:p,onCreated:g,onError:b}){let{t:v}=(0,x.useI18n)(),[y,j]=(0,r.useState)(""),[N,k]=(0,r.useState)(f),[w,C]=(0,r.useState)(""),[S,M]=(0,r.useState)(!1),[L,R]=(0,r.useState)(""),[T,E]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&(j(""),k(f),C(""),R(""))},[e,f]);let D=[...new Set(h)].filter(e=>e.toLowerCase().includes(L.toLowerCase())),I=async()=>{if(y.trim()){M(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:p,branch:y.trim(),baseBranch:N})});if(e.ok)m(!1),g();else{let t=await e.json();b(t.error||"Unknown error")}}catch{b("Network error")}finally{M(!1)}}};return(0,t.jsx)(o.Dialog,{open:e,onOpenChange:m,children:(0,t.jsxs)(o.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(o.DialogHeader,{children:(0,t.jsx)(o.DialogTitle,{children:v("git.createBranch")})}),(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:v("git.branchName")}),(0,t.jsx)(d.Input,{value:y,onChange:e=>j(e.target.value),placeholder:v("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&I()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>E(!T),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",children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,t.jsx)("span",{className:"font-mono text-xs text-foreground",children:N})]}),(0,t.jsx)(a.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${T?"rotate-180":""}`})]}),T&&(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)(i.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:L,onChange:e=>R(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.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:D.map(e=>(0,t.jsxs)("button",{onClick:()=>{k(e),E(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===N?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e}),e===N&&(0,t.jsx)(n.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.branchDesc")}),(0,t.jsx)(u.Textarea,{value:w,onChange:e=>C(e.target.value),placeholder:v("git.branchDescPlaceholder"),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)(o.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>m(!1),children:v("common.cancel")}),(0,t.jsxs)(c.Button,{onClick:I,disabled:!y.trim()||S,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[S?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,v("common.create")]})]})]})})}])},375306,e=>{"use strict";let t=(0,e.i(572989).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],375306)},244354,e=>{"use strict";async function t(e,r,s={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r,path:e,...s})});if(!a.ok)throw Error((await a.json()).error||`${r} failed`);return a.json()}e.s(["gitAction",0,t])},14842,865514,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(368490),a=e.i(232280),i=e.i(759686),n=e.i(960518),l=e.i(340873),o=e.i(400355),c=e.i(519455),d=e.i(912505),u=e.i(487486),x=e.i(776639),m=e.i(624687),h=e.i(533499);function f({patchState:e,isLargeFold:r,onLoad:s}){let{t:a}=(0,h.useI18n)();return r?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,t.jsx)(c.Button,{variant:"link",onClick:s,className:"h-auto p-0 text-sm",children:a("diff.loadDiff")}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:a("diff.foldedLarge")})]}):e&&"loading"!==e.kind?"error"===e.kind?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,t.jsx)("span",{children:a("diff.loadFailed")}),(0,t.jsx)(c.Button,{variant:"ghost",onClick:s,children:a("diff.retry")})]}):"binary"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.binaryNotShown")}):"empty"===e.kind?(0,t.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:a("diff.noChanges")}):(0,t.jsx)(p,{patch:e.patch??""}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(o.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function p({patch:e}){let{t:r}=(0,h.useI18n)(),s=e.split("\n"),a=s.length>500,i=a?s.slice(0,500):s;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:i.map((e,r)=>{let s=e.startsWith("+++")||e.startsWith("---")?"px-4 block text-muted-foreground":e.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:s,children:e||" "},r)})}),a&&(0,t.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:r("diff.patchTruncated",{n:String(500),total:String(s.length)})})]})}e.s(["TaskDiffView",0,function({taskId:e,files:o,totalAdded:p,totalRemoved:g,hasConflicts:b,conflictFiles:v,onCommit:y,hasUncommitted:j}){let{t:N}=(0,h.useI18n)(),[k,w]=(0,r.useState)(new Set),[C,S]=(0,r.useState)(new Map),[M,L]=(0,r.useState)(!1),[R,T]=(0,r.useState)(""),[E,D]=(0,r.useState)(!1),I=t=>{S(e=>new Map(e).set(t,{kind:"loading"})),fetch(`/api/tasks/${e}/diff-patch?file=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>{S(r=>{let s=new Map(r);return"binary"===e.kind?s.set(t,{kind:"binary"}):"empty"===e.kind?s.set(t,{kind:"empty"}):s.set(t,{kind:"ready",patch:e.patch??""}),s})}).catch(()=>{S(e=>new Map(e).set(t,{kind:"error"}))})};return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[o.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",p]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",g]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:j&&y&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>L(!0),className:"gap-2",children:[(0,t.jsx)(l.GitCommitHorizontal,{className:"h-4 w-4"}),N("diff.commit")]})})]}),b&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(i.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",v.length," conflicting file",1!==v.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:v.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===o.length?(0,t.jsx)(d.EmptyState,{icon:n.GitCompare,title:N("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:o.map(e=>{let r=k.has(e.filename),i=C.get(e.filename),n=e.added+e.removed;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{let t;return t=k.has(e.filename),void(w(t=>{let r=new Set(t);return r.has(e.filename)?r.delete(e.filename):r.add(e.filename),r}),t||e.isBinary||C.has(e.filename)||e.added+e.removed<=200&&I(e.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[r?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(s.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(u.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:N("diff.binary")}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),r&&!e.isBinary&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)(f,{filename:e.filename,patchState:i,isLargeFold:!i&&n>200,onLoad:()=>I(e.filename)})})]},e.filename)})})}),(0,t.jsx)(x.Dialog,{open:M,onOpenChange:L,children:(0,t.jsxs)(x.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsx)(x.DialogTitle,{children:N("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(m.Textarea,{value:R,onChange:e=>T(e.target.value),placeholder:N("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>L(!1),children:N("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(R.trim()&&y){D(!0);try{await y(R.trim()),T(""),L(!1)}finally{D(!1)}}},disabled:!R.trim()||E,children:E?"...":N("diff.commit")})]})]})})]})}],14842);var g=e.i(538059);let b=(0,e.i(572989).default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:s,taskId:a,taskTitle:i,baseBranch:n,fileCount:l,commitCount:d,commitLog:u=[],onMergeComplete:m}){let h=(0,g.useRouter)(),[f,p]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),j=async()=>{p(!0),y(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){s(!1),m(),h.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?y(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):y(t.error??"Merge failed")}catch{y("Network error — merge failed")}finally{p(!1)}};return(0,t.jsx)(x.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(x.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsxs)(x.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(b,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:n})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),u.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:u.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),v&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:v})})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>s(!1),disabled:f,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:j,disabled:f,className:"gap-2",children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],865514)},736530,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40a813cdf74154bec902df674c529f867645c21632",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,r])},862279,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("40c4b3da758ed99d058994e50125e2bacb87c02177",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r])},482951,853640,464656,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("601172fb23e968143b4ab89f03812a9da36edda611",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r],482951);let s=(0,t.createServerReference)("40a0d04e2182c19049121a129bc097fd7a246bb71e",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,s],853640);let a=(0,t.createServerReference)("601e1f2fa0826aad4b151f644631ed3de772839cf3",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],464656)},989383,769824,e=>{"use strict";var t=e.i(572989);let r=(0,t.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,r],989383);let s=(0,t.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);e.s(["History",0,s],769824)},326883,e=>{"use strict";var t=e.i(289721),r=e.i(965652),s=e.i(232280),a=e.i(472074),i=e.i(301348),n=e.i(181209),l=e.i(400355),o=e.i(989383),c=e.i(12659),d=e.i(922541),u=e.i(486077),x=e.i(769824),m=e.i(519455),h=e.i(912505),f=e.i(533499);function p({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(i.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:i,onContinueLatest:n}){let{t:l,locale:o}=(0,f.useI18n)(),[g,b]=(0,r.useState)(null),[v,y]=(0,r.useState)(null);return 0===e.length?(0,t.jsx)(h.EmptyState,{icon:x.History,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(r=>{let x=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(r.gitStats??null),h=function(e,t){if(!e||!t)return"";let r=new Date(t).getTime()-new Date(e).getTime();if(r<0)return"";let s=Math.floor(r/1e3);if(s<60)return`${s}s`;let a=Math.floor(s/60);if(a<60)return`${a}m ${s%60}s`;let i=Math.floor(a/60);return`${i}h ${a%60}m`}(r.startedAt??null,r.endedAt??null),f=g===r.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(p,{status:r.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(r.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(r.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let r=new Date(e),s=Math.floor((new Date().getTime()-r.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",i=r.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===s?i:1===s?"zh"===t?`昨天 ${i}`:`Yesterday ${i}`:s<7?"zh"===t?`${s}天前 ${i}`:`${s}d ago ${i}`:r.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+i}(r.startedAt??null,o)}),h&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",h,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:r.summary||l("execution.noSummary")}),x&&(x.commits||x.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[x.commits?(0,t.jsxs)("span",{children:[x.commits," ",l("execution.commits")]}):null,x.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[x.filesChanged," ",l("execution.files")]})]}):null,x.insertions||x.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),x.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",x.insertions]}):null,x.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",x.deletions]}):null]}):null]}),r.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>y(v===r.id?null:r.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(u.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:r.insightNote.title}),v===r.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(s.ChevronDown,{className:"h-3 w-3"})]}),v===r.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:r.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[r.sessionId&&i?(0,t.jsxs)(m.Button,{size:"sm",onClick:()=>i(r.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!r.sessionId&&"FAILED"===r.status&&r.id===e[0]?.id&&n?(0,t.jsxs)(m.Button,{size:"sm",onClick:n,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(m.Button,{variant:"ghost",size:"sm",onClick:()=>b(f?null:r.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(s.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[r.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:r.gitLog.split("\n").slice(0,3).join("\n")})]}),r.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:r.terminalLog})]}),"FAILED"===r.status&&null!=r.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",r.exitCode]})]})]},r.id)})]})}])},965322,e=>{"use strict";var t=e.i(514798);let r=(0,t.createServerReference)("6018c79bde2d7d7b690c57b9fef03c703cef7ac30f",t.callServer,void 0,t.findSourceMapURL,"updateTask");e.s(["updateTask",0,r])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},110204,e=>{"use strict";var t=e.i(289721),
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},110204,e=>{"use strict";var t=e.i(289721),a=e.i(975157);e.s(["Label",0,function({className:e,...r}){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),...r})}])},301348,181209,e=>{"use strict";var t=e.i(59737);e.s(["CheckCircle2",()=>t.default],301348);let a=(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,a],181209)},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)},487486,e=>{"use strict";var t=e.i(565455),a=e.i(581263),r=e.i(294237),i=e.i(975157);let s=(0,r.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:r="default",render:n,...d}){var l;return l={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,i.cn)(s({variant:r}),e)},d),render:n,state:{slot:"badge",variant:r}},(0,a.useRenderElement)(l.defaultTagName??"div",l,l)}],487486)},922541,e=>{"use strict";let t=(0,e.i(572989).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],922541)},631675,e=>{"use strict";let t=(0,e.i(572989).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],631675)},606576,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("408a94f097a9a92d17f4ef2a81b170cb16586e0cba",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},237988,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("408accb4cc4036960ffbe673d3c54faf7a444d87b1",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,a])},759686,e=>{"use strict";var t=e.i(567098);e.s(["AlertTriangle",()=>t.default])},991838,e=>{"use strict";var t=e.i(965652),a=e.i(770303);e.s(["useExtension",0,function(e){let r=(0,t.useContext)(a.ExtensionContext);if(!r)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:r.statusMap[e],loading:r.loading,isInstalling:r.installing.has(e),install:()=>r.install(e),uninstall:()=>r.uninstall(e),refresh:()=>r.refresh(e)}}])}]);
|