@qwen-code/qwen-code 0.23.3 → 0.23.4
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/bundled/computer-use/SKILL.md +46 -198
- package/bundled/computer-use/references/macos.md +208 -0
- package/bundled/computer-use/references/windows-linux.md +247 -0
- package/bundled/goal-draft/SKILL.md +10 -10
- package/bundled/qc-helper/docs/configuration/settings.md +81 -71
- package/bundled/qc-helper/docs/extension/getting-started-extensions.md +2 -0
- package/bundled/qc-helper/docs/extension/introduction.md +9 -3
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/agent-board.md +89 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -21
- package/bundled/qc-helper/docs/features/channels/dws.md +5 -1
- package/bundled/qc-helper/docs/features/channels/overview.md +5 -6
- package/bundled/qc-helper/docs/features/code-review.md +18 -4
- package/bundled/qc-helper/docs/features/commands.md +9 -0
- package/bundled/qc-helper/docs/features/computer-use.md +26 -8
- package/bundled/qc-helper/docs/features/cross-session-protocol.md +23 -5
- package/bundled/qc-helper/docs/features/followup-suggestions.md +17 -5
- package/bundled/qc-helper/docs/features/goals.md +22 -18
- package/bundled/qc-helper/docs/features/hooks.md +48 -37
- package/bundled/qc-helper/docs/features/skills.md +33 -3
- package/bundled/qc-helper/docs/features/status-line.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +27 -0
- package/bundled/qc-helper/docs/qwen-serve.md +7 -3
- package/bundled/review/SKILL.md +20 -10
- package/bundled/review/references/persistence.md +2 -0
- package/bundled/workflow-authoring/SKILL.md +442 -0
- package/bundled/workflow-creator/SKILL.md +1 -1
- package/chunks/{MaxSizedBox-D4LW7RZZ.js → MaxSizedBox-Q44AWRWI.js} +59 -55
- package/chunks/{StandaloneSessionPicker-ALTTRWUP.js → StandaloneSessionPicker-UKII7M7U.js} +83 -79
- package/chunks/{acp-startup-profiler-KEU6VAYR.js → acp-startup-profiler-RUQNTNU5.js} +2 -2
- package/chunks/acp-subagent-executor-7RUAOXE7.js +141 -0
- package/chunks/{acpAgent-BBSW7XZG.js → acpAgent-5N3LHCO3.js} +1026 -355
- package/chunks/{agent-SQ6OY3QD.js → agent-LU5UJALC.js} +43 -39
- package/chunks/{agent-headless-RI2THRQ7.js → agent-headless-LTLADUGR.js} +43 -39
- package/chunks/{anthropicContentGenerator-JSKMKS6V.js → anthropicContentGenerator-H5YPXIDE.js} +37 -15
- package/chunks/{artifact-tool-PMYZCYNH.js → artifact-tool-MFGORTWZ.js} +59 -109
- package/chunks/{askUserQuestion-4M4YYIB4.js → askUserQuestion-WS4GUT7C.js} +3 -3
- package/chunks/{bridge-DAFMI72L.js → bridge-P34XQP3D.js} +63 -58
- package/chunks/{build-63BIOYWK.js → build-5KWQBWEQ.js} +1 -1
- package/chunks/{ca-KC2AISNS.js → ca-GZ4FDJU2.js} +3 -3
- package/chunks/{channel-management-service-OWDXVL7R.js → channel-management-service-AFVIT4VH.js} +8 -8
- package/chunks/{channel-settings-store-4I6JONT7.js → channel-settings-store-VE4ARRSR.js} +68 -64
- package/chunks/{channel-worker-group-F2ZZMLNS.js → channel-worker-group-JR6JOELM.js} +8 -8
- package/chunks/{channel-worker-manager-2SZLJJSJ.js → channel-worker-manager-AVKJEZFL.js} +8 -8
- package/chunks/{channel-worker-supervisor-ZFNWMG6D.js → channel-worker-supervisor-OOYY7BAQ.js} +5 -5
- package/chunks/{chunk-DAWWT2ID.js → chunk-2NRKLYID.js} +1374 -2164
- package/chunks/{chunk-53GWJOLP.js → chunk-2P2IXKDR.js} +3 -1
- package/chunks/{chunk-6JACAGYH.js → chunk-2S2WIGCM.js} +1 -1
- package/chunks/{chunk-IUVIBDKU.js → chunk-2YMRRI2C.js} +9 -10
- package/chunks/{chunk-MLQNSPRZ.js → chunk-3AYIKQTJ.js} +15 -5
- package/chunks/{chunk-F53KKZUD.js → chunk-3LMDSCLU.js} +158 -10
- package/chunks/{chunk-WG7BL3FY.js → chunk-473RJLIH.js} +1 -1
- package/chunks/{chunk-BWAMMKIS.js → chunk-4XP7WXC4.js} +135 -6
- package/chunks/{chunk-W5ZQMAEM.js → chunk-4Y2I3CI3.js} +1 -1
- package/chunks/{chunk-HGEUHUEV.js → chunk-54B2LTKP.js} +1 -1
- package/chunks/{chunk-IRH27ZC2.js → chunk-5EZRLTLQ.js} +4 -4
- package/chunks/{chunk-DLH7YIX6.js → chunk-5FK4MSHB.js} +3 -3
- package/chunks/chunk-5JG3DAKS.js +1416 -0
- package/chunks/{chunk-CUEXOHQH.js → chunk-5ODRE7E5.js} +9 -15
- package/chunks/{chunk-532WHF4F.js → chunk-5VQR2DD7.js} +2 -2
- package/chunks/chunk-62MWBTS7.js +191 -0
- package/chunks/{chunk-YQHLFCPU.js → chunk-65ANUQSV.js} +32 -24
- package/chunks/{chunk-YBUMTY7B.js → chunk-66N6C4EH.js} +1 -1
- package/chunks/{chunk-AC6KDLH3.js → chunk-6TFZIA2L.js} +1 -1
- package/chunks/{chunk-Y2MYW47X.js → chunk-6WXVEDT2.js} +9 -2
- package/chunks/{chunk-NRXWJXJ4.js → chunk-7GKPKIUB.js} +15 -15
- package/chunks/chunk-7JGH6IMU.js +2780 -0
- package/chunks/{chunk-ZHKTKHMO.js → chunk-7MIBD3LG.js} +1 -1
- package/chunks/{chunk-HGAELO7B.js → chunk-7ML2ZLQF.js} +2 -2
- package/chunks/{chunk-3UXUOFO6.js → chunk-7W2Y3PZD.js} +9 -10
- package/chunks/{chunk-76RGWKLS.js → chunk-ABNX6E6K.js} +1 -1
- package/chunks/chunk-ACHCT36C.js +28 -0
- package/chunks/{chunk-NE624IVP.js → chunk-ADQUK6WA.js} +1 -1
- package/chunks/{chunk-PLLIWEM3.js → chunk-AEWCOE64.js} +2 -2
- package/chunks/{chunk-3FPYT6QC.js → chunk-ARDHE6MM.js} +23 -0
- package/chunks/{chunk-LILGKQ4B.js → chunk-AXZMWAJV.js} +156 -26
- package/chunks/{chunk-SYLECP23.js → chunk-BBMOAZ2E.js} +4 -4
- package/chunks/{chunk-RWVD5RRY.js → chunk-BDDE4YNP.js} +3 -3
- package/chunks/{chunk-TPKQIA7G.js → chunk-BSIOCNDK.js} +1 -1
- package/chunks/{chunk-U7O65WKL.js → chunk-BW2SMO6L.js} +1 -1
- package/chunks/{chunk-WBCPROWX.js → chunk-C4HBZQNH.js} +1 -1
- package/chunks/{chunk-NOO4QFXM.js → chunk-C75BXMPM.js} +1 -3
- package/chunks/chunk-CFMZLE3L.js +75 -0
- package/chunks/{chunk-AXTFYDXT.js → chunk-CXXAZ2LZ.js} +1 -1
- package/chunks/{chunk-N7VWZDWW.js → chunk-DCRVSIK6.js} +4460 -3838
- package/chunks/{chunk-NJQTG2G3.js → chunk-DGTH4BSO.js} +11 -11
- package/chunks/{chunk-J3TJH52D.js → chunk-DOTF2PF2.js} +1 -1
- package/chunks/{chunk-BWQLXU37.js → chunk-E4XZSQXB.js} +381 -86
- package/chunks/{chunk-2ALXPGB4.js → chunk-E6IR653O.js} +1 -1
- package/chunks/{chunk-R4Q2PEFV.js → chunk-E7HXORS7.js} +1 -1
- package/chunks/{chunk-ZKYR7QS4.js → chunk-EDB556X7.js} +2 -2
- package/chunks/{chunk-NUQVB25K.js → chunk-EKMJR7M3.js} +2 -2
- package/chunks/{chunk-Q5BD56BW.js → chunk-ELHAQ5H4.js} +7 -7
- package/chunks/{chunk-GSILBZLN.js → chunk-EOQXU3ZE.js} +2 -2
- package/chunks/{chunk-7QYWGTHB.js → chunk-EPVEPTI3.js} +44 -151
- package/chunks/{chunk-POC3YMHG.js → chunk-F2IRY2TD.js} +4 -4
- package/chunks/{chunk-S6Q6Q4P2.js → chunk-FBDHP23D.js} +1 -1
- package/chunks/{chunk-3I7W2POO.js → chunk-FGROOEKM.js} +5 -40
- package/chunks/{chunk-HNLMYDQE.js → chunk-FMLBBXHB.js} +13 -9
- package/chunks/{chunk-Z3GF56ME.js → chunk-FRISMWG3.js} +3 -3
- package/chunks/{chunk-ALMR3E6Q.js → chunk-GDWE23OR.js} +3 -3
- package/chunks/{chunk-IAEXTMED.js → chunk-GNV2SFO7.js} +173 -7
- package/chunks/{chunk-CXTPVBFA.js → chunk-GSS4SZNG.js} +100 -17
- package/chunks/{chunk-3XLK2QMY.js → chunk-H7L725Z6.js} +59 -16
- package/chunks/{chunk-6HUXPLB5.js → chunk-HEOH7JZY.js} +5 -5
- package/chunks/{chunk-DTNV6UZY.js → chunk-HFJSQ4GL.js} +10 -24
- package/chunks/{chunk-BZM5U74J.js → chunk-I6JRN375.js} +724 -468
- package/chunks/{chunk-VZUCTJ2P.js → chunk-I6YJZGHS.js} +10 -10
- package/chunks/{chunk-RZHU3K6M.js → chunk-IAS753HG.js} +2 -20
- package/chunks/{chunk-EDMXGXAK.js → chunk-IBRQG2MP.js} +10 -13
- package/chunks/{chunk-NOAG7N22.js → chunk-IGLX6UXJ.js} +2 -2
- package/chunks/chunk-INGBUYL6.js +230 -0
- package/chunks/{chunk-IL5M5NYD.js → chunk-IR5CVY5G.js} +11 -9
- package/chunks/{chunk-OX7IZ2G5.js → chunk-ITOB3LRT.js} +4 -4
- package/chunks/{chunk-LDVNJZGH.js → chunk-IUXWAKVS.js} +17 -8
- package/chunks/{chunk-2PJRI3EH.js → chunk-J4DRBDHX.js} +218 -43
- package/chunks/{chunk-XGYHNWL3.js → chunk-J7LBAKDH.js} +3 -3
- package/chunks/{chunk-W5FIP7FC.js → chunk-JLZ5YCMV.js} +5 -5
- package/chunks/{chunk-LG5Y4OWO.js → chunk-JRHKM3YQ.js} +2 -2
- package/chunks/{chunk-2ZN3O5FT.js → chunk-JZ3FFPES.js} +6 -6
- package/chunks/{chunk-NMCDMLHL.js → chunk-K2DCZ6SZ.js} +50 -35
- package/chunks/{chunk-F42YYSCK.js → chunk-KLGCF6G7.js} +8 -8
- package/chunks/{chunk-K2OJUPOE.js → chunk-KP2FHIFR.js} +12 -0
- package/chunks/{chunk-IV7GDNKC.js → chunk-KZCK5JUN.js} +4 -4
- package/chunks/{acp-subagent-executor-LEUN3N7N.js → chunk-L56E7YUM.js} +11 -110
- package/chunks/{chunk-NMRCXKQ5.js → chunk-L5BVU4JW.js} +3 -3
- package/chunks/{chunk-ZW2EUO2A.js → chunk-L6DIANLD.js} +1 -1
- package/chunks/{chunk-GOXQL4YH.js → chunk-LFNK4DGQ.js} +2 -2
- package/chunks/{chunk-UKZ45TJL.js → chunk-LMDMYMSS.js} +420 -219
- package/chunks/chunk-LMJSPC55.js +260 -0
- package/chunks/{chunk-X6K77VHC.js → chunk-LWWRJRCD.js} +1 -1
- package/chunks/{chunk-UXEO7E3V.js → chunk-LYD3T3H7.js} +1 -0
- package/chunks/{chunk-HBQ2NXOU.js → chunk-M6MID3FA.js} +2 -2
- package/chunks/{chunk-E4UEO3XM.js → chunk-ME4JBHSB.js} +324 -2
- package/chunks/{chunk-MF6E7FSA.js → chunk-MFPAVOYJ.js} +8 -201
- package/chunks/{chunk-BV6Q5HMY.js → chunk-MJHLKWGJ.js} +8 -7
- package/chunks/{chunk-NFYEQRLG.js → chunk-MQRLLBMQ.js} +1 -1
- package/chunks/{chunk-O4KNCAX4.js → chunk-NCPFOLM2.js} +11 -0
- package/chunks/{chunk-2SZH22YO.js → chunk-NJ2OFVUX.js} +115 -97
- package/chunks/{chunk-6MBXY6WM.js → chunk-NRQI3PGS.js} +1 -1
- package/chunks/{chunk-3CZ2BQV6.js → chunk-NXUZFW3G.js} +49 -19
- package/chunks/{chunk-X7UJKOHZ.js → chunk-O75ZXPOX.js} +4 -6
- package/chunks/{chunk-5GLDOLNQ.js → chunk-OWUAZXXN.js} +4 -3
- package/chunks/{chunk-XBZTAGB7.js → chunk-OXDQETZA.js} +1 -1
- package/chunks/{chunk-2UWQX4FP.js → chunk-OZEV3R3S.js} +1 -1
- package/chunks/{chunk-SBRX4BDI.js → chunk-P225AM5U.js} +2 -2
- package/chunks/{chunk-ZU47FBOC.js → chunk-P6XVYPWA.js} +126 -12
- package/chunks/{chunk-MHAADZOZ.js → chunk-PCIYPEYV.js} +3 -3
- package/chunks/{chunk-SSGAAWLY.js → chunk-PNACDSCO.js} +95 -73
- package/chunks/chunk-PRWRNC64.js +32 -0
- package/chunks/{chunk-7BXXIQG4.js → chunk-PVKEYO5D.js} +36 -72
- package/chunks/{chunk-FCQJLMA2.js → chunk-Q3TFRP5G.js} +178 -8
- package/chunks/{chunk-DYFOSJHU.js → chunk-QM2MRAG4.js} +2756 -1153
- package/chunks/{chunk-ZKZHSB5W.js → chunk-QR4Q425T.js} +9 -9
- package/chunks/{chunk-J6MB5ZHZ.js → chunk-QZW6WRB7.js} +2 -1
- package/chunks/{chunk-3BTSSIJO.js → chunk-RHTNPDGD.js} +99 -14
- package/chunks/{chunk-OLTN767L.js → chunk-RJFUPP3F.js} +2 -2
- package/chunks/chunk-RKXAOP6F.js +154 -0
- package/chunks/{chunk-TP6FYVQT.js → chunk-RSWBT7AZ.js} +33 -1
- package/chunks/{chunk-E7LB57MB.js → chunk-RWKR4VNK.js} +6 -6
- package/chunks/chunk-S7UQ3V2H.js +87 -0
- package/chunks/{chunk-N6VQ37ZZ.js → chunk-SFL6U7U7.js} +1 -1
- package/chunks/{chunk-SODMFNAR.js → chunk-SQCZDHBQ.js} +5 -5
- package/chunks/{chunk-MOS5OAOG.js → chunk-SROLVJFY.js} +6 -6
- package/chunks/{chunk-3KQBQ6FM.js → chunk-SYDMM6IX.js} +190 -28
- package/chunks/{chunk-HUXPEUFL.js → chunk-SYROIHU7.js} +1 -1
- package/chunks/{chunk-PSPAM24S.js → chunk-TBSCTWKF.js} +6 -0
- package/chunks/{chunk-RLLRJJDR.js → chunk-TJDUJSVH.js} +2 -2
- package/chunks/{chunk-HBU7EKY4.js → chunk-TRKIKBUW.js} +45 -15
- package/chunks/{chunk-GCDXVPFK.js → chunk-TW2RLZPC.js} +31 -7
- package/chunks/chunk-U6H3XTFA.js +95 -0
- package/chunks/{chunk-NHJKAR6E.js → chunk-UGEDTVL6.js} +972 -18
- package/chunks/{chunk-KOKPXIAN.js → chunk-UL4DXZMP.js} +3 -3
- package/chunks/{chunk-MSNHNAQZ.js → chunk-UUT7EFX3.js} +3 -3
- package/chunks/{chunk-JXNIF2O5.js → chunk-V545KI73.js} +1 -1
- package/chunks/{chunk-7ICHPMBQ.js → chunk-VELFTVEO.js} +4 -4
- package/chunks/chunk-VGY2RGXL.js +100 -0
- package/chunks/{chunk-5KI7ZDTB.js → chunk-VQ3SUPLA.js} +24 -12
- package/chunks/{chunk-TBEXLLAO.js → chunk-VRQZESKP.js} +1 -1
- package/chunks/{chunk-FN3JNDRU.js → chunk-VVI7MK3V.js} +3 -3
- package/chunks/{chunk-EUURTIV6.js → chunk-WBSJ6VPZ.js} +10 -2
- package/chunks/{chunk-NLNQNBZ2.js → chunk-WD6YQI5M.js} +1 -1
- package/chunks/{chunk-KFZYGSJN.js → chunk-WDB57HEI.js} +3 -3
- package/chunks/chunk-WFNEY5G7.js +347 -0
- package/chunks/{chunk-XKBFYTCD.js → chunk-WK6DEH3Q.js} +46 -0
- package/chunks/{chunk-EVTNACMT.js → chunk-WKQX4FND.js} +12 -12
- package/chunks/{chunk-36HCNKDS.js → chunk-WKVZES7O.js} +65 -14
- package/chunks/{chunk-NHCZJQE4.js → chunk-WLFILD4T.js} +6 -6
- package/chunks/{chunk-JYKWOREU.js → chunk-WMEX6CFP.js} +13 -3
- package/chunks/{chunk-6W4HBUA2.js → chunk-WNQRJXKP.js} +1 -1
- package/chunks/{chunk-7APZIRH3.js → chunk-X7GOO6VM.js} +5 -5
- package/chunks/{chunk-VX63RJXE.js → chunk-XX5HQLCZ.js} +7 -0
- package/chunks/{chunk-2Z3T52OC.js → chunk-Y5TM7SBV.js} +7 -2
- package/chunks/{chunk-V2P3DOQR.js → chunk-YDFOHRS5.js} +1 -1
- package/chunks/{chunk-QMUYLYT5.js → chunk-YGFJ6BRT.js} +1 -1
- package/chunks/{chunk-LK2WUCDQ.js → chunk-YM6KUQ2S.js} +1 -1
- package/chunks/chunk-Z72PLR74.js +36 -0
- package/chunks/{chunk-BHTYRHJF.js → chunk-ZJ7JQUGY.js} +4 -1
- package/chunks/{chunk-4ALNJDHL.js → chunk-ZKIAGIGH.js} +87 -4
- package/chunks/{chunk-VG3Q2NC4.js → chunk-ZNI3YJHS.js} +32 -12
- package/chunks/{chunk-DT75RKNH.js → chunk-ZXUKZHMV.js} +3 -3
- package/chunks/{chunk-Q2LVVIKF.js → chunk-ZZUXUBEB.js} +29 -12
- package/chunks/codex-subagent-executor-WCRCJMQK.js +586 -0
- package/chunks/{config-utils-L6KLDYIV.js → config-utils-73C3RGYN.js} +60 -56
- package/chunks/{contextCommand-UYEH7NIU.js → contextCommand-4ZDPQJHD.js} +58 -54
- package/chunks/{core-runtime-NVHT3Z3V.js → core-runtime-ZDUA5DYE.js} +58 -55
- package/chunks/{create-sub-session-YWASE5VH.js → create-sub-session-JK3SSJKO.js} +169 -89
- package/chunks/{create-sub-session-TIGCFGCS.js → create-sub-session-MSGNIM37.js} +5 -2
- package/chunks/{cron-create-AKWX67FO.js → cron-create-U2JJ5CCF.js} +3 -3
- package/chunks/{cron-delete-XPB6IYZJ.js → cron-delete-7DM4LJWD.js} +2 -2
- package/chunks/{cron-list-XBKO4WU5.js → cron-list-VCUSZK2Y.js} +2 -2
- package/chunks/{daemon-G5TYKZD6.js → daemon-NJB4PWZ7.js} +3 -1
- package/chunks/{daemon-git-worktree-guard-FOW4RQSK.js → daemon-git-worktree-guard-QU2CCJIE.js} +58 -54
- package/chunks/{daemon-status-provider-O5KQZYMP.js → daemon-status-provider-2PO7NLDQ.js} +68 -63
- package/chunks/{daemon-trust-policy-3ATXEON7.js → daemon-trust-policy-IMDTIUWB.js} +64 -60
- package/chunks/{daemon-trust-policy-monitor-7MCNDNEC.js → daemon-trust-policy-monitor-6IVBNUAD.js} +64 -60
- package/chunks/{de-UU2YTO37.js → de-VGY3VNBU.js} +3 -3
- package/chunks/{deferred-core-runtime-JK5IXL5K.js → deferred-core-runtime-3AZUE7F3.js} +56 -52
- package/chunks/{discovery-XP4RMDUM.js → discovery-5KUEPR65.js} +2 -2
- package/chunks/{display-image-NAH3AZ63.js → display-image-QTHALY6N.js} +3 -3
- package/chunks/{dist-KLZ7XGEQ.js → dist-2QYIVNS6.js} +1 -4
- package/chunks/{dist-AHJYPSJL.js → dist-GUB7QRYA.js} +2 -5
- package/chunks/{dist-ZXTZTE54.js → dist-MPUZZOG5.js} +4 -17
- package/chunks/{dist-F2DVGTL3.js → dist-NIOJXMGY.js} +111 -101
- package/chunks/{dist-KJGRVIGJ.js → dist-PA7WPFVE.js} +5 -36
- package/chunks/{dist-AIKC5E5P.js → dist-SE4J6Z4O.js} +43 -669
- package/chunks/{dist-H6G3K26N.js → dist-T6DDPDLQ.js} +14 -34
- package/chunks/{dist-GWNQVPZT.js → dist-TFGETXFN.js} +10 -33
- package/chunks/{dist-ZA52JXAS.js → dist-VDLSBCLM.js} +1 -5
- package/chunks/{edit-SY35KYIE.js → edit-HXMBABZU.js} +46 -42
- package/chunks/{en-CAJHTIQT.js → en-E5ZO5TZW.js} +5 -3
- package/chunks/{enter-worktree-54L5QJ3N.js → enter-worktree-CAARFWBI.js} +6 -5
- package/chunks/{enterPlanMode-HXX6KQJR.js → enterPlanMode-KAMW2I2C.js} +43 -39
- package/chunks/{environment-DKXHG4HB.js → environment-HYMXOTVB.js} +59 -55
- package/chunks/{errors-ADY7LQJJ.js → errors-NQRH7NAM.js} +58 -54
- package/chunks/exec-RPKEY6HP.js +505 -0
- package/chunks/{exit-worktree-EORJDKDS.js → exit-worktree-JXGGUOBP.js} +6 -5
- package/chunks/{exitPlanMode-HSK2CQI6.js → exitPlanMode-SMEBS5EF.js} +43 -39
- package/chunks/{fast-path-U636VWN2.js → fast-path-CUWUTJUR.js} +10 -10
- package/chunks/{fast-path-settings-V7MI7EZJ.js → fast-path-settings-XDYX7X5Z.js} +2 -2
- package/chunks/{fr-HKNWVXRJ.js → fr-UAZJJH5N.js} +3 -3
- package/chunks/{glob-GUGGTH5L.js → glob-VOM5DVZ3.js} +43 -39
- package/chunks/{goal-tools-PXYRSQGX.js → goal-tools-YBYJ5KPM.js} +49 -41
- package/chunks/{grep-3PKFKLCA.js → grep-H2I33VAO.js} +8 -3
- package/chunks/{handleAutoUpdate-5KHS4HIN.js → handleAutoUpdate-4CEHNJ2F.js} +61 -57
- package/chunks/{i18n-KSGKMUPT.js → i18n-G7ODGUGN.js} +57 -53
- package/chunks/{image-gen-OCCR2WWU.js → image-gen-5G2TQ3DY.js} +6 -5
- package/chunks/{initializer-YYT5XEZF.js → initializer-GZ73HSOA.js} +64 -60
- package/chunks/{installationInfo-UNSBPYW2.js → installationInfo-PV472I52.js} +57 -53
- package/chunks/{ja-GJS5RZGU.js → ja-2RITCMAJ.js} +3 -3
- package/chunks/list-D4A7LFOF.js +133 -0
- package/chunks/{list-agents-QLDXS5OD.js → list-agents-EWDCEPIW.js} +3 -3
- package/chunks/{llm-XGGLBGPH.js → llm-PJU4VT3K.js} +161 -125
- package/chunks/{llm-content-generator-ZHQQT5W7.js → llm-content-generator-ITOMDK65.js} +14 -7
- package/chunks/{loadedSettingsAdapter-3DXLASK7.js → loadedSettingsAdapter-NNU4BY5Q.js} +64 -60
- package/chunks/{loggingContentGenerator-V72OCCJO.js → loggingContentGenerator-SMI2AJYY.js} +47 -43
- package/chunks/{loop-wakeup-HHMYIC7Z.js → loop-wakeup-VG6CGBQA.js} +4 -4
- package/chunks/{ls-N7ABR6HI.js → ls-6ZB3BEIR.js} +1 -1
- package/chunks/{lsp-LTOFWG5P.js → lsp-M54FQARP.js} +5 -1
- package/chunks/{managed-npm-update-HV5LPZH2.js → managed-npm-update-AN5RDI5D.js} +57 -53
- package/chunks/mcp-RIIEZ7NJ.js +127 -0
- package/chunks/model-configuration-E5M35A3M.js +140 -0
- package/chunks/modelConfigUtils-43SY2EDS.js +119 -0
- package/chunks/{monitor-TLBNM4MV.js → monitor-5WYDOXLI.js} +43 -39
- package/chunks/{nonInteractiveCli-LSJSQ2W4.js → nonInteractiveCli-D3YFYXNB.js} +112 -107
- package/chunks/{notebook-edit-OSPOLZP6.js → notebook-edit-GQNFJTIR.js} +45 -41
- package/chunks/{openaiContentGenerator-BE4S5TRD.js → openaiContentGenerator-VJAKFZ32.js} +24 -19
- package/chunks/{openaiResponsesContentGenerator-RTCAJ5V5.js → openaiResponsesContentGenerator-AWRYZLJU.js} +110 -19
- package/chunks/{pidfile-H32FEPWA.js → pidfile-I5SWEJDX.js} +56 -52
- package/chunks/{processUtils-SSLIPDEA.js → processUtils-NSYM3SKR.js} +2 -2
- package/chunks/{prompt-terminal-ledger-I5SLL6UF.js → prompt-terminal-ledger-KWBANHUE.js} +57 -53
- package/chunks/{pt-FXMYXEUV.js → pt-5ZF7ZQUV.js} +3 -3
- package/chunks/{qwenContentGenerator-TMQC623Z.js → qwenContentGenerator-LR6HNFBU.js} +47 -43
- package/chunks/{qwenOAuth2-3ZRQHHTC.js → qwenOAuth2-WIEUEFEY.js} +5 -4
- package/chunks/{read-file-T2QAIZE2.js → read-file-LOSUPKDX.js} +9 -8
- package/chunks/{read-mcp-resource-B37WANAQ.js → read-mcp-resource-LPSWXVOD.js} +1 -1
- package/chunks/{record-artifact-OAXWXZ5D.js → record-artifact-PXMNP7GZ.js} +3 -3
- package/chunks/{record-source-D7R7X3GT.js → record-source-2GSY5JD5.js} +6 -6
- package/chunks/{report-findings-AR3VC6EQ.js → report-findings-W6GR7SYZ.js} +4 -4
- package/chunks/{request-shutdown-IKNWTX5M.js → request-shutdown-53SNYGVR.js} +5 -5
- package/chunks/{resumeHistoryUtils-QLKDH5GY.js → resumeHistoryUtils-6IFK3MQO.js} +63 -59
- package/chunks/{ripGrep-YGWL7KCV.js → ripGrep-MBSYRHNP.js} +13 -11
- package/chunks/{ru-RMHURE5U.js → ru-7BNZFQKG.js} +3 -3
- package/chunks/{run-qwen-serve-26KZDECC.js → run-qwen-serve-WYEEYIHV.js} +314 -127
- package/chunks/{runtime-BMEIVDDG.js → runtime-FVTTOB4E.js} +69 -65
- package/chunks/{scheduled-tasks-NCFPP6VQ.js → scheduled-tasks-RN6DUY7E.js} +66 -60
- package/chunks/{scheduler-47TVMUVN.js → scheduler-T7DDWINW.js} +58 -54
- package/chunks/{sdk-exporters-http-VWTF4W6K.js → sdk-exporters-http-3R2TRQHE.js} +2 -1
- package/chunks/{sdk-impl-G6FVTBQZ.js → sdk-impl-4WF3VZ2F.js} +3 -3
- package/chunks/{send-message-TWOGWCBG.js → send-message-UMJKN27Q.js} +7 -7
- package/chunks/{serve-KL3G6LQQ.js → serve-LVMPJBTV.js} +66 -62
- package/chunks/{server-LBPYXZ5G.js → server-U7K7EJEP.js} +783 -350
- package/chunks/{session-YG6742LO.js → session-BQNC5QUN.js} +117 -112
- package/chunks/{session-attachments-root-OUBQDYC4.js → session-attachments-root-LQDHWZST.js} +56 -52
- package/chunks/{session-pr-refresh-EKGMYNAW.js → session-pr-refresh-J7DQYX2I.js} +66 -60
- package/chunks/{settings-DDNHJX2L.js → settings-WAWJIZHR.js} +67 -63
- package/chunks/{shell-KUCXWITU.js → shell-WFJEYGQI.js} +43 -39
- package/chunks/{skill-JQLKPNWZ.js → skill-RHQWSDOK.js} +128 -23
- package/chunks/{skill-settings-XERQCUXZ.js → skill-settings-ALFUQQD6.js} +72 -60
- package/chunks/{spawnChannel-GQ45QFGB.js → spawnChannel-D35CB5JB.js} +60 -55
- package/chunks/{standalone-update-PRF3ILGZ.js → standalone-update-NMMY6CAO.js} +58 -54
- package/chunks/{start-opentui-ui-JDSOZE3N.js → start-opentui-ui-F6BN46GE.js} +2693 -2160
- package/chunks/{startInteractiveUI-RRW3JVHN.js → startInteractiveUI-E6U7L5AD.js} +1610 -1773
- package/chunks/{syntheticOutput-F6F27JMK.js → syntheticOutput-EX5L5GYI.js} +2 -2
- package/chunks/{task-create-Y623TBHB.js → task-create-75HVPEAH.js} +7 -7
- package/chunks/{task-list-FCPEEGWL.js → task-list-ZLJSMRFA.js} +2 -2
- package/chunks/{task-stop-QTKZXLPH.js → task-stop-MD7P6QGK.js} +1 -1
- package/chunks/{task-update-YLSXF25N.js → task-update-RI7QNVDP.js} +20 -13
- package/chunks/{team-create-5DRLOLOE.js → team-create-DKAJ3OUY.js} +43 -39
- package/chunks/{team-delete-S7TLHZCF.js → team-delete-RIDINW6I.js} +1 -1
- package/chunks/{team-plan-approval-MWSGAL5T.js → team-plan-approval-ZUG32DAK.js} +43 -39
- package/chunks/{terminal-image-renderer-H7PD4FQW.js → terminal-image-renderer-U3Z5PMGO.js} +58 -54
- package/chunks/{theme-manager-7AV73D6R.js → theme-manager-GA65ZFKB.js} +56 -52
- package/chunks/{todoWrite-5QI2H2FW.js → todoWrite-XSTG2VT5.js} +6 -3
- package/chunks/{tool-search-UGYTBLUV.js → tool-search-XCEN7VXX.js} +17 -12
- package/chunks/{total-session-admission-JIHSTJ5S.js → total-session-admission-FZSHBR32.js} +63 -58
- package/chunks/{trustedFolders-5VCBXFOP.js → trustedFolders-SXPNZESV.js} +57 -53
- package/chunks/{update-relaunch-4LF3APCV.js → update-relaunch-QOUTZZ7Q.js} +5 -5
- package/chunks/{updateCheck-4T3WUE5F.js → updateCheck-DYRX7M34.js} +60 -56
- package/chunks/{useAutoAcceptIndicator-UMGB64Z6.js → useAutoAcceptIndicator-QOG7LUT3.js} +68 -64
- package/chunks/{validateNonInterActiveAuth-GFJ72U2C.js → validateNonInterActiveAuth-FJPAEMDD.js} +109 -104
- package/chunks/{version-EAAZN4T2.js → version-5IC46F2Z.js} +1 -1
- package/chunks/{web-fetch-VRU3A2NI.js → web-fetch-WSW4QZBA.js} +15 -13
- package/chunks/web-search-5QFKXWUV.js +39 -0
- package/chunks/{web-shell-static-CCN4JZEE.js → web-shell-static-T7UGLVE4.js} +2 -7
- package/chunks/{workflow-UHPFALVZ.js → workflow-ZF4DLK4V.js} +179 -79
- package/chunks/workspace-providers-status-4E4XWBFS.js +133 -0
- package/chunks/{workspace-registration-store-A7RGKW62.js → workspace-registration-store-M3QEP27F.js} +2 -2
- package/chunks/{workspace-registry-C2NGE6SD.js → workspace-registry-H2ENI5G2.js} +63 -58
- package/chunks/{workspace-runtime-coordinator-QKMZ24YF.js → workspace-runtime-coordinator-CRRNB7PC.js} +66 -59
- package/chunks/{workspace-service-RQTTAGGC.js → workspace-service-GJ2GOHKU.js} +70 -65
- package/chunks/workspace-skills-status-CRWHV35X.js +130 -0
- package/chunks/{workspace-trust-reconciler-KFWATZUU.js → workspace-trust-reconciler-GG2JA7KI.js} +73 -68
- package/chunks/{write-file-DPVB2SBQ.js → write-file-LZ4EMF36.js} +45 -41
- package/chunks/{zh-TW-2K2WRFPY.js → zh-TW-7PRVUGLW.js} +5 -3
- package/chunks/{zh-S5V3Z5CR.js → zh-V2EYTYJP.js} +5 -3
- package/chunks/{zoom-image-S7AWLAPC.js → zoom-image-J5IMS3WD.js} +11 -10
- package/cli.js +18 -17
- package/codeModeHost.js +4425 -0
- package/export-transcript-document.css +1 -1
- package/export-transcript-document.js +151 -151
- package/locales/ca.js +5 -6
- package/locales/de.js +5 -6
- package/locales/en.js +7 -6
- package/locales/fr.js +6 -6
- package/locales/ja.js +5 -6
- package/locales/pt.js +5 -6
- package/locales/ru.js +6 -6
- package/locales/zh-TW.js +7 -6
- package/locales/zh.js +7 -6
- package/package.json +4 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-nU24rpIE.js → abnfDiagram-VCTEODGH-S_JCiANq.js} +1 -1
- package/web-shell/assets/{arc-D1hTu8QI.js → arc-DP-839Xn.js} +1 -1
- package/web-shell/assets/architectureDiagram-5GKGNRK7-C8rCd2KK.js +36 -0
- package/web-shell/assets/blockDiagram-NRAW4CY4-DQR82jwr.js +129 -0
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-kEFoC1ei.js → c4Diagram-UCG6FXSJ-D21PNMRP.js} +4 -4
- package/web-shell/assets/channel-BgGrpX_z.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DbT9wS7j.js → chunk-2Q5K7J3B-KdDInGLi.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-CNbULt6O.js → chunk-5VM5RSS4-ltb7zRmH.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-CbQRy4Tb.js → chunk-F27PBJKO-DcpQA0Ng.js} +1 -1
- package/web-shell/assets/chunk-G27WJ6UU-C8NDZxcy.js +231 -0
- package/web-shell/assets/chunk-JWPE2WC7-hXhhHTs1.js +1 -0
- package/web-shell/assets/chunk-LCL6LL3I-CLaOR-Hl.js +206 -0
- package/web-shell/assets/chunk-POPQ4Y6H-Y5_qlB1N.js +1 -0
- package/web-shell/assets/{chunk-SVP7TREG-DyBb2Axj.js → chunk-SVP7TREG-BWX2Voh7.js} +4 -4
- package/web-shell/assets/{chunk-XXDRQBXY-BIA0eb5B.js → chunk-XXDRQBXY-1wmj_kXI.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-jUH7ADYs.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-jUH7ADYs.js +1 -0
- package/web-shell/assets/cose-bilkent-JH36ORCC-DpLc-cdd.js +1 -0
- package/web-shell/assets/cynefin-OW5HDTMX-DhxGiPZW.js +178 -0
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-LENf_IUy.js → cynefinDiagram-5FMLGOSQ-Dl3jfBry.js} +1 -1
- package/web-shell/assets/{cytoscape.esm-CUqq0XTU.js → cytoscape.esm-DJK6lGiH.js} +3 -3
- package/web-shell/assets/dagre-3AP2YEHR-C8FA8vJk.js +4 -0
- package/web-shell/assets/diagram-S7CK7UJ4-D-quIUtW.js +30 -0
- package/web-shell/assets/diagram-UQ7AKVKN-Bjo09Uts.js +41 -0
- package/web-shell/assets/diagram-VSXAHHWV-IoI3ttq4.js +3 -0
- package/web-shell/assets/diagram-VX7I27RA-BKyOZ5SO.js +24 -0
- package/web-shell/assets/diagram-Z3DM3KII-Cu_OHEhw.js +24 -0
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-BGpiquRm.js → ebnfDiagram-PWID7BFC-UVB-bbPg.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-D0besu_U.js → erDiagram-SSCWMZ5O-l8drddto.js} +13 -13
- package/web-shell/assets/flowDiagram-A5DVABFB-DU1I_VAI.js +168 -0
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CNlsAeNr.js → ganttDiagram-EL5Y4UJY-BLRH05uB.js} +1 -1
- package/web-shell/assets/gitGraphDiagram-WWUBYQGX-Czg_BkRE.js +106 -0
- package/web-shell/assets/index-CmMV8Jla.js +3 -0
- package/web-shell/assets/{index-CGT341lL.js → index-DohPy72Z.js} +1 -1
- package/web-shell/assets/index-DyMtNYuu.js +2207 -0
- package/web-shell/assets/index-n6N-2a3v.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-Bpai64Ll.js → infoDiagram-RXCK75RN-BpBvjkro.js} +1 -1
- package/web-shell/assets/ishikawaDiagram-5VMMS53U-phy1l3jm.js +70 -0
- package/web-shell/assets/{journeyDiagram-EYS64GPL-iz_DKgFX.js → journeyDiagram-EYS64GPL-oY-9LgVS.js} +1 -1
- package/web-shell/assets/kanban-definition-3QL26DDD-slZoy-sc.js +89 -0
- package/web-shell/assets/{layout-qEvKgnvU.js → layout-0hnn_P9l.js} +1 -1
- package/web-shell/assets/{linear-C6lklGdq.js → linear-7Wqe8DRy.js} +1 -1
- package/web-shell/assets/mermaid.core-BaK8n0bq.js +312 -0
- package/web-shell/assets/mindmap-definition-FBJOCRG2-BedUdy_E.js +96 -0
- package/web-shell/assets/{pegDiagram-XKGWAZYB-BhD0q0i6.js → pegDiagram-XKGWAZYB-DQLRdmxq.js} +1 -1
- package/web-shell/assets/pieDiagram-E7YTZNPT-UC20w9-5.js +39 -0
- package/web-shell/assets/quadrantDiagram-AXDQQJYC-CQx2Hmk3.js +7 -0
- package/web-shell/assets/qwen-code-notification-BRVagufF.png +0 -0
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-E1g2KIFK.js → railroadDiagram-O6MQD6OU-2UEJe_y-.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CuerYJOe.js → requirementDiagram-EFPCY7ZU-DOAJggB4.js} +13 -13
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CqWyCZGA.js → sankeyDiagram-P5KCCOFB-DnQ_qJo7.js} +7 -7
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-B-YWb8x4.js → sequenceDiagram-WJ2MYXX4-DZrZUoCo.js} +16 -16
- package/web-shell/assets/sizeCapture-X5ZJPWSS-B5G4GDQB.js +1 -0
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-C8LDpNHS.js → stateDiagram-HBIQ2CUA-Bn1cT0qF.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BF3xtNvJ.js +1 -0
- package/web-shell/assets/swimlanes-XN3QIQJK-Bzhcdn87.js +1 -0
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B753mA3E.js +8 -0
- package/web-shell/assets/timeline-definition-24CTP7MA-BqZ_3D10.js +120 -0
- package/web-shell/assets/vennDiagram-4TSXK5OY-z9kw1kmm.js +34 -0
- package/web-shell/assets/wardleyDiagram-VM6X3IG4-Cydp1zJW.js +78 -0
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-ruD2Wjhg.js → xychartDiagram-S5SC5T6Z-j4X1lQKo.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-7Q2AXRDJ.js +0 -114
- package/chunks/chunk-AEY27Z35.js +0 -1411
- package/chunks/chunk-CFKIH3D3.js +0 -50
- package/chunks/chunk-HWVUSYSN.js +0 -126
- package/chunks/chunk-QHMLYMMS.js +0 -32
- package/chunks/chunk-SAH4BD2J.js +0 -92
- package/chunks/chunk-TWUKBNWM.js +0 -86
- package/chunks/chunk-ZTTC7T4X.js +0 -126
- package/chunks/list-YL6LDQKQ.js +0 -129
- package/chunks/mcp-IYVSIW6O.js +0 -123
- package/chunks/web-search-NEGYQNDJ.js +0 -912
- package/chunks/workspace-providers-status-AEYISSU2.js +0 -127
- package/chunks/workspace-skills-status-5HWZU3HX.js +0 -126
- package/web-shell/assets/architectureDiagram-5GKGNRK7-B_fgkKe7.js +0 -36
- package/web-shell/assets/blockDiagram-NRAW4CY4-C3pddUNg.js +0 -129
- package/web-shell/assets/channel-Blod4z1X.js +0 -1
- package/web-shell/assets/chunk-G27WJ6UU-CVbXTxYk.js +0 -231
- package/web-shell/assets/chunk-JWPE2WC7-D89c_BXy.js +0 -1
- package/web-shell/assets/chunk-LCL6LL3I-B7-I_9KB.js +0 -206
- package/web-shell/assets/chunk-POPQ4Y6H-DcLQFzS4.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-D6hFDMqb.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-D6hFDMqb.js +0 -1
- package/web-shell/assets/cose-bilkent-JH36ORCC-Db2FYN85.js +0 -1
- package/web-shell/assets/cynefin-OW5HDTMX-i4GwmBVy.js +0 -178
- package/web-shell/assets/dagre-3AP2YEHR-CF9XVrD9.js +0 -4
- package/web-shell/assets/diagram-S7CK7UJ4-DD5PJfSm.js +0 -30
- package/web-shell/assets/diagram-UQ7AKVKN-CjD_sBMj.js +0 -41
- package/web-shell/assets/diagram-VSXAHHWV-U5WwMqyA.js +0 -3
- package/web-shell/assets/diagram-VX7I27RA-BujpHJJf.js +0 -24
- package/web-shell/assets/diagram-Z3DM3KII-3ZLtKEXo.js +0 -24
- package/web-shell/assets/flowDiagram-A5DVABFB-9DwDuIyr.js +0 -168
- package/web-shell/assets/gitGraphDiagram-WWUBYQGX-C_pPFiTR.js +0 -106
- package/web-shell/assets/index-BYWs4JWq.js +0 -3
- package/web-shell/assets/index-D3YS6KuJ.js +0 -2173
- package/web-shell/assets/index-eBxK3rs2.css +0 -36
- package/web-shell/assets/ishikawaDiagram-5VMMS53U-ktpJFq4r.js +0 -70
- package/web-shell/assets/kanban-definition-3QL26DDD-m_gG00Yt.js +0 -89
- package/web-shell/assets/mermaid.core-DSCYB_2P.js +0 -312
- package/web-shell/assets/mindmap-definition-FBJOCRG2-DRQbT8w-.js +0 -96
- package/web-shell/assets/pieDiagram-E7YTZNPT-BvIGQCSd.js +0 -39
- package/web-shell/assets/quadrantDiagram-AXDQQJYC-BDQtfpU-.js +0 -7
- package/web-shell/assets/sizeCapture-X5ZJPWSS-BB7YY4Tl.js +0 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C4CbdvGa.js +0 -1
- package/web-shell/assets/swimlanes-XN3QIQJK-D94vOoxZ.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN--QNSIOC8.js +0 -8
- package/web-shell/assets/timeline-definition-24CTP7MA-C9C8uEYm.js +0 -120
- package/web-shell/assets/vennDiagram-4TSXK5OY-CYzMHbVW.js +0 -34
- package/web-shell/assets/wardleyDiagram-VM6X3IG4-G9nhtLES.js +0 -78
- package/chunks/{open-with-auth-6MVIHMXB.js → open-with-auth-XFCCJOO6.js} +3 -3
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
peerSenderKey,
|
|
17
17
|
probePeerSocketVerdict,
|
|
18
18
|
resolvePeerSocketCandidates
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YM6KUQ2S.js";
|
|
20
20
|
import {
|
|
21
21
|
BudgetExhaustedError,
|
|
22
22
|
CoreToolScheduler,
|
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
listDescendantPids,
|
|
59
59
|
listExistingSkillDirNames,
|
|
60
60
|
loadUsageHistoryWithLive,
|
|
61
|
+
loadXtermHeadless,
|
|
61
62
|
mcpSessionMetadataKey,
|
|
62
63
|
mcpTransportOf,
|
|
63
64
|
normalizeMcpIncludeEntry,
|
|
@@ -79,34 +80,34 @@ import {
|
|
|
79
80
|
stripToolResultImages,
|
|
80
81
|
toolResultBoundaryArtifact,
|
|
81
82
|
toolResultPartDiagnosticValues
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import {
|
|
84
|
-
stripAnsi
|
|
85
|
-
} from "./chunk-TWPJO254.js";
|
|
83
|
+
} from "./chunk-DCRVSIK6.js";
|
|
86
84
|
import {
|
|
87
85
|
hasVerifiableInode,
|
|
88
86
|
openNoFollow
|
|
89
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-HEOH7JZY.js";
|
|
88
|
+
import {
|
|
89
|
+
stripAnsi
|
|
90
|
+
} from "./chunk-TWPJO254.js";
|
|
90
91
|
import {
|
|
91
92
|
projectUserTranscriptForDisplay
|
|
92
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-ME4JBHSB.js";
|
|
93
94
|
import {
|
|
94
95
|
getProjectSkillsRoot,
|
|
95
96
|
parse
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import {
|
|
98
|
-
resolveBundleDir
|
|
99
|
-
} from "./chunk-DTNV6UZY.js";
|
|
97
|
+
} from "./chunk-NJ2OFVUX.js";
|
|
100
98
|
import {
|
|
101
99
|
glob,
|
|
102
100
|
globSync
|
|
103
101
|
} from "./chunk-QJNDUTOL.js";
|
|
102
|
+
import {
|
|
103
|
+
resolveBundleDir
|
|
104
|
+
} from "./chunk-ACHCT36C.js";
|
|
104
105
|
import {
|
|
105
106
|
escapeJsonTagCharacters
|
|
106
107
|
} from "./chunk-CHEIIBT3.js";
|
|
107
108
|
import {
|
|
108
109
|
flattenPeerLabel
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-OWUAZXXN.js";
|
|
110
111
|
import {
|
|
111
112
|
isPidAlive
|
|
112
113
|
} from "./chunk-CH2YDT6X.js";
|
|
@@ -116,13 +117,13 @@ import {
|
|
|
116
117
|
import {
|
|
117
118
|
BUILT_IN_OUTPUT_STYLES,
|
|
118
119
|
getBuiltInOutputStyle
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-AXZMWAJV.js";
|
|
120
121
|
import {
|
|
121
122
|
getFolderStructure,
|
|
122
123
|
getStartupContextLength,
|
|
123
124
|
isSystemReminderContent,
|
|
124
125
|
stripSystemReminderBlocks
|
|
125
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-VVI7MK3V.js";
|
|
126
127
|
import {
|
|
127
128
|
getQwenIgnoreFileNames,
|
|
128
129
|
require_ignore
|
|
@@ -133,7 +134,7 @@ import {
|
|
|
133
134
|
} from "./chunk-NUQ4GK5I.js";
|
|
134
135
|
import {
|
|
135
136
|
fetchWithPolicy
|
|
136
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-66N6C4EH.js";
|
|
137
138
|
import {
|
|
138
139
|
COMBINED_PASS_TOLERANCE_FACTOR,
|
|
139
140
|
TOOL_OUTPUT_TRUNCATED_PREFIX,
|
|
@@ -142,7 +143,7 @@ import {
|
|
|
142
143
|
removeMCPStatusChangeListener,
|
|
143
144
|
runSideQuery,
|
|
144
145
|
updateMCPServerStatus
|
|
145
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-TRKIKBUW.js";
|
|
146
147
|
import {
|
|
147
148
|
getInvocationContext
|
|
148
149
|
} from "./chunk-5ETULJLP.js";
|
|
@@ -151,10 +152,6 @@ import {
|
|
|
151
152
|
Mutex,
|
|
152
153
|
withTimeout
|
|
153
154
|
} from "./chunk-VGC4I5JJ.js";
|
|
154
|
-
import {
|
|
155
|
-
getAutoMemoryRoot,
|
|
156
|
-
getUserAutoMemoryRoot
|
|
157
|
-
} from "./chunk-EDIDYZBT.js";
|
|
158
155
|
import {
|
|
159
156
|
MEMORY_SECTION_HEADER,
|
|
160
157
|
VISION_BRIDGE_MAX_IMAGES,
|
|
@@ -164,7 +161,11 @@ import {
|
|
|
164
161
|
isCacheableReadResult,
|
|
165
162
|
isWithinRoot,
|
|
166
163
|
processSingleFileContent
|
|
167
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-QZW6WRB7.js";
|
|
165
|
+
import {
|
|
166
|
+
getAutoMemoryRoot,
|
|
167
|
+
getUserAutoMemoryRoot
|
|
168
|
+
} from "./chunk-EDIDYZBT.js";
|
|
168
169
|
import {
|
|
169
170
|
atomicWriteFile,
|
|
170
171
|
atomicWriteJSON
|
|
@@ -174,11 +175,11 @@ import {
|
|
|
174
175
|
normalizeContent,
|
|
175
176
|
stripAnsiAndControl,
|
|
176
177
|
stripHtmlComments
|
|
177
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-4Y2I3CI3.js";
|
|
178
179
|
import {
|
|
179
180
|
ToolNames,
|
|
180
181
|
canonicalToolName
|
|
181
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-RSWBT7AZ.js";
|
|
182
183
|
import {
|
|
183
184
|
PATH_ARG_KEYS,
|
|
184
185
|
QWEN_DIR,
|
|
@@ -1201,7 +1202,7 @@ function buildSessionRecoveryPlanFromApiHistory({
|
|
|
1201
1202
|
historyGaps,
|
|
1202
1203
|
options
|
|
1203
1204
|
}) {
|
|
1204
|
-
const originalApiHistory =
|
|
1205
|
+
const originalApiHistory = inputApiHistory;
|
|
1205
1206
|
const gaps = historyGaps ?? [];
|
|
1206
1207
|
const planId = createPlanId(sessionId, originalApiHistory.length);
|
|
1207
1208
|
const apiHistory = structuredClone(originalApiHistory);
|
|
@@ -3230,212 +3231,6 @@ var WorkspaceMcpBudget = class {
|
|
|
3230
3231
|
}
|
|
3231
3232
|
};
|
|
3232
3233
|
|
|
3233
|
-
// packages/core/src/providers/install.ts
|
|
3234
|
-
init_esbuild_shims();
|
|
3235
|
-
var DENY_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
3236
|
-
"NODE_OPTIONS",
|
|
3237
|
-
"NODE_PATH",
|
|
3238
|
-
"LD_PRELOAD",
|
|
3239
|
-
"LD_LIBRARY_PATH",
|
|
3240
|
-
"DYLD_INSERT_LIBRARIES",
|
|
3241
|
-
"DYLD_LIBRARY_PATH",
|
|
3242
|
-
"PATH",
|
|
3243
|
-
"HOME",
|
|
3244
|
-
"TMPDIR",
|
|
3245
|
-
"TMP",
|
|
3246
|
-
// Windows temp redirect
|
|
3247
|
-
"TEMP"
|
|
3248
|
-
// Windows temp redirect
|
|
3249
|
-
]);
|
|
3250
|
-
function isSameModelIdentity(a, b) {
|
|
3251
|
-
return a.id === b.id && (a.baseUrl ?? "") === (b.baseUrl ?? "");
|
|
3252
|
-
}
|
|
3253
|
-
__name(isSameModelIdentity, "isSameModelIdentity");
|
|
3254
|
-
function applyModelProvidersPatch(existingModelProviders, patch) {
|
|
3255
|
-
const existingModels = existingModelProviders[patch.authType] ?? [];
|
|
3256
|
-
let updatedModels = patch.models;
|
|
3257
|
-
if (patch.mergeStrategy === "append") {
|
|
3258
|
-
updatedModels = [...existingModels, ...patch.models];
|
|
3259
|
-
} else {
|
|
3260
|
-
const ownsModel = patch.ownsModel;
|
|
3261
|
-
const preservedModels = existingModels.filter((model) => {
|
|
3262
|
-
if (ownsModel) {
|
|
3263
|
-
return !ownsModel(model);
|
|
3264
|
-
}
|
|
3265
|
-
return !patch.models.some(
|
|
3266
|
-
(newModel) => isSameModelIdentity(newModel, model)
|
|
3267
|
-
);
|
|
3268
|
-
});
|
|
3269
|
-
updatedModels = patch.mergeStrategy === "replace-owned" ? [...preservedModels, ...patch.models] : [...patch.models, ...preservedModels];
|
|
3270
|
-
}
|
|
3271
|
-
return {
|
|
3272
|
-
...existingModelProviders,
|
|
3273
|
-
[patch.authType]: updatedModels
|
|
3274
|
-
};
|
|
3275
|
-
}
|
|
3276
|
-
__name(applyModelProvidersPatch, "applyModelProvidersPatch");
|
|
3277
|
-
var ProviderInstallError = class extends Error {
|
|
3278
|
-
static {
|
|
3279
|
-
__name(this, "ProviderInstallError");
|
|
3280
|
-
}
|
|
3281
|
-
step;
|
|
3282
|
-
authType;
|
|
3283
|
-
constructor(message, step, authType, options) {
|
|
3284
|
-
super(message, options);
|
|
3285
|
-
this.name = "ProviderInstallError";
|
|
3286
|
-
this.step = step;
|
|
3287
|
-
this.authType = authType;
|
|
3288
|
-
}
|
|
3289
|
-
};
|
|
3290
|
-
async function applyProviderInstallPlan(plan, options) {
|
|
3291
|
-
const {
|
|
3292
|
-
settings,
|
|
3293
|
-
reloadModelProviders,
|
|
3294
|
-
syncAuthState,
|
|
3295
|
-
refreshAuth,
|
|
3296
|
-
doRefreshAuth = true
|
|
3297
|
-
} = options;
|
|
3298
|
-
const previousEnvValues = /* @__PURE__ */ new Map();
|
|
3299
|
-
const previousRuntimeProviders = {
|
|
3300
|
-
...settings.getModelProviders()
|
|
3301
|
-
};
|
|
3302
|
-
let currentStep = "init";
|
|
3303
|
-
try {
|
|
3304
|
-
currentStep = "backup";
|
|
3305
|
-
settings.backup?.();
|
|
3306
|
-
currentStep = "env";
|
|
3307
|
-
const shadowedEnvKeys = [];
|
|
3308
|
-
for (const [key, value] of Object.entries(plan.env ?? {})) {
|
|
3309
|
-
if (DENY_ENV_KEYS.has(key.toUpperCase())) {
|
|
3310
|
-
throw new Error(
|
|
3311
|
-
`Install plan must not set reserved environment variable: ${key}`
|
|
3312
|
-
);
|
|
3313
|
-
}
|
|
3314
|
-
const previous = process.env[key];
|
|
3315
|
-
if (previous !== void 0 && previous !== "" && previous !== value) {
|
|
3316
|
-
shadowedEnvKeys.push(key);
|
|
3317
|
-
}
|
|
3318
|
-
previousEnvValues.set(key, previous);
|
|
3319
|
-
settings.setValue(`env.${key}`, value);
|
|
3320
|
-
process.env[key] = value;
|
|
3321
|
-
}
|
|
3322
|
-
if (shadowedEnvKeys.length > 0) {
|
|
3323
|
-
console.error(
|
|
3324
|
-
`[auth] Warning: ${shadowedEnvKeys.join(", ")} ${shadowedEnvKeys.length === 1 ? "is" : "are"} also set in your shell environment or .env file. The shell/file value will take priority on restart. To ensure your new key is used, update or remove the variable from your shell profile or .env file.`
|
|
3325
|
-
);
|
|
3326
|
-
}
|
|
3327
|
-
currentStep = "modelProviders";
|
|
3328
|
-
let updatedModelProviders = {
|
|
3329
|
-
...previousRuntimeProviders
|
|
3330
|
-
};
|
|
3331
|
-
for (const patch of plan.modelProviders ?? []) {
|
|
3332
|
-
updatedModelProviders = applyModelProvidersPatch(
|
|
3333
|
-
updatedModelProviders,
|
|
3334
|
-
patch
|
|
3335
|
-
);
|
|
3336
|
-
settings.setValue(
|
|
3337
|
-
`modelProviders.${patch.authType}`,
|
|
3338
|
-
updatedModelProviders[patch.authType] ?? []
|
|
3339
|
-
);
|
|
3340
|
-
}
|
|
3341
|
-
currentStep = "authType";
|
|
3342
|
-
settings.setValue("security.auth.selectedType", plan.authType);
|
|
3343
|
-
currentStep = "legacyCredentials";
|
|
3344
|
-
if (plan.legacyCredentials?.apiKey != null) {
|
|
3345
|
-
settings.setValue("security.auth.apiKey", plan.legacyCredentials.apiKey);
|
|
3346
|
-
}
|
|
3347
|
-
if (plan.legacyCredentials?.baseUrl != null) {
|
|
3348
|
-
settings.setValue(
|
|
3349
|
-
"security.auth.baseUrl",
|
|
3350
|
-
plan.legacyCredentials.baseUrl
|
|
3351
|
-
);
|
|
3352
|
-
}
|
|
3353
|
-
currentStep = "modelSelection";
|
|
3354
|
-
let effectiveModelSelection = plan.modelSelection;
|
|
3355
|
-
if (effectiveModelSelection?.modelId) {
|
|
3356
|
-
const currentModelId = settings.getValue("model.name");
|
|
3357
|
-
const currentBaseUrl = settings.getValue("model.baseUrl");
|
|
3358
|
-
const planOffersCurrentModel = typeof currentModelId === "string" && currentModelId.length > 0 && (plan.modelProviders ?? []).some(
|
|
3359
|
-
(patch) => patch.models.some(
|
|
3360
|
-
(model) => currentBaseUrl === "" || currentBaseUrl === void 0 ? model.id === currentModelId : isSameModelIdentity(
|
|
3361
|
-
{ id: currentModelId, baseUrl: currentBaseUrl },
|
|
3362
|
-
model
|
|
3363
|
-
)
|
|
3364
|
-
)
|
|
3365
|
-
);
|
|
3366
|
-
if (planOffersCurrentModel) {
|
|
3367
|
-
effectiveModelSelection = void 0;
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
if (effectiveModelSelection?.modelId) {
|
|
3371
|
-
settings.setValue("model.name", effectiveModelSelection.modelId);
|
|
3372
|
-
if (effectiveModelSelection.baseUrl) {
|
|
3373
|
-
settings.setValue("model.baseUrl", effectiveModelSelection.baseUrl);
|
|
3374
|
-
} else {
|
|
3375
|
-
settings.setValue("model.baseUrl", "");
|
|
3376
|
-
}
|
|
3377
|
-
}
|
|
3378
|
-
currentStep = "providerState";
|
|
3379
|
-
for (const [key, entries] of Object.entries(plan.providerState ?? {})) {
|
|
3380
|
-
for (const [field, value] of Object.entries(entries)) {
|
|
3381
|
-
settings.setValue(`${key}.${field}`, value);
|
|
3382
|
-
}
|
|
3383
|
-
}
|
|
3384
|
-
currentStep = "persist";
|
|
3385
|
-
settings.persist();
|
|
3386
|
-
currentStep = "reloadModelProviders";
|
|
3387
|
-
reloadModelProviders?.(updatedModelProviders);
|
|
3388
|
-
if (effectiveModelSelection?.modelId) {
|
|
3389
|
-
currentStep = "syncAuthState";
|
|
3390
|
-
syncAuthState?.(
|
|
3391
|
-
plan.authType,
|
|
3392
|
-
effectiveModelSelection.modelId,
|
|
3393
|
-
effectiveModelSelection.baseUrl
|
|
3394
|
-
);
|
|
3395
|
-
}
|
|
3396
|
-
if (doRefreshAuth && refreshAuth) {
|
|
3397
|
-
currentStep = "refreshAuth";
|
|
3398
|
-
await refreshAuth(plan.authType);
|
|
3399
|
-
}
|
|
3400
|
-
currentStep = "cleanupBackup";
|
|
3401
|
-
settings.cleanupBackup?.();
|
|
3402
|
-
return { updatedModelProviders };
|
|
3403
|
-
} catch (error) {
|
|
3404
|
-
try {
|
|
3405
|
-
settings.restore?.();
|
|
3406
|
-
} catch (restoreErr) {
|
|
3407
|
-
console.error(
|
|
3408
|
-
"[applyProviderInstallPlan] settings.restore failed during rollback:",
|
|
3409
|
-
restoreErr
|
|
3410
|
-
);
|
|
3411
|
-
}
|
|
3412
|
-
try {
|
|
3413
|
-
for (const [key, prev] of previousEnvValues) {
|
|
3414
|
-
if (prev === void 0) {
|
|
3415
|
-
delete process.env[key];
|
|
3416
|
-
} else {
|
|
3417
|
-
process.env[key] = prev;
|
|
3418
|
-
}
|
|
3419
|
-
}
|
|
3420
|
-
} catch (envErr) {
|
|
3421
|
-
console.error("[applyProviderInstallPlan] env rollback failed:", envErr);
|
|
3422
|
-
}
|
|
3423
|
-
try {
|
|
3424
|
-
reloadModelProviders?.(previousRuntimeProviders);
|
|
3425
|
-
} catch (reloadErr) {
|
|
3426
|
-
console.error(
|
|
3427
|
-
"[applyProviderInstallPlan] reloadModelProviders failed during rollback:",
|
|
3428
|
-
reloadErr
|
|
3429
|
-
);
|
|
3430
|
-
}
|
|
3431
|
-
const errMsg = error instanceof Error ? error.message : String(error);
|
|
3432
|
-
throw new ProviderInstallError(errMsg, currentStep, plan.authType, {
|
|
3433
|
-
cause: error instanceof Error ? error : void 0
|
|
3434
|
-
});
|
|
3435
|
-
}
|
|
3436
|
-
}
|
|
3437
|
-
__name(applyProviderInstallPlan, "applyProviderInstallPlan");
|
|
3438
|
-
|
|
3439
3234
|
// packages/core/src/providers/index.ts
|
|
3440
3235
|
init_esbuild_shims();
|
|
3441
3236
|
|
|
@@ -4243,6 +4038,7 @@ __name(describe, "describe");
|
|
|
4243
4038
|
// packages/core/src/services/web-terminal-registry.ts
|
|
4244
4039
|
init_esbuild_shims();
|
|
4245
4040
|
import { spawnSync } from "node:child_process";
|
|
4041
|
+
import os from "node:os";
|
|
4246
4042
|
var MAX_BUFFER_CHUNKS = 4e3;
|
|
4247
4043
|
var MAX_BUFFER_BYTES = 4 * 1024 * 1024;
|
|
4248
4044
|
var MAX_UNACKNOWLEDGED_INPUT_BYTES = 256 * 1024;
|
|
@@ -4364,8 +4160,31 @@ var WebTerminalRegistry = class {
|
|
|
4364
4160
|
delete env2["NO_COLOR"];
|
|
4365
4161
|
delete env2["FORCE_COLOR"];
|
|
4366
4162
|
delete env2["npm_config_prefix"];
|
|
4163
|
+
const useBundledConpty = os.platform() === "win32";
|
|
4164
|
+
let queryTerminal;
|
|
4165
|
+
if (useBundledConpty) {
|
|
4166
|
+
const headlessModule = await loadXtermHeadless().catch(() => void 0);
|
|
4167
|
+
if (this.cancelledCreations.has(terminalId)) {
|
|
4168
|
+
this.finishCreating(terminalId);
|
|
4169
|
+
return { error: "Web terminal creation cancelled" };
|
|
4170
|
+
}
|
|
4171
|
+
if (this.disposed) {
|
|
4172
|
+
this.finishCreating(terminalId);
|
|
4173
|
+
return { error: "Web terminal registry disposed" };
|
|
4174
|
+
}
|
|
4175
|
+
if (headlessModule) {
|
|
4176
|
+
queryTerminal = new headlessModule.Terminal({
|
|
4177
|
+
allowProposedApi: true,
|
|
4178
|
+
cols: 80,
|
|
4179
|
+
rows: 24,
|
|
4180
|
+
scrollback: 0,
|
|
4181
|
+
logLevel: "off"
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
}
|
|
4367
4185
|
let spawned;
|
|
4368
4186
|
let proc;
|
|
4187
|
+
let queryReplyDisposable;
|
|
4369
4188
|
const sessionRef = {};
|
|
4370
4189
|
const earlyOutput = [];
|
|
4371
4190
|
let earlyExit;
|
|
@@ -4379,21 +4198,29 @@ var WebTerminalRegistry = class {
|
|
|
4379
4198
|
0,
|
|
4380
4199
|
session2.unacknowledgedInputBytes - Buffer.byteLength(data)
|
|
4381
4200
|
);
|
|
4382
|
-
if (
|
|
4383
|
-
|
|
4384
|
-
|
|
4201
|
+
if (queryTerminal) {
|
|
4202
|
+
try {
|
|
4203
|
+
queryTerminal.write(data);
|
|
4204
|
+
} catch {
|
|
4205
|
+
}
|
|
4206
|
+
}
|
|
4207
|
+
let buffered = data;
|
|
4208
|
+
if (Buffer.byteLength(buffered) > MAX_BUFFER_BYTES) {
|
|
4209
|
+
buffered = Buffer.from(buffered).subarray(-MAX_BUFFER_BYTES).toString("utf8");
|
|
4210
|
+
while (Buffer.byteLength(buffered) > MAX_BUFFER_BYTES)
|
|
4211
|
+
buffered = buffered.slice(1);
|
|
4385
4212
|
session2.buffer = [];
|
|
4386
4213
|
session2.bufferBytes = 0;
|
|
4387
4214
|
}
|
|
4388
|
-
session2.buffer.push(
|
|
4389
|
-
session2.bufferBytes += Buffer.byteLength(
|
|
4215
|
+
session2.buffer.push(buffered);
|
|
4216
|
+
session2.bufferBytes += Buffer.byteLength(buffered);
|
|
4390
4217
|
while (session2.buffer.length > MAX_BUFFER_CHUNKS || session2.bufferBytes > MAX_BUFFER_BYTES) {
|
|
4391
4218
|
const dropped = session2.buffer.shift();
|
|
4392
4219
|
if (dropped !== void 0) {
|
|
4393
4220
|
session2.bufferBytes -= Buffer.byteLength(dropped);
|
|
4394
4221
|
}
|
|
4395
4222
|
}
|
|
4396
|
-
for (const listener of session2.outputListeners) listener(
|
|
4223
|
+
for (const listener of session2.outputListeners) listener(buffered);
|
|
4397
4224
|
}, "handleData");
|
|
4398
4225
|
const handleExit = /* @__PURE__ */ __name((e) => {
|
|
4399
4226
|
const session2 = sessionRef.current;
|
|
@@ -4404,23 +4231,36 @@ var WebTerminalRegistry = class {
|
|
|
4404
4231
|
session2.exited = true;
|
|
4405
4232
|
session2.exitCode = e.exitCode;
|
|
4406
4233
|
for (const listener of [...session2.exitListeners]) listener(e);
|
|
4234
|
+
setImmediate(() => this.releasePtyResources(session2));
|
|
4407
4235
|
}, "handleExit");
|
|
4408
4236
|
let dataDisposable;
|
|
4409
4237
|
let exitDisposable;
|
|
4238
|
+
const spawnPty = /* @__PURE__ */ __name((useBundled) => ptyImpl.module.spawn(file, args, {
|
|
4239
|
+
name: "xterm-256color",
|
|
4240
|
+
cols: 80,
|
|
4241
|
+
rows: 24,
|
|
4242
|
+
cwd: options.workspaceCwd,
|
|
4243
|
+
env: {
|
|
4244
|
+
...env2,
|
|
4245
|
+
TERM: "xterm-256color",
|
|
4246
|
+
COLORTERM: "truecolor",
|
|
4247
|
+
CLICOLOR: "1",
|
|
4248
|
+
PROMPT_EOL_MARK: ""
|
|
4249
|
+
},
|
|
4250
|
+
// Windows: with the inbox ConPTY backend a natural shell exit orphans
|
|
4251
|
+
// the `conhost.exe --headless` it spawned (microsoft/node-pty#965);
|
|
4252
|
+
// the bundled backend releases its host reference right after spawn.
|
|
4253
|
+
// Mirrors the #11497 shell path. Off Windows the option is inert:
|
|
4254
|
+
// `useConptyDll` appears nowhere in the POSIX prebuilds.
|
|
4255
|
+
useConptyDll: useBundled
|
|
4256
|
+
}), "spawnPty");
|
|
4410
4257
|
try {
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
...env2,
|
|
4418
|
-
TERM: "xterm-256color",
|
|
4419
|
-
COLORTERM: "truecolor",
|
|
4420
|
-
CLICOLOR: "1",
|
|
4421
|
-
PROMPT_EOL_MARK: ""
|
|
4422
|
-
}
|
|
4423
|
-
});
|
|
4258
|
+
try {
|
|
4259
|
+
spawned = spawnPty(useBundledConpty);
|
|
4260
|
+
} catch (firstError) {
|
|
4261
|
+
if (!useBundledConpty) throw firstError;
|
|
4262
|
+
spawned = spawnPty(false);
|
|
4263
|
+
}
|
|
4424
4264
|
dataDisposable = spawned.onData(handleData);
|
|
4425
4265
|
exitDisposable = spawned.onExit(handleExit);
|
|
4426
4266
|
proc = {
|
|
@@ -4441,7 +4281,18 @@ var WebTerminalRegistry = class {
|
|
|
4441
4281
|
releaseConPtyHost(spawned);
|
|
4442
4282
|
}, "releaseHost")
|
|
4443
4283
|
};
|
|
4284
|
+
if (queryTerminal) {
|
|
4285
|
+
queryReplyDisposable = queryTerminal.onData((reply) => {
|
|
4286
|
+
if (reply !== "\x1B[?1;2c") return;
|
|
4287
|
+
try {
|
|
4288
|
+
proc.write(reply);
|
|
4289
|
+
} catch {
|
|
4290
|
+
}
|
|
4291
|
+
});
|
|
4292
|
+
}
|
|
4444
4293
|
} catch {
|
|
4294
|
+
queryReplyDisposable?.dispose();
|
|
4295
|
+
queryTerminal?.dispose();
|
|
4445
4296
|
this.finishCreating(terminalId);
|
|
4446
4297
|
return { error: "Failed to spawn shell" };
|
|
4447
4298
|
}
|
|
@@ -4455,7 +4306,10 @@ var WebTerminalRegistry = class {
|
|
|
4455
4306
|
outputListeners: /* @__PURE__ */ new Set(),
|
|
4456
4307
|
exitListeners: /* @__PURE__ */ new Set(),
|
|
4457
4308
|
dataDisposable,
|
|
4458
|
-
exitDisposable
|
|
4309
|
+
exitDisposable,
|
|
4310
|
+
queryTerminal,
|
|
4311
|
+
queryReplyDisposable,
|
|
4312
|
+
ptyResourcesReleased: false
|
|
4459
4313
|
};
|
|
4460
4314
|
sessionRef.current = session;
|
|
4461
4315
|
this.sessions.set(terminalId, session);
|
|
@@ -4491,6 +4345,7 @@ var WebTerminalRegistry = class {
|
|
|
4491
4345
|
output: session.buffer.join(""),
|
|
4492
4346
|
exited: session.exited,
|
|
4493
4347
|
workspaceCwd: session.workspaceCwd,
|
|
4348
|
+
...session.queryTerminal ? { handlesPrimaryDa: true } : {},
|
|
4494
4349
|
...session.exitCode !== void 0 ? { exitCode: session.exitCode } : {}
|
|
4495
4350
|
};
|
|
4496
4351
|
}
|
|
@@ -4545,16 +4400,12 @@ var WebTerminalRegistry = class {
|
|
|
4545
4400
|
listener({ exitCode: 143, signal: 15 });
|
|
4546
4401
|
}
|
|
4547
4402
|
}
|
|
4548
|
-
session.dataDisposable?.dispose();
|
|
4549
|
-
session.exitDisposable?.dispose();
|
|
4550
4403
|
session.outputListeners.clear();
|
|
4551
4404
|
session.exitListeners.clear();
|
|
4552
4405
|
if (!session.exited) {
|
|
4553
4406
|
killPtyTree(session.pty);
|
|
4554
|
-
session.pty.releaseHost?.();
|
|
4555
|
-
} else {
|
|
4556
|
-
session.pty.releaseHost?.();
|
|
4557
4407
|
}
|
|
4408
|
+
this.releasePtyResources(session);
|
|
4558
4409
|
return true;
|
|
4559
4410
|
}
|
|
4560
4411
|
releaseWorkspace(workspaceCwd) {
|
|
@@ -4573,6 +4424,37 @@ var WebTerminalRegistry = class {
|
|
|
4573
4424
|
this.creating.delete(terminalId);
|
|
4574
4425
|
this.cancelledCreations.delete(terminalId);
|
|
4575
4426
|
}
|
|
4427
|
+
/**
|
|
4428
|
+
* Free a session's PTY-side resources exactly once: detach the data/exit
|
|
4429
|
+
* listeners, dispose the bundled-backend query responder, then release the
|
|
4430
|
+
* ConPTY host / conout worker that node-pty strands on a natural exit.
|
|
4431
|
+
* Without the second half every terminal the user exits leaks a worker for
|
|
4432
|
+
* the life of the CLI — the same defect the shell-tool path has. On the
|
|
4433
|
+
* bundled ConPTY backend this registry spawns with, the host reference is
|
|
4434
|
+
* already released at spawn, so only the conout worker is left to free here;
|
|
4435
|
+
* the conhost.exe half survives solely on the inbox spawn-failure retry,
|
|
4436
|
+
* where the native baton is already gone. See releaseConPtyHost and #11303.
|
|
4437
|
+
*
|
|
4438
|
+
* Deliberately leaves the session's map entry and its `buffer` alone, and
|
|
4439
|
+
* never signals the pid: on the exited path the shell is gone and its pid may
|
|
4440
|
+
* be recycled, which is why #11313 added `releaseHost` instead of reusing
|
|
4441
|
+
* `kill()`. Keeping the entry is what lets `readSnapshot()` still replay the
|
|
4442
|
+
* scrollback after an exit-time release.
|
|
4443
|
+
*
|
|
4444
|
+
* Called from `handleExit` (deferred one turn, so an exited web terminal
|
|
4445
|
+
* stops holding the worker for the whole idle-reclaim window — #11353) and
|
|
4446
|
+
* from `release()` on both of its arms, where the flag keeps a release that
|
|
4447
|
+
* follows an exit-time release from disposing anything twice.
|
|
4448
|
+
*/
|
|
4449
|
+
releasePtyResources(session) {
|
|
4450
|
+
if (session.ptyResourcesReleased) return;
|
|
4451
|
+
session.ptyResourcesReleased = true;
|
|
4452
|
+
session.dataDisposable?.dispose();
|
|
4453
|
+
session.exitDisposable?.dispose();
|
|
4454
|
+
session.queryReplyDisposable?.dispose();
|
|
4455
|
+
session.queryTerminal?.dispose();
|
|
4456
|
+
session.pty.releaseHost?.();
|
|
4457
|
+
}
|
|
4576
4458
|
clearReclaim(session) {
|
|
4577
4459
|
if (session.reclaimTimer) {
|
|
4578
4460
|
clearTimeout(session.reclaimTimer);
|
|
@@ -5621,20 +5503,33 @@ var AUTHORITATIVE_OBJECTIVE_LINE = "The objective in that data block is the curr
|
|
|
5621
5503
|
var OBJECTIVE_UPDATED_LINE = "The Goal objective changed since your last turn: the objective above replaces the one you were working on. Stop work that only served the previous objective, and carry over only what also serves this one.";
|
|
5622
5504
|
function renderBudgetLine(usage) {
|
|
5623
5505
|
const used = usage.tokensUsed.toLocaleString("en-US");
|
|
5624
|
-
const
|
|
5625
|
-
0,
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5506
|
+
const segments = [
|
|
5507
|
+
usage.tokenBudget === void 0 ? `${used} tokens used, with no token budget on this Goal` : `${used} of ${usage.tokenBudget.toLocaleString("en-US")} tokens used, ${Math.max(
|
|
5508
|
+
0,
|
|
5509
|
+
usage.tokenBudget - usage.tokensUsed
|
|
5510
|
+
).toLocaleString("en-US")} remaining`,
|
|
5511
|
+
usage.turnBudget === void 0 ? `${usage.turnCount} Goal ${usage.turnCount === 1 ? "turn" : "turns"} finished` : `${usage.turnCount} of ${usage.turnBudget.toLocaleString("en-US")} Goal turns finished`
|
|
5512
|
+
];
|
|
5513
|
+
if (usage.activeTimeBudgetMs !== void 0 && usage.activeTimeMs !== void 0) {
|
|
5514
|
+
segments.push(
|
|
5515
|
+
`${renderActiveMinutes(usage.activeTimeMs)} of ${renderActiveMinutes(
|
|
5516
|
+
usage.activeTimeBudgetMs
|
|
5517
|
+
)} active minutes used`
|
|
5518
|
+
);
|
|
5519
|
+
}
|
|
5520
|
+
return `Budget: ${segments.join("; ")}.`;
|
|
5630
5521
|
}
|
|
5631
5522
|
__name(renderBudgetLine, "renderBudgetLine");
|
|
5523
|
+
function renderActiveMinutes(ms) {
|
|
5524
|
+
return (ms / 6e4).toLocaleString("en-US", { maximumFractionDigits: 1 });
|
|
5525
|
+
}
|
|
5526
|
+
__name(renderActiveMinutes, "renderActiveMinutes");
|
|
5632
5527
|
var EVIDENCE_LINE = "Treat the workspace and this turn's tool results as authoritative. Re-inspect state rather than relying on what earlier turns in this conversation reported.";
|
|
5633
5528
|
var FIDELITY_LINE = "Work toward the end state the objective asks for. Do not substitute a narrower or more easily reached result, and do not redefine success around what already exists.";
|
|
5634
5529
|
var NO_PROGRESS_LINE = "Judge your previous Goal turn before acting: it made progress only if it changed the workspace or produced evidence that changes what to do next. If it did not, take a different concrete action now instead of restating status; if the same blocker still stands, cite it through update_goal rather than repeating it.";
|
|
5635
5530
|
var COMPLETION_AUDIT_LINE = "Before proposing that the Goal is complete, check every explicit requirement in the objective against evidence you can cite. Missing, indirect, or self-reported evidence means not done: keep working.";
|
|
5636
5531
|
var WIND_DOWN_LINES = [
|
|
5637
|
-
"
|
|
5532
|
+
"An autonomous budget for this Goal window is spent -- the budget line above says which. This is the final turn before the Goal stops and waits for the user; do not start new work.",
|
|
5638
5533
|
"Deliver a concise hand-off: what was accomplished, citing evidence references from get_goal; what remains; and the one concrete next step. Call update_goal only if the objective is already complete or genuinely blocked on the evidence you have. Then end the turn."
|
|
5639
5534
|
];
|
|
5640
5535
|
function serializeGoalData(input) {
|
|
@@ -6300,7 +6195,7 @@ var Logger = class {
|
|
|
6300
6195
|
// packages/core/src/core/output-style-files.ts
|
|
6301
6196
|
init_esbuild_shims();
|
|
6302
6197
|
import * as fs4 from "fs/promises";
|
|
6303
|
-
import * as
|
|
6198
|
+
import * as os2 from "os";
|
|
6304
6199
|
import * as path6 from "path";
|
|
6305
6200
|
var debugLogger11 = createDebugLogger("OUTPUT_STYLE_FILES");
|
|
6306
6201
|
var OUTPUT_STYLES_DIR_NAME = "output-styles";
|
|
@@ -6544,7 +6439,7 @@ function getUserOutputStylesRoot() {
|
|
|
6544
6439
|
if (envDir) {
|
|
6545
6440
|
return Storage.getGlobalQwenDir();
|
|
6546
6441
|
}
|
|
6547
|
-
return
|
|
6442
|
+
return os2.homedir() || path6.dirname(Storage.getGlobalQwenDir());
|
|
6548
6443
|
}
|
|
6549
6444
|
__name(getUserOutputStylesRoot, "getUserOutputStylesRoot");
|
|
6550
6445
|
function getProjectOutputStylesDir(projectRoot) {
|
|
@@ -9097,8 +8992,8 @@ ${trimmed}
|
|
|
9097
8992
|
}
|
|
9098
8993
|
const sectionIdx = existing.indexOf(MEMORY_SECTION_HEADER);
|
|
9099
8994
|
if (sectionIdx === -1) {
|
|
9100
|
-
const
|
|
9101
|
-
return `${existing}${
|
|
8995
|
+
const sep6 = existing.endsWith("\n") ? "" : "\n";
|
|
8996
|
+
return `${existing}${sep6}
|
|
9102
8997
|
${MEMORY_SECTION_HEADER}
|
|
9103
8998
|
${trimmed}
|
|
9104
8999
|
`;
|
|
@@ -9106,15 +9001,15 @@ ${trimmed}
|
|
|
9106
9001
|
const afterHeaderIdx = sectionIdx + MEMORY_SECTION_HEADER.length;
|
|
9107
9002
|
const nextHeaderRel = findNextTopLevelHeading(existing, afterHeaderIdx);
|
|
9108
9003
|
if (nextHeaderRel === -1) {
|
|
9109
|
-
const
|
|
9110
|
-
return `${existing}${
|
|
9004
|
+
const sep6 = existing.endsWith("\n") ? "" : "\n";
|
|
9005
|
+
return `${existing}${sep6}${trimmed}
|
|
9111
9006
|
`;
|
|
9112
9007
|
}
|
|
9113
9008
|
const insertAt = afterHeaderIdx + nextHeaderRel;
|
|
9114
9009
|
const before = existing.slice(0, insertAt);
|
|
9115
9010
|
const after = existing.slice(insertAt);
|
|
9116
|
-
const
|
|
9117
|
-
return `${before}${
|
|
9011
|
+
const sep5 = before.endsWith("\n") ? "" : "\n";
|
|
9012
|
+
return `${before}${sep5}${trimmed}
|
|
9118
9013
|
${after}`;
|
|
9119
9014
|
}
|
|
9120
9015
|
__name(composeAppendedContent, "composeAppendedContent");
|
|
@@ -9164,7 +9059,7 @@ import * as child_process from "node:child_process";
|
|
|
9164
9059
|
import * as process2 from "node:process";
|
|
9165
9060
|
import * as path10 from "node:path";
|
|
9166
9061
|
import * as fs8 from "node:fs";
|
|
9167
|
-
import * as
|
|
9062
|
+
import * as os3 from "node:os";
|
|
9168
9063
|
function getVsCodeCommand(platform2 = process2.platform) {
|
|
9169
9064
|
return platform2 === "win32" ? "code.cmd" : "code";
|
|
9170
9065
|
}
|
|
@@ -9187,7 +9082,7 @@ async function findVsCodeCommand(platform2 = process2.platform) {
|
|
|
9187
9082
|
} catch {
|
|
9188
9083
|
}
|
|
9189
9084
|
const locations = [];
|
|
9190
|
-
const homeDir =
|
|
9085
|
+
const homeDir = os3.homedir();
|
|
9191
9086
|
if (platform2 === "darwin") {
|
|
9192
9087
|
locations.push(
|
|
9193
9088
|
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code",
|
|
@@ -9345,6 +9240,9 @@ var CODE_ACTION_KIND_LABELS = {
|
|
|
9345
9240
|
// packages/core/src/lsp/configHash.ts
|
|
9346
9241
|
init_esbuild_shims();
|
|
9347
9242
|
import { createHash as createHash4 } from "node:crypto";
|
|
9243
|
+
|
|
9244
|
+
// packages/core/src/lsp/sort-json-value.ts
|
|
9245
|
+
init_esbuild_shims();
|
|
9348
9246
|
function sortJsonValue(value) {
|
|
9349
9247
|
if (Array.isArray(value)) {
|
|
9350
9248
|
return value.map(sortJsonValue);
|
|
@@ -9359,6 +9257,8 @@ function sortJsonValue(value) {
|
|
|
9359
9257
|
return value;
|
|
9360
9258
|
}
|
|
9361
9259
|
__name(sortJsonValue, "sortJsonValue");
|
|
9260
|
+
|
|
9261
|
+
// packages/core/src/lsp/configHash.ts
|
|
9362
9262
|
function lspServerConfigHash(config) {
|
|
9363
9263
|
const hashInput = {
|
|
9364
9264
|
name: config.name,
|
|
@@ -10792,12 +10692,22 @@ ${value}
|
|
|
10792
10692
|
}
|
|
10793
10693
|
};
|
|
10794
10694
|
|
|
10795
|
-
// packages/core/src/lsp/
|
|
10695
|
+
// packages/core/src/lsp/lsp-server-manager.ts
|
|
10796
10696
|
init_esbuild_shims();
|
|
10797
10697
|
import { spawn as spawn2 } from "node:child_process";
|
|
10798
|
-
import * as fs10 from "node:fs";
|
|
10799
10698
|
import * as path12 from "path";
|
|
10800
10699
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
10700
|
+
|
|
10701
|
+
// packages/core/src/lsp/types.ts
|
|
10702
|
+
init_esbuild_shims();
|
|
10703
|
+
function resolveTextDocumentSync(sync) {
|
|
10704
|
+
const change = typeof sync === "number" ? sync : sync?.change ?? 0;
|
|
10705
|
+
const openClose = typeof sync === "number" ? sync !== 0 : sync?.openClose ?? false;
|
|
10706
|
+
return { change, openClose };
|
|
10707
|
+
}
|
|
10708
|
+
__name(resolveTextDocumentSync, "resolveTextDocumentSync");
|
|
10709
|
+
|
|
10710
|
+
// packages/core/src/lsp/lsp-server-manager.ts
|
|
10801
10711
|
var debugLogger20 = createDebugLogger("LSP");
|
|
10802
10712
|
var SECURITY_SENSITIVE_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
10803
10713
|
"DYLD_INSERT_LIBRARIES",
|
|
@@ -10934,7 +10844,9 @@ var LspServerManager = class {
|
|
|
10934
10844
|
continue;
|
|
10935
10845
|
}
|
|
10936
10846
|
const nextHash = desiredHashes.get(name);
|
|
10937
|
-
if (this.serverConfigHashes.get(name)
|
|
10847
|
+
if (this.serverConfigHashes.get(name) === nextHash) {
|
|
10848
|
+
result.unchanged.push(name);
|
|
10849
|
+
} else {
|
|
10938
10850
|
await this.abortAndWaitForStartup(handle);
|
|
10939
10851
|
await this.stopServer(name, handle);
|
|
10940
10852
|
const nextHandle = {
|
|
@@ -10952,8 +10864,6 @@ var LspServerManager = class {
|
|
|
10952
10864
|
}
|
|
10953
10865
|
result.restarted.push(name);
|
|
10954
10866
|
}
|
|
10955
|
-
} else {
|
|
10956
|
-
result.unchanged.push(name);
|
|
10957
10867
|
}
|
|
10958
10868
|
}
|
|
10959
10869
|
for (const [name, config] of desiredConfigs) {
|
|
@@ -10992,47 +10902,46 @@ var LspServerManager = class {
|
|
|
10992
10902
|
}
|
|
10993
10903
|
/**
|
|
10994
10904
|
* Ensure tsserver has at least one file open so navto/navtree requests succeed.
|
|
10995
|
-
*
|
|
10905
|
+
* Latches unsupported attempts to avoid repeated discovery; delivery failures retry.
|
|
10996
10906
|
*
|
|
10997
10907
|
* @param handle - The LSP server handle
|
|
10998
10908
|
* @param force - Force re-warmup even if already warmed up
|
|
10999
|
-
* @
|
|
10909
|
+
* @param synchronizeDocument - Service-owned synchronization of the warmup file
|
|
11000
10910
|
*/
|
|
11001
|
-
async warmupTypescriptServer(handle, force = false) {
|
|
10911
|
+
async warmupTypescriptServer(handle, synchronizeDocument, force = false) {
|
|
11002
10912
|
if (!handle.connection || !this.isTypescriptServer(handle)) {
|
|
11003
|
-
return
|
|
10913
|
+
return;
|
|
11004
10914
|
}
|
|
11005
10915
|
if (handle.warmedUp && !force) {
|
|
11006
|
-
return
|
|
10916
|
+
return;
|
|
11007
10917
|
}
|
|
10918
|
+
const connection = handle.connection;
|
|
11008
10919
|
const tsFile = this.findFirstTypescriptFile();
|
|
11009
10920
|
if (!tsFile) {
|
|
11010
|
-
return
|
|
10921
|
+
return;
|
|
11011
10922
|
}
|
|
10923
|
+
if (force) handle.warmedUp = false;
|
|
11012
10924
|
const uri = pathToFileURL2(tsFile).toString();
|
|
11013
10925
|
const languageId = tsFile.endsWith(".tsx") ? "typescriptreact" : tsFile.endsWith(".jsx") ? "javascriptreact" : tsFile.endsWith(".js") ? "javascript" : "typescript";
|
|
11014
10926
|
try {
|
|
11015
|
-
const
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
}
|
|
11027
|
-
});
|
|
10927
|
+
const sent = synchronizeDocument(uri, languageId);
|
|
10928
|
+
const { change, openClose } = resolveTextDocumentSync(
|
|
10929
|
+
handle.textDocumentSync
|
|
10930
|
+
);
|
|
10931
|
+
if (!sent && (!openClose || force && change !== 1 && change !== 2)) {
|
|
10932
|
+
debugLogger20.warn(
|
|
10933
|
+
`TypeScript server ${handle.config.name} warm-up delivered no notification (textDocumentSync=${JSON.stringify(handle.textDocumentSync)})`
|
|
10934
|
+
);
|
|
10935
|
+
handle.warmedUp = true;
|
|
10936
|
+
return;
|
|
10937
|
+
}
|
|
11028
10938
|
await new Promise(
|
|
11029
10939
|
(resolve7) => setTimeout(resolve7, DEFAULT_LSP_WARMUP_DELAY_MS)
|
|
11030
10940
|
);
|
|
11031
|
-
handle.warmedUp = true;
|
|
11032
|
-
return uri;
|
|
10941
|
+
if (handle.connection === connection) handle.warmedUp = true;
|
|
11033
10942
|
} catch (error) {
|
|
11034
10943
|
debugLogger20.warn("TypeScript server warm-up failed:", error);
|
|
11035
|
-
return
|
|
10944
|
+
return;
|
|
11036
10945
|
}
|
|
11037
10946
|
}
|
|
11038
10947
|
/**
|
|
@@ -11127,6 +11036,7 @@ var LspServerManager = class {
|
|
|
11127
11036
|
handle.error = void 0;
|
|
11128
11037
|
handle.processDiagnostics = void 0;
|
|
11129
11038
|
handle.warmedUp = false;
|
|
11039
|
+
handle.textDocumentSync = void 0;
|
|
11130
11040
|
handle.status = "IN_PROGRESS";
|
|
11131
11041
|
debugLogger20.info(
|
|
11132
11042
|
`Starting LSP server ${name}: command=${handle.config.command ?? "<none>"}, transport=${handle.config.transport}, languages=${formatServerNames(
|
|
@@ -11142,7 +11052,7 @@ var LspServerManager = class {
|
|
|
11142
11052
|
handle.processDiagnostics = connection.processDiagnostics;
|
|
11143
11053
|
const startupExit = this.createStartupExitWatcher(name, handle);
|
|
11144
11054
|
try {
|
|
11145
|
-
await this.raceStartupAbort(
|
|
11055
|
+
handle.textDocumentSync = await this.raceStartupAbort(
|
|
11146
11056
|
this.initializeLspServer(connection, handle.config),
|
|
11147
11057
|
startupAbortController.signal,
|
|
11148
11058
|
void 0,
|
|
@@ -11722,7 +11632,7 @@ var LspServerManager = class {
|
|
|
11722
11632
|
},
|
|
11723
11633
|
initializationOptions: config.initializationOptions
|
|
11724
11634
|
};
|
|
11725
|
-
await connection.initialize(initializeParams);
|
|
11635
|
+
const result = await connection.initialize(initializeParams);
|
|
11726
11636
|
connection.connection.send({
|
|
11727
11637
|
jsonrpc: "2.0",
|
|
11728
11638
|
method: "initialized",
|
|
@@ -11747,6 +11657,7 @@ var LspServerManager = class {
|
|
|
11747
11657
|
}
|
|
11748
11658
|
});
|
|
11749
11659
|
}
|
|
11660
|
+
return result?.capabilities?.textDocumentSync;
|
|
11750
11661
|
}
|
|
11751
11662
|
/**
|
|
11752
11663
|
* Check if command exists by spawning it with --version.
|
|
@@ -12071,11 +11982,12 @@ var NativeLspClient = class {
|
|
|
12071
11982
|
}
|
|
12072
11983
|
};
|
|
12073
11984
|
|
|
12074
|
-
// packages/core/src/lsp/
|
|
11985
|
+
// packages/core/src/lsp/native-lsp-service.ts
|
|
12075
11986
|
init_esbuild_shims();
|
|
12076
11987
|
import * as path13 from "path";
|
|
12077
11988
|
import { fileURLToPath, pathToFileURL as pathToFileURL3 } from "url";
|
|
12078
|
-
import * as
|
|
11989
|
+
import * as fs10 from "node:fs";
|
|
11990
|
+
import { createHash as createHash5, createHmac, randomBytes as randomBytes4 } from "node:crypto";
|
|
12079
11991
|
import { promises as fsp } from "node:fs";
|
|
12080
11992
|
var debugLogger21 = createDebugLogger("LSP");
|
|
12081
11993
|
var LANGUAGE_ID_TO_EXTENSIONS = {
|
|
@@ -12093,6 +12005,16 @@ var DEFAULT_EXCLUDE_PATTERNS = [
|
|
|
12093
12005
|
"**/dist/**",
|
|
12094
12006
|
"**/build/**"
|
|
12095
12007
|
];
|
|
12008
|
+
var StaleCallHierarchyItemError = class extends Error {
|
|
12009
|
+
static {
|
|
12010
|
+
__name(this, "StaleCallHierarchyItemError");
|
|
12011
|
+
}
|
|
12012
|
+
constructor(uri) {
|
|
12013
|
+
super(
|
|
12014
|
+
uri ? `Call hierarchy item is stale or has unknown provenance; prepare call hierarchy again at a current location inside ${uri}.` : "Call hierarchy item is stale or has unknown provenance; prepare call hierarchy again."
|
|
12015
|
+
);
|
|
12016
|
+
}
|
|
12017
|
+
};
|
|
12096
12018
|
var NativeLspService = class {
|
|
12097
12019
|
static {
|
|
12098
12020
|
__name(this, "NativeLspService");
|
|
@@ -12106,7 +12028,15 @@ var NativeLspService = class {
|
|
|
12106
12028
|
serverManager;
|
|
12107
12029
|
normalizer;
|
|
12108
12030
|
openedDocuments = /* @__PURE__ */ new Map();
|
|
12031
|
+
documentLifecycles = /* @__PURE__ */ new Map();
|
|
12032
|
+
workspaceSymbolFiles = /* @__PURE__ */ new WeakMap();
|
|
12033
|
+
snapshotDigests = /* @__PURE__ */ new WeakMap();
|
|
12034
|
+
callHierarchySecrets = /* @__PURE__ */ new WeakMap();
|
|
12109
12035
|
lastConnections = /* @__PURE__ */ new Map();
|
|
12036
|
+
// URIs to re-deliver after a connection swap or synchronization failure.
|
|
12037
|
+
// openedDocuments selects didOpen/didChange and is wiped on connection changes; this
|
|
12038
|
+
// set survives that wipe so a later workspaceDiagnostics can still replay them.
|
|
12039
|
+
replayUris = /* @__PURE__ */ new Map();
|
|
12110
12040
|
reinitializeQueue = Promise.resolve();
|
|
12111
12041
|
reinitializeAbortController;
|
|
12112
12042
|
stopping = false;
|
|
@@ -12282,15 +12212,39 @@ var NativeLspService = class {
|
|
|
12282
12212
|
clearDocumentTrackingForServers(serverNames) {
|
|
12283
12213
|
for (const name of serverNames) {
|
|
12284
12214
|
this.openedDocuments.delete(name);
|
|
12215
|
+
this.documentLifecycles.delete(name);
|
|
12285
12216
|
this.lastConnections.delete(name);
|
|
12217
|
+
this.replayUris.delete(name);
|
|
12286
12218
|
}
|
|
12287
12219
|
}
|
|
12220
|
+
/** The tracked set for one server: delivered documents and durable replay obligations. */
|
|
12221
|
+
trackedUrisFor(serverName) {
|
|
12222
|
+
return /* @__PURE__ */ new Set([
|
|
12223
|
+
...this.openedDocuments.get(serverName)?.keys() ?? [],
|
|
12224
|
+
...this.replayUris.get(serverName) ?? []
|
|
12225
|
+
]);
|
|
12226
|
+
}
|
|
12227
|
+
/**
|
|
12228
|
+
* Drop the delivered snapshot without dropping the obligation to re-deliver it: a
|
|
12229
|
+
* connection change wipes openedDocuments, but a later sweep must still know what the
|
|
12230
|
+
* new connection never received. Callers keep lastConnections bookkeeping themselves.
|
|
12231
|
+
*/
|
|
12232
|
+
parkTrackedUris(serverName) {
|
|
12233
|
+
const prior = this.openedDocuments.get(serverName);
|
|
12234
|
+
if (prior && prior.size > 0) {
|
|
12235
|
+
const durable = this.replayUris.get(serverName) ?? /* @__PURE__ */ new Set();
|
|
12236
|
+
for (const tracked of prior.keys()) durable.add(tracked);
|
|
12237
|
+
this.replayUris.set(serverName, durable);
|
|
12238
|
+
}
|
|
12239
|
+
this.openedDocuments.delete(serverName);
|
|
12240
|
+
this.documentLifecycles.delete(serverName);
|
|
12241
|
+
}
|
|
12288
12242
|
snapshotOpenDocuments(serverNames) {
|
|
12289
12243
|
const snapshots = /* @__PURE__ */ new Map();
|
|
12290
12244
|
for (const name of serverNames) {
|
|
12291
|
-
const
|
|
12292
|
-
if (
|
|
12293
|
-
snapshots.set(name,
|
|
12245
|
+
const uris = this.trackedUrisFor(name);
|
|
12246
|
+
if (uris.size > 0) {
|
|
12247
|
+
snapshots.set(name, uris);
|
|
12294
12248
|
}
|
|
12295
12249
|
}
|
|
12296
12250
|
return snapshots;
|
|
@@ -12312,7 +12266,7 @@ var NativeLspService = class {
|
|
|
12312
12266
|
for (const uri of documents) {
|
|
12313
12267
|
this.throwIfReinitializeAborted(signal);
|
|
12314
12268
|
try {
|
|
12315
|
-
openedAny = this.
|
|
12269
|
+
openedAny = this.synchronizeDocument(name, handle, uri).sent || openedAny;
|
|
12316
12270
|
} catch (error) {
|
|
12317
12271
|
debugLogger21.warn(
|
|
12318
12272
|
`Failed to replay document ${uri} for LSP server ${name}:`,
|
|
@@ -12343,7 +12297,9 @@ var NativeLspService = class {
|
|
|
12343
12297
|
this.reinitializeAbortController?.abort();
|
|
12344
12298
|
await this.serverManager.stopAll();
|
|
12345
12299
|
this.openedDocuments.clear();
|
|
12300
|
+
this.documentLifecycles.clear();
|
|
12346
12301
|
this.lastConnections.clear();
|
|
12302
|
+
this.replayUris.clear();
|
|
12347
12303
|
}
|
|
12348
12304
|
/**
|
|
12349
12305
|
* Get LSP server status
|
|
@@ -12374,11 +12330,11 @@ var NativeLspService = class {
|
|
|
12374
12330
|
...handle.config.rootUri ? { rootUri: handle.config.rootUri } : {},
|
|
12375
12331
|
...handle.config.workspaceFolder ? { workspaceFolder: handle.config.workspaceFolder } : {},
|
|
12376
12332
|
...handle.process?.pid ? { pid: handle.process.pid } : {},
|
|
12377
|
-
...handle.warmedUp
|
|
12378
|
-
...handle.restartAttempts
|
|
12333
|
+
...handle.warmedUp === void 0 ? {} : { warmedUp: handle.warmedUp },
|
|
12334
|
+
...handle.restartAttempts === void 0 ? {} : { restartAttempts: handle.restartAttempts },
|
|
12379
12335
|
...handle.processDiagnostics?.stderrTail ? { stderrTail: handle.processDiagnostics.stderrTail } : {},
|
|
12380
|
-
...handle.processDiagnostics?.exitCode
|
|
12381
|
-
...handle.processDiagnostics?.exitSignal
|
|
12336
|
+
...handle.processDiagnostics?.exitCode === void 0 ? {} : { exitCode: handle.processDiagnostics.exitCode },
|
|
12337
|
+
...handle.processDiagnostics?.exitSignal === void 0 ? {} : { exitSignal: handle.processDiagnostics.exitSignal },
|
|
12382
12338
|
...error ? { error } : {}
|
|
12383
12339
|
};
|
|
12384
12340
|
}
|
|
@@ -12409,83 +12365,154 @@ var NativeLspService = class {
|
|
|
12409
12365
|
(entry) => entry[1].status === "READY" && entry[1].connection !== void 0 && (!serverName || entry[0] === serverName)
|
|
12410
12366
|
);
|
|
12411
12367
|
}
|
|
12412
|
-
/**
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
* @returns true if a new didOpen was sent; false if already open or failed
|
|
12422
|
-
*/
|
|
12423
|
-
async ensureDocumentOpen(serverName, handle, uri) {
|
|
12424
|
-
const lastConnection = this.lastConnections.get(serverName);
|
|
12425
|
-
if (lastConnection && lastConnection !== handle.connection) {
|
|
12426
|
-
this.openedDocuments.delete(serverName);
|
|
12427
|
-
}
|
|
12428
|
-
if (!this.sendDocumentOpen(serverName, handle, uri)) {
|
|
12429
|
-
return false;
|
|
12368
|
+
/** Synchronize disk text before a query; only a new didOpen needs warmup delay. */
|
|
12369
|
+
async ensureDocumentSynchronized(serverName, handle, uri) {
|
|
12370
|
+
const { opened: justOpened } = this.synchronizeDocument(
|
|
12371
|
+
serverName,
|
|
12372
|
+
handle,
|
|
12373
|
+
uri
|
|
12374
|
+
);
|
|
12375
|
+
if (justOpened) {
|
|
12376
|
+
await this.delay(DEFAULT_LSP_DOCUMENT_OPEN_DELAY_MS);
|
|
12430
12377
|
}
|
|
12431
|
-
|
|
12432
|
-
return true;
|
|
12378
|
+
return justOpened;
|
|
12433
12379
|
}
|
|
12434
|
-
|
|
12380
|
+
synchronizeDocument(serverName, handle, uri, languageId, force = false) {
|
|
12435
12381
|
if (!uri.startsWith("file://")) {
|
|
12436
|
-
return false;
|
|
12382
|
+
return { sent: false, opened: false };
|
|
12437
12383
|
}
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12384
|
+
if (!handle.connection || this.serverManager.getHandles().get(serverName) !== handle) {
|
|
12385
|
+
throw new Error(
|
|
12386
|
+
`LSP server ${serverName} connection is no longer active`
|
|
12387
|
+
);
|
|
12388
|
+
}
|
|
12389
|
+
if (this.lastConnections.get(serverName) !== handle.connection) {
|
|
12390
|
+
this.parkTrackedUris(serverName);
|
|
12391
|
+
this.lastConnections.set(serverName, handle.connection);
|
|
12392
|
+
}
|
|
12393
|
+
const documents = this.openedDocuments.get(serverName) ?? /* @__PURE__ */ new Map();
|
|
12394
|
+
const lifecycles = this.documentLifecycles.get(serverName) ?? /* @__PURE__ */ new Map();
|
|
12395
|
+
this.documentLifecycles.set(serverName, lifecycles);
|
|
12396
|
+
const lifecycle = lifecycles.get(uri);
|
|
12397
|
+
if (lifecycle?.pendingClose) {
|
|
12398
|
+
try {
|
|
12399
|
+
this.closeUnsynchronizableDocument(serverName, handle, uri);
|
|
12400
|
+
} catch (error) {
|
|
12401
|
+
throw new Error(
|
|
12402
|
+
`LSP server ${serverName} still cannot close ${uri}; refusing to reopen it (${error.message})`,
|
|
12403
|
+
{ cause: error }
|
|
12404
|
+
);
|
|
12405
|
+
}
|
|
12406
|
+
}
|
|
12407
|
+
const previous = documents.get(uri);
|
|
12408
|
+
const { change, openClose } = resolveTextDocumentSync(
|
|
12409
|
+
handle.textDocumentSync
|
|
12410
|
+
);
|
|
12411
|
+
if (!previous && !openClose) {
|
|
12412
|
+
return { sent: false, opened: false };
|
|
12441
12413
|
}
|
|
12442
12414
|
let filePath;
|
|
12415
|
+
let text;
|
|
12443
12416
|
try {
|
|
12444
12417
|
filePath = fileURLToPath(uri);
|
|
12418
|
+
text = fs10.readFileSync(filePath, "utf-8");
|
|
12445
12419
|
} catch (error) {
|
|
12446
|
-
|
|
12447
|
-
|
|
12420
|
+
const replay = this.replayUris.get(serverName) ?? /* @__PURE__ */ new Set();
|
|
12421
|
+
if (previous || replay.has(uri)) {
|
|
12422
|
+
const readFailures = (lifecycle?.readFailures ?? 0) + 1;
|
|
12423
|
+
lifecycles.set(uri, {
|
|
12424
|
+
version: previous?.version ?? lifecycle?.version ?? 0,
|
|
12425
|
+
readFailures,
|
|
12426
|
+
...previous ? { pendingClose: { error } } : {}
|
|
12427
|
+
});
|
|
12428
|
+
if (readFailures < 2) replay.add(uri);
|
|
12429
|
+
else replay.delete(uri);
|
|
12430
|
+
this.replayUris.set(serverName, replay);
|
|
12431
|
+
if (previous) {
|
|
12432
|
+
documents.delete(uri);
|
|
12433
|
+
this.closeUnsynchronizableDocument(serverName, handle, uri);
|
|
12434
|
+
}
|
|
12435
|
+
}
|
|
12436
|
+
throw error;
|
|
12448
12437
|
}
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
} catch (error) {
|
|
12453
|
-
debugLogger21.warn(
|
|
12454
|
-
`Failed to read file for LSP didOpen: ${filePath}`,
|
|
12455
|
-
error
|
|
12456
|
-
);
|
|
12457
|
-
return false;
|
|
12438
|
+
if (lifecycle) delete lifecycle.readFailures;
|
|
12439
|
+
if (previous?.text === text && !force) {
|
|
12440
|
+
return { sent: false, opened: false };
|
|
12458
12441
|
}
|
|
12459
|
-
const
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12442
|
+
const version = (previous?.version ?? lifecycle?.version ?? 0) + 1;
|
|
12443
|
+
if (!previous && openClose) {
|
|
12444
|
+
handle.connection.send({
|
|
12445
|
+
jsonrpc: "2.0",
|
|
12446
|
+
method: "textDocument/didOpen",
|
|
12447
|
+
params: {
|
|
12448
|
+
textDocument: {
|
|
12449
|
+
uri,
|
|
12450
|
+
languageId: languageId ?? this.resolveLanguageId(filePath, handle) ?? "plaintext",
|
|
12451
|
+
version,
|
|
12452
|
+
text
|
|
12453
|
+
}
|
|
12469
12454
|
}
|
|
12455
|
+
});
|
|
12456
|
+
} else if (previous) {
|
|
12457
|
+
if (change !== 1 && change !== 2) {
|
|
12458
|
+
if (previous.text === text) return { sent: false, opened: false };
|
|
12459
|
+
const error = new Error(
|
|
12460
|
+
`LSP server ${serverName} cannot synchronize changed document ${uri}: textDocumentSync.change is None or absent`
|
|
12461
|
+
);
|
|
12462
|
+
lifecycles.set(uri, {
|
|
12463
|
+
version: previous.version,
|
|
12464
|
+
pendingClose: { error }
|
|
12465
|
+
});
|
|
12466
|
+
documents.delete(uri);
|
|
12467
|
+
const replay = this.replayUris.get(serverName) ?? /* @__PURE__ */ new Set();
|
|
12468
|
+
replay.add(uri);
|
|
12469
|
+
this.replayUris.set(serverName, replay);
|
|
12470
|
+
this.closeUnsynchronizableDocument(serverName, handle, uri);
|
|
12471
|
+
throw error;
|
|
12470
12472
|
}
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12473
|
+
const contentChange = { text };
|
|
12474
|
+
if (change === 2) {
|
|
12475
|
+
const lines = previous.text.split(/\r\n|\r|\n/);
|
|
12476
|
+
contentChange.range = {
|
|
12477
|
+
start: { line: 0, character: 0 },
|
|
12478
|
+
end: {
|
|
12479
|
+
line: lines.length - 1,
|
|
12480
|
+
character: lines[lines.length - 1].length
|
|
12481
|
+
}
|
|
12482
|
+
};
|
|
12483
|
+
}
|
|
12484
|
+
handle.connection.send({
|
|
12485
|
+
jsonrpc: "2.0",
|
|
12486
|
+
method: "textDocument/didChange",
|
|
12487
|
+
params: {
|
|
12488
|
+
textDocument: { uri, version },
|
|
12489
|
+
contentChanges: [contentChange]
|
|
12490
|
+
}
|
|
12491
|
+
});
|
|
12492
|
+
}
|
|
12493
|
+
documents.set(uri, { text, version });
|
|
12494
|
+
lifecycles.set(uri, { version });
|
|
12495
|
+
this.openedDocuments.set(serverName, documents);
|
|
12496
|
+
return { sent: true, opened: !previous && openClose };
|
|
12477
12497
|
}
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12481
|
-
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12498
|
+
closeUnsynchronizableDocument(serverName, handle, uri) {
|
|
12499
|
+
const lifecycle = this.documentLifecycles.get(serverName)?.get(uri);
|
|
12500
|
+
if (!lifecycle?.pendingClose) return;
|
|
12501
|
+
const originalError = lifecycle.pendingClose.error;
|
|
12502
|
+
const connection = this.lastConnections.get(serverName);
|
|
12503
|
+
if (connection !== handle.connection || this.serverManager.getHandles().get(serverName) !== handle) {
|
|
12504
|
+
throw originalError;
|
|
12505
|
+
}
|
|
12506
|
+
try {
|
|
12507
|
+
connection.send({
|
|
12508
|
+
jsonrpc: "2.0",
|
|
12509
|
+
method: "textDocument/didClose",
|
|
12510
|
+
params: { textDocument: { uri } }
|
|
12511
|
+
});
|
|
12512
|
+
} catch {
|
|
12513
|
+
throw originalError;
|
|
12514
|
+
}
|
|
12515
|
+
delete lifecycle.pendingClose;
|
|
12489
12516
|
}
|
|
12490
12517
|
resolveLanguageId(filePath, handle) {
|
|
12491
12518
|
const ext = path13.extname(filePath).slice(1).toLowerCase();
|
|
@@ -12503,24 +12530,51 @@ var NativeLspService = class {
|
|
|
12503
12530
|
return false;
|
|
12504
12531
|
}
|
|
12505
12532
|
const openedForServer = this.openedDocuments.get(serverName);
|
|
12506
|
-
if (openedForServer && openedForServer.size > 0) {
|
|
12533
|
+
if (this.lastConnections.get(serverName) === handle.connection && openedForServer && openedForServer.size > 0) {
|
|
12507
12534
|
return true;
|
|
12508
12535
|
}
|
|
12509
|
-
const
|
|
12510
|
-
|
|
12511
|
-
|
|
12536
|
+
const connection = handle.connection;
|
|
12537
|
+
let filePath = this.workspaceSymbolFiles.get(connection);
|
|
12538
|
+
if (filePath && !this.isUsableWorkspaceSymbolFile(filePath)) {
|
|
12539
|
+
this.workspaceSymbolFiles.delete(connection);
|
|
12540
|
+
filePath = void 0;
|
|
12512
12541
|
}
|
|
12542
|
+
filePath ??= this.findWorkspaceFileForServer(handle);
|
|
12543
|
+
if (!filePath) return false;
|
|
12513
12544
|
const uri = pathToFileURL3(filePath).toString();
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12545
|
+
try {
|
|
12546
|
+
if (!this.isUsableWorkspaceSymbolFile(filePath)) {
|
|
12547
|
+
throw new Error(
|
|
12548
|
+
"Workspace symbol warmup candidate is no longer usable."
|
|
12549
|
+
);
|
|
12550
|
+
}
|
|
12551
|
+
await this.ensureDocumentSynchronized(
|
|
12552
|
+
serverName,
|
|
12553
|
+
handle,
|
|
12554
|
+
uri
|
|
12555
|
+
);
|
|
12556
|
+
} catch (error) {
|
|
12557
|
+
debugLogger21.warn(
|
|
12558
|
+
`LSP workspace symbol warmup skipped for ${uri}:`,
|
|
12559
|
+
error
|
|
12560
|
+
);
|
|
12561
|
+
this.workspaceSymbolFiles.delete(connection);
|
|
12520
12562
|
return false;
|
|
12521
12563
|
}
|
|
12564
|
+
this.workspaceSymbolFiles.set(connection, filePath);
|
|
12522
12565
|
await this.delay(DEFAULT_LSP_WORKSPACE_SYMBOL_WARMUP_DELAY_MS);
|
|
12523
|
-
return
|
|
12566
|
+
return handle.connection === connection;
|
|
12567
|
+
}
|
|
12568
|
+
isUsableWorkspaceSymbolFile(filePath) {
|
|
12569
|
+
try {
|
|
12570
|
+
if (!fs10.statSync(filePath).isFile()) return false;
|
|
12571
|
+
fs10.accessSync(filePath, fs10.constants.R_OK);
|
|
12572
|
+
} catch {
|
|
12573
|
+
return false;
|
|
12574
|
+
}
|
|
12575
|
+
return this.workspaceContext.getDirectories().some(
|
|
12576
|
+
(root) => filePath.startsWith(root.endsWith(path13.sep) ? root : root + path13.sep)
|
|
12577
|
+
);
|
|
12524
12578
|
}
|
|
12525
12579
|
/**
|
|
12526
12580
|
* Find the first source file in the workspace that matches the server's
|
|
@@ -12552,7 +12606,7 @@ var NativeLspService = class {
|
|
|
12552
12606
|
}
|
|
12553
12607
|
return match;
|
|
12554
12608
|
}
|
|
12555
|
-
} catch
|
|
12609
|
+
} catch {
|
|
12556
12610
|
}
|
|
12557
12611
|
}
|
|
12558
12612
|
return void 0;
|
|
@@ -12598,13 +12652,21 @@ var NativeLspService = class {
|
|
|
12598
12652
|
* @param force - Force re-warmup even if already warmed up
|
|
12599
12653
|
*/
|
|
12600
12654
|
async warmupAndTrack(serverName, handle, force = false) {
|
|
12601
|
-
|
|
12655
|
+
if (!handle.connection) {
|
|
12656
|
+
return;
|
|
12657
|
+
}
|
|
12658
|
+
const connectedHandle = handle;
|
|
12659
|
+
await this.serverManager.warmupTypescriptServer(
|
|
12602
12660
|
handle,
|
|
12661
|
+
(uri, languageId) => this.synchronizeDocument(
|
|
12662
|
+
serverName,
|
|
12663
|
+
connectedHandle,
|
|
12664
|
+
uri,
|
|
12665
|
+
languageId,
|
|
12666
|
+
force
|
|
12667
|
+
).sent,
|
|
12603
12668
|
force
|
|
12604
12669
|
);
|
|
12605
|
-
if (warmupUri) {
|
|
12606
|
-
this.trackExternallyOpenedDocument(serverName, warmupUri);
|
|
12607
|
-
}
|
|
12608
12670
|
}
|
|
12609
12671
|
/**
|
|
12610
12672
|
* Whether we should retry a document-level operation that returned empty
|
|
@@ -12697,12 +12759,12 @@ var NativeLspService = class {
|
|
|
12697
12759
|
};
|
|
12698
12760
|
for (const [name, handle] of handles) {
|
|
12699
12761
|
try {
|
|
12700
|
-
|
|
12762
|
+
await this.warmupAndTrack(name, handle);
|
|
12763
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12701
12764
|
name,
|
|
12702
12765
|
handle,
|
|
12703
12766
|
location.uri
|
|
12704
12767
|
);
|
|
12705
|
-
await this.warmupAndTrack(name, handle);
|
|
12706
12768
|
let response = await handle.connection.request(
|
|
12707
12769
|
"textDocument/definition",
|
|
12708
12770
|
requestParams
|
|
@@ -12749,12 +12811,12 @@ var NativeLspService = class {
|
|
|
12749
12811
|
};
|
|
12750
12812
|
for (const [name, handle] of handles) {
|
|
12751
12813
|
try {
|
|
12752
|
-
|
|
12814
|
+
await this.warmupAndTrack(name, handle);
|
|
12815
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12753
12816
|
name,
|
|
12754
12817
|
handle,
|
|
12755
12818
|
location.uri
|
|
12756
12819
|
);
|
|
12757
|
-
await this.warmupAndTrack(name, handle);
|
|
12758
12820
|
let response = await handle.connection.request(
|
|
12759
12821
|
"textDocument/references",
|
|
12760
12822
|
requestParams
|
|
@@ -12802,12 +12864,12 @@ var NativeLspService = class {
|
|
|
12802
12864
|
};
|
|
12803
12865
|
for (const [name, handle] of handles) {
|
|
12804
12866
|
try {
|
|
12805
|
-
|
|
12867
|
+
await this.warmupAndTrack(name, handle);
|
|
12868
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12806
12869
|
name,
|
|
12807
12870
|
handle,
|
|
12808
12871
|
location.uri
|
|
12809
12872
|
);
|
|
12810
|
-
await this.warmupAndTrack(name, handle);
|
|
12811
12873
|
let response = await handle.connection.request(
|
|
12812
12874
|
"textDocument/hover",
|
|
12813
12875
|
requestParams
|
|
@@ -12837,8 +12899,12 @@ var NativeLspService = class {
|
|
|
12837
12899
|
const requestParams = { textDocument: { uri } };
|
|
12838
12900
|
for (const [name, handle] of handles) {
|
|
12839
12901
|
try {
|
|
12840
|
-
const justOpened = await this.ensureDocumentOpen(name, handle, uri);
|
|
12841
12902
|
await this.warmupAndTrack(name, handle);
|
|
12903
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12904
|
+
name,
|
|
12905
|
+
handle,
|
|
12906
|
+
uri
|
|
12907
|
+
);
|
|
12842
12908
|
let response = await handle.connection.request(
|
|
12843
12909
|
"textDocument/documentSymbol",
|
|
12844
12910
|
requestParams
|
|
@@ -12903,12 +12969,12 @@ var NativeLspService = class {
|
|
|
12903
12969
|
};
|
|
12904
12970
|
for (const [name, handle] of handles) {
|
|
12905
12971
|
try {
|
|
12906
|
-
|
|
12972
|
+
await this.warmupAndTrack(name, handle);
|
|
12973
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12907
12974
|
name,
|
|
12908
12975
|
handle,
|
|
12909
12976
|
location.uri
|
|
12910
12977
|
);
|
|
12911
|
-
await this.warmupAndTrack(name, handle);
|
|
12912
12978
|
let response = await handle.connection.request(
|
|
12913
12979
|
"textDocument/implementation",
|
|
12914
12980
|
requestParams
|
|
@@ -12946,6 +13012,95 @@ var NativeLspService = class {
|
|
|
12946
13012
|
}
|
|
12947
13013
|
return [];
|
|
12948
13014
|
}
|
|
13015
|
+
captureCallHierarchyRevision(name, handle, uri) {
|
|
13016
|
+
const connection = handle.connection;
|
|
13017
|
+
const assertActive = /* @__PURE__ */ __name(() => {
|
|
13018
|
+
if (!connection || handle.connection !== connection || handle.status !== "READY" || this.serverManager.getHandles().get(name) !== handle) {
|
|
13019
|
+
throw new StaleCallHierarchyItemError();
|
|
13020
|
+
}
|
|
13021
|
+
}, "assertActive");
|
|
13022
|
+
assertActive();
|
|
13023
|
+
const readText = /* @__PURE__ */ __name((target) => {
|
|
13024
|
+
try {
|
|
13025
|
+
return fs10.readFileSync(fileURLToPath(target), "utf-8");
|
|
13026
|
+
} catch {
|
|
13027
|
+
return void 0;
|
|
13028
|
+
}
|
|
13029
|
+
}, "readText");
|
|
13030
|
+
const snapshots = new Map(
|
|
13031
|
+
this.lastConnections.get(name) === connection ? this.openedDocuments.get(name) : void 0
|
|
13032
|
+
);
|
|
13033
|
+
const observations = /* @__PURE__ */ new Map();
|
|
13034
|
+
if (!snapshots.has(uri) && uri.startsWith("file://")) {
|
|
13035
|
+
const text = readText(uri);
|
|
13036
|
+
observations.set(uri, text);
|
|
13037
|
+
if (text !== void 0)
|
|
13038
|
+
snapshots.set(uri, {
|
|
13039
|
+
text,
|
|
13040
|
+
version: this.lastConnections.get(name) === connection ? this.documentLifecycles.get(name)?.get(uri)?.version ?? 0 : 0
|
|
13041
|
+
});
|
|
13042
|
+
}
|
|
13043
|
+
const isFresh = /* @__PURE__ */ __name((target) => {
|
|
13044
|
+
assertActive();
|
|
13045
|
+
const snapshot = snapshots.get(target);
|
|
13046
|
+
if (!snapshot) return false;
|
|
13047
|
+
const current = this.lastConnections.get(name) === connection ? this.openedDocuments.get(name)?.get(target) : void 0;
|
|
13048
|
+
const lifecycle = this.lastConnections.get(name) === connection ? this.documentLifecycles.get(name)?.get(target) : void 0;
|
|
13049
|
+
if (!observations.has(target)) observations.set(target, readText(target));
|
|
13050
|
+
return !lifecycle?.pendingClose && (current?.version ?? lifecycle?.version ?? 0) === snapshot.version && (!current || current.text === snapshot.text) && // A previously delivered snapshot must still be open, not just identical on disk.
|
|
13051
|
+
(snapshot.version === 0 || current === snapshot) && observations.get(target) === snapshot.text;
|
|
13052
|
+
}, "isFresh");
|
|
13053
|
+
const assertRoot = /* @__PURE__ */ __name(() => {
|
|
13054
|
+
assertActive();
|
|
13055
|
+
if (uri.startsWith("file://") && !isFresh(uri))
|
|
13056
|
+
throw new StaleCallHierarchyItemError(uri);
|
|
13057
|
+
}, "assertRoot");
|
|
13058
|
+
assertRoot();
|
|
13059
|
+
let secret = this.callHierarchySecrets.get(connection);
|
|
13060
|
+
if (!secret) {
|
|
13061
|
+
secret = randomBytes4(32);
|
|
13062
|
+
this.callHierarchySecrets.set(connection, secret);
|
|
13063
|
+
}
|
|
13064
|
+
return {
|
|
13065
|
+
checkpoint: /* @__PURE__ */ __name(() => {
|
|
13066
|
+
observations.clear();
|
|
13067
|
+
assertRoot();
|
|
13068
|
+
}, "checkpoint"),
|
|
13069
|
+
sign: /* @__PURE__ */ __name((item) => {
|
|
13070
|
+
assertActive();
|
|
13071
|
+
if (!item.uri.startsWith("file://")) return void 0;
|
|
13072
|
+
if (!isFresh(item.uri)) {
|
|
13073
|
+
if (item.uri === uri) throw new StaleCallHierarchyItemError();
|
|
13074
|
+
return void 0;
|
|
13075
|
+
}
|
|
13076
|
+
const snapshot = snapshots.get(item.uri);
|
|
13077
|
+
let digest = this.snapshotDigests.get(snapshot);
|
|
13078
|
+
if (!digest) {
|
|
13079
|
+
digest = createHash5("sha256").update(snapshot.text).digest("hex");
|
|
13080
|
+
this.snapshotDigests.set(snapshot, digest);
|
|
13081
|
+
}
|
|
13082
|
+
return createHmac("sha256", secret).update(
|
|
13083
|
+
JSON.stringify(
|
|
13084
|
+
sortJsonValue([
|
|
13085
|
+
name,
|
|
13086
|
+
this.normalizer.toCallHierarchyItemParams(item),
|
|
13087
|
+
{ digest, version: snapshot.version }
|
|
13088
|
+
])
|
|
13089
|
+
)
|
|
13090
|
+
).digest("hex");
|
|
13091
|
+
}, "sign")
|
|
13092
|
+
};
|
|
13093
|
+
}
|
|
13094
|
+
validateCallHierarchyItem(item, revision) {
|
|
13095
|
+
if (!item.uri.startsWith("file://")) {
|
|
13096
|
+
throw new Error(
|
|
13097
|
+
`Call hierarchy item ${item.uri} has no verifiable disk snapshot and cannot be traversed; prepare call hierarchy at a file location instead.`
|
|
13098
|
+
);
|
|
13099
|
+
}
|
|
13100
|
+
if (!item.documentRevision || item.documentRevision !== revision.sign(item)) {
|
|
13101
|
+
throw new StaleCallHierarchyItemError(item.uri);
|
|
13102
|
+
}
|
|
13103
|
+
}
|
|
12949
13104
|
/**
|
|
12950
13105
|
* Prepare call hierarchy
|
|
12951
13106
|
*/
|
|
@@ -12956,42 +13111,81 @@ var NativeLspService = class {
|
|
|
12956
13111
|
position: location.range.start
|
|
12957
13112
|
};
|
|
12958
13113
|
for (const [name, handle] of handles) {
|
|
13114
|
+
const connection = handle.connection;
|
|
13115
|
+
let revision;
|
|
12959
13116
|
try {
|
|
12960
|
-
|
|
13117
|
+
let originalText;
|
|
13118
|
+
if (location.uri.startsWith("file://")) {
|
|
13119
|
+
try {
|
|
13120
|
+
originalText = fs10.readFileSync(
|
|
13121
|
+
fileURLToPath(location.uri),
|
|
13122
|
+
"utf-8"
|
|
13123
|
+
);
|
|
13124
|
+
} catch (error) {
|
|
13125
|
+
this.synchronizeDocument(name, handle, location.uri);
|
|
13126
|
+
throw error;
|
|
13127
|
+
}
|
|
13128
|
+
}
|
|
13129
|
+
const assertOriginal = /* @__PURE__ */ __name(() => {
|
|
13130
|
+
if (handle.connection !== connection || handle.status !== "READY" || this.serverManager.getHandles().get(name) !== handle) {
|
|
13131
|
+
throw new StaleCallHierarchyItemError();
|
|
13132
|
+
}
|
|
13133
|
+
if (originalText !== void 0) {
|
|
13134
|
+
let current;
|
|
13135
|
+
try {
|
|
13136
|
+
current = fs10.readFileSync(fileURLToPath(location.uri), "utf-8");
|
|
13137
|
+
} catch {
|
|
13138
|
+
throw new StaleCallHierarchyItemError();
|
|
13139
|
+
}
|
|
13140
|
+
if (current !== originalText)
|
|
13141
|
+
throw new StaleCallHierarchyItemError();
|
|
13142
|
+
}
|
|
13143
|
+
}, "assertOriginal");
|
|
13144
|
+
await this.warmupAndTrack(name, handle);
|
|
13145
|
+
assertOriginal();
|
|
13146
|
+
const justOpened = await this.ensureDocumentSynchronized(
|
|
12961
13147
|
name,
|
|
12962
13148
|
handle,
|
|
12963
13149
|
location.uri
|
|
12964
13150
|
);
|
|
12965
|
-
|
|
12966
|
-
|
|
13151
|
+
assertOriginal();
|
|
13152
|
+
revision = this.captureCallHierarchyRevision(
|
|
13153
|
+
name,
|
|
13154
|
+
handle,
|
|
13155
|
+
location.uri
|
|
13156
|
+
);
|
|
13157
|
+
let response = await connection.request(
|
|
12967
13158
|
"textDocument/prepareCallHierarchy",
|
|
12968
13159
|
requestParams
|
|
12969
13160
|
);
|
|
13161
|
+
revision.checkpoint();
|
|
12970
13162
|
if (this.isEmptyResponse(response) && this.shouldRetryAfterOpen(justOpened, handle)) {
|
|
12971
13163
|
await this.delay(DEFAULT_LSP_DOCUMENT_RETRY_DELAY_MS);
|
|
12972
|
-
|
|
13164
|
+
revision.checkpoint();
|
|
13165
|
+
response = await connection.request(
|
|
12973
13166
|
"textDocument/prepareCallHierarchy",
|
|
12974
13167
|
requestParams
|
|
12975
13168
|
);
|
|
13169
|
+
revision.checkpoint();
|
|
12976
13170
|
}
|
|
12977
|
-
const
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
if (items.length >= limit) {
|
|
12987
|
-
return items.slice(0, limit);
|
|
12988
|
-
}
|
|
13171
|
+
const normalize = /* @__PURE__ */ __name((value) => {
|
|
13172
|
+
const items2 = [];
|
|
13173
|
+
for (const candidate of Array.isArray(value) ? value : value ? [value] : []) {
|
|
13174
|
+
const item = this.normalizer.normalizeCallHierarchyItem(
|
|
13175
|
+
candidate,
|
|
13176
|
+
name
|
|
13177
|
+
);
|
|
13178
|
+
if (item) items2.push(item);
|
|
13179
|
+
if (items2.length >= limit) break;
|
|
12989
13180
|
}
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
13181
|
+
return items2.slice(0, limit);
|
|
13182
|
+
}, "normalize");
|
|
13183
|
+
const items = normalize(response);
|
|
13184
|
+
for (const item of items) item.documentRevision = revision.sign(item);
|
|
13185
|
+
if (items.length > 0) return items;
|
|
12994
13186
|
} catch (error) {
|
|
13187
|
+
revision?.checkpoint();
|
|
13188
|
+
if (error instanceof StaleCallHierarchyItemError) throw error;
|
|
12995
13189
|
debugLogger21.warn(
|
|
12996
13190
|
`LSP textDocument/prepareCallHierarchy failed for ${name}:`,
|
|
12997
13191
|
error
|
|
@@ -13006,15 +13200,26 @@ var NativeLspService = class {
|
|
|
13006
13200
|
async incomingCalls(item, serverName, limit = 50) {
|
|
13007
13201
|
const targetServer = serverName ?? item.serverName;
|
|
13008
13202
|
const handles = this.getReadyHandles(targetServer);
|
|
13203
|
+
if (handles.length !== 1) throw new StaleCallHierarchyItemError();
|
|
13009
13204
|
for (const [name, handle] of handles) {
|
|
13205
|
+
const revision = this.captureCallHierarchyRevision(
|
|
13206
|
+
name,
|
|
13207
|
+
handle,
|
|
13208
|
+
item.uri
|
|
13209
|
+
);
|
|
13210
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13211
|
+
await this.warmupAndTrack(name, handle);
|
|
13212
|
+
revision.checkpoint();
|
|
13213
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13010
13214
|
try {
|
|
13011
|
-
await this.warmupAndTrack(name, handle);
|
|
13012
13215
|
const response = await handle.connection.request(
|
|
13013
13216
|
"callHierarchy/incomingCalls",
|
|
13014
13217
|
{
|
|
13015
13218
|
item: this.normalizer.toCallHierarchyItemParams(item)
|
|
13016
13219
|
}
|
|
13017
13220
|
);
|
|
13221
|
+
revision.checkpoint();
|
|
13222
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13018
13223
|
if (!Array.isArray(response)) {
|
|
13019
13224
|
continue;
|
|
13020
13225
|
}
|
|
@@ -13022,6 +13227,7 @@ var NativeLspService = class {
|
|
|
13022
13227
|
for (const call of response) {
|
|
13023
13228
|
const normalized2 = this.normalizer.normalizeIncomingCall(call, name);
|
|
13024
13229
|
if (normalized2) {
|
|
13230
|
+
normalized2.from.documentRevision = revision.sign(normalized2.from);
|
|
13025
13231
|
calls.push(normalized2);
|
|
13026
13232
|
if (calls.length >= limit) {
|
|
13027
13233
|
return calls.slice(0, limit);
|
|
@@ -13032,6 +13238,9 @@ var NativeLspService = class {
|
|
|
13032
13238
|
return calls.slice(0, limit);
|
|
13033
13239
|
}
|
|
13034
13240
|
} catch (error) {
|
|
13241
|
+
revision.checkpoint();
|
|
13242
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13243
|
+
if (error instanceof StaleCallHierarchyItemError) throw error;
|
|
13035
13244
|
debugLogger21.warn(
|
|
13036
13245
|
`LSP callHierarchy/incomingCalls failed for ${name}:`,
|
|
13037
13246
|
error
|
|
@@ -13046,15 +13255,26 @@ var NativeLspService = class {
|
|
|
13046
13255
|
async outgoingCalls(item, serverName, limit = 50) {
|
|
13047
13256
|
const targetServer = serverName ?? item.serverName;
|
|
13048
13257
|
const handles = this.getReadyHandles(targetServer);
|
|
13258
|
+
if (handles.length !== 1) throw new StaleCallHierarchyItemError();
|
|
13049
13259
|
for (const [name, handle] of handles) {
|
|
13260
|
+
const revision = this.captureCallHierarchyRevision(
|
|
13261
|
+
name,
|
|
13262
|
+
handle,
|
|
13263
|
+
item.uri
|
|
13264
|
+
);
|
|
13265
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13266
|
+
await this.warmupAndTrack(name, handle);
|
|
13267
|
+
revision.checkpoint();
|
|
13268
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13050
13269
|
try {
|
|
13051
|
-
await this.warmupAndTrack(name, handle);
|
|
13052
13270
|
const response = await handle.connection.request(
|
|
13053
13271
|
"callHierarchy/outgoingCalls",
|
|
13054
13272
|
{
|
|
13055
13273
|
item: this.normalizer.toCallHierarchyItemParams(item)
|
|
13056
13274
|
}
|
|
13057
13275
|
);
|
|
13276
|
+
revision.checkpoint();
|
|
13277
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13058
13278
|
if (!Array.isArray(response)) {
|
|
13059
13279
|
continue;
|
|
13060
13280
|
}
|
|
@@ -13062,6 +13282,7 @@ var NativeLspService = class {
|
|
|
13062
13282
|
for (const call of response) {
|
|
13063
13283
|
const normalized2 = this.normalizer.normalizeOutgoingCall(call, name);
|
|
13064
13284
|
if (normalized2) {
|
|
13285
|
+
normalized2.to.documentRevision = revision.sign(normalized2.to);
|
|
13065
13286
|
calls.push(normalized2);
|
|
13066
13287
|
if (calls.length >= limit) {
|
|
13067
13288
|
return calls.slice(0, limit);
|
|
@@ -13072,6 +13293,9 @@ var NativeLspService = class {
|
|
|
13072
13293
|
return calls.slice(0, limit);
|
|
13073
13294
|
}
|
|
13074
13295
|
} catch (error) {
|
|
13296
|
+
revision.checkpoint();
|
|
13297
|
+
this.validateCallHierarchyItem(item, revision);
|
|
13298
|
+
if (error instanceof StaleCallHierarchyItemError) throw error;
|
|
13075
13299
|
debugLogger21.warn(
|
|
13076
13300
|
`LSP callHierarchy/outgoingCalls failed for ${name}:`,
|
|
13077
13301
|
error
|
|
@@ -13087,9 +13311,9 @@ var NativeLspService = class {
|
|
|
13087
13311
|
const handles = this.getReadyHandles(serverName);
|
|
13088
13312
|
const allDiagnostics = [];
|
|
13089
13313
|
for (const [name, handle] of handles) {
|
|
13314
|
+
await this.warmupAndTrack(name, handle);
|
|
13315
|
+
await this.ensureDocumentSynchronized(name, handle, uri);
|
|
13090
13316
|
try {
|
|
13091
|
-
await this.ensureDocumentOpen(name, handle, uri);
|
|
13092
|
-
await this.warmupAndTrack(name, handle);
|
|
13093
13317
|
const response = await handle.connection.request(
|
|
13094
13318
|
"textDocument/diagnostic",
|
|
13095
13319
|
{
|
|
@@ -13127,8 +13351,44 @@ var NativeLspService = class {
|
|
|
13127
13351
|
const handles = this.getReadyHandles(serverName);
|
|
13128
13352
|
const results = [];
|
|
13129
13353
|
for (const [name, handle] of handles) {
|
|
13354
|
+
const connection = handle.connection;
|
|
13355
|
+
const trackedUris = [...this.trackedUrisFor(name)];
|
|
13356
|
+
await this.warmupAndTrack(name, handle);
|
|
13357
|
+
if (handle.connection !== connection || handle.status !== "READY" || this.serverManager.getHandles().get(name) !== handle) {
|
|
13358
|
+
throw new Error(`LSP server ${name} connection is no longer active`);
|
|
13359
|
+
}
|
|
13360
|
+
if (this.lastConnections.get(name) !== connection) {
|
|
13361
|
+
this.parkTrackedUris(name);
|
|
13362
|
+
this.lastConnections.set(name, connection);
|
|
13363
|
+
}
|
|
13364
|
+
for (const [uri, lifecycle] of this.documentLifecycles.get(name) ?? []) {
|
|
13365
|
+
if (lifecycle.pendingClose) {
|
|
13366
|
+
try {
|
|
13367
|
+
this.closeUnsynchronizableDocument(name, handle, uri);
|
|
13368
|
+
} catch (error) {
|
|
13369
|
+
throw new Error(
|
|
13370
|
+
`LSP server ${name} still cannot close ${uri}; refusing to reopen it (${error.message})`,
|
|
13371
|
+
{ cause: error }
|
|
13372
|
+
);
|
|
13373
|
+
}
|
|
13374
|
+
}
|
|
13375
|
+
}
|
|
13376
|
+
let openedAny = false;
|
|
13377
|
+
let syncError;
|
|
13378
|
+
for (const uri of trackedUris) {
|
|
13379
|
+
try {
|
|
13380
|
+
openedAny = this.synchronizeDocument(name, handle, uri).opened || openedAny;
|
|
13381
|
+
this.replayUris.get(name)?.delete(uri);
|
|
13382
|
+
} catch (error) {
|
|
13383
|
+
syncError ??= error;
|
|
13384
|
+
}
|
|
13385
|
+
}
|
|
13386
|
+
if (syncError) throw syncError;
|
|
13387
|
+
if (openedAny) await this.delay(DEFAULT_LSP_DOCUMENT_OPEN_DELAY_MS);
|
|
13388
|
+
if (handle.connection !== connection || handle.status !== "READY" || this.serverManager.getHandles().get(name) !== handle) {
|
|
13389
|
+
throw new Error(`LSP server ${name} connection is no longer active`);
|
|
13390
|
+
}
|
|
13130
13391
|
try {
|
|
13131
|
-
await this.warmupAndTrack(name, handle);
|
|
13132
13392
|
const response = await handle.connection.request(
|
|
13133
13393
|
"workspace/diagnostic",
|
|
13134
13394
|
{
|
|
@@ -13169,8 +13429,8 @@ var NativeLspService = class {
|
|
|
13169
13429
|
const handles = this.getReadyHandles(serverName);
|
|
13170
13430
|
for (const [name, handle] of handles) {
|
|
13171
13431
|
try {
|
|
13172
|
-
await this.ensureDocumentOpen(name, handle, uri);
|
|
13173
13432
|
await this.warmupAndTrack(name, handle);
|
|
13433
|
+
await this.ensureDocumentSynchronized(name, handle, uri);
|
|
13174
13434
|
const lspDiagnostics = context.diagnostics.map(
|
|
13175
13435
|
(d) => this.normalizer.denormalizeDiagnostic(d)
|
|
13176
13436
|
);
|
|
@@ -13277,7 +13537,7 @@ var NativeLspService = class {
|
|
|
13277
13537
|
lines.splice(startLine, endLine - startLine + 1, ...newLines);
|
|
13278
13538
|
}
|
|
13279
13539
|
try {
|
|
13280
|
-
await fsp.access(filePath,
|
|
13540
|
+
await fsp.access(filePath, fs10.constants.W_OK);
|
|
13281
13541
|
} catch (err) {
|
|
13282
13542
|
if (err?.code !== "ENOENT") {
|
|
13283
13543
|
throw err;
|
|
@@ -13311,9 +13571,6 @@ function formatServerNames2(names) {
|
|
|
13311
13571
|
}
|
|
13312
13572
|
__name(formatServerNames2, "formatServerNames");
|
|
13313
13573
|
|
|
13314
|
-
// packages/core/src/lsp/types.ts
|
|
13315
|
-
init_esbuild_shims();
|
|
13316
|
-
|
|
13317
13574
|
// packages/core/src/mcp/configHash.ts
|
|
13318
13575
|
init_esbuild_shims();
|
|
13319
13576
|
import * as crypto from "node:crypto";
|
|
@@ -14420,7 +14677,7 @@ import path17 from "node:path";
|
|
|
14420
14677
|
init_esbuild_shims();
|
|
14421
14678
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
14422
14679
|
var import_picomatch = __toESM(require_picomatch(), 1);
|
|
14423
|
-
import
|
|
14680
|
+
import fs11 from "node:fs";
|
|
14424
14681
|
import path14 from "node:path";
|
|
14425
14682
|
var hasFileExtension = (0, import_picomatch.default)("**/*[*.]*");
|
|
14426
14683
|
var debugLogger24 = createDebugLogger("FILE_SEARCH_IGNORE");
|
|
@@ -14458,7 +14715,7 @@ function loadIgnoreRules(options) {
|
|
|
14458
14715
|
__name(loadIgnoreRules, "loadIgnoreRules");
|
|
14459
14716
|
function readIgnoreFile(filePath) {
|
|
14460
14717
|
try {
|
|
14461
|
-
return
|
|
14718
|
+
return fs11.readFileSync(filePath, "utf8");
|
|
14462
14719
|
} catch (_error) {
|
|
14463
14720
|
const error = _error;
|
|
14464
14721
|
if (error.code !== "ENOENT") {
|
|
@@ -14612,7 +14869,7 @@ __name(hasGlobSyntax, "hasGlobSyntax");
|
|
|
14612
14869
|
init_esbuild_shims();
|
|
14613
14870
|
var import_fdir = __toESM(require_dist(), 1);
|
|
14614
14871
|
import path15 from "node:path";
|
|
14615
|
-
import
|
|
14872
|
+
import fs12 from "node:fs";
|
|
14616
14873
|
import { spawn as spawn3 } from "node:child_process";
|
|
14617
14874
|
|
|
14618
14875
|
// packages/core/src/utils/filesearch/crawlCache.ts
|
|
@@ -14871,13 +15128,13 @@ function resolveGitDir(crawlDirectory) {
|
|
|
14871
15128
|
while (current) {
|
|
14872
15129
|
const gitPath = path15.join(current, ".git");
|
|
14873
15130
|
try {
|
|
14874
|
-
const stat5 =
|
|
15131
|
+
const stat5 = fs12.statSync(gitPath);
|
|
14875
15132
|
if (stat5.isDirectory()) {
|
|
14876
15133
|
pathCacheSet(resolveGitDirCache, cacheKey, gitPath);
|
|
14877
15134
|
return gitPath;
|
|
14878
15135
|
}
|
|
14879
15136
|
if (stat5.isFile()) {
|
|
14880
|
-
const contents =
|
|
15137
|
+
const contents = fs12.readFileSync(gitPath, "utf8").trim();
|
|
14881
15138
|
const match = contents.match(/^gitdir:\s*(.+)$/i);
|
|
14882
15139
|
if (!match) {
|
|
14883
15140
|
pathCacheSet(resolveGitDirCache, cacheKey, null);
|
|
@@ -14886,11 +15143,11 @@ function resolveGitDir(crawlDirectory) {
|
|
|
14886
15143
|
const resolvedGitDir = match[1].trim();
|
|
14887
15144
|
let resolvedAbs = path15.isAbsolute(resolvedGitDir) ? path15.resolve(resolvedGitDir) : path15.resolve(current, resolvedGitDir);
|
|
14888
15145
|
try {
|
|
14889
|
-
resolvedAbs =
|
|
15146
|
+
resolvedAbs = fs12.realpathSync(resolvedAbs);
|
|
14890
15147
|
try {
|
|
14891
|
-
|
|
15148
|
+
fs12.statSync(path15.join(resolvedAbs, "HEAD"));
|
|
14892
15149
|
} catch {
|
|
14893
|
-
|
|
15150
|
+
fs12.statSync(path15.join(resolvedAbs, "index"));
|
|
14894
15151
|
}
|
|
14895
15152
|
} catch {
|
|
14896
15153
|
pathCacheSet(resolveGitDirCache, cacheKey, null);
|
|
@@ -14923,7 +15180,7 @@ function getGitRootMtime(crawlDirectory) {
|
|
|
14923
15180
|
return null;
|
|
14924
15181
|
}
|
|
14925
15182
|
const indexPath = path15.join(gitDir, "index");
|
|
14926
|
-
const indexStat =
|
|
15183
|
+
const indexStat = fs12.statSync(indexPath);
|
|
14927
15184
|
return indexStat.mtimeMs;
|
|
14928
15185
|
} catch {
|
|
14929
15186
|
}
|
|
@@ -15164,11 +15421,11 @@ function getPosixRelative(from, to) {
|
|
|
15164
15421
|
let fromAbs = fromResolved;
|
|
15165
15422
|
let toAbs = toResolved;
|
|
15166
15423
|
try {
|
|
15167
|
-
fromAbs =
|
|
15424
|
+
fromAbs = fs12.realpathSync(fromResolved);
|
|
15168
15425
|
} catch {
|
|
15169
15426
|
}
|
|
15170
15427
|
try {
|
|
15171
|
-
toAbs =
|
|
15428
|
+
toAbs = fs12.realpathSync(toResolved);
|
|
15172
15429
|
} catch {
|
|
15173
15430
|
}
|
|
15174
15431
|
const relative2 = path15.relative(fromAbs, toAbs);
|
|
@@ -15486,7 +15743,7 @@ async function crawlWithGitLsFiles(stateKey, crawlDirectory, cwd, options, worki
|
|
|
15486
15743
|
}
|
|
15487
15744
|
let stat5;
|
|
15488
15745
|
try {
|
|
15489
|
-
stat5 =
|
|
15746
|
+
stat5 = fs12.lstatSync(path15.join(gitRoot, ...normalizedFile.split("/")));
|
|
15490
15747
|
} catch {
|
|
15491
15748
|
return true;
|
|
15492
15749
|
}
|
|
@@ -15601,7 +15858,7 @@ function collectDirectoryRows(options) {
|
|
|
15601
15858
|
}
|
|
15602
15859
|
let entries;
|
|
15603
15860
|
try {
|
|
15604
|
-
entries =
|
|
15861
|
+
entries = fs12.readdirSync(dir, { withFileTypes: true });
|
|
15605
15862
|
} catch {
|
|
15606
15863
|
return;
|
|
15607
15864
|
}
|
|
@@ -15847,7 +16104,7 @@ __name(applyMaxFilesLimit, "applyMaxFilesLimit");
|
|
|
15847
16104
|
|
|
15848
16105
|
// packages/core/src/utils/filesearch/fzfWorkerHandle.ts
|
|
15849
16106
|
init_esbuild_shims();
|
|
15850
|
-
import
|
|
16107
|
+
import fs13 from "node:fs";
|
|
15851
16108
|
import path16 from "node:path";
|
|
15852
16109
|
import { Worker } from "node:worker_threads";
|
|
15853
16110
|
|
|
@@ -16904,7 +17161,7 @@ function getWorkerScriptPath() {
|
|
|
16904
17161
|
resolveBundleDir(import.meta.url),
|
|
16905
17162
|
"fzfWorker.js"
|
|
16906
17163
|
);
|
|
16907
|
-
resolvedWorkerPath =
|
|
17164
|
+
resolvedWorkerPath = fs13.existsSync(candidate) ? candidate : null;
|
|
16908
17165
|
return resolvedWorkerPath;
|
|
16909
17166
|
}
|
|
16910
17167
|
__name(getWorkerScriptPath, "getWorkerScriptPath");
|
|
@@ -17304,7 +17561,7 @@ __name(analyzeToolResultRetention, "analyzeToolResultRetention");
|
|
|
17304
17561
|
|
|
17305
17562
|
// packages/core/src/utils/pathReader.ts
|
|
17306
17563
|
init_esbuild_shims();
|
|
17307
|
-
import { promises as
|
|
17564
|
+
import { promises as fs14 } from "node:fs";
|
|
17308
17565
|
import path18 from "node:path";
|
|
17309
17566
|
async function readPathFromWorkspace(pathStr, config) {
|
|
17310
17567
|
const workspace = config.getWorkspaceContext();
|
|
@@ -17322,7 +17579,7 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17322
17579
|
for (const dir of searchDirs) {
|
|
17323
17580
|
const potentialPath = path18.resolve(dir, pathStr);
|
|
17324
17581
|
try {
|
|
17325
|
-
await
|
|
17582
|
+
await fs14.access(potentialPath);
|
|
17326
17583
|
absolutePath = potentialPath;
|
|
17327
17584
|
break;
|
|
17328
17585
|
} catch {
|
|
@@ -17332,7 +17589,7 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17332
17589
|
if (!absolutePath) {
|
|
17333
17590
|
throw new Error(`Path not found in workspace: ${pathStr}`);
|
|
17334
17591
|
}
|
|
17335
|
-
const stats = await
|
|
17592
|
+
const stats = await fs14.stat(absolutePath);
|
|
17336
17593
|
if (stats.isDirectory()) {
|
|
17337
17594
|
const allParts = [];
|
|
17338
17595
|
allParts.push({
|
|
@@ -17394,7 +17651,7 @@ __name(readPathFromWorkspace, "readPathFromWorkspace");
|
|
|
17394
17651
|
|
|
17395
17652
|
// packages/core/src/utils/projectSummary.ts
|
|
17396
17653
|
init_esbuild_shims();
|
|
17397
|
-
import * as
|
|
17654
|
+
import * as fs15 from "fs/promises";
|
|
17398
17655
|
import * as path19 from "path";
|
|
17399
17656
|
var PROJECT_SUMMARY_FILENAME = "PROJECT_SUMMARY.md";
|
|
17400
17657
|
var WELCOME_BACK_STATE_FILENAME = "welcome-back-state.json";
|
|
@@ -17412,7 +17669,7 @@ function buildSummaryFingerprint(stat5) {
|
|
|
17412
17669
|
__name(buildSummaryFingerprint, "buildSummaryFingerprint");
|
|
17413
17670
|
async function getWelcomeBackState() {
|
|
17414
17671
|
try {
|
|
17415
|
-
const raw = await
|
|
17672
|
+
const raw = await fs15.readFile(getWelcomeBackStatePath(), "utf-8");
|
|
17416
17673
|
const parsed = JSON.parse(raw);
|
|
17417
17674
|
if (parsed.version !== 1 || parsed.lastChoice !== "restart" || typeof parsed.summaryFingerprint !== "string") {
|
|
17418
17675
|
return null;
|
|
@@ -17428,7 +17685,7 @@ async function getWelcomeBackState() {
|
|
|
17428
17685
|
__name(getWelcomeBackState, "getWelcomeBackState");
|
|
17429
17686
|
async function saveWelcomeBackRestartChoice(summaryFingerprint) {
|
|
17430
17687
|
const statePath = getWelcomeBackStatePath();
|
|
17431
|
-
await
|
|
17688
|
+
await fs15.mkdir(path19.dirname(statePath), { recursive: true });
|
|
17432
17689
|
const state = {
|
|
17433
17690
|
version: 1,
|
|
17434
17691
|
lastChoice: "restart",
|
|
@@ -17441,7 +17698,7 @@ async function saveWelcomeBackRestartChoice(summaryFingerprint) {
|
|
|
17441
17698
|
__name(saveWelcomeBackRestartChoice, "saveWelcomeBackRestartChoice");
|
|
17442
17699
|
async function clearWelcomeBackState() {
|
|
17443
17700
|
try {
|
|
17444
|
-
await
|
|
17701
|
+
await fs15.rm(getWelcomeBackStatePath(), { force: true });
|
|
17445
17702
|
} catch {
|
|
17446
17703
|
}
|
|
17447
17704
|
}
|
|
@@ -17449,15 +17706,15 @@ __name(clearWelcomeBackState, "clearWelcomeBackState");
|
|
|
17449
17706
|
async function getProjectSummaryInfo() {
|
|
17450
17707
|
const summaryPath = getProjectSummaryPath();
|
|
17451
17708
|
try {
|
|
17452
|
-
await
|
|
17709
|
+
await fs15.access(summaryPath);
|
|
17453
17710
|
} catch {
|
|
17454
17711
|
return {
|
|
17455
17712
|
hasHistory: false
|
|
17456
17713
|
};
|
|
17457
17714
|
}
|
|
17458
17715
|
try {
|
|
17459
|
-
const summaryStat = await
|
|
17460
|
-
const content = await
|
|
17716
|
+
const summaryStat = await fs15.stat(summaryPath);
|
|
17717
|
+
const content = await fs15.readFile(summaryPath, "utf-8");
|
|
17461
17718
|
const summaryFingerprint = buildSummaryFingerprint(summaryStat);
|
|
17462
17719
|
const timestampMatch = content.match(/\*\*Update time\*\*: (.+)/);
|
|
17463
17720
|
const timestamp = timestampMatch ? timestampMatch[1] : (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -17525,8 +17782,8 @@ __name(getProjectSummaryInfo, "getProjectSummaryInfo");
|
|
|
17525
17782
|
|
|
17526
17783
|
// packages/core/src/tools/readManyFiles.ts
|
|
17527
17784
|
init_esbuild_shims();
|
|
17528
|
-
import * as
|
|
17529
|
-
import * as
|
|
17785
|
+
import * as fs16 from "node:fs";
|
|
17786
|
+
import * as os4 from "node:os";
|
|
17530
17787
|
import * as path20 from "node:path";
|
|
17531
17788
|
var DEFAULT_OUTPUT_HEADER = "\n--- Content from referenced files ---";
|
|
17532
17789
|
var DEFAULT_OUTPUT_TERMINATOR = "\n--- End of content ---";
|
|
@@ -17566,7 +17823,7 @@ async function readManyFiles(config, options) {
|
|
|
17566
17823
|
if (validatedIdentity && !await matchesValidatedPathIdentity(fullPath, validatedIdentity)) {
|
|
17567
17824
|
continue;
|
|
17568
17825
|
}
|
|
17569
|
-
const stats =
|
|
17826
|
+
const stats = fs16.existsSync(fullPath) ? fs16.statSync(fullPath) : null;
|
|
17570
17827
|
if (stats?.isDirectory()) {
|
|
17571
17828
|
const { contentParts: dirParts, info } = await readDirectory(
|
|
17572
17829
|
config,
|
|
@@ -17686,9 +17943,9 @@ async function readValidatedTextFileContent(config, filePath, expected, preserve
|
|
|
17686
17943
|
__name(readValidatedTextFileContent, "readValidatedTextFileContent");
|
|
17687
17944
|
async function matchesValidatedPathIdentity(filePath, expected) {
|
|
17688
17945
|
try {
|
|
17689
|
-
const canonicalPath = await
|
|
17946
|
+
const canonicalPath = await fs16.promises.realpath(filePath);
|
|
17690
17947
|
if (canonicalPath !== filePath) return false;
|
|
17691
|
-
const stats = await
|
|
17948
|
+
const stats = await fs16.promises.stat(canonicalPath);
|
|
17692
17949
|
return statsMatchValidatedIdentity(stats, expected);
|
|
17693
17950
|
} catch {
|
|
17694
17951
|
return false;
|
|
@@ -17717,13 +17974,13 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17717
17974
|
if (stats.size > SNAPSHOT_MAX_SIZE_BYTES) {
|
|
17718
17975
|
return void 0;
|
|
17719
17976
|
}
|
|
17720
|
-
snapshotDir = await
|
|
17721
|
-
path20.join(
|
|
17977
|
+
snapshotDir = await fs16.promises.mkdtemp(
|
|
17978
|
+
path20.join(os4.tmpdir(), "qwen-validated-read-")
|
|
17722
17979
|
);
|
|
17723
17980
|
const snapshotPath = path20.join(snapshotDir, path20.basename(filePath));
|
|
17724
|
-
const target = await
|
|
17981
|
+
const target = await fs16.promises.open(
|
|
17725
17982
|
snapshotPath,
|
|
17726
|
-
|
|
17983
|
+
fs16.constants.O_WRONLY | fs16.constants.O_CREAT | fs16.constants.O_EXCL,
|
|
17727
17984
|
384
|
|
17728
17985
|
);
|
|
17729
17986
|
try {
|
|
@@ -17764,7 +18021,7 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17764
18021
|
result = {
|
|
17765
18022
|
filePath: snapshotPath,
|
|
17766
18023
|
stats,
|
|
17767
|
-
cleanup: /* @__PURE__ */ __name(() =>
|
|
18024
|
+
cleanup: /* @__PURE__ */ __name(() => fs16.promises.rm(snapshotDir, { recursive: true, force: true }), "cleanup")
|
|
17768
18025
|
};
|
|
17769
18026
|
return result;
|
|
17770
18027
|
} finally {
|
|
@@ -17776,7 +18033,7 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17776
18033
|
return void 0;
|
|
17777
18034
|
} finally {
|
|
17778
18035
|
if (snapshotDir && !result) {
|
|
17779
|
-
await
|
|
18036
|
+
await fs16.promises.rm(snapshotDir, { recursive: true, force: true });
|
|
17780
18037
|
}
|
|
17781
18038
|
}
|
|
17782
18039
|
}
|
|
@@ -17939,7 +18196,6 @@ export {
|
|
|
17939
18196
|
ClientMcpRegistrar,
|
|
17940
18197
|
isWsl,
|
|
17941
18198
|
discoverProviderModels,
|
|
17942
|
-
applyProviderInstallPlan,
|
|
17943
18199
|
isApiUserPrompt,
|
|
17944
18200
|
findApiRewindCutPoint,
|
|
17945
18201
|
countApiUserPrompts,
|
|
@@ -18032,12 +18288,12 @@ export {
|
|
|
18032
18288
|
*/
|
|
18033
18289
|
/**
|
|
18034
18290
|
* @license
|
|
18035
|
-
* Copyright
|
|
18291
|
+
* Copyright 2026 Qwen Team
|
|
18036
18292
|
* SPDX-License-Identifier: Apache-2.0
|
|
18037
18293
|
*/
|
|
18038
18294
|
/**
|
|
18039
18295
|
* @license
|
|
18040
|
-
* Copyright
|
|
18296
|
+
* Copyright 2025 Qwen Team
|
|
18041
18297
|
* SPDX-License-Identifier: Apache-2.0
|
|
18042
18298
|
*/
|
|
18043
18299
|
/**
|