tower-studio 0.2.37 → 0.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +44 -32
- 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.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +81 -69
- 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 +2 -2
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +44 -32
- 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 +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +44 -32
- 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 +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +61 -49
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +115 -103
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +98 -86
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +81 -69
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +86 -74
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +44 -32
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +84 -72
- 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 +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +95 -83
- 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 +2 -2
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +62 -50
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00llstz._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01yu.gw._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qijr4h._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~foo~5._.js +2 -2
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0i2.v2d._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_12xey8u._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{0ws9_lucide-react_dist_esm_icons_0odx0ph._.js → 0ws9_lucide-react_dist_esm_icons_10_90yo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-tolks._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__05b5dyi._.js → [root-of-the-server]__0.~z1-.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05sv58d._.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]__062b.yt._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__093tt4a._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e-k-gl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0guqcva._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gzafdq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0csj88a._.js → [root-of-the-server]__0i0o7w5._.js} +2 -2
- 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]__0oy9qt7._.js → [root-of-the-server]__0k1ivnj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vjz4a4._.js → [root-of-the-server]__0kgd-1s._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p0te97._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0siyg1p._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t6f4lq._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0th-t1a._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kdfgja._.js → [root-of-the-server]__0xte.35._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0r1f9zc._.js → _0-qd2ss._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0pp8emp._.js → _00kwrmr._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_00t6138._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_05jv_cy._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0ub.iem._.js → _06nlsbw._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_07c-9da._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0_z-t6g._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0cxhub8._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0v0y2s~._.js → _0gb8a9_._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0gxccup._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0hh17jg._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0lqxllh._.js → _0m.34j8._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0mpce0d._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0muaopo._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0n1l7yo._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0ng0eku._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0r_ch71._.js → _0t0oltj._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{_0.-xze1._.js → _0v66l8c._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0w9~m7o._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{node_modules__pnpm_0hhlpw6._.js → node_modules__pnpm_06f0dao._.js} +2 -2
- 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_0sms4xl._.js +1 -1
- 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 +356 -272
- package/.next/standalone/.next/static/chunks/0.euy5rie4v3d.js +1 -0
- package/.next/standalone/.next/static/chunks/0.lqb7y9kz5z6.js +1 -0
- package/.next/standalone/.next/static/chunks/01.nidb8sf6bh.js +1 -0
- package/.next/standalone/.next/static/chunks/{00_-_qcmfqtqx.js → 01ijm9dpmm34q.js} +1 -1
- package/.next/standalone/.next/static/chunks/023v9juzhzc~d.js +1 -0
- package/.next/standalone/.next/static/chunks/02jsekc779t5~.js +1 -0
- package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +1 -0
- package/.next/standalone/.next/static/chunks/0_-2es-r~03mg.js +1 -0
- package/.next/standalone/.next/static/chunks/{0m227i3p__4qz.js → 0a._hcvzq4ko7.js} +2 -2
- package/.next/standalone/.next/static/chunks/{0o0ngxu962xwu.js → 0dha37i1oc6z~.js} +1 -1
- package/.next/standalone/.next/static/chunks/0e9ykduz3_0e1.js +1 -0
- package/.next/standalone/.next/static/chunks/0fy6w5d_zyro0.js +1 -0
- package/.next/standalone/.next/static/chunks/0g-gbdkcssn.g.js +1 -0
- package/.next/standalone/.next/static/chunks/{08ewy5rmh_n_s.js → 0h4k3cicu7g-w.js} +1 -1
- package/.next/standalone/.next/static/chunks/{03tc~x4m3si-p.js → 0h73q-9fyea0t.js} +1 -1
- package/.next/standalone/.next/static/chunks/0h7~fn.p-fxz_.js +1 -0
- package/.next/standalone/.next/static/chunks/0j2n.h0~von8h.js +1 -0
- package/.next/standalone/.next/static/chunks/0k.hp06ufx4yp.js +1 -0
- package/.next/standalone/.next/static/chunks/0lk-i0jm2ubea.css +1 -0
- package/.next/standalone/.next/static/chunks/0p5rare_o5zb1.js +5 -0
- package/.next/standalone/.next/static/chunks/{08cuzj12jsob5.js → 0q~4dhw.phxg3.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0oaelsx9hpsxi.js → 0t_3wwd~mmc.1.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0950xt.ix3j1q.js → 0u.3xek3m2ud..js} +1 -1
- package/.next/standalone/.next/static/chunks/0u.b0t7fueh-x.js +1 -0
- package/.next/standalone/.next/static/chunks/{10mwqzqdpi9d5.js → 0v.l5.sqos562.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0o3eu9q3qnvi..js → 0w14di5d0vw6-.js} +1 -1
- package/.next/standalone/.next/static/chunks/0z2blg_osfipv.js +1 -0
- package/.next/standalone/.next/static/chunks/{0c.6n7.lv8~10.js → 11.r6a56ss7qu.js} +1 -1
- package/.next/standalone/.next/static/chunks/112wpv9rqw4dp.js +1 -0
- package/.next/standalone/.next/static/chunks/{09a43rligfn_v.js → 134c60acdsr_g.js} +1 -1
- package/.next/standalone/.next/static/chunks/13rq33eiffqaz.js +1 -0
- package/.next/standalone/package.json +3 -2
- package/dist/mcp-server.cjs +6 -3
- package/package.json +3 -2
- package/scripts/migrations/0003-backfill-systemconfig-from-legacy-db.ts +113 -0
- package/scripts/run-migrations.ts +12 -0
- package/skills/tower/SKILL.md +81 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rzkdlf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_00z0339._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0_r-f5a._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0gzdrnf._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0nk7qd4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0z7hp2l._.js +0 -3
- package/.next/standalone/.next/static/chunks/00.kucs-nzw72.js +0 -1
- package/.next/standalone/.next/static/chunks/014cs5ykpuy3m.js +0 -1
- package/.next/standalone/.next/static/chunks/01f6i88h8guls.js +0 -1
- package/.next/standalone/.next/static/chunks/034x~85_u-f26.js +0 -1
- package/.next/standalone/.next/static/chunks/03v.cnuy3h3rb.js +0 -1
- package/.next/standalone/.next/static/chunks/05dlhgy_00kj1.js +0 -1
- package/.next/standalone/.next/static/chunks/05p_suay02eo1.js +0 -1
- package/.next/standalone/.next/static/chunks/0ckcff42.pa_j.js +0 -1
- package/.next/standalone/.next/static/chunks/0dt3ljzz2pz0r.css +0 -1
- package/.next/standalone/.next/static/chunks/0kuz7yd.6hpd1.js +0 -1
- package/.next/standalone/.next/static/chunks/0mk6~akqfc05t.js +0 -1
- package/.next/standalone/.next/static/chunks/0p.-6dhm_nm9f.js +0 -1
- package/.next/standalone/.next/static/chunks/0qc.bnyy68-yh.js +0 -1
- package/.next/standalone/.next/static/chunks/0qfx4.vrc9a9n.js +0 -5
- package/.next/standalone/.next/static/chunks/0qonpqhvpg-tt.js +0 -1
- package/.next/standalone/.next/static/chunks/0s46.9vyvnj99.js +0 -1
- package/.next/standalone/.next/static/chunks/0u~0j4_f3gwi2.js +0 -1
- package/.next/standalone/.next/static/chunks/0~uo_7-sxehxf.js +0 -1
- package/.next/standalone/.next/static/chunks/15~2jg4z8h54~.js +0 -1
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → JutVIyokVf-YrN6j2WEwG}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → JutVIyokVf-YrN6j2WEwG}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{FO1_JUKAw5Zm07Nlq0G6X → JutVIyokVf-YrN6j2WEwG}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
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:l,className:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.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:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,n=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 ${n?"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:l(`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)},241448,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40a719de85953a8f71fd136a0f7b38182c06070514",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},68402,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40b809033e36c068a9c66eee2e76c4d1e0558f2062",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),r=e.i(738690),l=e.i(236967),n=e.i(533499),i=e.i(241448),c=e.i(514798);let o=(0,c.createServerReference)("40e871ae135d4aaa9119867d6ba62e0186bb8b391a",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:r,onTaskClick:l}){var i;let{t:c}=(0,n.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(),l?.(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:()=>r(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:r,onTaskClick:l}){let{t:i}=(0,n.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:r,onTaskClick:l},e.id))})}var v=e.i(631675),b=e.i(657153),N=e.i(68402),k=e.i(624687),y=e.i(280027);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:l}){let i,{t:c}=(0,n.useI18n)(),o=(0,s.useRef)(null),[d,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),P=e.find(e=>e.id===g),$=P?.projects??[],A=()=>{m(!1),f(null),o.current&&(o.current.value="")},B=async()=>{if(h&&S){u(!0);try{let e=new FormData;e.append("file",h),e.append("projectId",S),e.append("description",T.trim()),await (0,N.uploadAsset)(e),l(S),A()}finally{u(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Button,{onClick:()=>{j(a),C(r),f(null),I(""),m(!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:c("assets.upload")})]}),d&&(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:A}),(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:A,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:c("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:c("assets.workspace")}),(0,t.jsxs)(y.Select,{value:g,onValueChange:t=>{var s;let a;return j(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:P?.name??g})}),(0,t.jsx)(y.SelectContent,{children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,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:c("assets.project")}),$.length>0?(0,t.jsxs)(y.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=$.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(y.SelectContent,{children:$.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(y.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:c("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:c("assets.file")}),(0,t.jsx)("input",{type:"file",ref:o,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(p.Button,{variant:"outline",onClick:()=>{o.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:h?h.name:c("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:c("assets.description")}),(0,t.jsx)(k.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:c("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:A,children:c("notes.cancel")}),(0,t.jsx)(p.Button,{onClick:B,disabled:!h||!S||!T.trim()||x,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:c(x?"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,n.useI18n)(),[h,p]=(0,s.useTransition)(),[g,v]=(0,s.useState)(c),[b,N]=(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(b))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.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;N(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:b??"",onValueChange:e=>e&&void(e!==b&&(N(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===b))?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)(r.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:b,onUploaded:e=>{e===b&&O(b)}})]}),(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
|
+
(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:l,className:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},236967,e=>{"use strict";var t=e.i(289721),s=e.i(210702),a=e.i(538059),r=e.i(259846),l=e.i(645378),n=e.i(453889),i=e.i(487278),c=e.i(533499);let o=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,c.useI18n)(),n=(0,a.usePathname)(),i=o.find(e=>n.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:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),o.map(a=>{let r=a.icon,n=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 ${n?"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:l(`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)},92575,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("40210797f0040786db86f0d815003f858cbb40f2c4",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},210381,e=>{"use strict";var t=e.i(514798);let s=(0,t.createServerReference)("403aef25069f4957dd5bd16a162617f05e9de9b04c",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),r=e.i(738690),l=e.i(236967),n=e.i(533499),i=e.i(92575),c=e.i(514798);let o=(0,c.createServerReference)("4055b6e8b3734fde3298c09bbf70af5f92de4b6627",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:r,onTaskClick:l}){var i;let{t:c}=(0,n.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(),l?.(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:()=>r(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:r,onTaskClick:l}){let{t:i}=(0,n.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:r,onTaskClick:l},e.id))})}var v=e.i(631675),b=e.i(657153),N=e.i(210381),k=e.i(624687),y=e.i(280027);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:l}){let i,{t:c}=(0,n.useI18n)(),o=(0,s.useRef)(null),[d,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[g,j]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),P=e.find(e=>e.id===g),$=P?.projects??[],A=()=>{m(!1),f(null),o.current&&(o.current.value="")},B=async()=>{if(h&&S){u(!0);try{let e=new FormData;e.append("file",h),e.append("projectId",S),e.append("description",T.trim()),await (0,N.uploadAsset)(e),l(S),A()}finally{u(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(p.Button,{onClick:()=>{j(a),C(r),f(null),I(""),m(!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:c("assets.upload")})]}),d&&(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:A}),(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:A,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:c("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:c("assets.workspace")}),(0,t.jsxs)(y.Select,{value:g,onValueChange:t=>{var s;let a;return j(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:P?.name??g})}),(0,t.jsx)(y.SelectContent,{children:e.map(e=>(0,t.jsx)(y.SelectItem,{value:e.id,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:c("assets.project")}),$.length>0?(0,t.jsxs)(y.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(y.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=$.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(y.SelectContent,{children:$.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(y.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:c("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:c("assets.file")}),(0,t.jsx)("input",{type:"file",ref:o,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(p.Button,{variant:"outline",onClick:()=>{o.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:h?h.name:c("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:c("assets.description")}),(0,t.jsx)(k.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:c("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:A,children:c("notes.cancel")}),(0,t.jsx)(p.Button,{onClick:B,disabled:!h||!S||!T.trim()||x,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:c(x?"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,n.useI18n)(),[h,p]=(0,s.useTransition)(),[g,v]=(0,s.useState)(c),[b,N]=(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(b))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(l.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;N(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:b??"",onValueChange:e=>e&&void(e!==b&&(N(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===b))?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)(r.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:b,onUploaded:e=>{e===b&&O(b)}})]}),(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)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,538059,(e,t,r)=>{t.exports=e.r(322195)},314757,e=>{"use strict";var t=e.i(965652);e.s(["useControlled",0,function({controlled:e,default:r,name:n,state:i="value"}){let{current:u}=t.useRef(void 0!==e),[l,a]=t.useState(r),o=t.useCallback(e=>{u||a(e)},[]);return[u?e:l,o]}])},584191,e=>{"use strict";e.s([])},890514,551974,e=>{"use strict";e.i(708878);var t,r=e.i(462902),n=e.i(965652),i=e.i(954588);let u=((t={}).disabled="data-disabled",t.valid="data-valid",t.invalid="data-invalid",t.touched="data-touched",t.dirty="data-dirty",t.filled="data-filled",t.focused="data-focused",t),l={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},a={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},o={disabled:!1,...a};e.s(["DEFAULT_FIELD_ROOT_STATE",0,o,"DEFAULT_FIELD_STATE_ATTRIBUTES",0,a,"DEFAULT_VALIDITY_STATE",0,l,"fieldValidityMapping",0,{valid:e=>null===e?null:e?{[u.valid]:""}:{[u.invalid]:""}}],551974);let s=n.createContext({invalid:void 0,name:void 0,validityData:{state:l,errors:[],error:"",value:"",initialValue:null},setValidityData:i.NOOP,disabled:void 0,touched:a.touched,setTouched:i.NOOP,dirty:a.dirty,setDirty:i.NOOP,filled:a.filled,setFilled:i.NOOP,focused:a.focused,setFocused:i.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:o,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=i.EMPTY_OBJECT)=>e,getInputValidationProps:(e=i.EMPTY_OBJECT)=>e,inputRef:{current:null},commit:async()=>{}}});e.s(["FieldRootContext",0,s,"useFieldRootContext",0,function(e=!0){let t=n.useContext(s);if(t.setValidityData===i.NOOP&&!e)throw Error((0,r.default)(28));return t}],890514)},350105,e=>{"use strict";var t=e.i(462902),r=e.i(965652);let n=r.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});e.s(["useFieldsetRootContext",0,function(e=!1){let i=r.useContext(n);if(!i&&!e)throw Error((0,t.default)(86));return i}])},571870,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let n=t.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:r.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});e.s(["useFormContext",0,function(){return t.useContext(n)}])},179279,e=>{"use strict";var t=e.i(965652),r=e.i(954588);let n=t.createContext({controlId:void 0,registerControlId:r.NOOP,labelId:void 0,setLabelId:r.NOOP,messageIds:[],setMessageIds:r.NOOP,getDescriptionProps:e=>e});e.s(["LabelableContext",0,n,"useLabelableContext",0,function(){return t.useContext(n)}])},137122,e=>{"use strict";var t=e.i(965652),r=e.i(887642),n=e.i(903224),i=e.i(565455),u=e.i(207516),l=e.i(179279),a=e.i(289721);e.s(["LabelableProvider",0,function(e){let o=(0,u.useBaseUiId)(),s=void 0===e.controlId?o:e.controlId,[c,d]=t.useState(s),[f,v]=t.useState(e.labelId),[p,b]=t.useState([]),g=(0,n.useRefWithInit)(()=>new Map),{messageIds:m}=(0,l.useLabelableContext)(),h=(0,r.useStableCallback)((e,t)=>{let r=g.current;void 0===t?r.delete(e):(r.set(e,t),d(e=>{let t;if(0!==r.size){for(let n of r.values()){if(void 0!==e&&n===e)return e;void 0===t&&(t=n)}return t}}))}),y=t.useCallback(e=>(0,i.mergeProps)({"aria-describedby":m.concat(p).join(" ")||void 0},e),[m,p]),C=t.useMemo(()=>({controlId:c,registerControlId:h,labelId:f,setLabelId:v,messageIds:p,setMessageIds:b,getDescriptionProps:y}),[c,h,f,v,p,b,y]);return(0,a.jsx)(l.LabelableContext.Provider,{value:C,children:e.children})}])},956181,e=>{"use strict";e.s(["getCombinedFieldValidityData",0,function(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}])},770652,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(887642),n=e.i(890514),i=e.i(551974),u=e.i(350105),l=e.i(571870),a=e.i(137122),o=e.i(581263),s=e.i(954588),c=e.i(161476),d=e.i(179279),f=e.i(565455),v=e.i(956181);let p=Object.keys(i.DEFAULT_VALIDITY_STATE);var b=e.i(289721);let g=t.forwardRef(function(e,a){let{errors:g,validationMode:m,submitAttemptedRef:h}=(0,l.useFormContext)(),{render:y,className:C,validate:E,validationDebounceTime:R=0,validationMode:I=m,name:x,disabled:L=!1,invalid:O,dirty:T,touched:S,actionsRef:M,...k}=e,{disabled:F}=(0,u.useFieldsetRootContext)(),A=(0,r.useStableCallback)(E||(()=>null)),P=F||L,[D,_]=t.useState(!1),[N,w]=t.useState(!1),[V,j]=t.useState(!1),[U,W]=t.useState(!1),B=T??N,G=S??D,K=t.useRef(!1),z=(0,r.useStableCallback)(e=>{void 0===T&&(e&&(K.current=!0),w(e))}),$=(0,r.useStableCallback)(e=>{void 0===S&&_(e)}),q=(0,r.useStableCallback)(()=>"onChange"===I||"onSubmit"===I&&h.current),H=!!x&&Object.hasOwn(g,x)&&void 0!==g[x],Y=!0===O||H,[J,X]=t.useState({state:i.DEFAULT_VALIDITY_STATE,error:"",errors:[],value:null,initialValue:null}),Q=!Y&&J.state.valid,Z=t.useMemo(()=>({disabled:P,touched:G,dirty:B,valid:Q,filled:V,focused:U}),[P,G,B,Q,V,U]),ee=function(e){let{formRef:n,clearErrors:u}=(0,l.useFormContext)(),{setValidityData:a,validate:o,validityData:b,validationDebounceTime:g,invalid:m,markedDirtyRef:h,state:y,name:C,shouldValidateOnChange:E}=e,{controlId:R,getDescriptionProps:I}=(0,d.useLabelableContext)(),x=(0,c.useTimeout)(),L=t.useRef(null),O=(0,r.useStableCallback)(async(e,t=!1)=>{let r,u=L.current;if(!u)return;if(t){if(!1!==y.valid)return;let t=u.validity;if(!t.valueMissing){let t={value:e,state:{...i.DEFAULT_VALIDITY_STATE,valid:!0},error:"",errors:[],initialValue:b.initialValue};if(u.setCustomValidity(""),R){let e=n.current.fields.get(R);e&&n.current.fields.set(R,{...e,...(0,v.getCombinedFieldValidityData)(t,!1)})}a(t);return}let r=p.reduce((e,r)=>(e[r]=t[r],e),{});if(!r.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let r of p)"valid"!==r&&("valueMissing"===r&&(t=e[r]),e[r]&&(t=!1));return t}(r))return}x.clear();let l=null,s=[],c=function(e){let t=p.reduce((t,r)=>(t[r]=e.validity[r],t),{}),r=!1;for(let e of p)if("valid"!==e){if("valueMissing"===e&&t[e])r=!0;else if(t[e])return t}return r&&!h.current&&(t.valid=!0,t.valueMissing=!1),t}(u),d=E();if(u.validationMessage&&!d)r=u.validationMessage,s=[u.validationMessage];else{let t=o(e,Array.from(n.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(l="object"==typeof t&&null!==t&&"then"in t?await t:t)?(c.valid=!1,c.customError=!0,Array.isArray(l)?(s=l,u.setCustomValidity(l.join("\n"))):l&&(s=[l],u.setCustomValidity(l))):d&&(u.setCustomValidity(""),c.customError=!1,u.validationMessage?(r=u.validationMessage,s=[u.validationMessage]):u.validity.valid&&!c.valid&&(c.valid=!0))}let f={value:e,state:c,error:r??(Array.isArray(l)?l[0]:l??""),errors:s,initialValue:b.initialValue};if(R){let e=n.current.fields.get(R);e&&n.current.fields.set(R,{...e,...(0,v.getCombinedFieldValidityData)(f,m)})}a(f)}),T=t.useCallback((e={})=>(0,f.mergeProps)(I,!1===y.valid?{"aria-invalid":!0}:s.EMPTY_OBJECT,e),[I,y.valid]),S=t.useCallback((e={})=>(0,f.mergeProps)({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(u(C),!E())return void O(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?O(t.value):(x.clear(),g?x.start(g,()=>{O(t.value)}):O(t.value))}},T(e)),[T,u,C,x,O,g,E]);return t.useMemo(()=>({getValidationProps:T,getInputValidationProps:S,inputRef:L,commit:O}),[T,S,O])}({setValidityData:X,validate:A,validityData:J,validationDebounceTime:R,invalid:Y,markedDirtyRef:K,state:Z,name:x,shouldValidateOnChange:q}),et=t.useCallback(()=>{K.current=!0,ee.commit(J.value)},[ee,J]);t.useImperativeHandle(M,()=>({validate:et}),[et]);let er=t.useMemo(()=>({invalid:Y,name:x,validityData:J,setValidityData:X,disabled:P,touched:G,setTouched:$,dirty:B,setDirty:z,filled:V,setFilled:j,focused:U,setFocused:W,validate:A,validationMode:I,validationDebounceTime:R,shouldValidateOnChange:q,state:Z,markedDirtyRef:K,validation:ee}),[Y,x,J,P,G,$,B,z,V,j,U,W,A,I,R,q,Z,ee]),en=(0,o.useRenderElement)("div",e,{ref:a,state:Z,props:k,stateAttributesMapping:i.fieldValidityMapping});return(0,b.jsx)(n.FieldRootContext.Provider,{value:er,children:en})}),m=t.forwardRef(function(e,t){return(0,b.jsx)(a.LabelableProvider,{children:(0,b.jsx)(g,{...e,ref:t})})});e.s(["FieldRoot",0,m],770652)},397791,e=>{"use strict";var t=e.i(92615),r=e.i(102094),n=e.i(887642),i=e.i(682354),u=e.i(804849),l=e.i(207516),a=e.i(179279);e.s(["useLabel",0,function(e={}){let o,{id:s,fallbackControlId:c,native:d=!1,setLabelId:f,focusControl:v}=e,{controlId:p,setLabelId:b}=(0,a.useLabelableContext)(),g=(0,n.useStableCallback)(e=>{b(e),f?.(e)}),m=(o=(0,l.useBaseUiId)(s),(0,u.useIsoLayoutEffect)(()=>(g(o),()=>{g(void 0)}),[o,g]),o),h=p??c;function y(e){let n=(0,i.getTarget)(e.nativeEvent);n?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),d||function(e){if(v)return v(e,h);if(!h)return;let n=(0,r.ownerDocument)(e.currentTarget).getElementById(h);(0,t.isHTMLElement)(n)&&n.focus({focusVisible:!0})}(e))}return d?{id:m,htmlFor:h??void 0,onMouseDown:y}:{id:m,onClick:y,onPointerDown(e){e.preventDefault()}}}],397791)},219040,935219,731836,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(890514),n=e.i(551974),i=e.i(581263),u=e.i(179279),l=e.i(397791);let a=t.forwardRef(function(e,a){let{render:o,className:s,id:c,nativeLabel:d=!0,...f}=e,v=(0,r.useFieldRootContext)(!1),{labelId:p}=(0,u.useLabelableContext)(),b=t.useRef(null),g=(0,l.useLabel)({id:p??c,native:d});return(0,i.useRenderElement)("label",e,{ref:[a,b],state:v.state,props:[g,f],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldLabel",0,a],219040);var o=e.i(804849),s=e.i(571870),c=e.i(207516),d=e.i(504068),f=e.i(809058),v=e.i(193214),p=e.i(289721);let b={...n.fieldValidityMapping,...f.transitionStatusMapping},g=t.forwardRef(function(e,n){let{render:l,id:a,className:f,match:g,...m}=e,h=(0,c.useBaseUiId)(a),{validityData:y,state:C,name:E}=(0,r.useFieldRootContext)(!1),{setMessageIds:R}=(0,u.useLabelableContext)(),{errors:I}=(0,s.useFormContext)(),x=E?I[E]:null,L=!1;L=!!x||!0===g||(g?!!y.state[g]:!1===y.state.valid);let{mounted:O,transitionStatus:T,setMounted:S}=(0,v.useTransitionStatus)(L);(0,o.useIsoLayoutEffect)(()=>{if(L&&h)return R(e=>e.concat(h)),()=>{R(e=>e.filter(e=>e!==h))}},[L,h,R]);let M=t.useRef(null),[k,F]=t.useState(null),[A,P]=t.useState(null),D=x||(y.errors.length>1?(0,p.jsx)("ul",{children:y.errors.map(e=>(0,p.jsx)("li",{children:e},e))}):y.error),_=y.error;null!=x?_=Array.isArray(x)?JSON.stringify(x):x:y.errors.length>1&&(_=JSON.stringify(y.errors)),L&&_!==A&&(P(_),F(D)),(0,d.useOpenChangeComplete)({open:L,ref:M,onComplete(){L||S(!1)}});let N={...C,transitionStatus:T},w=(0,i.useRenderElement)("div",e,{ref:[n,M],state:N,props:[{id:h,children:L?D:k},m],stateAttributesMapping:b,enabled:O});return O?w:null});e.s(["FieldError",0,g],935219);let m=t.forwardRef(function(e,t){let{render:l,id:a,className:s,...d}=e,f=(0,c.useBaseUiId)(a),v=(0,r.useFieldRootContext)(!1),{setMessageIds:p}=(0,u.useLabelableContext)();return(0,o.useIsoLayoutEffect)(()=>{if(f)return p(e=>e.concat(f)),()=>{p(e=>e.filter(e=>e!==f))}},[f,p]),(0,i.useRenderElement)("p",e,{ref:t,state:v.state,props:[{id:f},d],stateAttributesMapping:n.fieldValidityMapping})});e.s(["FieldDescription",0,m],731836)},103353,e=>{"use strict";var t=e.i(965652),r=e.i(804849),n=e.i(887642),i=e.i(903224),u=e.i(92615),l=e.i(954588),a=e.i(207516),o=e.i(179279);e.s(["useLabelableId",0,function(e={}){let{id:s,implicit:c=!1,controlRef:d}=e,{controlId:f,registerControlId:v}=(0,o.useLabelableContext)(),p=(0,a.useBaseUiId)(s),b=c?f:void 0,g=(0,i.useRefWithInit)(()=>Symbol("labelable-control")),m=t.useRef(!1),h=t.useRef(null!=s),y=(0,n.useStableCallback)(()=>{m.current&&v!==l.NOOP&&(m.current=!1,v(g.current,void 0))});return(0,r.useIsoLayoutEffect)(()=>{let e;if(v!==l.NOOP){if(c){let t=d?.current;e=(0,u.isElement)(t)&&null!=t.closest("label")?s??null:b??p}else if(null!=s)h.current=!0,e=s;else{if(!h.current)return void y();e=p}if(void 0===e)return void y();m.current=!0,v(g.current,e)}},[s,d,b,v,c,p,g,y]),t.useEffect(()=>y,[y]),f??p}])},421689,e=>{"use strict";var t=e.i(585012),r=e.i(804849),n=e.i(887642),i=e.i(956181),u=e.i(571870),l=e.i(890514);e.s(["useField",0,function(e){let{enabled:a=!0,value:o,id:s,name:c,controlRef:d,commit:f}=e,{formRef:v}=(0,u.useFormContext)(),{invalid:p,markedDirtyRef:b,validityData:g,setValidityData:m}=(0,l.useFieldRootContext)(),h=(0,n.useStableCallback)(e.getValue);(0,r.useIsoLayoutEffect)(()=>{if(!a)return;let e=o;void 0===e&&(e=h()),null===g.initialValue&&null!==e&&m(t=>({...t,initialValue:e}))},[a,m,o,g.initialValue,h]),(0,r.useIsoLayoutEffect)(()=>{a&&s&&v.current.fields.set(s,{getValue:h,name:c,controlRef:d,validityData:(0,i.getCombinedFieldValidityData)(g,p),validate(e=!0){let r=o;void 0===r&&(r=h()),b.current=!0,e?t.flushSync(()=>f(r)):f(r)}})},[f,d,a,v,h,s,p,b,c,g,o]),(0,r.useIsoLayoutEffect)(()=>{let e=v.current.fields;return()=>{s&&e.delete(s)}},[v,s])}])},793479,971667,756499,e=>{"use strict";var t=e.i(289721);e.i(708878);var r=e.i(965652);e.i(584191);var n=e.i(770652),i=e.i(219040),u=e.i(935219),l=e.i(731836),a=e.i(314757),o=e.i(804849),s=e.i(102094),c=e.i(890514),d=e.i(179279),f=e.i(103353),v=e.i(551974),p=e.i(581263),b=e.i(421689),g=e.i(67077),m=e.i(586622),h=e.i(682354);let y=r.forwardRef(function(e,t){let{render:n,className:i,id:u,name:l,value:y,disabled:C=!1,onValueChange:E,defaultValue:R,autoFocus:I=!1,...x}=e,{state:L,name:O,disabled:T,setTouched:S,setDirty:M,validityData:k,setFocused:F,setFilled:A,validationMode:P,validation:D}=(0,c.useFieldRootContext)(),_=T||C,N=O??l,w={...L,disabled:_},{labelId:V}=(0,d.useLabelableContext)(),j=(0,f.useLabelableId)({id:u});(0,o.useIsoLayoutEffect)(()=>{let e=null!=y;D.inputRef.current?.value||e&&""!==y?A(!0):e&&""===y&&A(!1)},[D.inputRef,A,y]);let U=r.useRef(null);(0,o.useIsoLayoutEffect)(()=>{I&&U.current===(0,h.activeElement)((0,s.ownerDocument)(U.current))&&F(!0)},[I,F]);let[W]=(0,a.useControlled)({controlled:y,default:R,name:"FieldControl",state:"value"}),B=void 0!==y,G=B?W:void 0;return(0,b.useField)({id:j,name:N,commit:D.commit,value:G,getValue:()=>D.inputRef.current?.value,controlRef:D.inputRef}),(0,p.useRenderElement)("input",e,{ref:[t,U],state:w,props:[{id:j,disabled:_,name:N,ref:D.inputRef,"aria-labelledby":V,autoFocus:I,...B?{value:G}:{defaultValue:R},onChange(e){let t=e.currentTarget.value;E?.(t,(0,g.createChangeEventDetails)(m.REASONS.none,e.nativeEvent)),M(t!==k.initialValue),A(""!==t)},onFocus(){F(!0)},onBlur(e){S(!0),F(!1),"onBlur"===P&&D.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(S(!0),D.commit(e.currentTarget.value))}},D.getInputValidationProps(),x],stateAttributesMapping:v.fieldValidityMapping})});var C=e.i(956181),E=e.i(193214);let R=r.createContext({disabled:!1});e.s(["FieldItemContext",0,R,"useFieldItemContext",0,function(){return r.useContext(R)}],971667);var I=e.i(137122),x=e.i(462902);let L=r.createContext(void 0);function O(e=!0){let t=r.useContext(L);if(void 0===t&&!e)throw Error((0,x.default)(3));return t}e.s(["useCheckboxGroupContext",0,O],756499);let T=r.forwardRef(function(e,n){let{render:i,className:u,disabled:l=!1,...a}=e,{state:o,disabled:s}=(0,c.useFieldRootContext)(!1),d=s||l,f=O(),b=f?.parent.id,g=f?.allValues!==void 0,m=r.useMemo(()=>({disabled:d}),[d]),h=(0,p.useRenderElement)("div",e,{ref:n,state:o,props:a,stateAttributesMapping:v.fieldValidityMapping});return(0,t.jsx)(I.LabelableProvider,{controlId:g?b:void 0,children:(0,t.jsx)(R.Provider,{value:m,children:h})})});e.s(["Control",0,y,"Description",()=>l.FieldDescription,"Error",()=>u.FieldError,"Item",0,T,"Label",()=>i.FieldLabel,"Root",()=>n.FieldRoot,"Validity",0,function(e){let{children:n}=e,{validityData:i,invalid:u}=(0,c.useFieldRootContext)(!1),l=r.useMemo(()=>(0,C.getCombinedFieldValidityData)(i,u),[i,u]),a=!1===l.state.valid,{transitionStatus:o}=(0,E.useTransitionStatus)(a),s=r.useMemo(()=>({...l,validity:l.state,transitionStatus:o}),[l,o]);return(0,t.jsx)(r.Fragment,{children:n(s)})}],52388);var S=e.i(52388),S=S;let M=r.forwardRef(function(e,r){return(0,t.jsx)(S.Control,{ref:r,...e})});var k=e.i(975157);e.s(["Input",0,function({className:e,type:r,...n}){return(0,t.jsx)(M,{type:r,"data-slot":"input",className:(0,k.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}],793479)},792566,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},776405,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},533133,e=>{"use strict";var t=e.i(152279);e.s(["CheckIcon",()=>t.default])},226145,e=>{"use strict";let t=(0,e.i(572989).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],226145)},611893,e=>{"use strict";var t=e.i(965652);let r=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,r,"useCompositeListContext",0,function(){return t.useContext(r)}])},655728,e=>{"use strict";var t,r=e.i(965652),n=e.i(804849),i=e.i(611893);let u=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);e.s(["IndexGuessBehavior",0,u,"useCompositeListItem",0,function(e={}){let{label:t,metadata:l,textRef:a,indexGuessBehavior:o,index:s}=e,{register:c,unregister:d,subscribeMapChange:f,elementsRef:v,labelsRef:p,nextIndexRef:b}=(0,i.useCompositeListContext)(),g=r.useRef(-1),[m,h]=r.useState(s??(o===u.GuessFromOrder?()=>{if(-1===g.current){let e=b.current;b.current+=1,g.current=e}return g.current}:-1)),y=r.useRef(null),C=r.useCallback(e=>{if(y.current=e,-1!==m&&null!==e&&(v.current[m]=e,p)){let r=void 0!==t;p.current[m]=r?t:a?.current?.textContent??e.textContent}},[m,v,p,t,a]);return(0,n.useIsoLayoutEffect)(()=>{if(null!=s)return;let e=y.current;if(e)return c(e,l),()=>{d(e)}},[s,c,d,l]),(0,n.useIsoLayoutEffect)(()=>{if(null==s)return f(e=>{let t=y.current?e.get(y.current)?.index:null;null!=t&&h(t)})},[s,f,h]),r.useMemo(()=>({ref:C,index:m}),[m,C])}])},579028,e=>{"use strict";var t=e.i(965652),r=e.i(903224),n=e.i(887642),i=e.i(804849),u=e.i(611893),l=e.i(289721);function a(){return new Map}function o(){return new Set}function s(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}e.s(["CompositeList",0,function(e){let{children:c,elementsRef:d,labelsRef:f,onMapChange:v}=e,p=(0,n.useStableCallback)(v),b=t.useRef(0),g=(0,r.useRefWithInit)(o).current,m=(0,r.useRefWithInit)(a).current,[h,y]=t.useState(0),C=t.useRef(h),E=(0,n.useStableCallback)((e,t)=>{m.set(e,t??null),C.current+=1,y(C.current)}),R=(0,n.useStableCallback)(e=>{m.delete(e),C.current+=1,y(C.current)}),I=t.useMemo(()=>{let e=new Map;return Array.from(m.keys()).filter(e=>e.isConnected).sort(s).forEach((t,r)=>{let n=m.get(t)??{};e.set(t,{...n,index:r})}),e},[m,h]);(0,i.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===I.size)return;let e=new MutationObserver(e=>{let t=new Set,r=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(r),e.addedNodes.forEach(r)}),0===t.size&&(C.current+=1,y(C.current))});return I.forEach((t,r)=>{r.parentElement&&e.observe(r.parentElement,{childList:!0})}),()=>{e.disconnect()}},[I]),(0,i.useIsoLayoutEffect)(()=>{C.current===h&&(d.current.length!==I.size&&(d.current.length=I.size),f&&f.current.length!==I.size&&(f.current.length=I.size),b.current=I.size),p(I)},[p,I,d,f,h]),(0,i.useIsoLayoutEffect)(()=>()=>{d.current=[]},[d]),(0,i.useIsoLayoutEffect)(()=>()=>{f&&(f.current=[])},[f]);let x=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)}));(0,i.useIsoLayoutEffect)(()=>{g.forEach(e=>e(I))},[g,I]);let L=t.useMemo(()=>({register:E,unregister:R,subscribeMapChange:x,elementsRef:d,labelsRef:f,nextIndexRef:b}),[E,R,x,d,f,b]);return(0,l.jsx)(u.CompositeListContext.Provider,{value:L,children:c})}])},234951,471959,748299,e=>{"use strict";e.i(708878);var t=e.i(965652),r=e.i(92615),n=e.i(20746),i=e.i(887642),u=e.i(804849),l=e.i(102094),a=e.i(682354),o=e.i(447594),s=e.i(358527),c=e.i(205995),d=e.i(67077),f=e.i(586622),v=e.i(777321),p=e.i(331033);function b(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function g(e,t){return b(t,e===p.ARROW_UP||e===p.ARROW_DOWN,e===p.ARROW_LEFT||e===p.ARROW_RIGHT)}function m(e,t,r){return b(t,e===p.ARROW_DOWN,r?e===p.ARROW_LEFT:e===p.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,h){let y="rootStore"in e?e.rootStore:e,C=y.useState("open"),E=y.useState("floatingElement"),R=y.useState("domReferenceElement"),I=y.context.dataRef,{listRef:x,activeIndex:L,onNavigate:O=()=>{},enabled:T=!0,selectedIndex:S=null,allowEscape:M=!1,loopFocus:k=!1,nested:F=!1,rtl:A=!1,virtual:P=!1,focusItemOnOpen:D="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:N=!0,disabledIndices:w,orientation:V="vertical",parentOrientation:j,cols:U=1,id:W,resetOnPointerLeave:B=!0,externalTree:G}=h,K=(0,a.getFloatingFocusElement)(E),z=(0,n.useValueAsRef)(K),$=(0,c.useFloatingParentNodeId)(),q=(0,c.useFloatingTree)(G);(0,u.useIsoLayoutEffect)(()=>{I.current.orientation=V},[I,V]);let H=(0,a.isTypeableCombobox)(R),Y=t.useRef(D),J=t.useRef(S??-1),X=t.useRef(null),Q=t.useRef(!0),Z=(0,i.useStableCallback)(e=>{O(-1===J.current?null:J.current,e)}),ee=t.useRef(Z),et=t.useRef(!!E),er=t.useRef(C),en=t.useRef(!1),ei=t.useRef(!1),eu=(0,n.useValueAsRef)(w),el=(0,n.useValueAsRef)(C),ea=(0,n.useValueAsRef)(S),eo=(0,n.useValueAsRef)(B),es=(0,i.useStableCallback)(()=>{function e(e){P?q?.events.emit("virtualfocus",e):(0,v.enqueueFocus)(e,{sync:en.current,preventScroll:!0})}let t=x.current[J.current],r=ei.current;t&&e(t),(en.current?e=>e():requestAnimationFrame)(()=>{let n=x.current[J.current]||t;!n||(t||e(n),ed&&(r||!Q.current)&&n.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,u.useIsoLayoutEffect)(()=>{T&&(C&&E?(J.current=S??-1,Y.current&&null!=S&&(ei.current=!0,Z())):et.current&&(J.current=-1,ee.current()))},[T,C,E,S,Z]),(0,u.useIsoLayoutEffect)(()=>{if(T){if(!C){en.current=!1;return}if(E)if(null==L){if(en.current=!1,null!=ea.current)return;if(et.current&&(J.current=-1,es()),(!er.current||!et.current)&&Y.current&&(null!=X.current||!0===Y.current&&null==X.current)){let e=0,t=()=>{null==x.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(J.current=null==X.current||m(X.current,V,A)||F?(0,s.getMinListIndex)(x):(0,s.getMaxListIndex)(x),X.current=null,Z())};t()}}else(0,s.isIndexOutOfListBounds)(x,L)||(J.current=L,es(),ei.current=!1)}},[T,C,E,L,ea,F,x,V,A,Z,es,eu]),(0,u.useIsoLayoutEffect)(()=>{if(!T||E||!q||P||!et.current)return;let e=q.nodesRef.current,t=e.find(e=>e.id===$)?.context?.elements.floating,r=(0,a.activeElement)((0,l.ownerDocument)(E)),n=e.some(e=>e.context&&(0,a.contains)(e.context.elements.floating,r));t&&!n&&Q.current&&t.focus({preventScroll:!0})},[T,E,q,$,P]),(0,u.useIsoLayoutEffect)(()=>{ee.current=Z,er.current=C,et.current=!!E}),(0,u.useIsoLayoutEffect)(()=>{C||(X.current=null,Y.current=D)},[C,D]);let ec=null!=L,ed=t.useMemo(()=>{function e(e){if(!el.current)return;let t=x.current.indexOf(e.currentTarget);-1!==t&&J.current!==t&&(J.current=t,Z(e))}return{onFocus(t){en.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){en.current=!0,ei.current=!1,_&&e(t)},onPointerLeave(e){if(!el.current||!Q.current||"touch"===e.pointerType)return;en.current=!0;let t=e.relatedTarget;if(!(!_||x.current.includes(t))&&eo.current&&((0,v.enqueueFocus)(null,{sync:!0}),J.current=-1,Z(e),!P)){let e=z.current,t=(0,a.activeElement)((0,l.ownerDocument)(e));e&&(0,a.contains)(e,t)&&e.focus({preventScroll:!0})}}}},[el,z,_,x,Z,eo,P]),ef=t.useCallback(()=>j??q?.nodesRef.current.find(e=>e.id===$)?.context?.dataRef?.current.orientation,[$,q,j]),ev=(0,i.useStableCallback)(e=>{var t;let n,i;if(Q.current=!1,en.current=!0,229===e.which||!el.current&&e.currentTarget===z.current)return;if(F&&(t=e.key,n=A?t===p.ARROW_RIGHT:t===p.ARROW_LEFT,i=t===p.ARROW_UP,"both"===V||"horizontal"===V&&U&&U>1?"Escape"===t:b(V,n,i))){g(e.key,ef())||(0,o.stopEvent)(e),y.setOpen(!1,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent)),(0,r.isHTMLElement)(R)&&(P?q?.events.emit("virtualfocus",R):R.focus());return}let u=J.current,l=(0,s.getMinListIndex)(x,w),c=(0,s.getMaxListIndex)(x,w);if(H||("Home"===e.key&&((0,o.stopEvent)(e),J.current=l,Z(e)),"End"===e.key&&((0,o.stopEvent)(e),J.current=c,Z(e))),U>1){let t=Array.from({length:x.current.length},()=>({width:1,height:1})),r=(0,s.createGridCellMap)(t,U,!1),n=r.findIndex(e=>null!=e&&!(0,s.isListIndexDisabled)(x,e,w)),i=r.reduce((e,t,r)=>null==t||(0,s.isListIndexDisabled)(x,t,w)?e:r,-1),u=r[(0,s.getGridNavigatedIndex)({current:r.map(e=>null!=e?x.current[e]:null)},{event:e,orientation:V,loopFocus:k,rtl:A,cols:U,disabledIndices:(0,s.getGridCellIndices)([...("function"!=typeof w?w:null)||x.current.map((e,t)=>(0,s.isListIndexDisabled)(x,t,w)?t:void 0),void 0],r),minIndex:n,maxIndex:i,prevIndex:(0,s.getGridCellIndexOfCorner)(J.current>c?l:J.current,t,r,U,e.key===p.ARROW_DOWN?"bl":e.key===(A?p.ARROW_LEFT:p.ARROW_RIGHT)?"tr":"tl"),stopEvent:!0})];if(null!=u&&(J.current=u,Z(e)),"both"===V)return}if(g(e.key,V)){if((0,o.stopEvent)(e),C&&!P&&(0,a.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){J.current=m(e.key,V,A)?l:c,Z(e);return}m(e.key,V,A)?k?u>=c?M&&u!==x.current.length?J.current=-1:(en.current=!1,J.current=l):J.current=(0,s.findNonDisabledListIndex)(x,{startingIndex:u,disabledIndices:w}):J.current=Math.min(c,(0,s.findNonDisabledListIndex)(x,{startingIndex:u,disabledIndices:w})):k?u<=l?M&&-1!==u?J.current=x.current.length:(en.current=!1,J.current=c):J.current=(0,s.findNonDisabledListIndex)(x,{startingIndex:u,decrement:!0,disabledIndices:w}):J.current=Math.max(l,(0,s.findNonDisabledListIndex)(x,{startingIndex:u,decrement:!0,disabledIndices:w})),(0,s.isIndexOutOfListBounds)(x,J.current)&&(J.current=-1),Z(e)}}),ep=t.useMemo(()=>P&&C&&ec&&{"aria-activedescendant":`${W}-${L}`},[P,C,ec,W,L]),eb=t.useMemo(()=>({"aria-orientation":"both"===V?void 0:V,...!H?ep:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&C&&!P){let t=(0,a.getTarget)(e.nativeEvent);if(t&&!(0,a.contains)(z.current,t))return;(0,o.stopEvent)(e),y.setOpen(!1,(0,d.createChangeEventDetails)(f.REASONS.focusOut,e.nativeEvent)),(0,r.isHTMLElement)(R)&&R.focus();return}ev(e)},onPointerMove(){Q.current=!0}}),[ep,ev,z,V,H,y,C,P,R]),eg=t.useMemo(()=>{function e(e){"auto"===D&&(0,o.isVirtualClick)(e.nativeEvent)&&(Y.current=!P)}function t(e){Y.current=D,"auto"===D&&(0,o.isVirtualPointerEvent)(e.nativeEvent)&&(Y.current=!0)}return{onKeyDown(e){var t,r;let n=y.select("open");Q.current=!1;let i=e.key.startsWith("Arrow"),u=(t=e.key,r=ef(),b(r,A?t===p.ARROW_LEFT:t===p.ARROW_RIGHT,t===p.ARROW_DOWN)),l=g(e.key,V),a=(F?u:l)||"Enter"===e.key||""===e.key.trim();if(P&&n)return ev(e);if(n||N||!i){if(a){let t=g(e.key,ef());X.current=F&&t?null:e.key}if(F){u&&((0,o.stopEvent)(e),n?(J.current=(0,s.getMinListIndex)(x,eu.current),Z(e)):y.setOpen(!0,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent,e.currentTarget)));return}l&&(null!=ea.current&&(J.current=ea.current),(0,o.stopEvent)(e),!n&&N?y.setOpen(!0,(0,d.createChangeEventDetails)(f.REASONS.listNavigation,e.nativeEvent,e.currentTarget)):ev(e),n&&Z(e))}},onFocus(e){y.select("open")&&!P&&(J.current=-1,Z(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ev,eu,D,x,F,Z,y,N,V,ef,A,ea,P]),em=t.useMemo(()=>({...ep,...eg}),[ep,eg]);return t.useMemo(()=>T?{reference:em,floating:eb,item:ed,trigger:eg}:{},[T,em,eb,eg,ed])}],234951);var h=e.i(161476);e.s(["useTypeahead",0,function(e,r){let n="rootStore"in e?e.rootStore:e,l=n.context.dataRef,c=n.useState("open"),{listRef:d,elementsRef:f,activeIndex:v,onMatch:p,onTypingChange:b,enabled:g=!0,resetMs:m=750,selectedIndex:y=null}=r,C=(0,h.useTimeout)(),E=t.useRef(""),R=t.useRef(y??v??-1),I=t.useRef(null);(0,u.useIsoLayoutEffect)(()=>{(c||null===y)&&(C.clear(),I.current=null,""!==E.current&&(E.current=""))},[c,y,C]),(0,u.useIsoLayoutEffect)(()=>{c&&""===E.current&&(R.current=y??v??-1)},[c,y,v]);let x=(0,i.useStableCallback)(e=>{e?l.current.typing||(l.current.typing=e,b?.(e)):l.current.typing&&(l.current.typing=e,b?.(e))}),L=(0,i.useStableCallback)(e=>{function t(e,r,n=0){if(0===e.length)return -1;let i=(n%e.length+e.length)%e.length,u=r.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let r=(i+t)%e.length,n=e[r];if(n?.toLocaleLowerCase().startsWith(u)&&function(e){let t=f?.current[e];return!t||(0,s.isElementVisible)(t)}(r))return r}return -1}let r=d.current;if(E.current.length>0&&" "===e.key&&((0,o.stopEvent)(e),x(!0)),E.current.length>0&&" "!==E.current[0]&&-1===t(r,E.current)&&" "!==e.key&&x(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;c&&" "!==e.key&&((0,o.stopEvent)(e),x(!0));let n=""===E.current;n&&(R.current=y??v??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&E.current===e.key&&(E.current="",R.current=I.current),E.current+=e.key,C.start(m,()=>{E.current="",R.current=I.current,x(!1)});let i=n?y??v??-1:R.current,u=t(r,E.current,(i??0)+1);-1!==u?(p?.(u),I.current=u):" "!==e.key&&(E.current="",x(!1))}),O=(0,i.useStableCallback)(e=>{let t=e.relatedTarget,r=n.select("domReferenceElement"),i=n.select("floatingElement"),u=(0,a.contains)(r,t),l=(0,a.contains)(i,t);u||l||(C.clear(),E.current="",R.current=I.current,x(!1))}),T=t.useMemo(()=>({onKeyDown:L,onBlur:O}),[L,O]),S=t.useMemo(()=>({onKeyDown:L,onBlur:O}),[L,O]);return t.useMemo(()=>g?{reference:T,floating:S}:{},[g,T,S])}],471959),e.s(["getPseudoElementBounds",0,function(e){let t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),n=window.getComputedStyle(e,"::after");if("none"===r.content&&"none"===n.content)return t;let i=parseFloat(r.width)||0,u=parseFloat(r.height)||0,l=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=Math.max(t.width,i,l),s=Math.max(t.height,u,a),c=o-t.width,d=s-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}],748299)},983640,e=>{"use strict";var t=e.i(965652),r=e.i(581263);let n=t.forwardRef(function(e,t){let{className:n,render:i,orientation:u="horizontal",...l}=e;return(0,r.useRenderElement)("div",e,{state:{orientation:u},ref:t,props:[{role:"separator","aria-orientation":u},l]})});e.s(["Separator",0,n])},314338,e=>{"use strict";let t=(0,e.i(572989).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},501244,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return s},urlObjectKeys:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let u=e.r(744066)._(e.r(565893)),l=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",a=e.hash||"",o=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(s+=":"+e.port)),o&&"object"==typeof o&&(o=String(u.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),i=i.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${s}${i}${c}${a}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function s(e){return a(e)}},668649,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(965652);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=u(e,n)),t&&(i.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},927683,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(204575),i=e.r(394864);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},573088,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},210702,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return y}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let u=e.r(744066),l=e.r(289721),a=u._(e.r(965652)),o=e.r(501244),s=e.r(74122),c=e.r(668649),d=e.r(204575),f=e.r(44204);e.r(619172);let v=e.r(840535),p=e.r(255397),b=e.r(927683),g=e.r(530620);function m(t){var r,n;let i,u,m,[y,C]=(0,a.useOptimistic)(p.IDLE_LINK_STATUS),E=(0,a.useRef)(null),{href:R,as:I,children:x,prefetch:L=null,passHref:O,replace:T,shallow:S,scroll:M,onClick:k,onMouseEnter:F,onTouchStart:A,legacyBehavior:P=!1,onNavigate:D,transitionTypes:_,ref:N,unstable_dynamicOnHover:w,...V}=t;i=x,P&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let j=a.default.useContext(s.AppRouterContext),U=!1!==L,W=!1!==L?null===(n=L)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=I||R)?r:(0,o.formatUrl)(r);if(P){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});u=a.default.Children.only(i)}let G=P?u&&"object"==typeof u&&u.ref:N,K=a.default.useCallback(e=>(null!==j&&(E.current=(0,p.mountLinkInstance)(e,B,j,W,U,C)),()=>{E.current&&((0,p.unmountLinkForCurrentNavigation)(E.current),E.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,B,j,W,C]),z={ref:(0,c.useMergedRef)(K,G),onClick(t){P||"function"!=typeof k||k(t),P&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(t),!j||t.defaultPrevented||function(t,r,n,i,u,l,o){if("u">typeof window){let s,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((s=t.currentTarget.getAttribute("target"))&&"_self"!==s||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,b.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(238105);a.default.startTransition(()=>{d(r,i?"replace":"push",!1===u?v.ScrollBehavior.NoScroll:v.ScrollBehavior.Default,n.current,o)})}}(t,B,E,T,M,D,_)},onMouseEnter(e){P||"function"!=typeof F||F(e),P&&u.props&&"function"==typeof u.props.onMouseEnter&&u.props.onMouseEnter(e),j&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===w)},onTouchStart:function(e){P||"function"!=typeof A||A(e),P&&u.props&&"function"==typeof u.props.onTouchStart&&u.props.onTouchStart(e),j&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===w)}};return(0,d.isAbsoluteUrl)(B)?z.href=B:P&&!O&&("a"!==u.type||"href"in u.props)||(z.href=(0,f.addBasePath)(B)),m=P?a.default.cloneElement(u,z):(0,l.jsx)("a",{...V,...z,children:i}),(0,l.jsx)(h.Provider,{value:y,children:m})}e.r(573088);let h=(0,a.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,a.useContext)(h);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tower-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tower": "bin/tower.mjs"
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
"tsconfig.json"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"predev": "node scripts/ensure-dev-db.js && pnpm mcp:build",
|
|
32
|
+
"predev": "node scripts/ensure-dev-db.js && pnpm db:migrate && pnpm mcp:build",
|
|
33
33
|
"dev": "next dev --webpack -p 9022",
|
|
34
34
|
"build": "pnpm mcp:build && rm -rf .next && next build && find .next -name '*.map' -delete && cp -R .next/static .next/standalone/.next/ && cp -R public .next/standalone/ && node scripts/prune-standalone-natives.js",
|
|
35
35
|
"release": "pnpm build && npm pack",
|
|
36
36
|
"release:smoke": "node scripts/release-smoke.js",
|
|
37
37
|
"release:publish": "pnpm build && npm publish",
|
|
38
|
+
"release:ship": "bash scripts/release.sh",
|
|
38
39
|
"start": "node bin/tower.mjs",
|
|
39
40
|
"lint": "eslint",
|
|
40
41
|
"db:generate": "prisma generate",
|
package/dist/mcp-server.cjs
CHANGED
|
@@ -55007,19 +55007,22 @@ var terminalTools = {
|
|
|
55007
55007
|
}
|
|
55008
55008
|
},
|
|
55009
55009
|
send_task_terminal_input: {
|
|
55010
|
-
description: "Send text input to a running task's PTY terminal.
|
|
55010
|
+
description: "Send text input to a running task's PTY terminal (e.g. the Claude CLI). By default the message is submitted: trailing newlines are trimmed and a real carriage return is appended so the TUI input box actually sends it. Pass submit:false to only fill the input box without submitting (the text is forwarded verbatim).",
|
|
55011
55011
|
schema: external_exports.object({
|
|
55012
55012
|
taskId: external_exports.string(),
|
|
55013
|
-
text: external_exports.string().min(1).max(1e4)
|
|
55013
|
+
text: external_exports.string().min(1).max(1e4),
|
|
55014
|
+
submit: external_exports.boolean().optional()
|
|
55014
55015
|
}),
|
|
55015
55016
|
handler: async (args) => {
|
|
55016
55017
|
const err = validateMcpTaskId(args.taskId);
|
|
55017
55018
|
if (err) return { error: err, taskId: args.taskId };
|
|
55018
55019
|
const tid = encodeURIComponent(args.taskId);
|
|
55020
|
+
const submit = args.submit ?? true;
|
|
55021
|
+
const payload = submit ? args.text.replace(/\n+$/, "") + "\r" : args.text;
|
|
55019
55022
|
const response = await bridgeFetch(`/${tid}/input`, {
|
|
55020
55023
|
method: "POST",
|
|
55021
55024
|
headers: { "Content-Type": "application/json" },
|
|
55022
|
-
body: JSON.stringify({ text:
|
|
55025
|
+
body: JSON.stringify({ text: payload })
|
|
55023
55026
|
});
|
|
55024
55027
|
if (response.status === 404) {
|
|
55025
55028
|
return { error: "No active terminal session for this task", taskId: args.taskId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tower-studio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.39",
|
|
4
4
|
"description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tower": "bin/tower.mjs"
|
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
"tsconfig.json"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"predev": "node scripts/ensure-dev-db.js && pnpm mcp:build",
|
|
32
|
+
"predev": "node scripts/ensure-dev-db.js && pnpm db:migrate && pnpm mcp:build",
|
|
33
33
|
"dev": "next dev --webpack -p 9022",
|
|
34
34
|
"build": "pnpm mcp:build && rm -rf .next && next build && find .next -name '*.map' -delete && cp -R .next/static .next/standalone/.next/ && cp -R public .next/standalone/ && node scripts/prune-standalone-natives.js",
|
|
35
35
|
"release": "pnpm build && npm pack",
|
|
36
36
|
"release:smoke": "node scripts/release-smoke.js",
|
|
37
37
|
"release:publish": "pnpm build && npm publish",
|
|
38
|
+
"release:ship": "bash scripts/release.sh",
|
|
38
39
|
"start": "node bin/tower.mjs",
|
|
39
40
|
"lint": "eslint",
|
|
40
41
|
"db:generate": "prisma generate",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backfill SystemConfig keys from a legacy project-local prisma/dev.db into the
|
|
3
|
+
* current database.
|
|
4
|
+
*
|
|
5
|
+
* Why: Tower used to keep all data in `<project>/prisma/dev.db`. When the data
|
|
6
|
+
* directory moved to ~/.tower (prod) / ~/.tower-dev (dev), the SystemConfig
|
|
7
|
+
* table — which holds user settings like git.pathMappingRules, CLI profiles and
|
|
8
|
+
* onboarding flags — was NOT carried over. The new DB simply started without
|
|
9
|
+
* those keys. Symptom: Settings → "Git 路径映射规则" silently empty even though
|
|
10
|
+
* the user had configured them; project creation kept working only because
|
|
11
|
+
* resolveGitLocalPath falls back to a hardcoded convention, masking the loss.
|
|
12
|
+
*
|
|
13
|
+
* What: copy every SystemConfig key from the legacy DB that is MISSING in the
|
|
14
|
+
* current DB. Additive only — never overwrites a key that already exists here.
|
|
15
|
+
* Generic over all keys (not just git rules) since the same gap affects every
|
|
16
|
+
* setting persisted in SystemConfig.
|
|
17
|
+
*
|
|
18
|
+
* Safety:
|
|
19
|
+
* - No-op when no legacy DB exists (fresh installs, and the published npm
|
|
20
|
+
* package — src/ and prisma/dev.db are absent there).
|
|
21
|
+
* - No-op when the legacy DB IS the current DB (some dev setups point
|
|
22
|
+
* DATABASE_URL at prisma/dev.db).
|
|
23
|
+
* - Only touches SystemConfig → FTS-safe (no notes_fts triggers involved).
|
|
24
|
+
* - Legacy DB read errors are caught and treated as "nothing to migrate", so a
|
|
25
|
+
* corrupt/locked legacy file never blocks startup or later migrations.
|
|
26
|
+
* - Idempotent: recorded in AppliedMigration after first success; the additive
|
|
27
|
+
* check also makes a re-run a no-op even if the ledger were lost.
|
|
28
|
+
*
|
|
29
|
+
* Paths and table/column references are hardcoded on purpose — a migration is a
|
|
30
|
+
* point-in-time snapshot and must keep doing exactly what it did the day it
|
|
31
|
+
* shipped (src/ is also absent from the published package).
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
import { PrismaClient } from "@prisma/client";
|
|
35
|
+
import { existsSync, realpathSync } from "fs";
|
|
36
|
+
import { join, dirname, resolve } from "path";
|
|
37
|
+
import { fileURLToPath } from "url";
|
|
38
|
+
|
|
39
|
+
const PROJECT_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
40
|
+
// Default to the conventional project-local DB; allow an explicit override for
|
|
41
|
+
// non-standard layouts (and to exercise this migration in tests).
|
|
42
|
+
const LEGACY_DB_PATH = process.env.TOWER_LEGACY_DB
|
|
43
|
+
? resolve(process.env.TOWER_LEGACY_DB)
|
|
44
|
+
: join(PROJECT_ROOT, "prisma", "dev.db");
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Pure merge step: legacy rows whose key is absent from the current DB.
|
|
48
|
+
* Exported for unit testing. Additive only — keys already present are kept.
|
|
49
|
+
*/
|
|
50
|
+
export function selectMissingConfig<T extends { key: string }>(
|
|
51
|
+
legacyRows: T[],
|
|
52
|
+
currentKeys: Set<string>
|
|
53
|
+
): T[] {
|
|
54
|
+
return legacyRows.filter((row) => !currentKeys.has(row.key));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Absolute path of the DB the runner is migrating (current DATABASE_URL). */
|
|
58
|
+
function currentDbFile(): string | null {
|
|
59
|
+
const match = (process.env.DATABASE_URL ?? "").match(/^file:(.+)$/);
|
|
60
|
+
return match ? resolve(PROJECT_ROOT, match[1]) : null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function isSamePath(a: string, b: string): boolean {
|
|
64
|
+
try {
|
|
65
|
+
return realpathSync(a) === realpathSync(b);
|
|
66
|
+
} catch {
|
|
67
|
+
return resolve(a) === resolve(b);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export async function up(prisma: PrismaClient): Promise<void> {
|
|
72
|
+
if (!existsSync(LEGACY_DB_PATH)) return;
|
|
73
|
+
|
|
74
|
+
const current = currentDbFile();
|
|
75
|
+
if (current && isSamePath(current, LEGACY_DB_PATH)) return;
|
|
76
|
+
|
|
77
|
+
const legacy = new PrismaClient({
|
|
78
|
+
datasources: { db: { url: `file:${LEGACY_DB_PATH}` } },
|
|
79
|
+
});
|
|
80
|
+
let legacyRows: { key: string; value: string }[];
|
|
81
|
+
try {
|
|
82
|
+
legacyRows = await legacy.systemConfig.findMany({
|
|
83
|
+
select: { key: true, value: true },
|
|
84
|
+
});
|
|
85
|
+
} catch (err) {
|
|
86
|
+
// Unreadable / old-schema / locked legacy DB → treat as nothing to migrate.
|
|
87
|
+
// Non-fatal: do not block startup or later migrations.
|
|
88
|
+
console.warn(
|
|
89
|
+
` legacy DB unreadable, skipping SystemConfig backfill: ${
|
|
90
|
+
err instanceof Error ? err.message : String(err)
|
|
91
|
+
}`
|
|
92
|
+
);
|
|
93
|
+
return;
|
|
94
|
+
} finally {
|
|
95
|
+
await legacy.$disconnect();
|
|
96
|
+
}
|
|
97
|
+
if (legacyRows.length === 0) return;
|
|
98
|
+
|
|
99
|
+
const currentKeys = new Set(
|
|
100
|
+
(await prisma.systemConfig.findMany({ select: { key: true } })).map((r) => r.key)
|
|
101
|
+
);
|
|
102
|
+
const missing = selectMissingConfig(legacyRows, currentKeys);
|
|
103
|
+
if (missing.length === 0) return;
|
|
104
|
+
|
|
105
|
+
for (const row of missing) {
|
|
106
|
+
await prisma.systemConfig.create({ data: { key: row.key, value: row.value } });
|
|
107
|
+
}
|
|
108
|
+
console.log(
|
|
109
|
+
` backfilled ${missing.length} systemConfig key(s) from legacy prisma/dev.db: ${missing
|
|
110
|
+
.map((m) => m.key)
|
|
111
|
+
.join(", ")}`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -37,6 +37,18 @@ async function main() {
|
|
|
37
37
|
|
|
38
38
|
const prisma = new PrismaClient();
|
|
39
39
|
try {
|
|
40
|
+
// Ensure the ledger table exists before reading it. In prod bin/tower.mjs
|
|
41
|
+
// syncs the schema first, but dev never ran a schema sync that included this
|
|
42
|
+
// table — and DBs created before AppliedMigration was added simply lack it.
|
|
43
|
+
// Create it additively via raw SQL (idempotent, FTS-safe — never touches the
|
|
44
|
+
// notes_fts virtual tables that make `prisma db push` hang). No-op when the
|
|
45
|
+
// table already exists, so prod behaviour is unchanged.
|
|
46
|
+
await prisma.$executeRawUnsafe(
|
|
47
|
+
`CREATE TABLE IF NOT EXISTS "AppliedMigration" (` +
|
|
48
|
+
`"id" TEXT NOT NULL PRIMARY KEY, ` +
|
|
49
|
+
`"appliedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP)`
|
|
50
|
+
);
|
|
51
|
+
|
|
40
52
|
const appliedRows = await prisma.appliedMigration.findMany({ select: { id: true } });
|
|
41
53
|
const applied = new Set(appliedRows.map((r) => r.id));
|
|
42
54
|
|
package/skills/tower/SKILL.md
CHANGED
|
@@ -78,8 +78,9 @@ it means your previous turn produced no tool call — issue the tool call now.
|
|
|
78
78
|
- **Pasted images with known paths**: if the platform provides file paths for pasted media (e.g. OpenClaw's `{{MediaPaths}}`, Claude Code temp files), pass those paths directly — they are local files
|
|
79
79
|
- **Base64 only (no file path)**: if you only have base64 data with no local path, upload first via `manage_assets` with `action: "upload"`, `projectId`, `base64`, `mimeType`. Get back `{ id: assetId, path }`. Then pass the returned `path` in `references` — `create_task` will automatically copy and link the asset, no separate `link_task` needed
|
|
80
80
|
- **`link_task` only for retroactive linking**: use `manage_assets` with `action: "link_task"` only when you need to associate existing assets with an already-created task (e.g. user wants to add references after task creation)
|
|
81
|
-
8.
|
|
82
|
-
9.
|
|
81
|
+
8. **Source (`## 来源`)** — ALWAYS append a `## 来源` section to the task `description` (see **Task Source** below for the full spec). If the incoming prompt carries no source info, it is literally `## 来源\n无`. If it does (especially a `<task-source>` block injected by a bridge like Feishu), standardize it into a detailed, traceable record.
|
|
82
|
+
9. Call `create_task` with projectId, title, and optional description/priority/labelIds/subPath/versionId/useWorktree/baseBranch/references
|
|
83
|
+
10. After creating: if `autoStart` resolved to true the task starts immediately (check the response's `execution` field — `autoStart` intent does not guarantee it actually started); otherwise the task stays TODO.
|
|
83
84
|
|
|
84
85
|
### "Start a task" / "Run this task" / "Execute task ..."
|
|
85
86
|
|
|
@@ -232,6 +233,80 @@ Note: the response does not include workspace name. Use the workspace name from
|
|
|
232
233
|
| {id (first 8 chars)} | {title} | {status} | {priority} | {labels} |
|
|
233
234
|
```
|
|
234
235
|
|
|
236
|
+
### Task Source (`## 来源`)
|
|
237
|
+
|
|
238
|
+
Every task created through this skill MUST end its `description` with a `## 来源`
|
|
239
|
+
section so we can always trace **why** a task exists and **who** asked for it.
|
|
240
|
+
|
|
241
|
+
**No source info in the prompt** → write exactly:
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
## 来源
|
|
245
|
+
无
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Source info present** → standardize it into a human-readable record. Keep the
|
|
249
|
+
hard locators (chat id / message id / link) verbatim — they are what makes the
|
|
250
|
+
task traceable later.
|
|
251
|
+
|
|
252
|
+
#### Bridge metadata contract (`<task-source>` block)
|
|
253
|
+
|
|
254
|
+
External bridges (Feishu/Lark, etc.) inject a machine-readable block into the
|
|
255
|
+
message. When you see it, parse it, render the standardized `## 来源`, and then
|
|
256
|
+
DROP the raw block from the description (don't store the tags):
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
<task-source>
|
|
260
|
+
channel: feishu # 渠道 (feishu | openclaw | manual | ...)
|
|
261
|
+
chat_name: 南京招生报名讨论群 # 群显示名
|
|
262
|
+
chat_id: oc_xxxxxxxx # 群 ID(硬定位符,必带)
|
|
263
|
+
occurred_at: 2026-06-16 17:49 +08:00 # 讨论/触发时间,带时区(用于进群后定位到具体那条)
|
|
264
|
+
chat_link: https://applink.feishu.cn/client/chat/open?openChatId=oc_xxxxxxxx # 打开「群」的链接(群级,飞书无法精确到单条消息)
|
|
265
|
+
trigger_message_id: om_xxxxxxxx # 触发那条消息的 ID(不可点,但唯一绑定该消息,必带;用于程序回读/去重/兜底)
|
|
266
|
+
thread_root_id: om_yyyyyyyy # (可选)话题根消息 ID
|
|
267
|
+
participants: # 参与者:显示名 + open_id + 角色
|
|
268
|
+
- name: 张斯佳, open_id: ou_aaa, role: 讨论
|
|
269
|
+
- name: 张瑶, open_id: ou_bbb, role: 讨论
|
|
270
|
+
- name: 刘俊平, open_id: ou_ccc, role: 确认
|
|
271
|
+
transcript: | # 相关消息原文(按时间)—— 人真正要看的内容,必带
|
|
272
|
+
17:49 张斯佳:有线下核验点,但无可预约时间,这里需要加提示么?
|
|
273
|
+
17:5x 张瑶:建议合并提示语「目前暂无线下审核点或没有可预约的时间…」
|
|
274
|
+
17:5x 刘俊平:可以处理
|
|
275
|
+
summary: 线下核验点无可预约时间,确认合并提示语后处理 # (可选)一句话结论;缺省时由模型从 transcript 推
|
|
276
|
+
</task-source>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Roles are not required to be pre-computed by the bridge — if `role` is missing,
|
|
280
|
+
infer it from the `transcript` (谁提出 / 谁讨论 / 谁拍板"可以处理"). If a
|
|
281
|
+
`summary` is absent, derive it from the `transcript`.
|
|
282
|
+
|
|
283
|
+
**Feishu reality** — `chat_link` only opens the **group**, not a single message.
|
|
284
|
+
So the practical "go back and find it" combo is **群链接 + occurred_at + transcript**:
|
|
285
|
+
open the group, jump to that time, the transcript is the actual content. Label the
|
|
286
|
+
link line **打开群** (never "原始消息") so nobody expects a one-click jump to the
|
|
287
|
+
exact message. `trigger_message_id` is kept as the only hard anchor to that
|
|
288
|
+
message (not clickable — for programmatic re-read / dedup / fallback).
|
|
289
|
+
|
|
290
|
+
#### Rendered `## 来源` format
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
## 来源
|
|
294
|
+
|
|
295
|
+
- 渠道:飞书群「{chat_name}」
|
|
296
|
+
- 时间:{occurred_at}
|
|
297
|
+
- 参与者:{讨论者们}(讨论),{确认者}(确认可处理)
|
|
298
|
+
- 讨论要点:{summary}
|
|
299
|
+
- 打开群:{chat_link}
|
|
300
|
+
- 溯源 ID:chat={chat_id} · msg={trigger_message_id}{ thread_root_id 时追加 · thread={thread_root_id}}
|
|
301
|
+
|
|
302
|
+
讨论摘录(按时间):
|
|
303
|
+
{transcript}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Only render lines whose data is present (e.g. omit `打开群` if there is no
|
|
307
|
+
`chat_link`). Always keep `chat_id` + `trigger_message_id` (hard anchors) and the
|
|
308
|
+
`讨论摘录`/`transcript` (the content humans actually read).
|
|
309
|
+
|
|
235
310
|
### Task Creation Confirmation
|
|
236
311
|
|
|
237
312
|
After `create_task` succeeds, render based on the **response** (not the input
|
|
@@ -244,9 +319,13 @@ parameter — `autoStart: true` does NOT mean execution actually started; check
|
|
|
244
319
|
- Priority: {priority}
|
|
245
320
|
- Status: {status}
|
|
246
321
|
- Worktree: {yes/no}
|
|
322
|
+
{worktree yes ? "- Base branch: " + response.baseBranch : ""}
|
|
247
323
|
{response.execution ? "⚡ Execution started" : response.executionError ? "⚠️ Auto-start failed: " + response.executionError : ""}
|
|
248
324
|
```
|
|
249
325
|
|
|
326
|
+
`response.baseBranch` is non-null only when worktree isolation applies — show the
|
|
327
|
+
`- Base branch:` line only then (omit it entirely for direct-mode tasks).
|
|
328
|
+
|
|
250
329
|
If `executionError` is present, surface it verbatim — common causes are server
|
|
251
330
|
not running, concurrency limit hit, or project missing localPath. Do not say
|
|
252
331
|
"Execution started" when the response only shows `executionError`.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[814747,(a,b,c)=>{b.exports=a.x("path",()=>require("path"))},446786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},421992,a=>{"use strict";let b=(0,a.i(711796).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["default",0,b])},577565,a=>{"use strict";let b=(0,a.i(711796).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);a.s(["GitBranch",0,b],577565)},607219,a=>{"use strict";let b=(0,a.i(711796).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);a.s(["Archive",0,b],607219)},350739,a=>{"use strict";let b=(0,a.i(711796).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);a.s(["FileText",0,b],350739)},429246,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Textarea",0,function({className:a,...d}){return(0,b.jsx)("textarea",{"data-slot":"textarea",className:(0,c.cn)("flex field-sizing-content min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",a),...d})}])},629468,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("4026f39b36357e46d8d5e1027d089a1739d81ecabc",b.callServer,void 0,b.findSourceMapURL,"getLabelsForWorkspace");a.s(["getLabelsForWorkspace",0,c])},463652,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},923266,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"BailoutToCSR",{enumerable:!0,get:function(){return e}});let d=a.r(306150);function e({reason:a,children:b}){throw Object.defineProperty(new d.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},846982,(a,b,c)=>{"use strict";function d(a){return a.split("/").map(a=>encodeURIComponent(a)).join("/")}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"encodeURIPath",{enumerable:!0,get:function(){return d}})},943814,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"PreloadChunks",{enumerable:!0,get:function(){return i}});let d=a.r(728778),e=a.r(986099),f=a.r(556704),g=a.r(846982),h=a.r(427756);function i({moduleIds:a}){let b=f.workAsyncStorage.getStore();if(void 0===b)return null;let c=[];if(b.reactLoadableManifest&&a){let d=b.reactLoadableManifest;for(let b of a){if(!d[b])continue;let a=d[b].files;c.push(...a)}}if(0===c.length)return null;let j=(0,h.getAssetTokenQuery)();return(0,d.jsx)(d.Fragment,{children:c.map(a=>{let c=`${b.assetPrefix}/_next/${(0,g.encodeURIPath)(a)}${j}`;return a.endsWith(".css")?(0,d.jsx)("link",{precedence:"dynamic",href:c,rel:"stylesheet",as:"style",nonce:b.nonce},a):((0,e.preload)(c,{as:"script",fetchPriority:"low",nonce:b.nonce}),null)})})}},451358,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return j}});let d=a.r(728778),e=a.r(374637),f=a.r(923266),g=a.r(943814);function h(a){return{default:a&&"default"in a?a.default:a}}let i={loader:()=>Promise.resolve(h(()=>null)),loading:null,ssr:!0},j=function(a){let b={...i,...a},c=(0,e.lazy)(()=>b.loader().then(h)),j=b.loading;function k(a){let h=j?(0,d.jsx)(j,{isLoading:!0,pastDelay:!0,error:null}):null,i=!b.ssr||!!b.loading,k=i?e.Suspense:e.Fragment,l=b.ssr?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.PreloadChunks,{moduleIds:b.modules}),(0,d.jsx)(c,{...a})]}):(0,d.jsx)(f.BailoutToCSR,{reason:"next/dynamic",children:(0,d.jsx)(c,{...a})});return(0,d.jsx)(k,{...i?{fallback:h}:{},children:l})}return k.displayName="LoadableComponent",k}},969032,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"default",{enumerable:!0,get:function(){return e}});let d=a.r(463652)._(a.r(451358));function e(a,b){let c={};"function"==typeof a&&(c.loader=a);let e={...c,...b};return(0,d.default)({...e,modules:e.loadableGenerated?.modules})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},595999,328535,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(616335),e=a.i(192369),f=a.i(699570);class g extends c.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("[ErrorBoundary]",a,b)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 p-8 text-center",children:[(0,b.jsx)(d.AlertCircle,{className:"h-8 w-8 text-destructive"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:this.state.error?.message??"An unexpected error occurred"})]}),(0,b.jsxs)(f.Button,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:[(0,b.jsx)(e.RefreshCw,{className:"mr-2 h-3.5 w-3.5"}),"Retry"]})]}):this.props.children}}a.s(["ErrorBoundary",0,g],595999);var h=a.i(780410);let i=(0,h.createServerReference)("008f1d70c23c8fc694e191710a68f9e6dbb24d2b7d",h.callServer,void 0,h.findSourceMapURL,"getActualWsPort");a.s(["getActualWsPort",0,i],328535)},369289,a=>{"use strict";let b=(0,a.i(711796).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Settings",0,b],369289)},76151,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6086ca5502a7fc3a40c487b758649db2e2ecd161d2",b.callServer,void 0,b.findSourceMapURL,"getConfigValue");a.s(["getConfigValue",0,c])},190076,a=>{"use strict";let b=(0,a.i(711796).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);a.s(["Bell",0,b],190076)},718799,a=>{"use strict";var b=a.i(728778),c=a.i(374637);a.i(423993);var d=a.i(424764),e=a.i(368114);function f({children:a}){return(0,b.jsx)("kbd",{className:(0,e.cn)("inline-flex min-w-[1.5rem] items-center justify-center rounded-md","border border-border bg-muted px-1.5 py-0.5","text-[11px] font-medium leading-none text-foreground","shadow-[inset_0_-1px_0_var(--border)]"),children:a})}a.s(["KeyCombo",0,function({keys:a}){let e=(0,d.compactKeyList)(a);return(0,b.jsx)("span",{className:"inline-flex flex-wrap items-center gap-1.5",children:e.map((a,e)=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1",children:[e>0&&(0,b.jsx)("span",{className:"text-[11px] text-muted-foreground/40",children:"/"}),(0,d.renderComboTokens)(a).map((a,d)=>(0,b.jsxs)(c.Fragment,{children:[d>0&&(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:"+"}),(0,b.jsx)(f,{children:a})]},d))]},`${a}-${e}`))})}])},940271,a=>{"use strict";var b=a.i(374637),c=(a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}},d=["light","dark"],e="(prefers-color-scheme: dark)",f=b.createContext(void 0),g={setTheme:a=>{},themes:[]},h=["light","dark"],i=({forcedTheme:a,disableTransitionOnChange:c=!1,enableSystem:g=!0,enableColorScheme:i=!0,storageKey:n="theme",themes:o=h,defaultTheme:p=g?"system":"light",attribute:q="data-theme",value:r,children:s,nonce:t,scriptProps:u})=>{let[v,w]=b.useState(()=>k(n,p)),[x,y]=b.useState(()=>"system"===v?m():v),z=r?Object.values(r):o,A=b.useCallback(a=>{let b=a;if(!b)return;"system"===a&&g&&(b=m());let e=r?r[b]:b,f=c?l(t):null,h=document.documentElement,j=a=>{"class"===a?(h.classList.remove(...z),e&&h.classList.add(e)):a.startsWith("data-")&&(e?h.setAttribute(a,e):h.removeAttribute(a))};if(Array.isArray(q)?q.forEach(j):j(q),i){let a=d.includes(p)?p:null,c=d.includes(b)?b:a;h.style.colorScheme=c}null==f||f()},[t]),B=b.useCallback(a=>{let b="function"==typeof a?a(v):a;w(b);try{localStorage.setItem(n,b)}catch(a){}},[v]),C=b.useCallback(b=>{y(m(b)),"system"===v&&g&&!a&&A("system")},[v,a]);b.useEffect(()=>{let a=window.matchMedia(e);return a.addListener(C),C(a),()=>a.removeListener(C)},[C]),b.useEffect(()=>{let a=a=>{a.key===n&&(a.newValue?w(a.newValue):B(p))};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[B]),b.useEffect(()=>{A(null!=a?a:v)},[a,v]);let D=b.useMemo(()=>({theme:v,setTheme:B,forcedTheme:a,resolvedTheme:"system"===v?x:v,themes:g?[...o,"system"]:o,systemTheme:g?x:void 0}),[v,B,a,x,g,o]);return b.createElement(f.Provider,{value:D},b.createElement(j,{forcedTheme:a,storageKey:n,attribute:q,enableSystem:g,enableColorScheme:i,defaultTheme:p,value:r,themes:o,nonce:t,scriptProps:u}),s)},j=b.memo(({forcedTheme:a,storageKey:d,attribute:e,enableSystem:f,enableColorScheme:g,defaultTheme:h,value:i,themes:j,nonce:k,scriptProps:l})=>{let m=JSON.stringify([e,d,h,a,j,i,f,g]).slice(1,-1);return b.createElement("script",{...l,suppressHydrationWarning:!0,nonce:k,dangerouslySetInnerHTML:{__html:`(${c.toString()})(${m})`}})}),k=(a,b)=>{},l=a=>{let b=document.createElement("style");return a&&b.setAttribute("nonce",a),b.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(b),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(b)},1)}},m=a=>(a||(a=window.matchMedia(e)),a.matches?"dark":"light");a.s(["ThemeProvider",0,a=>b.useContext(f)?b.createElement(b.Fragment,null,a.children):b.createElement(i,{...a}),"useTheme",0,()=>{var a;return null!=(a=b.useContext(f))?a:g}])},949327,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40b4640c57401cd27cb33d9aaa952b629581721f99",b.callServer,void 0,b.findSourceMapURL,"installExtension");a.s(["installExtension",0,c])},191117,a=>{"use strict";let b=(0,a.i(711796).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);a.s(["FileCode",0,b],191117)},953093,a=>{"use strict";var b=a.i(573242),c=a.i(191117);let d={rg:{id:"rg",name:"代码搜索 (ripgrep)",description:"基于 rg 的全文代码搜索",icon:b.Search,sizeMB:5,homepageUrl:"https://github.com/BurntSushi/ripgrep#installation",manualInstall:!0},monaco:{id:"monaco",name:"代码编辑器 (Monaco)",description:"VS Code 同款 Web 编辑器",icon:c.FileCode,sizeMB:15,homepageUrl:"https://microsoft.github.io/monaco-editor/"}},e=[d.rg,d.monaco];a.s(["listExtensionMetadata",0,function(){return e}])},641023,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60328d14d064267c9ac3962fe5cb2f7b5165c4a29d",b.callServer,void 0,b.findSourceMapURL,"setConfigValue");a.s(["setConfigValue",0,c])},761052,86354,34252,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);a.s(["Sun",0,c],761052);let d=(0,b.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);a.s(["Moon",0,d],86354);let e=(0,b.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);a.s(["Languages",0,e],34252)},563658,a=>{"use strict";var b,c=a.i(728778);a.s([],725980),a.i(725980);var d=a.i(374637),e=a.i(327104),f=a.i(74686),g=a.i(140988),h=a.i(830067),i=a.i(420074),j=a.i(535011),k=a.i(213200),l=a.i(475295),m=a.i(366752),n=a.i(19926),o=a.i(862306);let p=d.createContext(void 0);var q=a.i(258802);let r=((b={}).checked="data-checked",b.unchecked="data-unchecked",b.disabled="data-disabled",b.readonly="data-readonly",b.required="data-required",b.valid="data-valid",b.invalid="data-invalid",b.touched="data-touched",b.dirty="data-dirty",b.filled="data-filled",b.focused="data-focused",b),s={...q.fieldValidityMapping,checked:a=>a?{[r.checked]:""}:{[r.unchecked]:""}};var t=a.i(233619),u=a.i(166388),v=a.i(77469),w=a.i(584395),x=a.i(303722),y=a.i(622047),z=a.i(100737),A=a.i(706092);let B=d.forwardRef(function(a,b){let{checked:o,className:q,defaultChecked:r,"aria-labelledby":B,id:C,inputRef:D,name:E,nativeButton:F=!1,onCheckedChange:G,readOnly:H=!1,required:I=!1,disabled:J=!1,render:K,uncheckedValue:L,value:M,...N}=a,{clearErrors:O}=(0,v.useFormContext)(),{state:P,setTouched:Q,setDirty:R,validityData:S,setFilled:T,setFocused:U,shouldValidateOnChange:V,validationMode:W,disabled:X,name:Y,validation:Z}=(0,u.useFieldRootContext)(),{labelId:$}=(0,w.useLabelableContext)(),_=X||J,aa=Y??E,ab=(0,f.useStableCallback)(G),ac=d.useRef(null),ad=(0,g.useMergedRefs)(ac,D,Z.inputRef),ae=d.useRef(null),af=(0,m.useBaseUiId)(),ag=(0,x.useLabelableId)({id:C,implicit:!1,controlRef:ae}),ah=F?void 0:ag,[ai,aj]=(0,e.useControlled)({controlled:o,default:!!r,name:"Switch",state:"checked"});(0,t.useField)({id:af,commit:Z.commit,value:ai,controlRef:ae,name:aa,getValue:()=>ai}),(0,h.useIsoLayoutEffect)(()=>{ac.current&&T(ac.current.checked)},[ac,T]),(0,A.useValueChanged)(ai,()=>{O(aa),R(ai!==S.initialValue),T(ai),V()?Z.commit(ai):Z.commit(ai,!0)});let{getButtonProps:ak,buttonRef:al}=(0,n.useButton)({disabled:_,native:F}),am=function(a,b,c,e=!0,f){let[g,i]=d.useState(),j=(0,m.useBaseUiId)(f?`${f}-label`:void 0),k=a??b??g;return(0,h.useIsoLayoutEffect)(()=>{let d=a||b||!e?void 0:function(a,b){let c=function(a){if(!a)return;let b=a.parentElement;if(b&&"LABEL"===b.tagName)return b;let c=a.id;if(c){let b=a.nextElementSibling;if(b&&b.htmlFor===c)return b}let d=a.labels;return d&&d[0]}(a);if(c)return!c.id&&b&&(c.id=b),c.id||void 0}(c.current,j);g!==d&&i(d)}),k}(B,$,ac,!F,ah),an=d.useMemo(()=>(0,l.mergeProps)({checked:ai,disabled:_,id:ah,name:aa,required:I,style:aa?i.visuallyHiddenInput:i.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ad,onChange(a){if(a.nativeEvent.defaultPrevented)return;let b=a.target.checked,c=(0,y.createChangeEventDetails)(z.REASONS.none,a.nativeEvent);ab?.(b,c),c.isCanceled||aj(b)},onFocus(){ae.current?.focus()}},Z.getInputValidationProps,void 0!==M?{value:M}:j.EMPTY_OBJECT),[ai,_,ad,ah,aa,ab,I,aj,Z,M]),ao=d.useMemo(()=>({...P,checked:ai,disabled:_,readOnly:H,required:I}),[P,ai,_,H,I]),ap=(0,k.useRenderElement)("span",a,{state:ao,ref:[b,ae,al],props:[{id:F?ag:af,role:"switch","aria-checked":ai,"aria-readonly":H||void 0,"aria-required":I||void 0,"aria-labelledby":am,onFocus(){_||U(!0)},onBlur(){let a=ac.current;a&&!_&&(Q(!0),U(!1),"onBlur"===W&&Z.commit(a.checked))},onClick(a){H||_||(a.preventDefault(),ac.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey,altKey:a.altKey,metaKey:a.metaKey})))}},Z.getValidationProps,N,ak],stateAttributesMapping:s});return(0,c.jsxs)(p.Provider,{value:ao,children:[ap,!ai&&aa&&void 0!==L&&(0,c.jsx)("input",{type:"hidden",name:aa,value:L}),(0,c.jsx)("input",{...an})]})}),C=d.forwardRef(function(a,b){let{render:c,className:e,...f}=a,{state:g}=(0,u.useFieldRootContext)(),h=function(){let a=d.useContext(p);if(void 0===a)throw Error((0,o.default)(63));return a}(),i={...g,...h};return(0,k.useRenderElement)("span",a,{state:i,ref:b,stateAttributesMapping:s,props:f})});a.s(["Root",0,B,"Thumb",0,C],88348);var D=a.i(88348),D=D,E=a.i(368114);a.s(["Switch",0,function({className:a,size:b="default",...d}){return(0,c.jsx)(D.Root,{"data-slot":"switch","data-size":b,className:(0,E.cn)("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",a),...d,children:(0,c.jsx)(D.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],563658)},690251,a=>{"use strict";let b=(0,a.i(711796).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",0,b],690251)},258815,a=>{"use strict";a.s(["getLastProjectId",0,function(a){return({})[a]??null},"setLastProjectId",0,function(a,b){}])},881107,a=>{"use strict";let b=(0,a.i(711796).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);a.s(["Tag",0,b],881107)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0rzkdlf._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[2197,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407c9406a33e464626e42425b0c56de3c72e98a1c4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},846485,259714,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402a3832911ad498ab74ac3988c9585666dd257251",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],846485);let d=(0,b.createServerReference)("40080aba13506281aa713298cee0a07c6cc703ea03",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],259714)},113047,455417,454562,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("408ad60a045f2bf21691c4a3da0c2e5c0df46aeeb6",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],455417);let e=(0,c.createServerReference)("40da2575ef47b9d6d5e7ec17b605f4f79ccd703eb0",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],454562)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(455417),q=a.i(454562),r=a.i(780410);let s=(0,r.createServerReference)("40a368c55ee0fb0de5e50278d7780112639bb8d02a",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(500744);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.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,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.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,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(747798),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,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",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.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":s("assets.lightbox.zoomFit"),children:[(0,b.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:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.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:a=>a.stopPropagation(),children:[C&&(0,b.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:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.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,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.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,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},521007,a=>{"use strict";a.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"])},87339,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["Paperclip",0,b],87339)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_00z0339._.js.map
|