@band-app/server 0.11.0 → 0.13.0
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/dist/client/assets/{DockviewTerminalContainer-B_d7xICn.js → DockviewTerminalContainer-CLlvqDbZ.js} +2 -2
- package/dist/client/assets/TerminalPanel-BE9r8rEY.js +4 -0
- package/dist/client/assets/{_basePickBy-CGUp_yxK.js → _basePickBy-Dh2WFRMd.js} +1 -1
- package/dist/client/assets/{_baseUniq-Dw6GHoL9.js → _baseUniq-2BIwN7J1.js} +1 -1
- package/dist/client/assets/{arc-XlfWbXyq.js → arc-Wsw6SggN.js} +1 -1
- package/dist/client/assets/{architectureDiagram-VXUJARFQ-DrbWYU6-.js → architectureDiagram-VXUJARFQ-XSuarAoX.js} +1 -1
- package/dist/client/assets/{blockDiagram-VD42YOAC-CnGWSi-4.js → blockDiagram-VD42YOAC-DSc5TOI1.js} +1 -1
- package/dist/client/assets/{c4Diagram-YG6GDRKO-XgYkwrO4.js → c4Diagram-YG6GDRKO-DLlwzfnX.js} +1 -1
- package/dist/client/assets/channel-C5uboiOE.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-Bni0jj5l.js → chunk-4BX2VUAB-CWduv96U.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-CP2DHV4G.js → chunk-55IACEB6-D9A39zkK.js} +1 -1
- package/dist/client/assets/{chunk-B4BG7PRW-LorOGQCt.js → chunk-B4BG7PRW-CUMptYWA.js} +1 -1
- package/dist/client/assets/{chunk-DI55MBZ5-BGfyRUcq.js → chunk-DI55MBZ5-DIwkyxaQ.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-DSwbm1gv.js → chunk-FMBD7UC4-D8F2lei-.js} +1 -1
- package/dist/client/assets/{chunk-QN33PNHL-EtPi_Ji9.js → chunk-QN33PNHL-C83_AULb.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-DO6tEA7r.js → chunk-QZHKN3VN-Dtw-3_KI.js} +1 -1
- package/dist/client/assets/{chunk-TZMSLE5B-Nj40qaVe.js → chunk-TZMSLE5B-Cg9TlQ9E.js} +1 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-CbG2RU7R.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-CbG2RU7R.js +1 -0
- package/dist/client/assets/clone-vDxxg1dv.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-ak82Fzvq.js → cose-bilkent-S5V4N54A-Drnoe6yO.js} +1 -1
- package/dist/client/assets/{dagre-6UL2VRFP-BhRq81p8.js → dagre-6UL2VRFP-BgY7fnyf.js} +2 -2
- package/dist/client/assets/{diagram-PSM6KHXK-CdCO4ElG.js → diagram-PSM6KHXK-bmxBt_Q-.js} +1 -1
- package/dist/client/assets/{diagram-QEK2KX5R-ZTP_AdCr.js → diagram-QEK2KX5R-DGUqlb8j.js} +1 -1
- package/dist/client/assets/{diagram-S2PKOQOG-CUwvj0ij.js → diagram-S2PKOQOG-DxXpOhvW.js} +1 -1
- package/dist/client/assets/{erDiagram-Q2GNP2WA-_TAh-IWD.js → erDiagram-Q2GNP2WA-eZBtaSzD.js} +1 -1
- package/dist/client/assets/{flowDiagram-NV44I4VS-BuwDJSn1.js → flowDiagram-NV44I4VS-Dfwd3PGB.js} +1 -1
- package/dist/client/assets/{ganttDiagram-JELNMOA3-B7yQG2sO.js → ganttDiagram-JELNMOA3-BAMeSthd.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-BO5T-8Lr.js → gitGraphDiagram-V2S2FVAM-Dts_Yrpu.js} +1 -1
- package/dist/client/assets/{graph-D-uGD-0H.js → graph-BuNOEI6L.js} +1 -1
- package/dist/client/assets/{highlighted-body-B3W2YXNL-BhBwg9zK.js → highlighted-body-B3W2YXNL-Btj0UZe1.js} +1 -1
- package/dist/client/assets/{index-CJMoNto1.js → index-B4xvdE9X.js} +1 -1
- package/dist/client/assets/{index-CxT2NPzl.js → index-BFyseSVV.js} +1 -1
- package/dist/client/assets/{index-Go-0lxNN.js → index-Bmhh2EB_.js} +1 -1
- package/dist/client/assets/{index-BMvH6RWO.js → index-CF7iJtA6.js} +1 -1
- package/dist/client/assets/{index-P603ebp4.js → index-D7TqJ9RF.js} +1 -1
- package/dist/client/assets/{index-DxHeWcH9.js → index-DOb48mtv.js} +2 -2
- package/dist/client/assets/{index-DiaEWqnN.js → index-DR-TpUg3.js} +1 -1
- package/dist/client/assets/{index-Qgt9bjPe.js → index-DaorCZSP.js} +1 -1
- package/dist/client/assets/{index-B1UdfbJU.js → index-JytYW91Z.js} +1 -1
- package/dist/client/assets/{index-CvA0I31h.js → index-Ktl6P-nc.js} +1 -1
- package/dist/client/assets/{index-ei6PilZv.js → index-Qm_HbX1-.js} +1 -1
- package/dist/client/assets/{index-C9CkZeNx.js → index-Vaa1H_pP.js} +1 -1
- package/dist/client/assets/{index-DyXCT17y.js → index-cErwJT25.js} +1 -1
- package/dist/client/assets/{index-CQ8y5zr7.js → index-g5xXrehm.js} +1 -1
- package/dist/client/assets/{index-DZeEuAVf.js → index-gv6bT0S4.js} +1 -1
- package/dist/client/assets/{index-BCvOU1J9.js → index-sMR7WunY.js} +1 -1
- package/dist/client/assets/{index-B9YuCMCp.js → index-tIReXko0.js} +1 -1
- package/dist/client/assets/{index-DB_ThGxo.js → index-xEL9mxnj.js} +1 -1
- package/dist/client/assets/{infoDiagram-HS3SLOUP-CXG0VFXc.js → infoDiagram-HS3SLOUP-ygUopIDr.js} +1 -1
- package/dist/client/assets/{journeyDiagram-XKPGCS4Q-DHFwgvUa.js → journeyDiagram-XKPGCS4Q-C7fCACOj.js} +1 -1
- package/dist/client/assets/{kanban-definition-3W4ZIXB7-Dz5WwtmO.js → kanban-definition-3W4ZIXB7-4jf7Ztsb.js} +1 -1
- package/dist/client/assets/{layout-Br-A41yG.js → layout-DBEGDIe2.js} +1 -1
- package/dist/client/assets/{linear-eN-Z_k3e.js → linear-2Gp1gLY9.js} +1 -1
- package/dist/client/assets/main-4FaYQ5DQ.css +1 -0
- package/dist/client/assets/{main-CfXjc_JR.js → main-CzHZzsmJ.js} +264 -264
- package/dist/client/assets/{mindmap-definition-VGOIOE7T-KtSITXQp.js → mindmap-definition-VGOIOE7T-CiziEudd.js} +1 -1
- package/dist/client/assets/{pieDiagram-ADFJNKIX-BQmo4537.js → pieDiagram-ADFJNKIX-DTFtaGug.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AYHSOK5B-Cftd-sa5.js → quadrantDiagram-AYHSOK5B-fbALF3fd.js} +1 -1
- package/dist/client/assets/{requirementDiagram-UZGBJVZJ-Cbad3gPG.js → requirementDiagram-UZGBJVZJ-CRl9BPyr.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-TZEHDZUN-CT0Fvveb.js → sankeyDiagram-TZEHDZUN-RgshY6u-.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WL72ISMW-D_VHvSKc.js → sequenceDiagram-WL72ISMW-BbgPIX0Q.js} +1 -1
- package/dist/client/assets/{square-terminal-BIHVvHoK.js → square-terminal-DCU0c-OS.js} +1 -1
- package/dist/client/assets/{stateDiagram-FKZM4ZOC-BXtCQjOy.js → stateDiagram-FKZM4ZOC-feRu8oRh.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-By7mP9TH.js +1 -0
- package/dist/client/assets/{timeline-definition-IT6M3QCI-DG4t2xHw.js → timeline-definition-IT6M3QCI-BqWKbKID.js} +1 -1
- package/dist/client/assets/{treemap-GDKQZRPO-DQP5MG32.js → treemap-GDKQZRPO-D0xFOnga.js} +1 -1
- package/dist/client/assets/{useSessionListContext-CbzNRAeC.js → useSessionListContext-PZqsgbdH.js} +1 -1
- package/dist/client/assets/workspace._workspaceId-djkhDM0B.js +1 -0
- package/dist/client/assets/{workspace._workspaceId.changes-C0w9GX6M.js → workspace._workspaceId.changes-InUdTCW0.js} +1 -1
- package/dist/client/assets/workspace._workspaceId.code-B2HMVWnI.js +1 -0
- package/dist/client/assets/{workspace._workspaceId.code._-BlXLI8oa.js → workspace._workspaceId.code._-iCOKNXeZ.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.code.index-C-ai4qSV.js → workspace._workspaceId.code.index-DMKkXryF.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.index-B4ICOQa_.js → workspace._workspaceId.index-BZyamHNS.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId.terminal-twItT7MS.js → workspace._workspaceId.terminal-4F7quTy3.js} +2 -2
- package/dist/client/assets/{xychartDiagram-PRI3JC2R-B3wc6a3i.js → xychartDiagram-PRI3JC2R-DicPcjot.js} +1 -1
- package/dist/migrations/20260513141710_browser_history/migration.sql +12 -0
- package/dist/migrations/20260513141710_browser_history/snapshot.json +846 -0
- package/dist/server/assets/{DockviewTerminalContainer-C08cAuxR.js → DockviewTerminalContainer-BBQnIZa3.js} +3 -3
- package/dist/server/assets/TerminalPanel-B1dKqOMK.js +1016 -0
- package/dist/server/assets/{_basePickBy-sZPuo3Ci.js → _basePickBy-BoCJVKe_.js} +2 -2
- package/dist/server/assets/{_baseUniq-AWKOFGZz.js → _baseUniq-DCXNOsnI.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-BxDrbOKJ.js → _tanstack-start-manifest_v-2CeISY5W.js} +1 -1
- package/dist/server/assets/{arc-BHB8CdVw.js → arc-BFMEbbxV.js} +1 -1
- package/dist/server/assets/{architecture-7HQA4BMR-CegM3zV0.js → architecture-7HQA4BMR-4b2GJppC.js} +6 -6
- package/dist/server/assets/{architectureDiagram-VXUJARFQ-C0Hc_lzz.js → architectureDiagram-VXUJARFQ-iVW_FQ4S.js} +6 -6
- package/dist/server/assets/{blockDiagram-VD42YOAC-CGmRuJNx.js → blockDiagram-VD42YOAC-D1iPUb9l.js} +6 -6
- package/dist/server/assets/{c4Diagram-YG6GDRKO-45kx6aRF.js → c4Diagram-YG6GDRKO-DI4Ztwr3.js} +2 -2
- package/dist/server/assets/{channel-YRi2PtmI.js → channel-VwPrL84U.js} +1 -1
- package/dist/server/assets/{chunk-4BX2VUAB-CdQZhoNV.js → chunk-4BX2VUAB-B9WFGVXO.js} +1 -1
- package/dist/server/assets/{chunk-55IACEB6-3Guaa5mF.js → chunk-55IACEB6-cnFKsxmn.js} +1 -1
- package/dist/server/assets/{chunk-B4BG7PRW-crikL5R-.js → chunk-B4BG7PRW-DVIhTopX.js} +4 -4
- package/dist/server/assets/{chunk-DI55MBZ5-cdG5TMcl.js → chunk-DI55MBZ5-a2cj65b-.js} +3 -3
- package/dist/server/assets/{chunk-FMBD7UC4-BfJRchHH.js → chunk-FMBD7UC4-D79uNYe4.js} +1 -1
- package/dist/server/assets/{chunk-QN33PNHL--Lwmy-qD.js → chunk-QN33PNHL-BDbkmWdo.js} +1 -1
- package/dist/server/assets/{chunk-QZHKN3VN-BjRv3GOJ.js → chunk-QZHKN3VN-CIC4C0nk.js} +1 -1
- package/dist/server/assets/{chunk-TZMSLE5B-H_DXTbB4.js → chunk-TZMSLE5B-BQBr1RGS.js} +1 -1
- package/dist/server/assets/{classDiagram-v2-WZHVMYZB-89eor2RH.js → classDiagram-2ON5EDUG-CtbqESgu.js} +5 -5
- package/dist/server/assets/{classDiagram-2ON5EDUG-89eor2RH.js → classDiagram-v2-WZHVMYZB-CtbqESgu.js} +5 -5
- package/dist/server/assets/{clone-ehRaGIPL.js → clone-Bnbf9Iqg.js} +1 -1
- package/dist/server/assets/{cose-bilkent-S5V4N54A-CaxWP-ls.js → cose-bilkent-S5V4N54A-DQl5SFk6.js} +1 -1
- package/dist/server/assets/{dagre-6UL2VRFP-nML2GoFm.js → dagre-6UL2VRFP-DWcFImvS.js} +6 -6
- package/dist/server/assets/{diagram-PSM6KHXK-DNGTWSIt.js → diagram-PSM6KHXK-CAIVqsc3.js} +7 -7
- package/dist/server/assets/{diagram-QEK2KX5R-v8VJEGaP.js → diagram-QEK2KX5R-Dc8wo9c1.js} +6 -6
- package/dist/server/assets/{diagram-S2PKOQOG-BaL9LGkK.js → diagram-S2PKOQOG-ZNcpDFrx.js} +6 -6
- package/dist/server/assets/{erDiagram-Q2GNP2WA-D8492WtW.js → erDiagram-Q2GNP2WA-BYLAWy_j.js} +4 -4
- package/dist/server/assets/{flowDiagram-NV44I4VS-9EzGsZaT.js → flowDiagram-NV44I4VS-CzcX8svk.js} +5 -5
- package/dist/server/assets/{ganttDiagram-JELNMOA3-DXT8NWPe.js → ganttDiagram-JELNMOA3-Dxwzox2R.js} +2 -2
- package/dist/server/assets/{gitGraph-G5XIXVHT-Bz8_hJ5u.js → gitGraph-G5XIXVHT-LK8-a2sz.js} +6 -6
- package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-CnBNPMun.js → gitGraphDiagram-V2S2FVAM-DlgLrJB0.js} +7 -7
- package/dist/server/assets/{graph-CkD4QR_J.js → graph-BXmxFNFp.js} +2 -2
- package/dist/server/assets/{highlighted-body-B3W2YXNL-Cx9TQQOi.js → highlighted-body-B3W2YXNL-DsSe47sR.js} +1 -1
- package/dist/server/assets/{index-Du0s-OSL.js → index-4YgzFKOD.js} +5 -5
- package/dist/server/assets/{index-DefaG_Jr.js → index-5upQdcP2.js} +2 -2
- package/dist/server/assets/{index-CaMi2wJ-.js → index-B-LK0PYZ.js} +2 -2
- package/dist/server/assets/{index-ip3CXBin.js → index-BSojqZdf.js} +2 -2
- package/dist/server/assets/{index-BIGELKaL.js → index-BbjwIyTa.js} +5 -5
- package/dist/server/assets/{index-DRuNJuxv.js → index-BdNVOcCL.js} +2 -2
- package/dist/server/assets/{index-D0EeXiux.js → index-BrkgyCV3.js} +2 -2
- package/dist/server/assets/{index-Cuzbefg5.js → index-BsoOL_wq.js} +2 -2
- package/dist/server/assets/{index-frDhjK4t.js → index-CVjIVbLj.js} +2 -2
- package/dist/server/assets/{index-Ys57JqHp.js → index-CWtvbkAQ.js} +3 -3
- package/dist/server/assets/{index-Di60ebJg.js → index-CXycOokw.js} +2 -2
- package/dist/server/assets/{index-D-gmsExo.js → index-CaaOSPL7.js} +3 -3
- package/dist/server/assets/{index-C4UsgNUp.js → index-CnLND4um.js} +1 -1
- package/dist/server/assets/{index-Dl8jeLrk.js → index-DM2r-vGW.js} +2 -2
- package/dist/server/assets/{index-CURBmg8q.js → index-DdVNSMNY.js} +2 -2
- package/dist/server/assets/{index-BnbsIRq2.js → index-Do1Nx4aA.js} +1 -1
- package/dist/server/assets/{index-dHlIt0bs.js → index-nKutdysv.js} +2 -2
- package/dist/server/assets/{index-CYaseS8g.js → index-oC76KgvT.js} +4 -4
- package/dist/server/assets/{info-VBDWY6EO-Cn3hNsdX.js → info-VBDWY6EO-CM7NSJD8.js} +6 -6
- package/dist/server/assets/{infoDiagram-HS3SLOUP-7CfAt4Uh.js → infoDiagram-HS3SLOUP-QMxyRHM5.js} +5 -5
- package/dist/server/assets/{journeyDiagram-XKPGCS4Q-BSONqKAA.js → journeyDiagram-XKPGCS4Q-BoA6PlCZ.js} +4 -4
- package/dist/server/assets/{kanban-definition-3W4ZIXB7-D6yZMd8l.js → kanban-definition-3W4ZIXB7-r6KtKaEH.js} +2 -2
- package/dist/server/assets/{layout-mg-BM0ah.js → layout-D3Do3Tbk.js} +4 -4
- package/dist/server/assets/{linear-BMOZWebZ.js → linear-CC2CX22M.js} +1 -1
- package/dist/server/assets/{mermaid-3ZIDBTTL-BaXUHzN6.js → mermaid-3ZIDBTTL-De3B4GT2.js} +1 -1
- package/dist/server/assets/{mermaid-parser.core-rzveH7k9.js → mermaid-parser.core-BNbfHMQU.js} +11 -11
- package/dist/server/assets/{mindmap-definition-VGOIOE7T-BWCUtjdH.js → mindmap-definition-VGOIOE7T-BZA0jx43.js} +3 -3
- package/dist/server/assets/{packet-DYOGHKS2-YNVTDtvn.js → packet-DYOGHKS2-FVoQy92R.js} +6 -6
- package/dist/server/assets/{pie-VRWISCQL-CUd-HhbY.js → pie-VRWISCQL-BGUPFoed.js} +6 -6
- package/dist/server/assets/{pieDiagram-ADFJNKIX-Cn9i98AK.js → pieDiagram-ADFJNKIX-6xe9bPcx.js} +7 -7
- package/dist/server/assets/{quadrantDiagram-AYHSOK5B-BIqkmSwk.js → quadrantDiagram-AYHSOK5B-DrjB4XQc.js} +2 -2
- package/dist/server/assets/{radar-ZZBFDIW7-Bp2wUTqp.js → radar-ZZBFDIW7-BioEa_Uy.js} +6 -6
- package/dist/server/assets/{requirementDiagram-UZGBJVZJ-DCovbx84.js → requirementDiagram-UZGBJVZJ-BQUraj5G.js} +3 -3
- package/dist/server/assets/{router-BJ9AnId-.js → router-Ch9bBOlF.js} +974 -351
- package/dist/server/assets/{sankeyDiagram-TZEHDZUN-D235svhJ.js → sankeyDiagram-TZEHDZUN-qdkVPLba.js} +1 -1
- package/dist/server/assets/{sequenceDiagram-WL72ISMW-BkT1dO7h.js → sequenceDiagram-WL72ISMW-Bh5Gu2_v.js} +3 -3
- package/dist/server/assets/{square-terminal-CmcrJjAr.js → square-terminal-DVnlJfcM.js} +1 -1
- package/dist/server/assets/{stateDiagram-FKZM4ZOC-BJ70j0rR.js → stateDiagram-FKZM4ZOC-BUasl40g.js} +8 -8
- package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-ju1h0Bq1.js → stateDiagram-v2-4FDKWEC3-BL56MbOT.js} +4 -4
- package/dist/server/assets/{timeline-definition-IT6M3QCI-C3FJ_HU6.js → timeline-definition-IT6M3QCI-oGfd7fF8.js} +2 -2
- package/dist/server/assets/{treemap-GDKQZRPO-DvhWVE_G.js → treemap-GDKQZRPO-CELUCxyO.js} +6 -6
- package/dist/server/assets/{workspace._workspaceId-Dzw4IQZA.js → workspace._workspaceId-DhJMpGAq.js} +10 -4
- package/dist/server/assets/{workspace._workspaceId.changes-XtB3brY5.js → workspace._workspaceId.changes-5-0MP0m5.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code._-Ta-O6sWR.js → workspace._workspaceId.code._-BFbAz_ei.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.code.index-snQLg3f2.js → workspace._workspaceId.code.index-BepZ481b.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.index-BSnuZ0EI.js → workspace._workspaceId.index-Cp3_jFDn.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId.terminal-D3jJ3XMV.js → workspace._workspaceId.terminal-B5beQDh_.js} +2 -2
- package/dist/server/assets/{xychartDiagram-PRI3JC2R-BRlE_l5B.js → xychartDiagram-PRI3JC2R-qDOKCR8M.js} +2 -2
- package/dist/server/server.js +2 -2
- package/dist/start-server.mjs +1118 -519
- package/package.json +5 -5
- package/dist/client/assets/TerminalPanel-DMsYxEdX.js +0 -4
- package/dist/client/assets/channel-C4hzzilT.js +0 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-D7Wwq-uf.js +0 -1
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-D7Wwq-uf.js +0 -1
- package/dist/client/assets/clone-CRqkC7J9.js +0 -1
- package/dist/client/assets/main-F2T48yRI.css +0 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3--e7abZtM.js +0 -1
- package/dist/client/assets/workspace._workspaceId-BlPtc664.js +0 -1
- package/dist/client/assets/workspace._workspaceId.code-B2x2c1r3.js +0 -1
- package/dist/server/assets/TerminalPanel-CDMb43XN.js +0 -442
package/dist/start-server.mjs
CHANGED
|
@@ -3445,8 +3445,8 @@ var require_websocket_server = __commonJS({
|
|
|
3445
3445
|
*/
|
|
3446
3446
|
shouldHandle(req) {
|
|
3447
3447
|
if (this.options.path) {
|
|
3448
|
-
const
|
|
3449
|
-
const pathname =
|
|
3448
|
+
const index3 = req.url.indexOf("?");
|
|
3449
|
+
const pathname = index3 !== -1 ? req.url.slice(0, index3) : req.url;
|
|
3450
3450
|
if (pathname !== this.options.path) return false;
|
|
3451
3451
|
}
|
|
3452
3452
|
return true;
|
|
@@ -4585,8 +4585,8 @@ var require_redaction = __commonJS({
|
|
|
4585
4585
|
if (o2[ns] === null) {
|
|
4586
4586
|
return o2;
|
|
4587
4587
|
}
|
|
4588
|
-
const { index:
|
|
4589
|
-
const nextPath = `${str.substr(
|
|
4588
|
+
const { index: index3 } = next;
|
|
4589
|
+
const nextPath = `${str.substr(index3, str.length - 1)}`;
|
|
4590
4590
|
o2[ns] = o2[ns] || [];
|
|
4591
4591
|
if (ns !== wildcardFirstSym && o2[ns].length === 0) {
|
|
4592
4592
|
o2[ns].push(...o2[wildcardFirstSym] || []);
|
|
@@ -4692,8 +4692,8 @@ var require_quick_format_unescaped = __commonJS({
|
|
|
4692
4692
|
if (len === 1) return f10;
|
|
4693
4693
|
var objects = new Array(len);
|
|
4694
4694
|
objects[0] = ss(f10);
|
|
4695
|
-
for (var
|
|
4696
|
-
objects[
|
|
4695
|
+
for (var index3 = 1; index3 < len; index3++) {
|
|
4696
|
+
objects[index3] = ss(args[index3]);
|
|
4697
4697
|
}
|
|
4698
4698
|
return objects.join(" ");
|
|
4699
4699
|
}
|
|
@@ -5464,8 +5464,8 @@ var require_on_exit_leak_free = __commonJS({
|
|
|
5464
5464
|
}
|
|
5465
5465
|
function clear(ref) {
|
|
5466
5466
|
for (const event of ["exit", "beforeExit"]) {
|
|
5467
|
-
const
|
|
5468
|
-
refs[event].splice(
|
|
5467
|
+
const index3 = refs[event].indexOf(ref);
|
|
5468
|
+
refs[event].splice(index3, index3 + 1);
|
|
5469
5469
|
uninstall(event);
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
@@ -5575,9 +5575,9 @@ var require_wait = __commonJS({
|
|
|
5575
5575
|
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js"(exports, module) {
|
|
5576
5576
|
"use strict";
|
|
5577
5577
|
var MAX_TIMEOUT = 1e3;
|
|
5578
|
-
function wait(state2,
|
|
5578
|
+
function wait(state2, index3, expected, timeout, done) {
|
|
5579
5579
|
const max2 = Date.now() + timeout;
|
|
5580
|
-
let current = Atomics.load(state2,
|
|
5580
|
+
let current = Atomics.load(state2, index3);
|
|
5581
5581
|
if (current === expected) {
|
|
5582
5582
|
done(null, "ok");
|
|
5583
5583
|
return;
|
|
@@ -5589,7 +5589,7 @@ var require_wait = __commonJS({
|
|
|
5589
5589
|
} else {
|
|
5590
5590
|
setTimeout(() => {
|
|
5591
5591
|
prior = current;
|
|
5592
|
-
current = Atomics.load(state2,
|
|
5592
|
+
current = Atomics.load(state2, index3);
|
|
5593
5593
|
if (current === prior) {
|
|
5594
5594
|
check2(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
|
|
5595
5595
|
} else {
|
|
@@ -5601,9 +5601,9 @@ var require_wait = __commonJS({
|
|
|
5601
5601
|
};
|
|
5602
5602
|
check2(1);
|
|
5603
5603
|
}
|
|
5604
|
-
function waitDiff(state2,
|
|
5604
|
+
function waitDiff(state2, index3, expected, timeout, done) {
|
|
5605
5605
|
const max2 = Date.now() + timeout;
|
|
5606
|
-
let current = Atomics.load(state2,
|
|
5606
|
+
let current = Atomics.load(state2, index3);
|
|
5607
5607
|
if (current !== expected) {
|
|
5608
5608
|
done(null, "ok");
|
|
5609
5609
|
return;
|
|
@@ -5613,7 +5613,7 @@ var require_wait = __commonJS({
|
|
|
5613
5613
|
done(null, "timed-out");
|
|
5614
5614
|
} else {
|
|
5615
5615
|
setTimeout(() => {
|
|
5616
|
-
current = Atomics.load(state2,
|
|
5616
|
+
current = Atomics.load(state2, index3);
|
|
5617
5617
|
if (current !== expected) {
|
|
5618
5618
|
done(null, "ok");
|
|
5619
5619
|
} else {
|
|
@@ -5648,7 +5648,7 @@ var require_thread_stream = __commonJS({
|
|
|
5648
5648
|
var { version: version2 } = require_package();
|
|
5649
5649
|
var { EventEmitter } = __require("events");
|
|
5650
5650
|
var { Worker } = __require("worker_threads");
|
|
5651
|
-
var { join:
|
|
5651
|
+
var { join: join25 } = __require("path");
|
|
5652
5652
|
var { pathToFileURL } = __require("url");
|
|
5653
5653
|
var { wait } = require_wait();
|
|
5654
5654
|
var {
|
|
@@ -5684,7 +5684,7 @@ var require_thread_stream = __commonJS({
|
|
|
5684
5684
|
function createWorker(stream, opts) {
|
|
5685
5685
|
const { filename, workerData } = opts;
|
|
5686
5686
|
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
|
|
5687
|
-
const toExecute = bundlerOverrides["thread-stream-worker"] ||
|
|
5687
|
+
const toExecute = bundlerOverrides["thread-stream-worker"] || join25(__dirname, "lib", "worker.js");
|
|
5688
5688
|
const worker = new Worker(toExecute, {
|
|
5689
5689
|
...opts.workerOpts,
|
|
5690
5690
|
trackUnmanagedFds: false,
|
|
@@ -6070,7 +6070,7 @@ var require_transport = __commonJS({
|
|
|
6070
6070
|
"use strict";
|
|
6071
6071
|
var { createRequire: createRequire2 } = __require("module");
|
|
6072
6072
|
var getCallers = require_caller();
|
|
6073
|
-
var { join:
|
|
6073
|
+
var { join: join25, isAbsolute, sep: sep3 } = __require("node:path");
|
|
6074
6074
|
var sleep2 = require_atomic_sleep();
|
|
6075
6075
|
var onExit = require_on_exit_leak_free();
|
|
6076
6076
|
var ThreadStream = require_thread_stream();
|
|
@@ -6133,7 +6133,7 @@ var require_transport = __commonJS({
|
|
|
6133
6133
|
throw new Error("only one of target or targets can be specified");
|
|
6134
6134
|
}
|
|
6135
6135
|
if (targets) {
|
|
6136
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6136
|
+
target = bundlerOverrides["pino-worker"] || join25(__dirname, "worker.js");
|
|
6137
6137
|
options2.targets = targets.filter((dest) => dest.target).map((dest) => {
|
|
6138
6138
|
return {
|
|
6139
6139
|
...dest,
|
|
@@ -6151,7 +6151,7 @@ var require_transport = __commonJS({
|
|
|
6151
6151
|
});
|
|
6152
6152
|
});
|
|
6153
6153
|
} else if (pipeline) {
|
|
6154
|
-
target = bundlerOverrides["pino-worker"] ||
|
|
6154
|
+
target = bundlerOverrides["pino-worker"] || join25(__dirname, "worker.js");
|
|
6155
6155
|
options2.pipelines = [pipeline.map((dest) => {
|
|
6156
6156
|
return {
|
|
6157
6157
|
...dest,
|
|
@@ -6173,7 +6173,7 @@ var require_transport = __commonJS({
|
|
|
6173
6173
|
return origin;
|
|
6174
6174
|
}
|
|
6175
6175
|
if (origin === "pino/file") {
|
|
6176
|
-
return
|
|
6176
|
+
return join25(__dirname, "..", "file.js");
|
|
6177
6177
|
}
|
|
6178
6178
|
let fixTarget2;
|
|
6179
6179
|
for (const filePath of callers) {
|
|
@@ -7162,7 +7162,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7162
7162
|
return circularValue;
|
|
7163
7163
|
}
|
|
7164
7164
|
let res = "";
|
|
7165
|
-
let
|
|
7165
|
+
let join25 = ",";
|
|
7166
7166
|
const originalIndentation = indentation;
|
|
7167
7167
|
if (Array.isArray(value)) {
|
|
7168
7168
|
if (value.length === 0) {
|
|
@@ -7176,7 +7176,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
7176
7176
|
indentation += spacer;
|
|
7177
7177
|
res += `
|
|
7178
7178
|
${indentation}`;
|
|
7179
|
-
|
|
7179
|
+
join25 = `,
|
|
7180
7180
|
${indentation}`;
|
|
7181
7181
|
}
|
|
7182
7182
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7184,13 +7184,13 @@ ${indentation}`;
|
|
|
7184
7184
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7185
7185
|
const tmp2 = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
|
|
7186
7186
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7187
|
-
res +=
|
|
7187
|
+
res += join25;
|
|
7188
7188
|
}
|
|
7189
7189
|
const tmp = stringifyFnReplacer(String(i2), value, stack, replacer, spacer, indentation);
|
|
7190
7190
|
res += tmp !== void 0 ? tmp : "null";
|
|
7191
7191
|
if (value.length - 1 > maximumBreadth) {
|
|
7192
7192
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7193
|
-
res += `${
|
|
7193
|
+
res += `${join25}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7194
7194
|
}
|
|
7195
7195
|
if (spacer !== "") {
|
|
7196
7196
|
res += `
|
|
@@ -7211,7 +7211,7 @@ ${originalIndentation}`;
|
|
|
7211
7211
|
let separator = "";
|
|
7212
7212
|
if (spacer !== "") {
|
|
7213
7213
|
indentation += spacer;
|
|
7214
|
-
|
|
7214
|
+
join25 = `,
|
|
7215
7215
|
${indentation}`;
|
|
7216
7216
|
whitespace = " ";
|
|
7217
7217
|
}
|
|
@@ -7225,13 +7225,13 @@ ${indentation}`;
|
|
|
7225
7225
|
const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
|
|
7226
7226
|
if (tmp !== void 0) {
|
|
7227
7227
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7228
|
-
separator =
|
|
7228
|
+
separator = join25;
|
|
7229
7229
|
}
|
|
7230
7230
|
}
|
|
7231
7231
|
if (keyLength > maximumBreadth) {
|
|
7232
7232
|
const removedKeys = keyLength - maximumBreadth;
|
|
7233
7233
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
7234
|
-
separator =
|
|
7234
|
+
separator = join25;
|
|
7235
7235
|
}
|
|
7236
7236
|
if (spacer !== "" && separator.length > 1) {
|
|
7237
7237
|
res = `
|
|
@@ -7272,7 +7272,7 @@ ${originalIndentation}`;
|
|
|
7272
7272
|
}
|
|
7273
7273
|
const originalIndentation = indentation;
|
|
7274
7274
|
let res = "";
|
|
7275
|
-
let
|
|
7275
|
+
let join25 = ",";
|
|
7276
7276
|
if (Array.isArray(value)) {
|
|
7277
7277
|
if (value.length === 0) {
|
|
7278
7278
|
return "[]";
|
|
@@ -7285,7 +7285,7 @@ ${originalIndentation}`;
|
|
|
7285
7285
|
indentation += spacer;
|
|
7286
7286
|
res += `
|
|
7287
7287
|
${indentation}`;
|
|
7288
|
-
|
|
7288
|
+
join25 = `,
|
|
7289
7289
|
${indentation}`;
|
|
7290
7290
|
}
|
|
7291
7291
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -7293,13 +7293,13 @@ ${indentation}`;
|
|
|
7293
7293
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7294
7294
|
const tmp2 = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
|
|
7295
7295
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
7296
|
-
res +=
|
|
7296
|
+
res += join25;
|
|
7297
7297
|
}
|
|
7298
7298
|
const tmp = stringifyArrayReplacer(String(i2), value[i2], stack, replacer, spacer, indentation);
|
|
7299
7299
|
res += tmp !== void 0 ? tmp : "null";
|
|
7300
7300
|
if (value.length - 1 > maximumBreadth) {
|
|
7301
7301
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7302
|
-
res += `${
|
|
7302
|
+
res += `${join25}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7303
7303
|
}
|
|
7304
7304
|
if (spacer !== "") {
|
|
7305
7305
|
res += `
|
|
@@ -7312,7 +7312,7 @@ ${originalIndentation}`;
|
|
|
7312
7312
|
let whitespace = "";
|
|
7313
7313
|
if (spacer !== "") {
|
|
7314
7314
|
indentation += spacer;
|
|
7315
|
-
|
|
7315
|
+
join25 = `,
|
|
7316
7316
|
${indentation}`;
|
|
7317
7317
|
whitespace = " ";
|
|
7318
7318
|
}
|
|
@@ -7321,7 +7321,7 @@ ${indentation}`;
|
|
|
7321
7321
|
const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
|
|
7322
7322
|
if (tmp !== void 0) {
|
|
7323
7323
|
res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
|
|
7324
|
-
separator =
|
|
7324
|
+
separator = join25;
|
|
7325
7325
|
}
|
|
7326
7326
|
}
|
|
7327
7327
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -7379,20 +7379,20 @@ ${originalIndentation}`;
|
|
|
7379
7379
|
indentation += spacer;
|
|
7380
7380
|
let res2 = `
|
|
7381
7381
|
${indentation}`;
|
|
7382
|
-
const
|
|
7382
|
+
const join26 = `,
|
|
7383
7383
|
${indentation}`;
|
|
7384
7384
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
7385
7385
|
let i2 = 0;
|
|
7386
7386
|
for (; i2 < maximumValuesToStringify - 1; i2++) {
|
|
7387
7387
|
const tmp2 = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
|
|
7388
7388
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
7389
|
-
res2 +=
|
|
7389
|
+
res2 += join26;
|
|
7390
7390
|
}
|
|
7391
7391
|
const tmp = stringifyIndent(String(i2), value[i2], stack, spacer, indentation);
|
|
7392
7392
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
7393
7393
|
if (value.length - 1 > maximumBreadth) {
|
|
7394
7394
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
7395
|
-
res2 += `${
|
|
7395
|
+
res2 += `${join26}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
7396
7396
|
}
|
|
7397
7397
|
res2 += `
|
|
7398
7398
|
${originalIndentation}`;
|
|
@@ -7408,16 +7408,16 @@ ${originalIndentation}`;
|
|
|
7408
7408
|
return '"[Object]"';
|
|
7409
7409
|
}
|
|
7410
7410
|
indentation += spacer;
|
|
7411
|
-
const
|
|
7411
|
+
const join25 = `,
|
|
7412
7412
|
${indentation}`;
|
|
7413
7413
|
let res = "";
|
|
7414
7414
|
let separator = "";
|
|
7415
7415
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
7416
7416
|
if (isTypedArrayWithEntries(value)) {
|
|
7417
|
-
res += stringifyTypedArray(value,
|
|
7417
|
+
res += stringifyTypedArray(value, join25, maximumBreadth);
|
|
7418
7418
|
keys = keys.slice(value.length);
|
|
7419
7419
|
maximumPropertiesToStringify -= value.length;
|
|
7420
|
-
separator =
|
|
7420
|
+
separator = join25;
|
|
7421
7421
|
}
|
|
7422
7422
|
if (deterministic) {
|
|
7423
7423
|
keys = sort(keys, comparator);
|
|
@@ -7428,13 +7428,13 @@ ${indentation}`;
|
|
|
7428
7428
|
const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
|
|
7429
7429
|
if (tmp !== void 0) {
|
|
7430
7430
|
res += `${separator}${strEscape(key2)}: ${tmp}`;
|
|
7431
|
-
separator =
|
|
7431
|
+
separator = join25;
|
|
7432
7432
|
}
|
|
7433
7433
|
}
|
|
7434
7434
|
if (keyLength > maximumBreadth) {
|
|
7435
7435
|
const removedKeys = keyLength - maximumBreadth;
|
|
7436
7436
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
7437
|
-
separator =
|
|
7437
|
+
separator = join25;
|
|
7438
7438
|
}
|
|
7439
7439
|
if (separator !== "") {
|
|
7440
7440
|
res = `
|
|
@@ -7697,9 +7697,9 @@ var require_multistream = __commonJS({
|
|
|
7697
7697
|
}
|
|
7698
7698
|
function remove2(id) {
|
|
7699
7699
|
const { streams } = this;
|
|
7700
|
-
const
|
|
7701
|
-
if (
|
|
7702
|
-
streams.splice(
|
|
7700
|
+
const index3 = streams.findIndex((s6) => s6.id === id);
|
|
7701
|
+
if (index3 >= 0) {
|
|
7702
|
+
streams.splice(index3, 1);
|
|
7703
7703
|
streams.sort(compareByLevel);
|
|
7704
7704
|
this.minLevel = streams.length > 0 ? streams[0].level : -1;
|
|
7705
7705
|
}
|
|
@@ -8636,9 +8636,9 @@ function mergeValues2(a6, b10) {
|
|
|
8636
8636
|
return { valid: false };
|
|
8637
8637
|
}
|
|
8638
8638
|
const newArray = [];
|
|
8639
|
-
for (let
|
|
8640
|
-
const itemA = a6[
|
|
8641
|
-
const itemB = b10[
|
|
8639
|
+
for (let index3 = 0; index3 < a6.length; index3++) {
|
|
8640
|
+
const itemA = a6[index3];
|
|
8641
|
+
const itemB = b10[index3];
|
|
8642
8642
|
const sharedValue = mergeValues2(itemA, itemB);
|
|
8643
8643
|
if (!sharedValue.valid) {
|
|
8644
8644
|
return { valid: false };
|
|
@@ -10585,10 +10585,10 @@ var init_types = __esm({
|
|
|
10585
10585
|
// }) as any;
|
|
10586
10586
|
// return merged;
|
|
10587
10587
|
// }
|
|
10588
|
-
catchall(
|
|
10588
|
+
catchall(index3) {
|
|
10589
10589
|
return new _ZodObject({
|
|
10590
10590
|
...this._def,
|
|
10591
|
-
catchall:
|
|
10591
|
+
catchall: index3
|
|
10592
10592
|
});
|
|
10593
10593
|
}
|
|
10594
10594
|
pick(mask) {
|
|
@@ -11076,10 +11076,10 @@ var init_types = __esm({
|
|
|
11076
11076
|
}
|
|
11077
11077
|
const keyType = this._def.keyType;
|
|
11078
11078
|
const valueType = this._def.valueType;
|
|
11079
|
-
const pairs = [...ctx.data.entries()].map(([key, value],
|
|
11079
|
+
const pairs = [...ctx.data.entries()].map(([key, value], index3) => {
|
|
11080
11080
|
return {
|
|
11081
|
-
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [
|
|
11082
|
-
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [
|
|
11081
|
+
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index3, "key"])),
|
|
11082
|
+
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index3, "value"]))
|
|
11083
11083
|
};
|
|
11084
11084
|
});
|
|
11085
11085
|
if (ctx.common.async) {
|
|
@@ -30918,7 +30918,7 @@ __export(openai_codex_exports, {
|
|
|
30918
30918
|
import { homedir as homedir2 } from "node:os";
|
|
30919
30919
|
import { join as join5 } from "node:path";
|
|
30920
30920
|
function getOpenAICodexInstallSkillsDir(home = homedir2()) {
|
|
30921
|
-
const codexHome = process.env.CODEX_HOME
|
|
30921
|
+
const codexHome = process.env.CODEX_HOME || join5(home, ".codex");
|
|
30922
30922
|
return join5(codexHome, "skills");
|
|
30923
30923
|
}
|
|
30924
30924
|
function discoverCodexSkills(workspaceDir) {
|
|
@@ -31205,7 +31205,7 @@ function toTomlValue(value, path3) {
|
|
|
31205
31205
|
} else if (typeof value === "boolean") {
|
|
31206
31206
|
return value ? "true" : "false";
|
|
31207
31207
|
} else if (Array.isArray(value)) {
|
|
31208
|
-
const rendered = value.map((item,
|
|
31208
|
+
const rendered = value.map((item, index3) => toTomlValue(item, `${path3}[${index3}]`));
|
|
31209
31209
|
return `[${rendered.join(", ")}]`;
|
|
31210
31210
|
} else if (isPlainObject3(value)) {
|
|
31211
31211
|
const parts = [];
|
|
@@ -31600,7 +31600,7 @@ function resolveCodexBinary() {
|
|
|
31600
31600
|
}
|
|
31601
31601
|
}
|
|
31602
31602
|
function getCodexInstallSkillsDir(home = homedir3()) {
|
|
31603
|
-
const codexHome = process.env.CODEX_HOME
|
|
31603
|
+
const codexHome = process.env.CODEX_HOME || join6(home, ".codex");
|
|
31604
31604
|
return join6(codexHome, "skills");
|
|
31605
31605
|
}
|
|
31606
31606
|
function discoverCodexSkills2(workspaceDir) {
|
|
@@ -33017,8 +33017,8 @@ var require_react_production = __commonJS({
|
|
|
33017
33017
|
});
|
|
33018
33018
|
}
|
|
33019
33019
|
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
33020
|
-
function getElementKey(element,
|
|
33021
|
-
return "object" === typeof element && null !== element && null != element.key ? escape3("" + element.key) :
|
|
33020
|
+
function getElementKey(element, index3) {
|
|
33021
|
+
return "object" === typeof element && null !== element && null != element.key ? escape3("" + element.key) : index3.toString(36);
|
|
33022
33022
|
}
|
|
33023
33023
|
function resolveThenable(thenable) {
|
|
33024
33024
|
switch (thenable.status) {
|
|
@@ -33591,8 +33591,8 @@ var require_react_development = __commonJS({
|
|
|
33591
33591
|
return escaperLookup[match];
|
|
33592
33592
|
});
|
|
33593
33593
|
}
|
|
33594
|
-
function getElementKey(element,
|
|
33595
|
-
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape3("" + element.key)) :
|
|
33594
|
+
function getElementKey(element, index3) {
|
|
33595
|
+
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape3("" + element.key)) : index3.toString(36);
|
|
33596
33596
|
}
|
|
33597
33597
|
function resolveThenable(thenable) {
|
|
33598
33598
|
switch (thenable.status) {
|
|
@@ -34362,8 +34362,8 @@ var require_lucide_react = __commonJS({
|
|
|
34362
34362
|
}
|
|
34363
34363
|
return false;
|
|
34364
34364
|
};
|
|
34365
|
-
var mergeClasses = (...classes) => classes.filter((className,
|
|
34366
|
-
return Boolean(className) && className.trim() !== "" && array3.indexOf(className) ===
|
|
34365
|
+
var mergeClasses = (...classes) => classes.filter((className, index4, array3) => {
|
|
34366
|
+
return Boolean(className) && className.trim() !== "" && array3.indexOf(className) === index4;
|
|
34367
34367
|
}).join(" ").trim();
|
|
34368
34368
|
var toCamelCase2 = (string5) => string5.replace(
|
|
34369
34369
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
@@ -51329,7 +51329,7 @@ var require_lucide_react = __commonJS({
|
|
|
51329
51329
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
51330
51330
|
];
|
|
51331
51331
|
var ZoomOut = createLucideIcon("zoom-out", __iconNode);
|
|
51332
|
-
var
|
|
51332
|
+
var index3 = /* @__PURE__ */ Object.freeze({
|
|
51333
51333
|
__proto__: null,
|
|
51334
51334
|
AArrowDown,
|
|
51335
51335
|
AArrowUp,
|
|
@@ -58874,7 +58874,7 @@ var require_lucide_react = __commonJS({
|
|
|
58874
58874
|
exports.ZoomOut = ZoomOut;
|
|
58875
58875
|
exports.ZoomOutIcon = ZoomOut;
|
|
58876
58876
|
exports.createLucideIcon = createLucideIcon;
|
|
58877
|
-
exports.icons =
|
|
58877
|
+
exports.icons = index3;
|
|
58878
58878
|
}
|
|
58879
58879
|
});
|
|
58880
58880
|
|
|
@@ -61701,11 +61701,11 @@ function addSection(sections, len, ins, forceJoin = false) {
|
|
|
61701
61701
|
function addInsert(values, sections, value) {
|
|
61702
61702
|
if (value.length == 0)
|
|
61703
61703
|
return;
|
|
61704
|
-
let
|
|
61705
|
-
if (
|
|
61704
|
+
let index3 = sections.length - 2 >> 1;
|
|
61705
|
+
if (index3 < values.length) {
|
|
61706
61706
|
values[values.length - 1] = values[values.length - 1].append(value);
|
|
61707
61707
|
} else {
|
|
61708
|
-
while (values.length <
|
|
61708
|
+
while (values.length < index3)
|
|
61709
61709
|
values.push(Text.empty);
|
|
61710
61710
|
values.push(value);
|
|
61711
61711
|
}
|
|
@@ -62127,9 +62127,9 @@ function findSharedChunks(a6, b10, textDiff) {
|
|
|
62127
62127
|
}
|
|
62128
62128
|
return shared2;
|
|
62129
62129
|
}
|
|
62130
|
-
function heapBubble(heap,
|
|
62131
|
-
for (let cur = heap[
|
|
62132
|
-
let childIndex = (
|
|
62130
|
+
function heapBubble(heap, index3) {
|
|
62131
|
+
for (let cur = heap[index3]; ; ) {
|
|
62132
|
+
let childIndex = (index3 << 1) + 1;
|
|
62133
62133
|
if (childIndex >= heap.length)
|
|
62134
62134
|
break;
|
|
62135
62135
|
let child = heap[childIndex];
|
|
@@ -62140,8 +62140,8 @@ function heapBubble(heap, index2) {
|
|
|
62140
62140
|
if (cur.compare(child) < 0)
|
|
62141
62141
|
break;
|
|
62142
62142
|
heap[childIndex] = cur;
|
|
62143
|
-
heap[
|
|
62144
|
-
|
|
62143
|
+
heap[index3] = child;
|
|
62144
|
+
index3 = childIndex;
|
|
62145
62145
|
}
|
|
62146
62146
|
}
|
|
62147
62147
|
function compare(a6, startA, b10, startB, length, comparator) {
|
|
@@ -62183,15 +62183,15 @@ function sameValues(a6, b10) {
|
|
|
62183
62183
|
return false;
|
|
62184
62184
|
return true;
|
|
62185
62185
|
}
|
|
62186
|
-
function remove(array3,
|
|
62187
|
-
for (let i2 =
|
|
62186
|
+
function remove(array3, index3) {
|
|
62187
|
+
for (let i2 = index3, e2 = array3.length - 1; i2 < e2; i2++)
|
|
62188
62188
|
array3[i2] = array3[i2 + 1];
|
|
62189
62189
|
array3.pop();
|
|
62190
62190
|
}
|
|
62191
|
-
function insert(array3,
|
|
62192
|
-
for (let i2 = array3.length - 1; i2 >=
|
|
62191
|
+
function insert(array3, index3, value) {
|
|
62192
|
+
for (let i2 = array3.length - 1; i2 >= index3; i2--)
|
|
62193
62193
|
array3[i2 + 1] = array3[i2];
|
|
62194
|
-
array3[
|
|
62194
|
+
array3[index3] = value;
|
|
62195
62195
|
}
|
|
62196
62196
|
function findMinIndex(value, array3) {
|
|
62197
62197
|
let found = -1, foundPos = 1e9;
|
|
@@ -62944,8 +62944,8 @@ var init_dist3 = __esm({
|
|
|
62944
62944
|
if (ins >= 0) {
|
|
62945
62945
|
sections[i2] = ins;
|
|
62946
62946
|
sections[i2 + 1] = len;
|
|
62947
|
-
let
|
|
62948
|
-
while (inserted.length <
|
|
62947
|
+
let index3 = i2 >> 1;
|
|
62948
|
+
while (inserted.length < index3)
|
|
62949
62949
|
inserted.push(Text.empty);
|
|
62950
62950
|
inserted.push(len ? doc2.slice(pos, pos + len) : Text.empty);
|
|
62951
62951
|
}
|
|
@@ -63159,12 +63159,12 @@ var init_dist3 = __esm({
|
|
|
63159
63159
|
return this.ins < 0 ? this.len : this.ins;
|
|
63160
63160
|
}
|
|
63161
63161
|
get text() {
|
|
63162
|
-
let { inserted } = this.set,
|
|
63163
|
-
return
|
|
63162
|
+
let { inserted } = this.set, index3 = this.i - 2 >> 1;
|
|
63163
|
+
return index3 >= inserted.length ? Text.empty : inserted[index3];
|
|
63164
63164
|
}
|
|
63165
63165
|
textBit(len) {
|
|
63166
|
-
let { inserted } = this.set,
|
|
63167
|
-
return
|
|
63166
|
+
let { inserted } = this.set, index3 = this.i - 2 >> 1;
|
|
63167
|
+
return index3 >= inserted.length && !len ? Text.empty : inserted[index3].slice(this.off, len == null ? void 0 : this.off + len);
|
|
63168
63168
|
}
|
|
63169
63169
|
forward(len) {
|
|
63170
63170
|
if (len == this.len)
|
|
@@ -64414,8 +64414,8 @@ var init_dist3 = __esm({
|
|
|
64414
64414
|
/**
|
|
64415
64415
|
@internal
|
|
64416
64416
|
*/
|
|
64417
|
-
chunkEnd(
|
|
64418
|
-
return this.chunkPos[
|
|
64417
|
+
chunkEnd(index3) {
|
|
64418
|
+
return this.chunkPos[index3] + this.chunk[index3].length;
|
|
64419
64419
|
}
|
|
64420
64420
|
/**
|
|
64421
64421
|
Update the range set, optionally adding new ranges or filtering
|
|
@@ -64763,8 +64763,8 @@ var init_dist3 = __esm({
|
|
|
64763
64763
|
}
|
|
64764
64764
|
}
|
|
64765
64765
|
}
|
|
64766
|
-
setRangeIndex(
|
|
64767
|
-
if (
|
|
64766
|
+
setRangeIndex(index3) {
|
|
64767
|
+
if (index3 == this.layer.chunk[this.chunkIndex].value.length) {
|
|
64768
64768
|
this.chunkIndex++;
|
|
64769
64769
|
if (this.skip) {
|
|
64770
64770
|
while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))
|
|
@@ -64772,7 +64772,7 @@ var init_dist3 = __esm({
|
|
|
64772
64772
|
}
|
|
64773
64773
|
this.rangeIndex = 0;
|
|
64774
64774
|
} else {
|
|
64775
|
-
this.rangeIndex =
|
|
64775
|
+
this.rangeIndex = index3;
|
|
64776
64776
|
}
|
|
64777
64777
|
}
|
|
64778
64778
|
nextChunk() {
|
|
@@ -64864,10 +64864,10 @@ var init_dist3 = __esm({
|
|
|
64864
64864
|
this.removeActive(this.minActive);
|
|
64865
64865
|
this.cursor.forward(pos, side);
|
|
64866
64866
|
}
|
|
64867
|
-
removeActive(
|
|
64868
|
-
remove(this.active,
|
|
64869
|
-
remove(this.activeTo,
|
|
64870
|
-
remove(this.activeRank,
|
|
64867
|
+
removeActive(index3) {
|
|
64868
|
+
remove(this.active, index3);
|
|
64869
|
+
remove(this.activeTo, index3);
|
|
64870
|
+
remove(this.activeRank, index3);
|
|
64871
64871
|
this.minActive = findMinIndex(this.active, this.activeTo);
|
|
64872
64872
|
}
|
|
64873
64873
|
addActive(trackOpen) {
|
|
@@ -65051,18 +65051,18 @@ var init_style_mod = __esm({
|
|
|
65051
65051
|
let sheet = this.sheet;
|
|
65052
65052
|
let pos = 0, j = 0;
|
|
65053
65053
|
for (let i2 = 0; i2 < modules.length; i2++) {
|
|
65054
|
-
let mod = modules[i2],
|
|
65055
|
-
if (
|
|
65056
|
-
this.modules.splice(
|
|
65054
|
+
let mod = modules[i2], index3 = this.modules.indexOf(mod);
|
|
65055
|
+
if (index3 < j && index3 > -1) {
|
|
65056
|
+
this.modules.splice(index3, 1);
|
|
65057
65057
|
j--;
|
|
65058
|
-
|
|
65058
|
+
index3 = -1;
|
|
65059
65059
|
}
|
|
65060
|
-
if (
|
|
65060
|
+
if (index3 == -1) {
|
|
65061
65061
|
this.modules.splice(j++, 0, mod);
|
|
65062
65062
|
if (sheet) for (let k4 = 0; k4 < mod.rules.length; k4++)
|
|
65063
65063
|
sheet.insertRule(mod.rules[k4], pos++);
|
|
65064
65064
|
} else {
|
|
65065
|
-
while (j <
|
|
65065
|
+
while (j < index3) pos += this.modules[j++].rules.length;
|
|
65066
65066
|
pos += mod.rules.length;
|
|
65067
65067
|
j++;
|
|
65068
65068
|
}
|
|
@@ -65315,10 +65315,10 @@ function isEquivalentPosition(node, off, targetNode, targetOff) {
|
|
|
65315
65315
|
return targetNode ? scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1) : false;
|
|
65316
65316
|
}
|
|
65317
65317
|
function domIndex(node) {
|
|
65318
|
-
for (var
|
|
65318
|
+
for (var index3 = 0; ; index3++) {
|
|
65319
65319
|
node = node.previousSibling;
|
|
65320
65320
|
if (!node)
|
|
65321
|
-
return
|
|
65321
|
+
return index3;
|
|
65322
65322
|
}
|
|
65323
65323
|
}
|
|
65324
65324
|
function isBlockElement(node) {
|
|
@@ -67388,14 +67388,14 @@ var init_dist4 = __esm({
|
|
|
67388
67388
|
/**
|
|
67389
67389
|
@internal
|
|
67390
67390
|
*/
|
|
67391
|
-
static find(order,
|
|
67391
|
+
static find(order, index3, level, assoc) {
|
|
67392
67392
|
let maybe = -1;
|
|
67393
67393
|
for (let i2 = 0; i2 < order.length; i2++) {
|
|
67394
67394
|
let span = order[i2];
|
|
67395
|
-
if (span.from <=
|
|
67395
|
+
if (span.from <= index3 && span.to >= index3) {
|
|
67396
67396
|
if (span.level == level)
|
|
67397
67397
|
return i2;
|
|
67398
|
-
if (maybe < 0 || (assoc != 0 ? assoc < 0 ? span.from <
|
|
67398
|
+
if (maybe < 0 || (assoc != 0 ? assoc < 0 ? span.from < index3 : span.to > index3 : order[maybe].level > span.level))
|
|
67399
67399
|
maybe = i2;
|
|
67400
67400
|
}
|
|
67401
67401
|
}
|
|
@@ -67772,9 +67772,9 @@ var init_dist4 = __esm({
|
|
|
67772
67772
|
return null;
|
|
67773
67773
|
}
|
|
67774
67774
|
domPosFor(off, side) {
|
|
67775
|
-
let
|
|
67775
|
+
let index3 = domIndex(this.dom);
|
|
67776
67776
|
let after = this.length ? off > 0 : side > 0;
|
|
67777
|
-
return new DOMPos(this.parent.dom,
|
|
67777
|
+
return new DOMPos(this.parent.dom, index3 + (after ? 1 : 0), off == 0 || off == this.length);
|
|
67778
67778
|
}
|
|
67779
67779
|
markDirty(attrs) {
|
|
67780
67780
|
this.flags &= ~2;
|
|
@@ -68174,21 +68174,21 @@ var init_dist4 = __esm({
|
|
|
68174
68174
|
// has been traversed. When side is 1, leave, enter, or skip
|
|
68175
68175
|
// everything at the end position.
|
|
68176
68176
|
advance(dist2, side, walker) {
|
|
68177
|
-
let { tile, index:
|
|
68177
|
+
let { tile, index: index3, beforeBreak, parents } = this;
|
|
68178
68178
|
while (dist2 || side > 0) {
|
|
68179
68179
|
if (!tile.isComposite()) {
|
|
68180
|
-
if (
|
|
68180
|
+
if (index3 == tile.length) {
|
|
68181
68181
|
beforeBreak = !!tile.breakAfter;
|
|
68182
|
-
({ tile, index:
|
|
68183
|
-
|
|
68182
|
+
({ tile, index: index3 } = parents.pop());
|
|
68183
|
+
index3++;
|
|
68184
68184
|
} else if (!dist2) {
|
|
68185
68185
|
break;
|
|
68186
68186
|
} else {
|
|
68187
|
-
let take = Math.min(dist2, tile.length -
|
|
68187
|
+
let take = Math.min(dist2, tile.length - index3);
|
|
68188
68188
|
if (walker)
|
|
68189
|
-
walker.skip(tile,
|
|
68189
|
+
walker.skip(tile, index3, index3 + take);
|
|
68190
68190
|
dist2 -= take;
|
|
68191
|
-
|
|
68191
|
+
index3 += take;
|
|
68192
68192
|
}
|
|
68193
68193
|
} else if (beforeBreak) {
|
|
68194
68194
|
if (!dist2)
|
|
@@ -68197,31 +68197,31 @@ var init_dist4 = __esm({
|
|
|
68197
68197
|
walker.break();
|
|
68198
68198
|
dist2--;
|
|
68199
68199
|
beforeBreak = false;
|
|
68200
|
-
} else if (
|
|
68200
|
+
} else if (index3 == tile.children.length) {
|
|
68201
68201
|
if (!dist2 && !parents.length)
|
|
68202
68202
|
break;
|
|
68203
68203
|
if (walker)
|
|
68204
68204
|
walker.leave(tile);
|
|
68205
68205
|
beforeBreak = !!tile.breakAfter;
|
|
68206
|
-
({ tile, index:
|
|
68207
|
-
|
|
68206
|
+
({ tile, index: index3 } = parents.pop());
|
|
68207
|
+
index3++;
|
|
68208
68208
|
} else {
|
|
68209
|
-
let next = tile.children[
|
|
68209
|
+
let next = tile.children[index3], brk = next.breakAfter;
|
|
68210
68210
|
if ((side > 0 ? next.length <= dist2 : next.length < dist2) && (!walker || walker.skip(next, 0, next.length) !== false || !next.isComposite)) {
|
|
68211
68211
|
beforeBreak = !!brk;
|
|
68212
|
-
|
|
68212
|
+
index3++;
|
|
68213
68213
|
dist2 -= next.length;
|
|
68214
68214
|
} else {
|
|
68215
|
-
parents.push({ tile, index:
|
|
68215
|
+
parents.push({ tile, index: index3 });
|
|
68216
68216
|
tile = next;
|
|
68217
|
-
|
|
68217
|
+
index3 = 0;
|
|
68218
68218
|
if (walker && next.isComposite())
|
|
68219
68219
|
walker.enter(next);
|
|
68220
68220
|
}
|
|
68221
68221
|
}
|
|
68222
68222
|
}
|
|
68223
68223
|
this.tile = tile;
|
|
68224
|
-
this.index =
|
|
68224
|
+
this.index = index3;
|
|
68225
68225
|
this.beforeBreak = beforeBreak;
|
|
68226
68226
|
return this;
|
|
68227
68227
|
}
|
|
@@ -68518,10 +68518,10 @@ var init_dist4 = __esm({
|
|
|
68518
68518
|
let i2 = cls.bucket;
|
|
68519
68519
|
let bucket = this.buckets[i2], off = this.index[i2];
|
|
68520
68520
|
for (let j = bucket.length - 1; j >= 0; j--) {
|
|
68521
|
-
let
|
|
68521
|
+
let index3 = (j + off) % bucket.length, tile = bucket[index3];
|
|
68522
68522
|
if ((!test || test(tile)) && !this.reused.has(tile)) {
|
|
68523
|
-
bucket.splice(
|
|
68524
|
-
if (
|
|
68523
|
+
bucket.splice(index3, 1);
|
|
68524
|
+
if (index3 < off)
|
|
68525
68525
|
this.index[i2]--;
|
|
68526
68526
|
this.reused.set(tile, type);
|
|
68527
68527
|
return tile;
|
|
@@ -68723,9 +68723,9 @@ var init_dist4 = __esm({
|
|
|
68723
68723
|
let pendingLineAttrs = null;
|
|
68724
68724
|
let b10 = this.builder, markCount = 0;
|
|
68725
68725
|
let openEnd = RangeSet.spans(this.decorations, from, to, {
|
|
68726
|
-
point: (from2, to2, deco, active, openStart,
|
|
68726
|
+
point: (from2, to2, deco, active, openStart, index3) => {
|
|
68727
68727
|
if (deco instanceof PointDecoration) {
|
|
68728
|
-
if (this.disallowBlockEffectsFor[
|
|
68728
|
+
if (this.disallowBlockEffectsFor[index3]) {
|
|
68729
68729
|
if (deco.block)
|
|
68730
68730
|
throw new RangeError("Block decorations may not be specified via plugins");
|
|
68731
68731
|
if (to2 > this.view.state.doc.lineAt(from2).to)
|
|
@@ -73525,9 +73525,9 @@ function buildTree(data) {
|
|
|
73525
73525
|
let startPos = start - parentStart;
|
|
73526
73526
|
if (end - start <= maxBufferLength && (buffer2 = findBufferSize(cursor.pos - minPos, inRepeat))) {
|
|
73527
73527
|
let data2 = new Uint16Array(buffer2.size - buffer2.skip);
|
|
73528
|
-
let endPos = cursor.pos - buffer2.size,
|
|
73528
|
+
let endPos = cursor.pos - buffer2.size, index3 = data2.length;
|
|
73529
73529
|
while (cursor.pos > endPos)
|
|
73530
|
-
|
|
73530
|
+
index3 = copyToBuffer(buffer2.start, data2, index3);
|
|
73531
73531
|
node = new TreeBuffer(data2, end - buffer2.start, nodeSet);
|
|
73532
73532
|
startPos = buffer2.start - parentStart;
|
|
73533
73533
|
} else {
|
|
@@ -73669,26 +73669,26 @@ function buildTree(data) {
|
|
|
73669
73669
|
}
|
|
73670
73670
|
return result.size > 4 ? result : void 0;
|
|
73671
73671
|
}
|
|
73672
|
-
function copyToBuffer(bufferStart, buffer2,
|
|
73672
|
+
function copyToBuffer(bufferStart, buffer2, index3) {
|
|
73673
73673
|
let { id, start, end, size: size4 } = cursor;
|
|
73674
73674
|
cursor.next();
|
|
73675
73675
|
if (size4 >= 0 && id < minRepeatType) {
|
|
73676
|
-
let startIndex =
|
|
73676
|
+
let startIndex = index3;
|
|
73677
73677
|
if (size4 > 4) {
|
|
73678
73678
|
let endPos = cursor.pos - (size4 - 4);
|
|
73679
73679
|
while (cursor.pos > endPos)
|
|
73680
|
-
|
|
73680
|
+
index3 = copyToBuffer(bufferStart, buffer2, index3);
|
|
73681
73681
|
}
|
|
73682
|
-
buffer2[--
|
|
73683
|
-
buffer2[--
|
|
73684
|
-
buffer2[--
|
|
73685
|
-
buffer2[--
|
|
73682
|
+
buffer2[--index3] = startIndex;
|
|
73683
|
+
buffer2[--index3] = end - bufferStart;
|
|
73684
|
+
buffer2[--index3] = start - bufferStart;
|
|
73685
|
+
buffer2[--index3] = id;
|
|
73686
73686
|
} else if (size4 == -3) {
|
|
73687
73687
|
contextHash = id;
|
|
73688
73688
|
} else if (size4 == -4) {
|
|
73689
73689
|
lookAhead = id;
|
|
73690
73690
|
}
|
|
73691
|
-
return
|
|
73691
|
+
return index3;
|
|
73692
73692
|
}
|
|
73693
73693
|
let children = [], positions = [];
|
|
73694
73694
|
while (cursor.pos > 0)
|
|
@@ -74094,9 +74094,9 @@ var init_dist5 = __esm({
|
|
|
74094
74094
|
};
|
|
74095
74095
|
Tree.empty = new Tree(NodeType.none, [], [], 0);
|
|
74096
74096
|
FlatBufferCursor = class _FlatBufferCursor {
|
|
74097
|
-
constructor(buffer,
|
|
74097
|
+
constructor(buffer, index3) {
|
|
74098
74098
|
this.buffer = buffer;
|
|
74099
|
-
this.index =
|
|
74099
|
+
this.index = index3;
|
|
74100
74100
|
}
|
|
74101
74101
|
get id() {
|
|
74102
74102
|
return this.buffer[this.index - 4];
|
|
@@ -74140,27 +74140,27 @@ var init_dist5 = __esm({
|
|
|
74140
74140
|
*/
|
|
74141
74141
|
toString() {
|
|
74142
74142
|
let result = [];
|
|
74143
|
-
for (let
|
|
74144
|
-
result.push(this.childString(
|
|
74145
|
-
|
|
74143
|
+
for (let index3 = 0; index3 < this.buffer.length; ) {
|
|
74144
|
+
result.push(this.childString(index3));
|
|
74145
|
+
index3 = this.buffer[index3 + 3];
|
|
74146
74146
|
}
|
|
74147
74147
|
return result.join(",");
|
|
74148
74148
|
}
|
|
74149
74149
|
/**
|
|
74150
74150
|
@internal
|
|
74151
74151
|
*/
|
|
74152
|
-
childString(
|
|
74153
|
-
let id = this.buffer[
|
|
74152
|
+
childString(index3) {
|
|
74153
|
+
let id = this.buffer[index3], endIndex = this.buffer[index3 + 3];
|
|
74154
74154
|
let type = this.set.types[id], result = type.name;
|
|
74155
74155
|
if (/\W/.test(result) && !type.isError)
|
|
74156
74156
|
result = JSON.stringify(result);
|
|
74157
|
-
|
|
74158
|
-
if (endIndex ==
|
|
74157
|
+
index3 += 4;
|
|
74158
|
+
if (endIndex == index3)
|
|
74159
74159
|
return result;
|
|
74160
74160
|
let children = [];
|
|
74161
|
-
while (
|
|
74162
|
-
children.push(this.childString(
|
|
74163
|
-
|
|
74161
|
+
while (index3 < endIndex) {
|
|
74162
|
+
children.push(this.childString(index3));
|
|
74163
|
+
index3 = this.buffer[index3 + 3];
|
|
74164
74164
|
}
|
|
74165
74165
|
return result + "(" + children.join(",") + ")";
|
|
74166
74166
|
}
|
|
@@ -74237,11 +74237,11 @@ var init_dist5 = __esm({
|
|
|
74237
74237
|
}
|
|
74238
74238
|
};
|
|
74239
74239
|
TreeNode = class _TreeNode extends BaseNode {
|
|
74240
|
-
constructor(_tree, from,
|
|
74240
|
+
constructor(_tree, from, index3, _parent) {
|
|
74241
74241
|
super();
|
|
74242
74242
|
this._tree = _tree;
|
|
74243
74243
|
this.from = from;
|
|
74244
|
-
this.index =
|
|
74244
|
+
this.index = index3;
|
|
74245
74245
|
this._parent = _parent;
|
|
74246
74246
|
}
|
|
74247
74247
|
get type() {
|
|
@@ -74262,9 +74262,9 @@ var init_dist5 = __esm({
|
|
|
74262
74262
|
if (next instanceof TreeBuffer) {
|
|
74263
74263
|
if (mode & IterMode.ExcludeBuffers)
|
|
74264
74264
|
continue;
|
|
74265
|
-
let
|
|
74266
|
-
if (
|
|
74267
|
-
return new BufferNode(new BufferContext(parent, next, i2, start), null,
|
|
74265
|
+
let index3 = next.findChild(0, next.buffer.length, dir, pos - start, side);
|
|
74266
|
+
if (index3 > -1)
|
|
74267
|
+
return new BufferNode(new BufferContext(parent, next, i2, start), null, index3);
|
|
74268
74268
|
} else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
|
|
74269
74269
|
let mounted2;
|
|
74270
74270
|
if (!(mode & IterMode.IgnoreMounts) && (mounted2 = MountedTree.get(next)) && !mounted2.overlay)
|
|
@@ -74375,10 +74375,10 @@ var init_dist5 = __esm({
|
|
|
74375
74375
|
}
|
|
74376
74376
|
};
|
|
74377
74377
|
BufferContext = class {
|
|
74378
|
-
constructor(parent, buffer,
|
|
74378
|
+
constructor(parent, buffer, index3, start) {
|
|
74379
74379
|
this.parent = parent;
|
|
74380
74380
|
this.buffer = buffer;
|
|
74381
|
-
this.index =
|
|
74381
|
+
this.index = index3;
|
|
74382
74382
|
this.start = start;
|
|
74383
74383
|
}
|
|
74384
74384
|
};
|
|
@@ -74392,17 +74392,17 @@ var init_dist5 = __esm({
|
|
|
74392
74392
|
get to() {
|
|
74393
74393
|
return this.context.start + this.context.buffer.buffer[this.index + 2];
|
|
74394
74394
|
}
|
|
74395
|
-
constructor(context, _parent,
|
|
74395
|
+
constructor(context, _parent, index3) {
|
|
74396
74396
|
super();
|
|
74397
74397
|
this.context = context;
|
|
74398
74398
|
this._parent = _parent;
|
|
74399
|
-
this.index =
|
|
74400
|
-
this.type = context.buffer.set.types[context.buffer.buffer[
|
|
74399
|
+
this.index = index3;
|
|
74400
|
+
this.type = context.buffer.set.types[context.buffer.buffer[index3]];
|
|
74401
74401
|
}
|
|
74402
74402
|
child(dir, pos, side) {
|
|
74403
74403
|
let { buffer } = this.context;
|
|
74404
|
-
let
|
|
74405
|
-
return
|
|
74404
|
+
let index3 = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.context.start, side);
|
|
74405
|
+
return index3 < 0 ? null : new _BufferNode(this.context, this, index3);
|
|
74406
74406
|
}
|
|
74407
74407
|
get firstChild() {
|
|
74408
74408
|
return this.child(
|
|
@@ -74443,8 +74443,8 @@ var init_dist5 = __esm({
|
|
|
74443
74443
|
if (mode & IterMode.ExcludeBuffers)
|
|
74444
74444
|
return null;
|
|
74445
74445
|
let { buffer } = this.context;
|
|
74446
|
-
let
|
|
74447
|
-
return
|
|
74446
|
+
let index3 = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], side > 0 ? 1 : -1, pos - this.context.start, side);
|
|
74447
|
+
return index3 < 0 ? null : new _BufferNode(this.context, this, index3);
|
|
74448
74448
|
}
|
|
74449
74449
|
get parent() {
|
|
74450
74450
|
return this._parent || this.context.parent.nextSignificantParent();
|
|
@@ -74545,12 +74545,12 @@ var init_dist5 = __esm({
|
|
|
74545
74545
|
this.to = node.to;
|
|
74546
74546
|
return true;
|
|
74547
74547
|
}
|
|
74548
|
-
yieldBuf(
|
|
74549
|
-
this.index =
|
|
74548
|
+
yieldBuf(index3, type) {
|
|
74549
|
+
this.index = index3;
|
|
74550
74550
|
let { start, buffer } = this.buffer;
|
|
74551
|
-
this.type = type || buffer.set.types[buffer.buffer[
|
|
74552
|
-
this.from = start + buffer.buffer[
|
|
74553
|
-
this.to = start + buffer.buffer[
|
|
74551
|
+
this.type = type || buffer.set.types[buffer.buffer[index3]];
|
|
74552
|
+
this.from = start + buffer.buffer[index3 + 1];
|
|
74553
|
+
this.to = start + buffer.buffer[index3 + 2];
|
|
74554
74554
|
return true;
|
|
74555
74555
|
}
|
|
74556
74556
|
/**
|
|
@@ -74579,11 +74579,11 @@ var init_dist5 = __esm({
|
|
|
74579
74579
|
if (!this.buffer)
|
|
74580
74580
|
return this.yield(this._tree.nextChild(dir < 0 ? this._tree._tree.children.length - 1 : 0, dir, pos, side, this.mode));
|
|
74581
74581
|
let { buffer } = this.buffer;
|
|
74582
|
-
let
|
|
74583
|
-
if (
|
|
74582
|
+
let index3 = buffer.findChild(this.index + 4, buffer.buffer[this.index + 3], dir, pos - this.buffer.start, side);
|
|
74583
|
+
if (index3 < 0)
|
|
74584
74584
|
return false;
|
|
74585
74585
|
this.stack.push(this.index);
|
|
74586
|
-
return this.yieldBuf(
|
|
74586
|
+
return this.yieldBuf(index3);
|
|
74587
74587
|
}
|
|
74588
74588
|
/**
|
|
74589
74589
|
Move the cursor to this node's first child. When this returns
|
|
@@ -74692,7 +74692,7 @@ var init_dist5 = __esm({
|
|
|
74692
74692
|
return this.sibling(-1);
|
|
74693
74693
|
}
|
|
74694
74694
|
atLastNode(dir) {
|
|
74695
|
-
let
|
|
74695
|
+
let index3, parent, { buffer } = this;
|
|
74696
74696
|
if (buffer) {
|
|
74697
74697
|
if (dir > 0) {
|
|
74698
74698
|
if (this.index < buffer.buffer.buffer.length)
|
|
@@ -74702,13 +74702,13 @@ var init_dist5 = __esm({
|
|
|
74702
74702
|
if (buffer.buffer.buffer[i2 + 3] < this.index)
|
|
74703
74703
|
return false;
|
|
74704
74704
|
}
|
|
74705
|
-
({ index:
|
|
74705
|
+
({ index: index3, parent } = buffer);
|
|
74706
74706
|
} else {
|
|
74707
|
-
({ index:
|
|
74707
|
+
({ index: index3, _parent: parent } = this._tree);
|
|
74708
74708
|
}
|
|
74709
|
-
for (; parent; { index:
|
|
74710
|
-
if (
|
|
74711
|
-
for (let i2 =
|
|
74709
|
+
for (; parent; { index: index3, _parent: parent } = parent) {
|
|
74710
|
+
if (index3 > -1)
|
|
74711
|
+
for (let i2 = index3 + dir, e2 = dir < 0 ? -1 : parent._tree.children.length; i2 != e2; i2 += dir) {
|
|
74712
74712
|
let child = parent._tree.children[i2];
|
|
74713
74713
|
if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
|
|
74714
74714
|
return false;
|
|
@@ -74772,16 +74772,16 @@ var init_dist5 = __esm({
|
|
|
74772
74772
|
return this._tree;
|
|
74773
74773
|
let cache = this.bufferNode, result = null, depth = 0;
|
|
74774
74774
|
if (cache && cache.context == this.buffer) {
|
|
74775
|
-
scan: for (let
|
|
74775
|
+
scan: for (let index3 = this.index, d = this.stack.length; d >= 0; ) {
|
|
74776
74776
|
for (let c2 = cache; c2; c2 = c2._parent)
|
|
74777
|
-
if (c2.index ==
|
|
74778
|
-
if (
|
|
74777
|
+
if (c2.index == index3) {
|
|
74778
|
+
if (index3 == this.index)
|
|
74779
74779
|
return c2;
|
|
74780
74780
|
result = c2;
|
|
74781
74781
|
depth = d + 1;
|
|
74782
74782
|
break scan;
|
|
74783
74783
|
}
|
|
74784
|
-
|
|
74784
|
+
index3 = this.stack[--d];
|
|
74785
74785
|
}
|
|
74786
74786
|
}
|
|
74787
74787
|
for (let i2 = depth; i2 < this.stack.length; i2++)
|
|
@@ -78412,8 +78412,8 @@ var require_core_cjs_development = __commonJS({
|
|
|
78412
78412
|
const rect = droppableRects.get(id);
|
|
78413
78413
|
if (rect) {
|
|
78414
78414
|
const rectCorners = cornersOfRectangle(rect);
|
|
78415
|
-
const distances = corners.reduce((accumulator, corner,
|
|
78416
|
-
return accumulator + distanceBetween(rectCorners[
|
|
78415
|
+
const distances = corners.reduce((accumulator, corner, index3) => {
|
|
78416
|
+
return accumulator + distanceBetween(rectCorners[index3], corner);
|
|
78417
78417
|
}, 0);
|
|
78418
78418
|
const effectiveDistance = Number((distances / 4).toFixed(4));
|
|
78419
78419
|
collisions.push({
|
|
@@ -79614,8 +79614,8 @@ var require_core_cjs_development = __commonJS({
|
|
|
79614
79614
|
if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {
|
|
79615
79615
|
continue;
|
|
79616
79616
|
}
|
|
79617
|
-
const
|
|
79618
|
-
const scrollContainerRect = scrollableAncestorRects[
|
|
79617
|
+
const index3 = scrollableAncestors.indexOf(scrollContainer);
|
|
79618
|
+
const scrollContainerRect = scrollableAncestorRects[index3];
|
|
79619
79619
|
if (!scrollContainerRect) {
|
|
79620
79620
|
continue;
|
|
79621
79621
|
}
|
|
@@ -81800,16 +81800,16 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81800
81800
|
return newArray;
|
|
81801
81801
|
}
|
|
81802
81802
|
function getSortedRects(items, rects) {
|
|
81803
|
-
return items.reduce((accumulator, id,
|
|
81803
|
+
return items.reduce((accumulator, id, index3) => {
|
|
81804
81804
|
const rect = rects.get(id);
|
|
81805
81805
|
if (rect) {
|
|
81806
|
-
accumulator[
|
|
81806
|
+
accumulator[index3] = rect;
|
|
81807
81807
|
}
|
|
81808
81808
|
return accumulator;
|
|
81809
81809
|
}, Array(items.length));
|
|
81810
81810
|
}
|
|
81811
|
-
function isValidIndex(
|
|
81812
|
-
return
|
|
81811
|
+
function isValidIndex(index3) {
|
|
81812
|
+
return index3 !== null && index3 >= 0;
|
|
81813
81813
|
}
|
|
81814
81814
|
function itemsEqual(a6, b10) {
|
|
81815
81815
|
if (a6 === b10) {
|
|
@@ -81845,14 +81845,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81845
81845
|
activeNodeRect: fallbackActiveRect,
|
|
81846
81846
|
activeIndex,
|
|
81847
81847
|
overIndex,
|
|
81848
|
-
index:
|
|
81848
|
+
index: index3
|
|
81849
81849
|
} = _ref;
|
|
81850
81850
|
const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
|
|
81851
81851
|
if (!activeNodeRect) {
|
|
81852
81852
|
return null;
|
|
81853
81853
|
}
|
|
81854
|
-
const itemGap = getItemGap(rects,
|
|
81855
|
-
if (
|
|
81854
|
+
const itemGap = getItemGap(rects, index3, activeIndex);
|
|
81855
|
+
if (index3 === activeIndex) {
|
|
81856
81856
|
const newIndexRect = rects[overIndex];
|
|
81857
81857
|
if (!newIndexRect) {
|
|
81858
81858
|
return null;
|
|
@@ -81863,14 +81863,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81863
81863
|
...defaultScale
|
|
81864
81864
|
};
|
|
81865
81865
|
}
|
|
81866
|
-
if (
|
|
81866
|
+
if (index3 > activeIndex && index3 <= overIndex) {
|
|
81867
81867
|
return {
|
|
81868
81868
|
x: -activeNodeRect.width - itemGap,
|
|
81869
81869
|
y: 0,
|
|
81870
81870
|
...defaultScale
|
|
81871
81871
|
};
|
|
81872
81872
|
}
|
|
81873
|
-
if (
|
|
81873
|
+
if (index3 < activeIndex && index3 >= overIndex) {
|
|
81874
81874
|
return {
|
|
81875
81875
|
x: activeNodeRect.width + itemGap,
|
|
81876
81876
|
y: 0,
|
|
@@ -81883,14 +81883,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81883
81883
|
...defaultScale
|
|
81884
81884
|
};
|
|
81885
81885
|
};
|
|
81886
|
-
function getItemGap(rects,
|
|
81887
|
-
const currentRect = rects[
|
|
81888
|
-
const previousRect = rects[
|
|
81889
|
-
const nextRect = rects[
|
|
81886
|
+
function getItemGap(rects, index3, activeIndex) {
|
|
81887
|
+
const currentRect = rects[index3];
|
|
81888
|
+
const previousRect = rects[index3 - 1];
|
|
81889
|
+
const nextRect = rects[index3 + 1];
|
|
81890
81890
|
if (!currentRect || !previousRect && !nextRect) {
|
|
81891
81891
|
return 0;
|
|
81892
81892
|
}
|
|
81893
|
-
if (activeIndex <
|
|
81893
|
+
if (activeIndex < index3) {
|
|
81894
81894
|
return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);
|
|
81895
81895
|
}
|
|
81896
81896
|
return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);
|
|
@@ -81900,11 +81900,11 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81900
81900
|
rects,
|
|
81901
81901
|
activeIndex,
|
|
81902
81902
|
overIndex,
|
|
81903
|
-
index:
|
|
81903
|
+
index: index3
|
|
81904
81904
|
} = _ref;
|
|
81905
81905
|
const newRects = arrayMove2(rects, overIndex, activeIndex);
|
|
81906
|
-
const oldRect = rects[
|
|
81907
|
-
const newRect = newRects[
|
|
81906
|
+
const oldRect = rects[index3];
|
|
81907
|
+
const newRect = newRects[index3];
|
|
81908
81908
|
if (!newRect || !oldRect) {
|
|
81909
81909
|
return null;
|
|
81910
81910
|
}
|
|
@@ -81918,18 +81918,18 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81918
81918
|
var rectSwappingStrategy = (_ref) => {
|
|
81919
81919
|
let {
|
|
81920
81920
|
activeIndex,
|
|
81921
|
-
index:
|
|
81921
|
+
index: index3,
|
|
81922
81922
|
rects,
|
|
81923
81923
|
overIndex
|
|
81924
81924
|
} = _ref;
|
|
81925
81925
|
let oldRect;
|
|
81926
81926
|
let newRect;
|
|
81927
|
-
if (
|
|
81928
|
-
oldRect = rects[
|
|
81927
|
+
if (index3 === activeIndex) {
|
|
81928
|
+
oldRect = rects[index3];
|
|
81929
81929
|
newRect = rects[overIndex];
|
|
81930
81930
|
}
|
|
81931
|
-
if (
|
|
81932
|
-
oldRect = rects[
|
|
81931
|
+
if (index3 === overIndex) {
|
|
81932
|
+
oldRect = rects[index3];
|
|
81933
81933
|
newRect = rects[activeIndex];
|
|
81934
81934
|
}
|
|
81935
81935
|
if (!newRect || !oldRect) {
|
|
@@ -81951,7 +81951,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81951
81951
|
let {
|
|
81952
81952
|
activeIndex,
|
|
81953
81953
|
activeNodeRect: fallbackActiveRect,
|
|
81954
|
-
index:
|
|
81954
|
+
index: index3,
|
|
81955
81955
|
rects,
|
|
81956
81956
|
overIndex
|
|
81957
81957
|
} = _ref;
|
|
@@ -81959,7 +81959,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81959
81959
|
if (!activeNodeRect) {
|
|
81960
81960
|
return null;
|
|
81961
81961
|
}
|
|
81962
|
-
if (
|
|
81962
|
+
if (index3 === activeIndex) {
|
|
81963
81963
|
const overIndexRect = rects[overIndex];
|
|
81964
81964
|
if (!overIndexRect) {
|
|
81965
81965
|
return null;
|
|
@@ -81970,15 +81970,15 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81970
81970
|
...defaultScale$1
|
|
81971
81971
|
};
|
|
81972
81972
|
}
|
|
81973
|
-
const itemGap = getItemGap$1(rects,
|
|
81974
|
-
if (
|
|
81973
|
+
const itemGap = getItemGap$1(rects, index3, activeIndex);
|
|
81974
|
+
if (index3 > activeIndex && index3 <= overIndex) {
|
|
81975
81975
|
return {
|
|
81976
81976
|
x: 0,
|
|
81977
81977
|
y: -activeNodeRect.height - itemGap,
|
|
81978
81978
|
...defaultScale$1
|
|
81979
81979
|
};
|
|
81980
81980
|
}
|
|
81981
|
-
if (
|
|
81981
|
+
if (index3 < activeIndex && index3 >= overIndex) {
|
|
81982
81982
|
return {
|
|
81983
81983
|
x: 0,
|
|
81984
81984
|
y: activeNodeRect.height + itemGap,
|
|
@@ -81991,14 +81991,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
81991
81991
|
...defaultScale$1
|
|
81992
81992
|
};
|
|
81993
81993
|
};
|
|
81994
|
-
function getItemGap$1(clientRects,
|
|
81995
|
-
const currentRect = clientRects[
|
|
81996
|
-
const previousRect = clientRects[
|
|
81997
|
-
const nextRect = clientRects[
|
|
81994
|
+
function getItemGap$1(clientRects, index3, activeIndex) {
|
|
81995
|
+
const currentRect = clientRects[index3];
|
|
81996
|
+
const previousRect = clientRects[index3 - 1];
|
|
81997
|
+
const nextRect = clientRects[index3 + 1];
|
|
81998
81998
|
if (!currentRect) {
|
|
81999
81999
|
return 0;
|
|
82000
82000
|
}
|
|
82001
|
-
if (activeIndex <
|
|
82001
|
+
if (activeIndex < index3) {
|
|
82002
82002
|
return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;
|
|
82003
82003
|
}
|
|
82004
82004
|
return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;
|
|
@@ -82084,7 +82084,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82084
82084
|
containerId,
|
|
82085
82085
|
isSorting,
|
|
82086
82086
|
wasDragging,
|
|
82087
|
-
index:
|
|
82087
|
+
index: index3,
|
|
82088
82088
|
items,
|
|
82089
82089
|
newIndex,
|
|
82090
82090
|
previousItems,
|
|
@@ -82094,13 +82094,13 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82094
82094
|
if (!transition || !wasDragging) {
|
|
82095
82095
|
return false;
|
|
82096
82096
|
}
|
|
82097
|
-
if (previousItems !== items &&
|
|
82097
|
+
if (previousItems !== items && index3 === newIndex) {
|
|
82098
82098
|
return false;
|
|
82099
82099
|
}
|
|
82100
82100
|
if (isSorting) {
|
|
82101
82101
|
return true;
|
|
82102
82102
|
}
|
|
82103
|
-
return newIndex !==
|
|
82103
|
+
return newIndex !== index3 && containerId === previousContainerId;
|
|
82104
82104
|
};
|
|
82105
82105
|
var defaultTransition = {
|
|
82106
82106
|
duration: 200,
|
|
@@ -82118,14 +82118,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82118
82118
|
function useDerivedTransform(_ref) {
|
|
82119
82119
|
let {
|
|
82120
82120
|
disabled,
|
|
82121
|
-
index:
|
|
82121
|
+
index: index3,
|
|
82122
82122
|
node,
|
|
82123
82123
|
rect
|
|
82124
82124
|
} = _ref;
|
|
82125
82125
|
const [derivedTransform, setDerivedtransform] = React33.useState(null);
|
|
82126
|
-
const previousIndex = React33.useRef(
|
|
82126
|
+
const previousIndex = React33.useRef(index3);
|
|
82127
82127
|
utilities.useIsomorphicLayoutEffect(() => {
|
|
82128
|
-
if (!disabled &&
|
|
82128
|
+
if (!disabled && index3 !== previousIndex.current && node.current) {
|
|
82129
82129
|
const initial = rect.current;
|
|
82130
82130
|
if (initial) {
|
|
82131
82131
|
const current = core.getClientRect(node.current, {
|
|
@@ -82142,10 +82142,10 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82142
82142
|
}
|
|
82143
82143
|
}
|
|
82144
82144
|
}
|
|
82145
|
-
if (
|
|
82146
|
-
previousIndex.current =
|
|
82145
|
+
if (index3 !== previousIndex.current) {
|
|
82146
|
+
previousIndex.current = index3;
|
|
82147
82147
|
}
|
|
82148
|
-
}, [disabled,
|
|
82148
|
+
}, [disabled, index3, node, rect]);
|
|
82149
82149
|
React33.useEffect(() => {
|
|
82150
82150
|
if (derivedTransform) {
|
|
82151
82151
|
setDerivedtransform(null);
|
|
@@ -82177,15 +82177,15 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82177
82177
|
strategy: globalStrategy
|
|
82178
82178
|
} = React33.useContext(Context);
|
|
82179
82179
|
const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
|
|
82180
|
-
const
|
|
82180
|
+
const index3 = items.indexOf(id);
|
|
82181
82181
|
const data = React33.useMemo(() => ({
|
|
82182
82182
|
sortable: {
|
|
82183
82183
|
containerId,
|
|
82184
|
-
index:
|
|
82184
|
+
index: index3,
|
|
82185
82185
|
items
|
|
82186
82186
|
},
|
|
82187
82187
|
...customData
|
|
82188
|
-
}), [containerId, customData,
|
|
82188
|
+
}), [containerId, customData, index3, items]);
|
|
82189
82189
|
const itemsAfterCurrentSortable = React33.useMemo(() => items.slice(items.indexOf(id)), [items, id]);
|
|
82190
82190
|
const {
|
|
82191
82191
|
rect,
|
|
@@ -82232,14 +82232,14 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82232
82232
|
activeNodeRect,
|
|
82233
82233
|
activeIndex,
|
|
82234
82234
|
overIndex,
|
|
82235
|
-
index:
|
|
82235
|
+
index: index3
|
|
82236
82236
|
}) : null;
|
|
82237
82237
|
const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({
|
|
82238
82238
|
id,
|
|
82239
82239
|
items,
|
|
82240
82240
|
activeIndex,
|
|
82241
82241
|
overIndex
|
|
82242
|
-
}) :
|
|
82242
|
+
}) : index3;
|
|
82243
82243
|
const activeId = active == null ? void 0 : active.id;
|
|
82244
82244
|
const previous = React33.useRef({
|
|
82245
82245
|
activeId,
|
|
@@ -82254,7 +82254,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82254
82254
|
isDragging,
|
|
82255
82255
|
isSorting,
|
|
82256
82256
|
id,
|
|
82257
|
-
index:
|
|
82257
|
+
index: index3,
|
|
82258
82258
|
items,
|
|
82259
82259
|
newIndex: previous.current.newIndex,
|
|
82260
82260
|
previousItems: previous.current.items,
|
|
@@ -82264,7 +82264,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82264
82264
|
});
|
|
82265
82265
|
const derivedTransform = useDerivedTransform({
|
|
82266
82266
|
disabled: !shouldAnimateLayoutChanges,
|
|
82267
|
-
index:
|
|
82267
|
+
index: index3,
|
|
82268
82268
|
node,
|
|
82269
82269
|
rect
|
|
82270
82270
|
});
|
|
@@ -82298,7 +82298,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82298
82298
|
attributes,
|
|
82299
82299
|
data,
|
|
82300
82300
|
rect,
|
|
82301
|
-
index:
|
|
82301
|
+
index: index3,
|
|
82302
82302
|
newIndex,
|
|
82303
82303
|
items,
|
|
82304
82304
|
isOver,
|
|
@@ -82319,7 +82319,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82319
82319
|
if (
|
|
82320
82320
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
82321
82321
|
derivedTransform || // Or to prevent items jumping to back to their "new" position when items change
|
|
82322
|
-
itemsHaveChanged && previous.current.newIndex ===
|
|
82322
|
+
itemsHaveChanged && previous.current.newIndex === index3
|
|
82323
82323
|
) {
|
|
82324
82324
|
return disabledTransition;
|
|
82325
82325
|
}
|
|
@@ -82426,7 +82426,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
|
82426
82426
|
const newNode = newDroppable == null ? void 0 : newDroppable.node.current;
|
|
82427
82427
|
if (newNode && newRect && activeDroppable && newDroppable) {
|
|
82428
82428
|
const newScrollAncestors = core.getScrollableAncestors(newNode);
|
|
82429
|
-
const hasDifferentScrollAncestors = newScrollAncestors.some((element,
|
|
82429
|
+
const hasDifferentScrollAncestors = newScrollAncestors.some((element, index3) => scrollableAncestors[index3] !== element);
|
|
82430
82430
|
const hasSameContainer = isSameContainer(activeDroppable, newDroppable);
|
|
82431
82431
|
const isAfterActive = isAfter(activeDroppable, newDroppable);
|
|
82432
82432
|
const offset4 = hasDifferentScrollAncestors || !hasSameContainer ? {
|
|
@@ -89261,7 +89261,7 @@ var require_dist5 = __commonJS({
|
|
|
89261
89261
|
// start-server.ts
|
|
89262
89262
|
import { appendFileSync as appendFileSync2, createReadStream as createReadStream3, mkdirSync as mkdirSync8, readFileSync as readFileSync9, statSync as statSync7 } from "node:fs";
|
|
89263
89263
|
import { createServer } from "node:http";
|
|
89264
|
-
import { basename as basename2, join as
|
|
89264
|
+
import { basename as basename2, join as join24, resolve as resolve7 } from "node:path";
|
|
89265
89265
|
|
|
89266
89266
|
// ../../node_modules/.pnpm/@trpc+server@11.12.0_typescript@5.9.3/node_modules/@trpc/server/dist/codes-DagpWZLc.mjs
|
|
89267
89267
|
function mergeWithoutOverrides(obj1, ...objs) {
|
|
@@ -89961,21 +89961,21 @@ var jsonContentTypeHandler = {
|
|
|
89961
89961
|
message: '"input" needs to be an object when doing a batch call'
|
|
89962
89962
|
});
|
|
89963
89963
|
const acc = emptyObject();
|
|
89964
|
-
for (const
|
|
89965
|
-
const input = inputs[
|
|
89966
|
-
if (input !== void 0) acc[
|
|
89964
|
+
for (const index3 of paths.keys()) {
|
|
89965
|
+
const input = inputs[index3];
|
|
89966
|
+
if (input !== void 0) acc[index3] = opts.router._def._config.transformer.input.deserialize(input);
|
|
89967
89967
|
}
|
|
89968
89968
|
return acc;
|
|
89969
89969
|
});
|
|
89970
|
-
const calls = await Promise.all(paths.map(async (path3,
|
|
89970
|
+
const calls = await Promise.all(paths.map(async (path3, index3) => {
|
|
89971
89971
|
const procedure = await getProcedureAtPath(opts.router, path3);
|
|
89972
89972
|
return {
|
|
89973
|
-
batchIndex:
|
|
89973
|
+
batchIndex: index3,
|
|
89974
89974
|
path: path3,
|
|
89975
89975
|
procedure,
|
|
89976
89976
|
getRawInput: async () => {
|
|
89977
89977
|
const inputs = await getInputs.read();
|
|
89978
|
-
let input = inputs[
|
|
89978
|
+
let input = inputs[index3];
|
|
89979
89979
|
if ((procedure === null || procedure === void 0 ? void 0 : procedure._def.type) === "subscription") {
|
|
89980
89980
|
var _ref, _opts$headers$get;
|
|
89981
89981
|
const lastEventId = (_ref = (_opts$headers$get = opts.headers.get("last-event-id")) !== null && _opts$headers$get !== void 0 ? _opts$headers$get : opts.searchParams.get("lastEventId")) !== null && _ref !== void 0 ? _ref : opts.searchParams.get("Last-Event-Id");
|
|
@@ -89989,7 +89989,7 @@ var jsonContentTypeHandler = {
|
|
|
89989
89989
|
},
|
|
89990
89990
|
result: () => {
|
|
89991
89991
|
var _getInputs$result;
|
|
89992
|
-
return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[
|
|
89992
|
+
return (_getInputs$result = getInputs.result()) === null || _getInputs$result === void 0 ? void 0 : _getInputs$result[index3];
|
|
89993
89993
|
}
|
|
89994
89994
|
};
|
|
89995
89995
|
}));
|
|
@@ -90294,12 +90294,12 @@ function withResolvers() {
|
|
|
90294
90294
|
function listWithMember(arr, member) {
|
|
90295
90295
|
return [...arr, member];
|
|
90296
90296
|
}
|
|
90297
|
-
function listWithoutIndex(arr,
|
|
90298
|
-
return [...arr.slice(0,
|
|
90297
|
+
function listWithoutIndex(arr, index3) {
|
|
90298
|
+
return [...arr.slice(0, index3), ...arr.slice(index3 + 1)];
|
|
90299
90299
|
}
|
|
90300
90300
|
function listWithoutMember(arr, member) {
|
|
90301
|
-
const
|
|
90302
|
-
if (
|
|
90301
|
+
const index3 = arr.indexOf(member);
|
|
90302
|
+
if (index3 !== -1) return listWithoutIndex(arr, index3);
|
|
90303
90303
|
return arr;
|
|
90304
90304
|
}
|
|
90305
90305
|
var _Symbol;
|
|
@@ -91488,8 +91488,8 @@ async function resolveResponse(opts) {
|
|
|
91488
91488
|
}), void 0];
|
|
91489
91489
|
return res;
|
|
91490
91490
|
});
|
|
91491
|
-
const resultAsRPCResponse = results.map(([error40, result],
|
|
91492
|
-
const call = info.calls[
|
|
91491
|
+
const resultAsRPCResponse = results.map(([error40, result], index3) => {
|
|
91492
|
+
const call = info.calls[index3];
|
|
91493
91493
|
if (error40) {
|
|
91494
91494
|
var _call$procedure$_def$4, _call$procedure5;
|
|
91495
91495
|
return { error: getErrorShape({
|
|
@@ -91850,16 +91850,16 @@ var codeblock = `
|
|
|
91850
91850
|
This is a client-only function.
|
|
91851
91851
|
If you want to call this function on the server, see https://trpc.io/docs/v11/server/server-side-calls
|
|
91852
91852
|
`.trim();
|
|
91853
|
-
async function callRecursive(
|
|
91853
|
+
async function callRecursive(index3, _def, opts) {
|
|
91854
91854
|
try {
|
|
91855
|
-
const middleware = _def.middlewares[
|
|
91855
|
+
const middleware = _def.middlewares[index3];
|
|
91856
91856
|
const result = await middleware((0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, {
|
|
91857
91857
|
meta: _def.meta,
|
|
91858
91858
|
input: opts.input,
|
|
91859
91859
|
next(_nextOpts) {
|
|
91860
91860
|
var _nextOpts$getRawInput;
|
|
91861
91861
|
const nextOpts = _nextOpts;
|
|
91862
|
-
return callRecursive(
|
|
91862
|
+
return callRecursive(index3 + 1, _def, (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts), {}, {
|
|
91863
91863
|
ctx: (nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.ctx) ? (0, import_objectSpread2$13.default)((0, import_objectSpread2$13.default)({}, opts.ctx), nextOpts.ctx) : opts.ctx,
|
|
91864
91864
|
input: nextOpts && "input" in nextOpts ? nextOpts.input : opts.input,
|
|
91865
91865
|
getRawInput: (_nextOpts$getRawInput = nextOpts === null || nextOpts === void 0 ? void 0 : nextOpts.getRawInput) !== null && _nextOpts$getRawInput !== void 0 ? _nextOpts$getRawInput : opts.getRawInput
|
|
@@ -92321,7 +92321,7 @@ function getWSConnectionHandler(opts) {
|
|
|
92321
92321
|
return [];
|
|
92322
92322
|
}
|
|
92323
92323
|
});
|
|
92324
|
-
parsedMsgs.map((msg,
|
|
92324
|
+
parsedMsgs.map((msg, index3) => handleRequest(msg, index3));
|
|
92325
92325
|
});
|
|
92326
92326
|
client.on("error", (cause) => {
|
|
92327
92327
|
var _opts$onError6;
|
|
@@ -95976,11 +95976,11 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def2) => {
|
|
|
95976
95976
|
return payload;
|
|
95977
95977
|
};
|
|
95978
95978
|
});
|
|
95979
|
-
function handleArrayResult(result, final,
|
|
95979
|
+
function handleArrayResult(result, final, index3) {
|
|
95980
95980
|
if (result.issues.length) {
|
|
95981
|
-
final.issues.push(...prefixIssues(
|
|
95981
|
+
final.issues.push(...prefixIssues(index3, result.issues));
|
|
95982
95982
|
}
|
|
95983
|
-
final.value[
|
|
95983
|
+
final.value[index3] = result.value;
|
|
95984
95984
|
}
|
|
95985
95985
|
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def2) => {
|
|
95986
95986
|
$ZodType.init(inst, def2);
|
|
@@ -96364,14 +96364,14 @@ function mergeValues(a6, b10) {
|
|
|
96364
96364
|
return { valid: false, mergeErrorPath: [] };
|
|
96365
96365
|
}
|
|
96366
96366
|
const newArray = [];
|
|
96367
|
-
for (let
|
|
96368
|
-
const itemA = a6[
|
|
96369
|
-
const itemB = b10[
|
|
96367
|
+
for (let index3 = 0; index3 < a6.length; index3++) {
|
|
96368
|
+
const itemA = a6[index3];
|
|
96369
|
+
const itemB = b10[index3];
|
|
96370
96370
|
const sharedValue = mergeValues(itemA, itemB);
|
|
96371
96371
|
if (!sharedValue.valid) {
|
|
96372
96372
|
return {
|
|
96373
96373
|
valid: false,
|
|
96374
|
-
mergeErrorPath: [
|
|
96374
|
+
mergeErrorPath: [index3, ...sharedValue.mergeErrorPath]
|
|
96375
96375
|
};
|
|
96376
96376
|
}
|
|
96377
96377
|
newArray.push(sharedValue.data);
|
|
@@ -96463,11 +96463,11 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def2) => {
|
|
|
96463
96463
|
return payload;
|
|
96464
96464
|
};
|
|
96465
96465
|
});
|
|
96466
|
-
function handleTupleResult(result, final,
|
|
96466
|
+
function handleTupleResult(result, final, index3) {
|
|
96467
96467
|
if (result.issues.length) {
|
|
96468
|
-
final.issues.push(...prefixIssues(
|
|
96468
|
+
final.issues.push(...prefixIssues(index3, result.issues));
|
|
96469
96469
|
}
|
|
96470
|
-
final.value[
|
|
96470
|
+
final.value[index3] = result.value;
|
|
96471
96471
|
}
|
|
96472
96472
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def2) => {
|
|
96473
96473
|
$ZodType.init(inst, def2);
|
|
@@ -105858,7 +105858,7 @@ var get$ref = (item, refs) => {
|
|
|
105858
105858
|
return { $ref: getRelativePath(refs.currentPath, item.path) };
|
|
105859
105859
|
case "none":
|
|
105860
105860
|
case "seen": {
|
|
105861
|
-
if (item.path.length < refs.currentPath.length && item.path.every((value,
|
|
105861
|
+
if (item.path.length < refs.currentPath.length && item.path.every((value, index3) => refs.currentPath[index3] === value)) {
|
|
105862
105862
|
console.warn(
|
|
105863
105863
|
`Recursive reference detected at ${refs.currentPath.join(
|
|
105864
105864
|
"/"
|
|
@@ -108432,7 +108432,7 @@ init_src();
|
|
|
108432
108432
|
// src/lib/agent-pool.ts
|
|
108433
108433
|
import { readFileSync as readFileSync5 } from "node:fs";
|
|
108434
108434
|
import { homedir as homedir8 } from "node:os";
|
|
108435
|
-
import { join as
|
|
108435
|
+
import { join as join13 } from "node:path";
|
|
108436
108436
|
|
|
108437
108437
|
// ../../packages/coding-agent/src/config.ts
|
|
108438
108438
|
init_zod();
|
|
@@ -108540,6 +108540,7 @@ async function createCodingAgent(config2) {
|
|
|
108540
108540
|
|
|
108541
108541
|
// ../../packages/coding-agent/src/install-skills.ts
|
|
108542
108542
|
import { homedir as homedir6 } from "node:os";
|
|
108543
|
+
import { join as join9 } from "node:path";
|
|
108543
108544
|
async function getInstallSkillsDir(type, home = homedir6()) {
|
|
108544
108545
|
switch (type) {
|
|
108545
108546
|
case "claude-code": {
|
|
@@ -108566,28 +108567,27 @@ async function getInstallSkillsDir(type, home = homedir6()) {
|
|
|
108566
108567
|
return null;
|
|
108567
108568
|
}
|
|
108568
108569
|
}
|
|
108569
|
-
|
|
108570
|
+
function getSharedSkillsDir(home = homedir6()) {
|
|
108571
|
+
return join9(home, ".agents", "skills");
|
|
108572
|
+
}
|
|
108573
|
+
var SUPPORTED_AGENT_TYPES = [
|
|
108574
|
+
"claude-code",
|
|
108575
|
+
"codex",
|
|
108576
|
+
"openai-codex",
|
|
108577
|
+
"gemini-cli",
|
|
108578
|
+
"opencode"
|
|
108579
|
+
];
|
|
108580
|
+
function getAgentConfigDir(type, home = homedir6()) {
|
|
108570
108581
|
switch (type) {
|
|
108571
|
-
case "claude-code":
|
|
108572
|
-
|
|
108573
|
-
|
|
108574
|
-
|
|
108575
|
-
|
|
108576
|
-
|
|
108577
|
-
return
|
|
108578
|
-
|
|
108579
|
-
|
|
108580
|
-
const { OPENAI_CODEX_DEFAULT_BINARY: OPENAI_CODEX_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_openai_codex(), openai_codex_exports));
|
|
108581
|
-
return OPENAI_CODEX_DEFAULT_BINARY2;
|
|
108582
|
-
}
|
|
108583
|
-
case "gemini-cli": {
|
|
108584
|
-
const { GEMINI_CLI_DEFAULT_BINARY: GEMINI_CLI_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_gemini_cli(), gemini_cli_exports));
|
|
108585
|
-
return GEMINI_CLI_DEFAULT_BINARY2;
|
|
108586
|
-
}
|
|
108587
|
-
case "opencode": {
|
|
108588
|
-
const { OPENCODE_DEFAULT_BINARY: OPENCODE_DEFAULT_BINARY2 } = await Promise.resolve().then(() => (init_opencode(), opencode_exports));
|
|
108589
|
-
return OPENCODE_DEFAULT_BINARY2;
|
|
108590
|
-
}
|
|
108582
|
+
case "claude-code":
|
|
108583
|
+
return join9(home, ".claude");
|
|
108584
|
+
case "codex":
|
|
108585
|
+
case "openai-codex":
|
|
108586
|
+
return process.env.CODEX_HOME || join9(home, ".codex");
|
|
108587
|
+
case "gemini-cli":
|
|
108588
|
+
return join9(home, ".gemini");
|
|
108589
|
+
case "opencode":
|
|
108590
|
+
return join9(home, ".config", "opencode");
|
|
108591
108591
|
default:
|
|
108592
108592
|
return null;
|
|
108593
108593
|
}
|
|
@@ -108600,7 +108600,7 @@ init_src();
|
|
|
108600
108600
|
import { randomBytes } from "node:crypto";
|
|
108601
108601
|
import { mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync } from "node:fs";
|
|
108602
108602
|
import { homedir as homedir7 } from "node:os";
|
|
108603
|
-
import { dirname, join as
|
|
108603
|
+
import { dirname, join as join12 } from "node:path";
|
|
108604
108604
|
|
|
108605
108605
|
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_fa89646d7248b32d1762bf88948f6339/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
108606
108606
|
var React4 = __toESM(require_react(), 1);
|
|
@@ -108845,17 +108845,17 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
108845
108845
|
let defaultContexts = [];
|
|
108846
108846
|
function createContext32(rootComponentName, defaultContext) {
|
|
108847
108847
|
const BaseContext = React5.createContext(defaultContext);
|
|
108848
|
-
const
|
|
108848
|
+
const index3 = defaultContexts.length;
|
|
108849
108849
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
108850
108850
|
const Provider2 = (props) => {
|
|
108851
108851
|
const { scope, children, ...context } = props;
|
|
108852
|
-
const Context = scope?.[scopeName]?.[
|
|
108852
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
108853
108853
|
const value = React5.useMemo(() => context, Object.values(context));
|
|
108854
108854
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Context.Provider, { value, children });
|
|
108855
108855
|
};
|
|
108856
108856
|
Provider2.displayName = rootComponentName + "Provider";
|
|
108857
108857
|
function useContext22(consumerName, scope) {
|
|
108858
|
-
const Context = scope?.[scopeName]?.[
|
|
108858
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
108859
108859
|
const context = React5.useContext(Context);
|
|
108860
108860
|
if (context) return context;
|
|
108861
108861
|
if (defaultContext !== void 0) return defaultContext;
|
|
@@ -109284,9 +109284,9 @@ var DismissableLayer = React14.forwardRef(
|
|
|
109284
109284
|
const layers = Array.from(context.layers);
|
|
109285
109285
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
109286
109286
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
109287
|
-
const
|
|
109287
|
+
const index3 = node ? layers.indexOf(node) : -1;
|
|
109288
109288
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
109289
|
-
const isPointerEventsEnabled =
|
|
109289
|
+
const isPointerEventsEnabled = index3 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
109290
109290
|
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
109291
109291
|
const target = event.target;
|
|
109292
109292
|
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
@@ -109304,7 +109304,7 @@ var DismissableLayer = React14.forwardRef(
|
|
|
109304
109304
|
if (!event.defaultPrevented) onDismiss?.();
|
|
109305
109305
|
}, ownerDocument);
|
|
109306
109306
|
useEscapeKeydown((event) => {
|
|
109307
|
-
const isHighestLayer =
|
|
109307
|
+
const isHighestLayer = index3 === context.layers.size - 1;
|
|
109308
109308
|
if (!isHighestLayer) return;
|
|
109309
109309
|
onEscapeKeyDown?.(event);
|
|
109310
109310
|
if (!event.defaultPrevented && onDismiss) {
|
|
@@ -109652,9 +109652,9 @@ function createFocusScopesStack() {
|
|
|
109652
109652
|
}
|
|
109653
109653
|
function arrayRemove(array3, item) {
|
|
109654
109654
|
const updatedArray = [...array3];
|
|
109655
|
-
const
|
|
109656
|
-
if (
|
|
109657
|
-
updatedArray.splice(
|
|
109655
|
+
const index3 = updatedArray.indexOf(item);
|
|
109656
|
+
if (index3 !== -1) {
|
|
109657
|
+
updatedArray.splice(index3, 1);
|
|
109658
109658
|
}
|
|
109659
109659
|
return updatedArray;
|
|
109660
109660
|
}
|
|
@@ -112523,7 +112523,7 @@ function focusFirst2(candidates, preventScroll = false) {
|
|
|
112523
112523
|
}
|
|
112524
112524
|
}
|
|
112525
112525
|
function wrapArray(array3, startIndex) {
|
|
112526
|
-
return array3.map((_4,
|
|
112526
|
+
return array3.map((_4, index3) => array3[(startIndex + index3) % array3.length]);
|
|
112527
112527
|
}
|
|
112528
112528
|
var Root4 = RovingFocusGroup;
|
|
112529
112529
|
var Item = RovingFocusGroupItem;
|
|
@@ -113290,7 +113290,7 @@ function focusFirst3(candidates) {
|
|
|
113290
113290
|
}
|
|
113291
113291
|
}
|
|
113292
113292
|
function wrapArray2(array3, startIndex) {
|
|
113293
|
-
return array3.map((_4,
|
|
113293
|
+
return array3.map((_4, index3) => array3[(startIndex + index3) % array3.length]);
|
|
113294
113294
|
}
|
|
113295
113295
|
function getNextMatch(values, search, currentMatch) {
|
|
113296
113296
|
const isRepeated = search.length > 1 && Array.from(search).every((char2) => char2 === search[0]);
|
|
@@ -114353,16 +114353,16 @@ var createParseClassName = (config2) => {
|
|
|
114353
114353
|
let modifierStart = 0;
|
|
114354
114354
|
let postfixModifierPosition;
|
|
114355
114355
|
const len = className.length;
|
|
114356
|
-
for (let
|
|
114357
|
-
const currentCharacter = className[
|
|
114356
|
+
for (let index3 = 0; index3 < len; index3++) {
|
|
114357
|
+
const currentCharacter = className[index3];
|
|
114358
114358
|
if (bracketDepth === 0 && parenDepth === 0) {
|
|
114359
114359
|
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
114360
|
-
modifiers.push(className.slice(modifierStart,
|
|
114361
|
-
modifierStart =
|
|
114360
|
+
modifiers.push(className.slice(modifierStart, index3));
|
|
114361
|
+
modifierStart = index3 + 1;
|
|
114362
114362
|
continue;
|
|
114363
114363
|
}
|
|
114364
114364
|
if (currentCharacter === "/") {
|
|
114365
|
-
postfixModifierPosition =
|
|
114365
|
+
postfixModifierPosition = index3;
|
|
114366
114366
|
continue;
|
|
114367
114367
|
}
|
|
114368
114368
|
}
|
|
@@ -114406,8 +114406,8 @@ var createParseClassName = (config2) => {
|
|
|
114406
114406
|
};
|
|
114407
114407
|
var createSortModifiers = (config2) => {
|
|
114408
114408
|
const modifierWeights = /* @__PURE__ */ new Map();
|
|
114409
|
-
config2.orderSensitiveModifiers.forEach((mod,
|
|
114410
|
-
modifierWeights.set(mod, 1e6 +
|
|
114409
|
+
config2.orderSensitiveModifiers.forEach((mod, index3) => {
|
|
114410
|
+
modifierWeights.set(mod, 1e6 + index3);
|
|
114411
114411
|
});
|
|
114412
114412
|
return (modifiers) => {
|
|
114413
114413
|
const result = [];
|
|
@@ -114451,8 +114451,8 @@ var mergeClassList = (classList, configUtils) => {
|
|
|
114451
114451
|
const classGroupsInConflict = [];
|
|
114452
114452
|
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
114453
114453
|
let result = "";
|
|
114454
|
-
for (let
|
|
114455
|
-
const originalClassName = classNames[
|
|
114454
|
+
for (let index3 = classNames.length - 1; index3 >= 0; index3 -= 1) {
|
|
114455
|
+
const originalClassName = classNames[index3];
|
|
114456
114456
|
const {
|
|
114457
114457
|
isExternal,
|
|
114458
114458
|
modifiers,
|
|
@@ -114495,12 +114495,12 @@ var mergeClassList = (classList, configUtils) => {
|
|
|
114495
114495
|
return result;
|
|
114496
114496
|
};
|
|
114497
114497
|
var twJoin = (...classLists) => {
|
|
114498
|
-
let
|
|
114498
|
+
let index3 = 0;
|
|
114499
114499
|
let argument;
|
|
114500
114500
|
let resolvedValue;
|
|
114501
114501
|
let string5 = "";
|
|
114502
|
-
while (
|
|
114503
|
-
if (argument = classLists[
|
|
114502
|
+
while (index3 < classLists.length) {
|
|
114503
|
+
if (argument = classLists[index3++]) {
|
|
114504
114504
|
if (resolvedValue = toValue(argument)) {
|
|
114505
114505
|
string5 && (string5 += " ");
|
|
114506
114506
|
string5 += resolvedValue;
|
|
@@ -119242,9 +119242,9 @@ var MutationCache = class extends Subscribable {
|
|
|
119242
119242
|
const scopedMutations = this.#scopes.get(scope);
|
|
119243
119243
|
if (scopedMutations) {
|
|
119244
119244
|
if (scopedMutations.length > 1) {
|
|
119245
|
-
const
|
|
119246
|
-
if (
|
|
119247
|
-
scopedMutations.splice(
|
|
119245
|
+
const index3 = scopedMutations.indexOf(mutation);
|
|
119246
|
+
if (index3 !== -1) {
|
|
119247
|
+
scopedMutations.splice(index3, 1);
|
|
119248
119248
|
}
|
|
119249
119249
|
} else if (scopedMutations[0] === mutation) {
|
|
119250
119250
|
this.#scopes.delete(scope);
|
|
@@ -120627,22 +120627,25 @@ var isElectron = typeof window !== "undefined" && "__BAND_DESKTOP__" in window;
|
|
|
120627
120627
|
|
|
120628
120628
|
// ../../packages/dashboard-core/src/components/DiffView.tsx
|
|
120629
120629
|
init_dist4();
|
|
120630
|
-
var
|
|
120630
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
120631
120631
|
|
|
120632
|
-
// ../../packages/dashboard-core/src/hooks/use-
|
|
120632
|
+
// ../../packages/dashboard-core/src/hooks/use-diff-target.ts
|
|
120633
120633
|
var import_react25 = __toESM(require_react(), 1);
|
|
120634
120634
|
|
|
120635
|
+
// ../../packages/dashboard-core/src/hooks/use-search.ts
|
|
120636
|
+
var import_react26 = __toESM(require_react(), 1);
|
|
120637
|
+
|
|
120635
120638
|
// ../../packages/dashboard-core/src/components/ChangesFileTree.tsx
|
|
120636
|
-
var
|
|
120639
|
+
var import_react28 = __toESM(require_react(), 1);
|
|
120637
120640
|
|
|
120638
120641
|
// ../../packages/dashboard-core/src/hooks/use-deferred-menu-action.ts
|
|
120639
|
-
var
|
|
120642
|
+
var import_react27 = __toESM(require_react(), 1);
|
|
120640
120643
|
function useDeferredMenuAction() {
|
|
120641
|
-
const pendingRef = (0,
|
|
120642
|
-
const queue = (0,
|
|
120644
|
+
const pendingRef = (0, import_react27.useRef)(null);
|
|
120645
|
+
const queue = (0, import_react27.useCallback)((fn) => {
|
|
120643
120646
|
pendingRef.current = fn;
|
|
120644
120647
|
}, []);
|
|
120645
|
-
const flush = (0,
|
|
120648
|
+
const flush = (0, import_react27.useCallback)((e2) => {
|
|
120646
120649
|
e2.preventDefault();
|
|
120647
120650
|
const fn = pendingRef.current;
|
|
120648
120651
|
pendingRef.current = null;
|
|
@@ -120801,7 +120804,7 @@ var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
|
|
|
120801
120804
|
|
|
120802
120805
|
// ../../packages/dashboard-core/src/components/SearchBar.tsx
|
|
120803
120806
|
var import_lucide_react7 = __toESM(require_lucide_react(), 1);
|
|
120804
|
-
var
|
|
120807
|
+
var import_react29 = __toESM(require_react(), 1);
|
|
120805
120808
|
var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
|
|
120806
120809
|
var DEFAULT_VISIBLE_OPTIONS = ["caseSensitive", "wholeWord", "regex"];
|
|
120807
120810
|
function ToggleButton({
|
|
@@ -120821,7 +120824,7 @@ function ToggleButton({
|
|
|
120821
120824
|
}
|
|
120822
120825
|
);
|
|
120823
120826
|
}
|
|
120824
|
-
var SearchBar = (0,
|
|
120827
|
+
var SearchBar = (0, import_react29.forwardRef)(function SearchBar2({
|
|
120825
120828
|
query,
|
|
120826
120829
|
onQueryChange,
|
|
120827
120830
|
options: options2,
|
|
@@ -120837,18 +120840,18 @@ var SearchBar = (0, import_react28.forwardRef)(function SearchBar2({
|
|
|
120837
120840
|
const showCase = visibleOptions.includes("caseSensitive");
|
|
120838
120841
|
const showWholeWord = visibleOptions.includes("wholeWord");
|
|
120839
120842
|
const showRegex = visibleOptions.includes("regex");
|
|
120840
|
-
const inputRef = (0,
|
|
120841
|
-
(0,
|
|
120843
|
+
const inputRef = (0, import_react29.useRef)(null);
|
|
120844
|
+
(0, import_react29.useImperativeHandle)(ref, () => ({
|
|
120842
120845
|
focus: () => inputRef.current?.focus(),
|
|
120843
120846
|
select: () => inputRef.current?.select()
|
|
120844
120847
|
}));
|
|
120845
|
-
const toggleCase = (0,
|
|
120848
|
+
const toggleCase = (0, import_react29.useCallback)(() => {
|
|
120846
120849
|
onOptionsChange({ ...options2, caseSensitive: !options2.caseSensitive });
|
|
120847
120850
|
}, [options2, onOptionsChange]);
|
|
120848
|
-
const toggleWholeWord = (0,
|
|
120851
|
+
const toggleWholeWord = (0, import_react29.useCallback)(() => {
|
|
120849
120852
|
onOptionsChange({ ...options2, wholeWord: !options2.wholeWord });
|
|
120850
120853
|
}, [options2, onOptionsChange]);
|
|
120851
|
-
const toggleRegex = (0,
|
|
120854
|
+
const toggleRegex = (0, import_react29.useCallback)(() => {
|
|
120852
120855
|
onOptionsChange({ ...options2, regex: !options2.regex });
|
|
120853
120856
|
}, [options2, onOptionsChange]);
|
|
120854
120857
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
@@ -120971,7 +120974,7 @@ var diffTheme = EditorView.theme({
|
|
|
120971
120974
|
|
|
120972
120975
|
// ../../packages/dashboard-core/src/components/FileBrowser.tsx
|
|
120973
120976
|
var import_lucide_react8 = __toESM(require_lucide_react(), 1);
|
|
120974
|
-
var
|
|
120977
|
+
var import_react31 = __toESM(require_react(), 1);
|
|
120975
120978
|
var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
|
|
120976
120979
|
var expandedStateCache = /* @__PURE__ */ new Map();
|
|
120977
120980
|
var dirContentsCache = /* @__PURE__ */ new Map();
|
|
@@ -121001,11 +121004,11 @@ function EntryNameInput({
|
|
|
121001
121004
|
onSubmit,
|
|
121002
121005
|
onCancel
|
|
121003
121006
|
}) {
|
|
121004
|
-
const [value, setValue] = (0,
|
|
121005
|
-
const [submitting, setSubmitting] = (0,
|
|
121006
|
-
const [error40, setError] = (0,
|
|
121007
|
-
const inputRef = (0,
|
|
121008
|
-
(0,
|
|
121007
|
+
const [value, setValue] = (0, import_react31.useState)(initialValue);
|
|
121008
|
+
const [submitting, setSubmitting] = (0, import_react31.useState)(false);
|
|
121009
|
+
const [error40, setError] = (0, import_react31.useState)(null);
|
|
121010
|
+
const inputRef = (0, import_react31.useRef)(null);
|
|
121011
|
+
(0, import_react31.useEffect)(() => {
|
|
121009
121012
|
const el = inputRef.current;
|
|
121010
121013
|
if (!el) return;
|
|
121011
121014
|
el.focus();
|
|
@@ -121388,7 +121391,7 @@ function TreeNode2({
|
|
|
121388
121391
|
})()
|
|
121389
121392
|
] });
|
|
121390
121393
|
}
|
|
121391
|
-
var FileBrowser = (0,
|
|
121394
|
+
var FileBrowser = (0, import_react31.forwardRef)(function FileBrowser2({
|
|
121392
121395
|
workspaceId,
|
|
121393
121396
|
onOpenFile,
|
|
121394
121397
|
onOpenFilePinned,
|
|
@@ -121398,23 +121401,23 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121398
121401
|
onPathDeleted
|
|
121399
121402
|
}, handleRef) {
|
|
121400
121403
|
const adapter = useAdapter();
|
|
121401
|
-
const [expandedPaths, setExpandedPaths] = (0,
|
|
121404
|
+
const [expandedPaths, setExpandedPaths] = (0, import_react31.useState)(
|
|
121402
121405
|
() => new Set(getCachedExpanded(workspaceId))
|
|
121403
121406
|
);
|
|
121404
|
-
const [dirContents, setDirContents] = (0,
|
|
121407
|
+
const [dirContents, setDirContents] = (0, import_react31.useState)(
|
|
121405
121408
|
() => new Map(getCachedContents(workspaceId))
|
|
121406
121409
|
);
|
|
121407
|
-
const [loadingPaths, setLoadingPaths] = (0,
|
|
121408
|
-
const [newEntry, setNewEntry] = (0,
|
|
121409
|
-
const [pendingDelete, setPendingDelete] = (0,
|
|
121410
|
-
const [deleteError, setDeleteError] = (0,
|
|
121411
|
-
const [deleteSubmitting, setDeleteSubmitting] = (0,
|
|
121412
|
-
const [renamingPath, setRenamingPath] = (0,
|
|
121413
|
-
const [clipboard, setClipboard] = (0,
|
|
121414
|
-
const [treeSelection, setTreeSelection] = (0,
|
|
121415
|
-
const selectedRef = (0,
|
|
121416
|
-
const prevWorkspaceRef = (0,
|
|
121417
|
-
(0,
|
|
121410
|
+
const [loadingPaths, setLoadingPaths] = (0, import_react31.useState)(/* @__PURE__ */ new Set());
|
|
121411
|
+
const [newEntry, setNewEntry] = (0, import_react31.useState)(null);
|
|
121412
|
+
const [pendingDelete, setPendingDelete] = (0, import_react31.useState)(null);
|
|
121413
|
+
const [deleteError, setDeleteError] = (0, import_react31.useState)(null);
|
|
121414
|
+
const [deleteSubmitting, setDeleteSubmitting] = (0, import_react31.useState)(false);
|
|
121415
|
+
const [renamingPath, setRenamingPath] = (0, import_react31.useState)(null);
|
|
121416
|
+
const [clipboard, setClipboard] = (0, import_react31.useState)(null);
|
|
121417
|
+
const [treeSelection, setTreeSelection] = (0, import_react31.useState)(() => selectedFile ? { path: selectedFile, kind: "file" } : null);
|
|
121418
|
+
const selectedRef = (0, import_react31.useRef)(null);
|
|
121419
|
+
const prevWorkspaceRef = (0, import_react31.useRef)(workspaceId);
|
|
121420
|
+
(0, import_react31.useEffect)(() => {
|
|
121418
121421
|
if (prevWorkspaceRef.current !== workspaceId) {
|
|
121419
121422
|
prevWorkspaceRef.current = workspaceId;
|
|
121420
121423
|
setExpandedPaths(new Set(getCachedExpanded(workspaceId)));
|
|
@@ -121429,18 +121432,18 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121429
121432
|
setClipboard(null);
|
|
121430
121433
|
}
|
|
121431
121434
|
}, [workspaceId]);
|
|
121432
|
-
(0,
|
|
121435
|
+
(0, import_react31.useEffect)(() => {
|
|
121433
121436
|
if (selectedFile) {
|
|
121434
121437
|
setTreeSelection({ path: selectedFile, kind: "file" });
|
|
121435
121438
|
}
|
|
121436
121439
|
}, [selectedFile]);
|
|
121437
|
-
const handleSelectRow = (0,
|
|
121440
|
+
const handleSelectRow = (0, import_react31.useCallback)((path3, kind) => {
|
|
121438
121441
|
setTreeSelection({ path: path3, kind });
|
|
121439
121442
|
}, []);
|
|
121440
|
-
const clearTreeSelection = (0,
|
|
121443
|
+
const clearTreeSelection = (0, import_react31.useCallback)(() => {
|
|
121441
121444
|
setTreeSelection(null);
|
|
121442
121445
|
}, []);
|
|
121443
|
-
const fetchDir = (0,
|
|
121446
|
+
const fetchDir = (0, import_react31.useCallback)(
|
|
121444
121447
|
async (dirPath, opts) => {
|
|
121445
121448
|
if (!adapter.listWorkspaceFiles) return;
|
|
121446
121449
|
const cache = getCachedContents(workspaceId);
|
|
@@ -121464,11 +121467,20 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121464
121467
|
},
|
|
121465
121468
|
[adapter, workspaceId]
|
|
121466
121469
|
);
|
|
121467
|
-
(0,
|
|
121470
|
+
(0, import_react31.useEffect)(() => {
|
|
121468
121471
|
fetchDir("");
|
|
121469
121472
|
}, [fetchDir]);
|
|
121470
|
-
|
|
121471
|
-
|
|
121473
|
+
(0, import_react31.useEffect)(() => {
|
|
121474
|
+
if (!adapter.subscribeFileChanges) return;
|
|
121475
|
+
const unsubscribe = adapter.subscribeFileChanges(workspaceId, (changedPath) => {
|
|
121476
|
+
const cache = getCachedContents(workspaceId);
|
|
121477
|
+
if (!cache.has(changedPath)) return;
|
|
121478
|
+
void fetchDir(changedPath, { force: true });
|
|
121479
|
+
});
|
|
121480
|
+
return unsubscribe;
|
|
121481
|
+
}, [adapter, workspaceId, fetchDir]);
|
|
121482
|
+
const prevSelectedRef = (0, import_react31.useRef)(void 0);
|
|
121483
|
+
(0, import_react31.useEffect)(() => {
|
|
121472
121484
|
if (!selectedFile || selectedFile === prevSelectedRef.current) {
|
|
121473
121485
|
prevSelectedRef.current = selectedFile;
|
|
121474
121486
|
return;
|
|
@@ -121495,7 +121507,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121495
121507
|
fetchDir(dir);
|
|
121496
121508
|
}
|
|
121497
121509
|
}, [selectedFile, workspaceId, fetchDir]);
|
|
121498
|
-
(0,
|
|
121510
|
+
(0, import_react31.useEffect)(() => {
|
|
121499
121511
|
if (selectedFile && selectedRef.current) {
|
|
121500
121512
|
const timer = setTimeout(() => {
|
|
121501
121513
|
selectedRef.current?.scrollIntoView({ block: "nearest" });
|
|
@@ -121503,7 +121515,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121503
121515
|
return () => clearTimeout(timer);
|
|
121504
121516
|
}
|
|
121505
121517
|
}, [selectedFile, dirContents]);
|
|
121506
|
-
const toggleExpand = (0,
|
|
121518
|
+
const toggleExpand = (0, import_react31.useCallback)(
|
|
121507
121519
|
(dirPath) => {
|
|
121508
121520
|
setExpandedPaths((prev) => {
|
|
121509
121521
|
const next = new Set(prev);
|
|
@@ -121519,7 +121531,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121519
121531
|
},
|
|
121520
121532
|
[workspaceId, fetchDir]
|
|
121521
121533
|
);
|
|
121522
|
-
const ensureDirExpanded = (0,
|
|
121534
|
+
const ensureDirExpanded = (0, import_react31.useCallback)(
|
|
121523
121535
|
async (dirPath) => {
|
|
121524
121536
|
const cached2 = getCachedExpanded(workspaceId);
|
|
121525
121537
|
if (!cached2.has(dirPath)) {
|
|
@@ -121531,17 +121543,17 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121531
121543
|
},
|
|
121532
121544
|
[workspaceId, fetchDir]
|
|
121533
121545
|
);
|
|
121534
|
-
const requestNewEntry = (0,
|
|
121546
|
+
const requestNewEntry = (0, import_react31.useCallback)(
|
|
121535
121547
|
(parentPath, kind) => {
|
|
121536
121548
|
void ensureDirExpanded(parentPath);
|
|
121537
121549
|
setNewEntry({ parentPath, kind });
|
|
121538
121550
|
},
|
|
121539
121551
|
[ensureDirExpanded]
|
|
121540
121552
|
);
|
|
121541
|
-
const cancelNewEntry = (0,
|
|
121553
|
+
const cancelNewEntry = (0, import_react31.useCallback)(() => {
|
|
121542
121554
|
setNewEntry(null);
|
|
121543
121555
|
}, []);
|
|
121544
|
-
const submitNewEntry = (0,
|
|
121556
|
+
const submitNewEntry = (0, import_react31.useCallback)(
|
|
121545
121557
|
async (name24) => {
|
|
121546
121558
|
if (!newEntry) return;
|
|
121547
121559
|
const fullPath = newEntry.parentPath ? `${newEntry.parentPath}/${name24}` : name24;
|
|
@@ -121574,16 +121586,16 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121574
121586
|
[adapter, newEntry, fetchDir, onOpenFile, workspaceId]
|
|
121575
121587
|
);
|
|
121576
121588
|
const canDelete = Boolean(adapter.deleteWorkspacePath);
|
|
121577
|
-
const requestDelete = (0,
|
|
121589
|
+
const requestDelete = (0, import_react31.useCallback)((path3, kind) => {
|
|
121578
121590
|
setDeleteError(null);
|
|
121579
121591
|
setPendingDelete({ path: path3, kind });
|
|
121580
121592
|
}, []);
|
|
121581
|
-
const cancelDelete = (0,
|
|
121593
|
+
const cancelDelete = (0, import_react31.useCallback)(() => {
|
|
121582
121594
|
if (deleteSubmitting) return;
|
|
121583
121595
|
setPendingDelete(null);
|
|
121584
121596
|
setDeleteError(null);
|
|
121585
121597
|
}, [deleteSubmitting]);
|
|
121586
|
-
const confirmDelete = (0,
|
|
121598
|
+
const confirmDelete = (0, import_react31.useCallback)(async () => {
|
|
121587
121599
|
if (!pendingDelete || !adapter.deleteWorkspacePath) return;
|
|
121588
121600
|
setDeleteSubmitting(true);
|
|
121589
121601
|
setDeleteError(null);
|
|
@@ -121629,13 +121641,13 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121629
121641
|
}
|
|
121630
121642
|
}, [adapter, pendingDelete, fetchDir, workspaceId, onPathDeleted]);
|
|
121631
121643
|
const canRename = Boolean(adapter.renameWorkspacePath);
|
|
121632
|
-
const requestRename = (0,
|
|
121644
|
+
const requestRename = (0, import_react31.useCallback)((path3) => {
|
|
121633
121645
|
setRenamingPath(path3);
|
|
121634
121646
|
}, []);
|
|
121635
|
-
const cancelRename = (0,
|
|
121647
|
+
const cancelRename = (0, import_react31.useCallback)(() => {
|
|
121636
121648
|
setRenamingPath(null);
|
|
121637
121649
|
}, []);
|
|
121638
|
-
const submitRename = (0,
|
|
121650
|
+
const submitRename = (0, import_react31.useCallback)(
|
|
121639
121651
|
async (newName) => {
|
|
121640
121652
|
if (renamingPath == null || !adapter.renameWorkspacePath) return;
|
|
121641
121653
|
const oldPath = renamingPath;
|
|
@@ -121691,7 +121703,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121691
121703
|
},
|
|
121692
121704
|
[adapter, renamingPath, fetchDir, onPathRenamed, workspaceId]
|
|
121693
121705
|
);
|
|
121694
|
-
const resolveDefaultTarget = (0,
|
|
121706
|
+
const resolveDefaultTarget = (0, import_react31.useCallback)(() => {
|
|
121695
121707
|
if (treeSelection?.kind === "directory") return treeSelection.path;
|
|
121696
121708
|
if (treeSelection?.kind === "file") {
|
|
121697
121709
|
const idx = treeSelection.path.lastIndexOf("/");
|
|
@@ -121704,13 +121716,13 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121704
121716
|
const canPaste = Boolean(
|
|
121705
121717
|
clipboard && (clipboard.op === "copy" && adapter.copyWorkspacePath || clipboard.op === "cut" && adapter.renameWorkspacePath)
|
|
121706
121718
|
);
|
|
121707
|
-
const cutPath = (0,
|
|
121719
|
+
const cutPath = (0, import_react31.useCallback)((path3, kind) => {
|
|
121708
121720
|
setClipboard({ path: path3, kind, op: "cut" });
|
|
121709
121721
|
}, []);
|
|
121710
|
-
const copyPath = (0,
|
|
121722
|
+
const copyPath = (0, import_react31.useCallback)((path3, kind) => {
|
|
121711
121723
|
setClipboard({ path: path3, kind, op: "copy" });
|
|
121712
121724
|
}, []);
|
|
121713
|
-
const uniqueCopyName = (0,
|
|
121725
|
+
const uniqueCopyName = (0, import_react31.useCallback)(
|
|
121714
121726
|
(baseName, destFolder, kind) => {
|
|
121715
121727
|
const siblings = new Set(
|
|
121716
121728
|
(getCachedContents(workspaceId).get(destFolder) ?? []).map((e2) => e2.name)
|
|
@@ -121728,7 +121740,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121728
121740
|
},
|
|
121729
121741
|
[workspaceId]
|
|
121730
121742
|
);
|
|
121731
|
-
const pasteInto = (0,
|
|
121743
|
+
const pasteInto = (0, import_react31.useCallback)(
|
|
121732
121744
|
async (destFolder) => {
|
|
121733
121745
|
if (!clipboard) return;
|
|
121734
121746
|
const sourcePath = clipboard.path;
|
|
@@ -121792,7 +121804,7 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121792
121804
|
},
|
|
121793
121805
|
[adapter, clipboard, fetchDir, onPathRenamed, uniqueCopyName, workspaceId]
|
|
121794
121806
|
);
|
|
121795
|
-
(0,
|
|
121807
|
+
(0, import_react31.useImperativeHandle)(
|
|
121796
121808
|
handleRef,
|
|
121797
121809
|
() => ({
|
|
121798
121810
|
startNewFile(parentPath) {
|
|
@@ -121988,10 +122000,10 @@ var FileBrowser = (0, import_react30.forwardRef)(function FileBrowser2({
|
|
|
121988
122000
|
});
|
|
121989
122001
|
|
|
121990
122002
|
// ../../packages/dashboard-core/src/components/FileViewer.tsx
|
|
121991
|
-
var
|
|
122003
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
121992
122004
|
|
|
121993
122005
|
// ../../packages/dashboard-core/src/components/ImagePreview.tsx
|
|
121994
|
-
var
|
|
122006
|
+
var import_react32 = __toESM(require_react(), 1);
|
|
121995
122007
|
var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
|
|
121996
122008
|
|
|
121997
122009
|
// ../../packages/dashboard-core/src/components/PdfPreview.tsx
|
|
@@ -122001,22 +122013,22 @@ var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
|
|
|
122001
122013
|
var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
|
|
122002
122014
|
|
|
122003
122015
|
// ../../packages/dashboard-core/src/components/QuickOpenDialog.tsx
|
|
122004
|
-
var
|
|
122016
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
122005
122017
|
var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1);
|
|
122006
122018
|
|
|
122007
122019
|
// ../../packages/dashboard-core/src/components/SearchFilesDialog.tsx
|
|
122008
|
-
var
|
|
122020
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
122009
122021
|
var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1);
|
|
122010
122022
|
|
|
122011
122023
|
// ../../packages/dashboard-core/src/components/WorkspacePickerDialog.tsx
|
|
122012
|
-
var
|
|
122024
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
122013
122025
|
var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1);
|
|
122014
122026
|
|
|
122015
122027
|
// ../../packages/dashboard-core/src/components/WorkspaceTabNav.tsx
|
|
122016
122028
|
var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1);
|
|
122017
122029
|
|
|
122018
122030
|
// ../../packages/dashboard-core/src/hooks/use-editor-history.ts
|
|
122019
|
-
var
|
|
122031
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
122020
122032
|
|
|
122021
122033
|
// ../../node_modules/.pnpm/marked@15.0.12/node_modules/marked/lib/marked.esm.js
|
|
122022
122034
|
function _getDefaults() {
|
|
@@ -124816,7 +124828,7 @@ function sql(strings, ...params) {
|
|
|
124816
124828
|
return new SQL([new StringChunk(str)]);
|
|
124817
124829
|
}
|
|
124818
124830
|
_sql.raw = raw;
|
|
124819
|
-
function
|
|
124831
|
+
function join25(chunks, separator) {
|
|
124820
124832
|
const result = [];
|
|
124821
124833
|
for (const [i2, chunk] of chunks.entries()) {
|
|
124822
124834
|
if (i2 > 0 && separator !== void 0) result.push(separator);
|
|
@@ -124824,7 +124836,7 @@ function sql(strings, ...params) {
|
|
|
124824
124836
|
}
|
|
124825
124837
|
return new SQL(result);
|
|
124826
124838
|
}
|
|
124827
|
-
_sql.join =
|
|
124839
|
+
_sql.join = join25;
|
|
124828
124840
|
function identifier(value) {
|
|
124829
124841
|
return new Name(value);
|
|
124830
124842
|
}
|
|
@@ -125488,7 +125500,7 @@ function haveSameKeys(left, right) {
|
|
|
125488
125500
|
const leftKeys = Object.keys(left);
|
|
125489
125501
|
const rightKeys = Object.keys(right);
|
|
125490
125502
|
if (leftKeys.length !== rightKeys.length) return false;
|
|
125491
|
-
for (const [
|
|
125503
|
+
for (const [index3, key] of leftKeys.entries()) if (key !== rightKeys[index3]) return false;
|
|
125492
125504
|
return true;
|
|
125493
125505
|
}
|
|
125494
125506
|
function mapUpdateSet(table, values) {
|
|
@@ -126097,7 +126109,7 @@ function getTableAsAliasSQL(table) {
|
|
|
126097
126109
|
|
|
126098
126110
|
// src/lib/db/connection.ts
|
|
126099
126111
|
import { mkdirSync as mkdirSync2 } from "node:fs";
|
|
126100
|
-
import { join as
|
|
126112
|
+
import { join as join11 } from "node:path";
|
|
126101
126113
|
import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
|
|
126102
126114
|
|
|
126103
126115
|
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/pg-core/foreign-keys.js
|
|
@@ -129176,6 +129188,60 @@ function sqliteTableWithCasing(casing) {
|
|
|
129176
129188
|
}
|
|
129177
129189
|
var sqliteTable = sqliteTableWithCasing(void 0);
|
|
129178
129190
|
|
|
129191
|
+
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/sqlite-core/indexes.js
|
|
129192
|
+
var IndexBuilderOn = class {
|
|
129193
|
+
static [entityKind] = "SQLiteIndexBuilderOn";
|
|
129194
|
+
constructor(name24, unique) {
|
|
129195
|
+
this.name = name24;
|
|
129196
|
+
this.unique = unique;
|
|
129197
|
+
}
|
|
129198
|
+
on(...columns) {
|
|
129199
|
+
return new IndexBuilder(this.name, columns, this.unique);
|
|
129200
|
+
}
|
|
129201
|
+
};
|
|
129202
|
+
var IndexBuilder = class {
|
|
129203
|
+
static [entityKind] = "SQLiteIndexBuilder";
|
|
129204
|
+
/** @internal */
|
|
129205
|
+
config;
|
|
129206
|
+
constructor(name24, columns, unique) {
|
|
129207
|
+
this.config = {
|
|
129208
|
+
name: name24,
|
|
129209
|
+
columns,
|
|
129210
|
+
unique,
|
|
129211
|
+
where: void 0
|
|
129212
|
+
};
|
|
129213
|
+
}
|
|
129214
|
+
/**
|
|
129215
|
+
* Condition for partial index.
|
|
129216
|
+
*/
|
|
129217
|
+
where(condition) {
|
|
129218
|
+
this.config.where = condition;
|
|
129219
|
+
return this;
|
|
129220
|
+
}
|
|
129221
|
+
/** @internal */
|
|
129222
|
+
build(table) {
|
|
129223
|
+
return new Index(this.config, table);
|
|
129224
|
+
}
|
|
129225
|
+
};
|
|
129226
|
+
var Index = class {
|
|
129227
|
+
static [entityKind] = "SQLiteIndex";
|
|
129228
|
+
config;
|
|
129229
|
+
isNameExplicit;
|
|
129230
|
+
constructor(config2, table) {
|
|
129231
|
+
this.config = {
|
|
129232
|
+
...config2,
|
|
129233
|
+
table
|
|
129234
|
+
};
|
|
129235
|
+
this.isNameExplicit = !!config2.name;
|
|
129236
|
+
}
|
|
129237
|
+
};
|
|
129238
|
+
function index2(name24) {
|
|
129239
|
+
return new IndexBuilderOn(name24, false);
|
|
129240
|
+
}
|
|
129241
|
+
function uniqueIndex(name24) {
|
|
129242
|
+
return new IndexBuilderOn(name24, true);
|
|
129243
|
+
}
|
|
129244
|
+
|
|
129179
129245
|
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/sqlite-core/utils.js
|
|
129180
129246
|
function extractUsedTable(table) {
|
|
129181
129247
|
if (is(table, SQLiteTable)) return [`${table[Table.Symbol.BaseName]}`];
|
|
@@ -129272,7 +129338,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
|
|
|
129272
129338
|
const baseTableName = this.tableName;
|
|
129273
129339
|
const tableName = getTableLikeName(table);
|
|
129274
129340
|
for (const item of extractUsedTable(table)) this.usedTables.add(item);
|
|
129275
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
129341
|
+
if (typeof tableName === "string" && this.config.joins?.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
129276
129342
|
if (!this.isPartialSelect) {
|
|
129277
129343
|
if (Object.keys(this.joinsNotNullableMap).length === 1 && typeof baseTableName === "string") this.config.fields = { [baseTableName]: this.config.fields };
|
|
129278
129344
|
if (typeof tableName === "string" && !is(table, SQL)) {
|
|
@@ -130089,8 +130155,8 @@ var SQLiteDialect = class {
|
|
|
130089
130155
|
buildJoins(joins) {
|
|
130090
130156
|
if (!joins || joins.length === 0) return;
|
|
130091
130157
|
const joinsArray = [];
|
|
130092
|
-
if (joins) for (const [
|
|
130093
|
-
if (
|
|
130158
|
+
if (joins) for (const [index3, joinMeta] of joins.entries()) {
|
|
130159
|
+
if (index3 === 0) joinsArray.push(sql` `);
|
|
130094
130160
|
const table = joinMeta.table;
|
|
130095
130161
|
const onSql = joinMeta.on ? sql` on ${joinMeta.on}` : void 0;
|
|
130096
130162
|
if (is(table, SQLiteTable)) {
|
|
@@ -130100,7 +130166,7 @@ var SQLiteDialect = class {
|
|
|
130100
130166
|
const alias = tableName === origTableName ? void 0 : joinMeta.alias;
|
|
130101
130167
|
joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join ${tableSchema ? sql`${sql.identifier(tableSchema)}.` : void 0}${sql.identifier(origTableName)}${alias && sql` ${sql.identifier(alias)}`}${onSql}`);
|
|
130102
130168
|
} else joinsArray.push(sql`${sql.raw(joinMeta.joinType)} join ${table}${onSql}`);
|
|
130103
|
-
if (
|
|
130169
|
+
if (index3 < joins.length - 1) joinsArray.push(sql` `);
|
|
130104
130170
|
}
|
|
130105
130171
|
return sql.join(joinsArray);
|
|
130106
130172
|
}
|
|
@@ -130109,9 +130175,9 @@ var SQLiteDialect = class {
|
|
|
130109
130175
|
}
|
|
130110
130176
|
buildOrderBy(orderBy) {
|
|
130111
130177
|
const orderByList = [];
|
|
130112
|
-
if (orderBy) for (const [
|
|
130178
|
+
if (orderBy) for (const [index3, orderByValue] of orderBy.entries()) {
|
|
130113
130179
|
orderByList.push(orderByValue);
|
|
130114
|
-
if (
|
|
130180
|
+
if (index3 < orderBy.length - 1) orderByList.push(sql`, `);
|
|
130115
130181
|
}
|
|
130116
130182
|
return orderByList.length > 0 ? sql` order by ${sql.join(orderByList)}` : void 0;
|
|
130117
130183
|
}
|
|
@@ -130139,9 +130205,9 @@ var SQLiteDialect = class {
|
|
|
130139
130205
|
const whereSql = where ? sql` where ${where}` : void 0;
|
|
130140
130206
|
const havingSql = having ? sql` having ${having}` : void 0;
|
|
130141
130207
|
const groupByList = [];
|
|
130142
|
-
if (groupBy) for (const [
|
|
130208
|
+
if (groupBy) for (const [index3, groupByValue] of groupBy.entries()) {
|
|
130143
130209
|
groupByList.push(groupByValue);
|
|
130144
|
-
if (
|
|
130210
|
+
if (index3 < groupBy.length - 1) groupByList.push(sql`, `);
|
|
130145
130211
|
}
|
|
130146
130212
|
const finalQuery = sql`${withSql}select${distinctSql} ${selection} from ${tableSql}${joinsSql}${whereSql}${groupByList.length > 0 ? sql` group by ${sql.join(groupByList)}` : void 0}${havingSql}${this.buildOrderBy(orderBy)}${this.buildLimit(limit)}${offset4 ? sql` offset ${offset4}` : void 0}`;
|
|
130147
130213
|
if (setOperators.length > 0) return this.buildSetOperations(finalQuery, setOperators);
|
|
@@ -130480,7 +130546,7 @@ var SQLiteDialect = class {
|
|
|
130480
130546
|
if (!joins2) return;
|
|
130481
130547
|
const withEntries = Object.entries(joins2).filter(([_4, v4]) => v4);
|
|
130482
130548
|
if (!withEntries.length) return;
|
|
130483
|
-
return sql.join(withEntries.map(([k4,
|
|
130549
|
+
return sql.join(withEntries.map(([k4, join25]) => {
|
|
130484
130550
|
const relation = tableConfig.relations[k4];
|
|
130485
130551
|
const isSingle2 = is(relation, One);
|
|
130486
130552
|
const targetTable = aliasedTable(relation.targetTable, `d${currentDepth + 1}`);
|
|
@@ -130491,7 +130557,7 @@ var SQLiteDialect = class {
|
|
|
130491
130557
|
table: targetTable,
|
|
130492
130558
|
mode: isSingle2 ? "first" : "many",
|
|
130493
130559
|
schema,
|
|
130494
|
-
queryConfig:
|
|
130560
|
+
queryConfig: join25,
|
|
130495
130561
|
tableConfig: schema[relation.targetTableName],
|
|
130496
130562
|
relationWhere: filter2,
|
|
130497
130563
|
isNested: true,
|
|
@@ -130505,7 +130571,7 @@ var SQLiteDialect = class {
|
|
|
130505
130571
|
key: k4,
|
|
130506
130572
|
selection: innerQuery.selection,
|
|
130507
130573
|
isArray: !isSingle2,
|
|
130508
|
-
isOptional: (relation.optional ?? false) ||
|
|
130574
|
+
isOptional: (relation.optional ?? false) || join25 !== true && !!join25.where
|
|
130509
130575
|
});
|
|
130510
130576
|
const jsonColumns = sql.join(innerQuery.selection.map((s6) => {
|
|
130511
130577
|
return sql`${sql.raw(this.escapeString(s6.key))}, ${s6.selection ? sql`${jsonb2}(${sql.identifier(s6.key)})` : sql.identifier(s6.key)}`;
|
|
@@ -130974,7 +131040,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
|
|
|
130974
131040
|
createJoin(joinType) {
|
|
130975
131041
|
return ((table, on) => {
|
|
130976
131042
|
const tableName = getTableLikeName(table);
|
|
130977
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
131043
|
+
if (typeof tableName === "string" && this.config.joins.some((join25) => join25.alias === tableName)) throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
130978
131044
|
if (typeof on === "function") {
|
|
130979
131045
|
const from = this.config.from ? is(table, SQLiteTable) ? table[Table.Symbol.Columns] : is(table, Subquery) ? table._.selectedFields : is(table, SQLiteViewBase) ? table[ViewBaseConfig].selectedFields : void 0 : void 0;
|
|
130980
131046
|
on = on(new Proxy(this.config.table[Table.Symbol.Columns], new SelectionProxyHandler({
|
|
@@ -131717,13 +131783,13 @@ function drizzle(...params) {
|
|
|
131717
131783
|
// ../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.1_@opentelemetry+api@1.9.0_@types+better-sqlite3@7.6.13_better-sql_95478898f63cc8c3fbbd0c5f8c1e464f/node_modules/drizzle-orm/migrator.js
|
|
131718
131784
|
import crypto2 from "node:crypto";
|
|
131719
131785
|
import fs3, { existsSync as existsSync3, readdirSync as readdirSync5 } from "node:fs";
|
|
131720
|
-
import { join as
|
|
131786
|
+
import { join as join10 } from "node:path";
|
|
131721
131787
|
function readMigrationFiles(config2) {
|
|
131722
131788
|
if (fs3.existsSync(`${config2.migrationsFolder}/meta/_journal.json`)) throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');
|
|
131723
131789
|
const migrationFolderTo = config2.migrationsFolder;
|
|
131724
131790
|
const migrationQueries = [];
|
|
131725
131791
|
const migrations = readdirSync5(migrationFolderTo).map((subdir) => ({
|
|
131726
|
-
path:
|
|
131792
|
+
path: join10(migrationFolderTo, subdir, "migration.sql"),
|
|
131727
131793
|
name: subdir
|
|
131728
131794
|
})).filter((it) => existsSync3(it.path));
|
|
131729
131795
|
migrations.sort((a6, b10) => a6.name.localeCompare(b10.name));
|
|
@@ -131756,6 +131822,7 @@ function migrate(db2, config2) {
|
|
|
131756
131822
|
var schema_exports = {};
|
|
131757
131823
|
__export(schema_exports, {
|
|
131758
131824
|
branchStatuses: () => branchStatuses,
|
|
131825
|
+
browserHistory: () => browserHistory,
|
|
131759
131826
|
cronjobs: () => cronjobs,
|
|
131760
131827
|
panelStates: () => panelStates,
|
|
131761
131828
|
projects: () => projects,
|
|
@@ -131839,16 +131906,32 @@ var cronjobs = sqliteTable("cronjobs", {
|
|
|
131839
131906
|
lastRunAt: text3("last_run_at"),
|
|
131840
131907
|
lastRunStatus: text3("last_run_status", { enum: ["completed", "failed", "skipped"] })
|
|
131841
131908
|
});
|
|
131909
|
+
var browserHistory = sqliteTable(
|
|
131910
|
+
"browser_history",
|
|
131911
|
+
{
|
|
131912
|
+
id: integer3("id").primaryKey({ autoIncrement: true }),
|
|
131913
|
+
workspaceId: text3("workspace_id").notNull(),
|
|
131914
|
+
url: text3("url").notNull(),
|
|
131915
|
+
title: text3("title"),
|
|
131916
|
+
faviconUrl: text3("favicon_url"),
|
|
131917
|
+
lastVisitedAt: integer3("last_visited_at").notNull(),
|
|
131918
|
+
visitCount: integer3("visit_count").notNull().default(1)
|
|
131919
|
+
},
|
|
131920
|
+
(t6) => [
|
|
131921
|
+
uniqueIndex("browser_history_workspace_url_uq").on(t6.workspaceId, t6.url),
|
|
131922
|
+
index2("browser_history_workspace_visited_idx").on(t6.workspaceId, t6.lastVisitedAt)
|
|
131923
|
+
]
|
|
131924
|
+
);
|
|
131842
131925
|
|
|
131843
131926
|
// src/lib/db/connection.ts
|
|
131844
|
-
var migrationsFolder =
|
|
131927
|
+
var migrationsFolder = join11(import.meta.dirname, "migrations");
|
|
131845
131928
|
var _db = null;
|
|
131846
131929
|
var _sqlite = null;
|
|
131847
131930
|
function getDb() {
|
|
131848
131931
|
if (_db) return _db;
|
|
131849
131932
|
const home = bandHome();
|
|
131850
131933
|
mkdirSync2(home, { recursive: true });
|
|
131851
|
-
const dbPath =
|
|
131934
|
+
const dbPath = join11(home, "band.db");
|
|
131852
131935
|
_sqlite = new DatabaseSync2(dbPath);
|
|
131853
131936
|
_sqlite.exec("PRAGMA journal_mode = WAL");
|
|
131854
131937
|
_sqlite.exec("PRAGMA foreign_keys = ON");
|
|
@@ -131867,7 +131950,7 @@ function closeDb() {
|
|
|
131867
131950
|
// src/lib/state.ts
|
|
131868
131951
|
function bandHome() {
|
|
131869
131952
|
if (process.env.BAND_HOME) return process.env.BAND_HOME;
|
|
131870
|
-
return
|
|
131953
|
+
return join12(homedir7(), ".band");
|
|
131871
131954
|
}
|
|
131872
131955
|
function loadState() {
|
|
131873
131956
|
const db2 = getDb();
|
|
@@ -131921,7 +132004,7 @@ function saveState(state2) {
|
|
|
131921
132004
|
});
|
|
131922
132005
|
}
|
|
131923
132006
|
function settingsFile() {
|
|
131924
|
-
return
|
|
132007
|
+
return join12(bandHome(), "settings.json");
|
|
131925
132008
|
}
|
|
131926
132009
|
function loadSettings() {
|
|
131927
132010
|
try {
|
|
@@ -131971,7 +132054,7 @@ function getOrCreateToken() {
|
|
|
131971
132054
|
}
|
|
131972
132055
|
function worktreesDir() {
|
|
131973
132056
|
const settings = loadSettings();
|
|
131974
|
-
return settings.worktreesDir ??
|
|
132057
|
+
return settings.worktreesDir ?? join12(bandHome(), "worktrees");
|
|
131975
132058
|
}
|
|
131976
132059
|
function loadCurrentStatuses() {
|
|
131977
132060
|
const db2 = getDb();
|
|
@@ -132075,7 +132158,7 @@ var pool = g2[POOL_KEY];
|
|
|
132075
132158
|
var pending = g2[PENDING_KEY];
|
|
132076
132159
|
function loadClaudeSettingsModel() {
|
|
132077
132160
|
try {
|
|
132078
|
-
const data = readFileSync5(
|
|
132161
|
+
const data = readFileSync5(join13(homedir8(), ".claude", "settings.json"), "utf-8");
|
|
132079
132162
|
const parsed = JSON.parse(data);
|
|
132080
132163
|
return typeof parsed.model === "string" ? parsed.model : void 0;
|
|
132081
132164
|
} catch {
|
|
@@ -132094,7 +132177,7 @@ function getAgentConfig(worktreePath, agentId) {
|
|
|
132094
132177
|
type: agentDef.type,
|
|
132095
132178
|
workspaceDir: worktreePath,
|
|
132096
132179
|
maxTurns: 100,
|
|
132097
|
-
additionalDirectories: [
|
|
132180
|
+
additionalDirectories: [join13(bandHome(), "uploads"), join13(bandHome(), "shared")],
|
|
132098
132181
|
options: {
|
|
132099
132182
|
executablePath: agentDef.command,
|
|
132100
132183
|
model,
|
|
@@ -132411,7 +132494,7 @@ function removeChatFromLayout(workspaceId, chatId) {
|
|
|
132411
132494
|
// src/lib/git.ts
|
|
132412
132495
|
import { execFile as execFile2 } from "node:child_process";
|
|
132413
132496
|
import { readFile, stat as stat3 } from "node:fs/promises";
|
|
132414
|
-
import { join as
|
|
132497
|
+
import { join as join14 } from "node:path";
|
|
132415
132498
|
function parseGitRemoteUrl(url2) {
|
|
132416
132499
|
const sshMatch = url2.match(/^[\w.-]+@([^:]+):([^/]+)\/(.+?)(?:\.git)?$/);
|
|
132417
132500
|
if (sshMatch) {
|
|
@@ -132521,7 +132604,7 @@ async function listWorktrees(repoPath) {
|
|
|
132521
132604
|
return worktrees2;
|
|
132522
132605
|
}
|
|
132523
132606
|
async function resolveDetachedBranch(worktreePath) {
|
|
132524
|
-
const dotGit =
|
|
132607
|
+
const dotGit = join14(worktreePath, ".git");
|
|
132525
132608
|
let gitdir;
|
|
132526
132609
|
try {
|
|
132527
132610
|
const st = await stat3(dotGit);
|
|
@@ -132538,7 +132621,7 @@ async function resolveDetachedBranch(worktreePath) {
|
|
|
132538
132621
|
}
|
|
132539
132622
|
for (const rebaseDir of ["rebase-merge", "rebase-apply"]) {
|
|
132540
132623
|
try {
|
|
132541
|
-
const headName = await readFile(
|
|
132624
|
+
const headName = await readFile(join14(gitdir, rebaseDir, "head-name"), "utf-8");
|
|
132542
132625
|
const name24 = headName.trim();
|
|
132543
132626
|
return name24.startsWith("refs/heads/") ? name24.slice("refs/heads/".length) : name24;
|
|
132544
132627
|
} catch {
|
|
@@ -132809,10 +132892,10 @@ async function getBatchedCIStatuses(workspaces) {
|
|
|
132809
132892
|
repoInfoCache.clear();
|
|
132810
132893
|
const resolved = [];
|
|
132811
132894
|
await Promise.allSettled(
|
|
132812
|
-
workspaces.map(async (ws,
|
|
132895
|
+
workspaces.map(async (ws, index3) => {
|
|
132813
132896
|
const repoInfo = await resolveRepoInfo(ws.projectPath);
|
|
132814
132897
|
if (repoInfo) {
|
|
132815
|
-
resolved.push({ ws, repoInfo, alias: `ws_${
|
|
132898
|
+
resolved.push({ ws, repoInfo, alias: `ws_${index3}` });
|
|
132816
132899
|
} else {
|
|
132817
132900
|
console.error(
|
|
132818
132901
|
`CI poll: failed to resolve repo info for ${ws.workspaceId} (${ws.projectPath})`
|
|
@@ -132982,10 +133065,10 @@ import { spawn as spawn5 } from "node:child_process";
|
|
|
132982
133065
|
|
|
132983
133066
|
// src/lib/project-config.ts
|
|
132984
133067
|
import { existsSync as existsSync4, readFileSync as readFileSync6 } from "node:fs";
|
|
132985
|
-
import { join as
|
|
133068
|
+
import { join as join15 } from "node:path";
|
|
132986
133069
|
function loadProjectConfig(worktreePath, projectPath) {
|
|
132987
133070
|
for (const base2 of [worktreePath, projectPath]) {
|
|
132988
|
-
const configPath =
|
|
133071
|
+
const configPath = join15(base2, ".band", "config.json");
|
|
132989
133072
|
if (existsSync4(configPath)) {
|
|
132990
133073
|
try {
|
|
132991
133074
|
return JSON.parse(readFileSync6(configPath, "utf-8"));
|
|
@@ -133412,7 +133495,7 @@ function clearQueuedMessages(chatId) {
|
|
|
133412
133495
|
// src/lib/task-runner.ts
|
|
133413
133496
|
init_src();
|
|
133414
133497
|
import { mkdirSync as mkdirSync4, readdirSync as readdirSync6 } from "node:fs";
|
|
133415
|
-
import { join as
|
|
133498
|
+
import { join as join17 } from "node:path";
|
|
133416
133499
|
|
|
133417
133500
|
// src/lib/mime-types.ts
|
|
133418
133501
|
import { extname } from "node:path";
|
|
@@ -133554,6 +133637,68 @@ function cleanupStaleTasks() {
|
|
|
133554
133637
|
}
|
|
133555
133638
|
return count3;
|
|
133556
133639
|
}
|
|
133640
|
+
function deleteWorkspaceTasks(workspaceId) {
|
|
133641
|
+
const db2 = getDb();
|
|
133642
|
+
const result = db2.delete(tasks).where(eq2(tasks.workspaceId, workspaceId)).run();
|
|
133643
|
+
return result.changes;
|
|
133644
|
+
}
|
|
133645
|
+
function deleteTasksOlderThan(cutoffMs) {
|
|
133646
|
+
const db2 = getDb();
|
|
133647
|
+
const result = db2.delete(tasks).where(
|
|
133648
|
+
or(
|
|
133649
|
+
and(isNull(tasks.completedAt), lt(tasks.startedAt, cutoffMs)),
|
|
133650
|
+
// The explicit `isNotNull` guard is technically redundant — SQLite
|
|
133651
|
+
// treats `NULL < cutoffMs` as NULL (falsy) in a WHERE predicate, so
|
|
133652
|
+
// null-`completedAt` rows would be skipped here regardless. We keep
|
|
133653
|
+
// it so the intent is obvious without leaning on SQLite NULL
|
|
133654
|
+
// semantics, and so the query stays correct under a future Drizzle
|
|
133655
|
+
// or backend swap.
|
|
133656
|
+
and(isNotNull2(tasks.completedAt), lt(tasks.completedAt, cutoffMs))
|
|
133657
|
+
)
|
|
133658
|
+
).run();
|
|
133659
|
+
return result.changes;
|
|
133660
|
+
}
|
|
133661
|
+
var TASK_RETENTION_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
133662
|
+
var TASK_PRUNE_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
133663
|
+
var PRUNE_SCHEDULER_KEY = Symbol.for("band.task-prune-scheduler");
|
|
133664
|
+
var pruneG = globalThis;
|
|
133665
|
+
if (!pruneG[PRUNE_SCHEDULER_KEY]) {
|
|
133666
|
+
pruneG[PRUNE_SCHEDULER_KEY] = { timer: null };
|
|
133667
|
+
}
|
|
133668
|
+
var pruneState = pruneG[PRUNE_SCHEDULER_KEY];
|
|
133669
|
+
function pruneOldTasks(retentionMs = TASK_RETENTION_MS) {
|
|
133670
|
+
const cutoff = Date.now() - retentionMs;
|
|
133671
|
+
const count3 = deleteTasksOlderThan(cutoff);
|
|
133672
|
+
if (count3 > 0) {
|
|
133673
|
+
log10.info({ count: count3, retentionMs }, "pruned tasks older than retention window");
|
|
133674
|
+
}
|
|
133675
|
+
return count3;
|
|
133676
|
+
}
|
|
133677
|
+
function startTaskPruneScheduler(options2 = {}) {
|
|
133678
|
+
if (pruneState.timer) return;
|
|
133679
|
+
const retentionMs = options2.retentionMs ?? TASK_RETENTION_MS;
|
|
133680
|
+
const intervalMs = options2.intervalMs ?? TASK_PRUNE_INTERVAL_MS;
|
|
133681
|
+
try {
|
|
133682
|
+
pruneOldTasks(retentionMs);
|
|
133683
|
+
} catch (err) {
|
|
133684
|
+
log10.error({ err }, "initial task prune on boot failed");
|
|
133685
|
+
}
|
|
133686
|
+
const timer = setInterval(() => {
|
|
133687
|
+
try {
|
|
133688
|
+
pruneOldTasks(retentionMs);
|
|
133689
|
+
} catch (err) {
|
|
133690
|
+
log10.error({ err }, "scheduled task prune failed");
|
|
133691
|
+
}
|
|
133692
|
+
}, intervalMs);
|
|
133693
|
+
timer.unref();
|
|
133694
|
+
pruneState.timer = timer;
|
|
133695
|
+
}
|
|
133696
|
+
function stopTaskPruneScheduler() {
|
|
133697
|
+
if (pruneState.timer) {
|
|
133698
|
+
clearInterval(pruneState.timer);
|
|
133699
|
+
pruneState.timer = null;
|
|
133700
|
+
}
|
|
133701
|
+
}
|
|
133557
133702
|
function markTaskFailed(id) {
|
|
133558
133703
|
const task = loadTask(id);
|
|
133559
133704
|
if (!task || task.status !== "running") return null;
|
|
@@ -133585,9 +133730,9 @@ function rowToRecord(row) {
|
|
|
133585
133730
|
|
|
133586
133731
|
// src/lib/upload-utils.ts
|
|
133587
133732
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
133588
|
-
import { join as
|
|
133733
|
+
import { join as join16 } from "node:path";
|
|
133589
133734
|
async function saveUploadedFilesDetailed(fileParts) {
|
|
133590
|
-
const uploadDir =
|
|
133735
|
+
const uploadDir = join16(bandHome(), "uploads");
|
|
133591
133736
|
await mkdir(uploadDir, { recursive: true });
|
|
133592
133737
|
const baseTimestamp = Date.now();
|
|
133593
133738
|
const saved = [];
|
|
@@ -133599,7 +133744,7 @@ async function saveUploadedFilesDetailed(fileParts) {
|
|
|
133599
133744
|
const filename = part.filename || `file-${baseTimestamp}`;
|
|
133600
133745
|
const safeOriginal = filename.replace(/[^a-zA-Z0-9._-]/g, "_");
|
|
133601
133746
|
const storedName = `${baseTimestamp}-${i2}-${safeOriginal}`;
|
|
133602
|
-
const filePath =
|
|
133747
|
+
const filePath = join16(uploadDir, storedName);
|
|
133603
133748
|
await writeFile(filePath, buffer);
|
|
133604
133749
|
saved.push({
|
|
133605
133750
|
path: filePath,
|
|
@@ -133853,7 +133998,7 @@ async function runTask(chatId, task) {
|
|
|
133853
133998
|
updateChatStatus(chatId, "running");
|
|
133854
133999
|
const working = upsertWorkspaceStatus(task.workspaceId, { status: "working" });
|
|
133855
134000
|
emit({ kind: "update", status: working });
|
|
133856
|
-
const sharedDir =
|
|
134001
|
+
const sharedDir = join17(bandHome(), "shared", task.workspaceId);
|
|
133857
134002
|
mkdirSync4(sharedDir, { recursive: true });
|
|
133858
134003
|
const INTERACTIVE_TOOLS = /* @__PURE__ */ new Set(["AskUserQuestion", "ExitPlanMode"]);
|
|
133859
134004
|
let textPartId = "";
|
|
@@ -135742,7 +135887,7 @@ function runMigrations() {
|
|
|
135742
135887
|
// src/lib/lsp-manager.ts
|
|
135743
135888
|
init_src();
|
|
135744
135889
|
import { spawn as spawn6 } from "node:child_process";
|
|
135745
|
-
import { dirname as dirname2, join as
|
|
135890
|
+
import { dirname as dirname2, join as join18, resolve as resolve4 } from "node:path";
|
|
135746
135891
|
import { fileURLToPath } from "node:url";
|
|
135747
135892
|
|
|
135748
135893
|
// src/lib/process-utils.ts
|
|
@@ -135820,7 +135965,7 @@ async function getOrSpawnServer(workspaceId, lang) {
|
|
|
135820
135965
|
const cwd = workspace.worktree.path;
|
|
135821
135966
|
const appBin = resolve4(__dirname2, "../../node_modules/.bin");
|
|
135822
135967
|
const bundledBin = resolve4(__dirname2, "node_modules/.bin");
|
|
135823
|
-
const workspaceBin =
|
|
135968
|
+
const workspaceBin = join18(cwd, "node_modules/.bin");
|
|
135824
135969
|
const pathSep = process.platform === "win32" ? ";" : ":";
|
|
135825
135970
|
const combinedPath = [bundledBin, appBin, workspaceBin, resolvedPath].join(pathSep);
|
|
135826
135971
|
log18.debug("Spawning %s language server in %s for workspace %s", lang, cwd, workspaceId);
|
|
@@ -136037,7 +136182,7 @@ init_src();
|
|
|
136037
136182
|
// src/lib/cli.ts
|
|
136038
136183
|
import { accessSync, constants, lstatSync as lstatSync2, realpathSync as realpathSync2, symlinkSync as symlinkSync2, unlinkSync as unlinkSync2 } from "node:fs";
|
|
136039
136184
|
import { platform as platform2 } from "node:os";
|
|
136040
|
-
import { dirname as dirname3, join as
|
|
136185
|
+
import { dirname as dirname3, join as join19, resolve as resolve5 } from "node:path";
|
|
136041
136186
|
var SYMLINK_PATH = "/usr/local/bin/band";
|
|
136042
136187
|
function findCliBinary() {
|
|
136043
136188
|
const appsStrategies = [
|
|
@@ -136050,7 +136195,7 @@ function findCliBinary() {
|
|
|
136050
136195
|
];
|
|
136051
136196
|
for (const appsDir of appsStrategies) {
|
|
136052
136197
|
for (const profile of ["release", "debug"]) {
|
|
136053
|
-
const p6 =
|
|
136198
|
+
const p6 = join19(appsDir, "cli", "target", profile, "band");
|
|
136054
136199
|
try {
|
|
136055
136200
|
lstatSync2(p6);
|
|
136056
136201
|
return p6;
|
|
@@ -136086,8 +136231,8 @@ async function checkCli() {
|
|
|
136086
136231
|
} catch {
|
|
136087
136232
|
return "NotInstalled";
|
|
136088
136233
|
}
|
|
136089
|
-
const isCargoBuild = target.includes(
|
|
136090
|
-
const isElectronSidecar = target.endsWith(
|
|
136234
|
+
const isCargoBuild = target.includes(join19("apps", "cli", "target"));
|
|
136235
|
+
const isElectronSidecar = target.endsWith(join19("binaries", "band"));
|
|
136091
136236
|
if (isCargoBuild || isElectronSidecar) {
|
|
136092
136237
|
return "Installed";
|
|
136093
136238
|
}
|
|
@@ -136153,18 +136298,20 @@ function resolveCliPaths() {
|
|
|
136153
136298
|
// src/lib/cli-skills.ts
|
|
136154
136299
|
import { execFile as execFile4 } from "node:child_process";
|
|
136155
136300
|
import {
|
|
136156
|
-
accessSync as accessSync2,
|
|
136157
136301
|
existsSync as existsSync5,
|
|
136158
|
-
|
|
136302
|
+
lstatSync as lstatSync3,
|
|
136159
136303
|
mkdirSync as mkdirSync5,
|
|
136160
136304
|
mkdtempSync,
|
|
136161
136305
|
readFileSync as readFileSync7,
|
|
136306
|
+
readlinkSync as readlinkSync2,
|
|
136307
|
+
realpathSync as realpathSync3,
|
|
136162
136308
|
rmSync as rmSync2,
|
|
136163
136309
|
statSync as statSync6,
|
|
136310
|
+
symlinkSync as symlinkSync3,
|
|
136164
136311
|
writeFileSync as writeFileSync2
|
|
136165
136312
|
} from "node:fs";
|
|
136166
136313
|
import { homedir as homedir9, tmpdir } from "node:os";
|
|
136167
|
-
import { dirname as dirname4, join as
|
|
136314
|
+
import { dirname as dirname4, join as join20 } from "node:path";
|
|
136168
136315
|
var BAND_SKILL_NAMES = [
|
|
136169
136316
|
"band",
|
|
136170
136317
|
"band-chat",
|
|
@@ -136174,30 +136321,23 @@ var BAND_SKILL_NAMES = [
|
|
|
136174
136321
|
"band-loop"
|
|
136175
136322
|
];
|
|
136176
136323
|
var SKILL_FILE = "SKILL.md";
|
|
136177
|
-
async function
|
|
136178
|
-
|
|
136324
|
+
async function resolveSkillTargets(home = homedir9()) {
|
|
136325
|
+
const seen = /* @__PURE__ */ new Set();
|
|
136326
|
+
const out = [];
|
|
136327
|
+
for (const type of SUPPORTED_AGENT_TYPES) {
|
|
136328
|
+
const configDir = getAgentConfigDir(type, home);
|
|
136329
|
+
if (!configDir) continue;
|
|
136179
136330
|
try {
|
|
136180
|
-
|
|
136181
|
-
|
|
136331
|
+
const stat5 = statSync6(configDir);
|
|
136332
|
+
if (!stat5.isDirectory()) continue;
|
|
136182
136333
|
} catch {
|
|
136183
|
-
|
|
136334
|
+
continue;
|
|
136184
136335
|
}
|
|
136185
|
-
|
|
136186
|
-
const binaryName = await getDefaultAgentBinary(agent.type);
|
|
136187
|
-
if (!binaryName) return false;
|
|
136188
|
-
const found = await whichBinary(binaryName);
|
|
136189
|
-
return found !== null;
|
|
136190
|
-
}
|
|
136191
|
-
async function resolveSkillTargets(agents, home = homedir9()) {
|
|
136192
|
-
const seen = /* @__PURE__ */ new Set();
|
|
136193
|
-
const out = [];
|
|
136194
|
-
for (const agent of agents) {
|
|
136195
|
-
if (!await isAgentInstalled(agent)) continue;
|
|
136196
|
-
const skillsDir = await getInstallSkillsDir(agent.type, home);
|
|
136336
|
+
const skillsDir = await getInstallSkillsDir(type, home);
|
|
136197
136337
|
if (!skillsDir) continue;
|
|
136198
136338
|
if (seen.has(skillsDir)) continue;
|
|
136199
136339
|
seen.add(skillsDir);
|
|
136200
|
-
out.push({ agentType:
|
|
136340
|
+
out.push({ agentType: type, skillsDir });
|
|
136201
136341
|
}
|
|
136202
136342
|
return out;
|
|
136203
136343
|
}
|
|
@@ -136233,67 +136373,99 @@ async function installSkills(opts = {}) {
|
|
|
136233
136373
|
written: [],
|
|
136234
136374
|
updated: [],
|
|
136235
136375
|
unchanged: [],
|
|
136376
|
+
linked: [],
|
|
136377
|
+
alreadyLinked: [],
|
|
136378
|
+
conflicts: [],
|
|
136236
136379
|
skipped: []
|
|
136237
136380
|
};
|
|
136238
136381
|
const home = opts.home ?? homedir9();
|
|
136239
|
-
const
|
|
136240
|
-
const targets = await resolveSkillTargets(
|
|
136241
|
-
if (targets.length === 0) {
|
|
136242
|
-
return result;
|
|
136243
|
-
}
|
|
136382
|
+
const sharedDir = getSharedSkillsDir(home);
|
|
136383
|
+
const targets = await resolveSkillTargets(home);
|
|
136244
136384
|
const bandPath = await findBandBinary();
|
|
136245
136385
|
if (!bandPath) {
|
|
136246
136386
|
opts.log?.warn(
|
|
136247
136387
|
"Skipping CLI skills sync \u2014 band binary not found (no symlink, not on PATH, no bundled sidecar)"
|
|
136248
136388
|
);
|
|
136249
|
-
for (const
|
|
136250
|
-
|
|
136251
|
-
result.skipped.push(join19(target.skillsDir, name24, SKILL_FILE));
|
|
136252
|
-
}
|
|
136389
|
+
for (const name24 of BAND_SKILL_NAMES) {
|
|
136390
|
+
result.skipped.push(join20(sharedDir, name24, SKILL_FILE));
|
|
136253
136391
|
}
|
|
136254
136392
|
return result;
|
|
136255
136393
|
}
|
|
136256
|
-
const stagingDir = mkdtempSync(
|
|
136394
|
+
const stagingDir = mkdtempSync(join20(tmpdir(), "band-skills-"));
|
|
136257
136395
|
try {
|
|
136258
136396
|
await generateSkills(bandPath, stagingDir);
|
|
136397
|
+
for (const name24 of BAND_SKILL_NAMES) {
|
|
136398
|
+
const sourcePath = join20(stagingDir, name24, SKILL_FILE);
|
|
136399
|
+
const destPath = join20(sharedDir, name24, SKILL_FILE);
|
|
136400
|
+
if (!existsSync5(sourcePath)) {
|
|
136401
|
+
opts.log?.warn("Generated skill missing from staging dir: %s (skipping)", sourcePath);
|
|
136402
|
+
result.skipped.push(destPath);
|
|
136403
|
+
continue;
|
|
136404
|
+
}
|
|
136405
|
+
const sourceContent = readFileSync7(sourcePath);
|
|
136406
|
+
let existingContent = null;
|
|
136407
|
+
try {
|
|
136408
|
+
existingContent = readFileSync7(destPath);
|
|
136409
|
+
} catch (err) {
|
|
136410
|
+
const code = err.code;
|
|
136411
|
+
if (code !== "ENOENT") {
|
|
136412
|
+
opts.log?.warn(
|
|
136413
|
+
"Failed to read existing shared skill at %s: %s \u2014 overwriting",
|
|
136414
|
+
destPath,
|
|
136415
|
+
err instanceof Error ? err.message : String(err)
|
|
136416
|
+
);
|
|
136417
|
+
}
|
|
136418
|
+
}
|
|
136419
|
+
if (existingContent?.equals(sourceContent)) {
|
|
136420
|
+
result.unchanged.push(destPath);
|
|
136421
|
+
continue;
|
|
136422
|
+
}
|
|
136423
|
+
mkdirSync5(dirname4(destPath), { recursive: true });
|
|
136424
|
+
writeFileSync2(destPath, sourceContent);
|
|
136425
|
+
if (existingContent) {
|
|
136426
|
+
result.updated.push(destPath);
|
|
136427
|
+
opts.log?.info(
|
|
136428
|
+
"Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
|
|
136429
|
+
name24,
|
|
136430
|
+
destPath
|
|
136431
|
+
);
|
|
136432
|
+
} else {
|
|
136433
|
+
result.written.push(destPath);
|
|
136434
|
+
opts.log?.info("Installed %s skill at %s", name24, destPath);
|
|
136435
|
+
}
|
|
136436
|
+
}
|
|
136437
|
+
if (targets.length === 0) {
|
|
136438
|
+
opts.log?.info(
|
|
136439
|
+
"No supported coding agents detected on host \u2014 skills installed to %s but no agent symlinks created",
|
|
136440
|
+
sharedDir
|
|
136441
|
+
);
|
|
136442
|
+
return result;
|
|
136443
|
+
}
|
|
136259
136444
|
for (const target of targets) {
|
|
136260
136445
|
for (const name24 of BAND_SKILL_NAMES) {
|
|
136261
|
-
const
|
|
136262
|
-
const
|
|
136263
|
-
if (!existsSync5(
|
|
136264
|
-
|
|
136446
|
+
const shared2 = join20(sharedDir, name24);
|
|
136447
|
+
const link2 = join20(target.skillsDir, name24);
|
|
136448
|
+
if (!existsSync5(shared2)) {
|
|
136449
|
+
result.skipped.push(link2);
|
|
136265
136450
|
continue;
|
|
136266
136451
|
}
|
|
136267
|
-
const
|
|
136268
|
-
|
|
136269
|
-
|
|
136270
|
-
|
|
136271
|
-
|
|
136272
|
-
|
|
136273
|
-
|
|
136452
|
+
const outcome = ensureSymlink({ link: link2, target: shared2, log: opts.log });
|
|
136453
|
+
switch (outcome.kind) {
|
|
136454
|
+
case "created":
|
|
136455
|
+
result.linked.push(link2);
|
|
136456
|
+
opts.log?.info("Linked %s skills/%s \u2192 %s", target.agentType, name24, shared2);
|
|
136457
|
+
break;
|
|
136458
|
+
case "already":
|
|
136459
|
+
result.alreadyLinked.push(link2);
|
|
136460
|
+
break;
|
|
136461
|
+
case "conflict":
|
|
136462
|
+
result.conflicts.push(`${link2}: ${outcome.reason}`);
|
|
136274
136463
|
opts.log?.warn(
|
|
136275
|
-
"
|
|
136276
|
-
|
|
136277
|
-
|
|
136464
|
+
"Skill symlink conflict at %s \u2014 %s (leaving as-is; remove it manually to re-link)",
|
|
136465
|
+
link2,
|
|
136466
|
+
outcome.reason
|
|
136278
136467
|
);
|
|
136279
|
-
|
|
136280
|
-
}
|
|
136281
|
-
if (existingContent?.equals(sourceContent)) {
|
|
136282
|
-
result.unchanged.push(destPath);
|
|
136283
|
-
continue;
|
|
136284
|
-
}
|
|
136285
|
-
mkdirSync5(dirname4(destPath), { recursive: true });
|
|
136286
|
-
writeFileSync2(destPath, sourceContent);
|
|
136287
|
-
if (existingContent) {
|
|
136288
|
-
result.updated.push(destPath);
|
|
136289
|
-
opts.log?.info(
|
|
136290
|
-
"Updated %s skill at %s (content differed \u2014 local edits, if any, were overwritten)",
|
|
136291
|
-
name24,
|
|
136292
|
-
destPath
|
|
136293
|
-
);
|
|
136294
|
-
} else {
|
|
136295
|
-
result.written.push(destPath);
|
|
136296
|
-
opts.log?.info("Installed %s skill at %s", name24, destPath);
|
|
136468
|
+
break;
|
|
136297
136469
|
}
|
|
136298
136470
|
}
|
|
136299
136471
|
}
|
|
@@ -136305,14 +136477,97 @@ async function installSkills(opts = {}) {
|
|
|
136305
136477
|
}
|
|
136306
136478
|
return result;
|
|
136307
136479
|
}
|
|
136480
|
+
function ensureSymlink(args) {
|
|
136481
|
+
return ensureSymlinkInner(args, false);
|
|
136482
|
+
}
|
|
136483
|
+
function ensureSymlinkInner(args, retried) {
|
|
136484
|
+
const { link: link2, target } = args;
|
|
136485
|
+
mkdirSync5(dirname4(link2), { recursive: true });
|
|
136486
|
+
let existing = null;
|
|
136487
|
+
try {
|
|
136488
|
+
existing = lstatSync3(link2);
|
|
136489
|
+
} catch (err) {
|
|
136490
|
+
const code = err.code;
|
|
136491
|
+
if (code !== "ENOENT") {
|
|
136492
|
+
return {
|
|
136493
|
+
kind: "conflict",
|
|
136494
|
+
reason: `lstat failed: ${err instanceof Error ? err.message : String(err)}`
|
|
136495
|
+
};
|
|
136496
|
+
}
|
|
136497
|
+
}
|
|
136498
|
+
if (existing === null) {
|
|
136499
|
+
try {
|
|
136500
|
+
symlinkSync3(target, link2, "dir");
|
|
136501
|
+
return { kind: "created" };
|
|
136502
|
+
} catch (err) {
|
|
136503
|
+
if (err.code === "EEXIST") {
|
|
136504
|
+
if (retried) {
|
|
136505
|
+
return {
|
|
136506
|
+
kind: "conflict",
|
|
136507
|
+
reason: "EEXIST after retry \u2014 filesystem state is inconsistent"
|
|
136508
|
+
};
|
|
136509
|
+
}
|
|
136510
|
+
return ensureSymlinkInner(args, true);
|
|
136511
|
+
}
|
|
136512
|
+
return {
|
|
136513
|
+
kind: "conflict",
|
|
136514
|
+
reason: `failed to create symlink: ${err instanceof Error ? err.message : String(err)}`
|
|
136515
|
+
};
|
|
136516
|
+
}
|
|
136517
|
+
}
|
|
136518
|
+
if (existing.isSymbolicLink()) {
|
|
136519
|
+
let pointsAt;
|
|
136520
|
+
try {
|
|
136521
|
+
pointsAt = realpathSync3(link2);
|
|
136522
|
+
} catch (err) {
|
|
136523
|
+
return {
|
|
136524
|
+
kind: "conflict",
|
|
136525
|
+
reason: `existing symlink is broken (${err instanceof Error ? err.message : String(err)})`
|
|
136526
|
+
};
|
|
136527
|
+
}
|
|
136528
|
+
let targetReal;
|
|
136529
|
+
try {
|
|
136530
|
+
targetReal = realpathSync3(target);
|
|
136531
|
+
} catch (err) {
|
|
136532
|
+
return {
|
|
136533
|
+
kind: "conflict",
|
|
136534
|
+
reason: `target unreadable (${err instanceof Error ? err.message : String(err)})`
|
|
136535
|
+
};
|
|
136536
|
+
}
|
|
136537
|
+
if (pointsAt === targetReal) {
|
|
136538
|
+
return { kind: "already" };
|
|
136539
|
+
}
|
|
136540
|
+
return {
|
|
136541
|
+
kind: "conflict",
|
|
136542
|
+
reason: `symlink points to ${readlinkSafe(link2)} (expected ${target})`
|
|
136543
|
+
};
|
|
136544
|
+
}
|
|
136545
|
+
if (existing.isDirectory()) {
|
|
136546
|
+
return {
|
|
136547
|
+
kind: "conflict",
|
|
136548
|
+
reason: "path is a real directory (not a symlink)"
|
|
136549
|
+
};
|
|
136550
|
+
}
|
|
136551
|
+
return {
|
|
136552
|
+
kind: "conflict",
|
|
136553
|
+
reason: "path is a regular file (not a directory or symlink)"
|
|
136554
|
+
};
|
|
136555
|
+
}
|
|
136556
|
+
function readlinkSafe(p6) {
|
|
136557
|
+
try {
|
|
136558
|
+
return readlinkSync2(p6);
|
|
136559
|
+
} catch {
|
|
136560
|
+
return "<unreadable>";
|
|
136561
|
+
}
|
|
136562
|
+
}
|
|
136308
136563
|
|
|
136309
136564
|
// src/lib/hooks.ts
|
|
136310
136565
|
import { mkdirSync as mkdirSync6, readFileSync as readFileSync8, writeFileSync as writeFileSync3 } from "node:fs";
|
|
136311
136566
|
import { homedir as homedir10 } from "node:os";
|
|
136312
|
-
import { dirname as dirname5, join as
|
|
136567
|
+
import { dirname as dirname5, join as join21 } from "node:path";
|
|
136313
136568
|
var HOOK_EVENTS = ["PreToolUse", "PermissionRequest", "UserPromptSubmit", "PostToolUse", "Stop"];
|
|
136314
136569
|
function claudeSettingsPath() {
|
|
136315
|
-
return
|
|
136570
|
+
return join21(homedir10(), ".claude", "settings.json");
|
|
136316
136571
|
}
|
|
136317
136572
|
function loadClaudeSettings() {
|
|
136318
136573
|
try {
|
|
@@ -136496,12 +136751,16 @@ async function ensureSkillsInstalled() {
|
|
|
136496
136751
|
try {
|
|
136497
136752
|
const result = await installSkills({ log: log20 });
|
|
136498
136753
|
const wrote = result.written.length + result.updated.length;
|
|
136499
|
-
|
|
136754
|
+
const linkChange = result.linked.length;
|
|
136755
|
+
if (wrote > 0 || linkChange > 0 || result.conflicts.length > 0) {
|
|
136500
136756
|
log20.info(
|
|
136501
|
-
"Synced CLI skills (%d written, %d updated, %d unchanged, %d skipped)",
|
|
136757
|
+
"Synced CLI skills (shared: %d written, %d updated, %d unchanged; symlinks: %d created, %d already-linked, %d conflicts, %d skipped)",
|
|
136502
136758
|
result.written.length,
|
|
136503
136759
|
result.updated.length,
|
|
136504
136760
|
result.unchanged.length,
|
|
136761
|
+
result.linked.length,
|
|
136762
|
+
result.alreadyLinked.length,
|
|
136763
|
+
result.conflicts.length,
|
|
136505
136764
|
result.skipped.length
|
|
136506
136765
|
);
|
|
136507
136766
|
}
|
|
@@ -136513,7 +136772,7 @@ async function ensureSkillsInstalled() {
|
|
|
136513
136772
|
// src/lib/terminal-manager.ts
|
|
136514
136773
|
init_src();
|
|
136515
136774
|
import { existsSync as existsSync6 } from "node:fs";
|
|
136516
|
-
import { join as
|
|
136775
|
+
import { join as join22 } from "node:path";
|
|
136517
136776
|
|
|
136518
136777
|
// src/lib/terminal-layout-manager.ts
|
|
136519
136778
|
var manager3 = new DockviewLayoutManager("terminal_layout");
|
|
@@ -136569,7 +136828,7 @@ async function spawnTerminal(workspaceId, terminalId, options2) {
|
|
|
136569
136828
|
const workspaceRoot = workspace.worktree.path;
|
|
136570
136829
|
let cwd = workspaceRoot;
|
|
136571
136830
|
if (options2?.cwd) {
|
|
136572
|
-
const resolved =
|
|
136831
|
+
const resolved = join22(workspaceRoot, options2.cwd);
|
|
136573
136832
|
if (!resolved.startsWith(workspaceRoot)) {
|
|
136574
136833
|
log21.warn("Ignoring cwd %s \u2014 resolves outside workspace root %s", options2.cwd, workspaceRoot);
|
|
136575
136834
|
} else if (existsSync6(resolved)) {
|
|
@@ -139938,7 +140197,7 @@ var get$ref2 = (item, refs) => {
|
|
|
139938
140197
|
return { $ref: getRelativePath2(refs.currentPath, item.path) };
|
|
139939
140198
|
case "none":
|
|
139940
140199
|
case "seen": {
|
|
139941
|
-
if (item.path.length < refs.currentPath.length && item.path.every((value,
|
|
140200
|
+
if (item.path.length < refs.currentPath.length && item.path.every((value, index3) => refs.currentPath[index3] === value)) {
|
|
139942
140201
|
console.warn(`Recursive reference detected at ${refs.currentPath.join("/")}! Defaulting to any`);
|
|
139943
140202
|
return parseAnyDef2(refs);
|
|
139944
140203
|
}
|
|
@@ -141339,7 +141598,7 @@ var Server = class extends Protocol {
|
|
|
141339
141598
|
super(options2);
|
|
141340
141599
|
this._serverInfo = _serverInfo;
|
|
141341
141600
|
this._loggingLevels = /* @__PURE__ */ new Map();
|
|
141342
|
-
this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level,
|
|
141601
|
+
this.LOG_LEVEL_SEVERITY = new Map(LoggingLevelSchema.options.map((level, index3) => [level, index3]));
|
|
141343
141602
|
this.isMessageIgnored = (level, sessionId) => {
|
|
141344
141603
|
const currentLevel = this._loggingLevels.get(sessionId);
|
|
141345
141604
|
return currentLevel ? this.LOG_LEVEL_SEVERITY.get(level) < this.LOG_LEVEL_SEVERITY.get(currentLevel) : false;
|
|
@@ -141753,7 +142012,7 @@ function validateToolName(name24) {
|
|
|
141753
142012
|
warnings.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts");
|
|
141754
142013
|
}
|
|
141755
142014
|
if (!TOOL_NAME_REGEX.test(name24)) {
|
|
141756
|
-
const invalidChars = name24.split("").filter((char2) => !/[A-Za-z0-9._-]/.test(char2)).filter((char2,
|
|
142015
|
+
const invalidChars = name24.split("").filter((char2) => !/[A-Za-z0-9._-]/.test(char2)).filter((char2, index3, arr) => arr.indexOf(char2) === index3);
|
|
141757
142016
|
warnings.push(`Tool name contains invalid characters: ${invalidChars.map((c2) => `"${c2}"`).join(", ")}`, "Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)");
|
|
141758
142017
|
return {
|
|
141759
142018
|
isValid: false,
|
|
@@ -143903,11 +144162,106 @@ import { execFile as execFile5, execFileSync as execFileSync2 } from "node:child
|
|
|
143903
144162
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
143904
144163
|
import { existsSync as existsSync7, mkdirSync as mkdirSync7, unlinkSync as unlinkSync3 } from "node:fs";
|
|
143905
144164
|
import { cp, mkdir as mkdir2, readdir as readdir2, readFile as readFile2, rename, rm, stat as stat4, writeFile as writeFile2 } from "node:fs/promises";
|
|
143906
|
-
import { basename, dirname as dirname6, extname as extname2, join as
|
|
144165
|
+
import { basename, dirname as dirname6, extname as extname2, join as join23, resolve as resolve6, sep as sep2 } from "node:path";
|
|
143907
144166
|
import { promisify } from "node:util";
|
|
143908
144167
|
init_src();
|
|
143909
144168
|
init_zod();
|
|
143910
144169
|
|
|
144170
|
+
// src/lib/browser-history-store.ts
|
|
144171
|
+
var SKIP_PREFIXES = ["about:", "chrome-extension://", "devtools://", "file://"];
|
|
144172
|
+
function shouldRecord(url2) {
|
|
144173
|
+
if (!url2) return false;
|
|
144174
|
+
const trimmed = url2.trim();
|
|
144175
|
+
if (!trimmed) return false;
|
|
144176
|
+
for (const prefix of SKIP_PREFIXES) {
|
|
144177
|
+
if (trimmed.startsWith(prefix)) return false;
|
|
144178
|
+
}
|
|
144179
|
+
return true;
|
|
144180
|
+
}
|
|
144181
|
+
function recordVisit(input) {
|
|
144182
|
+
if (!shouldRecord(input.url)) return false;
|
|
144183
|
+
const db2 = getDb();
|
|
144184
|
+
const now = input.now ?? Date.now();
|
|
144185
|
+
db2.insert(browserHistory).values({
|
|
144186
|
+
workspaceId: input.workspaceId,
|
|
144187
|
+
url: input.url,
|
|
144188
|
+
title: input.title ?? null,
|
|
144189
|
+
faviconUrl: input.faviconUrl ?? null,
|
|
144190
|
+
lastVisitedAt: now,
|
|
144191
|
+
visitCount: 1
|
|
144192
|
+
}).onConflictDoUpdate({
|
|
144193
|
+
target: [browserHistory.workspaceId, browserHistory.url],
|
|
144194
|
+
set: {
|
|
144195
|
+
lastVisitedAt: now,
|
|
144196
|
+
visitCount: sql`${browserHistory.visitCount} + 1`,
|
|
144197
|
+
// Only overwrite when the new call brings a value — preserves a
|
|
144198
|
+
// title learned on a previous visit if this one happens to fire
|
|
144199
|
+
// before `page-title-updated` does.
|
|
144200
|
+
title: sql`COALESCE(${input.title ?? null}, ${browserHistory.title})`,
|
|
144201
|
+
faviconUrl: sql`COALESCE(${input.faviconUrl ?? null}, ${browserHistory.faviconUrl})`
|
|
144202
|
+
}
|
|
144203
|
+
}).run();
|
|
144204
|
+
return true;
|
|
144205
|
+
}
|
|
144206
|
+
function updateVisitMeta(input) {
|
|
144207
|
+
const db2 = getDb();
|
|
144208
|
+
const updates = {};
|
|
144209
|
+
if (input.title !== void 0) updates.title = input.title;
|
|
144210
|
+
if (input.faviconUrl !== void 0) updates.faviconUrl = input.faviconUrl;
|
|
144211
|
+
if (Object.keys(updates).length === 0) return;
|
|
144212
|
+
db2.update(browserHistory).set(updates).where(
|
|
144213
|
+
and(eq2(browserHistory.workspaceId, input.workspaceId), eq2(browserHistory.url, input.url))
|
|
144214
|
+
).run();
|
|
144215
|
+
}
|
|
144216
|
+
function listHistory(workspaceId, opts = {}) {
|
|
144217
|
+
const db2 = getDb();
|
|
144218
|
+
const limit = Math.min(Math.max(opts.limit ?? 100, 1), 500);
|
|
144219
|
+
const offset4 = Math.max(opts.offset ?? 0, 0);
|
|
144220
|
+
return db2.select().from(browserHistory).where(eq2(browserHistory.workspaceId, workspaceId)).orderBy(desc(browserHistory.lastVisitedAt)).limit(limit).offset(offset4).all();
|
|
144221
|
+
}
|
|
144222
|
+
function searchHistory(workspaceId, query, limit = 8, now = Date.now()) {
|
|
144223
|
+
const db2 = getDb();
|
|
144224
|
+
const trimmed = query.trim();
|
|
144225
|
+
if (!trimmed) return [];
|
|
144226
|
+
const escaped = trimmed.toLowerCase().replace(/[%_\\]/g, "\\$&");
|
|
144227
|
+
const pattern = `%${escaped}%`;
|
|
144228
|
+
const cappedLimit = Math.min(Math.max(limit, 1), 50);
|
|
144229
|
+
const score = sql`(
|
|
144230
|
+
CAST(${browserHistory.visitCount} AS REAL) /
|
|
144231
|
+
(1.0 + (${now} - ${browserHistory.lastVisitedAt}) / 86400000.0)
|
|
144232
|
+
)`;
|
|
144233
|
+
return db2.select().from(browserHistory).where(
|
|
144234
|
+
and(
|
|
144235
|
+
eq2(browserHistory.workspaceId, workspaceId),
|
|
144236
|
+
or(
|
|
144237
|
+
sql`LOWER(${browserHistory.url}) LIKE ${pattern} ESCAPE '\\'`,
|
|
144238
|
+
sql`LOWER(COALESCE(${browserHistory.title}, '')) LIKE ${pattern} ESCAPE '\\'`
|
|
144239
|
+
)
|
|
144240
|
+
)
|
|
144241
|
+
).orderBy(sql`${score} DESC`, desc(browserHistory.lastVisitedAt)).limit(cappedLimit).all();
|
|
144242
|
+
}
|
|
144243
|
+
function deleteHistoryEntry(id, workspaceId) {
|
|
144244
|
+
const db2 = getDb();
|
|
144245
|
+
db2.delete(browserHistory).where(and(eq2(browserHistory.id, id), eq2(browserHistory.workspaceId, workspaceId))).run();
|
|
144246
|
+
}
|
|
144247
|
+
function clearHistory(workspaceId, range, now = Date.now()) {
|
|
144248
|
+
const db2 = getDb();
|
|
144249
|
+
if (range === "all") {
|
|
144250
|
+
const result2 = db2.delete(browserHistory).where(eq2(browserHistory.workspaceId, workspaceId)).run();
|
|
144251
|
+
return Number(result2.changes ?? 0);
|
|
144252
|
+
}
|
|
144253
|
+
const windows = {
|
|
144254
|
+
hour: 60 * 60 * 1e3,
|
|
144255
|
+
day: 24 * 60 * 60 * 1e3,
|
|
144256
|
+
week: 7 * 24 * 60 * 60 * 1e3
|
|
144257
|
+
};
|
|
144258
|
+
const cutoff = now - windows[range];
|
|
144259
|
+
const result = db2.delete(browserHistory).where(
|
|
144260
|
+
and(eq2(browserHistory.workspaceId, workspaceId), gte(browserHistory.lastVisitedAt, cutoff))
|
|
144261
|
+
).run();
|
|
144262
|
+
return Number(result.changes ?? 0);
|
|
144263
|
+
}
|
|
144264
|
+
|
|
143911
144265
|
// src/lib/chat-session-summary.ts
|
|
143912
144266
|
init_src();
|
|
143913
144267
|
var log24 = createLogger("chat-session-summary");
|
|
@@ -144193,6 +144547,98 @@ function convertHistoryToUIMessages(history) {
|
|
|
144193
144547
|
});
|
|
144194
144548
|
}
|
|
144195
144549
|
|
|
144550
|
+
// src/lib/file-watcher.ts
|
|
144551
|
+
import { watch as fsWatch } from "node:fs";
|
|
144552
|
+
var IGNORED_SEGMENTS = /* @__PURE__ */ new Set([
|
|
144553
|
+
".git",
|
|
144554
|
+
"node_modules",
|
|
144555
|
+
".next",
|
|
144556
|
+
".turbo",
|
|
144557
|
+
".cache",
|
|
144558
|
+
".parcel-cache",
|
|
144559
|
+
".vite",
|
|
144560
|
+
"dist",
|
|
144561
|
+
"build",
|
|
144562
|
+
"out",
|
|
144563
|
+
"target",
|
|
144564
|
+
"coverage",
|
|
144565
|
+
".band",
|
|
144566
|
+
".DS_Store"
|
|
144567
|
+
]);
|
|
144568
|
+
var DEBOUNCE_MS = 250;
|
|
144569
|
+
var watchers = /* @__PURE__ */ new Map();
|
|
144570
|
+
function isIgnoredPath(relativePath) {
|
|
144571
|
+
if (!relativePath) return false;
|
|
144572
|
+
for (const segment of relativePath.split(/[\\/]+/)) {
|
|
144573
|
+
if (IGNORED_SEGMENTS.has(segment)) return true;
|
|
144574
|
+
}
|
|
144575
|
+
return false;
|
|
144576
|
+
}
|
|
144577
|
+
function parentDirOf(relativePath) {
|
|
144578
|
+
const normalised = relativePath.split(/[\\/]+/).join("/");
|
|
144579
|
+
const idx = normalised.lastIndexOf("/");
|
|
144580
|
+
return idx === -1 ? "" : normalised.slice(0, idx);
|
|
144581
|
+
}
|
|
144582
|
+
function scheduleEmit(workspaceId, dirPath) {
|
|
144583
|
+
const entry = watchers.get(workspaceId);
|
|
144584
|
+
if (!entry) return;
|
|
144585
|
+
const existing = entry.pendingTimers.get(dirPath);
|
|
144586
|
+
if (existing) clearTimeout(existing);
|
|
144587
|
+
const timer = setTimeout(() => {
|
|
144588
|
+
entry.pendingTimers.delete(dirPath);
|
|
144589
|
+
const current = watchers.get(workspaceId);
|
|
144590
|
+
if (!current) return;
|
|
144591
|
+
for (const listener of current.listeners) listener(dirPath);
|
|
144592
|
+
}, DEBOUNCE_MS);
|
|
144593
|
+
entry.pendingTimers.set(dirPath, timer);
|
|
144594
|
+
}
|
|
144595
|
+
function stopWatcher(workspaceId) {
|
|
144596
|
+
const entry = watchers.get(workspaceId);
|
|
144597
|
+
if (!entry) return;
|
|
144598
|
+
try {
|
|
144599
|
+
entry.watcher.close();
|
|
144600
|
+
} catch {
|
|
144601
|
+
}
|
|
144602
|
+
for (const timer of entry.pendingTimers.values()) clearTimeout(timer);
|
|
144603
|
+
entry.pendingTimers.clear();
|
|
144604
|
+
watchers.delete(workspaceId);
|
|
144605
|
+
}
|
|
144606
|
+
function subscribeToFileChanges(workspaceId, listener) {
|
|
144607
|
+
let entry = watchers.get(workspaceId);
|
|
144608
|
+
if (!entry) {
|
|
144609
|
+
const ws = resolveWorkspace(workspaceId);
|
|
144610
|
+
if (!ws) return () => {
|
|
144611
|
+
};
|
|
144612
|
+
const root = ws.worktree.path;
|
|
144613
|
+
let watcher;
|
|
144614
|
+
try {
|
|
144615
|
+
watcher = fsWatch(root, { recursive: true, persistent: false }, (_event, filename) => {
|
|
144616
|
+
if (filename == null) return;
|
|
144617
|
+
const relative = typeof filename === "string" ? filename : Buffer.from(filename).toString();
|
|
144618
|
+
if (!relative || isIgnoredPath(relative)) return;
|
|
144619
|
+
scheduleEmit(workspaceId, parentDirOf(relative));
|
|
144620
|
+
});
|
|
144621
|
+
} catch {
|
|
144622
|
+
return () => {
|
|
144623
|
+
};
|
|
144624
|
+
}
|
|
144625
|
+
entry = { watcher, listeners: /* @__PURE__ */ new Set(), pendingTimers: /* @__PURE__ */ new Map() };
|
|
144626
|
+
watchers.set(workspaceId, entry);
|
|
144627
|
+
const localEntry = entry;
|
|
144628
|
+
watcher.on("error", () => {
|
|
144629
|
+
for (const listener2 of localEntry.listeners) listener2(null);
|
|
144630
|
+
stopWatcher(workspaceId);
|
|
144631
|
+
});
|
|
144632
|
+
}
|
|
144633
|
+
entry.listeners.add(listener);
|
|
144634
|
+
return () => {
|
|
144635
|
+
const current = watchers.get(workspaceId);
|
|
144636
|
+
if (!current) return;
|
|
144637
|
+
current.listeners.delete(listener);
|
|
144638
|
+
if (current.listeners.size === 0) stopWatcher(workspaceId);
|
|
144639
|
+
};
|
|
144640
|
+
}
|
|
144641
|
+
|
|
144196
144642
|
// src/lib/fuzzy-score.ts
|
|
144197
144643
|
var SCORE_MATCH = 1;
|
|
144198
144644
|
var BONUS_CONSECUTIVE = 8;
|
|
@@ -144382,7 +144828,7 @@ var projectsRouter = t2.router({
|
|
|
144382
144828
|
}),
|
|
144383
144829
|
checkPath: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).query(({ input }) => {
|
|
144384
144830
|
const resolvedPath = resolve6(input.path);
|
|
144385
|
-
const isGitRepo = existsSync7(
|
|
144831
|
+
const isGitRepo = existsSync7(join23(resolvedPath, ".git"));
|
|
144386
144832
|
return { isGitRepo };
|
|
144387
144833
|
}),
|
|
144388
144834
|
gitInit: publicProcedure.input(external_exports2.object({ path: external_exports2.string() })).mutation(async ({ input }) => {
|
|
@@ -144491,8 +144937,8 @@ var workspacesRouter = t2.router({
|
|
|
144491
144937
|
return { ok: true, path: existing.path };
|
|
144492
144938
|
}
|
|
144493
144939
|
const wtDir = worktreesDir();
|
|
144494
|
-
const worktreePath =
|
|
144495
|
-
mkdirSync7(
|
|
144940
|
+
const worktreePath = join23(wtDir, input.project, input.branch);
|
|
144941
|
+
mkdirSync7(join23(wtDir, input.project), { recursive: true });
|
|
144496
144942
|
const { command, env } = gitCmd();
|
|
144497
144943
|
const args = ["worktree", "add"];
|
|
144498
144944
|
if (input.base) {
|
|
@@ -144556,7 +145002,7 @@ var workspacesRouter = t2.router({
|
|
|
144556
145002
|
saveState(state2);
|
|
144557
145003
|
const workspaceId = toWorkspaceId(input.project, input.branch);
|
|
144558
145004
|
try {
|
|
144559
|
-
unlinkSync3(
|
|
145005
|
+
unlinkSync3(join23(bandHome(), "workspace-prompts", `${workspaceId}.json`));
|
|
144560
145006
|
} catch {
|
|
144561
145007
|
}
|
|
144562
145008
|
deleteWorkspaceStatus(workspaceId);
|
|
@@ -144570,6 +145016,17 @@ var workspacesRouter = t2.router({
|
|
|
144570
145016
|
killWorkspaceServers(workspaceId);
|
|
144571
145017
|
stopJobsForKey(workspaceId);
|
|
144572
145018
|
deleteCronjobFile(workspaceId);
|
|
145019
|
+
try {
|
|
145020
|
+
const deletedTasks = deleteWorkspaceTasks(workspaceId);
|
|
145021
|
+
if (deletedTasks > 0) {
|
|
145022
|
+
log26.info(
|
|
145023
|
+
{ workspaceId, count: deletedTasks },
|
|
145024
|
+
"deleted workspace tasks on removal"
|
|
145025
|
+
);
|
|
145026
|
+
}
|
|
145027
|
+
} catch (err) {
|
|
145028
|
+
log26.error({ workspaceId, err }, "failed to delete workspace tasks on removal");
|
|
145029
|
+
}
|
|
144573
145030
|
emit({ kind: "remove", workspaceId });
|
|
144574
145031
|
const projPath = proj.path;
|
|
144575
145032
|
setImmediate(() => {
|
|
@@ -144674,7 +145131,7 @@ var workspacesRouter = t2.router({
|
|
|
144674
145131
|
return { ok: true };
|
|
144675
145132
|
}),
|
|
144676
145133
|
runScript: publicProcedure.input(external_exports2.object({ path: external_exports2.string(), scriptType: external_exports2.string() })).mutation(({ input }) => {
|
|
144677
|
-
const scriptPath =
|
|
145134
|
+
const scriptPath = join23(input.path, ".band", input.scriptType);
|
|
144678
145135
|
if (!existsSync7(scriptPath)) {
|
|
144679
145136
|
throw new Error(`Script "${input.scriptType}" not found`);
|
|
144680
145137
|
}
|
|
@@ -144812,7 +145269,7 @@ function parseFileStatuses(nameStatusOutput) {
|
|
|
144812
145269
|
}
|
|
144813
145270
|
async function readUntrackedFileLines(cwd, file2) {
|
|
144814
145271
|
try {
|
|
144815
|
-
const content2 = await readFile2(
|
|
145272
|
+
const content2 = await readFile2(join23(cwd, file2), "utf-8");
|
|
144816
145273
|
const lines = content2.split("\n");
|
|
144817
145274
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
144818
145275
|
lines.pop();
|
|
@@ -144829,6 +145286,58 @@ var workspaceRouter = t2.router({
|
|
|
144829
145286
|
const config2 = loadWorkspaceTerminalConfig(workspace.worktree.path, workspace.project.path);
|
|
144830
145287
|
return { config: config2 };
|
|
144831
145288
|
}),
|
|
145289
|
+
/**
|
|
145290
|
+
* Subscribe to external file-system changes inside a single workspace.
|
|
145291
|
+
* The watcher is started on demand for that workspace and torn down when
|
|
145292
|
+
* the last subscriber disconnects, so we don't keep OS watch handles
|
|
145293
|
+
* open on every worktree the user has ever added (see issue #384).
|
|
145294
|
+
*
|
|
145295
|
+
* Yields one event per coalesced (parentDir) change; `path` is the
|
|
145296
|
+
* workspace-relative parent directory ("" for the worktree root). The
|
|
145297
|
+
* FileBrowser uses it as a cache invalidation key.
|
|
145298
|
+
*
|
|
145299
|
+
* Auth: enforced at the transport layer (the `band_token` cookie gates
|
|
145300
|
+
* the WebSocket upgrade and HTTP requests in start-server.ts), so no
|
|
145301
|
+
* per-procedure guard is needed — consistent with the rest of
|
|
145302
|
+
* `workspaceRouter`.
|
|
145303
|
+
*/
|
|
145304
|
+
fileChanges: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string() })).subscription(async function* (opts) {
|
|
145305
|
+
if (!opts.signal) {
|
|
145306
|
+
throw new Error(
|
|
145307
|
+
"workspace.fileChanges requires a cancellable subscription (opts.signal missing)"
|
|
145308
|
+
);
|
|
145309
|
+
}
|
|
145310
|
+
const signal = opts.signal;
|
|
145311
|
+
const queue = [];
|
|
145312
|
+
let resolve8 = null;
|
|
145313
|
+
let watcherClosed = false;
|
|
145314
|
+
const unsubscribe = subscribeToFileChanges(opts.input.workspaceId, (path3) => {
|
|
145315
|
+
if (path3 === null) {
|
|
145316
|
+
watcherClosed = true;
|
|
145317
|
+
} else {
|
|
145318
|
+
queue.push({ path: path3 });
|
|
145319
|
+
}
|
|
145320
|
+
resolve8?.();
|
|
145321
|
+
});
|
|
145322
|
+
const onAbort = () => resolve8?.();
|
|
145323
|
+
signal.addEventListener("abort", onAbort);
|
|
145324
|
+
try {
|
|
145325
|
+
while (!signal.aborted && !watcherClosed) {
|
|
145326
|
+
while (queue.length > 0) {
|
|
145327
|
+
yield queue.shift();
|
|
145328
|
+
}
|
|
145329
|
+
if (signal.aborted || watcherClosed) break;
|
|
145330
|
+
await new Promise((r6) => {
|
|
145331
|
+
resolve8 = r6;
|
|
145332
|
+
if (signal.aborted || watcherClosed) r6();
|
|
145333
|
+
});
|
|
145334
|
+
resolve8 = null;
|
|
145335
|
+
}
|
|
145336
|
+
} finally {
|
|
145337
|
+
signal.removeEventListener("abort", onAbort);
|
|
145338
|
+
unsubscribe();
|
|
145339
|
+
}
|
|
145340
|
+
}),
|
|
144832
145341
|
listBranches: publicProcedure.input(external_exports2.object({ workspaceId: external_exports2.string() })).query(async ({ input }) => {
|
|
144833
145342
|
const workspace = resolveWorkspace(input.workspaceId);
|
|
144834
145343
|
if (!workspace) {
|
|
@@ -144986,7 +145495,7 @@ var workspaceRouter = t2.router({
|
|
|
144986
145495
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
144987
145496
|
if (untrackedFiles.includes(input.filePath)) {
|
|
144988
145497
|
try {
|
|
144989
|
-
const content2 = await readFile2(
|
|
145498
|
+
const content2 = await readFile2(join23(cwd, input.filePath), "utf-8");
|
|
144990
145499
|
const lines = content2.split("\n");
|
|
144991
145500
|
if (lines.length > 0 && lines[lines.length - 1] === "") {
|
|
144992
145501
|
lines.pop();
|
|
@@ -145031,7 +145540,7 @@ var workspaceRouter = t2.router({
|
|
|
145031
145540
|
const untrackedOutput = await execGit(["ls-files", "--others", "--exclude-standard"], cwd);
|
|
145032
145541
|
const untrackedFiles = untrackedOutput.trim().split("\n").filter(Boolean);
|
|
145033
145542
|
if (untrackedFiles.includes(filePath)) {
|
|
145034
|
-
await rm(
|
|
145543
|
+
await rm(join23(cwd, filePath), { force: true });
|
|
145035
145544
|
return { ok: true };
|
|
145036
145545
|
}
|
|
145037
145546
|
const { mergeBase: ref } = await resolveDiffContext(
|
|
@@ -145194,7 +145703,7 @@ var workspaceRouter = t2.router({
|
|
|
145194
145703
|
throw new Error("Workspace not found");
|
|
145195
145704
|
}
|
|
145196
145705
|
const root = workspace.worktree.path;
|
|
145197
|
-
const target = resolve6(
|
|
145706
|
+
const target = resolve6(join23(root, input.path));
|
|
145198
145707
|
if (!target.startsWith(root)) {
|
|
145199
145708
|
throw new Error("Invalid path");
|
|
145200
145709
|
}
|
|
@@ -145217,7 +145726,7 @@ var workspaceRouter = t2.router({
|
|
|
145217
145726
|
throw new Error("Path is required");
|
|
145218
145727
|
}
|
|
145219
145728
|
const root = workspace.worktree.path;
|
|
145220
|
-
const target = resolve6(
|
|
145729
|
+
const target = resolve6(join23(root, input.path));
|
|
145221
145730
|
if (!target.startsWith(root)) {
|
|
145222
145731
|
throw new Error("Invalid path");
|
|
145223
145732
|
}
|
|
@@ -145251,7 +145760,7 @@ var workspaceRouter = t2.router({
|
|
|
145251
145760
|
throw new Error("Workspace not found");
|
|
145252
145761
|
}
|
|
145253
145762
|
const root = workspace.worktree.path;
|
|
145254
|
-
const target = resolve6(
|
|
145763
|
+
const target = resolve6(join23(root, input.path));
|
|
145255
145764
|
if (!target.startsWith(root)) {
|
|
145256
145765
|
throw new Error("Invalid path");
|
|
145257
145766
|
}
|
|
@@ -145274,7 +145783,7 @@ var workspaceRouter = t2.router({
|
|
|
145274
145783
|
throw new Error("Workspace not found");
|
|
145275
145784
|
}
|
|
145276
145785
|
const root = workspace.worktree.path;
|
|
145277
|
-
const target = resolve6(
|
|
145786
|
+
const target = resolve6(join23(root, input.path));
|
|
145278
145787
|
if (!target.startsWith(root) || target === root) {
|
|
145279
145788
|
throw new Error("Invalid path");
|
|
145280
145789
|
}
|
|
@@ -145303,7 +145812,7 @@ var workspaceRouter = t2.router({
|
|
|
145303
145812
|
throw new Error("Workspace not found");
|
|
145304
145813
|
}
|
|
145305
145814
|
const root = workspace.worktree.path;
|
|
145306
|
-
const target = resolve6(
|
|
145815
|
+
const target = resolve6(join23(root, input.path));
|
|
145307
145816
|
if (!target.startsWith(root) || target === root) {
|
|
145308
145817
|
throw new Error("Invalid path");
|
|
145309
145818
|
}
|
|
@@ -145332,7 +145841,7 @@ var workspaceRouter = t2.router({
|
|
|
145332
145841
|
throw new Error("Workspace not found");
|
|
145333
145842
|
}
|
|
145334
145843
|
const root = workspace.worktree.path;
|
|
145335
|
-
const target = resolve6(
|
|
145844
|
+
const target = resolve6(join23(root, input.path));
|
|
145336
145845
|
if (!target.startsWith(root) || target === root) {
|
|
145337
145846
|
throw new Error("Invalid path");
|
|
145338
145847
|
}
|
|
@@ -145364,8 +145873,8 @@ var workspaceRouter = t2.router({
|
|
|
145364
145873
|
throw new Error("Workspace not found");
|
|
145365
145874
|
}
|
|
145366
145875
|
const root = workspace.worktree.path;
|
|
145367
|
-
const fromTarget = resolve6(
|
|
145368
|
-
const toTarget = resolve6(
|
|
145876
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145877
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145369
145878
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145370
145879
|
throw new Error("Invalid source path");
|
|
145371
145880
|
}
|
|
@@ -145415,8 +145924,8 @@ var workspaceRouter = t2.router({
|
|
|
145415
145924
|
throw new Error("Workspace not found");
|
|
145416
145925
|
}
|
|
145417
145926
|
const root = workspace.worktree.path;
|
|
145418
|
-
const fromTarget = resolve6(
|
|
145419
|
-
const toTarget = resolve6(
|
|
145927
|
+
const fromTarget = resolve6(join23(root, input.fromPath));
|
|
145928
|
+
const toTarget = resolve6(join23(root, input.toPath));
|
|
145420
145929
|
if (!fromTarget.startsWith(root) || fromTarget === root) {
|
|
145421
145930
|
throw new Error("Invalid source path");
|
|
145422
145931
|
}
|
|
@@ -146107,11 +146616,11 @@ var cronjobsRouter = t2.router({
|
|
|
146107
146616
|
}),
|
|
146108
146617
|
delete: publicProcedure.input(external_exports2.object({ key: external_exports2.string(), id: external_exports2.string() })).mutation(({ input }) => {
|
|
146109
146618
|
const file2 = loadCronjobFile(input.key);
|
|
146110
|
-
const
|
|
146111
|
-
if (
|
|
146619
|
+
const index3 = file2.jobs.findIndex((j) => j.id === input.id);
|
|
146620
|
+
if (index3 === -1) {
|
|
146112
146621
|
throw new TRPCError({ code: "NOT_FOUND", message: "Cronjob not found" });
|
|
146113
146622
|
}
|
|
146114
|
-
file2.jobs.splice(
|
|
146623
|
+
file2.jobs.splice(index3, 1);
|
|
146115
146624
|
saveCronjobFile(input.key, file2);
|
|
146116
146625
|
reloadSchedules();
|
|
146117
146626
|
return { ok: true };
|
|
@@ -146461,6 +146970,92 @@ var browserHostRouter = t2.router({
|
|
|
146461
146970
|
return { ok: true };
|
|
146462
146971
|
})
|
|
146463
146972
|
});
|
|
146973
|
+
var clearRangeSchema = external_exports2.enum(["hour", "day", "week", "all"]);
|
|
146974
|
+
var MAX_URL_LENGTH = 2048;
|
|
146975
|
+
var MAX_TITLE_LENGTH = 1024;
|
|
146976
|
+
var ALLOWED_FAVICON_SCHEMES = ["http:", "https:"];
|
|
146977
|
+
var faviconUrlSchema = external_exports2.string().max(MAX_URL_LENGTH).refine(
|
|
146978
|
+
(val) => {
|
|
146979
|
+
try {
|
|
146980
|
+
return ALLOWED_FAVICON_SCHEMES.includes(
|
|
146981
|
+
new URL(val).protocol
|
|
146982
|
+
);
|
|
146983
|
+
} catch {
|
|
146984
|
+
return false;
|
|
146985
|
+
}
|
|
146986
|
+
},
|
|
146987
|
+
{ message: "faviconUrl must be a http(s) URL" }
|
|
146988
|
+
);
|
|
146989
|
+
var historyRouter = t2.router({
|
|
146990
|
+
record: publicProcedure.input(
|
|
146991
|
+
external_exports2.object({
|
|
146992
|
+
workspaceId: external_exports2.string().min(1),
|
|
146993
|
+
url: external_exports2.string().min(1).max(MAX_URL_LENGTH),
|
|
146994
|
+
title: external_exports2.string().max(MAX_TITLE_LENGTH).optional(),
|
|
146995
|
+
faviconUrl: faviconUrlSchema.optional()
|
|
146996
|
+
})
|
|
146997
|
+
).mutation(({ input }) => {
|
|
146998
|
+
const recorded = recordVisit({
|
|
146999
|
+
workspaceId: input.workspaceId,
|
|
147000
|
+
url: input.url,
|
|
147001
|
+
title: input.title,
|
|
147002
|
+
faviconUrl: input.faviconUrl
|
|
147003
|
+
});
|
|
147004
|
+
return { ok: true, recorded };
|
|
147005
|
+
}),
|
|
147006
|
+
updateMeta: publicProcedure.input(
|
|
147007
|
+
external_exports2.object({
|
|
147008
|
+
workspaceId: external_exports2.string().min(1),
|
|
147009
|
+
url: external_exports2.string().min(1).max(MAX_URL_LENGTH),
|
|
147010
|
+
title: external_exports2.string().max(MAX_TITLE_LENGTH).optional(),
|
|
147011
|
+
faviconUrl: faviconUrlSchema.optional()
|
|
147012
|
+
})
|
|
147013
|
+
).mutation(({ input }) => {
|
|
147014
|
+
updateVisitMeta({
|
|
147015
|
+
workspaceId: input.workspaceId,
|
|
147016
|
+
url: input.url,
|
|
147017
|
+
title: input.title,
|
|
147018
|
+
faviconUrl: input.faviconUrl
|
|
147019
|
+
});
|
|
147020
|
+
return { ok: true };
|
|
147021
|
+
}),
|
|
147022
|
+
list: publicProcedure.input(
|
|
147023
|
+
external_exports2.object({
|
|
147024
|
+
workspaceId: external_exports2.string().min(1),
|
|
147025
|
+
limit: external_exports2.number().int().positive().max(500).optional(),
|
|
147026
|
+
offset: external_exports2.number().int().nonnegative().optional()
|
|
147027
|
+
})
|
|
147028
|
+
).query(({ input }) => {
|
|
147029
|
+
const entries = listHistory(input.workspaceId, {
|
|
147030
|
+
limit: input.limit,
|
|
147031
|
+
offset: input.offset
|
|
147032
|
+
});
|
|
147033
|
+
return { entries };
|
|
147034
|
+
}),
|
|
147035
|
+
search: publicProcedure.input(
|
|
147036
|
+
external_exports2.object({
|
|
147037
|
+
workspaceId: external_exports2.string().min(1),
|
|
147038
|
+
query: external_exports2.string(),
|
|
147039
|
+
limit: external_exports2.number().int().positive().max(50).optional()
|
|
147040
|
+
})
|
|
147041
|
+
).query(({ input }) => {
|
|
147042
|
+
const entries = searchHistory(input.workspaceId, input.query, input.limit ?? 8);
|
|
147043
|
+
return { entries };
|
|
147044
|
+
}),
|
|
147045
|
+
delete: publicProcedure.input(external_exports2.object({ id: external_exports2.number().int().positive(), workspaceId: external_exports2.string().min(1) })).mutation(({ input }) => {
|
|
147046
|
+
deleteHistoryEntry(input.id, input.workspaceId);
|
|
147047
|
+
return { ok: true };
|
|
147048
|
+
}),
|
|
147049
|
+
clear: publicProcedure.input(
|
|
147050
|
+
external_exports2.object({
|
|
147051
|
+
workspaceId: external_exports2.string().min(1),
|
|
147052
|
+
range: clearRangeSchema
|
|
147053
|
+
})
|
|
147054
|
+
).mutation(({ input }) => {
|
|
147055
|
+
const deleted = clearHistory(input.workspaceId, input.range);
|
|
147056
|
+
return { deleted };
|
|
147057
|
+
})
|
|
147058
|
+
});
|
|
146464
147059
|
var queuedFileSchema = external_exports2.object({
|
|
146465
147060
|
mediaType: external_exports2.string(),
|
|
146466
147061
|
url: external_exports2.string(),
|
|
@@ -146681,6 +147276,7 @@ var appRouter = t2.router({
|
|
|
146681
147276
|
browserLayout: browserLayoutRouter,
|
|
146682
147277
|
browsers: browsersRouter,
|
|
146683
147278
|
browserHost: browserHostRouter,
|
|
147279
|
+
history: historyRouter,
|
|
146684
147280
|
statuses: statusesRouter,
|
|
146685
147281
|
status: statusRouter,
|
|
146686
147282
|
cronjobs: cronjobsRouter,
|
|
@@ -146802,7 +147398,7 @@ function getScalarHtml(specUrl) {
|
|
|
146802
147398
|
function logCrash(message) {
|
|
146803
147399
|
try {
|
|
146804
147400
|
mkdirSync8(bandHome(), { recursive: true });
|
|
146805
|
-
appendFileSync2(
|
|
147401
|
+
appendFileSync2(join24(bandHome(), "server.log"), message, "utf-8");
|
|
146806
147402
|
} catch {
|
|
146807
147403
|
}
|
|
146808
147404
|
}
|
|
@@ -146827,10 +147423,11 @@ ${error40.stack || error40.message}
|
|
|
146827
147423
|
`);
|
|
146828
147424
|
process.exit(1);
|
|
146829
147425
|
});
|
|
146830
|
-
var clientDir =
|
|
147426
|
+
var clientDir = join24(import.meta.dirname, "client");
|
|
146831
147427
|
var port = parseInt(process.env.PORT || "3456", 10);
|
|
146832
147428
|
delete process.env.PORT;
|
|
146833
147429
|
process.env.BAND_PORT = String(port);
|
|
147430
|
+
delete process.env.ELECTRON_RUN_AS_NODE;
|
|
146834
147431
|
var { handleAuth, expectedToken } = createAuthMiddleware(getOrCreateToken());
|
|
146835
147432
|
var assets = build_default(clientDir, {
|
|
146836
147433
|
maxAge: 31536e3,
|
|
@@ -146838,7 +147435,7 @@ var assets = build_default(clientDir, {
|
|
|
146838
147435
|
gzip: true,
|
|
146839
147436
|
etag: true
|
|
146840
147437
|
});
|
|
146841
|
-
var openApiDoc = JSON.parse(readFileSync9(
|
|
147438
|
+
var openApiDoc = JSON.parse(readFileSync9(join24(import.meta.dirname, "openapi.json"), "utf-8"));
|
|
146842
147439
|
openApiDoc.servers = [{ url: "/trpc" }];
|
|
146843
147440
|
var openApiSpec = JSON.stringify(openApiDoc, null, 2);
|
|
146844
147441
|
var scalarHtml = getScalarHtml("/api/openapi.json");
|
|
@@ -146849,7 +147446,7 @@ function serveStaticFile(res, root, subdir, rawFilename) {
|
|
|
146849
147446
|
res.end("Bad request");
|
|
146850
147447
|
return;
|
|
146851
147448
|
}
|
|
146852
|
-
const filePath =
|
|
147449
|
+
const filePath = join24(root, subdir, filename);
|
|
146853
147450
|
try {
|
|
146854
147451
|
const fileStat = statSync7(filePath);
|
|
146855
147452
|
const contentType = mimeTypeFromFilename(filename);
|
|
@@ -146872,7 +147469,7 @@ function serveWorkspaceFile(res, workspaceId, rawPath) {
|
|
|
146872
147469
|
return;
|
|
146873
147470
|
}
|
|
146874
147471
|
const root = workspace.worktree.path;
|
|
146875
|
-
const target = resolve7(
|
|
147472
|
+
const target = resolve7(join24(root, rawPath));
|
|
146876
147473
|
if (!target.startsWith(`${root}/`) && target !== root) {
|
|
146877
147474
|
res.writeHead(400);
|
|
146878
147475
|
res.end("Bad request");
|
|
@@ -146896,6 +147493,7 @@ async function main() {
|
|
|
146896
147493
|
runMigrations();
|
|
146897
147494
|
loadChatsFromDb();
|
|
146898
147495
|
cleanupStaleTasks();
|
|
147496
|
+
startTaskPruneScheduler();
|
|
146899
147497
|
const resetCount = resetAgentStatuses();
|
|
146900
147498
|
if (resetCount > 0) {
|
|
146901
147499
|
console.log(`Reset ${resetCount} stale agent status(es) on startup`);
|
|
@@ -146924,7 +147522,7 @@ async function main() {
|
|
|
146924
147522
|
res.end("Bad request");
|
|
146925
147523
|
return;
|
|
146926
147524
|
}
|
|
146927
|
-
serveStaticFile(res, bandHome(),
|
|
147525
|
+
serveStaticFile(res, bandHome(), join24("shared", partition), rest.slice(slashIdx + 1));
|
|
146928
147526
|
return;
|
|
146929
147527
|
}
|
|
146930
147528
|
if (req.url?.startsWith("/api/workspace-file/")) {
|
|
@@ -147146,6 +147744,7 @@ async function main() {
|
|
|
147146
147744
|
const shutdown = async () => {
|
|
147147
147745
|
stopBranchStatusPoller();
|
|
147148
147746
|
stopCronjobScheduler();
|
|
147747
|
+
stopTaskPruneScheduler();
|
|
147149
147748
|
killAllTerminals();
|
|
147150
147749
|
killAllServers();
|
|
147151
147750
|
await stopTunnel().catch(() => {
|