tower-studio 0.2.42 → 0.2.43
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/app-path-routes-manifest.json +1 -0
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +8 -0
- 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 +3 -3
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/_not-found/page.js +6 -6
- 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/api/adapters/test/route.js +3 -3
- 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 +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 +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -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 +3 -3
- 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 +2 -2
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +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 +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 +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +3 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/session/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +2 -2
- 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 +2 -2
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js +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 +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]/paste-image/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/build-manifest.json +9 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js +8 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/paste-image/route_client-reference-manifest.js +3 -0
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +4 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +6 -5
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +4 -3
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +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]/diff-patch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +3 -3
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +64 -64
- package/.next/standalone/.next/server/app/missions/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/onboarding/page.js +6 -6
- 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/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +44 -44
- package/.next/standalone/.next/server/app/settings/page.js +6 -6
- 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/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +109 -109
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +88 -88
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +75 -75
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +75 -75
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +27 -27
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +7 -7
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +67 -67
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +6 -6
- 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 +4 -4
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +79 -79
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -6
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +50 -50
- package/.next/standalone/.next/server/app/workspaces/page.js +6 -6
- 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/app-paths-manifest.json +1 -0
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_03qwlhl.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_09pca3o.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0h5yr8p.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0m8aavq.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0yp430z.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0yzw48x.js +1 -1
- package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_paste-image_route_actions_0iegbi4.js +3 -0
- package/.next/standalone/.next/server/chunks/[externals]__0x_wqa7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-z_a1d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.p6em~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.zmhk-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0042hx5._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0b3m.jm._.js → [root-of-the-server]__03ufxqq._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04--bs7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04m2l8a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04r193~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05abzth._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0657y50._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__075a0hk._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08yqoti._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__098.3z2._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0obk~80._.js → [root-of-the-server]__0_d.s7s._.js} +3 -3
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0askhfg._.js → [root-of-the-server]__0ajay8_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b25v3p._.js +4 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0xswbi9._.js → [root-of-the-server]__0clptds._.js} +2 -2
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ai09na._.js → [root-of-the-server]__0g.k9o~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gn0ubd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gwztza._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0h6bl6t._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0iggiij._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0i~3dwq._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j1px8f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0k-5ag7._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l1-djp._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0-~q463._.js → [root-of-the-server]__0lvlooo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0otyifi._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q~uf3u._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t31ba_._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_weyi._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__06qz5fz._.js → [root-of-the-server]__0uptkzd._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0wkjqrd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0x3kws1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0xot7fu._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0~6py0f._.js → [root-of-the-server]__0y8w5di._.js} +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~g6-c~._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10fv6tt._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1189rd1._.js +4 -0
- package/.next/standalone/.next/server/chunks/{_06.mxka._.js → _0jmdgq~._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{_0aflzks._.js → _0q10iet._.js} +1 -1
- package/.next/standalone/.next/server/chunks/_0qk_esg._.js +2 -2
- package/.next/standalone/.next/server/chunks/_0t31z6q._.js +1 -1
- package/.next/standalone/.next/server/chunks/{_0b~hjvi._.js → _12537g8._.js} +1 -1
- package/.next/standalone/.next/server/chunks/src_0fq3zjg._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0weytpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0wlyw0g._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_0~ey84y._.js +3 -0
- package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +2 -2
- 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/0se9_next_11h0sx_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00dh103._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mmypbn._.js → [root-of-the-server]__00ebsjb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0c2mh1c._.js → [root-of-the-server]__01vm_46._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__025ol9g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__094t44p._.js → [root-of-the-server]__04ednzb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__065f3ii._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pmjob9._.js → [root-of-the-server]__06dfcgo._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__038u_kv._.js → [root-of-the-server]__07xkj1s._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08k-xb7._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08tzbfh._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.infp2._.js → [root-of-the-server]__0_z5hke._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ce3fpq._.js → [root-of-the-server]__0ecd_1d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10s67lq._.js → [root-of-the-server]__0iln7n_._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09z_ddd._.js → [root-of-the-server]__0j_-qk5._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.u-t.1._.js → [root-of-the-server]__0k6oo0n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h589~0._.js → [root-of-the-server]__0lws68d._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oq-j16._.js → [root-of-the-server]__0oamph.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0pvaj~l._.js → [root-of-the-server]__0pnv7nd._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0whlq2_._.js → [root-of-the-server]__0stlq2_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03fujv7._.js → [root-of-the-server]__0tja~wz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0391jsv._.js → [root-of-the-server]__0ug022w._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l6bt9t._.js → [root-of-the-server]__0x6k.ee._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dsaqeq._.js → [root-of-the-server]__0xr45lx._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__058rbx5._.js → [root-of-the-server]__0xwzk2.._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12w35bx._.js → [root-of-the-server]__0yby8pl._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0rckee~._.js → [root-of-the-server]__0zxc81t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dux7x.._.js → [root-of-the-server]__0zzqn5z._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0mq0f94._.js → [root-of-the-server]__10c.a3u._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.2h0ux._.js → [root-of-the-server]__10n3vn6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__09t~p.u._.js → [root-of-the-server]__123rmyb._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__124zb~p._.js +30 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02j1enz._.js → [root-of-the-server]__127w3bm._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0h-se8t._.js → [root-of-the-server]__12ko8p6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0odeai5._.js → [root-of-the-server]__13ce7v2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0f~l8kv._.js → _00l85fp._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0c2gong._.js → _00odlgv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0whlnt7._.js → _0463zy~._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0rq68d8._.js → _047dh-f._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_03lt1_x._.js → _05a2u03._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0_5abui._.js → _05k76ur._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n4bq0m._.js → _060e1u.._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0n5do.z._.js → _07lq-bp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0p6p_68._.js → _07q06~v._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0mm~wxj._.js → _08-x_rp._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_08bq4g8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_12ca88g._.js → _0_q41~z._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0o2tntr._.js → _0b7smy6._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u7c6bz._.js → _0dxbp89._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0axcfvf._.js → _0gkid_a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0tvm5af._.js → _0j5.ig_._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0py1s-f._.js → _0nze-e6._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u.n7v8._.js → _0oeih09._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0~oc5bl._.js → _0rrs.-d._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0q2mf9q._.js → _0rtydyv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rxeqmo._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04bt0.3._.js → _0s.h4l2._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_09z2zmm._.js → _0s.ik0k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_116-_2z._.js → _0syb503._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0m.wslt._.js → _0uryq~z._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_04~zqvy._.js → _0wqcz3w._.js} +4 -4
- package/.next/standalone/.next/server/chunks/ssr/{_0rrzd20._.js → _113957g._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.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]_notes_notes-page-client_tsx_10gyo3v._.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_components_ui_select_tsx_0d2ra01._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_9avpk._.js → src_lib_0.~.oo-._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_02~3_5t._.js → src_lib_005uqbe._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_04d~c.c._.js → src_lib_00wjv6n._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{src_lib_08wv1le._.js → src_lib_01sr8_t._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_lib_08jql1e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0b~j-9d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0eymyjf._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fkv9z3._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0n-n0.a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sgt~lv._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x-iyl1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0yjmty1._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_lib_13aevv6._.js +3 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- 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 +246 -246
- package/.next/standalone/.next/static/chunks/{17fug-zaik-v~.js → 0-vgfstmpuwnx.js} +1 -1
- package/.next/standalone/.next/static/chunks/0.lyp-cx3zt9..js +2 -0
- package/.next/standalone/.next/static/chunks/{0clewc5ifaruu.js → 00z.kuqsfrxq5.js} +2 -2
- package/.next/standalone/.next/static/chunks/01j9m895w64zn.js +1 -0
- package/.next/standalone/.next/static/chunks/01rbl6a8z.tuw.js +1 -0
- package/.next/standalone/.next/static/chunks/{0.wxa05y455w7.js → 04op7bjge~n4l.js} +1 -1
- package/.next/standalone/.next/static/chunks/{13.3woq55msp..js → 05v-c3ir3ik_1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0bdwzhoelky9-.js → 070fs6rmafi.i.js} +1 -1
- package/.next/standalone/.next/static/chunks/07i9j5yyg4vs3.js +1 -0
- package/.next/standalone/.next/static/chunks/{040j8d.w8mkyn.js → 08i9.47-_mxro.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0ypd9eqm_pj-o.js → 0_yp-y9l0upp~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0ddt-snh45031.js +1 -0
- package/.next/standalone/.next/static/chunks/0evfu1ozaw5ak.js +1 -0
- package/.next/standalone/.next/static/chunks/{0wcwdbtpm0~r6.js → 0gq65t6au55oa.js} +1 -1
- package/.next/standalone/.next/static/chunks/0gz71w_~yw2iu.js +1 -0
- package/.next/standalone/.next/static/chunks/{0dewfthzwmcwb.js → 0hk3lmsij2x1c.js} +1 -1
- package/.next/standalone/.next/static/chunks/0j1hqwmeaqnn2.js +1 -0
- package/.next/standalone/.next/static/chunks/{0_d04kox03m72.css → 0jrje~1gt6w85.css} +1 -1
- package/.next/standalone/.next/static/chunks/0prrt_bws8ml6.js +1 -0
- package/.next/standalone/.next/static/chunks/0qgqjy.9.-qpi.js +1 -0
- package/.next/standalone/.next/static/chunks/{0m~m1~si.ot17.js → 0rfq8fy71hj7c.js} +1 -1
- package/.next/standalone/.next/static/chunks/{02f8-ju2se8qw.js → 0rjt_ddd~6t8r.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.onaugl2w8ci.js → 0rnitheqdpd1..js} +1 -1
- package/.next/standalone/.next/static/chunks/{035a_v6g7ioyw.js → 0sr-m2t6vck14.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0rozlwh3y46l0.js → 0ts___1ygewqp.js} +1 -1
- package/.next/standalone/.next/static/chunks/0vmy6tsqy.xf4.js +1 -0
- package/.next/standalone/.next/static/chunks/0wbq-_8jyxjxm.js +1 -0
- package/.next/standalone/.next/static/chunks/0xejm4ge9~cn..js +1 -0
- package/.next/standalone/.next/static/chunks/0~prx0ure_1i6.js +1 -0
- package/.next/standalone/.next/static/chunks/1107zshxaajt9.js +1 -0
- package/.next/standalone/.next/static/chunks/{17m4o~gdsvuo3.js → 11p.r-9wyh7_2.js} +1 -1
- package/.next/standalone/.next/static/chunks/11x3_612u8w~9.js +1 -0
- package/.next/standalone/.next/static/chunks/14mk_a0k99wbg.js +1 -0
- package/.next/standalone/package.json +9 -9
- package/dist/mcp-server.cjs +131 -74
- package/next.config.ts +4 -0
- package/package.json +9 -9
- package/skills/tower/SKILL.md +6 -0
- package/.next/standalone/.next/server/chunks/[externals]__0izylsq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__032d9pl._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__04jduyo._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__05~g1fm._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0bo_6v~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c7z.~a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fxmnch._.js +0 -4
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j3l3l4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0r-6wmj._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rpck4h._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0skk0fd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t_yyy8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0v2nkck._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z20rmt._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11l3gud._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +0 -4
- package/.next/standalone/.next/server/chunks/src_02ruq-1._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_07gek7k._.js +0 -3
- package/.next/standalone/.next/server/chunks/src_0mqkaid._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ni-_7_._.js +0 -30
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y~ooou._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0a60u40._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0fu5szn._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0gve57o._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0koe0p0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0qdh-v4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0ramp4w._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0sn1z-s._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_0x6grav._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_lib_110am8v._.js +0 -3
- package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +0 -1
- package/.next/standalone/.next/static/chunks/0.z171pzeg-.7.js +0 -1
- package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +0 -1
- package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +0 -1
- package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +0 -1
- package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +0 -1
- package/.next/standalone/.next/static/chunks/0i-x__600fys6.js +0 -1
- package/.next/standalone/.next/static/chunks/0l25d0nc5ygyd.js +0 -1
- package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +0 -1
- package/.next/standalone/.next/static/chunks/0t8lz62rmr801.js +0 -2
- package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +0 -1
- package/.next/standalone/.next/static/chunks/0wcdxs4sl-gjf.js +0 -1
- package/.next/standalone/.next/static/chunks/0x-ug4iz~~qr2.js +0 -1
- package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +0 -1
- package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +0 -1
- package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +0 -1
- package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +0 -1
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{LCBoYZWhXzs8PjuBmxw7g → d-Uhp63kgWdPkhPt7Fzyb}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,783426,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(538059),r=e.i(210702),n=e.i(232545),l=e.i(738690),i=e.i(226145),o=e.i(486077),c=e.i(519455),d=e.i(793479),m=e.i(967489),x=e.i(746798),u=e.i(533499);function h({searchQuery:e,onSearchChange:s,versions:a=[],versionFilter:p="all",onVersionFilterChange:g,versionsHref:f,onCreateTask:j}){let b,{t:N}=(0,u.useI18n)(),v="all"===p?N("board.allVersions"):"backlog"===p?N("board.backlogFilter"):(b=a.find(e=>e.id===p))?`${b.number} ${b.name}`:N("board.allVersions");return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-6 py-2",children:[g&&(0,t.jsxs)(m.Select,{value:p,onValueChange:e=>g(e||"all"),children:[(0,t.jsxs)(m.SelectTrigger,{className:"h-8 w-44 shrink-0 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:v})]}),(0,t.jsxs)(m.SelectContent,{children:[(0,t.jsx)(m.SelectItem,{value:"all",children:N("board.allVersions")}),(0,t.jsx)(m.SelectItem,{value:"backlog",children:N("board.backlogFilter")}),a.map(e=>(0,t.jsxs)(m.SelectItem,{value:e.id,children:[(0,t.jsx)("span",{className:"font-mono",children:e.number})," ",e.name]},e.id))]})]}),(0,t.jsxs)("div",{className:"relative flex-1 max-w-xs",children:[(0,t.jsx)(l.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(d.Input,{type:"text",value:e,onChange:e=>s(e.target.value),placeholder:N("board.searchPlaceholder"),className:"pl-8 pr-3 text-xs"})]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",children:(0,t.jsx)(o.Lightbulb,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",className:"max-w-xs",children:N("board.tipText")})]}),f&&(0,t.jsx)(r.default,{href:f,children:(0,t.jsxs)(c.Button,{variant:"outline",className:"h-8 gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(i.GitBranch,{className:"h-3.5 w-3.5"}),N("version.timeline")]})}),(0,t.jsxs)(c.Button,{"data-tour":"create-task",variant:"outline",className:"gap-1.5 border-border text-xs text-muted-foreground hover:border-primary/30 hover:text-primary",onClick:j,children:[(0,t.jsx)(n.Plus,{className:"h-3.5 w-3.5"}),N("board.newTask")]})]})]})}var p=e.i(585012),g=e.i(597746),f=e.i(685149);function j({x:e,y:r,taskId:n,currentStatus:l,hasExecutions:i,workspaceId:o,onClose:c,onStatusChange:d,onLaunch:m}){let{t:x}=(0,u.useI18n)(),h=(0,a.useRouter)(),b=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[c]);let N="flex items-center px-3 py-1.5 text-xs cursor-pointer hover:bg-accent rounded-sm w-full text-left",v=(0,t.jsxs)("div",{ref:b,style:{position:"fixed",top:r,left:e,zIndex:9999},className:"bg-popover border border-border rounded-md shadow-md py-1 min-w-[180px]",children:[(0,t.jsx)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground uppercase tracking-wider",children:x("board.contextMenu.changeStatus")}),f.BOARD_COLUMNS.map(e=>(0,t.jsxs)("button",{type:"button",className:N,onClick:()=>{d(n,e.id),c()},children:[l===e.id?(0,t.jsx)(g.Check,{className:"h-3 w-3 mr-2 flex-shrink-0"}):(0,t.jsx)("span",{className:"w-5 flex-shrink-0"}),e.label]},e.id)),(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:`${N} ${i?"opacity-50 cursor-not-allowed":""}`,disabled:i,onClick:()=>{i||(m(n),c())},children:x("board.contextMenu.launch")}),"DONE"!==l&&"CANCELLED"!==l&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"my-1 border-border"}),(0,t.jsx)("button",{type:"button",className:N,onClick:()=>{h.push(`/workspaces/${o}/tasks/${n}`),c()},children:x("board.contextMenu.goToDetail")})]})]});return"u"<typeof document?null:(0,p.createPortal)(v,document.body)}var b=e.i(720247),N=e.i(775712),v=e.i(469051),k=e.i(67013),w=e.i(49007),y=e.i(464249),C=e.i(998626),T=e.i(572989);let S=(0,T.default)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var P=e.i(487486),E=e.i(755146),I=e.i(35967);function D({task:e,onClick:s,onEdit:a,onDelete:r,onTogglePin:n,onContextMenu:l}){let{t:o}=(0,u.useI18n)(),{attributes:d,listeners:m,setNodeRef:h,transform:p,transition:g,isDragging:j}=(0,N.useSortable)({id:e.id,data:{type:"task",task:e}}),b={transform:k.CSS.Transform.toString(p),transition:g,opacity:j?.4:1},v=f.PRIORITY_CONFIG[e.priority],T=!!e.baseBranch;return(0,t.jsxs)("div",{ref:h,style:b,...d,...m,className:"group cursor-grab rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50 active:cursor-grabbing",onClick:s,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),l?.(e,t.clientX,t.clientY)},"data-testid":"task-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",className:`transition-all ${e.pinned?"text-primary opacity-100":"text-muted-foreground opacity-0 group-hover:opacity-100"}`,onClick:t=>{t.stopPropagation(),n?.(e.id)},"aria-label":o(e.pinned?"board.unpin":"board.pin"),children:(0,t.jsx)(S,{className:`h-3.5 w-3.5 ${e.pinned?"-rotate-45":""}`})}),(0,t.jsxs)(E.DropdownMenu,{children:[(0,t.jsx)(E.DropdownMenuTrigger,{render:(0,t.jsx)("button",{className:"rounded-md p-0.5 text-muted-foreground opacity-0 transition-all hover:bg-background hover:text-foreground group-hover:opacity-100",onClick:e=>e.stopPropagation()}),children:(0,t.jsx)(w.MoreHorizontal,{className:"h-4 w-4"})}),(0,t.jsxs)(E.DropdownMenuContent,{align:"end",children:[(0,t.jsxs)(E.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),a?.(e)},children:[(0,t.jsx)(y.Pencil,{className:"mr-2 h-3.5 w-3.5"}),o("common.edit")]}),(0,t.jsxs)(E.DropdownMenuItem,{className:"text-rose-400",onClick:t=>{t.stopPropagation(),r?.(e.id)},children:[(0,t.jsx)(C.Trash2,{className:"mr-2 h-3.5 w-3.5"}),o("common.delete")]})]})]})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-3 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(P.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${v.color}`,children:v.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id)),(T||e.version)&&(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&(0,t.jsxs)(x.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex cursor-default items-center rounded-md border border-border bg-muted px-1 py-0.5 text-muted-foreground",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(i.GitBranch,{className:"h-2.5 w-2.5 shrink-0"})})}),(0,t.jsx)(x.TooltipContent,{side:"top",children:o("board.card.worktree",{branch:e.baseBranch??""})})]}),e.version&&(0,t.jsxs)(x.Tooltip,{disableHoverablePopup:!0,children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)("span",{className:"cursor-default",onPointerDown:e=>e.stopPropagation(),children:(0,t.jsx)(I.TaskVersionTag,{number:e.version.number,title:""})})}),(0,t.jsx)(x.TooltipContent,{side:"top",children:o("board.card.version",{number:e.version.number,name:e.version.name})})]})]})]})]})}var L=e.i(776639),B=e.i(759684);function F({open:e,onOpenChange:s,columnLabel:a,columnColor:r,tasks:n,onTaskClick:l}){let{t:i}=(0,u.useI18n)();return(0,t.jsx)(L.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-6xl max-h-[80vh]",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsxs)(L.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2.5 w-2.5 rounded-full ${r}`}),(0,t.jsx)("span",{children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs font-mono font-medium text-muted-foreground",children:n.length})]})}),(0,t.jsx)(B.ScrollArea,{className:"max-h-[680px]",children:(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3 pr-3",children:[n.map(e=>{let a=f.PRIORITY_CONFIG[e.priority];return(0,t.jsxs)("div",{className:"cursor-pointer rounded-lg border border-border bg-card p-3 transition-all hover:border-primary/20 hover:bg-accent/50",onClick:()=>{l?.(e),s(!1)},children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-foreground line-clamp-2",children:e.title}),e.description&&(0,t.jsx)("p",{className:"mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 flex-wrap",children:[(0,t.jsx)(P.Badge,{variant:"secondary",className:`text-[10px] font-semibold ${a.color}`,children:a.label}),e.labels?.map(e=>(0,t.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:e.label.color+"20",color:e.label.color},children:e.label.name},e.label.id))]})]},e.id)}),0===n.length&&(0,t.jsx)("div",{className:"col-span-4 py-8 text-center text-sm text-muted-foreground",children:i("board.noTasks")})]})})]})})}function R({id:e,label:a,color:r,tasks:l,onTaskClick:i,onEditTask:o,onAddTask:d,onDeleteTask:m,onTogglePin:x,onContextMenu:h}){let{setNodeRef:p,isOver:g}=(0,b.useDroppable)({id:e}),[f,j]=(0,s.useState)(!1),{t:k}=(0,u.useI18n)();return(0,t.jsxs)("div",{className:`flex w-0 min-w-[220px] flex-1 flex-col min-h-0 border-r border-border/50 last:border-r-0 transition-colors ${g?"bg-primary/[0.06]":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-border/30",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:`h-2 w-2 rounded-full ${r}`}),(0,t.jsx)("span",{className:"text-xs font-semibold tracking-wide text-secondary-foreground",children:a}),(0,t.jsx)("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] font-mono font-medium text-muted-foreground",children:l.length})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>j(!0),className:"text-muted-foreground","aria-label":k("board.viewAll"),children:(0,t.jsx)(v.LayoutGrid,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:d,className:"text-muted-foreground","aria-label":"add",children:(0,t.jsx)(n.Plus,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsx)(F,{open:f,onOpenChange:j,columnLabel:a,columnColor:r,tasks:l,onTaskClick:i}),(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)("div",{ref:p,className:"flex flex-col gap-2 p-2",children:(0,t.jsx)(N.SortableContext,{items:l.map(e=>e.id),strategy:N.verticalListSortingStrategy,children:l.map(e=>(0,t.jsx)(D,{task:e,onClick:()=>i?.(e),onEdit:o,onDelete:m,onTogglePin:x,onContextMenu:h},e.id))})})})]})}function A({initialTasks:e,onTaskMove:a,onTaskClick:r,onEditTask:n,onAddTask:l,onDeleteTask:i,onTogglePin:o,onContextMenuStatusChange:c,onContextMenuLaunch:d,workspaceId:m}){let[x,u]=(0,s.useState)(e),[h,p]=(0,s.useState)(null),[g,N]=(0,s.useState)(null);(0,s.useEffect)(()=>{u(e)},[e]);let v=(0,b.useSensors)((0,b.useSensor)(b.PointerSensor,{activationConstraint:{distance:8}})),k=(0,s.useCallback)((e,t,s)=>{N({task:e,x:t,y:s})},[]),w=(0,s.useCallback)(e=>{let t=x.find(t=>t.id===e.active.id);t&&p(t)},[x]),y=(0,s.useCallback)(e=>{let t,{active:s,over:r}=e;if(p(null),!r)return;let n=s.id,l=r.id;if(f.BOARD_COLUMNS.some(e=>e.id===l))t=l;else{let e=x.find(e=>e.id===l);t=e?.status}t&&(u(e=>e.map(e=>e.id===n?{...e,status:t}:e)),a?.(n,t))},[x,a]);return(0,t.jsxs)(b.DndContext,{id:"kanban-board",sensors:v,collisionDetection:b.closestCorners,onDragStart:w,onDragEnd:y,children:[(0,t.jsx)("div",{className:"mx-2 flex h-full overflow-x-auto rounded-xl border border-border bg-card/50",children:f.BOARD_COLUMNS.map(e=>(0,t.jsx)(R,{id:e.id,label:e.label,color:e.color,tasks:x.filter(t=>t.status===e.id),onTaskClick:r,onEditTask:n,onAddTask:()=>l?.(e.id),onDeleteTask:i,onTogglePin:o,onContextMenu:k},e.id))}),(0,t.jsx)(b.DragOverlay,{children:h?(0,t.jsx)("div",{className:"rotate-3 scale-105",children:(0,t.jsx)(D,{task:h})}):null}),g&&(0,t.jsx)(j,{x:g.x,y:g.y,taskId:g.task.id,currentStatus:g.task.status,hasExecutions:(g.task._count?.executions??0)>0,workspaceId:m??"",onClose:()=>N(null),onStatusChange:(e,t)=>{c?.(e,t),N(null)},onLaunch:e=>{d?.(e),N(null)}})]})}var O=e.i(744798);function $(e,t,s){return Math.min(Math.max(e,t),s)}var M=e.i(232280),z=e.i(368490),U=e.i(645378),W=e.i(453889);let G=(0,T.default)("git-commit-vertical",[["path",{d:"M12 3v6",key:"1holv5"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 15v6",key:"a9ows0"}]]);var H=e.i(938499),V=e.i(400355),_=e.i(233274),K=e.i(736061),X=e.i(460707),Y=e.i(567860),J=e.i(875840),q=e.i(624687),Q=e.i(514798);let Z=(0,Q.createServerReference)("608aac1637b86613ba60424496283123c9a2a5de0b",Q.callServer,void 0,Q.findSourceMapURL,"updateProject");var ee=e.i(86084);let et=(0,Q.createServerReference)("40f16c9bf878ed8da769bf0b0f991bce6a98c60409",Q.callServer,void 0,Q.findSourceMapURL,"deleteProject"),es=(0,Q.createServerReference)("40ebfe2e4d860bd1f880950a57713cfba603ebe8cb",Q.callServer,void 0,Q.findSourceMapURL,"getRecentLocalProjects"),ea=(0,Q.createServerReference)("4054b75c148f6c4fd80843f786e74e0da8e3622d60",Q.callServer,void 0,Q.findSourceMapURL,"getOrCreateTowerTaskId");var er=e.i(517675),en=e.i(49618),el=e.i(338973),ei=e.i(117356),eo=e.i(360112),ec=e.i(224277),ed=e.i(905455);function em({commits:e}){let{t:a}=(0,u.useI18n)(),[r,n]=(0,s.useState)(!1);return 0===e.length?null:(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("button",{onClick:()=>n(!r),className:"flex w-full items-center gap-1 px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[r?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[a("git.commitLog")," (",e.length,")"]})]}),r&&(0,t.jsx)("div",{className:"mt-0.5 mb-1.5 space-y-0.5 max-h-64 overflow-y-auto",children:e.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(G,{className:"h-3 w-3 shrink-0 text-muted-foreground mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-xs text-foreground line-clamp-1",children:e.message}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(e.shortHash),eo.toast.success(`Copied ${e.shortHash}`)},className:"flex items-center gap-0.5 font-mono text-[10px] text-primary/70 hover:text-primary transition-colors",children:[e.shortHash,(0,t.jsx)(J.Copy,{className:"h-2.5 w-2.5 opacity-0 group-hover:opacity-100 transition-opacity"})]}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.author}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m`;let s=Math.floor(t/60);if(s<24)return`${s}h`;let a=Math.floor(s/24);return a<30?`${a}d`:`${Math.floor(a/30)}mo`}(e.date)})]})]})]},e.hash))})]})}var ex=e.i(487278),eu=e.i(375306),eh=e.i(244354);function ep({localPath:e,stashes:a,hasChanges:r,onRefresh:n}){let{t:l}=(0,u.useI18n)(),[i,o]=(0,s.useState)(!1),[m,x]=(0,s.useState)(!1),[h,p]=(0,s.useState)(""),[g,f]=(0,s.useState)(null),j=async()=>{x(!0);try{await (0,eh.gitAction)(e,"stash-save",{message:h}),p(""),eo.toast.success(l("git.stashSaved")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{x(!1)}},b=async t=>{f(t);try{await (0,eh.gitAction)(e,"stash-pop",{index:t}),eo.toast.success(l("git.stashApplied")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}},N=async t=>{f(t);try{await (0,eh.gitAction)(e,"stash-drop",{index:t}),eo.toast.success(l("git.stashDropped")),await n()}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{f(null)}};return r||0!==a.length?(0,t.jsxs)("div",{className:"border-b border-border",children:[(0,t.jsxs)("button",{onClick:()=>o(!i),className:"flex w-full items-center gap-1 px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[i?(0,t.jsx)(M.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:[l("git.stash")," ",a.length>0&&`(${a.length})`]})]}),i&&(0,t.jsxs)("div",{className:"mt-0.5 mb-1.5 space-y-2",children:[r&&(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(d.Input,{value:h,onChange:e=>p(e.target.value),placeholder:l("git.stashMsgPlaceholder"),className:"h-7 text-xs flex-1",onKeyDown:e=>"Enter"===e.key&&j()}),(0,t.jsx)(c.Button,{variant:"outline",size:"icon-sm",onClick:j,disabled:m,className:"shrink-0",children:m?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(ex.Archive,{className:"h-3 w-3"})})]}),a.length>0&&(0,t.jsx)("div",{className:"space-y-0.5",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-center gap-2 rounded-md px-2 py-1.5 hover:bg-accent transition-colors",children:[(0,t.jsx)(ex.Archive,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 min-w-0 truncate text-xs text-foreground",children:e.message||`stash@{${e.index}}`}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>b(e.index),disabled:g===e.index,className:"text-muted-foreground","aria-label":l("git.stashApply"),children:g===e.index?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(eu.ArrowUpFromLine,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>N(e.index),disabled:g===e.index,className:"text-rose-400","aria-label":l("git.stashDrop"),children:(0,t.jsx)(C.Trash2,{className:"h-3 w-3"})})]})]},e.index))})]})]}):null}var eg=e.i(515135);function ef({value:e,ariaLabel:a}){let{t:r}=(0,u.useI18n)(),[n,l]=(0,s.useState)(!1),i=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}l(!0),eo.toast.success(r("common.copied")),setTimeout(()=>l(!1),1500)}catch{eo.toast.error(r("common.copyFailed"))}};return(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-border bg-muted/50 pl-3 pr-1 py-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",title:e,children:e}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",className:"shrink-0 text-muted-foreground","aria-label":a,onClick:i,children:n?(0,t.jsx)(g.Check,{className:"h-3 w-3 text-emerald-400"}):(0,t.jsx)(J.Copy,{className:"h-3 w-3"})})}),(0,t.jsx)(x.TooltipContent,{children:n?r("common.copied"):r("common.copy")})]})]})}function ej({project:e,workspaceId:r}){let{t:n,locale:l}=(0,u.useI18n)(),o=(0,a.useRouter)(),{width:m,isDragging:h,startResize:p}=function(e){let{storageKey:t,defaultWidth:a,minWidth:r,maxWidth:n,edge:l="left"}=e,[i,o]=(0,s.useState)(a),[c,d]=(0,s.useState)(!1),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(t),s=null==e?NaN:Number(e);Number.isFinite(s)&&o($(s,r,n))}catch{}},[t,r,n]);let x=(0,s.useCallback)(e=>{let t=m.current;t&&o(function(e,t,s,a,r,n="left"){return $(e+("left"===n?t-s:s-t),a,r)}(t.width,t.x,e.clientX,r,n,l))},[r,n,l]),u=(0,s.useCallback)(()=>{m.current&&(m.current=null,d(!1),window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",u),o(e=>{try{window.localStorage.setItem(t,String(e))}catch{}return e}))},[x,t]),h=(0,s.useCallback)(e=>{e.preventDefault(),m.current={x:e.clientX,width:i},d(!0),window.addEventListener("pointermove",x),window.addEventListener("pointerup",u)},[i,x,u]);return(0,s.useEffect)(()=>()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",u)},[x,u]),{width:i,isDragging:c,startResize:h}}({storageKey:"tower:repo-sidebar-width",defaultWidth:288,minWidth:240,maxWidth:560,edge:"left"}),[g,f]=(0,s.useState)(!0),[j,b]=(0,s.useState)(!0),[N,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)(!1),[T,S]=(0,s.useState)(""),[P,E]=(0,s.useState)(!1),[I,D]=(0,s.useState)(!1),[B,F]=(0,s.useState)(!1),[R,A]=(0,s.useState)(e.name),[O,J]=(0,s.useState)(e.alias??""),[Q,ex]=(0,s.useState)(e.description??""),[eu,eh]=(0,s.useState)(e.localPath??""),[eb,eN]=(0,s.useState)(e.projectType??"FRONTEND"),[ev,ek]=(0,s.useState)([]);(0,s.useEffect)(()=>{es(100).then(ek)},[]);let[ew,ey]=(0,s.useState)(!1),[eC,eT]=(0,s.useState)(""),[eS,eP]=(0,s.useState)(""),[eE,eI]=(0,s.useState)(""),[eD,eL]=(0,s.useState)(""),[eB,eF]=(0,s.useState)("FRONTEND"),[eR,eA]=(0,s.useState)(!1),[eO,e$]=(0,s.useState)(!1),[eM,ez]=(0,s.useState)(null),[eU,eW]=(0,s.useState)(!1),[eG,eH]=(0,s.useState)(!1),eV=e=>{eo.toast.info(e)},e_=(0,s.useCallback)(async()=>{if(e.localPath){eW(!0);try{let t=await fetch(`/api/git?path=${encodeURIComponent(e.localPath)}`);t.ok&&ez(await t.json())}catch{}finally{eW(!1)}}},[e.localPath]);(0,s.useEffect)(()=>{e_()},[e_]);let eK=async()=>{if(e.localPath){eH(!0);try{(await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"init",path:e.localPath})})).ok?(eV(n("git.initSuccess")),await e_()):eV(n("git.initFailed"))}catch{eV(n("git.initFailed"))}finally{eH(!1)}}},eX=(e,t)=>{o.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1}),o.refresh()},eY=async()=>{if(eS.trim()){eA(!0);try{let e=await (0,ee.createProject)({name:eS.trim(),alias:eE.trim()||void 0,description:eD.trim()||void 0,localPath:eC,projectType:eB,workspaceId:r});ey(!1),eX(r,e.id)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}finally{eA(!1)}}},eJ=async()=>{if(eu&&!eO){e$(!0);try{let e=await (0,ei.analyzeProjectDirectory)(eu.trim(),l);ex(e)}catch{eo.toast.error(n("project.analyzeError"))}finally{e$(!1)}}},eq=async()=>{try{await Z(e.id,{name:R.trim(),alias:O.trim()||void 0,description:Q.trim()||void 0,localPath:eu.trim()||void 0,projectType:eb}),o.refresh(),v(!1)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}};return(0,t.jsxs)("aside",{className:"relative flex-shrink-0 border-l border-border bg-sidebar",style:{width:m},children:[(0,t.jsx)("div",{onPointerDown:p,className:`absolute left-0 top-0 z-20 h-full w-1 -translate-x-1/2 cursor-col-resize transition-colors hover:bg-primary/20 ${h?"bg-primary/40":"bg-transparent"}`,role:"separator","aria-orientation":"vertical","aria-label":n("sidebar.right.resize")}),(0,t.jsxs)("div",{className:"h-full overflow-y-auto",children:[(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e.name}),e.alias&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:e.alias})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{A(e.name),J(e.alias??""),ex(e.description??""),eh(e.localPath??""),v(!0)},className:"text-muted-foreground",children:(0,t.jsx)(y.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{S(""),w(!0)},className:"text-muted-foreground hover:text-rose-400",children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})})]})]}),e.description&&(0,t.jsx)("p",{className:"mt-2 text-sm text-secondary-foreground leading-relaxed line-clamp-4",children:e.description}),(0,t.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,t.jsx)("span",{className:`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] font-medium ${"GIT"===e.type?"bg-sky-500/15 text-sky-300 ring-1 ring-sky-500/20":"bg-muted text-muted-foreground ring-1 ring-border"}`,children:"GIT"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.GitBranch,{className:"h-3 w-3"}),n("sidebar.right.gitType")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U.FileText,{className:"h-3 w-3"}),n("sidebar.right.normalType")]})})}),e.gitUrl&&(0,t.jsx)("div",{className:"mt-3 space-y-1.5",children:(0,t.jsx)(ef,{value:e.gitUrl,ariaLabel:n("project.gitUrl")})}),e.localPath&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,er.openInFileManager)(e.localPath)}catch(e){console.error("openInFileManager failed:",e),eo.toast.error(n("git.openInFileManagerFailed"))}},children:(0,t.jsx)(K.FolderSearch,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInFileManager")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,en.openInEditor)(e.localPath)}catch(e){console.error("openInEditor failed:",e),eo.toast.error(n("git.openInEditorFailed"))}},children:(0,t.jsx)(X.Code,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInEditor")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"text-muted-foreground",onClick:async()=>{try{await (0,el.openInTerminal)(e.localPath)}catch(e){console.error("openInTerminal failed:",e),eo.toast.error(n("git.openInTerminalFailed"))}},children:(0,t.jsx)(Y.Terminal,{className:"h-4 w-4"})})}),(0,t.jsx)(x.TooltipContent,{children:n("git.openInTerminal")})]})]}),(0,t.jsxs)(c.Button,{variant:"outline",className:"w-full h-9 gap-1.5 text-xs",disabled:I,onClick:async()=>{D(!0);try{let t=await ea(e.id);o.push(`/workspaces/${r}/tasks/${t}`)}catch{eo.toast.error(n("git.openStudioFailed"))}finally{D(!1)}},children:[I?(0,t.jsx)(V.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(W.FolderOpen,{className:"h-3.5 w-3.5"}),n("git.openStudio")]})]})]}),(0,t.jsxs)("div",{className:"border-b border-border p-4",children:[(0,t.jsxs)(c.Button,{variant:"ghost",onClick:()=>f(!g),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("git.section")}),g?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),g&&(0,t.jsx)("div",{className:"mt-3",children:e.localPath?eU?(0,t.jsxs)("div",{className:"flex items-center justify-center py-4 text-muted-foreground",children:[(0,t.jsx)(V.Loader2,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"ml-2 text-xs",children:n("git.loading")})]}):eM&&!eM.isGit?(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.notInitialized")})]}),(0,t.jsxs)(c.Button,{className:"mt-3 h-7 w-full gap-1.5 bg-primary/10 text-xs text-primary ring-1 ring-primary/20 hover:bg-primary/15",onClick:eK,disabled:eG,children:[eG?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(G,{className:"h-3 w-3"}),n("git.initRepo")]})]}):eM?.isGit?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col",children:(0,t.jsx)(eg.EditorGitPanel,{localPath:e.localPath,mode:"project"})}),(0,t.jsx)(em,{commits:eM.commits??[]}),(0,t.jsx)(ep,{localPath:e.localPath,stashes:eM.stashes??[],hasChanges:(eM.changedFiles??[]).length>0,onRefresh:e_})]}):null:(0,t.jsx)("div",{className:"rounded-lg border border-border bg-muted/50 p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(H.AlertCircle,{className:"h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"text-xs",children:n("git.noLocalPath")})]})})})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)(c.Button,{variant:"ghost",onClick:()=>b(!j),className:"flex w-full cursor-pointer justify-between px-2 py-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:n("sidebar.right.browseRepo")}),j?(0,t.jsx)(M.ChevronDown,{className:"h-3.5 w-3.5 text-muted-foreground"}):(0,t.jsx)(z.ChevronRight,{className:"h-3.5 w-3.5 text-muted-foreground"})]}),j&&(0,t.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,t.jsxs)(c.Button,{variant:"outline",className:"w-full h-8 gap-1.5 text-xs",onClick:()=>F(!0),children:[(0,t.jsx)(W.FolderOpen,{className:"h-3.5 w-3.5"}),n("sidebar.right.browseRepo")]}),ev.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5 px-1",children:n("sidebar.right.recent")}),(0,t.jsx)("div",{className:"space-y-0.5",children:ev.map(s=>(0,t.jsxs)("button",{onClick:()=>{s.id!==e.id&&eX(s.workspaceId,s.id)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors ${s.id===e.id?"bg-primary/10 text-primary cursor-default":"hover:bg-accent cursor-pointer"}`,children:["GIT"===s.type?(0,t.jsx)(i.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}):(0,t.jsx)(W.FolderOpen,{className:"h-3 w-3 shrink-0 text-primary/70"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium text-foreground",children:s.name}),s.localPath&&(0,t.jsx)("p",{className:"truncate text-[10px] font-mono text-muted-foreground",children:s.localPath})]})]},s.id))})]})]})]})]}),(0,t.jsx)(L.Dialog,{open:N,onOpenChange:v,children:(0,t.jsxs)(L.DialogContent,{style:{maxWidth:"32rem"},children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:n("project.edit")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.name")}),(0,t.jsx)(d.Input,{value:R,onChange:e=>A(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ed.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:eb,onChange:eN})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(d.Input,{value:O,onChange:e=>J(e.target.value),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsxs)(c.Button,{type:"button",variant:"ghost",onClick:eJ,className:`h-6 gap-1 px-2 text-[11px] text-muted-foreground hover:text-foreground ${!eu||eO?"opacity-50":""}`,children:[eO?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(_.Sparkles,{className:"h-3 w-3"}),eO?n("project.analyzing"):n("project.genDesc")]})]}),(0,t.jsx)(q.Textarea,{value:Q,onChange:e=>ex(e.target.value),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 break-all rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:eu||"—"})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>v(!1),children:n("common.cancel")}),(0,t.jsx)(c.Button,{onClick:eq,disabled:!R.trim()||eO,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:n("common.save")})]})]})}),(0,t.jsx)(ec.FolderBrowserDialog,{open:B,onOpenChange:F,onSelect:e=>{N?eh(e):(e=>{let t=ev.find(t=>t.localPath===e);if(t)return eX(t.workspaceId,t.id);let s=e.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean).pop()??"";eT(e),eP(s),eI(""),eL(""),ey(!0)})(e)}}),(0,t.jsx)(L.Dialog,{open:ew,onOpenChange:ey,children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:n("topbar.newProject")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.localPath")}),(0,t.jsx)("div",{className:"mt-1.5 rounded-md border border-border bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:eC})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.name")}),(0,t.jsx)(d.Input,{value:eS,onChange:e=>eP(e.target.value),placeholder:n("project.namePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.type.label")}),(0,t.jsx)("div",{className:"mt-1.5",children:(0,t.jsx)(ed.SegmentedControl,{options:[{value:"FRONTEND",label:n("project.type.frontend")},{value:"BACKEND",label:n("project.type.backend")}],value:eB,onChange:eF})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.alias")}),(0,t.jsx)(d.Input,{value:eE,onChange:e=>eI(e.target.value),placeholder:n("project.aliasPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.description")}),(0,t.jsx)(q.Textarea,{value:eD,onChange:e=>eL(e.target.value),placeholder:n("project.descPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>ey(!1),children:n("common.cancel")}),(0,t.jsxs)(c.Button,{onClick:eY,disabled:!eS.trim()||eR,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[eR?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,n("common.create")]})]})]})}),(0,t.jsx)(L.Dialog,{open:k,onOpenChange:e=>{w(e),e||S("")},children:(0,t.jsxs)(L.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{className:"text-rose-400",children:n("project.deleteTitle")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteWarning",{name:e.name})}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:n("project.deleteIrreversible")}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:n("project.deleteConfirmLabel")}),(0,t.jsx)(d.Input,{value:T,onChange:e=>S(e.target.value),placeholder:n("project.deleteConfirmPlaceholder"),className:"mt-1.5",autoFocus:!0})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>w(!1),children:n("common.cancel")}),(0,t.jsxs)(c.Button,{variant:"destructive",disabled:T!==n("project.deleteConfirmText")||P,onClick:async()=>{E(!0);try{await et(e.id),eo.toast.success(n("project.deleteSuccess")),o.push(`/workspaces/${r}`)}catch{eo.toast.error(n("project.deleteFailed"))}finally{E(!1),w(!1)}},children:[P&&(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin mr-1"}),n("project.deleteButton")]})]})]})})]})}var eb=e.i(475958),eN=e.i(313029),ev=e.i(882651),ek=e.i(259846),ew=e.i(975157);function ey({title:e,description:s,branch:a,baseBranch:r,version:n,hasConversation:l,updatedAt:o,openDir:d,onBack:m}){let{t:h}=(0,u.useI18n)();return(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(_.Sparkles,{className:"h-3.5 w-3.5 text-primary"}),(0,t.jsx)("span",{className:"text-xs font-semibold text-primary",children:h("taskDetail.title")})]}),(0,t.jsxs)(c.Button,{variant:"ghost",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground h-auto px-2 py-1",children:[(0,t.jsx)(ek.ArrowLeft,{className:"h-3.5 w-3.5"}),h("taskDetail.back")]})]}),(0,t.jsx)("h2",{className:"mt-2.5 text-lg font-bold tracking-tight text-foreground",children:e}),s&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-2",children:s}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[r?(0,t.jsxs)(P.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:[(0,t.jsx)(i.GitBranch,{className:"mr-1 h-3 w-3"}),r," · worktree"]}):a?(0,t.jsx)(P.Badge,{variant:"secondary",className:"bg-muted text-muted-foreground text-[10px] font-mono border border-border",children:h("taskDetail.directMode")}):null,n&&(0,t.jsx)(I.TaskVersionTag,{number:n.number,name:n.name,showName:!0}),l&&(0,t.jsx)(P.Badge,{variant:"secondary",className:"bg-emerald-500/10 text-emerald-400 text-[10px] border border-emerald-500/20",children:h("taskDetail.hasConversation")}),(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[h("taskDetail.updatedAt")," ",(0,ew.formatRelativeTime)(o)]}),d&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,er.openInFileManager)(d)}catch(e){console.error("openInFileManager failed:",e),eo.toast.error(h("git.openInFileManagerFailed"))}},children:(0,t.jsx)(K.FolderSearch,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInFileManager")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,en.openInEditor)(d)}catch(e){console.error("openInEditor failed:",e),eo.toast.error(h("git.openInEditorFailed"))}},children:(0,t.jsx)(X.Code,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInEditor")})]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsx)(x.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:async()=>{try{await (0,el.openInTerminal)(d)}catch(e){console.error("openInTerminal failed:",e),eo.toast.error(h("git.openInTerminalFailed"))}},children:(0,t.jsx)(Y.Terminal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:h("git.openInTerminal")})]})]})]})]})}var eC=e.i(14842),eT=e.i(865514),eS=e.i(83434),eP=e.i(838582),eE=e.i(698343),eI=e.i(257868),eD=e.i(681894),eL=e.i(502889),eB=e.i(352290),eF=e.i(207539),eR=e.i(382644),eA=e.i(292862),eO=e.i(326883),e$=e.i(631675),eM=e.i(297338),ez=e.i(657153),eU=e.i(867533),eW=e.i(979469),eG=e.i(570634),eH=e.i(44024),eV=e.i(527043),e_=e.i(981705),eK=e.i(715362),eX=e.i(235357),eY=e.i(144640),eJ=e.i(997025),eq=e.i(937304);let eQ=/\.(txt|md|json)$/i;function eZ({taskId:e,projectId:a}){let{t:r}=(0,u.useI18n)(),l=(0,s.useRef)(null),[i,o]=(0,s.useState)([]),[d,m]=(0,s.useState)([]),[x,h]=(0,s.useState)(!1),[p,g]=(0,s.useState)(""),[f,j]=(0,s.useState)(""),[b,N]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[w,y]=(0,s.useState)(null);async function T(){p.trim()&&(await (0,eW.createNote)({title:p.trim(),content:f.trim(),projectId:a,taskId:e,category:"task"}),g(""),j(""),h(!1),(0,eG.getTaskNotes)(e).then(o))}async function S(e){await (0,eH.deleteNote)(e),o(t=>t.filter(t=>t.id!==e))}async function P(t){let s=t.target.files?.[0];if(s){N(!0);try{let t=new FormData;t.set("file",s),t.set("projectId",a),t.set("taskId",e),await (0,e_.uploadAsset)(t),(0,eV.getTaskAssets)(e).then(m)}finally{N(!1),l.current&&(l.current.value="")}}}async function E(e){await (0,eK.deleteAsset)(e),m(t=>t.filter(t=>t.id!==e))}function I(e){return(0,eq.isImageAsset)(e.filename,e.mimeType)||eQ.test(e.filename)}function D(e){I(e)?k(e):eo.toast.info(r("assets.previewNotSupported"))}async function L(e){try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));eo.toast.error(e.error||"Failed to reveal file")}}catch{eo.toast.error("Failed to reveal file")}}(0,s.useEffect)(()=>{(0,eG.getTaskNotes)(e).then(o),(0,eV.getTaskAssets)(e).then(m)},[e]);let F=v?(0,eq.isImageAsset)(v.filename,v.mimeType)?"image":eQ.test(v.filename)?"text":null:null,R=d.filter(e=>(0,eq.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,eq.localPathToApiUrl)(e.path),filename:e.filename})),A=v?R.findIndex(e=>e.id===v.id):-1;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.ScrollArea,{className:"h-full",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(U.FileText,{className:"h-3.5 w-3.5"}),r("taskPage.notes")]}),(0,t.jsxs)(c.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>h(!x),children:[x?(0,t.jsx)(ez.X,{className:"h-3 w-3"}):(0,t.jsx)(n.Plus,{className:"h-3 w-3"}),x?"":r("taskPage.addNote")]})]}),x&&(0,t.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,t.jsx)("input",{type:"text",value:p,onChange:e=>g(e.target.value),placeholder:r("taskPage.noteTitle"),className:"h-8 w-full rounded-md border border-border bg-background px-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary",autoFocus:!0}),(0,t.jsx)("textarea",{value:f,onChange:e=>j(e.target.value),placeholder:r("taskPage.noteContent"),rows:3,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),(0,t.jsx)(c.Button,{className:"text-xs",onClick:T,disabled:!p.trim(),children:r("taskPage.addNote")})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[0===i.length&&!x&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noNotes")}),i.map(e=>(0,t.jsx)("div",{className:"group rounded-md border border-border bg-card p-3",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>y(e),className:"min-w-0 flex-1 cursor-pointer text-left",title:r("taskPage.previewNote"),children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate hover:underline",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground line-clamp-3 whitespace-pre-wrap",children:e.content}),(0,t.jsx)("p",{className:"mt-1 text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>y(e),className:"text-muted-foreground hover:bg-accent",title:r("taskPage.previewNote"),children:(0,t.jsx)(eU.Eye,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>S(e.id),className:"text-muted-foreground hover:bg-destructive/10 hover:text-destructive",title:r("taskPage.deleteNote"),children:(0,t.jsx)(C.Trash2,{className:"h-3.5 w-3.5"})})]})]})},e.id))]})]}),(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[(0,t.jsx)(eM.Paperclip,{className:"h-3.5 w-3.5"}),r("taskPage.attachments")]}),(0,t.jsxs)(c.Button,{variant:"ghost",className:"h-6 gap-1 px-2 text-xs",onClick:()=>l.current?.click(),disabled:b,children:[(0,t.jsx)(e$.Upload,{className:"h-3 w-3"}),r("taskPage.uploadFile")]}),(0,t.jsx)("input",{ref:l,type:"file",className:"hidden",onChange:P})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-1.5",children:[0===d.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground py-2",children:r("taskPage.noAttachments")}),d.map(e=>{var s;let a=I(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2",children:[(0,t.jsx)(eM.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>D(e),disabled:!a,className:`min-w-0 flex-1 truncate text-left text-sm ${a?"cursor-pointer hover:underline":"cursor-default"}`,title:a?r("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(s=e.size)?s<1024?`${s} B`:s<1048576?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[a&&(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>D(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.preview"),children:(0,t.jsx)(eU.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>L(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:r("assets.revealInFinder"),children:(0,t.jsx)(W.FolderOpen,{className:"h-3 w-3"})}),(0,t.jsx)(c.Button,{variant:"ghost",size:"icon-xs",onClick:()=>E(e.id),className:"shrink-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",title:r("taskPage.deleteAttachment"),children:(0,t.jsx)(C.Trash2,{className:"h-3 w-3"})})]})]},e.id)})]})]})]})}),(0,t.jsx)(eX.ImageLightbox,{imageUrl:"image"===F&&A>=0?R[A].url:null,filename:"image"===F&&A>=0?R[A].filename:"",open:"image"===F,onOpenChange:e=>{e||k(null)},assets:R.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:A>=0?A:void 0,onIndexChange:e=>{let t=R[e];if(!t)return;let s=d.find(e=>e.id===t.id);s&&k(s)}}),(0,t.jsx)(eY.TextPreviewDialog,{url:"text"===F&&v?(0,eq.localPathToApiUrl)(v.path):null,filename:v?.filename??"",open:"text"===F,onOpenChange:e=>{e||k(null)}}),(0,t.jsx)(eJ.NotePreviewDialog,{note:w,open:null!==w,onOpenChange:e=>{e||y(null)}})]})}function e0({task:e,workspaceId:r,projectLocalPath:n,onClose:l}){let{t:i}=(0,u.useI18n)(),o=(0,a.useRouter)(),{removePortal:d}=(0,eS.useTerminalPortal)(),[h,p]=(0,s.useState)("terminal"),[g,f]=(0,s.useState)(null),[j,b]=(0,s.useState)(!1),[N,v]=(0,s.useState)(e.status);(0,s.useEffect)(()=>{v(e.status)},[e.status]);let[k,w]=(0,s.useState)(null),[y,C]=(0,s.useState)(!1),[T,S]=(0,s.useState)(!1),[P,E]=(0,s.useState)([]);(0,s.useEffect)(()=>{w(null),C(!1),S(!1),E([]),f(null),p("terminal")},[e.id]);let[I,D]=(0,s.useState)([]),[L,F]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(0,eA.getPrompts)().then(t=>{if(e)return;D(t.map(e=>({id:e.id,name:e.name,isDefault:e.isDefault})));let s=t.find(e=>e.isDefault);s&&F(s.id)}),()=>{e=!0}},[]),(0,s.useEffect)(()=>{w(null),S(!1);let t=!1;return(0,eP.getTaskExecutions)(e.id).then(e=>{if(t)return;let s=e[0];if(s?.status==="RUNNING"){let e=s.worktreePath||n||null;e&&w(e)}E(e.filter(e=>"RUNNING"!==e.status)),S(!0)}),()=>{t=!0}},[e.id]),(0,s.useEffect)(()=>{if("changes"!==h||"TODO"===N||"CANCELLED"===N)return;let t=!1;return b(!0),fetch(`/api/tasks/${e.id}/diff`).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{t||f(e?.files||e?.branchDeleted?e:null)}).catch(()=>{t||f(null)}).finally(()=>{t||b(!1)}),()=>{t=!0}},[h,N,e.id]);let R=(0,s.useCallback)(async()=>{if(!y){C(!0),d(e.id);try{let t=await (0,eE.startPtyExecutionSafe)(e.id,"",L);if(!t.ok){C(!1),eo.toast.error(t.error||i("terminal.startFailed"));return}w(t.worktreePath??null),v("IN_PROGRESS")}catch(e){C(!1),eo.toast.error(e instanceof Error&&e.message?e.message:i("terminal.startFailed"))}}},[e.id,y,L,i]),A=(0,s.useCallback)(t=>{C(!1),w(null),d(e.id),0===t&&v("IN_REVIEW"),(0,eP.getTaskExecutions)(e.id).then(e=>{E(e.filter(e=>"RUNNING"!==e.status))}),o.refresh()},[o,e.id]),O=(0,s.useCallback)(async()=>{await (0,eI.stopPtyExecution)(e.id),C(!1),d(e.id),w(null),v("IN_REVIEW"),(0,eP.getTaskExecutions)(e.id).then(e=>{E(e.filter(e=>"RUNNING"!==e.status))}),o.refresh()},[e.id,o]),$=(0,s.useCallback)(async t=>{C(!0),d(e.id),w(null);try{let{worktreePath:s}=await (0,eD.resumePtyExecution)(e.id,t);w(s),v("IN_PROGRESS")}catch{C(!1)}},[e.id,d]),M=(0,s.useCallback)(async()=>{C(!0),d(e.id),w(null);try{let{worktreePath:t}=await (0,eL.continueLatestPtyExecution)(e.id);w(t),v("IN_PROGRESS")}catch(e){C(!1),eo.toast.error(e instanceof Error?e.message:String(e))}},[e.id,d]),[z,W]=(0,s.useState)(!1),[G,H]=(0,s.useState)([]),_=(0,s.useCallback)(async()=>{try{let t=await (0,eF.checkWorktreeClean)(e.id);if(t.hasWorktree&&!t.clean)return void eo.toast.error(i("taskPage.uncommittedChanges",{count:String(t.files.length)}));if(t.hasWorktree&&t.clean&&!t.hasCommits)return void eo.toast.error(i("taskPage.noChangesToComplete"),{action:{label:i("taskPage.markAsCancelled"),onClick:()=>{(0,eB.updateTaskStatus)(e.id,"CANCELLED").then(()=>{v("CANCELLED"),eo.toast.success(i("taskPage.taskCancelled")),o.refresh()}).catch(()=>eo.toast.error("Failed to cancel task"))}}});if(t.hasWorktree&&t.hasCommits){H(t.commitLog),W(!0);return}await (0,eB.updateTaskStatus)(e.id,"DONE"),v("DONE"),eo.toast.success(i("taskPage.taskCompleted")),o.refresh()}catch{eo.toast.error("Failed to complete task")}},[e.id,o,i]),K=(0,s.useCallback)(()=>{v("DONE"),W(!1),eo.toast.success(i("taskPage.taskCompleted")),o.refresh()},[o,i]),X=(0,s.useCallback)(async t=>{try{let{hash:s}=await (0,eR.commitWorktreeChanges)(e.id,t);eo.toast.success(i("diff.commitSuccess",{hash:s})),o.refresh();let a=await fetch(`/api/tasks/${e.id}/diff`);if(a.ok){let e=await a.json();f(e?.files?e:null)}}catch(e){eo.toast.error(e instanceof Error?e.message:"Commit failed")}},[e.id,o,i]);return(0,t.jsxs)("div",{className:"flex h-full w-[600px] flex-shrink-0 flex-col border-l border-border bg-sidebar","data-testid":"task-detail-panel",children:[(0,t.jsx)(ey,{title:e.title,description:i("taskDetail.panelDescription"),branch:`task/${e.id}`,baseBranch:e.baseBranch,version:e.version??null,hasConversation:!1,updatedAt:e.updatedAt,openDir:k??(n?e.subPath?`${n}/${e.subPath}`:n:null),onBack:l}),(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>p("terminal"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"terminal"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(Y.Terminal,{className:"h-3 w-3"}),i("terminal.execute")]}),(0,t.jsx)("button",{onClick:()=>p("changes"),className:`px-3 py-1 text-xs font-medium rounded-md ${"changes"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:i("taskPage.changes")}),(0,t.jsxs)("button",{onClick:()=>p("notes"),className:`flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded-md ${"notes"===h?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(U.FileText,{className:"h-3 w-3"}),i("taskPage.notes")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["IN_REVIEW"===N&&(0,t.jsxs)(c.Button,{size:"sm",onClick:_,className:"bg-emerald-500/15 text-emerald-400 ring-1 ring-emerald-500/20 hover:bg-emerald-500/25",children:[(0,t.jsx)(ev.CheckCircle2,{className:"h-3 w-3"}),i("taskPage.completeTask")]}),"DONE"!==N&&"CANCELLED"!==N&&(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>o.push(`/workspaces/${r}/tasks/${e.id}`),className:"text-muted-foreground",children:[(0,t.jsx)(eb.ExternalLink,{className:"h-3 w-3"}),i("taskPage.viewDetails")]})]})]}),"terminal"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:T?k?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center justify-between border-b border-neutral-800 px-3 py-2 bg-[#0f1419]",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-400",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 animate-pulse"}),i("execution.running")]}),(0,t.jsxs)(x.Tooltip,{children:[(0,t.jsxs)(x.TooltipTrigger,{onClick:O,className:"flex items-center gap-1.5 rounded-md bg-red-500/15 px-3 py-1 text-xs font-medium text-red-400 hover:bg-red-500/25 transition-colors",children:[(0,t.jsx)(eN.Square,{className:"h-3 w-3"}),i("terminal.stopExecution")]}),(0,t.jsx)(x.TooltipContent,{side:"bottom",children:i("terminal.stopHint")})]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)(eS.TerminalOutlet,{taskId:e.id,worktreePath:k,onSessionEnd:A})})]}):"DONE"===N||"CANCELLED"===N?(0,t.jsx)("div",{className:"flex h-full flex-col overflow-hidden",children:(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(eO.ExecutionTimeline,{executions:P})})}):(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"shrink-0 flex items-center gap-2 border-b border-border px-4 py-3",children:[I.length>0&&(0,t.jsxs)(m.Select,{defaultValue:L??"none",onValueChange:e=>F("none"===e?null:e),children:[(0,t.jsx)(m.SelectTrigger,{size:"sm",className:"min-w-[120px]",children:(0,t.jsx)("span",{className:"text-left truncate",children:L?I.find(e=>e.id===L)?.name??i("terminal.noPrompt"):i("terminal.noPrompt")})}),(0,t.jsxs)(m.SelectContent,{className:"min-w-[200px]",children:[(0,t.jsx)(m.SelectItem,{value:"none",children:i("terminal.noPrompt")}),I.map(e=>(0,t.jsxs)(m.SelectItem,{value:e.id,children:[e.name,e.isDefault?" ★":""]},e.id))]})]},`prompt-${I.length}`),(0,t.jsxs)(c.Button,{onClick:R,disabled:y,size:"sm",className:"gap-2 px-4",children:[y?(0,t.jsx)(V.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(Y.Terminal,{className:"h-3.5 w-3.5"}),y?i("terminal.executing"):i("terminal.launch")]})]}),(0,t.jsx)(B.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsx)(eO.ExecutionTimeline,{executions:P,onResume:$,onContinueLatest:M})})]}):(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 bg-[#0f1419]",children:[(0,t.jsx)(V.Loader2,{className:"size-5 animate-spin text-neutral-500"}),(0,t.jsx)("span",{className:"text-xs text-neutral-500",children:i("execution.loading")})]})}):"changes"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:j?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.loadingDiff")})}):g?.branchDeleted?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.branchDeleted")})}):g?(0,t.jsx)(eC.TaskDiffView,{taskId:e.id,files:g.files,totalAdded:g.totalAdded,totalRemoved:g.totalRemoved,hasConflicts:g.hasConflicts,conflictFiles:g.conflictFiles,onCommit:X,hasUncommitted:g.hasUncommitted}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noChanges")})})}):"notes"===h?(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,t.jsx)(eZ,{taskId:e.id,projectId:e.projectId})}):null,(0,t.jsx)(eT.TaskMergeConfirmDialog,{open:z,onOpenChange:W,taskId:e.id,taskTitle:e.title,baseBranch:e.baseBranch??"main",fileCount:g?.files?.length??0,commitCount:g?.commitCount??0,commitLog:G,onMergeComplete:K})]})}var e1=e.i(323293),e5=e.i(111114);let e3=(0,Q.createServerReference)("40039292e6f13a93220735ef7737a5b7a36712cf05",Q.callServer,void 0,Q.findSourceMapURL,"deleteTask"),e2=(0,Q.createServerReference)("405ed7de6cb31552d1f1b993f720cead3c04731221",Q.callServer,void 0,Q.findSourceMapURL,"toggleTaskPinned");var e4=e.i(751819);let e8=(0,Q.createServerReference)("40ba368a4474ca9b032e17613ca34770c7bc685a69",Q.callServer,void 0,Q.findSourceMapURL,"getVersionsForPicker");var e7=e.i(889620),e6=e.i(19671);function e9({project:e,isActive:r,workspaceId:n,onSelect:l}){let{t:i}=(0,u.useI18n)(),o=(0,a.useRouter)(),d=e.totalTasks,m=e.runningTasks,h=d>0?Math.round(m/d*100):0,[p,g]=(0,s.useState)(!1),[f,j]=(0,s.useState)(!1),b=async()=>{j(!0);try{let t=await ea(e.id);o.push(`/workspaces/${n}/tasks/${t}`)}catch{eo.toast.error(i("git.openStudioFailed"))}finally{j(!1)}},N=(0,t.jsxs)("button",{onClick:()=>{r||l(e.id)},className:`group flex w-[212px] shrink-0 items-center gap-2 rounded-lg border-b-2 px-3 py-1.5 text-left transition-colors ${r?"border-primary bg-primary/10 ring-1 ring-primary/20 cursor-default":`border-transparent cursor-pointer ${p?"bg-accent":"hover:bg-accent"}`}`,children:[(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:`w-full truncate text-sm font-medium leading-tight ${r?"text-primary":p?"text-foreground":"text-muted-foreground group-hover:text-foreground"}`,children:e.name}),e.alias&&(0,t.jsx)("span",{className:"w-full truncate text-[11px] font-normal leading-tight text-muted-foreground/70",children:e.alias})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-baseline rounded-md border border-border bg-card px-1.5 py-0.5 font-mono text-[11px] font-semibold leading-none",children:[(0,t.jsx)("span",{className:"text-amber-500 dark:text-amber-400",children:m}),(0,t.jsx)("span",{className:"mx-px text-muted-foreground/50",children:"/"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:d})]})]});return(0,t.jsxs)(x.Tooltip,{onOpenChange:g,children:[(0,t.jsx)(x.TooltipTrigger,{render:N}),(0,t.jsxs)(x.TooltipContent,{side:"bottom",hideArrow:!0,className:"flex w-[268px] max-w-none flex-col items-stretch gap-0 rounded-xl border border-border bg-card p-3.5 text-foreground shadow-lg",children:[(0,t.jsx)("div",{className:"text-[13px] font-bold leading-snug break-words",children:e.name}),e.alias&&(0,t.jsx)("div",{className:"mt-0.5 text-[11.5px] leading-relaxed text-muted-foreground break-words",children:e.alias}),(0,t.jsx)("div",{className:"my-2.5 h-px bg-border"}),(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-amber-500 dark:bg-amber-400"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold",children:i("board.running")}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:i("board.runningDesc")}),(0,t.jsx)("span",{className:"ml-auto font-mono text-[15px] font-bold text-amber-500 dark:text-amber-400",children:m})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-sky-500 dark:bg-sky-400"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold",children:i("board.overview")}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground",children:i("board.totalDesc")}),(0,t.jsx)("span",{className:"ml-auto font-mono text-[15px] font-bold",children:d})]}),(0,t.jsx)("div",{className:"mt-2.5 h-[5px] overflow-hidden rounded-full bg-sky-500/15 dark:bg-sky-400/15",children:(0,t.jsx)("div",{className:"h-full rounded-full bg-amber-500 dark:bg-amber-400",style:{width:`${h}%`}})}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:i("board.badgeFormatHint")}),(0,t.jsxs)(c.Button,{variant:"outline",disabled:f,onClick:b,className:"h-6 shrink-0 gap-1 px-2 text-[11px]",children:[f?(0,t.jsx)(V.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(W.FolderOpen,{className:"h-3 w-3"}),i("git.openStudio")]})]})]})]})}function te({projects:e,activeProjectId:a,workspaceId:r,onSelect:n}){let l=(0,s.useRef)(null),[i,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),m=()=>{let e=l.current;e&&(o(e.scrollLeft>0),d(e.scrollLeft<e.scrollWidth-e.clientWidth-1))};(0,s.useEffect)(()=>{m();let e=l.current;if(e){e.addEventListener("scroll",m);let t=new ResizeObserver(m);return t.observe(e),()=>{e.removeEventListener("scroll",m),t.disconnect()}}},[e]);let x=e=>{let t=l.current;t&&t.scrollBy({left:"left"===e?-150:150,behavior:"smooth"})};return(0,t.jsxs)("div",{className:"relative flex items-center",children:[i&&(0,t.jsx)("button",{onClick:()=>x("left"),className:"absolute left-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(e6.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{ref:l,className:"flex items-center gap-1.5 overflow-x-auto scrollbar-none px-1 py-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.map(e=>(0,t.jsx)(e9,{project:e,isActive:a===e.id,workspaceId:r,onSelect:n},e.id))}),c&&(0,t.jsx)("button",{onClick:()=>x("right"),className:"absolute right-0 z-10 flex h-8 w-8 items-center justify-center rounded-md bg-background/90 text-muted-foreground shadow-sm ring-1 ring-border backdrop-blur-sm transition-colors hover:text-foreground",children:(0,t.jsx)(z.ChevronRight,{className:"h-4 w-4"})})]})}var tt=e.i(759686);function ts({open:e,onOpenChange:s,taskTitle:a,uncommittedFiles:r,commitLog:n,onConfirm:l}){let{t:i}=(0,u.useI18n)(),o=r.length,d=n.length,m=0===o&&0===d;return(0,t.jsx)(L.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(L.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsxs)(L.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(tt.AlertTriangle,{className:"h-4 w-4 text-amber-400"}),i("taskCancel.title")]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 p-3 space-y-1.5",children:[(0,t.jsx)("p",{className:"text-xs text-foreground",children:i("taskCancel.intro",{title:a})}),(0,t.jsx)("p",{className:"text-xs text-amber-300",children:i("taskCancel.irreversible")})]}),m?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("taskCancel.cleanNotice")}):(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:i("taskCancel.uncommittedFiles")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:o})]}),(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:i("taskCancel.unmergedCommits")}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:d})]})]}),o>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.filesList")}),(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:r.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))})]}),d>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:i("taskCancel.commitsList")}),(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:n.map((e,s)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},s))}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1.5",children:i("taskCancel.reflogHint")})]})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>s(!1),children:i("taskCancel.keep")}),(0,t.jsxs)(c.Button,{variant:"destructive",onClick:l,className:"gap-2",children:[(0,t.jsx)(tt.AlertTriangle,{className:"h-4 w-4"}),i("taskCancel.confirm")]})]})]})})}e.s(["BoardPageClient",0,function({workspaceId:e,projectId:r,project:n,projects:l,initialTasks:i,labels:o,openTaskId:c}){let d=(0,a.useRouter)(),{t:m}=(0,u.useI18n)(),[,x]=(0,s.useTransition)(),[p,g]=(0,s.useState)(""),[j,b]=(0,s.useState)("all"),[N,v]=(0,s.useState)(!1),[k,w]=(0,s.useState)("TODO"),[y,C]=(0,s.useState)(c??null),[T,S]=(0,s.useState)([]),P=y?i.find(e=>e.id===y)??null:null,[E,I]=(0,s.useState)(null),[D,L]=(0,s.useState)(null),[B,F]=(0,s.useState)(null);(0,s.useEffect)(()=>{e8(r).then(S).catch(()=>S([]))},[r]),(0,s.useEffect)(()=>{(0,e7.setLastProjectId)(e,r)},[e,r]);let R=T.find(e=>e.isCurrent)?.id??null,$=(0,s.useCallback)(()=>{x(()=>{d.refresh()})},[d]);(0,s.useEffect)(()=>{if(N)return;let e=setInterval(()=>{x(()=>{d.refresh()})},5e3);return()=>clearInterval(e)},[d,N]);let M=(0,s.useCallback)(e=>{g(e)},[]),z=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eF.checkWorktreeClean)(e);if(s.hasWorktree&&!s.clean){eo.toast.error(m("taskPage.uncommittedChanges",{count:String(s.files.length)})),$();return}if(s.hasWorktree&&s.clean&&!s.hasCommits){eo.toast.error(m("taskPage.noChangesToComplete"),{action:{label:m("taskPage.markAsCancelled"),onClick:()=>{(0,eB.updateTaskStatus)(e,"CANCELLED").then(()=>{eo.toast.success(m("taskPage.taskCancelled")),$()}).catch(()=>eo.toast.error("Failed to cancel task"))}}}),$();return}if(s.hasWorktree&&s.hasCommits){L({task:t,commitLog:s.commitLog,commitCount:s.commitLog.length}),$();return}await (0,eB.updateTaskStatus)(e,"DONE"),eo.toast.success(m("taskPage.taskCompleted")),$()}catch{eo.toast.error("Failed to complete task"),$()}},[i,$,m]),U=(0,s.useCallback)(async e=>{let t=i.find(t=>t.id===e);if(t)try{let s=await (0,eF.checkWorktreeClean)(e);if(!s.hasWorktree){await (0,eB.updateTaskStatus)(e,"CANCELLED"),eo.toast.success(m("taskPage.taskCancelled")),$();return}F({task:t,files:s.files,commitLog:s.commitLog}),$()}catch{eo.toast.error("Failed to cancel task"),$()}},[i,$,m]),W=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await z(e):"CANCELLED"===t?await U(e):(await (0,eB.updateTaskStatus)(e,t),$())},[$,z,U]),G=(0,s.useCallback)(async e=>{let t=await (0,e1.createTask)({title:e.title,description:e.description,projectId:r,priority:e.priority,status:e.status,labelIds:e.labelIds,baseBranch:e.baseBranch,subPath:e.subPath,versionId:e.versionId??void 0});if(e.autoStart&&t?.id)try{await (0,e4.startPtyExecution)(t.id,""),C(t.id)}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}$()},[r,$]),H=(0,s.useCallback)(async(e,t)=>{await (0,e5.updateTask)(e,{...t,labelIds:t.labelIds}),I(null),$()},[$]),V=(0,s.useCallback)(async e=>{await e3(e),y===e&&C(null),$()},[$,y]),_=(0,s.useCallback)(async e=>{await e2(e),$()},[$]),K=(0,s.useCallback)(async t=>{try{await (0,e4.startPtyExecution)(t,"")}catch(e){eo.toast.error(e instanceof Error?e.message:String(e))}d.push(`/workspaces/${e}/tasks/${t}`)},[d,e]),X=(0,s.useCallback)(async(e,t)=>{"DONE"===t?await z(e):"CANCELLED"===t?await U(e):(await (0,eB.updateTaskStatus)(e,t),$())},[$,z,U]),Y=(0,s.useCallback)(e=>{w(e),I(null),v(!0)},[]),J=(0,s.useCallback)(e=>{I(e),v(!0)},[]),q=i.filter(e=>!e.labels?.some(e=>e.label.name===f.TOWER_LABEL_NAME&&e.label.isBuiltin)).filter(e=>{if("backlog"===j){if(e.versionId)return!1}else if("all"!==j&&e.versionId!==j)return!1;if(p.trim()){let t=p.toLowerCase();if(!e.title.toLowerCase().includes(t)&&!e.description?.toLowerCase().includes(t))return!1}return!0});return(0,t.jsxs)("div",{className:"flex h-full",children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,t.jsx)("div",{className:"px-6 pt-3 pb-1",children:(0,t.jsx)(te,{projects:l,activeProjectId:r,workspaceId:e,onSelect:t=>d.push(`/workspaces/${e}?projectId=${t}`,{scroll:!1})})}),(0,t.jsx)(h,{searchQuery:p,onSearchChange:M,versions:T,versionFilter:j,onVersionFilterChange:b,versionsHref:`/workspaces/${e}/projects/${r}/versions`,onCreateTask:()=>{I(null),v(!0)}}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-4",children:(0,t.jsx)(A,{initialTasks:q,onTaskMove:W,onTaskClick:e=>{C(e.id)},onEditTask:J,onAddTask:Y,onDeleteTask:V,onTogglePin:_,workspaceId:e,onContextMenuStatusChange:X,onContextMenuLaunch:K})}),(0,t.jsx)(O.CreateTaskDialog,{open:N,onOpenChange:e=>{v(e),e||I(null)},onSubmit:G,onUpdate:H,defaultStatus:k,editTask:E,editTaskLabelIds:E?.labels?E.labels.map(e=>e.labelId):[],labels:o.filter(e=>!(e.name===f.TOWER_LABEL_NAME&&e.isBuiltin)),projectType:n.type,projectLocalPath:n.localPath,versions:T,defaultVersionId:R})]}),P?(0,t.jsx)(e0,{task:P,workspaceId:e,projectLocalPath:n.localPath,onClose:()=>C(null)}):(0,t.jsx)(ej,{project:n,workspaceId:e}),D&&(0,t.jsx)(eT.TaskMergeConfirmDialog,{open:!0,onOpenChange:e=>{e||L(null)},taskId:D.task.id,taskTitle:D.task.title,baseBranch:D.task.baseBranch??"main",fileCount:0,commitCount:D.commitCount,commitLog:D.commitLog,onMergeComplete:()=>{L(null),eo.toast.success(m("taskPage.taskCompleted")),$()}}),B&&(0,t.jsx)(ts,{open:!0,onOpenChange:e=>{e||F(null)},taskTitle:B.task.title,uncommittedFiles:B.files,commitLog:B.commitLog,onConfirm:()=>{let e=B.task.id;F(null),(0,eB.updateTaskStatus)(e,"CANCELLED").then(()=>{eo.toast.success(m("taskPage.taskCancelled")),$()}).catch(()=>eo.toast.error("Failed to cancel task"))}})]})}],783426)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),s=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:l,action:n,className:r}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",r),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:a}),l&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:l}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),l=e.i(259846),n=e.i(645378),r=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:r.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),r=(0,a.usePathname)(),i=o.find(e=>r.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(l.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let l=a.icon,r=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${r?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(l,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n(`sidebar.${a.key}`)})]},a.key)})]})}])},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)},715362,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("409ee3a4936770685e5864c918fde77b58c82c8c49",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},981705,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("402a900d665c83ee0101923eeccf19b2ac388a33f0",t.callServer,void 0,t.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,s])},734525,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(400355),l=e.i(738690),n=e.i(236967),r=e.i(533499),i=e.i(715362),c=e.i(514798);let o=(0,c.createServerReference)("4028050fca8d1cd079e697253d40f00308d04890b7",c.callServer,void 0,c.findSourceMapURL,"getProjectAssets");var d=e.i(453889),m=e.i(912505),x=e.i(645378),u=e.i(867533),h=e.i(998626),p=e.i(519455),f=e.i(937304);function g({asset:e,onPreview:s,onReveal:a,onDelete:l,onTaskClick:n}){var i;let{t:c}=(0,r.useI18n)(),o=(0,f.localPathToApiUrl)(e.path),m=(0,f.isImageAsset)(e.filename,e.mimeType);return(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/20",children:[(0,t.jsx)(p.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:m?(0,t.jsx)("img",{src:o,alt:e.filename,className:"h-12 w-12 rounded object-cover border border-border"}):(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded border border-border bg-muted",children:(0,t.jsx)(x.FileText,{className:"h-6 w-6 text-muted-foreground"})})}),(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)("p",{className:"truncate text-sm font-medium text-foreground",children:e.filename}),e.taskTitle&&e.taskId&&(0,t.jsx)(p.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),n?.(e.taskId)},className:"flex-shrink-0 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs px-1.5 py-0.5 rounded cursor-pointer hover:bg-blue-500/20 transition-colors h-auto",children:e.taskTitle.length>20?`[任务: ${e.taskTitle.slice(0,20)}...]`:`[任务: ${e.taskTitle}]`})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:null===(i=e.size)?"-":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:i<0x40000000?`${(i/1048576).toFixed(1)} MB`:`${(i/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>s(e),className:"text-muted-foreground","aria-label":c("assets.preview"),children:(0,t.jsx)(u.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":c("assets.revealInFinder"),children:(0,t.jsx)(d.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(p.Button,{variant:"ghost",size:"icon",onClick:()=>l(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":c("assets.delete"),children:(0,t.jsx)(h.Trash2,{className:"h-4 w-4"})})]})]})}function j({assets:e,onPreview:s,onReveal:a,onDelete:l,onTaskClick:n}){let{t:i}=(0,r.useI18n)();return 0===e.length?(0,t.jsx)(m.EmptyState,{icon:d.FolderOpen,title:i("assets.empty"),description:i("assets.emptyHint")}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsx)(g,{asset:e,onPreview:s,onReveal:a,onDelete:l,onTaskClick:n},e.id))})}var v=e.i(631675),N=e.i(657153),b=e.i(981705),k=e.i(624687),y=e.i(967489);function w({allWorkspaces:e,initialWsId:a,initialProjectId:l,onUploaded:n}){let{t:i}=(0,r.useI18n)(),c=(0,s.useRef)(null),[o,d]=(0,s.useState)(!1),[m,x]=(0,s.useState)(!1),[u,h]=(0,s.useState)(null),[f,g]=(0,s.useState)(a),[j,S]=(0,s.useState)(l),[C,T]=(0,s.useState)(""),I=e.find(e=>e.id===f),P=I?.projects??[],$=P.find(e=>e.id===j),A=$?$.alias?`${$.name} (${$.alias})`:$.name:j??"",B=()=>{d(!1),h(null),c.current&&(c.current.value="")},F=async()=>{if(u&&j){x(!0);try{let e=new FormData;e.append("file",u),e.append("projectId",j),e.append("description",C.trim()),await (0,b.uploadAsset)(e),n(j),B()}finally{x(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Button,{onClick:()=>{g(a),S(l),h(null),T(""),d(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(v.Upload,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:i("assets.upload")})]}),o&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:B}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-lg border border-border bg-card p-6 shadow-lg",children:[(0,t.jsx)(p.Button,{variant:"ghost",size:"icon-xs",onClick:B,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(N.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:i("assets.uploadTitle")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:i("assets.workspace")}),(0,t.jsxs)(y.Select,{value:f,onValueChange:t=>{var s;let a;return g(s=t??""),a=e.find(e=>e.id===s),void S(a?.projects[0]?.id??null)},children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 min-w-0 text-xs",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",title:I?.name??f,children:I?.name??f})}),(0,t.jsx)(y.SelectContent,{className:"max-w-[var(--anchor-width)]",children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,title:e.name,children:(0,t.jsx)("span",{className:"block truncate",children:e.name})},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:i("assets.project")}),P.length>0?(0,t.jsxs)(y.Select,{value:j??"",onValueChange:e=>S(e??""),children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 min-w-0 text-xs",children:(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-left",title:A,children:A})}),(0,t.jsx)(y.SelectContent,{className:"max-w-[var(--anchor-width)]",children:P.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(y.SelectItem,{value:e.id,title:s,children:(0,t.jsx)("span",{className:"block truncate",children:s})},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:i("assets.noProject")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:i("assets.file")}),(0,t.jsx)("input",{type:"file",ref:c,onChange:e=>{h(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(p.Button,{variant:"outline",onClick:()=>{c.current?.click()},className:"flex-1 border-dashed bg-background px-3 py-2 text-xs text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors text-left justify-start",children:u?u.name:i("assets.selectFile")})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0 pt-1.5",children:i("assets.description")}),(0,t.jsx)(k.Textarea,{value:C,onChange:e=>T(e.target.value),placeholder:i("assets.descriptionPlaceholder"),className:"flex-1 rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end mt-6",children:[(0,t.jsx)(p.Button,{variant:"outline",onClick:B,children:i("notes.cancel")}),(0,t.jsx)(p.Button,{onClick:F,disabled:!u||!j||!C.trim()||m,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:i(m?"assets.uploading":"assets.upload")})]})]})]})]})}var S=e.i(235357),C=e.i(144640),T=e.i(605005),I=e.i(360112);e.s(["AssetsPageClient",0,function({allWorkspaces:e,initialWorkspaceId:c,initialProjectId:d,initialAssets:m}){let x,{t:u}=(0,r.useI18n)(),[h,p]=(0,s.useTransition)(),[g,v]=(0,s.useState)(c),[N,b]=(0,s.useState)(d),[k,P]=(0,s.useState)(m),[$,A]=(0,s.useState)(""),[B,F]=(0,s.useState)(null),U=e.find(e=>e.id===g),z=U?.projects??[],O=(0,s.useCallback)(e=>{e?p(async()=>{P(await o(e))}):P([])},[p]),[R,L]=(0,s.useState)(null),D=R?(0,f.isImageAsset)(R.filename,R.mimeType)?"image":/\.(txt|md|json)$/i.test(R.filename)?"text":null:null,M=$.trim().toLowerCase(),V=M?k.filter(e=>e.filename.toLowerCase().includes(M)):k,E=V.filter(e=>(0,f.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,f.localPathToApiUrl)(e.path),filename:e.filename})),H=R?E.findIndex(e=>e.id===R.id):-1,K=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));I.toast.error(e.error||"Failed to reveal file")}}catch{I.toast.error("Failed to reveal file")}},W=async e=>{let t=k.find(t=>t.id===e);confirm(u("assets.deleteConfirm",{filename:t?.filename??e}))&&(await (0,i.deleteAsset)(e),O(N))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(n.SubPageNav,{workspaceId:g}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(y.Select,{value:g,onValueChange:t=>t&&(t=>{if(t===g)return;v(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;b(a?.id??null),O(a?.id??null)})(t),children:[(0,t.jsx)(y.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===g)?.name??g})}),(0,t.jsx)(y.SelectContent,{children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,children:e.name},e.id))})]}),z.length>0&&(0,t.jsxs)(y.Select,{value:N??"",onValueChange:e=>e&&void(e!==N&&(b(e),O(e))),children:[(0,t.jsx)(y.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(x=z.find(e=>e.id===N))?x.alias?`${x.name} (${x.alias})`:x.name:""})}),(0,t.jsx)(y.SelectContent,{children:z.map(e=>(0,t.jsxs)(y.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsxs)("div",{className:"relative ml-auto",children:[(0,t.jsx)(l.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:$,onChange:e=>A(e.target.value),placeholder:u("assets.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsx)(w,{allWorkspaces:e,initialWsId:g,initialProjectId:N,onUploaded:e=>{e===N&&O(N)}})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${h?"opacity-40 pointer-events-none":""} transition-opacity`,children:[h&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("assets.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("assets.noProjectHint")})]}):(0,t.jsx)(j,{assets:V.map(e=>({...e,taskId:e.task?.id??null,taskTitle:e.task?.title??null})),onPreview:e=>{let t=(0,f.isImageAsset)(e.filename,e.mimeType),s=/\.(txt|md|json)$/i.test(e.filename);(t||s)&&L(e)},onReveal:K,onDelete:W,onTaskClick:F})]})}),(0,t.jsx)(S.ImageLightbox,{imageUrl:"image"===D&&H>=0?E[H].url:null,filename:"image"===D&&H>=0?E[H].filename:"",open:"image"===D,onOpenChange:e=>{e||L(null)},assets:E.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:H>=0?H:void 0,onIndexChange:e=>{let t=E[e];if(!t)return;let s=k.find(e=>e.id===t.id);s&&L({...s,taskId:s.task?.id??null,taskTitle:s.task?.title??null})}}),(0,t.jsx)(C.TextPreviewDialog,{url:"text"===D&&R?(0,f.localPathToApiUrl)(R.path):null,filename:R?.filename??"",open:"text"===D,onOpenChange:e=>{e||L(null)}}),(0,t.jsx)(T.TaskOverviewDrawer,{open:!!B,onOpenChange:e=>{e||F(null)},taskId:B})]})}],734525)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
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)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},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)},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)},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)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},517675,49618,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40d355190aa13f7b29eb4ae960d07d3f17efbc9494",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],517675);let r=(0,t.createServerReference)("40887b42fd63bf331153abc27703393fbce3ca35b4",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],49618)},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)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 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 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["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 n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={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"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(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:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},636121,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40b7eec0bb0bcd1c9c8f305cb7f9cb2aa9d17c5331",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},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})}])},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)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,E=D?p.length:0,M=E>0?Math.ceil(E/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,E),$=M>1,B=D&&L>0,A=D&&L<M-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,E-1))},[D,A,f,L,E]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},323293,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("406164d0875801f4fc8d154f2a576627f6f47d6cc5",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},570634,527043,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("407b25dcf594d8f7c2bd8bfe60d61dd2f45c2495a3",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],570634);let r=(0,t.createServerReference)("40dcff96f17130009ebcf1aa9207414d4e599ff823",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],527043)},456346,6138,279430,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("40089d4052e961b88ce9db260f019e2ebf89ebeedb",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],6138);let s=(0,a.createServerReference)("4092134b47c02eb51ba3858c22029dc33c3aa49084",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],279430)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(6138),g=e.i(279430),f=e.i(514798);let b=(0,f.createServerReference)("40d983089d134142cd86ebd81bff685b6e80e6d9a5",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(636121);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let E,[M,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:M,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(E=T.find(e=>e.id===ee))?E.isCurrent?`${E.number} \xb7 ${E.name} \xb7 ${ea("version.currentShort")}`:`${E.number} \xb7 ${E.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{M.trim()&&(er&&j?j(w.id,{title:M,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:M,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},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"])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},980376,229323,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("40c2837c54ab133af8f3d05570e9671852fb7debfb",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],229323)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(323293),c=e.i(229323),d=e.i(358754),u=e.i(570634),x=e.i(527043),m=e.i(517675),h=e.i(49618),p=e.i(338973),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),E=e.i(297338),M=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;function B({text:e}){let{t:r}=(0,i.useI18n)(),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=c.current;e&&o(e.scrollHeight>e.clientHeight+1)},[]),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{ref:c,className:`text-sm text-foreground whitespace-pre-wrap ${s?"":"line-clamp-5"}`,children:e}),l&&(0,t.jsx)("button",{type:"button",onClick:()=>n(e=>!e),className:"mt-1 text-xs font-medium text-sky-600 hover:underline dark:text-sky-400",children:r(s?"taskDrawer.collapseDescription":"taskDrawer.expandDescription")})]})}e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:A,taskId:F,hideEnvActions:U=!1}){let{t:_}=(0,i.useI18n)(),[z,H]=(0,a.useState)(null),[V,G]=(0,a.useTransition)(),[W,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)([]),[Q,Z]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),[ea,er]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!F||!e){H(null),q([]),et([]);return}(0,u.getTaskNotes)(F).then(e=>q(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>q([])),(0,x.getTaskAssets)(F).then(e=>et(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>et([])),G(async()=>{let e=await (0,c.getTaskOverview)(F);e&&(H(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{J(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>J([])))})},[F,e]);let es=z?j.BOARD_COLUMNS.find(e=>e.id===z.status):null,en=z?j.PRIORITY_CONFIG[z.priority]:null,el=z?.executions?.[0]??null,ei=(()=>{if(el?.worktreePath)return el.worktreePath;let e=z?.project?.localPath;return e?z?.subPath?`${e}/${z.subPath}`:e:null})(),eo=(()=>{let e=el?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ec=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),ed=e=>{ec(e)?er(e):O.toast.info(_("assets.previewNotSupported"))},eu=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||_("git.openInFileManagerFailed"))}}catch{O.toast.error(_("git.openInFileManagerFailed"))}},ex=ea?(0,y.isImageAsset)(ea.filename,ea.mimeType)?"image":$.test(ea.filename)?"text":null:null,em=ee.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),eh=ea?em.findIndex(e=>e.id===ea.id):-1,ep=async e=>{if(z?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:z.project.id}),O.toast.success(_("taskDrawer.duplicateSuccess")),Y(!1),A(!1)}catch{O.toast.error(_("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:A,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:z?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:_("taskDrawer.title")}),z&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[es&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${es.color}`}),es.label]}),en&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${en.color}`,children:en.label}),z.version&&(0,t.jsx)(R.TaskVersionTag,{number:z.version.number,name:z.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:V&&!z?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:_("assets.loading")}):z?(0,t.jsxs)("div",{className:"p-4 pb-8 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:_("taskDrawer.description")}),z.description?(0,t.jsx)(B,{text:z.description},z.id):(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:_("taskDrawer.noDescription")})]}),z.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:z.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:_("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(z.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),_("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:z._count.assets})]}),ee.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:ee.map(e=>{var a;let r=ec(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(E.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?_("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ed(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eu(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.revealInFinder"),children:(0,t.jsx)(M.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),_("taskDrawer.notes")]}),K.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:K.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:_("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.fileChanges")}),eo?(0,t.jsx)(L,{added:eo.added,removed:eo.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),_("taskDrawer.lastExecution")]}),el?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:el.status}),el.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:el.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noExecution")})]}),ei&&!U&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(ei)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(_("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(ei)}catch(e){console.error("openInEditor failed:",e),O.toast.error(_("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(ei)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(_("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{z&&Y(!0)},disabled:!z,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),_("taskDrawer.duplicate")]})})]}):null})]}),z?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:W,onOpenChange:Y,onSubmit:ep,labels:X,projectType:z.project.type,projectLocalPath:z.project.localPath,prefillFromTask:{title:z.title,description:z.description,priority:z.priority,subPath:z.subPath,labelIds:z.labels.map(e=>e.label.id),baseBranch:z.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:Q,open:null!==Q,onOpenChange:e=>{e||Z(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ex&&eh>=0?em[eh].url:null,filename:"image"===ex&&eh>=0?em[eh].filename:"",open:"image"===ex,onOpenChange:e=>{e||er(null)},assets:em.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:eh>=0?eh:void 0,onIndexChange:e=>{let t=em[e];if(!t)return;let a=ee.find(e=>e.id===t.id);a&&er(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ex&&ea?(0,y.localPathToApiUrl)(ea.path):null,filename:ea?.filename??"",open:"text"===ex,onOpenChange:e=>{e||er(null)}})]})}],605005)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,912505,e=>{"use strict";var t=e.i(289721),s=e.i(975157);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:n,className:l}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",l),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:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),n&&(0,t.jsx)("div",{className:"mt-2",children:n})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),n=e.i(645378),l=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:n.FileText},{key:"assets",icon:l.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:n}=(0,c.useI18n)(),l=(0,a.usePathname)(),i=o.find(e=>l.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,l=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${l?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n(`sidebar.${a.key}`)})]},a.key)})]})}])},979469,44024,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40a70edd3393a6e943c12efd99d936dd8480766f7c",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,s],979469);let a=(0,t.createServerReference)("40e17f6b7a150ef1f3538cd387c986871bcf686761",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,a],44024)},497732,e=>{"use strict";var t=e.i(289721),s=e.i(965652),a=e.i(232545),r=e.i(400355),n=e.i(738690),l=e.i(236967),i=e.i(533499),c=e.i(685149),o=e.i(979469),d=e.i(514798);let x=(0,d.createServerReference)("6054880192c3edbaeac4f53e527cb974cfab8f1f32",d.callServer,void 0,d.findSourceMapURL,"updateNote");var u=e.i(44024);let m=(0,d.createServerReference)("608f95689eae64ccef8d597748a553d906c9689285",d.callServer,void 0,d.findSourceMapURL,"getProjectNotes");var h=e.i(975157);function p({active:e,onSelect:s}){let{t:a}=(0,i.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("button",{onClick:()=>s("all"),className:(0,h.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===e?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a("notes.allCategories")}),c.NOTE_CATEGORIES_PRESET.map(a=>(0,t.jsx)("button",{onClick:()=>s(a),className:(0,h.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",e===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:a},a))]})}var f=e.i(519455),g=e.i(967489),j=e.i(645378),v=e.i(912505),N=e.i(464249),b=e.i(998626);let y=(0,e.i(572989).default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);e.i(254826);var S=e.i(309735);function w({note:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n}){let{t:l}=(0,i.useI18n)(),c=e.content.slice(0,300);return(0,t.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,t.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,t.jsx)(f.Button,{variant:"ghost",size:"icon-sm",onClick:()=>s(e),className:"text-muted-foreground","aria-label":l("notes.edit"),children:(0,t.jsx)(N.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(f.Button,{variant:"ghost",size:"icon-sm",onClick:()=>a(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":l("notes.delete"),children:(0,t.jsx)(b.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,t.jsx)("div",{className:"mb-2 pr-16",children:(0,t.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:e.title})}),(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)("span",{className:"inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:e.category}),e.taskId&&e.taskTitle&&(0,t.jsxs)("button",{type:"button",onClick:()=>e.taskId&&n?.(e.taskId),disabled:!n,className:`inline-flex max-w-[160px] items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-medium text-primary ${n?"cursor-pointer hover:bg-primary/15":"cursor-default"}`,title:e.taskTitle,children:[(0,t.jsx)(y,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.taskTitle})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>r?.(e),disabled:!r,className:`block w-full text-left ${r?"cursor-pointer":"cursor-default"}`,title:r?l("notes.previewNote"):void 0,children:(0,t.jsx)("div",{className:"max-h-24 overflow-hidden text-sm leading-relaxed text-muted-foreground",children:(0,t.jsx)(S.Streamdown,{children:c})})})]})}function k({notes:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n}){let{t:l}=(0,i.useI18n)();return 0===e.length?(0,t.jsx)(v.EmptyState,{icon:j.FileText,title:l("notes.empty"),description:l("notes.emptyHint")}):(0,t.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,t.jsx)(w,{note:e,onEdit:s,onDelete:a,onPreview:r,onTaskClick:n},e.id))})}var C=e.i(624687);function T({value:e,onChange:s}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,t.jsx)(C.Textarea,{value:e,onChange:e=>s(e.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,t.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,t.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border text-sm leading-relaxed",children:(0,t.jsx)(S.Streamdown,{children:e})})})]})}var E=e.i(997025),I=e.i(759684),P=e.i(605005);e.s(["NotesPageClient",0,function({allWorkspaces:e,initialWorkspaceId:d,initialProjectId:h,initialNotes:j}){let v,N,{t:b}=(0,i.useI18n)(),[y,S]=(0,s.useTransition)(),[w,C]=(0,s.useState)(d),[R,$]=(0,s.useState)(h),[O,A]=(0,s.useState)(j),[_,L]=(0,s.useState)("all"),[B,z]=(0,s.useState)(""),[M,U]=(0,s.useState)(null),[D,V]=(0,s.useState)(null),[F,G]=(0,s.useState)(null),[H,K]=(0,s.useState)(!1),[q,W]=(0,s.useState)(""),[J,Q]=(0,s.useState)(""),[X,Y]=(0,s.useState)(c.NOTE_CATEGORIES_PRESET[3]),[Z,ee]=(0,s.useState)(d),[et,es]=(0,s.useState)(h),ea=e.find(e=>e.id===w),er=ea?.projects??[],en=e.find(e=>e.id===Z),el=en?.projects??[],ei=(0,s.useCallback)(e=>{e?S(async()=>{A(await m(e))}):A([])},[S]),ec=async()=>{et&&q.trim()&&(await (0,o.createNote)({title:q.trim(),content:J,category:X,projectId:et}),K(!1),et===R&&ei(R))},eo=async()=>{F&&q.trim()&&(await x(F.id,{title:q.trim(),content:J,category:X}),G(null),ei(R))},ed=async e=>{let t=O.find(t=>t.id===e);!t||confirm(b("notes.deleteConfirm",{title:t.title}))&&(await (0,u.deleteNote)(e),ei(R))},ex=B.trim().toLowerCase(),eu=O.filter(e=>"all"===_||e.category===_).filter(e=>!ex||e.title.toLowerCase().includes(ex)).map(e=>({id:e.id,title:e.title,content:e.content,category:e.category,updatedAt:new Date(e.updatedAt),taskId:e.taskId,taskTitle:e.task?.title??null})),em=H||null!==F;return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.SubPageNav,{workspaceId:w}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(g.Select,{value:w,onValueChange:t=>t&&(t=>{if(t===w)return;C(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;$(a?.id??null),L("all"),ei(a?.id??null)})(t),children:[(0,t.jsx)(g.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===w)?.name??w})}),(0,t.jsx)(g.SelectContent,{children:e.map(e=>(0,t.jsx)(g.SelectItem,{value:e.id,children:e.name},e.id))})]}),er.length>0&&(0,t.jsxs)(g.Select,{value:R??"",onValueChange:e=>e&&void(e!==R&&($(e),L("all"),ei(e))),children:[(0,t.jsx)(g.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(v=er.find(e=>e.id===R))?v.alias?`${v.name} (${v.alias})`:v.name:""})}),(0,t.jsx)(g.SelectContent,{children:er.map(e=>(0,t.jsxs)(g.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),!em&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative ml-auto",children:[(0,t.jsx)(n.Search,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:B,onChange:e=>z(e.target.value),placeholder:b("notes.searchPlaceholder"),className:"h-8 w-48 rounded-md border border-border bg-background pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),(0,t.jsxs)(f.Button,{onClick:()=>{W(""),Q(""),Y(c.NOTE_CATEGORIES_PRESET[3]),ee(w),es(R),G(null),K(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(a.Plus,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:b("notes.newNote")})]})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:em?(0,t.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!F&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.workspace")}),(0,t.jsxs)(g.Select,{value:Z,onValueChange:t=>t&&(t=>{if(t===Z)return;ee(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;es(a?.id??null)})(t),children:[(0,t.jsx)(g.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===Z)?.name??Z})}),(0,t.jsx)(g.SelectContent,{children:e.map(e=>(0,t.jsx)(g.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),!F&&el.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.project")}),(0,t.jsxs)(g.Select,{value:et??"",onValueChange:e=>e&&es(e),children:[(0,t.jsx)(g.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(N=el.find(e=>e.id===et))?N.alias?`${N.name} (${N.alias})`:N.name:""})}),(0,t.jsx)(g.SelectContent,{children:el.map(e=>(0,t.jsxs)(g.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b("notes.categoryLabel")}),(0,t.jsxs)(g.Select,{value:X,onValueChange:e=>e&&Y(e),children:[(0,t.jsx)(g.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,t.jsx)("span",{className:"truncate",children:X})}),(0,t.jsx)(g.SelectContent,{children:c.NOTE_CATEGORIES_PRESET.map(e=>(0,t.jsx)(g.SelectItem,{value:e,children:e},e))})]})]})]}),(0,t.jsx)("input",{type:"text",value:q,onChange:e=>W(e.target.value),placeholder:b("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,t.jsx)(T,{value:J,onChange:Q}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,t.jsx)(f.Button,{variant:"outline",onClick:()=>{K(!1),G(null)},children:b("notes.cancel")}),(0,t.jsx)(f.Button,{onClick:F?eo:ec,disabled:!q.trim()||!F&&!et,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:b("notes.save")})]})]}):(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 gap-4",children:[(0,t.jsx)(p,{active:_,onSelect:L}),(0,t.jsx)(I.ScrollArea,{className:"flex-1 min-h-0",children:(0,t.jsxs)("div",{className:`relative ${y?"opacity-40 pointer-events-none":""} transition-opacity`,children:[y&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(r.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===er.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:b("notes.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:b("notes.noProjectHint")})]}):(0,t.jsx)(k,{notes:eu,onEdit:e=>{W(e.title),Q(e.content),Y(e.category),G(e),K(!1)},onDelete:ed,onPreview:U,onTaskClick:V})]})})]})}),(0,t.jsx)(E.NotePreviewDialog,{note:M,open:null!==M,onOpenChange:e=>{e||U(null)}}),(0,t.jsx)(P.TaskOverviewDrawer,{open:null!==D,onOpenChange:e=>{e||V(null)},taskId:D})]})}],497732)},244455,e=>{e.v(t=>Promise.all(["static/chunks/075e-zs_kgc_g.js"].map(t=>e.l(t))).then(()=>t(629495)))},800307,e=>{e.v(t=>Promise.all(["static/chunks/0zm4fvu.lntrp.js"].map(t=>e.l(t))).then(()=>t(267483)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
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)},368490,e=>{"use strict";var t=e.i(776405);e.s(["ChevronRight",()=>t.default])},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)},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)},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)},517675,49618,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40d355190aa13f7b29eb4ae960d07d3f17efbc9494",t.callServer,void 0,t.findSourceMapURL,"openInFileManager");e.s(["openInFileManager",0,a],517675);let r=(0,t.createServerReference)("40887b42fd63bf331153abc27703393fbce3ca35b4",t.callServer,void 0,t.findSourceMapURL,"openInEditor");e.s(["openInEditor",0,r],49618)},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)},736061,460707,e=>{"use strict";var t=e.i(572989);let a=(0,t.default)("folder-search",[["path",{d:"M10.7 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 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["FolderSearch",0,a],736061);let r=(0,t.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,r],460707)},867533,e=>{"use strict";let t=(0,e.i(572989).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],867533)},35967,e=>{"use strict";var t=e.i(289721);let a=(0,e.i(572989).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var r=e.i(533499);let s=["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 n(e){return s[function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e)%s.length]}let l={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"};e.s(["TaskVersionTag",0,function({number:e,name:r,showName:s=!1,className:n="",title:l}){return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${n}`,title:l??(r?`${e} \xb7 ${r}`:e),children:[(0,t.jsx)(a,{className:"h-2.5 w-2.5 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:e}),s&&r?(0,t.jsx)("span",{className:"max-w-[140px] truncate",children:r}):null]})},"VersionStatusBadge",0,function({status:e}){let{t:a}=(0,r.useI18n)();return(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${l[e]}`,children:a(`version.status.${e}`)})},"VersionTypeBadge",0,function({name:e}){let{t:a}=(0,r.useI18n)();return e?(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(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:a("version.type.uncategorized")})},"typeBadgeColor",0,n],35967)},636121,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("40b7eec0bb0bcd1c9c8f305cb7f9cb2aa9d17c5331",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,a])},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})}])},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)},254826,309735,e=>{"use strict";var t=e.i(990216);e.s([],254826),e.s(["Streamdown",()=>t.C],309735)},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"])},997025,e=>{"use strict";var t=e.i(289721);e.i(254826);var a=e.i(309735),r=e.i(776639),s=e.i(533499);e.s(["NotePreviewDialog",0,function({note:e,open:n,onOpenChange:l}){let{t:i}=(0,s.useI18n)();return(0,t.jsx)(r.Dialog,{open:n,onOpenChange:l,children:(0,t.jsxs)(r.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:e?.title}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:e&&e.content.trim()?(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(a.Streamdown,{children:e.content})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("taskPage.noteEmpty")})})]})})}])},323293,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("406164d0875801f4fc8d154f2a576627f6f47d6cc5",t.callServer,void 0,t.findSourceMapURL,"createTask");e.s(["createTask",0,a])},570634,527043,e=>{"use strict";var t=e.i(514798);let a=(0,t.createServerReference)("407b25dcf594d8f7c2bd8bfe60d61dd2f45c2495a3",t.callServer,void 0,t.findSourceMapURL,"getTaskNotes");e.s(["getTaskNotes",0,a],570634);let r=(0,t.createServerReference)("40dcff96f17130009ebcf1aa9207414d4e599ff823",t.callServer,void 0,t.findSourceMapURL,"getTaskAssets");e.s(["getTaskAssets",0,r],527043)},456346,6138,279430,e=>{"use strict";let t=(0,e.i(572989).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",0,t],456346);var a=e.i(514798);let r=(0,a.createServerReference)("40089d4052e961b88ce9db260f019e2ebf89ebeedb",a.callServer,void 0,a.findSourceMapURL,"getProjectBranches");e.s(["getProjectBranches",0,r],6138);let s=(0,a.createServerReference)("4092134b47c02eb51ba3858c22029dc33c3aa49084",a.callServer,void 0,a.findSourceMapURL,"fetchRemoteBranches");e.s(["fetchRemoteBranches",0,s],279430)},744798,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(776639),s=e.i(519455),n=e.i(793479),l=e.i(624687),i=e.i(110204),o=e.i(226145),c=e.i(597746),d=e.i(456346),u=e.i(967489),x=e.i(337822),m=e.i(317056),h=e.i(533499),p=e.i(6138),g=e.i(279430),f=e.i(514798);let b=(0,f.createServerReference)("40d983089d134142cd86ebd81bff685b6e80e6d9a5",f.callServer,void 0,f.findSourceMapURL,"getCurrentBranch");var v=e.i(636121);e.s(["CreateTaskDialog",0,function({open:e,onOpenChange:f,onSubmit:y,onUpdate:j,defaultStatus:k="TODO",editTask:w,editTaskLabelIds:N,prefillFromTask:C,labels:S,projectType:I,projectLocalPath:D,versions:T,defaultVersionId:P}){let E,[M,L]=(0,a.useState)(""),[R,O]=(0,a.useState)(""),[$,B]=(0,a.useState)("MEDIUM"),[A,F]=(0,a.useState)(""),[U,_]=(0,a.useState)([]),[z,H]=(0,a.useState)([]),[V,G]=(0,a.useState)(!1),[W,Y]=(0,a.useState)(""),[X,J]=(0,a.useState)(!1),[K,q]=(0,a.useState)(!0),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),{t:ea}=(0,h.useI18n)();(0,a.useEffect)(()=>{if(!e||w)return;let t=!1;return(0,v.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(e=>{if(t)return;let a=e["task.defaultUseWorktree"],r=e["task.defaultAutoStart"];"boolean"==typeof a&&q(a),"boolean"==typeof r&&Z(r)}).catch(()=>{}),()=>{t=!0}},[e,w]);let er=!!w,es=!!D;return(0,a.useEffect)(()=>{w?(L(w.title),O(w.description??""),B(w.priority),F(w.subPath??""),_(N??[]),et(w.versionId??null)):(C?(L(C.title??""),O(C.description??""),B(C.priority??"MEDIUM"),F(C.subPath??""),_(C.labelIds??[])):(L(""),O(""),B("MEDIUM"),F(""),_([])),et(P??null))},[w,N,C,P]),(0,a.useEffect)(()=>{e||w||(L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),J(!1),et(P??null))},[e,w,P]),(0,a.useEffect)(()=>{e&&es&&!w&&(G(!0),Promise.all([(0,p.getProjectBranches)(D),b(D)]).then(([e,t])=>{H(e);let a=C?.baseBranch??null;a&&e.includes(a)?Y(a):Y(t&&e.includes(t)?t:e[0]??""),G(!1),(0,g.fetchRemoteBranches)(D).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(D).then(e=>{H(e),Y(t=>e.includes(t)?t:e[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{H([]),Y(""),G(!1)}))},[e,es,D,w,C]),(0,t.jsx)(r.Dialog,{open:e,onOpenChange:f,disablePointerDismissal:!0,children:(0,t.jsxs)(r.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsx)(r.DialogHeader,{children:(0,t.jsx)(r.DialogTitle,{children:er?ea("task.edit"):ea("task.create")})}),(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"title",children:ea("task.title")}),(0,t.jsx)(n.Input,{id:"title","data-testid":"task-title",placeholder:ea("task.titlePlaceholder"),value:M,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"description",children:ea("task.description")}),(0,t.jsx)(l.Textarea,{id:"description",placeholder:ea("task.descPlaceholder"),rows:4,value:R,onChange:e=>O(e.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"subPath",children:ea("task.subPath")}),(0,t.jsx)(n.Input,{id:"subPath",placeholder:ea("task.subPathPlaceholder"),value:A,onChange:e=>F(e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:ea("task.subPathHint")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.priority")}),(0,t.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(e=>{let a={LOW:{label:ea("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ea("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ea("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ea("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[e];return(0,t.jsx)("button",{type:"button",onClick:()=>B(e),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${$===e?`${a.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:a.label},e)})})]}),es&&!er&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.baseBranch")}),V?(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchLoading")}):z.length>0?(0,t.jsxs)(x.Popover,{open:X,onOpenChange:J,children:[(0,t.jsxs)(x.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,t.jsx)(o.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:W||void 0,children:W||ea("task.branchNone")}),(0,t.jsx)(d.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,t.jsx)(x.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,t.jsxs)(m.Command,{children:[(0,t.jsx)(m.CommandInput,{placeholder:ea("task.branchSearch")}),(0,t.jsxs)(m.CommandList,{children:[(0,t.jsx)(m.CommandEmpty,{children:ea("task.branchNone")}),(0,t.jsx)(m.CommandGroup,{children:z.map(e=>(0,t.jsxs)(m.CommandItem,{value:e,onSelect:()=>{Y(e),J(!1)},children:[(0,t.jsx)(o.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono",title:e,children:e}),e===W&&(0,t.jsx)(c.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},e))})]})]})})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:ea("task.branchNone")}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.worktreeLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>q(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${K===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.worktreeYes"):ea("task.worktreeNo")},String(e)))})]}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:ea("task.autoStartLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>Z(e),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Q===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e?ea("task.autoStartYes"):ea("task.autoStartNo")},String(e)))})]})]}),S.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("task.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:S.map(e=>{let a=U.includes(e.id);return(0,t.jsx)("button",{type:"button",onClick:()=>{_(t=>a?t.filter(t=>t!==e.id):[...t,e.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${a?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:e.color+"20",color:e.color,borderColor:a?e.color+"40":"transparent",borderWidth:"1px"},children:e.name},e.id)})})]}),(!er||T&&T.length>0)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{children:ea("version.picker.label")}),T&&T.length>0?(0,t.jsxs)(u.Select,{value:ee??"__none__",onValueChange:e=>et("__none__"===e?null:e),children:[(0,t.jsx)(u.SelectTrigger,{children:(0,t.jsx)("span",{className:"truncate text-sm",children:ee&&(E=T.find(e=>e.id===ee))?E.isCurrent?`${E.number} \xb7 ${E.name} \xb7 ${ea("version.currentShort")}`:`${E.number} \xb7 ${E.name}`:ea("version.picker.none")})}),(0,t.jsxs)(u.SelectContent,{children:[(0,t.jsx)(u.SelectItem,{value:"__none__",children:ea("version.picker.none")}),T.map(e=>(0,t.jsx)(u.SelectItem,{value:e.id,children:e.isCurrent?`${e.number} \xb7 ${e.name} \xb7 ${ea("version.currentShort")}`:`${e.number} \xb7 ${e.name}`},e.id))]})]}):(0,t.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ea("version.picker.empty")})]})]}),(0,t.jsxs)(r.DialogFooter,{children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:()=>f(!1),children:ea("common.cancel")}),(0,t.jsx)(s.Button,{onClick:()=>{M.trim()&&(er&&j?j(w.id,{title:M,description:R,priority:$,labelIds:U,subPath:A.trim()||"",versionId:ee}):y({title:M,description:R,priority:$,status:k,labelIds:U,...es&&K&&W?{baseBranch:W}:{},...A.trim()?{subPath:A.trim()}:{},versionId:ee,autoStart:Q}),L(""),O(""),B("MEDIUM"),F(""),_([]),H([]),Y(""),q(!0),et(null),f(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:er?ea("common.save"):ea("common.create")})]})]})})}],744798)},235357,144640,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(585012),s=e.i(657153),n=e.i(19671),l=e.i(368490),i=e.i(902539);let o=(0,e.i(572989).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var c=e.i(922541),d=e.i(533499);function u({children:e,onClick:a,title:r,disabled:s,...n}){return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||a()},title:r,disabled:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...n,children:e})}e.s(["ImageLightbox",0,function({imageUrl:e,filename:x,open:m,onOpenChange:h,assets:p,currentIndex:g,onIndexChange:f}){let{t:b}=(0,d.useI18n)(),[v,y]=(0,a.useState)(1),[j,k]=(0,a.useState)({x:0,y:0}),[w,N]=(0,a.useState)(!1),C=(0,a.useRef)(null),[S,I]=(0,a.useState)(!1),D=!!p&&p.length>1&&"number"==typeof g&&!!f,T=D&&g>0,P=D&&g<p.length-1,E=D?p.length:0,M=E>0?Math.ceil(E/10):0,L=D?Math.floor(g/10):0,R=10*L,O=Math.min(R+10,E),$=M>1,B=D&&L>0,A=D&&L<M-1;(0,a.useEffect)(()=>{I(!0)},[]),(0,a.useEffect)(()=>{y(1),k({x:0,y:0})},[e]),(0,a.useEffect)(()=>{if(!m)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[m]);let F=(0,a.useCallback)(()=>h(!1),[h]),U=(0,a.useCallback)(()=>{D&&T&&f(g-1)},[D,T,f,g]),_=(0,a.useCallback)(()=>{D&&P&&f(g+1)},[D,P,f,g]),z=(0,a.useCallback)(()=>{D&&B&&f((L-1)*10)},[D,B,f,L]),H=(0,a.useCallback)(()=>{D&&A&&f(Math.min((L+1)*10,E-1))},[D,A,f,L,E]),V=(0,a.useCallback)(()=>{y(e=>Math.min(8,1.25*e))},[]),G=(0,a.useCallback)(()=>{y(e=>{let t=Math.max(.1,e/1.25);return t<=1&&k({x:0,y:0}),t})},[]),W=(0,a.useCallback)(()=>{y(1),k({x:0,y:0})},[]);(0,a.useEffect)(()=>{if(!m)return;let e=e=>{switch(e.key){case"Escape":e.preventDefault(),F();break;case"ArrowLeft":D&&(e.preventDefault(),U());break;case"ArrowRight":D&&(e.preventDefault(),_());break;case"+":case"=":e.preventDefault(),V();break;case"-":case"_":e.preventDefault(),G();break;case"0":e.preventDefault(),W()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,D,F,U,_,V,G,W]);let Y=(0,a.useRef)(!1),X=()=>{w&&N(!1),C.current=null},J=w?"cursor-grabbing":"cursor-grab";if(!m||!S)return null;let K=(0,t.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":b("assets.lightbox.zoomFit"),children:[(0,t.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[x,D?` \xb7 ${g+1} / ${p.length}`:""]}),(0,t.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${J}`,onClick:e=>{e.target===e.currentTarget&&F()},onWheel:e=>{e.preventDefault();let t=-e.deltaY>0?1.25:.8;y(e=>{let a=Math.min(8,Math.max(.1,e*t));return a<=1&&k({x:0,y:0}),a})},children:e&&(0,t.jsx)("img",{src:e,alt:x,onClick:e=>{e.stopPropagation(),Y.current&&(Y.current=!1)},onPointerDown:e=>{0===e.button&&(e.stopPropagation(),Y.current=!1,e.target.setPointerCapture?.(e.pointerId),C.current={x:e.clientX,y:e.clientY,panX:j.x,panY:j.y},N(!0))},onPointerMove:e=>{if(!C.current)return;let t=e.clientX-C.current.x,a=e.clientY-C.current.y;Math.abs(t)+Math.abs(a)>5&&(Y.current=!0),w&&k({x:C.current.panX+t,y:C.current.panY+a})},onPointerUp:X,onPointerLeave:X,onPointerCancel:X,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${j.x}px, ${j.y}px, 0) scale(${v})`,transformOrigin:"center center",transition:w?"none":"transform 120ms ease-out",willChange:w?"transform":"auto"},draggable:!1})}),(0,t.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:e=>e.stopPropagation(),children:[D&&(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[$&&(0,t.jsx)(u,{onClick:z,title:`${b("assets.lightbox.prev")} (-10)`,"aria-label":`${b("assets.lightbox.prev")} (-10)`,disabled:!B,children:(0,t.jsx)(i.ChevronsLeft,{className:"h-4 w-4"})}),(0,t.jsx)(u,{onClick:U,title:b("assets.lightbox.prev"),"aria-label":b("assets.lightbox.prev"),disabled:!T,children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(R,O).map((e,a)=>{let r=R+a,s=r===g;return(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),s||f(r)},title:e.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${s?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,t.jsx)("img",{src:e.url,alt:e.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},e.url+r)})}),(0,t.jsx)(u,{onClick:_,title:b("assets.lightbox.next"),"aria-label":b("assets.lightbox.next"),disabled:!P,children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4"})}),$&&(0,t.jsx)(u,{onClick:H,title:`${b("assets.lightbox.next")} (+10)`,"aria-label":`${b("assets.lightbox.next")} (+10)`,disabled:!A,children:(0,t.jsx)(o,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,t.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*v),"%"]}),(0,t.jsx)(u,{onClick:W,title:b("assets.lightbox.reset"),"aria-label":b("assets.lightbox.reset"),disabled:1===v&&0===j.x&&0===j.y,children:(0,t.jsx)(c.RotateCcw,{className:"h-4 w-4"})}),(0,t.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,t.jsx)(u,{onClick:F,title:b("assets.lightbox.close"),"aria-label":b("assets.lightbox.close"),children:(0,t.jsx)(s.X,{className:"h-4 w-4"})})]})]})]});return(0,r.createPortal)(K,document.body)}],235357);var x=e.i(400355);e.i(254826);var m=e.i(309735),h=e.i(776639);e.s(["TextPreviewDialog",0,function({url:e,filename:r,open:s,onOpenChange:n}){let{t:l}=(0,d.useI18n)(),[i,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!s||!e){o(null),g(null);return}let t=!1;return u(!0),g(null),o(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(o(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?g(l("assets.fileTooLarge")):g(l("assets.previewError")),u(!1))}),()=>{t=!0}},[s,e,l]);let f=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(h.Dialog,{open:s,onOpenChange:n,children:(0,t.jsxs)(h.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(c)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(x.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l("assets.loadingPreview")})]});if(p)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===i)return null;if("md"===f)return(0,t.jsx)("div",{className:"text-sm leading-relaxed",children:(0,t.jsx)(m.Streamdown,{children:i})});if("json"===f){let e;try{e=JSON.stringify(JSON.parse(i),null,2)}catch{e=i}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:i})})()})]})})}],144640)},937304,e=>{"use strict";let t=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);e.s(["isImageAsset",0,function(e,a){if(a?.startsWith("image/"))return!0;let r=e.split(".").pop()?.toLowerCase();return!!r&&t.has(r)},"localPathToApiUrl",0,function(e){let t=e.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}])},297338,e=>{"use strict";let t=(0,e.i(572989).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],297338)},980376,229323,e=>{"use strict";var t=e.i(289721),a=e.i(225061),r=e.i(975157),s=e.i(519455),n=e.i(670123);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}e.s(["Sheet",0,function({...e}){return(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...e})},"SheetContent",0,function({className:e,children:o,side:c="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":c,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[o,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...s})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...s}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...s})}],980376);var o=e.i(514798);let c=(0,o.createServerReference)("40c2837c54ab133af8f3d05570e9671852fb7debfb",o.callServer,void 0,o.findSourceMapURL,"getTaskOverview");e.s(["getTaskOverview",0,c],229323)},606393,e=>{"use strict";let t=(0,e.i(572989).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",0,t],606393)},605005,e=>{"use strict";var t=e.i(289721),a=e.i(965652),r=e.i(980376),s=e.i(759684),n=e.i(487486),l=e.i(519455),i=e.i(533499),o=e.i(323293),c=e.i(229323),d=e.i(358754),u=e.i(570634),x=e.i(527043),m=e.i(517675),h=e.i(49618),p=e.i(338973),g=e.i(744798),f=e.i(997025),b=e.i(235357),v=e.i(144640),y=e.i(937304),j=e.i(685149),k=e.i(606393),w=e.i(875840),N=e.i(245697),C=e.i(12659),S=e.i(736061),I=e.i(460707),D=e.i(567860),T=e.i(645378),P=e.i(867533),E=e.i(297338),M=e.i(453889);function L({added:e,removed:a}){let{t:r}=(0,i.useI18n)();return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,t.jsx)("span",{children:r("diff.filesChanged",{count:String(e+a)})}),e>0&&(0,t.jsxs)("span",{className:"text-green-500",children:["+",e]}),a>0&&(0,t.jsxs)("span",{className:"text-red-500",children:["-",a]})]})}var R=e.i(35967),O=e.i(360112);let $=/\.(txt|md|json)$/i;function B({text:e}){let{t:r}=(0,i.useI18n)(),[s,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=c.current;e&&o(e.scrollHeight>e.clientHeight+1)},[]),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{ref:c,className:`text-sm text-foreground whitespace-pre-wrap ${s?"":"line-clamp-5"}`,children:e}),l&&(0,t.jsx)("button",{type:"button",onClick:()=>n(e=>!e),className:"mt-1 text-xs font-medium text-sky-600 hover:underline dark:text-sky-400",children:r(s?"taskDrawer.collapseDescription":"taskDrawer.expandDescription")})]})}e.s(["TaskOverviewDrawer",0,function({open:e,onOpenChange:A,taskId:F,hideEnvActions:U=!1}){let{t:_}=(0,i.useI18n)(),[z,H]=(0,a.useState)(null),[V,G]=(0,a.useTransition)(),[W,Y]=(0,a.useState)(!1),[X,J]=(0,a.useState)([]),[K,q]=(0,a.useState)([]),[Q,Z]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),[ea,er]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(!F||!e){H(null),q([]),et([]);return}(0,u.getTaskNotes)(F).then(e=>q(e.map(e=>({id:e.id,title:e.title,content:e.content,category:e.category})))).catch(()=>q([])),(0,x.getTaskAssets)(F).then(e=>et(e.map(e=>({id:e.id,filename:e.filename,path:e.path,mimeType:e.mimeType,size:e.size})))).catch(()=>et([])),G(async()=>{let e=await (0,c.getTaskOverview)(F);e&&(H(e),e.project?.workspaceId&&(0,d.getLabelsForWorkspace)(e.project.workspaceId).then(e=>{J(e.map(e=>({id:e.id,name:e.name,color:e.color,isBuiltin:e.isBuiltin})))}).catch(()=>J([])))})},[F,e]);let es=z?j.BOARD_COLUMNS.find(e=>e.id===z.status):null,en=z?j.PRIORITY_CONFIG[z.priority]:null,el=z?.executions?.[0]??null,ei=(()=>{if(el?.worktreePath)return el.worktreePath;let e=z?.project?.localPath;return e?z?.subPath?`${e}/${z.subPath}`:e:null})(),eo=(()=>{let e=el?.gitStats;if(!e)return null;try{let t=JSON.parse(e);return{added:t.insertions??0,removed:t.deletions??0}}catch{return null}})(),ec=e=>(0,y.isImageAsset)(e.filename,e.mimeType)||$.test(e.filename),ed=e=>{ec(e)?er(e):O.toast.info(_("assets.previewNotSupported"))},eu=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));O.toast.error(e.error||_("git.openInFileManagerFailed"))}}catch{O.toast.error(_("git.openInFileManagerFailed"))}},ex=ea?(0,y.isImageAsset)(ea.filename,ea.mimeType)?"image":$.test(ea.filename)?"text":null:null,em=ee.filter(e=>(0,y.isImageAsset)(e.filename,e.mimeType)).map(e=>({id:e.id,url:(0,y.localPathToApiUrl)(e.path),filename:e.filename})),eh=ea?em.findIndex(e=>e.id===ea.id):-1,ep=async e=>{if(z?.project)try{let{autoStart:t,...a}=e;await (0,o.createTask)({...a,projectId:z.project.id}),O.toast.success(_("taskDrawer.duplicateSuccess")),Y(!1),A(!1)}catch{O.toast.error(_("taskDrawer.duplicateFailed"))}};return(0,t.jsxs)(r.Sheet,{open:e,onOpenChange:A,children:[(0,t.jsxs)(r.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(r.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(r.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:z?.title??""}),(0,t.jsx)(r.SheetDescription,{className:"sr-only",children:_("taskDrawer.title")}),z&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[es&&(0,t.jsxs)(n.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${es.color}`}),es.label]}),en&&(0,t.jsx)(n.Badge,{variant:"secondary",className:`text-xs ${en.color}`,children:en.label}),z.version&&(0,t.jsx)(R.TaskVersionTag,{number:z.version.number,name:z.version.name,showName:!0})]})]}),(0,t.jsx)(s.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:V&&!z?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:_("assets.loading")}):z?(0,t.jsxs)("div",{className:"p-4 pb-8 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:_("taskDrawer.description")}),z.description?(0,t.jsx)(B,{text:z.description},z.id):(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:_("taskDrawer.noDescription")})]}),z.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:z.labels.map(e=>(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(k.Calendar,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:_("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(z.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(N.Package,{className:"h-3.5 w-3.5"}),_("taskDrawer.resources"),(0,t.jsx)("span",{className:"text-foreground",children:z._count.assets})]}),ee.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:ee.map(e=>{var a;let r=ec(e);return(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border px-2 py-1.5",children:[(0,t.jsx)(E.Paperclip,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("button",{type:"button",onClick:()=>ed(e),disabled:!r,className:`min-w-0 flex-1 truncate text-left text-sm ${r?"cursor-pointer hover:underline":"cursor-default"}`,title:r?_("assets.preview"):e.filename,children:e.filename}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:(a=e.size)?a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`:""}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[r&&(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>ed(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.preview"),children:(0,t.jsx)(P.Eye,{className:"h-3 w-3"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-xs",onClick:()=>eu(e),className:"shrink-0 text-muted-foreground hover:bg-accent",title:_("assets.revealInFinder"),children:(0,t.jsx)(M.FolderOpen,{className:"h-3 w-3"})})]})]},e.id)})}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noResources")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(T.FileText,{className:"h-3.5 w-3.5"}),_("taskDrawer.notes")]}),K.length>0?(0,t.jsx)("div",{className:"space-y-1.5",children:K.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e),className:"group/note flex w-full items-start gap-2 rounded-md border border-border p-2 text-left transition-colors hover:bg-accent/40",title:_("taskDrawer.previewNote"),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.title}),e.content&&(0,t.jsx)("p",{className:"mt-0.5 line-clamp-2 whitespace-pre-wrap text-xs text-muted-foreground",children:e.content})]}),(0,t.jsx)(P.Eye,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/note:opacity-100"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noNotes")})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:_("taskDrawer.fileChanges")}),eo?(0,t.jsx)(L,{added:eo.added,removed:eo.removed}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noFileChanges")})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(C.PlayCircle,{className:"h-3.5 w-3.5"}),_("taskDrawer.lastExecution")]}),el?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(n.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:el.status}),el.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:el.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:_("taskDrawer.noExecution")})]}),ei&&!U&&(0,t.jsxs)("section",{className:"flex flex-col",children:[(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,m.openInFileManager)(ei)}catch(e){console.error("openInFileManager failed:",e),O.toast.error(_("git.openInFileManagerFailed"))}},children:[(0,t.jsx)(S.FolderSearch,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInFileManager")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,h.openInEditor)(ei)}catch(e){console.error("openInEditor failed:",e),O.toast.error(_("git.openInEditorFailed"))}},children:[(0,t.jsx)(I.Code,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInEditor")]}),(0,t.jsxs)(l.Button,{variant:"ghost",className:"w-full h-8 justify-start gap-2 px-2 text-xs text-muted-foreground",onClick:async()=>{try{await (0,p.openInTerminal)(ei)}catch(e){console.error("openInTerminal failed:",e),O.toast.error(_("git.openInTerminalFailed"))}},children:[(0,t.jsx)(D.Terminal,{className:"h-3.5 w-3.5 shrink-0"}),_("git.openInTerminal")]})]}),(0,t.jsx)("section",{children:(0,t.jsxs)(l.Button,{variant:"default",className:"w-full",onClick:()=>{z&&Y(!0)},disabled:!z,children:[(0,t.jsx)(w.Copy,{className:"h-4 w-4"}),_("taskDrawer.duplicate")]})})]}):null})]}),z?.project&&(0,t.jsx)(g.CreateTaskDialog,{open:W,onOpenChange:Y,onSubmit:ep,labels:X,projectType:z.project.type,projectLocalPath:z.project.localPath,prefillFromTask:{title:z.title,description:z.description,priority:z.priority,subPath:z.subPath,labelIds:z.labels.map(e=>e.label.id),baseBranch:z.baseBranch}}),(0,t.jsx)(f.NotePreviewDialog,{note:Q,open:null!==Q,onOpenChange:e=>{e||Z(null)}}),(0,t.jsx)(b.ImageLightbox,{imageUrl:"image"===ex&&eh>=0?em[eh].url:null,filename:"image"===ex&&eh>=0?em[eh].filename:"",open:"image"===ex,onOpenChange:e=>{e||er(null)},assets:em.map(({url:e,filename:t})=>({url:e,filename:t})),currentIndex:eh>=0?eh:void 0,onIndexChange:e=>{let t=em[e];if(!t)return;let a=ee.find(e=>e.id===t.id);a&&er(a)}}),(0,t.jsx)(v.TextPreviewDialog,{url:"text"===ex&&ea?(0,y.localPathToApiUrl)(ea.path):null,filename:ea?.filename??"",open:"text"===ex,onOpenChange:e=>{e||er(null)}})]})}],605005)}]);
|