diffing 0.2.1 → 0.4.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/README.md +169 -3
- package/dist/{cli-agent-BNwY5lZE.mjs → cli-agent-B4hU6Xay.mjs} +58 -5
- package/dist/{cli-agent-CbzXDSSF.mjs → cli-agent-B_PHd635.mjs} +58 -5
- package/dist/{cli-agent-ZAkixf4c.mjs → cli-agent-KxNAFIPf.mjs} +6 -2
- package/dist/cli-gh-CDGSpndZ.mjs +147 -0
- package/dist/cli-gh-abs-IJrz.mjs +147 -0
- package/dist/cli.mjs +1214 -56
- package/dist/client/assets/{angular-html-DsssUIMZ.js → angular-html-BVFBJbbm.js} +1 -1
- package/dist/client/assets/{angular-ts-dTg-sJ77.js → angular-ts-CbJB4bNJ.js} +1 -1
- package/dist/client/assets/{apl-C1yUKbqz.js → apl-MzqTwOQT.js} +1 -1
- package/dist/client/assets/arc-DkYz3FVO.js +1 -0
- package/dist/client/assets/architecture-7EHR7CIX-BM5HxebS.js +1 -0
- package/dist/client/assets/architectureDiagram-3BPJPVTR-CU3k1-_g.js +36 -0
- package/dist/client/assets/array-CkF66D10.js +1 -0
- package/dist/client/assets/{astro-BI07ha2y.js → astro-DDblGxmh.js} +1 -1
- package/dist/client/assets/{blade-DkzUGffS.js → blade-DlgT3iuV.js} +1 -1
- package/dist/client/assets/blockDiagram-GPEHLZMM-1lwkHRY_.js +132 -0
- package/dist/client/assets/{bsl-Dx5tFn3i.js → bsl-BrHd4RA2.js} +1 -1
- package/dist/client/assets/{c-KkuqqOvW.js → c-BL61MF4M.js} +1 -1
- package/dist/client/assets/c4Diagram-AAUBKEIU-BPBjnNM8.js +10 -0
- package/dist/client/assets/{cairo-wCCQTdA9.js → cairo-BDZ6TRZS.js} +1 -1
- package/dist/client/assets/channel-BX6tZjG6.js +1 -0
- package/dist/client/assets/chunk-2J33WTMH-C_SASPYW.js +1 -0
- package/dist/client/assets/chunk-3OPIFGDE-CTcbOBts.js +62 -0
- package/dist/client/assets/chunk-4BX2VUAB-BipHnfY4.js +1 -0
- package/dist/client/assets/chunk-4EGX6M5U-C70lfA2p.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-BzJYLlnc.js +1 -0
- package/dist/client/assets/chunk-5DO6E6H7-PprNUwlI.js +1 -0
- package/dist/client/assets/chunk-5ZQYHXKU-CorupEGf.js +2 -0
- package/dist/client/assets/chunk-727SXJPM-Cqjzb4FZ.js +206 -0
- package/dist/client/assets/chunk-AQP2D5EJ-DcaAmtSe.js +231 -0
- package/dist/client/assets/chunk-BR22UD5L-D8XCYMy9.js +1 -0
- package/dist/client/assets/chunk-BSJP7CBP-CiBjSxwv.js +1 -0
- package/dist/client/assets/chunk-CSCIHK7Q-BTbf6qN3.js +124 -0
- package/dist/client/assets/chunk-FHYWG6QK-CcHPrHH1.js +1 -0
- package/dist/client/assets/chunk-FMBD7UC4-BA8_ZS2e.js +15 -0
- package/dist/client/assets/chunk-KSCS5N6A-ChcT2GOp.js +10 -0
- package/dist/client/assets/chunk-L5ZTLDWV-BjzpE0xm.js +1 -0
- package/dist/client/assets/chunk-LZXEDZCA-Bu0azrf_.js +2 -0
- package/dist/client/assets/chunk-MPE355IW-Bf9yHfDS.js +1 -0
- package/dist/client/assets/chunk-MZUSXYTE-CnUIUKI4.js +1 -0
- package/dist/client/assets/chunk-N66VUXT2-ahAf9GvV.js +1 -0
- package/dist/client/assets/chunk-ND2GUHAM-Co55RNsd.js +1 -0
- package/dist/client/assets/chunk-NNHCCRGN-DHF3V75i.js +159 -0
- package/dist/client/assets/chunk-NZK2D7GU-CtPYeO8_.js +1 -0
- package/dist/client/assets/chunk-O5CBEL6O-CzRKb_Hn.js +70 -0
- package/dist/client/assets/chunk-PUPMXCY4-D0KKIhut.js +1 -0
- package/dist/client/assets/chunk-QZHKN3VN-BCSN705V.js +1 -0
- package/dist/client/assets/chunk-UIBZB4QT-TYsZ_c8u.js +1 -0
- package/dist/client/assets/chunk-WCWK7LTN-Dj8SfnMU.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-xPWDnrji.js +1 -0
- package/dist/client/assets/chunk-XPW4576I-CYH9wUok.js +32 -0
- package/dist/client/assets/classDiagram-4FO5ZUOK-7xfBUC5E.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CFM5yYso.js +1 -0
- package/dist/client/assets/{cobol-DRh7-jLi.js → cobol-D37UDAkO.js} +1 -1
- package/dist/client/assets/{coffee-wR_ZAh9a.js → coffee-NCjhDwWZ.js} +1 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-B8RnQ-yF.js +1 -0
- package/dist/client/assets/{cpp-OD_qyywn.js → cpp-CQUNgUz4.js} +1 -1
- package/dist/client/assets/{crystal-E4ahAddE.js → crystal-DGHLJtZ_.js} +1 -1
- package/dist/client/assets/{css-2NgE_uxz.js → css-xCgEbp_3.js} +1 -1
- package/dist/client/assets/cytoscape.esm-B7MQoI9k.js +321 -0
- package/dist/client/assets/dagre-BM42HDAG-CvmQMXPT.js +4 -0
- package/dist/client/assets/dagre-DAhKikc0.js +1 -0
- package/dist/client/assets/defaultLocale-B_TxGd0k.js +1 -0
- package/dist/client/assets/diagram-2AECGRRQ-wIyWTlXo.js +43 -0
- package/dist/client/assets/diagram-5GNKFQAL-BLMMWtHj.js +10 -0
- package/dist/client/assets/diagram-KO2AKTUF-Duz_hHky.js +3 -0
- package/dist/client/assets/diagram-LMA3HP47-CftQIrJ1.js +24 -0
- package/dist/client/assets/diagram-OG6HWLK6-7odjt2qL.js +24 -0
- package/dist/client/assets/dist-PmPhNea3.js +1 -0
- package/dist/client/assets/{edge-8mbscxxD.js → edge-C6_UFojU.js} +1 -1
- package/dist/client/assets/{elixir-CJv1b3Q6.js → elixir-B12MoaTY.js} +1 -1
- package/dist/client/assets/{elm-DUPzqZ9H.js → elm-C80KxC_R.js} +1 -1
- package/dist/client/assets/erDiagram-TEJ5UH35-DOeyf617.js +85 -0
- package/dist/client/assets/{erb-ssvEF26z.js → erb-DqelkF7l.js} +1 -1
- package/dist/client/assets/{erlang-CtK0kQ6z.js → erlang-cuhwpmsu.js} +1 -1
- package/dist/client/assets/eventmodeling-FCH6USID-hlXE2E34.js +1 -0
- package/dist/client/assets/flowDiagram-I6XJVG4X-BJX7W8r0.js +162 -0
- package/dist/client/assets/{fortran-fixed-form-DBM4e0_k.js → fortran-fixed-form-DWr0EnJn.js} +1 -1
- package/dist/client/assets/{fsharp-CmzzGQLe.js → fsharp-CQ5iYSPA.js} +1 -1
- package/dist/client/assets/ganttDiagram-6RSMTGT7-CFWnCca0.js +292 -0
- package/dist/client/assets/{gdresource-B_wbPqHd.js → gdresource-CN-lsNu5.js} +1 -1
- package/dist/client/assets/{git-commit-1z4D6NzL.js → git-commit-6e79eN7Q.js} +1 -1
- package/dist/client/assets/{git-rebase-DiWIK1Oa.js → git-rebase-7L4r_tbx.js} +1 -1
- package/dist/client/assets/gitGraph-WXDBUCRP-D_3ZhTam.js +1 -0
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-oNErRHPR.js +106 -0
- package/dist/client/assets/{glimmer-js-DrHg6AuA.js → glimmer-js-8OQAbTGs.js} +1 -1
- package/dist/client/assets/{glimmer-ts-wQSGOa8A.js → glimmer-ts-3IyQiCHC.js} +1 -1
- package/dist/client/assets/{glsl-OY27QGY0.js → glsl-Bi_bzGJK.js} +1 -1
- package/dist/client/assets/graphlib-DBdw4opr.js +1 -0
- package/dist/client/assets/{graphql-CSWSqe6f.js → graphql-YcGxsBfT.js} +1 -1
- package/dist/client/assets/{hack-Bi1v624Q.js → hack-C9IpUqi6.js} +1 -1
- package/dist/client/assets/{haml-CX94zV9m.js → haml-YWDwVGeX.js} +1 -1
- package/dist/client/assets/{handlebars-C1j6wnjG.js → handlebars-zyG7ocdI.js} +1 -1
- package/dist/client/assets/{html-BcAjMlB7.js → html-CHYhpzfH.js} +1 -1
- package/dist/client/assets/{html-derivative-DcEpOzdx.js → html-derivative-BhgSILdB.js} +1 -1
- package/dist/client/assets/{http-BBxxSc6S.js → http-BPv6bUpq.js} +1 -1
- package/dist/client/assets/{hurl-CpKRNTz4.js → hurl-CpohSten.js} +1 -1
- package/dist/client/assets/{hxml-DC4KwKt2.js → hxml-nwJci6H5.js} +1 -1
- package/dist/client/assets/index-BIrpcT6-.js +3922 -0
- package/dist/client/assets/index-CMyunQt6.css +1 -0
- package/dist/client/assets/info-J43DQDTF-CAllC7mK.js +1 -0
- package/dist/client/assets/infoDiagram-5YYISTIA-D1xM4RZP.js +2 -0
- package/dist/client/assets/init-Ce66tIvf.js +1 -0
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-7DsxXa1L.js +70 -0
- package/dist/client/assets/{java-CFUlLvAA.js → java-Bt4sAY2m.js} +1 -1
- package/dist/client/assets/{javascript-C-HnT3sE.js → javascript-DZjI42QZ.js} +1 -1
- package/dist/client/assets/{jinja-CPU8RwNP.js → jinja-D2zTW07t.js} +1 -1
- package/dist/client/assets/{jison-CW0TBQOs.js → jison-Dz-ndIM5.js} +1 -1
- package/dist/client/assets/journeyDiagram-JHISSGLW-C_A1TmoL.js +139 -0
- package/dist/client/assets/{json-qUjlNuEJ.js → json-Ykn4LhOH.js} +1 -1
- package/dist/client/assets/{jsx-KWeo60kf.js → jsx-Ce8SKNSt.js} +1 -1
- package/dist/client/assets/{julia-CnJB8y2e.js → julia-DlfibiGU.js} +1 -1
- package/dist/client/assets/{just-Do22d9PP.js → just-CT2PIeY2.js} +1 -1
- package/dist/client/assets/kanban-definition-UN3LZRKU-ccKLE8Df.js +89 -0
- package/dist/client/assets/katex-eRFNlMh0.js +257 -0
- package/dist/client/assets/{latex-CCPgzvKn.js → latex-Dkfo8_p4.js} +1 -1
- package/dist/client/assets/line-BbqJI7bZ.js +1 -0
- package/dist/client/assets/linear-B7c0dSOq.js +1 -0
- package/dist/client/assets/{liquid-B9btdZoI.js → liquid-dWmg5egV.js} +1 -1
- package/dist/client/assets/{lua-IFRifurW.js → lua-6hNhLpj8.js} +1 -1
- package/dist/client/assets/{marko-CCaVBFq1.js → marko-DTVuQVoJ.js} +1 -1
- package/dist/client/assets/{mdc-BtbnOLUc.js → mdc-LbJVW6cj.js} +1 -1
- package/dist/client/assets/mermaid-parser.core-f-eKVdX9.js +4 -0
- package/dist/client/assets/mermaid.core-ClMOD6O3.js +9 -0
- package/dist/client/assets/mindmap-definition-RKZ34NQL-vaLTR09L.js +96 -0
- package/dist/client/assets/{nextflow-CApkvBGW.js → nextflow-DSfydIxt.js} +1 -1
- package/dist/client/assets/{nginx-BkbFZHVt.js → nginx-BvMTgdwH.js} +1 -1
- package/dist/client/assets/{nim-2uCd5j65.js → nim-BdGYhiTu.js} +1 -1
- package/dist/client/assets/ordinal-5ziJS8mo.js +1 -0
- package/dist/client/assets/packet-YPE3B663-Dy58IAiO.js +1 -0
- package/dist/client/assets/path-g3G46IZB.js +1 -0
- package/dist/client/assets/{perl-C4ixqSNT.js → perl-DamEOAxn.js} +1 -1
- package/dist/client/assets/{php-DJ8WOtcI.js → php-DtubpAAy.js} +1 -1
- package/dist/client/assets/pie-LRSECV5Y-FXFFfdz2.js +1 -0
- package/dist/client/assets/pieDiagram-4H26LBE5-yuTkGKaM.js +30 -0
- package/dist/client/assets/{pug-BOaafhT5.js → pug-CMYtl1BN.js} +1 -1
- package/dist/client/assets/{qml-CURE-1y4.js → qml-D76DCV4U.js} +1 -1
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-Db00tlGp.js +7 -0
- package/dist/client/assets/{r-CPWmgzo3.js → r-gMTLVmYP.js} +1 -1
- package/dist/client/assets/radar-GUYGQ44K-BKTzSQ68.js +1 -0
- package/dist/client/assets/{razor-DH83VP_d.js → razor-1oOg77PO.js} +1 -1
- package/dist/client/assets/{regexp-BXVWi-t_.js → regexp-BJzbycG8.js} +1 -1
- package/dist/client/assets/requirementDiagram-4Y6WPE33-CwCGFaVe.js +84 -0
- package/dist/client/assets/rough.esm-BBrzuQ0N.js +1 -0
- package/dist/client/assets/{rst-Bbxxs6E2.js → rst-Be7RtxcU.js} +1 -1
- package/dist/client/assets/{ruby-C-TuWES4.js → ruby-oyNd3WUZ.js} +1 -1
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-D78nH-eA.js +40 -0
- package/dist/client/assets/{sas-njzNYNOq.js → sas-Bx8dCxcK.js} +1 -1
- package/dist/client/assets/{scss-D2i6rHB8.js → scss-DzZEPh1d.js} +1 -1
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-CEy9mjHg.js +162 -0
- package/dist/client/assets/{shaderlab-DXAhMdPo.js → shaderlab-CbbQwRPF.js} +1 -1
- package/dist/client/assets/{shellscript-D6Bxi40C.js → shellscript-t9s0AoBc.js} +1 -1
- package/dist/client/assets/{shellsession-Defxq-I6.js → shellsession-NczJO6Io.js} +1 -1
- package/dist/client/assets/{soy-D0GKXrtT.js → soy-Dl6InSac.js} +1 -1
- package/dist/client/assets/{sparql-BdcL8cbr.js → sparql-DEoxFJ5d.js} +1 -1
- package/dist/client/assets/{sql-BRW_ADkU.js → sql-DXkZEc28.js} +1 -1
- package/dist/client/assets/src-DCIMHd9M.js +1 -0
- package/dist/client/assets/{stata-w7w59F48.js → stata-DmpUDP7M.js} +1 -1
- package/dist/client/assets/stateDiagram-AJRCARHV-Cz0qtN4R.js +1 -0
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Dye5cILT.js +1 -0
- package/dist/client/assets/{surrealql-O-lLuqz7.js → surrealql-BAZp4tA6.js} +1 -1
- package/dist/client/assets/{svelte-DN3DR5-t.js → svelte-DXBMAgu7.js} +1 -1
- package/dist/client/assets/{templ-CJ2JFoia.js → templ-CF-yfRM7.js} +1 -1
- package/dist/client/assets/{tex-CpWrf5g9.js → tex-D5tGX-j9.js} +1 -1
- package/dist/client/assets/timeline-definition-PNZ67QCA-B6_u5aFI.js +120 -0
- package/dist/client/assets/treeView-BLDUP644-DtjHwb6x.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-GqTXzMFU.js +1 -0
- package/dist/client/assets/{ts-tags-CZ6Af6Pe.js → ts-tags-DWMVxoO1.js} +1 -1
- package/dist/client/assets/{tsx-gIUSpRih.js → tsx-C6QVlWvX.js} +1 -1
- package/dist/client/assets/{twig-DwZINhmw.js → twig-DKFN0Lvm.js} +1 -1
- package/dist/client/assets/{typescript-Dj2aMECR.js → typescript-DVfrnfSW.js} +1 -1
- package/dist/client/assets/vennDiagram-CIIHVFJN-C_-TQFos.js +34 -0
- package/dist/client/assets/{vue-B5K0aWrP.js → vue-BCLQ-g1T.js} +1 -1
- package/dist/client/assets/{vue-html-DKGgrypd.js → vue-html-Ddr0JbE-.js} +1 -1
- package/dist/client/assets/{vue-vine-B5iDYTCh.js → vue-vine-CX36RUs5.js} +1 -1
- package/dist/client/assets/wardley-L42UT6IY-pROVAAhW.js +1 -0
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-BJQg7Pb-.js +78 -0
- package/dist/client/assets/{xml-CbTzxfc-.js → xml-FnMA1W8C.js} +1 -1
- package/dist/client/assets/{xsl-Dj-Be6nx.js → xsl-CLduN3zs.js} +1 -1
- package/dist/client/assets/xychartDiagram-2RQKCTM6-1Ux8tle4.js +7 -0
- package/dist/client/assets/{yaml-rTK8uEjh.js → yaml-B6hNfHm7.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/{mcp-CE77qfjx.mjs → mcp-BWeWR4yd.mjs} +2 -1
- package/dist/{mcp-CFeE13n-.mjs → mcp-DNZQvKKF.mjs} +45 -1
- package/dist/{mcp-SGCrfYGo.mjs → mcp-DO4zfNZX.mjs} +45 -1
- package/dist/plan-format-DVnF8xrq.mjs +126 -0
- package/dist/plan-format-f62JWFI-.mjs +117 -0
- package/dist/plan-format-mSDtsPcC.mjs +132 -0
- package/dist/{server-lock-B4crz9-_.mjs → server-lock-D73NKKbn.mjs} +267 -133
- package/dist/{server-lock-DpCrvL-Z.mjs → server-lock-Dj9fG9md.mjs} +246 -122
- package/package.json +26 -14
- package/dist/cli-agent-BLPX3oOP.mjs +0 -443
- package/dist/cli-agent-Cfuy9fLC.mjs +0 -179
- package/dist/cli-agent-CtNivjQW.mjs +0 -179
- package/dist/cli-agent-DZBvZoXZ.mjs +0 -179
- package/dist/cli-agent-DsqbS3n7.mjs +0 -443
- package/dist/cli-agent-Vbs-ePHv.mjs +0 -443
- package/dist/cli-agent-WzJPMH52.mjs +0 -174
- package/dist/cli-agent-uYUoCA4X.mjs +0 -179
- package/dist/client/assets/index-Bwv7BWUp.js +0 -3959
- package/dist/client/assets/index-CoZyJYkw.css +0 -1
- package/dist/mcp-BQmH_By-.mjs +0 -119
- package/dist/mcp-CLgzC8_a.mjs +0 -119
- package/dist/mcp-D9E2HQZ9.mjs +0 -119
- package/dist/mcp-DKlThflu.mjs +0 -253
- package/dist/mcp-LVbLV17O.mjs +0 -119
- package/dist/mcp-nMwTAut3.mjs +0 -119
- package/dist/server-lock-BbiF7u3F.mjs +0 -493
- package/dist/server-lock-Bx9ixiF6.mjs +0 -575
- package/dist/server-lock-CAdqFSfl.mjs +0 -691
- package/dist/server-lock-DIkImokU.mjs +0 -487
- package/dist/server-lock-DbxpfF3j.mjs +0 -575
- package/dist/update-check-DJuFE9w6.mjs +0 -128
- package/dist/update-check-DSC02MWQ.mjs +0 -129
- package/dist/client/assets/{abap-CkQ0tsz-.js → abap-cWYhO34H.js} +0 -0
- package/dist/client/assets/{actionscript-3-DHm0ZfF4.js → actionscript-3-B80ndJsD.js} +0 -0
- package/dist/client/assets/{ada-DK_ua92Z.js → ada-C0C0SoYB.js} +0 -0
- package/dist/client/assets/{andromeeda-D2ccw8v4.js → andromeeda-Ch2kWS7s.js} +0 -0
- package/dist/client/assets/{apache-DXtpFu7o.js → apache-DBwBm4bB.js} +0 -0
- package/dist/client/assets/{apex-DlnRRWpl.js → apex-FcV7UxQi.js} +0 -0
- package/dist/client/assets/{applescript-CShk62ad.js → applescript-hQs8VNpS.js} +0 -0
- package/dist/client/assets/{ara-CWN-FDkm.js → ara-BOadBOZg.js} +0 -0
- package/dist/client/assets/{asciidoc-Bg-PM9Vn.js → asciidoc-BsfqiBck.js} +0 -0
- package/dist/client/assets/{asm-DKOhR24S.js → asm-C2vUqzqz.js} +0 -0
- package/dist/client/assets/{aurora-x-DpaEirL8.js → aurora-x-BHLqzt7j.js} +0 -0
- package/dist/client/assets/{awk-3ibKHffv.js → awk-D4e-eeZT.js} +0 -0
- package/dist/client/assets/{ayu-dark-ursiSH5k.js → ayu-dark-DCotN_ZT.js} +0 -0
- package/dist/client/assets/{ayu-light-DMjlrKmx.js → ayu-light-CKB6o_im.js} +0 -0
- package/dist/client/assets/{ayu-mirage-DZEMb75h.js → ayu-mirage-B38lW-C5.js} +0 -0
- package/dist/client/assets/{ballerina-xx7VNGxs.js → ballerina-BzvFqbha.js} +0 -0
- package/dist/client/assets/{bat-DGYsZ5wR.js → bat-CFyw2ERn.js} +0 -0
- package/dist/client/assets/{beancount-D_ATR1UV.js → beancount-a6Gsu5WX.js} +0 -0
- package/dist/client/assets/{berry-BqYMORfH.js → berry-C2jyz4Ah.js} +0 -0
- package/dist/client/assets/{bibtex-CQTBDajW.js → bibtex-Dyet-B83.js} +0 -0
- package/dist/client/assets/{bicep-CfNtxPrK.js → bicep-CghvUIvy.js} +0 -0
- package/dist/client/assets/{bird2-C0dUPe3I.js → bird2-nHigvs-R.js} +0 -0
- package/dist/client/assets/{c3-BUwZ5e3k.js → c3-9ZrcmAmr.js} +0 -0
- package/dist/client/assets/{cadence-C3OKDYrr.js → cadence-BPDgYNWy.js} +0 -0
- package/dist/client/assets/{catppuccin-frappe-CMnRXVZP.js → catppuccin-frappe-BY_2ofjk.js} +0 -0
- package/dist/client/assets/{catppuccin-latte-CqhXSjCC.js → catppuccin-latte-D6GXPBmA.js} +0 -0
- package/dist/client/assets/{catppuccin-macchiato-B6kneE0C.js → catppuccin-macchiato-BuW8_cyo.js} +0 -0
- package/dist/client/assets/{catppuccin-mocha-CP8YZpvj.js → catppuccin-mocha-znex9DPe.js} +0 -0
- package/dist/client/assets/{clarity-Crxe8gSr.js → clarity-Cmao5KSK.js} +0 -0
- package/dist/client/assets/{clojure-BuzOUPMr.js → clojure-D2dPuTkk.js} +0 -0
- package/dist/client/assets/{cmake-CCpZLdLI.js → cmake-DaqQuj4A.js} +0 -0
- package/dist/client/assets/{codeowners-Bo1VYpHz.js → codeowners-B748jmvc.js} +0 -0
- package/dist/client/assets/{codeql-Db01hzHE.js → codeql-CXb_8gHR.js} +0 -0
- package/dist/client/assets/{common-lisp-CMlJIc6Y.js → common-lisp-UZn9nc_5.js} +0 -0
- package/dist/client/assets/{coq-BlzBYp3f.js → coq-DtO6yBIf.js} +0 -0
- package/dist/client/assets/{csharp-kfNshAa7.js → csharp-C3YlYcLV.js} +0 -0
- package/dist/client/assets/{csv-Dr8ri5Nd.js → csv-BBwiVr0X.js} +0 -0
- package/dist/client/assets/{cue-jXfhyOwY.js → cue-ScBFXY5f.js} +0 -0
- package/dist/client/assets/{cypher-CayLeiaR.js → cypher-CGStaC1X.js} +0 -0
- package/dist/client/assets/{d-BMZQ0mAy.js → d-CuTCIvnX.js} +0 -0
- package/dist/client/assets/{dark-plus-B__q47Nr.js → dark-plus-BvePH-r3.js} +0 -0
- package/dist/client/assets/{dart-gMOEMyuz.js → dart-CqEodbm2.js} +0 -0
- package/dist/client/assets/{dax-C3t5LadU.js → dax-UdE5S0Dh.js} +0 -0
- package/dist/client/assets/{desktop-DmhXLwLR.js → desktop-DfmsfHJA.js} +0 -0
- package/dist/client/assets/{diff-togOXQX6.js → diff-CW0RWGd9.js} +0 -0
- package/dist/client/assets/{docker--6N01olR.js → docker-B1qtW4ha.js} +0 -0
- package/dist/client/assets/{dotenv-Bq930Yx8.js → dotenv-BUzOh1k8.js} +0 -0
- package/dist/client/assets/{dracula-CBkSghcw.js → dracula-kJQjC_Gy.js} +0 -0
- package/dist/client/assets/{dracula-soft-CCSYeoxL.js → dracula-soft-B3XhEjCl.js} +0 -0
- package/dist/client/assets/{dream-maker-BiMf3DHl.js → dream-maker-CBvk18nW.js} +0 -0
- package/dist/client/assets/{emacs-lisp-Dhht7he2.js → emacs-lisp-DvSgLhDc.js} +0 -0
- package/dist/client/assets/{everforest-dark-NqSz4oHS.js → everforest-dark-u0zLn75q.js} +0 -0
- package/dist/client/assets/{everforest-light-a3Yzs_lT.js → everforest-light-D3syIoAR.js} +0 -0
- package/dist/client/assets/{fennel-BExc9TZf.js → fennel-C-1kWlGf.js} +0 -0
- package/dist/client/assets/{fish-C2p-AJmZ.js → fish-CCpdtwqS.js} +0 -0
- package/dist/client/assets/{fluent-CeYzs8Qy.js → fluent-BLg032oD.js} +0 -0
- package/dist/client/assets/{fortran-free-form-BIQEK2Jw.js → fortran-free-form-Br4jRtSc.js} +0 -0
- package/dist/client/assets/{gdscript-B5JQPh_-.js → gdscript-hSAZM1eh.js} +0 -0
- package/dist/client/assets/{gdshader-vVjJ_Qr8.js → gdshader-D4XNAEs9.js} +0 -0
- package/dist/client/assets/{genie-DGl5rqC8.js → genie-DmN-ICAN.js} +0 -0
- package/dist/client/assets/{gherkin-CY_VLUnD.js → gherkin-cuHHmRcX.js} +0 -0
- package/dist/client/assets/{github-dark-ClO4AStc.js → github-dark-CEBLh0--.js} +0 -0
- package/dist/client/assets/{github-dark-default-CM0dPco8.js → github-dark-default-Dq0Z4Xai.js} +0 -0
- package/dist/client/assets/{github-dark-dimmed-Cb6xxpXY.js → github-dark-dimmed-D90YmS4w.js} +0 -0
- package/dist/client/assets/{github-dark-high-contrast-BpYtx2-M.js → github-dark-high-contrast-B6BWv1iC.js} +0 -0
- package/dist/client/assets/{github-light-default-BmnCWL6x.js → github-light-default-DsPWmj4v.js} +0 -0
- package/dist/client/assets/{github-light-high-contrast-rpagNF5O.js → github-light-high-contrast-C7aLb3kp.js} +0 -0
- package/dist/client/assets/{github-light-CeOVFgf_.js → github-light-lXSVSq5T.js} +0 -0
- package/dist/client/assets/{gleam-BarIG9kQ.js → gleam-D8VhqPDN.js} +0 -0
- package/dist/client/assets/{gn-DhYsTPYc.js → gn-BjGRlX27.js} +0 -0
- package/dist/client/assets/{gnuplot-CucLlTBc.js → gnuplot-BZCXuE4q.js} +0 -0
- package/dist/client/assets/{go-toi-uWvg.js → go-BJpWXZEs.js} +0 -0
- package/dist/client/assets/{groovy-Ds4dis_k.js → groovy-D9w3Dn-z.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-hard-aPiW8pQh.js → gruvbox-dark-hard-_deksD0U.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-medium-2HJCvzsS.js → gruvbox-dark-medium-CT31284j.js} +0 -0
- package/dist/client/assets/{gruvbox-dark-soft-Da97ODX9.js → gruvbox-dark-soft-BZuEUCbj.js} +0 -0
- package/dist/client/assets/{gruvbox-light-hard-BXlEipFe.js → gruvbox-light-hard-dxv4n_ZS.js} +0 -0
- package/dist/client/assets/{gruvbox-light-medium-Cun-GjGk.js → gruvbox-light-medium-BsW_fVfR.js} +0 -0
- package/dist/client/assets/{gruvbox-light-soft-Bd3qiiSw.js → gruvbox-light-soft-BiGy99gD.js} +0 -0
- package/dist/client/assets/{haskell-B_jvz5Po.js → haskell-DqDdKEgk.js} +0 -0
- package/dist/client/assets/{haxe-BRbuo5UO.js → haxe-DMg0jS3a.js} +0 -0
- package/dist/client/assets/{hcl-BzNUCtsK.js → hcl-SZIZUK_X.js} +0 -0
- package/dist/client/assets/{hjson-BxVo3sS2.js → hjson-DF1VspiE.js} +0 -0
- package/dist/client/assets/{hlsl-C8Wes1nf.js → hlsl-DPe9L0Dt.js} +0 -0
- package/dist/client/assets/{horizon-D54PjLAY.js → horizon-Ngud75Kn.js} +0 -0
- package/dist/client/assets/{horizon-bright-D9RccdIr.js → horizon-bright-Cnljd0XD.js} +0 -0
- package/dist/client/assets/{houston-CMu1N_4K.js → houston-BenZxlMr.js} +0 -0
- package/dist/client/assets/{hy-dMrJKKU_.js → hy-B0f-B1mH.js} +0 -0
- package/dist/client/assets/{imba-DG_oO8tg.js → imba-Bq3j1cW5.js} +0 -0
- package/dist/client/assets/{ini-geHw79Aj.js → ini-BayloP2U.js} +0 -0
- package/dist/client/assets/{json5-CDUsNqz6.js → json5-CRSfdIrY.js} +0 -0
- package/dist/client/assets/{jsonc-D48xcwyD.js → jsonc-y4g9DQPx.js} +0 -0
- package/dist/client/assets/{jsonl-cpIYDXEe.js → jsonl-D2paVn9r.js} +0 -0
- package/dist/client/assets/{jsonnet-Da1lhszN.js → jsonnet-CLH27mtz.js} +0 -0
- package/dist/client/assets/{jssm-B8BLrEGL.js → jssm-CPPYaqX-.js} +0 -0
- package/dist/client/assets/{kanagawa-dragon-2Sk8Rx83.js → kanagawa-dragon-Bt5mhLu1.js} +0 -0
- package/dist/client/assets/{kanagawa-lotus-CQVSWfJp.js → kanagawa-lotus-FGA3pRJk.js} +0 -0
- package/dist/client/assets/{kanagawa-wave-BKWNioLX.js → kanagawa-wave-DnLVZPAD.js} +0 -0
- package/dist/client/assets/{kdl-B-2tSRmp.js → kdl-D1BQjjnw.js} +0 -0
- package/dist/client/assets/{kotlin-DepsEzh3.js → kotlin-ndCaDnf0.js} +0 -0
- package/dist/client/assets/{kusto-BcCtXIb8.js → kusto-D-4nbkD3.js} +0 -0
- package/dist/client/assets/{laserwave-BUqkO46F.js → laserwave-D2qAZkaG.js} +0 -0
- package/dist/client/assets/{lean-CNO9ffpX.js → lean-YmtAsB0p.js} +0 -0
- package/dist/client/assets/{less-Dj0T9pWC.js → less-DyHub3ow.js} +0 -0
- package/dist/client/assets/{light-plus-C9Hnuc1T.js → light-plus-CP13QUvm.js} +0 -0
- package/dist/client/assets/{llvm-DbV9b66l.js → llvm-DCcqrY0D.js} +0 -0
- package/dist/client/assets/{log-BMblmPyH.js → log-DWAAMNbe.js} +0 -0
- package/dist/client/assets/{logo-B78qMxws.js → logo-ClQMGkNL.js} +0 -0
- package/dist/client/assets/{luau-BUd8xsdE.js → luau-CmcXFvLt.js} +0 -0
- package/dist/client/assets/{make-Ev-6cJrd.js → make-DcfJyUzm.js} +0 -0
- package/dist/client/assets/{markdown-CS4LI6sN.js → markdown-DXxotAxn.js} +0 -0
- package/dist/client/assets/{material-theme-5rA1zn0D.js → material-theme-JFoPTBSr.js} +0 -0
- package/dist/client/assets/{material-theme-darker-DGOEiL65.js → material-theme-darker-BHaqZ19v.js} +0 -0
- package/dist/client/assets/{material-theme-lighter-CULfFRX0.js → material-theme-lighter-CGnnS2bs.js} +0 -0
- package/dist/client/assets/{material-theme-ocean-LQZ9CleP.js → material-theme-ocean-Drhewjqf.js} +0 -0
- package/dist/client/assets/{material-theme-palenight-Di_f5oks.js → material-theme-palenight-DbUypmpb.js} +0 -0
- package/dist/client/assets/{matlab-C0qEtAx9.js → matlab-BlfbTznR.js} +0 -0
- package/dist/client/assets/{mdx-CzvnbLXb.js → mdx-H8fyPQd8.js} +0 -0
- package/dist/client/assets/{mermaid-BPquZaKt.js → mermaid-CWAV2dmV.js} +0 -0
- package/dist/client/assets/{min-dark-rkuIbtJV.js → min-dark-BEelvXUB.js} +0 -0
- package/dist/client/assets/{min-light-Dj_HOGsr.js → min-light-CTPBOACR.js} +0 -0
- package/dist/client/assets/{mipsasm-k5DQoS6j.js → mipsasm-BWYFAm2s.js} +0 -0
- package/dist/client/assets/{mojo-sTTDuNnR.js → mojo-DZcPJEIN.js} +0 -0
- package/dist/client/assets/{monokai-D5p-u2ij.js → monokai-DQlZXbkg.js} +0 -0
- package/dist/client/assets/{moonbit-j5ChFtBC.js → moonbit-6eslNlJL.js} +0 -0
- package/dist/client/assets/{move-Dj0Gmn6R.js → move-DxFc9-QU.js} +0 -0
- package/dist/client/assets/{narrat-DJgMz2oW.js → narrat-gv38dJOT.js} +0 -0
- package/dist/client/assets/{nextflow-groovy-eDLuZ_oi.js → nextflow-groovy-DV4H3hok.js} +0 -0
- package/dist/client/assets/{night-owl-CEdtPl3A.js → night-owl-BLcrYhaC.js} +0 -0
- package/dist/client/assets/{night-owl-light-GdSldewm.js → night-owl-light-BG-tBJOz.js} +0 -0
- package/dist/client/assets/{nix-CxIPS3pb.js → nix-NlOz3HGM.js} +0 -0
- package/dist/client/assets/{nord-3WFAz5H9.js → nord-Dm2F5_QB.js} +0 -0
- package/dist/client/assets/{nushell-GDfBmoBU.js → nushell-D86Z8aFF.js} +0 -0
- package/dist/client/assets/{objective-c-MFQ_MGUa.js → objective-c-iuJvUjCv.js} +0 -0
- package/dist/client/assets/{objective-cpp-Y83LcBE7.js → objective-cpp-C62JvfMT.js} +0 -0
- package/dist/client/assets/{ocaml-FxYfaJxu.js → ocaml-Rbryo9lg.js} +0 -0
- package/dist/client/assets/{odin-CprihY3z.js → odin-CfaOVNP_.js} +0 -0
- package/dist/client/assets/{one-dark-pro-BB6mpmmA.js → one-dark-pro-DC9SHdX0.js} +0 -0
- package/dist/client/assets/{one-light-BYLoxNtg.js → one-light-Doo39p0H.js} +0 -0
- package/dist/client/assets/{openscad-Bc1FbpOi.js → openscad-DCRhgheK.js} +0 -0
- package/dist/client/assets/{pascal-Bb4d8cUL.js → pascal-CTesTHtV.js} +0 -0
- package/dist/client/assets/{pierre-dark-cF19s-RM.js → pierre-dark-Gtc9M_gS.js} +0 -0
- package/dist/client/assets/{pierre-light-BdpX8OpD.js → pierre-light-EDxMHmhf.js} +0 -0
- package/dist/client/assets/{pkl-tM25Sq0w.js → pkl-BjUMjQkt.js} +0 -0
- package/dist/client/assets/{plastic-D3k2Xp_5.js → plastic-B3CcSpon.js} +0 -0
- package/dist/client/assets/{plsql-CLEfFhSj.js → plsql-BgKEZSSo.js} +0 -0
- package/dist/client/assets/{po-CaAzdrrh.js → po-C5s_CVt8.js} +0 -0
- package/dist/client/assets/{poimandres-bPTvT4Da.js → poimandres-BsK70ma5.js} +0 -0
- package/dist/client/assets/{polar-TG7aTGdK.js → polar-y4hX8qM0.js} +0 -0
- package/dist/client/assets/{postcss-8kqfa9f0.js → postcss-BHCm7Qae.js} +0 -0
- package/dist/client/assets/{powerquery-CtSu1Nfd.js → powerquery-C2vMt8aZ.js} +0 -0
- package/dist/client/assets/{powershell-87lLBHMy.js → powershell-DEcjmg1c.js} +0 -0
- package/dist/client/assets/{prisma-Dnf694DZ.js → prisma-Ba-Tcxy5.js} +0 -0
- package/dist/client/assets/{prolog-C0XbHTWa.js → prolog-B4o261Jv.js} +0 -0
- package/dist/client/assets/{proto-BZP-HLIb.js → proto-o3IZKiMR.js} +0 -0
- package/dist/client/assets/{puppet-CJYWgYC5.js → puppet-BC0dqZ31.js} +0 -0
- package/dist/client/assets/{purescript-B95Q6BAd.js → purescript-CLDw1y5G.js} +0 -0
- package/dist/client/assets/{python-CqTCsi7P.js → python-D1NFioGW.js} +0 -0
- package/dist/client/assets/{qmldir-DlIL4hls.js → qmldir-B7i9e9Vn.js} +0 -0
- package/dist/client/assets/{qss-BW72E0q_.js → qss-DIe6oKX8.js} +0 -0
- package/dist/client/assets/{racket-CCAimEsC.js → racket-CAOC_yyk.js} +0 -0
- package/dist/client/assets/{raku-mSuqElkM.js → raku-Ccua3vW6.js} +0 -0
- package/dist/client/assets/{red-C-DA4yBI.js → red-DtDH206x.js} +0 -0
- package/dist/client/assets/{reg-CGwMBJ2c.js → reg-CAYZT9kE.js} +0 -0
- package/dist/client/assets/{rel-JwrbYgX4.js → rel-cvB6F5nO.js} +0 -0
- package/dist/client/assets/{riscv-CoYyE75b.js → riscv-SYGtE4EN.js} +0 -0
- package/dist/client/assets/{ron-C5wrhnmJ.js → ron-CRt869SB.js} +0 -0
- package/dist/client/assets/{rose-pine-DlrMPYYd.js → rose-pine-CjBfSJ5b.js} +0 -0
- package/dist/client/assets/{rose-pine-dawn-DBHFtZD2.js → rose-pine-dawn-C0xwy7iJ.js} +0 -0
- package/dist/client/assets/{rose-pine-moon-BBfrpe5q.js → rose-pine-moon-BSNy9Ty0.js} +0 -0
- package/dist/client/assets/{rosmsg-DlimTR9t.js → rosmsg-BwrfJ66Z.js} +0 -0
- package/dist/client/assets/{rust-Cxnkxx3h.js → rust-DCKTTPxN.js} +0 -0
- package/dist/client/assets/{sass-DEyqUIpU.js → sass-CorcwySt.js} +0 -0
- package/dist/client/assets/{scala-i3RN3yAN.js → scala-DlI-OmYj.js} +0 -0
- package/dist/client/assets/{scheme-BcKdjYkO.js → scheme-CcNEGkZH.js} +0 -0
- package/dist/client/assets/{sdbl-Be_XWc3n.js → sdbl-AL_m-RO_.js} +0 -0
- package/dist/client/assets/{slack-dark-3PDtm74m.js → slack-dark-rMhrfPm6.js} +0 -0
- package/dist/client/assets/{slack-ochin-CwiuFRJD.js → slack-ochin-9w8X74hU.js} +0 -0
- package/dist/client/assets/{smalltalk-BdBlL6ks.js → smalltalk-Y2ogrfbk.js} +0 -0
- package/dist/client/assets/{snazzy-light-Dyqc8Is2.js → snazzy-light-DHr9ygpP.js} +0 -0
- package/dist/client/assets/{solarized-dark-DZiTscIX.js → solarized-dark-UPcKev9Q.js} +0 -0
- package/dist/client/assets/{solarized-light-DBcfxrfG.js → solarized-light-DUsjROvl.js} +0 -0
- package/dist/client/assets/{solidity-DH-yUSWc.js → solidity-Bfbm9QZQ.js} +0 -0
- package/dist/client/assets/{splunk-CIjc4kxs.js → splunk-6DJA2XFa.js} +0 -0
- package/dist/client/assets/{ssh-config-BKVd4drG.js → ssh-config-CbQtdF-u.js} +0 -0
- package/dist/client/assets/{stylus-tqAsmugv.js → stylus-B_iq45Sj.js} +0 -0
- package/dist/client/assets/{swift-CdDBQ3_Z.js → swift-C7KIgN-p.js} +0 -0
- package/dist/client/assets/{synthwave-84-CbbRs73K.js → synthwave-84-lf_Wt0K_.js} +0 -0
- package/dist/client/assets/{system-verilog-CBqEY-9v.js → system-verilog-C3G9wERd.js} +0 -0
- package/dist/client/assets/{systemd-khRP5zwK.js → systemd-CwxGrojj.js} +0 -0
- package/dist/client/assets/{talonscript-D_lneH-6.js → talonscript-DqnSo1EO.js} +0 -0
- package/dist/client/assets/{tasl-CLymawGe.js → tasl-T8ethp86.js} +0 -0
- package/dist/client/assets/{tcl-BRY1S87U.js → tcl-Ccl366o0.js} +0 -0
- package/dist/client/assets/{terraform-BqohMo2f.js → terraform-BBf6ZI_0.js} +0 -0
- package/dist/client/assets/{tokyo-night-BWUONxad.js → tokyo-night-BF5ata25.js} +0 -0
- package/dist/client/assets/{toml-C4c85Lwg.js → toml-C5Z_BR4r.js} +0 -0
- package/dist/client/assets/{tsv-DsZq9HBQ.js → tsv-rX8sUJs7.js} +0 -0
- package/dist/client/assets/{turtle-Dpr8zLlw.js → turtle-BM-MG8WY.js} +0 -0
- package/dist/client/assets/{typespec-DcqgATB-.js → typespec-C5gKydvR.js} +0 -0
- package/dist/client/assets/{typst-CeVxmuPg.js → typst--_5VchrY.js} +0 -0
- package/dist/client/assets/{v-C2Qsh2-1.js → v-C6PwpmTC.js} +0 -0
- package/dist/client/assets/{vala-CvZ3yL7c.js → vala-4pTaceSj.js} +0 -0
- package/dist/client/assets/{vb-B_p4qDw4.js → vb-DhoR5A6S.js} +0 -0
- package/dist/client/assets/{verilog-D8MGjxD7.js → verilog-B9f_1lPn.js} +0 -0
- package/dist/client/assets/{vesper-DossXiE1.js → vesper-CmBi_iCT.js} +0 -0
- package/dist/client/assets/{vhdl-MLyYh_Gz.js → vhdl-Cy4RAmOe.js} +0 -0
- package/dist/client/assets/{viml-BuYIArcz.js → viml-CFQW-CcD.js} +0 -0
- package/dist/client/assets/{vitesse-black-C3kc1227.js → vitesse-black-CE8RoBJP.js} +0 -0
- package/dist/client/assets/{vitesse-dark-kWOu5V36.js → vitesse-dark-BpF142p_.js} +0 -0
- package/dist/client/assets/{vitesse-light-DMtiL8bK.js → vitesse-light-CMwxPBrg.js} +0 -0
- package/dist/client/assets/{vyper-CNqG09-_.js → vyper-BW5zj9bE.js} +0 -0
- package/dist/client/assets/{wasm-BsQDV7Y0.js → wasm-BigxSLnm.js} +0 -0
- package/dist/client/assets/{wasm-DFVlQlgd.js → wasm-CSccDuAq.js} +0 -0
- package/dist/client/assets/{wenyan-BmOQge13.js → wenyan-BZzM1SQT.js} +0 -0
- package/dist/client/assets/{wgsl-CgWrmvIg.js → wgsl-xBPHbLlq.js} +0 -0
- package/dist/client/assets/{wikitext-DkwckXCk.js → wikitext-BXJWUNJK.js} +0 -0
- package/dist/client/assets/{wit-CtyVFGe7.js → wit-2GnUs67P.js} +0 -0
- package/dist/client/assets/{wolfram-CXE4FrKz.js → wolfram-DIFDmw-g.js} +0 -0
- package/dist/client/assets/{zenscript-DH15wJt0.js → zenscript-DQaUUjbx.js} +0 -0
- package/dist/client/assets/{zig-CqXN9brD.js → zig-BDepRvBi.js} +0 -0
- package/dist/{update-check-KL-2sGxE.mjs → update-check-DAPFCqpF.mjs} +1 -1
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
import { basename, isAbsolute, join, resolve } from "node:path";
|
|
2
|
-
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { promisify } from "node:util";
|
|
4
|
-
import { execFile, execFileSync } from "node:child_process";
|
|
5
|
-
import { readFile } from "node:fs/promises";
|
|
6
|
-
import { homedir } from "node:os";
|
|
7
|
-
import { createHash } from "node:crypto";
|
|
8
|
-
import { parseSync } from "editorconfig";
|
|
9
|
-
//#region src/lib/path.ts
|
|
10
|
-
function decodeAndNormalize(p) {
|
|
11
|
-
let decoded = p;
|
|
12
|
-
try {
|
|
13
|
-
decoded = decodeURIComponent(p);
|
|
14
|
-
} catch {}
|
|
15
|
-
return decoded.replace(/\\/g, "/");
|
|
16
|
-
}
|
|
17
|
-
function isSafePath(relativePath, baseDir) {
|
|
18
|
-
const normalized = decodeAndNormalize(relativePath);
|
|
19
|
-
if (normalized.includes("..") || normalized.includes("\0") || isAbsolute(normalized)) return false;
|
|
20
|
-
const resolved = resolve(baseDir, normalized);
|
|
21
|
-
return resolved.startsWith(resolve(baseDir) + "/") || resolved === resolve(baseDir);
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/lib/git.ts
|
|
25
|
-
const execFileAsync = promisify(execFile);
|
|
26
|
-
function isBinaryFile(absolutePath) {
|
|
27
|
-
try {
|
|
28
|
-
const buffer = readFileSync(absolutePath);
|
|
29
|
-
const bytesToCheck = Math.min(buffer.length, 8192);
|
|
30
|
-
for (let i = 0; i < bytesToCheck; i++) if (buffer[i] === 0) return true;
|
|
31
|
-
return false;
|
|
32
|
-
} catch {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function getFileContent(filePath, version) {
|
|
37
|
-
const root = getRepoRoot();
|
|
38
|
-
if (!isSafePath(filePath, root)) return null;
|
|
39
|
-
const resolved = resolve(root, filePath);
|
|
40
|
-
if (version === "new") try {
|
|
41
|
-
return readFileSync(resolved);
|
|
42
|
-
} catch {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
|
-
return execFileSync("git", ["show", `HEAD:${filePath}`], {
|
|
47
|
-
stdio: "pipe",
|
|
48
|
-
maxBuffer: 50 * 1024 * 1024
|
|
49
|
-
});
|
|
50
|
-
} catch {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
let cachedRepoRoot = null;
|
|
55
|
-
const editorConfigCache = /* @__PURE__ */ new Map();
|
|
56
|
-
function isGitRepo() {
|
|
57
|
-
try {
|
|
58
|
-
execFileSync("git", ["rev-parse", "--is-inside-work-tree"], { stdio: "pipe" });
|
|
59
|
-
return true;
|
|
60
|
-
} catch {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function getRepoRoot() {
|
|
65
|
-
if (cachedRepoRoot !== null) return cachedRepoRoot;
|
|
66
|
-
cachedRepoRoot = execFileSync("git", ["rev-parse", "--show-toplevel"], { encoding: "utf-8" }).trim();
|
|
67
|
-
return cachedRepoRoot;
|
|
68
|
-
}
|
|
69
|
-
function getRepoName() {
|
|
70
|
-
return basename(getRepoRoot());
|
|
71
|
-
}
|
|
72
|
-
function getBranchName() {
|
|
73
|
-
try {
|
|
74
|
-
return execFileSync("git", [
|
|
75
|
-
"rev-parse",
|
|
76
|
-
"--abbrev-ref",
|
|
77
|
-
"HEAD"
|
|
78
|
-
], {
|
|
79
|
-
stdio: "pipe",
|
|
80
|
-
encoding: "utf-8"
|
|
81
|
-
}).trim();
|
|
82
|
-
} catch {
|
|
83
|
-
return "";
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const DIFF_FLAGS = ["--no-ext-diff", "--no-color"];
|
|
87
|
-
function getTabSizeForFiles(filePaths) {
|
|
88
|
-
const root = getRepoRoot();
|
|
89
|
-
const result = {};
|
|
90
|
-
for (const filePath of filePaths) try {
|
|
91
|
-
const config = parseSync(join(root, filePath), { cache: editorConfigCache });
|
|
92
|
-
const size = config.tab_width ?? (config.indent_size === "tab" ? void 0 : config.indent_size);
|
|
93
|
-
if (typeof size === "number") result[filePath] = size;
|
|
94
|
-
} catch {}
|
|
95
|
-
return result;
|
|
96
|
-
}
|
|
97
|
-
async function getRepoRootAsync() {
|
|
98
|
-
if (cachedRepoRoot !== null) return cachedRepoRoot;
|
|
99
|
-
try {
|
|
100
|
-
const { stdout } = await execFileAsync("git", ["rev-parse", "--show-toplevel"], { encoding: "utf-8" });
|
|
101
|
-
cachedRepoRoot = stdout.trim();
|
|
102
|
-
return cachedRepoRoot;
|
|
103
|
-
} catch {
|
|
104
|
-
return "";
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async function getUntrackedFilePathsAsync() {
|
|
108
|
-
try {
|
|
109
|
-
const { stdout } = await execFileAsync("git", [
|
|
110
|
-
"ls-files",
|
|
111
|
-
"--others",
|
|
112
|
-
"--exclude-standard"
|
|
113
|
-
], {
|
|
114
|
-
encoding: "utf-8",
|
|
115
|
-
maxBuffer: 50 * 1024 * 1024
|
|
116
|
-
});
|
|
117
|
-
const trimmed = stdout.trim();
|
|
118
|
-
return trimmed ? trimmed.split("\n") : [];
|
|
119
|
-
} catch {
|
|
120
|
-
return [];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
async function getUntrackedFilesDiffAsync() {
|
|
124
|
-
const root = await getRepoRootAsync();
|
|
125
|
-
const filePaths = await getUntrackedFilePathsAsync();
|
|
126
|
-
if (filePaths.length === 0) return "";
|
|
127
|
-
const patches = [];
|
|
128
|
-
const fileDiffPromises = filePaths.map(async (file) => {
|
|
129
|
-
const absolutePath = join(root, file);
|
|
130
|
-
if (isBinaryFile(absolutePath)) return [
|
|
131
|
-
`diff --git a/${file} b/${file}`,
|
|
132
|
-
"new file mode 100644",
|
|
133
|
-
"index 0000000..0000001",
|
|
134
|
-
`Binary files /dev/null and b/${file} differ`
|
|
135
|
-
].join("\n");
|
|
136
|
-
else try {
|
|
137
|
-
const lines = (await readFile(absolutePath, "utf-8")).split("\n");
|
|
138
|
-
const diffLines = lines.map((l) => `+${l}`);
|
|
139
|
-
return [
|
|
140
|
-
`diff --git a/${file} b/${file}`,
|
|
141
|
-
"new file mode 100644",
|
|
142
|
-
"index 0000000..0000001",
|
|
143
|
-
"--- /dev/null",
|
|
144
|
-
`+++ b/${file}`,
|
|
145
|
-
`@@ -0,0 +1,${lines.length} @@`,
|
|
146
|
-
...diffLines
|
|
147
|
-
].join("\n");
|
|
148
|
-
} catch {
|
|
149
|
-
return "";
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
const results = await Promise.all(fileDiffPromises);
|
|
153
|
-
for (const r of results) if (r) patches.push(r);
|
|
154
|
-
return patches.length > 0 ? "\n" + patches.join("\n") : "";
|
|
155
|
-
}
|
|
156
|
-
async function getCustomGitDiffAsync(args) {
|
|
157
|
-
try {
|
|
158
|
-
const { stdout } = await execFileAsync("git", [
|
|
159
|
-
"diff",
|
|
160
|
-
...DIFF_FLAGS,
|
|
161
|
-
...args
|
|
162
|
-
], {
|
|
163
|
-
encoding: "utf-8",
|
|
164
|
-
maxBuffer: 50 * 1024 * 1024
|
|
165
|
-
});
|
|
166
|
-
return stdout;
|
|
167
|
-
} catch {
|
|
168
|
-
return "";
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
async function getGitDiffAsync(options = {}) {
|
|
172
|
-
const unstagedPromise = execFileAsync("git", ["diff", ...DIFF_FLAGS], {
|
|
173
|
-
encoding: "utf-8",
|
|
174
|
-
maxBuffer: 50 * 1024 * 1024
|
|
175
|
-
}).then(({ stdout }) => stdout).catch(() => "");
|
|
176
|
-
const stagedPromise = options.staged ? execFileAsync("git", [
|
|
177
|
-
"diff",
|
|
178
|
-
...DIFF_FLAGS,
|
|
179
|
-
"--staged"
|
|
180
|
-
], {
|
|
181
|
-
encoding: "utf-8",
|
|
182
|
-
maxBuffer: 50 * 1024 * 1024
|
|
183
|
-
}).then(({ stdout }) => stdout).catch(() => "") : Promise.resolve("");
|
|
184
|
-
const untrackedPromise = options.untracked ? getUntrackedFilesDiffAsync() : Promise.resolve("");
|
|
185
|
-
const [unstaged, staged, untrackedPatch] = await Promise.all([
|
|
186
|
-
unstagedPromise,
|
|
187
|
-
stagedPromise,
|
|
188
|
-
untrackedPromise
|
|
189
|
-
]);
|
|
190
|
-
const parts = [];
|
|
191
|
-
if (unstaged) parts.push(unstaged);
|
|
192
|
-
if (staged) parts.push(staged);
|
|
193
|
-
if (untrackedPatch) parts.push(untrackedPatch);
|
|
194
|
-
return parts.join("\n");
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Lists every file the working tree knows about (tracked + untracked,
|
|
198
|
-
* excluding standard-ignored paths). Used by the Phase D file viewer to
|
|
199
|
-
* power a path picker.
|
|
200
|
-
*/
|
|
201
|
-
function listRepoFiles() {
|
|
202
|
-
try {
|
|
203
|
-
const tracked = execFileSync("git", ["ls-files"], {
|
|
204
|
-
encoding: "utf-8",
|
|
205
|
-
maxBuffer: 100 * 1024 * 1024
|
|
206
|
-
}).trim();
|
|
207
|
-
const untracked = execFileSync("git", [
|
|
208
|
-
"ls-files",
|
|
209
|
-
"--others",
|
|
210
|
-
"--exclude-standard"
|
|
211
|
-
], {
|
|
212
|
-
encoding: "utf-8",
|
|
213
|
-
maxBuffer: 100 * 1024 * 1024
|
|
214
|
-
}).trim();
|
|
215
|
-
const set = /* @__PURE__ */ new Set();
|
|
216
|
-
for (const list of [tracked, untracked]) {
|
|
217
|
-
if (!list) continue;
|
|
218
|
-
for (const line of list.split("\n")) if (line) set.add(line);
|
|
219
|
-
}
|
|
220
|
-
return [...set].sort();
|
|
221
|
-
} catch {
|
|
222
|
-
return [];
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Reports whether the repo is currently in the middle of a merge and which
|
|
227
|
-
* files have unresolved conflicts. Used by the Phase C merge-conflict UI to
|
|
228
|
-
* decide when to render the @pierre/diffs UnresolvedFile component.
|
|
229
|
-
*/
|
|
230
|
-
function getMergeStatus() {
|
|
231
|
-
let root;
|
|
232
|
-
try {
|
|
233
|
-
root = getRepoRoot();
|
|
234
|
-
} catch {
|
|
235
|
-
return {
|
|
236
|
-
inMerge: false,
|
|
237
|
-
conflicts: []
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
const mergeHead = join(root, ".git", "MERGE_HEAD");
|
|
241
|
-
let inMerge = false;
|
|
242
|
-
try {
|
|
243
|
-
readFileSync(mergeHead);
|
|
244
|
-
inMerge = true;
|
|
245
|
-
} catch {
|
|
246
|
-
inMerge = false;
|
|
247
|
-
}
|
|
248
|
-
let conflicts = [];
|
|
249
|
-
try {
|
|
250
|
-
const out = execFileSync("git", [
|
|
251
|
-
"diff",
|
|
252
|
-
"--name-only",
|
|
253
|
-
"--diff-filter=U"
|
|
254
|
-
], {
|
|
255
|
-
encoding: "utf-8",
|
|
256
|
-
maxBuffer: 50 * 1024 * 1024
|
|
257
|
-
}).trim();
|
|
258
|
-
conflicts = out ? out.split("\n") : [];
|
|
259
|
-
} catch {
|
|
260
|
-
conflicts = [];
|
|
261
|
-
}
|
|
262
|
-
return {
|
|
263
|
-
inMerge: inMerge || conflicts.length > 0,
|
|
264
|
-
conflicts
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
function gitAddFile(filePath) {
|
|
268
|
-
execFileSync("git", [
|
|
269
|
-
"add",
|
|
270
|
-
"--",
|
|
271
|
-
filePath
|
|
272
|
-
], { stdio: "pipe" });
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Returns a unified diff for a single working-tree file (covers unstaged
|
|
276
|
-
* and untracked changes). Used by the Phase E hunk-revert flow to derive
|
|
277
|
-
* the exact patch text we need to `git apply --reverse`.
|
|
278
|
-
*/
|
|
279
|
-
function getFilePatch(filePath) {
|
|
280
|
-
try {
|
|
281
|
-
const unstaged = execFileSync("git", [
|
|
282
|
-
"diff",
|
|
283
|
-
...DIFF_FLAGS,
|
|
284
|
-
"--",
|
|
285
|
-
filePath
|
|
286
|
-
], {
|
|
287
|
-
encoding: "utf-8",
|
|
288
|
-
maxBuffer: 50 * 1024 * 1024
|
|
289
|
-
});
|
|
290
|
-
if (unstaged) return unstaged;
|
|
291
|
-
} catch {}
|
|
292
|
-
try {
|
|
293
|
-
const absolutePath = join(getRepoRoot(), filePath);
|
|
294
|
-
if (isBinaryFile(absolutePath)) return "";
|
|
295
|
-
const lines = readFileSync(absolutePath, "utf-8").split("\n");
|
|
296
|
-
return [
|
|
297
|
-
`diff --git a/${filePath} b/${filePath}`,
|
|
298
|
-
"new file mode 100644",
|
|
299
|
-
"index 0000000..0000001",
|
|
300
|
-
"--- /dev/null",
|
|
301
|
-
`+++ b/${filePath}`,
|
|
302
|
-
`@@ -0,0 +1,${lines.length} @@`,
|
|
303
|
-
...lines.map((l) => `+${l}`)
|
|
304
|
-
].join("\n");
|
|
305
|
-
} catch {
|
|
306
|
-
return "";
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Extracts the Nth hunk text from a single-file patch. Returns the lines
|
|
311
|
-
* from `@@ ... @@` through the line before the next `@@` (or EOF).
|
|
312
|
-
*/
|
|
313
|
-
function extractHunk(patch, hunkIndex) {
|
|
314
|
-
const lines = patch.split("\n");
|
|
315
|
-
const hunkStarts = [];
|
|
316
|
-
for (let i = 0; i < lines.length; i++) if (lines[i].startsWith("@@ ")) hunkStarts.push(i);
|
|
317
|
-
if (hunkIndex < 0 || hunkIndex >= hunkStarts.length) return null;
|
|
318
|
-
const start = hunkStarts[hunkIndex];
|
|
319
|
-
const end = hunkIndex + 1 < hunkStarts.length ? hunkStarts[hunkIndex + 1] : lines.length;
|
|
320
|
-
return lines.slice(start, end).join("\n");
|
|
321
|
-
}
|
|
322
|
-
/** Header lines that the per-file patch needs in order for `git apply` to
|
|
323
|
-
* recognize the target. Stops just before the first `@@` hunk header. */
|
|
324
|
-
function extractPatchHeader(patch) {
|
|
325
|
-
const lines = patch.split("\n");
|
|
326
|
-
const out = [];
|
|
327
|
-
for (const line of lines) {
|
|
328
|
-
if (line.startsWith("@@ ")) break;
|
|
329
|
-
out.push(line);
|
|
330
|
-
}
|
|
331
|
-
return out.join("\n");
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Reverts a single hunk from the working tree by piping a minimal patch to
|
|
335
|
-
* `git apply --reverse`. Throws if git rejects the apply (typically because
|
|
336
|
-
* the file has shifted since the diff was rendered).
|
|
337
|
-
*/
|
|
338
|
-
function revertHunk(filePath, hunkIndex) {
|
|
339
|
-
const patch = getFilePatch(filePath);
|
|
340
|
-
if (!patch) throw new Error("No diff available for this file");
|
|
341
|
-
const header = extractPatchHeader(patch);
|
|
342
|
-
const hunk = extractHunk(patch, hunkIndex);
|
|
343
|
-
if (!hunk) throw new Error(`Hunk ${hunkIndex} not found`);
|
|
344
|
-
execFileSync("git", [
|
|
345
|
-
"apply",
|
|
346
|
-
"--reverse",
|
|
347
|
-
"-"
|
|
348
|
-
], {
|
|
349
|
-
input: `${header}\n${hunk}\n`,
|
|
350
|
-
stdio: [
|
|
351
|
-
"pipe",
|
|
352
|
-
"pipe",
|
|
353
|
-
"pipe"
|
|
354
|
-
]
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
function getProjectStorageDir(customRepoRoot) {
|
|
358
|
-
const root = customRepoRoot || getRepoRoot();
|
|
359
|
-
const hash = createHash("sha256").update(root).digest("hex").slice(0, 8);
|
|
360
|
-
const repoName = basename(root);
|
|
361
|
-
return join(homedir(), ".diffing", `${repoName}-${hash}`);
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Retrieves git blame for deleted lines and recent log history for the file,
|
|
365
|
-
* providing context on what commit introduced the deleted code.
|
|
366
|
-
*/
|
|
367
|
-
function getHunkHistory(filePath, deletionStart, deletionCount, revision = "HEAD") {
|
|
368
|
-
if (!isSafePath(filePath, getRepoRoot())) throw new Error("Forbidden file path");
|
|
369
|
-
const blame = [];
|
|
370
|
-
if (deletionCount > 0) try {
|
|
371
|
-
const lines = execFileSync("git", [
|
|
372
|
-
"blame",
|
|
373
|
-
"--date=format:%Y-%m-%d",
|
|
374
|
-
"-L",
|
|
375
|
-
`${deletionStart},+${deletionCount}`,
|
|
376
|
-
revision,
|
|
377
|
-
"--",
|
|
378
|
-
filePath
|
|
379
|
-
], {
|
|
380
|
-
encoding: "utf-8",
|
|
381
|
-
maxBuffer: 10 * 1024 * 1024
|
|
382
|
-
}).split("\n");
|
|
383
|
-
const commitHashes = /* @__PURE__ */ new Set();
|
|
384
|
-
for (const line of lines) {
|
|
385
|
-
if (!line.trim()) continue;
|
|
386
|
-
const match = line.match(/^(\^?[0-9a-fA-F]+) \((.*?) (\d{4}-\d{2}-\d{2}) (\d+)\)(?: (.*))?$/);
|
|
387
|
-
if (match) {
|
|
388
|
-
const [_, commit, author, date, lineNum, content] = match;
|
|
389
|
-
const cleanCommit = commit.startsWith("^") ? commit.slice(1) : commit;
|
|
390
|
-
blame.push({
|
|
391
|
-
commit: cleanCommit,
|
|
392
|
-
author: author.trim(),
|
|
393
|
-
date,
|
|
394
|
-
line: parseInt(lineNum, 10),
|
|
395
|
-
content: content || "",
|
|
396
|
-
summary: ""
|
|
397
|
-
});
|
|
398
|
-
commitHashes.add(cleanCommit);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
const commitSummaries = {};
|
|
402
|
-
for (const hash of commitHashes) try {
|
|
403
|
-
commitSummaries[hash] = execFileSync("git", [
|
|
404
|
-
"show",
|
|
405
|
-
"-s",
|
|
406
|
-
"--format=%s",
|
|
407
|
-
hash
|
|
408
|
-
], { encoding: "utf-8" }).trim();
|
|
409
|
-
} catch {
|
|
410
|
-
commitSummaries[hash] = "Unknown commit";
|
|
411
|
-
}
|
|
412
|
-
for (const entry of blame) entry.summary = commitSummaries[entry.commit] || "Unknown commit";
|
|
413
|
-
} catch (err) {
|
|
414
|
-
console.warn("Failed to get git blame for hunk history:", err.message);
|
|
415
|
-
}
|
|
416
|
-
const recentCommits = [];
|
|
417
|
-
try {
|
|
418
|
-
const logOut = execFileSync("git", [
|
|
419
|
-
"log",
|
|
420
|
-
"-n",
|
|
421
|
-
"5",
|
|
422
|
-
"--date=format:%Y-%m-%d",
|
|
423
|
-
"--format=%h|%an|%ad|%s",
|
|
424
|
-
"--",
|
|
425
|
-
filePath
|
|
426
|
-
], { encoding: "utf-8" });
|
|
427
|
-
for (const line of logOut.split("\n")) {
|
|
428
|
-
if (!line.trim()) continue;
|
|
429
|
-
const [hash, author, date, summary] = line.split("|");
|
|
430
|
-
if (hash && author && date && summary) recentCommits.push({
|
|
431
|
-
hash,
|
|
432
|
-
author: author.trim(),
|
|
433
|
-
date,
|
|
434
|
-
summary: summary.trim()
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
} catch (err) {
|
|
438
|
-
console.warn("Failed to get git log for hunk history:", err.message);
|
|
439
|
-
}
|
|
440
|
-
return {
|
|
441
|
-
blame,
|
|
442
|
-
recentCommits
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
//#endregion
|
|
446
|
-
//#region src/lib/comment-format.ts
|
|
447
|
-
/**
|
|
448
|
-
* Render review comments as the `<code-review-comments>` XML envelope used to
|
|
449
|
-
* hand a review to an AI agent. Shared by the UI clipboard button
|
|
450
|
-
* (`useComments.formatAllComments`), the server's `/api/review/send` handoff,
|
|
451
|
-
* and the `diffing` CLI/MCP so every channel emits byte-identical output.
|
|
452
|
-
*/
|
|
453
|
-
function formatComments(comments, generalComment) {
|
|
454
|
-
if (comments.length === 0) return "";
|
|
455
|
-
const grouped = /* @__PURE__ */ new Map();
|
|
456
|
-
for (const comment of comments) {
|
|
457
|
-
const list = grouped.get(comment.filePath) ?? [];
|
|
458
|
-
list.push(comment);
|
|
459
|
-
grouped.set(comment.filePath, list);
|
|
460
|
-
}
|
|
461
|
-
const lines = [];
|
|
462
|
-
lines.push("<code-review-comments>");
|
|
463
|
-
lines.push(" <instructions>");
|
|
464
|
-
lines.push(" You are an AI coding assistant. You are receiving a structured list of code review comments to address in the repository.");
|
|
465
|
-
lines.push(" For each file, review the inline comments and apply the changes requested.");
|
|
466
|
-
lines.push(" - Target lines are specified by the \"line\" attribute (e.g. line=\"10\" or line=\"10-15\").");
|
|
467
|
-
lines.push(" - \"side\" indicates whether the comment is on \"additions\" (added/modified lines) or \"deletions\" (deleted/old lines).");
|
|
468
|
-
lines.push(" - \"status\" indicates whether the comment is \"open\" or \"resolved\". Only address comments with status=\"open\".");
|
|
469
|
-
lines.push(" - The <code> block contains the specific code context at the reviewed lines, prefixed with \"+\" or \"-\".");
|
|
470
|
-
lines.push(" - The <body> tag contains the review feedback or request.");
|
|
471
|
-
lines.push(" - If developers have replied to the comment, their discussion is captured under the <replies> element.");
|
|
472
|
-
lines.push(" - The comment \"id\" attribute can be used to reference or update the comment via API if available.");
|
|
473
|
-
lines.push("");
|
|
474
|
-
lines.push(" HOW TO REPLY OR ASK FOR CLARIFICATION:");
|
|
475
|
-
lines.push(" If you need to ask for clarification, explain what you did, or reply to any comment:");
|
|
476
|
-
lines.push("");
|
|
477
|
-
lines.push(" Option A: Via the diffing CLI or MCP (Preferred — port-agnostic, no copy-paste)");
|
|
478
|
-
lines.push(" diffing reply <comment-id> --body \"Your response\" --model \"<your-model-name>\"");
|
|
479
|
-
lines.push(" diffing resolve <comment-id>");
|
|
480
|
-
lines.push(" (Or the equivalent MCP tools: reply_to_comment, resolve_comment.)");
|
|
481
|
-
lines.push("");
|
|
482
|
-
lines.push(" Option B: Via the local HTTP API (if you know the running port)");
|
|
483
|
-
lines.push(" POST http://localhost:<port>/api/comments/<comment-id>/replies");
|
|
484
|
-
lines.push(" Payload: { \"body\": \"Your response or clarification request here\", \"model\": \"<your-model-name>\" }");
|
|
485
|
-
lines.push(" PUT http://localhost:<port>/api/comments/<comment-id> Payload: { \"status\": \"resolved\" }");
|
|
486
|
-
lines.push("");
|
|
487
|
-
lines.push(" Option C: Via Text Response (Offline / Chat Copy-Paste)");
|
|
488
|
-
lines.push(" If you do not have local API access, output your comments/replies inside a structured XML block at the end of your response:");
|
|
489
|
-
lines.push(" <comment-replies>");
|
|
490
|
-
lines.push(" <reply to=\"<comment-id>\" model=\"<your-model-name>\"><![CDATA[Your reply or clarification request here]]></reply>");
|
|
491
|
-
lines.push(" </comment-replies>");
|
|
492
|
-
lines.push(" </instructions>");
|
|
493
|
-
const trimmedGeneral = generalComment?.trim();
|
|
494
|
-
if (trimmedGeneral) {
|
|
495
|
-
lines.push(" <general-comment>");
|
|
496
|
-
lines.push(` <![CDATA[${trimmedGeneral}]]>`);
|
|
497
|
-
lines.push(" </general-comment>");
|
|
498
|
-
}
|
|
499
|
-
for (const [filePath, fileComments] of grouped) {
|
|
500
|
-
lines.push(` <file path="${filePath}">`);
|
|
501
|
-
for (const comment of fileComments) {
|
|
502
|
-
const lineAttr = comment.lineNumber === 0 ? "file" : comment.startLineNumber && comment.startLineNumber !== comment.lineNumber ? `${comment.startLineNumber}-${comment.lineNumber}` : `${comment.lineNumber}`;
|
|
503
|
-
const isoDate = new Date(comment.createdAt).toISOString();
|
|
504
|
-
lines.push(` <comment id="${comment.id}" line="${lineAttr}" side="${comment.side}" status="${comment.status}" created-at="${isoDate}">`);
|
|
505
|
-
if (comment.lineNumber !== 0) {
|
|
506
|
-
const prefix = comment.side === "additions" ? "+" : "-";
|
|
507
|
-
const isMultiLine = comment.lineContent && comment.lineContent.includes("\n");
|
|
508
|
-
let codeVal = "";
|
|
509
|
-
if (isMultiLine) codeVal = `\n${comment.lineContent.split("\n").map((l) => `${prefix} ${l}`).join("\n")}\n`;
|
|
510
|
-
else codeVal = `${prefix} ${comment.lineContent}`;
|
|
511
|
-
lines.push(` <code><![CDATA[${codeVal}]]></code>`);
|
|
512
|
-
}
|
|
513
|
-
lines.push(` <body><![CDATA[${comment.body}]]></body>`);
|
|
514
|
-
if (comment.replies && comment.replies.length > 0) {
|
|
515
|
-
lines.push(" <replies>");
|
|
516
|
-
for (const reply of comment.replies) {
|
|
517
|
-
const replyIsoDate = new Date(reply.createdAt).toISOString();
|
|
518
|
-
const roleAttr = reply.role ? ` role="${reply.role}"` : " role=\"agent\"";
|
|
519
|
-
const modelAttr = reply.model ? ` model="${reply.model}"` : "";
|
|
520
|
-
lines.push(` <reply id="${reply.id}" created-at="${replyIsoDate}"${roleAttr}${modelAttr}>`);
|
|
521
|
-
lines.push(` <![CDATA[${reply.body}]]>`);
|
|
522
|
-
lines.push(" </reply>");
|
|
523
|
-
}
|
|
524
|
-
lines.push(" </replies>");
|
|
525
|
-
}
|
|
526
|
-
lines.push(" </comment>");
|
|
527
|
-
}
|
|
528
|
-
lines.push(" </file>");
|
|
529
|
-
}
|
|
530
|
-
lines.push("</code-review-comments>");
|
|
531
|
-
return lines.join("\n");
|
|
532
|
-
}
|
|
533
|
-
//#endregion
|
|
534
|
-
//#region src/lib/server-lock.ts
|
|
535
|
-
function lockPath(repoRoot) {
|
|
536
|
-
return join(getProjectStorageDir(repoRoot), "server.json");
|
|
537
|
-
}
|
|
538
|
-
function writeServerLock(lock) {
|
|
539
|
-
const path = lockPath(lock.repoRoot);
|
|
540
|
-
mkdirSync(join(path, ".."), { recursive: true });
|
|
541
|
-
writeFileSync(path, JSON.stringify(lock, null, 2), "utf-8");
|
|
542
|
-
}
|
|
543
|
-
function readServerLock(repoRoot) {
|
|
544
|
-
try {
|
|
545
|
-
const raw = readFileSync(lockPath(repoRoot), "utf-8");
|
|
546
|
-
const lock = JSON.parse(raw);
|
|
547
|
-
if (typeof lock.port !== "number" || typeof lock.pid !== "number") return null;
|
|
548
|
-
return lock;
|
|
549
|
-
} catch {
|
|
550
|
-
return null;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* True if the process named by the lock is still alive and the lock belongs to
|
|
555
|
-
* this repo. `process.kill(pid, 0)` sends no signal — it just probes existence.
|
|
556
|
-
*/
|
|
557
|
-
function isLockAlive(lock) {
|
|
558
|
-
try {
|
|
559
|
-
process.kill(lock.pid, 0);
|
|
560
|
-
} catch {
|
|
561
|
-
return false;
|
|
562
|
-
}
|
|
563
|
-
try {
|
|
564
|
-
return lock.repoRoot === getRepoRoot();
|
|
565
|
-
} catch {
|
|
566
|
-
return true;
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
function removeServerLock(repoRoot) {
|
|
570
|
-
try {
|
|
571
|
-
rmSync(lockPath(repoRoot), { force: true });
|
|
572
|
-
} catch {}
|
|
573
|
-
}
|
|
574
|
-
//#endregion
|
|
575
|
-
export { gitAddFile as _, formatComments as a, revertHunk as b, getFileContent as c, getMergeStatus as d, getProjectStorageDir as f, getUntrackedFilePathsAsync as g, getTabSizeForFiles as h, writeServerLock as i, getGitDiffAsync as l, getRepoRoot as m, readServerLock as n, getBranchName as o, getRepoName as p, removeServerLock as r, getCustomGitDiffAsync as s, isLockAlive as t, getHunkHistory as u, isGitRepo as v, isSafePath as x, listRepoFiles as y };
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from "node:url";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
import { readFileSync } from "node:fs";
|
|
4
|
-
import { spawn } from "node:child_process";
|
|
5
|
-
//#region src/lib/update-check.ts
|
|
6
|
-
/**
|
|
7
|
-
* Strips ANSI escape sequences from a string to compute its visible/display length.
|
|
8
|
-
*/
|
|
9
|
-
function stripAnsi(str) {
|
|
10
|
-
return str.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Compare two semver version strings to see if the latest version is newer.
|
|
14
|
-
*/
|
|
15
|
-
function isNewerVersion(current, latest) {
|
|
16
|
-
const clean = (v) => v.replace(/^v/, "");
|
|
17
|
-
const cParts = clean(current).split(".").map(Number);
|
|
18
|
-
const lParts = clean(latest).split(".").map(Number);
|
|
19
|
-
for (let i = 0; i < 3; i++) {
|
|
20
|
-
const cVal = cParts[i] ?? 0;
|
|
21
|
-
const lVal = lParts[i] ?? 0;
|
|
22
|
-
if (Number.isNaN(cVal) || Number.isNaN(lVal)) continue;
|
|
23
|
-
if (lVal > cVal) return true;
|
|
24
|
-
if (lVal < cVal) return false;
|
|
25
|
-
}
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Queries the npm registry asynchronously with a 1-second timeout.
|
|
30
|
-
*/
|
|
31
|
-
async function checkForUpdates(currentVersion) {
|
|
32
|
-
try {
|
|
33
|
-
const controller = new AbortController();
|
|
34
|
-
const id = setTimeout(() => controller.abort(), 1e3);
|
|
35
|
-
const res = await fetch("https://registry.npmjs.org/diffing/latest", { signal: controller.signal });
|
|
36
|
-
clearTimeout(id);
|
|
37
|
-
if (!res.ok) return null;
|
|
38
|
-
const data = await res.json();
|
|
39
|
-
if (!data.version) return null;
|
|
40
|
-
return {
|
|
41
|
-
hasUpdate: isNewerVersion(currentVersion, data.version),
|
|
42
|
-
latestVersion: data.version
|
|
43
|
-
};
|
|
44
|
-
} catch {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Prints a beautifully styled console box letting the user know a new version is available.
|
|
50
|
-
*/
|
|
51
|
-
function printUpdateDisclaimer(current, latest) {
|
|
52
|
-
const borderCol = "\x1B[38;5;220m";
|
|
53
|
-
const bold = "\x1B[1m";
|
|
54
|
-
const reset = "\x1B[0m";
|
|
55
|
-
const boxWidth = 58;
|
|
56
|
-
const top = borderCol + "╭" + "─".repeat(boxWidth) + "╮\x1B[0m";
|
|
57
|
-
const bottom = borderCol + "╰" + "─".repeat(boxWidth) + "╯\x1B[0m";
|
|
58
|
-
const side = borderCol + "│\x1B[0m";
|
|
59
|
-
const l1 = `🚀 ${bold}Update available!${reset} v${current} → \x1b[38;5;82mv${latest}${reset}`;
|
|
60
|
-
const l2 = `Run ${bold}diffing update${reset} to easily upgrade to the latest version.`;
|
|
61
|
-
const printRow = (content) => {
|
|
62
|
-
const displayLength = stripAnsi(content).length + (content.includes("🚀") ? 1 : 0);
|
|
63
|
-
const totalPadding = boxWidth - 4 - displayLength;
|
|
64
|
-
const pad = " ".repeat(Math.max(0, totalPadding));
|
|
65
|
-
console.log(`${side} ${content}${pad} ${side}`);
|
|
66
|
-
};
|
|
67
|
-
console.log();
|
|
68
|
-
console.log(top);
|
|
69
|
-
printRow("");
|
|
70
|
-
printRow(l1);
|
|
71
|
-
printRow(l2);
|
|
72
|
-
printRow("");
|
|
73
|
-
console.log(bottom);
|
|
74
|
-
console.log();
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Executes the update command process.
|
|
78
|
-
*/
|
|
79
|
-
async function runUpdateCommand() {
|
|
80
|
-
const pkgPath = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "package.json");
|
|
81
|
-
const currentVersion = JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
82
|
-
console.log("Checking for updates...");
|
|
83
|
-
const updateInfo = await checkForUpdates(currentVersion);
|
|
84
|
-
if (!updateInfo || !updateInfo.hasUpdate) {
|
|
85
|
-
console.log(`\x1b[38;5;82mYou are already on the latest version of diffing (v${currentVersion})!\x1b[0m`);
|
|
86
|
-
return 0;
|
|
87
|
-
}
|
|
88
|
-
const latest = updateInfo.latestVersion;
|
|
89
|
-
console.log(`\n\x1b[38;5;75mUpdating diffing: v${currentVersion} → v${latest}...\x1b[0m\n`);
|
|
90
|
-
let cmd = "npm";
|
|
91
|
-
let args = [
|
|
92
|
-
"install",
|
|
93
|
-
"-g",
|
|
94
|
-
"diffing@latest"
|
|
95
|
-
];
|
|
96
|
-
try {
|
|
97
|
-
const { execSync } = await import("node:child_process");
|
|
98
|
-
execSync("pnpm --version", { stdio: "ignore" });
|
|
99
|
-
cmd = "pnpm";
|
|
100
|
-
args = [
|
|
101
|
-
"add",
|
|
102
|
-
"-g",
|
|
103
|
-
"diffing@latest"
|
|
104
|
-
];
|
|
105
|
-
} catch {}
|
|
106
|
-
console.log(`Running: ${cmd} ${args.join(" ")}\n`);
|
|
107
|
-
const exitCode = await new Promise((res) => {
|
|
108
|
-
const child = spawn(cmd, args, {
|
|
109
|
-
stdio: "inherit",
|
|
110
|
-
shell: true
|
|
111
|
-
});
|
|
112
|
-
child.on("close", (code) => {
|
|
113
|
-
res(code ?? 0);
|
|
114
|
-
});
|
|
115
|
-
child.on("error", (err) => {
|
|
116
|
-
console.error(`Failed to start update process: ${err.message}`);
|
|
117
|
-
res(1);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
if (exitCode === 0) console.log(`\n\x1b[38;5;82mSuccessfully updated diffing to v${latest}!\x1b[0m\n`);
|
|
121
|
-
else {
|
|
122
|
-
console.error(`\n\x1b[38;5;196mFailed to update diffing. Please try running the command manually with sudo if required:\x1b[0m`);
|
|
123
|
-
console.error(` sudo ${cmd} ${args.join(" ")}\n`);
|
|
124
|
-
}
|
|
125
|
-
return exitCode;
|
|
126
|
-
}
|
|
127
|
-
//#endregion
|
|
128
|
-
export { checkForUpdates, printUpdateDisclaimer, runUpdateCommand };
|