@qwen-code/qwen-code 0.21.0 → 0.21.1
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/qc-helper/docs/configuration/model-providers.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +38 -28
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/github.md +107 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
- package/bundled/qc-helper/docs/features/code-review.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +52 -15
- package/bundled/qc-helper/docs/features/mcp.md +9 -1
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
- package/bundled/qc-helper/docs/features/sub-agents.md +20 -0
- package/bundled/qc-helper/docs/qwen-serve.md +4 -2
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/review/DESIGN.md +19 -0
- package/bundled/review/SKILL.md +120 -61
- package/chunks/MaxSizedBox-VI3ROJJA.js +84 -0
- package/chunks/{StandaloneSessionPicker-BIRMPLRD.js → StandaloneSessionPicker-LYXKD2EV.js} +67 -68
- package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
- package/chunks/{acpAgent-6J2U72PQ.js → acpAgent-WN5SRDQO.js} +1373 -553
- package/chunks/agent-K6ECSM64.js +80 -0
- package/chunks/agent-headless-NO4Y2HOE.js +74 -0
- package/chunks/{anthropicContentGenerator-75BKLTSP.js → anthropicContentGenerator-V2QOGVYD.js} +79 -27
- package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-6K6U7XYJ.js} +4 -4
- package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-GD2IJJ7I.js} +4 -4
- package/chunks/bridge-3KJEWDNE.js +90 -0
- package/chunks/{build-RV63TIRH.js → build-S6DO7LMM.js} +1 -1
- package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
- package/chunks/channel-management-service-XR7GZSWF.js +403 -0
- package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
- package/chunks/{channel-worker-group-2ZD7TVAT.js → channel-worker-group-XDPTDWTX.js} +11 -6
- package/chunks/{channel-worker-manager-4OA4BCGB.js → channel-worker-manager-YYEHVRRE.js} +11 -6
- package/chunks/{channel-worker-supervisor-V7KCFJTS.js → channel-worker-supervisor-74HTWA2G.js} +7 -5
- package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
- package/chunks/{chunk-ETSW4KLJ.js → chunk-2FAK6PNM.js} +2 -2
- package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
- package/chunks/{chunk-EPDRMGT4.js → chunk-2LKVPASC.js} +4 -28
- package/chunks/{chunk-PWTZEM3C.js → chunk-2LQTH543.js} +3 -37
- package/chunks/{chunk-LH2BYDQ5.js → chunk-2N7CODY5.js} +18 -12
- package/chunks/{chunk-4WIZGAH3.js → chunk-2XSLTRFZ.js} +6 -58
- package/chunks/{chunk-FSITMZJH.js → chunk-3EFXSQCM.js} +18 -9
- package/chunks/{chunk-HIJQF5B5.js → chunk-3L2SPEBH.js} +1 -1
- package/chunks/{chunk-BIQWWWJN.js → chunk-4G2BISNC.js} +1 -1
- package/chunks/{chunk-PWVFN2LF.js → chunk-52ZSWYEG.js} +1 -1
- package/chunks/{chunk-ZJHVAS7M.js → chunk-5KTQXHPY.js} +4 -5
- package/chunks/{chunk-PC6JANNU.js → chunk-5MKRTI4T.js} +4 -4
- package/chunks/{chunk-DHHOYAPR.js → chunk-5TBMQLGG.js} +7 -7
- package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
- package/chunks/chunk-5YKDXHUY.js +463 -0
- package/chunks/chunk-5ZF5XXTS.js +363 -0
- package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
- package/chunks/{chunk-YPE6A4GC.js → chunk-657BH7VM.js} +2 -2
- package/chunks/{chunk-R5AFZNQW.js → chunk-65PQENQP.js} +14 -7
- package/chunks/{chunk-RIBKPMRP.js → chunk-6PE7N3A4.js} +18 -7
- package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
- package/chunks/{chunk-JVPM2ULZ.js → chunk-6RPMI2AB.js} +6 -6
- package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
- package/chunks/{chunk-NIBLUX3Y.js → chunk-75MIQ3LV.js} +148 -21
- package/chunks/{chunk-U7M2DMGW.js → chunk-7AEJDLRA.js} +130 -5
- package/chunks/{chunk-TPRQ7RZH.js → chunk-7BAU433D.js} +2293 -945
- package/chunks/{chunk-M4FMGVY4.js → chunk-7DXQIJID.js} +3 -3
- package/chunks/{chunk-RWTEFFPU.js → chunk-7I5GTCT4.js} +620 -383
- package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
- package/chunks/{chunk-Y34KJKDC.js → chunk-A2D5BAVP.js} +1 -1
- package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
- package/chunks/{chunk-OFDOK3VM.js → chunk-A4COXFB3.js} +8 -13
- package/chunks/{chunk-JLU636DO.js → chunk-ALMR3E6Q.js} +1 -0
- package/chunks/{chunk-Q4M4MDQ4.js → chunk-AQIDMUGU.js} +1 -1
- package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
- package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
- package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
- package/chunks/{chunk-MB4MZHMJ.js → chunk-BGTQCTQW.js} +211 -522
- package/chunks/{chunk-MZAXJAUM.js → chunk-BMFALVGQ.js} +1 -1
- package/chunks/{chunk-PSOO6YXD.js → chunk-BNWB5CYE.js} +9 -7
- package/chunks/{chunk-BKHWX6I2.js → chunk-BPZKP57P.js} +11 -3
- package/chunks/{chunk-H4SBPHSA.js → chunk-CAPPWD3X.js} +3 -3
- package/chunks/{chunk-LQIW3YFY.js → chunk-CQL64ESB.js} +7 -7
- package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
- package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
- package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
- package/chunks/chunk-DZLYR4U3.js +1252 -0
- package/chunks/{chunk-TEHGS6UP.js → chunk-EIF3FXTB.js} +117 -24
- package/chunks/{chunk-2SCDWPXI.js → chunk-EJGJIBRS.js} +5 -5
- package/chunks/{chunk-7MVVZO4N.js → chunk-EVKE2FZL.js} +4 -4
- package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
- package/chunks/{chunk-VIA5XA4U.js → chunk-FTD6DP4T.js} +3 -1
- package/chunks/chunk-FYJ7W2PI.js +194 -0
- package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
- package/chunks/{chunk-X5XDDSSH.js → chunk-GEBV2JGB.js} +28 -5
- package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
- package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
- package/chunks/{chunk-5NBDS5S6.js → chunk-GNR2RNMP.js} +162 -7
- package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
- package/chunks/chunk-GZ3RCT54.js +76 -0
- package/chunks/{chunk-2X55UKQE.js → chunk-HMRM2A3U.js} +3 -3
- package/chunks/chunk-HV26XH34.js +319 -0
- package/chunks/{chunk-LB6DUZ26.js → chunk-J7OACQDE.js} +229 -172
- package/chunks/{chunk-K36B6G2O.js → chunk-JFMA7Y5M.js} +5 -5
- package/chunks/{chunk-55DJUCI2.js → chunk-JHNRZMHI.js} +53 -43
- package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
- package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
- package/chunks/{chunk-YBL3QUDD.js → chunk-JTV5K7NH.js} +1 -1
- package/chunks/{chunk-RZIX2G32.js → chunk-JX27F6QS.js} +1 -1
- package/chunks/chunk-JYBU6YUE.js +378 -0
- package/chunks/{chunk-7JURR4JT.js → chunk-KAMYKP7E.js} +167 -81
- package/chunks/{chunk-KMQ33DO4.js → chunk-KCO4FLFJ.js} +4 -4
- package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
- package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
- package/chunks/{chunk-EBJQ6AXW.js → chunk-LO4ROVP4.js} +262 -16
- package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
- package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
- package/chunks/{chunk-2NH6DYI4.js → chunk-MHAIJPTD.js} +12 -12
- package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
- package/chunks/{chunk-VRYUBFMC.js → chunk-MR5EAQ5M.js} +1 -1
- package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
- package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
- package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
- package/chunks/{chunk-SQCQ4KO2.js → chunk-OCESJA77.js} +393 -330
- package/chunks/chunk-OCPBI7J5.js +18 -0
- package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
- package/chunks/{chunk-TGILQ3YH.js → chunk-P4WOAOJW.js} +141 -64
- package/chunks/{chunk-ZFDTEDCF.js → chunk-PB3MBFKG.js} +6 -6
- package/chunks/{chunk-3RN6GBKS.js → chunk-PLDQBIO6.js} +1 -1
- package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
- package/chunks/{chunk-CIKQ7KKO.js → chunk-PT722TDT.js} +271 -376
- package/chunks/chunk-Q43KPN7X.js +2196 -0
- package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
- package/chunks/{chunk-MVSUYZDT.js → chunk-QIZKCVM3.js} +4 -4
- package/chunks/{chunk-QAF7NMK7.js → chunk-RCUQIPTN.js} +1 -1
- package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
- package/chunks/{chunk-GSN55ZRI.js → chunk-S4WJVPZW.js} +19 -7
- package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
- package/chunks/{chunk-BULDBTYC.js → chunk-S7W2GKIO.js} +1 -28
- package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
- package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
- package/chunks/chunk-T26EAKDL.js +13 -0
- package/chunks/{chunk-UDX5OBWR.js → chunk-T2QMKU3R.js} +80 -2
- package/chunks/{chunk-IKYJHJNF.js → chunk-T3O2B4XO.js} +3 -3
- package/chunks/{chunk-RF3EXIHJ.js → chunk-T4TXDL7G.js} +32 -21
- package/chunks/{chunk-J24WCGIN.js → chunk-TBBV36Y4.js} +4 -4
- package/chunks/{chunk-LKEJ26GS.js → chunk-TCIFAA7K.js} +16 -11
- package/chunks/{chunk-JXJFVC6E.js → chunk-TDL6LB4K.js} +46 -11
- package/chunks/{chunk-7ZCNENPP.js → chunk-TFRMVU6R.js} +1 -1
- package/chunks/{chunk-VULLI6WQ.js → chunk-TV64SXKD.js} +6 -6
- package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
- package/chunks/{chunk-LK7CHLVP.js → chunk-U4VTUMMK.js} +0 -60
- package/chunks/{chunk-ACY3A37B.js → chunk-UBEPNVDI.js} +23 -18
- package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
- package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
- package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
- package/chunks/{chunk-IKCX4CCL.js → chunk-VCPIZRYH.js} +118 -95
- package/chunks/{chunk-ZNAUOR2I.js → chunk-VWOOBLTY.js} +2 -2
- package/chunks/{chunk-YX324OPW.js → chunk-VYOXCEPJ.js} +1 -1
- package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
- package/chunks/{chunk-HTR4WV6U.js → chunk-W4RQUHY3.js} +31 -1
- package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
- package/chunks/{chunk-IO3IX5Q4.js → chunk-WUZ7H6DP.js} +1 -1
- package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
- package/chunks/{chunk-PHOF65IG.js → chunk-X5WNMMIA.js} +23553 -34321
- package/chunks/chunk-XBYYDKAZ.js +80 -0
- package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
- package/chunks/{chunk-WCXCRJYB.js → chunk-XFZYFU3I.js} +1 -1
- package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
- package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
- package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
- package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
- package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
- package/chunks/{chunk-IJTOWOD7.js → chunk-YGF33UXG.js} +82 -8
- package/chunks/chunk-Z4X5MTRT.js +133 -0
- package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
- package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
- package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
- package/chunks/{chunk-KIM5GUMA.js → chunk-ZURDMIDR.js} +368 -156
- package/chunks/{computer-use-SOQ4E3VX.js → computer-use-ZTIDHMMA.js} +49 -50
- package/chunks/{config-utils-7V7GGIW6.js → config-utils-NYSXDMEQ.js} +4 -3
- package/chunks/contextCommand-2PIEU37Z.js +79 -0
- package/chunks/core-runtime-3XEYLQFK.js +133 -0
- package/chunks/{create-sub-session-QRJLW5BV.js → create-sub-session-R76FVXCI.js} +46 -47
- package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
- package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
- package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
- package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
- package/chunks/{daemon-YO6433NF.js → daemon-Q2AB5Z23.js} +356 -15
- package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
- package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
- package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
- package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
- package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
- package/chunks/dist-BSTVRPMT.js +4227 -0
- package/chunks/{dist-46NQKLTW.js → dist-DOLYHMXE.js} +2 -2
- package/chunks/{dist-AIKFMUKK.js → dist-HVRQ2CFL.js} +271 -11
- package/chunks/{dist-WEAHOXDM.js → dist-IXQEQWRG.js} +2 -1
- package/chunks/{dist-BBLXMS3N.js → dist-SSU66DM4.js} +3 -3
- package/chunks/{dist-F6IBUDR4.js → dist-SV7Q3AWJ.js} +1 -1
- package/chunks/{dist-YFNEUWSE.js → dist-YGBBMK3Z.js} +1 -1
- package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
- package/chunks/{edit-OBDSQURM.js → edit-HHGIOTQ2.js} +47 -48
- package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
- package/chunks/{enter-worktree-U6MRPQ2P.js → enter-worktree-ZN7PUQ46.js} +47 -48
- package/chunks/{enterPlanMode-BC5QUZZ2.js → enterPlanMode-EIFIDSIV.js} +47 -48
- package/chunks/{environment-W5UFC2CH.js → environment-XXQ75D2Q.js} +48 -49
- package/chunks/errors-4GMVU7CK.js +87 -0
- package/chunks/esm-K5FARBNI.js +5548 -0
- package/chunks/{exit-worktree-DGNYMECB.js → exit-worktree-GXMI4ATY.js} +47 -48
- package/chunks/exitPlanMode-34UVY7M6.js +72 -0
- package/chunks/{fast-path-JJZFJANL.js → fast-path-VPIVA7L6.js} +16 -6
- package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
- package/chunks/{gemini-QS36EBZV.js → gemini-4BWIK4WD.js} +102 -99
- package/chunks/{geminiContentGenerator-AG4KB6CV.js → geminiContentGenerator-3XVV5MSS.js} +40 -11
- package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
- package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
- package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
- package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
- package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
- package/chunks/{glob-V7R3PSK3.js → glob-TZ2ABCJG.js} +47 -48
- package/chunks/{grep-QYPSK7OP.js → grep-BEF463NA.js} +49 -49
- package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
- package/chunks/i18n-FMM5FDXR.js +96 -0
- package/chunks/{image-gen-Z3VPGKRC.js → image-gen-HHVLF7HS.js} +12 -12
- package/chunks/initializer-625TIAIO.js +85 -0
- package/chunks/installationInfo-6AM4I2Y3.js +79 -0
- package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
- package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
- package/chunks/lib-RUF3WZA6.js +9 -0
- package/chunks/list-L2GA674Y.js +88 -0
- package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
- package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
- package/chunks/{loggingContentGenerator-HS3S5H3Q.js → loggingContentGenerator-LKOF7XI7.js} +78 -113
- package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
- package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
- package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
- package/chunks/{managed-npm-update-JYEMMXA3.js → managed-npm-update-ACQGGIN5.js} +47 -48
- package/chunks/mcp-SZLHKFJW.js +82 -0
- package/chunks/{monitor-R3ODH5U6.js → monitor-DF52UVHI.js} +47 -48
- package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
- package/chunks/{notebook-edit-BNOK452R.js → notebook-edit-FCWS4XVN.js} +47 -48
- package/chunks/{openaiContentGenerator-WMCU3O2H.js → openaiContentGenerator-7LDK3DCJ.js} +26 -27
- package/chunks/pidfile-6ERW3DF4.js +85 -0
- package/chunks/process-registry-2CHQBXH5.js +157 -0
- package/chunks/{processUtils-RT7UNCC2.js → processUtils-COKZAMUP.js} +2 -2
- package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
- package/chunks/{qwenContentGenerator-HHCRK4SX.js → qwenContentGenerator-TKWUMR7N.js} +52 -53
- package/chunks/{qwenOAuth2-OWLB5AKH.js → qwenOAuth2-7HMU47SF.js} +10 -10
- package/chunks/read-file-X6DRC574.js +29 -0
- package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
- package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
- package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
- package/chunks/ripGrep-OWV2IVJC.js +72 -0
- package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
- package/chunks/{run-qwen-serve-FU6HEM4J.js → run-qwen-serve-TSTCO4XE.js} +953 -249
- package/chunks/{runtime-XXRRTNP6.js → runtime-DAUPSUKI.js} +56 -56
- package/chunks/{scheduler-G2ZS2Z7E.js → scheduler-KMADMT26.js} +46 -47
- package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
- package/chunks/{sdk-exporters-http-FYBSUCPD.js → sdk-exporters-http-WO556XNU.js} +7 -7
- package/chunks/{sdk-impl-GMVPB7NB.js → sdk-impl-LPAVACSF.js} +14 -14
- package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
- package/chunks/serve-NNRWS6F4.js +88 -0
- package/chunks/{server-4UMH7OIZ.js → server-WEH7DVCH.js} +3691 -823
- package/chunks/{session-K3O3Q2SV.js → session-WXC56V2I.js} +98 -95
- package/chunks/{settings-CR2EWTBA.js → settings-DJDXFDZ3.js} +55 -56
- package/chunks/shell-JN5VRQXD.js +82 -0
- package/chunks/{skill-I3SDA4MB.js → skill-SGXPKJCS.js} +20 -21
- package/chunks/skill-settings-VJ5PDMZI.js +90 -0
- package/chunks/spawnChannel-ETMJW7YX.js +81 -0
- package/chunks/standalone-update-MK3Z7KBI.js +91 -0
- package/chunks/{startInteractiveUI-SLZGHRPH.js → startInteractiveUI-ZCGIXPGT.js} +724 -383
- package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
- package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
- package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
- package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
- package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
- package/chunks/{team-create-YJALH5D2.js → team-create-QQGAJG7P.js} +49 -50
- package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
- package/chunks/{team-plan-approval-34QFYKGN.js → team-plan-approval-RT7Q5R6O.js} +47 -48
- package/chunks/theme-manager-EEWIQJ7J.js +76 -0
- package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
- package/chunks/{tool-search-NF7GB6LE.js → tool-search-Z3Z4AYKP.js} +19 -21
- package/chunks/total-session-admission-44JKRWQD.js +84 -0
- package/chunks/trustedFolders-X2JEIO57.js +94 -0
- package/chunks/{update-relaunch-WBUZJC5O.js → update-relaunch-VWNPYDIP.js} +5 -5
- package/chunks/updateCheck-KAQH67DV.js +91 -0
- package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
- package/chunks/{validateNonInterActiveAuth-3R223G3R.js → validateNonInterActiveAuth-GIUJ2UFS.js} +93 -90
- package/chunks/{version-HS7YSFHV.js → version-BGLYIJUY.js} +1 -1
- package/chunks/{web-fetch-NKCSG7ZE.js → web-fetch-OTDU4VQF.js} +19 -21
- package/chunks/{web-search-S62WAP4S.js → web-search-FP6SIHPR.js} +13 -13
- package/chunks/{workflow-QAGU5RU4.js → workflow-YCIVBYSB.js} +48 -49
- package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
- package/chunks/{workspace-registration-store-24JMHDGF.js → workspace-registration-store-OTMS3H4C.js} +1 -1
- package/chunks/workspace-registry-O63R6IZ4.js +92 -0
- package/chunks/workspace-service-M6LLHKJ5.js +99 -0
- package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
- package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
- package/chunks/write-file-3BZC3EAE.js +72 -0
- package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
- package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
- package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
- package/chunks/zoom-image-TZ6S2O57.js +351 -0
- package/cli.js +13 -13
- package/locales/ca.js +7 -2
- package/locales/de.js +7 -2
- package/locales/en.js +10 -2
- package/locales/fr.js +7 -2
- package/locales/ja.js +7 -2
- package/locales/pt.js +7 -2
- package/locales/ru.js +7 -2
- package/locales/zh-TW.js +10 -2
- package/locales/zh.js +10 -2
- package/package.json +5 -4
- package/web-shell/assets/{arc-DcbWnB9T.js → arc-75-Wdeo3.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-kMMF5sud.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-Htl9vTJS.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BnZnm0mQ.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
- package/web-shell/assets/channel-DPYMT76A.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DziB7kDG.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-CmkD8daw.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-CHAd9A_U.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Dqaam3fE.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-D_-saBYM.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-B9r_veWD.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-B3EaCSpL.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CYq8x9mn.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-D0ng4uiB.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DCZollQv.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-Dfk2pWS0.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-kX38ltWR.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CJz2vsXh.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BvMLZm_7.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-l7kfStkO.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BSVa8GGT.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CoawKIXH.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFUDH0zF.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Y2pvpT4e.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
- package/web-shell/assets/{index-D0GX0zZf.js → index-CKIadvET.js} +1 -1
- package/web-shell/assets/index-D1eXNRHe.js +1389 -0
- package/web-shell/assets/index-DVLD4CQq.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CU8_zLiX.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AVQiV0DU.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DQ0VSKa3.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BqnWqsE_.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
- package/web-shell/assets/{linear-BkoihsaA.js → linear-Dpigcc62.js} +1 -1
- package/web-shell/assets/{mermaid.core-5RJs-31j.js → mermaid.core-Ct97pqgW.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D33Bxnpd.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BuEAw3BH.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Kox_usEq.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CNjeUif0.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BCd2OL_U.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CF2ZTsz0.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-qenSzHtm.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-B5DyWdgs.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DqP4I_o_.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CJe2e4mg.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BMDSw-Rr.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BTVZYkxD.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-5DPPWPGT.js +0 -85
- package/chunks/agent-6ODUANDO.js +0 -81
- package/chunks/agent-headless-7BYQTMHW.js +0 -75
- package/chunks/bridge-ZUB64FAE.js +0 -90
- package/chunks/chunk-LEH5C7FV.js +0 -232
- package/chunks/chunk-SZRN75WQ.js +0 -29
- package/chunks/chunk-UGYMA4EI.js +0 -219
- package/chunks/chunk-Z2BC6UJ5.js +0 -8575
- package/chunks/contextCommand-JLHYA34Z.js +0 -80
- package/chunks/daemon-status-provider-2233Q37D.js +0 -89
- package/chunks/earlyInputCapture-A7NDU3PF.js +0 -82
- package/chunks/errors-M7CLORXH.js +0 -88
- package/chunks/exitPlanMode-GXTBWQAR.js +0 -403
- package/chunks/handleAutoUpdate-6DBEZYPV.js +0 -81
- package/chunks/i18n-VUJJZIMU.js +0 -97
- package/chunks/initializer-UWAK5U5O.js +0 -86
- package/chunks/installationInfo-6O2YAA52.js +0 -80
- package/chunks/list-GB4ESM3T.js +0 -89
- package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +0 -83
- package/chunks/mcp-6DBDJPFU.js +0 -83
- package/chunks/nonInteractiveCli-MOYCYBBU.js +0 -141
- package/chunks/pidfile-TFRZZZIO.js +0 -86
- package/chunks/read-file-APMO3PSX.js +0 -31
- package/chunks/resumeHistoryUtils-6KRYEAWZ.js +0 -91
- package/chunks/ripGrep-BEJDEDXW.js +0 -73
- package/chunks/serve-7BSTXJ4T.js +0 -89
- package/chunks/shell-HH3PF3A2.js +0 -83
- package/chunks/spawnChannel-RWNDBXGA.js +0 -82
- package/chunks/src-GE4TTTML.js +0 -3147
- package/chunks/standalone-update-Q6WFRZZQ.js +0 -92
- package/chunks/theme-manager-SWRILQHI.js +0 -77
- package/chunks/total-session-admission-DLHHHLD3.js +0 -84
- package/chunks/trustedFolders-KHXHY6PY.js +0 -93
- package/chunks/updateCheck-RKL6M5XN.js +0 -92
- package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +0 -93
- package/chunks/workspace-providers-status-QSVZUETE.js +0 -86
- package/chunks/workspace-registry-UT4RBNBM.js +0 -88
- package/chunks/workspace-service-JFWRUS4V.js +0 -98
- package/chunks/workspace-skills-status-ZBBKJOI2.js +0 -85
- package/chunks/write-file-VHIXW5M7.js +0 -73
- package/web-shell/assets/channel-Cq7YKtfC.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +0 -1
- package/web-shell/assets/index-D9haPt0X.css +0 -5
- package/web-shell/assets/index-ckX9Pq5k.js +0 -1230
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +0 -1
- package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
- package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
- /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
|
@@ -5,28 +5,34 @@ import {
|
|
|
5
5
|
} from "./chunk-VGC4I5JJ.js";
|
|
6
6
|
import {
|
|
7
7
|
isAnyAutoMemPath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SGFT55XI.js";
|
|
9
|
+
import {
|
|
10
|
+
STRUCTURED_OUTPUT_REDACTED_ARGS
|
|
11
|
+
} from "./chunk-Y4IHBGBP.js";
|
|
12
|
+
import {
|
|
13
|
+
BaseDeclarativeTool,
|
|
14
|
+
BaseToolInvocation,
|
|
15
|
+
SchemaValidator,
|
|
16
|
+
ToolDisplayNames,
|
|
17
|
+
ToolNames
|
|
18
|
+
} from "./chunk-Y6AXW2OG.js";
|
|
9
19
|
import {
|
|
10
20
|
DEFAULT_QWEN_MODEL
|
|
11
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VCPIZRYH.js";
|
|
12
22
|
import {
|
|
13
23
|
estimateTextTokens,
|
|
14
24
|
generateLegacyMcpToolName,
|
|
15
25
|
normalizeToolNameForProvider
|
|
16
26
|
} from "./chunk-46UV252V.js";
|
|
17
|
-
import {
|
|
18
|
-
require_lib
|
|
19
|
-
} from "./chunk-A4UCTEB5.js";
|
|
20
27
|
import {
|
|
21
28
|
normalize
|
|
22
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZBVS26BY.js";
|
|
23
30
|
import {
|
|
24
31
|
InstallationManager
|
|
25
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-A3NDJ5SB.js";
|
|
26
33
|
import {
|
|
27
|
-
atomicWriteFile
|
|
28
|
-
|
|
29
|
-
} from "./chunk-A5L3JMUA.js";
|
|
34
|
+
atomicWriteFile
|
|
35
|
+
} from "./chunk-7XATOOE7.js";
|
|
30
36
|
import {
|
|
31
37
|
isTelemetrySdkInitialized,
|
|
32
38
|
recordApiErrorMetrics,
|
|
@@ -47,10 +53,11 @@ import {
|
|
|
47
53
|
recordSubagentExecutionMetrics,
|
|
48
54
|
recordTokenUsageMetrics,
|
|
49
55
|
recordToolCallMetrics
|
|
50
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-BGTQCTQW.js";
|
|
51
57
|
import {
|
|
52
|
-
require_src
|
|
53
|
-
|
|
58
|
+
require_src,
|
|
59
|
+
safeJsonStringify
|
|
60
|
+
} from "./chunk-W4RQUHY3.js";
|
|
54
61
|
import {
|
|
55
62
|
EVENT_API_CANCEL,
|
|
56
63
|
EVENT_API_ERROR,
|
|
@@ -72,7 +79,6 @@ import {
|
|
|
72
79
|
EVENT_EXTENSION_UNINSTALL,
|
|
73
80
|
EVENT_EXTENSION_UPDATE,
|
|
74
81
|
EVENT_FILE_OPERATION,
|
|
75
|
-
EVENT_FLASH_FALLBACK,
|
|
76
82
|
EVENT_IDE_CONNECTION,
|
|
77
83
|
EVENT_MEMORY_DREAM,
|
|
78
84
|
EVENT_MEMORY_EXTRACT,
|
|
@@ -94,23 +100,8 @@ import {
|
|
|
94
100
|
EVENT_USER_RETRY,
|
|
95
101
|
EVENT_WORKFLOW_KEYWORD,
|
|
96
102
|
EVENT_WORKFLOW_RUN,
|
|
97
|
-
SERVICE_NAME
|
|
98
|
-
|
|
99
|
-
} from "./chunk-BULDBTYC.js";
|
|
100
|
-
import {
|
|
101
|
-
SemanticAttributes,
|
|
102
|
-
init_esm
|
|
103
|
-
} from "./chunk-U7ZFW55U.js";
|
|
104
|
-
import {
|
|
105
|
-
STRUCTURED_OUTPUT_REDACTED_ARGS
|
|
106
|
-
} from "./chunk-UUUTRMI2.js";
|
|
107
|
-
import {
|
|
108
|
-
BaseDeclarativeTool,
|
|
109
|
-
BaseToolInvocation,
|
|
110
|
-
SchemaValidator,
|
|
111
|
-
ToolDisplayNames,
|
|
112
|
-
ToolNames
|
|
113
|
-
} from "./chunk-PR75REBZ.js";
|
|
103
|
+
SERVICE_NAME
|
|
104
|
+
} from "./chunk-S7W2GKIO.js";
|
|
114
105
|
import {
|
|
115
106
|
Storage,
|
|
116
107
|
createDebugLogger,
|
|
@@ -121,7 +112,11 @@ import {
|
|
|
121
112
|
makeRelative,
|
|
122
113
|
shortenPath,
|
|
123
114
|
unescapePath
|
|
124
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-UHUSJ6X7.js";
|
|
116
|
+
import {
|
|
117
|
+
SemanticAttributes,
|
|
118
|
+
init_esm
|
|
119
|
+
} from "./chunk-VOQXFAY5.js";
|
|
125
120
|
import {
|
|
126
121
|
require_dist
|
|
127
122
|
} from "./chunk-75DOP5OR.js";
|
|
@@ -5697,7 +5692,7 @@ var require_utils = __commonJS({
|
|
|
5697
5692
|
});
|
|
5698
5693
|
|
|
5699
5694
|
// node_modules/chardet/lib/index.js
|
|
5700
|
-
var
|
|
5695
|
+
var require_lib = __commonJS({
|
|
5701
5696
|
"node_modules/chardet/lib/index.js"(exports) {
|
|
5702
5697
|
"use strict";
|
|
5703
5698
|
init_esbuild_shims();
|
|
@@ -7399,7 +7394,7 @@ var require_lru_cache = __commonJS({
|
|
|
7399
7394
|
|
|
7400
7395
|
// packages/core/src/tools/read-file.ts
|
|
7401
7396
|
init_esbuild_shims();
|
|
7402
|
-
import
|
|
7397
|
+
import path9 from "node:path";
|
|
7403
7398
|
import fs6 from "node:fs/promises";
|
|
7404
7399
|
|
|
7405
7400
|
// packages/core/src/utils/fileUtils.ts
|
|
@@ -7830,12 +7825,12 @@ var Mime = class {
|
|
|
7830
7825
|
}
|
|
7831
7826
|
return this;
|
|
7832
7827
|
}
|
|
7833
|
-
getType(
|
|
7834
|
-
if (typeof
|
|
7828
|
+
getType(path10) {
|
|
7829
|
+
if (typeof path10 !== "string")
|
|
7835
7830
|
return null;
|
|
7836
|
-
const last =
|
|
7831
|
+
const last = path10.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
7837
7832
|
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
7838
|
-
const hasPath = last.length <
|
|
7833
|
+
const hasPath = last.length < path10.length;
|
|
7839
7834
|
const hasDot = ext.length < last.length - 1;
|
|
7840
7835
|
if (!hasDot && hasPath)
|
|
7841
7836
|
return null;
|
|
@@ -7875,28 +7870,34 @@ var Mime_default = Mime;
|
|
|
7875
7870
|
// packages/core/node_modules/mime/dist/src/index_lite.js
|
|
7876
7871
|
var index_lite_default = new Mime_default(standard_default)._freeze();
|
|
7877
7872
|
|
|
7878
|
-
// packages/core/src/utils/
|
|
7873
|
+
// packages/core/src/utils/encoding.ts
|
|
7879
7874
|
init_esbuild_shims();
|
|
7880
|
-
var import_iconv_lite = __toESM(require_lib(), 1);
|
|
7881
|
-
var iconvLite = import_iconv_lite.default;
|
|
7882
|
-
function iconvDecode(buffer, encoding) {
|
|
7883
|
-
return iconvLite.decode(buffer, encoding);
|
|
7884
|
-
}
|
|
7885
|
-
__name(iconvDecode, "iconvDecode");
|
|
7886
|
-
function iconvEncode(content, encoding) {
|
|
7887
|
-
return iconvLite.encode(content, encoding);
|
|
7888
|
-
}
|
|
7889
|
-
__name(iconvEncode, "iconvEncode");
|
|
7890
|
-
function iconvEncodingExists(encoding) {
|
|
7891
|
-
return iconvLite.encodingExists(encoding);
|
|
7892
|
-
}
|
|
7893
|
-
__name(iconvEncodingExists, "iconvEncodingExists");
|
|
7894
7875
|
function isUtf8CompatibleEncoding(encoding) {
|
|
7895
7876
|
const lower = encoding.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
7896
7877
|
return lower === "utf8" || lower === "ascii" || lower === "usascii";
|
|
7897
7878
|
}
|
|
7898
7879
|
__name(isUtf8CompatibleEncoding, "isUtf8CompatibleEncoding");
|
|
7899
7880
|
|
|
7881
|
+
// packages/core/src/utils/load-iconv-lite.ts
|
|
7882
|
+
init_esbuild_shims();
|
|
7883
|
+
var iconvLiteModulePromise;
|
|
7884
|
+
function isIconvLite(candidate) {
|
|
7885
|
+
return "decode" in candidate && typeof candidate.decode === "function" && "encode" in candidate && typeof candidate.encode === "function" && "encodingExists" in candidate && typeof candidate.encodingExists === "function";
|
|
7886
|
+
}
|
|
7887
|
+
__name(isIconvLite, "isIconvLite");
|
|
7888
|
+
function loadIconvLite() {
|
|
7889
|
+
iconvLiteModulePromise ??= import("./lib-RUF3WZA6.js").then((module) => {
|
|
7890
|
+
const imported = module;
|
|
7891
|
+
const candidate = "default" in imported && imported.default ? imported.default : imported;
|
|
7892
|
+
if (!isIconvLite(candidate)) {
|
|
7893
|
+
throw new Error("iconv-lite module does not match the expected API");
|
|
7894
|
+
}
|
|
7895
|
+
return candidate;
|
|
7896
|
+
});
|
|
7897
|
+
return iconvLiteModulePromise;
|
|
7898
|
+
}
|
|
7899
|
+
__name(loadIconvLite, "loadIconvLite");
|
|
7900
|
+
|
|
7900
7901
|
// packages/core/src/utils/ignorePatterns.ts
|
|
7901
7902
|
init_esbuild_shims();
|
|
7902
7903
|
import path from "node:path";
|
|
@@ -8106,16 +8107,12 @@ var BINARY_EXTENSIONS = [
|
|
|
8106
8107
|
|
|
8107
8108
|
// packages/core/src/utils/systemEncoding.ts
|
|
8108
8109
|
init_esbuild_shims();
|
|
8109
|
-
var import_chardet = __toESM(
|
|
8110
|
+
var import_chardet = __toESM(require_lib(), 1);
|
|
8110
8111
|
import { isUtf8 } from "node:buffer";
|
|
8111
8112
|
import { execSync } from "node:child_process";
|
|
8112
8113
|
import os from "node:os";
|
|
8113
8114
|
var debugLogger = createDebugLogger("ENCODING");
|
|
8114
8115
|
var cachedSystemEncoding = void 0;
|
|
8115
|
-
function resetEncodingCache() {
|
|
8116
|
-
cachedSystemEncoding = void 0;
|
|
8117
|
-
}
|
|
8118
|
-
__name(resetEncodingCache, "resetEncodingCache");
|
|
8119
8116
|
function getCachedEncodingForBuffer(buffer) {
|
|
8120
8117
|
if (isUtf8(buffer)) {
|
|
8121
8118
|
return "utf-8";
|
|
@@ -9068,7 +9065,6 @@ __name(detectLineEndingFromContent, "detectLineEndingFromContent");
|
|
|
9068
9065
|
|
|
9069
9066
|
// packages/core/src/utils/fileUtils.ts
|
|
9070
9067
|
var debugLogger2 = createDebugLogger("FILE_UTILS");
|
|
9071
|
-
var DEFAULT_ENCODING = "utf-8";
|
|
9072
9068
|
var PDF_FULL_TEXT_EXTRACTION_MAX_MB = 100;
|
|
9073
9069
|
var PDF_PAGED_TEXT_EXTRACTION_MAX_MB = 512;
|
|
9074
9070
|
function detectBOM(buf) {
|
|
@@ -9127,7 +9123,7 @@ function isValidUtf8(buffer) {
|
|
|
9127
9123
|
}
|
|
9128
9124
|
}
|
|
9129
9125
|
__name(isValidUtf8, "isValidUtf8");
|
|
9130
|
-
function
|
|
9126
|
+
async function decodeBufferWithEncodingInfoAsync(full) {
|
|
9131
9127
|
if (full.length === 0) {
|
|
9132
9128
|
return { content: "", encoding: "utf-8", bom: false };
|
|
9133
9129
|
}
|
|
@@ -9147,9 +9143,10 @@ function decodeBufferWithEncodingInfo(full) {
|
|
|
9147
9143
|
const detected = detectEncodingFromBuffer(full);
|
|
9148
9144
|
if (detected && !isUtf8CompatibleEncoding(detected)) {
|
|
9149
9145
|
try {
|
|
9150
|
-
|
|
9146
|
+
const iconvLite = await loadIconvLite();
|
|
9147
|
+
if (iconvLite.encodingExists(detected)) {
|
|
9151
9148
|
return {
|
|
9152
|
-
content:
|
|
9149
|
+
content: iconvLite.decode(full, detected),
|
|
9153
9150
|
encoding: detected,
|
|
9154
9151
|
bom: false
|
|
9155
9152
|
};
|
|
@@ -9162,7 +9159,7 @@ function decodeBufferWithEncodingInfo(full) {
|
|
|
9162
9159
|
}
|
|
9163
9160
|
return { content: full.toString("utf8"), encoding: "utf-8", bom: false };
|
|
9164
9161
|
}
|
|
9165
|
-
__name(
|
|
9162
|
+
__name(decodeBufferWithEncodingInfoAsync, "decodeBufferWithEncodingInfoAsync");
|
|
9166
9163
|
function decodeBOMBuffer(buf, bomInfo) {
|
|
9167
9164
|
const content = buf.subarray(bomInfo.bomLength);
|
|
9168
9165
|
switch (bomInfo.encoding) {
|
|
@@ -9203,7 +9200,7 @@ async function readFileWithEncodingInfo(filePath, signal) {
|
|
|
9203
9200
|
filePath,
|
|
9204
9201
|
signal === void 0 ? void 0 : { signal }
|
|
9205
9202
|
);
|
|
9206
|
-
return
|
|
9203
|
+
return await decodeBufferWithEncodingInfoAsync(full);
|
|
9207
9204
|
}
|
|
9208
9205
|
__name(readFileWithEncodingInfo, "readFileWithEncodingInfo");
|
|
9209
9206
|
async function readFileWithEncoding(filePath) {
|
|
@@ -11232,6 +11229,12 @@ var createInitialSkillMetrics = /* @__PURE__ */ __name(() => ({
|
|
|
11232
11229
|
totalFail: 0,
|
|
11233
11230
|
byName: {}
|
|
11234
11231
|
}), "createInitialSkillMetrics");
|
|
11232
|
+
var createInitialGenerationMetrics = /* @__PURE__ */ __name(() => ({
|
|
11233
|
+
timedRequests: 0,
|
|
11234
|
+
totalTtftMs: 0,
|
|
11235
|
+
totalGenerationDurationMs: 0,
|
|
11236
|
+
totalThroughputOutputTokens: 0
|
|
11237
|
+
}), "createInitialGenerationMetrics");
|
|
11235
11238
|
var createInitialMetrics = /* @__PURE__ */ __name(() => ({
|
|
11236
11239
|
models: {},
|
|
11237
11240
|
tools: {
|
|
@@ -11376,6 +11379,23 @@ var UiTelemetryService = class _UiTelemetryService extends EventEmitter {
|
|
|
11376
11379
|
bucket.tokens.cached += event.cached_content_token_count;
|
|
11377
11380
|
bucket.tokens.thoughts += event.thoughts_token_count;
|
|
11378
11381
|
}
|
|
11382
|
+
if (event.ttft_ms === void 0 || !Number.isFinite(event.ttft_ms) || event.ttft_ms < 0 || isInternalPromptId(event.prompt_id)) {
|
|
11383
|
+
return;
|
|
11384
|
+
}
|
|
11385
|
+
const generation = metrics.generation ?? (metrics.generation = createInitialGenerationMetrics());
|
|
11386
|
+
const generationDurationMs = Math.max(0, event.duration_ms - event.ttft_ms);
|
|
11387
|
+
generation.timedRequests++;
|
|
11388
|
+
generation.totalTtftMs += event.ttft_ms;
|
|
11389
|
+
if (generationDurationMs > 0) {
|
|
11390
|
+
generation.totalGenerationDurationMs += generationDurationMs;
|
|
11391
|
+
generation.totalThroughputOutputTokens += event.output_token_count;
|
|
11392
|
+
}
|
|
11393
|
+
generation.last = {
|
|
11394
|
+
model: event.model,
|
|
11395
|
+
ttftMs: event.ttft_ms,
|
|
11396
|
+
generationDurationMs,
|
|
11397
|
+
outputTokens: event.output_token_count
|
|
11398
|
+
};
|
|
11379
11399
|
}
|
|
11380
11400
|
#accumulateApiError(metrics, event) {
|
|
11381
11401
|
const modelMetrics = this.#getOrCreateModelMetrics(metrics, event.model);
|
|
@@ -11678,10 +11698,6 @@ async function read(filePath, options = {}) {
|
|
|
11678
11698
|
}
|
|
11679
11699
|
__name(read, "read");
|
|
11680
11700
|
var ensuredDirs = /* @__PURE__ */ new Set();
|
|
11681
|
-
function _resetEnsuredDirsCacheForTest() {
|
|
11682
|
-
ensuredDirs.clear();
|
|
11683
|
-
}
|
|
11684
|
-
__name(_resetEnsuredDirsCacheForTest, "_resetEnsuredDirsCacheForTest");
|
|
11685
11701
|
async function writeLine(filePath, data) {
|
|
11686
11702
|
const lock = getFileLock(filePath);
|
|
11687
11703
|
await lock.runExclusive(async () => {
|
|
@@ -11708,42 +11724,6 @@ function writeLineSync(filePath, data) {
|
|
|
11708
11724
|
fs4.appendFileSync(filePath, Buffer.from(line, "utf8"), { flush: true });
|
|
11709
11725
|
}
|
|
11710
11726
|
__name(writeLineSync, "writeLineSync");
|
|
11711
|
-
function write(filePath, data) {
|
|
11712
|
-
const lines = data.map((item) => `${JSON.stringify(item)}
|
|
11713
|
-
`).join("");
|
|
11714
|
-
const dir = path5.dirname(filePath);
|
|
11715
|
-
if (!fs4.existsSync(dir)) {
|
|
11716
|
-
fs4.mkdirSync(dir, { recursive: true });
|
|
11717
|
-
}
|
|
11718
|
-
atomicWriteFileSync(filePath, lines, { encoding: "utf8" });
|
|
11719
|
-
}
|
|
11720
|
-
__name(write, "write");
|
|
11721
|
-
async function countLines(filePath) {
|
|
11722
|
-
let fileStream;
|
|
11723
|
-
let rl;
|
|
11724
|
-
try {
|
|
11725
|
-
fileStream = fs4.createReadStream(filePath);
|
|
11726
|
-
rl = readline.createInterface({
|
|
11727
|
-
input: fileStream,
|
|
11728
|
-
crlfDelay: Infinity
|
|
11729
|
-
});
|
|
11730
|
-
let count = 0;
|
|
11731
|
-
for await (const line of rl) {
|
|
11732
|
-
if (line.trim().length > 0) {
|
|
11733
|
-
count++;
|
|
11734
|
-
}
|
|
11735
|
-
}
|
|
11736
|
-
return count;
|
|
11737
|
-
} catch (error) {
|
|
11738
|
-
if (error.code !== "ENOENT") {
|
|
11739
|
-
debugLogger3.error(`Error counting lines in ${filePath}:`, error);
|
|
11740
|
-
}
|
|
11741
|
-
return 0;
|
|
11742
|
-
} finally {
|
|
11743
|
-
await closeLineReader(rl, fileStream);
|
|
11744
|
-
}
|
|
11745
|
-
}
|
|
11746
|
-
__name(countLines, "countLines");
|
|
11747
11727
|
function exists(filePath) {
|
|
11748
11728
|
try {
|
|
11749
11729
|
const stats = fs4.statSync(filePath);
|
|
@@ -11997,11 +11977,6 @@ function summarizeRecords(period, value, records) {
|
|
|
11997
11977
|
};
|
|
11998
11978
|
}
|
|
11999
11979
|
__name(summarizeRecords, "summarizeRecords");
|
|
12000
|
-
async function recordTokenUsageFromApiResponse(config, event) {
|
|
12001
|
-
const record = apiResponseEventToTokenUsageRecord(config, event);
|
|
12002
|
-
await writeLine(getTokenUsageFilePath(record.localMonth), record);
|
|
12003
|
-
}
|
|
12004
|
-
__name(recordTokenUsageFromApiResponse, "recordTokenUsageFromApiResponse");
|
|
12005
11980
|
var lastLoggedTimeByCode = /* @__PURE__ */ new Map();
|
|
12006
11981
|
var suppressedCountByCode = /* @__PURE__ */ new Map();
|
|
12007
11982
|
var TOKEN_USAGE_FAILURE_LOG_COOLDOWN_MS = 6e4;
|
|
@@ -12137,12 +12112,6 @@ function formatTokenUsageSummaryAsJson(summary) {
|
|
|
12137
12112
|
`;
|
|
12138
12113
|
}
|
|
12139
12114
|
__name(formatTokenUsageSummaryAsJson, "formatTokenUsageSummaryAsJson");
|
|
12140
|
-
async function exportTokenUsageSummary(options) {
|
|
12141
|
-
const summary = await queryTokenUsage(options);
|
|
12142
|
-
return options.format === "json" ? formatTokenUsageSummaryAsJson(summary) : `${formatTokenUsageSummaryAsCsv(summary)}
|
|
12143
|
-
`;
|
|
12144
|
-
}
|
|
12145
|
-
__name(exportTokenUsageSummary, "exportTokenUsageSummary");
|
|
12146
12115
|
|
|
12147
12116
|
// packages/core/src/utils/chat-recording-suppression-context.ts
|
|
12148
12117
|
init_esbuild_shims();
|
|
@@ -12359,23 +12328,6 @@ function logApiRequest(config, event) {
|
|
|
12359
12328
|
logger.emit(logRecord);
|
|
12360
12329
|
}
|
|
12361
12330
|
__name(logApiRequest, "logApiRequest");
|
|
12362
|
-
function logFlashFallback(config, event) {
|
|
12363
|
-
QwenLogger.getInstance(config)?.logFlashFallbackEvent(event);
|
|
12364
|
-
if (!isTelemetrySdkInitialized()) return;
|
|
12365
|
-
const attributes = {
|
|
12366
|
-
...getCommonAttributes(config),
|
|
12367
|
-
...event,
|
|
12368
|
-
"event.name": EVENT_FLASH_FALLBACK,
|
|
12369
|
-
"event.timestamp": (/* @__PURE__ */ new Date()).toISOString()
|
|
12370
|
-
};
|
|
12371
|
-
const logger = import_api_logs.logs.getLogger(SERVICE_NAME);
|
|
12372
|
-
const logRecord = {
|
|
12373
|
-
body: `Switching to flash as Fallback.`,
|
|
12374
|
-
attributes
|
|
12375
|
-
};
|
|
12376
|
-
logger.emit(logRecord);
|
|
12377
|
-
}
|
|
12378
|
-
__name(logFlashFallback, "logFlashFallback");
|
|
12379
12331
|
function logRipgrepFallback(config, event) {
|
|
12380
12332
|
QwenLogger.getInstance(config)?.logRipgrepFallbackEvent(event);
|
|
12381
12333
|
if (!isTelemetrySdkInitialized()) return;
|
|
@@ -13217,22 +13169,26 @@ async function truncateAndSaveToFile(content, fileName, projectTempDir, threshol
|
|
|
13217
13169
|
const separator = "\n\n---\n... [CONTENT TRUNCATED] ...\n---\n\n";
|
|
13218
13170
|
const ellipsis = "...";
|
|
13219
13171
|
const previewBudget = Math.max(0, previewChars);
|
|
13220
|
-
const
|
|
13172
|
+
const sep = previewBudget > separator.length ? separator : "";
|
|
13173
|
+
const contentBudget = previewBudget - sep.length;
|
|
13174
|
+
const headBudget = keep === "head" ? contentBudget : keep === "tail" ? 0 : Math.floor(contentBudget / 5);
|
|
13221
13175
|
const beginning = [];
|
|
13222
13176
|
let headChars = 0;
|
|
13223
13177
|
for (let i = 0; i < Math.min(headCount, lines.length); i++) {
|
|
13224
13178
|
const remaining = headBudget - headChars;
|
|
13225
13179
|
if (remaining <= 0) break;
|
|
13226
13180
|
if (lines[i].length + 1 > remaining) {
|
|
13227
|
-
|
|
13228
|
-
|
|
13181
|
+
if (remaining >= ellipsis.length) {
|
|
13182
|
+
const sliceLen = remaining - ellipsis.length;
|
|
13183
|
+
beginning.push(lines[i].slice(0, sliceLen) + ellipsis);
|
|
13184
|
+
}
|
|
13229
13185
|
headChars = headBudget;
|
|
13230
13186
|
break;
|
|
13231
13187
|
}
|
|
13232
13188
|
beginning.push(lines[i]);
|
|
13233
13189
|
headChars += lines[i].length + 1;
|
|
13234
13190
|
}
|
|
13235
|
-
const tailBudget = keep === "head" ? 0 : Math.max(
|
|
13191
|
+
const tailBudget = keep === "head" ? 0 : Math.max(contentBudget - headChars, 0);
|
|
13236
13192
|
const end = [];
|
|
13237
13193
|
let tailChars = 0;
|
|
13238
13194
|
const tailStart = Math.max(lines.length - tailCount, beginning.length);
|
|
@@ -13240,15 +13196,17 @@ async function truncateAndSaveToFile(content, fileName, projectTempDir, threshol
|
|
|
13240
13196
|
const remaining = tailBudget - tailChars;
|
|
13241
13197
|
if (remaining <= 0) break;
|
|
13242
13198
|
if (lines[i].length + 1 > remaining) {
|
|
13243
|
-
|
|
13244
|
-
|
|
13199
|
+
if (remaining >= ellipsis.length) {
|
|
13200
|
+
const sliceLen = remaining - ellipsis.length;
|
|
13201
|
+
end.unshift(ellipsis + (sliceLen > 0 ? lines[i].slice(-sliceLen) : ""));
|
|
13202
|
+
}
|
|
13245
13203
|
tailChars = tailBudget;
|
|
13246
13204
|
break;
|
|
13247
13205
|
}
|
|
13248
13206
|
end.unshift(lines[i]);
|
|
13249
13207
|
tailChars += lines[i].length + 1;
|
|
13250
13208
|
}
|
|
13251
|
-
const truncatedContent = keep === "head" ? beginning.join("\n") +
|
|
13209
|
+
const truncatedContent = keep === "head" ? beginning.join("\n") + sep : keep === "tail" ? sep + end.join("\n") : beginning.join("\n") + sep + end.join("\n");
|
|
13252
13210
|
const safeFileName = `${path7.basename(fileName)}.output`;
|
|
13253
13211
|
const outputFile = path7.join(projectTempDir, safeFileName);
|
|
13254
13212
|
const wrappedMessage = `${TOOL_OUTPUT_TRUNCATED_PREFIX}.
|
|
@@ -13478,12 +13436,6 @@ __name(buildStub, "buildStub");
|
|
|
13478
13436
|
|
|
13479
13437
|
// packages/core/src/tools/mcp-status.ts
|
|
13480
13438
|
init_esbuild_shims();
|
|
13481
|
-
var MCPServerStatus = /* @__PURE__ */ ((MCPServerStatus2) => {
|
|
13482
|
-
MCPServerStatus2["DISCONNECTED"] = "disconnected";
|
|
13483
|
-
MCPServerStatus2["CONNECTING"] = "connecting";
|
|
13484
|
-
MCPServerStatus2["CONNECTED"] = "connected";
|
|
13485
|
-
return MCPServerStatus2;
|
|
13486
|
-
})(MCPServerStatus || {});
|
|
13487
13439
|
var serverStatuses = /* @__PURE__ */ new Map();
|
|
13488
13440
|
var statusChangeListeners = [];
|
|
13489
13441
|
function addMCPStatusChangeListener(listener) {
|
|
@@ -13575,6 +13527,75 @@ function getInvocationContext() {
|
|
|
13575
13527
|
}
|
|
13576
13528
|
__name(getInvocationContext, "getInvocationContext");
|
|
13577
13529
|
|
|
13530
|
+
// packages/core/src/services/visionBridge/image-part-utils.ts
|
|
13531
|
+
init_esbuild_shims();
|
|
13532
|
+
function normalizeParts(input) {
|
|
13533
|
+
if (typeof input === "string") {
|
|
13534
|
+
return [{ text: input }];
|
|
13535
|
+
}
|
|
13536
|
+
if (Array.isArray(input)) {
|
|
13537
|
+
return input.map(
|
|
13538
|
+
(part) => typeof part === "string" ? { text: part } : part
|
|
13539
|
+
);
|
|
13540
|
+
}
|
|
13541
|
+
return [input];
|
|
13542
|
+
}
|
|
13543
|
+
__name(normalizeParts, "normalizeParts");
|
|
13544
|
+
function isImagePart(part) {
|
|
13545
|
+
const mimeType = part.inlineData?.mimeType;
|
|
13546
|
+
const data = part.inlineData?.data;
|
|
13547
|
+
return typeof mimeType === "string" && mimeType.startsWith("image/") && typeof data === "string" && data.length > 0;
|
|
13548
|
+
}
|
|
13549
|
+
__name(isImagePart, "isImagePart");
|
|
13550
|
+
function hasImageParts(input) {
|
|
13551
|
+
return normalizeParts(input).some(isImagePart);
|
|
13552
|
+
}
|
|
13553
|
+
__name(hasImageParts, "hasImageParts");
|
|
13554
|
+
function splitImageParts(input) {
|
|
13555
|
+
const imageParts = [];
|
|
13556
|
+
const nonImageParts = [];
|
|
13557
|
+
for (const part of normalizeParts(input)) {
|
|
13558
|
+
if (isImagePart(part)) {
|
|
13559
|
+
imageParts.push(part);
|
|
13560
|
+
} else {
|
|
13561
|
+
nonImageParts.push(part);
|
|
13562
|
+
}
|
|
13563
|
+
}
|
|
13564
|
+
return { imageParts, nonImageParts };
|
|
13565
|
+
}
|
|
13566
|
+
__name(splitImageParts, "splitImageParts");
|
|
13567
|
+
function replaceImagesWithText(input, text) {
|
|
13568
|
+
const result = [];
|
|
13569
|
+
let replaced = false;
|
|
13570
|
+
for (const part of normalizeParts(input)) {
|
|
13571
|
+
if (isImagePart(part)) {
|
|
13572
|
+
if (!replaced) {
|
|
13573
|
+
result.push({ text });
|
|
13574
|
+
replaced = true;
|
|
13575
|
+
}
|
|
13576
|
+
continue;
|
|
13577
|
+
}
|
|
13578
|
+
result.push(part);
|
|
13579
|
+
}
|
|
13580
|
+
if (!replaced) {
|
|
13581
|
+
result.push({ text });
|
|
13582
|
+
}
|
|
13583
|
+
return result;
|
|
13584
|
+
}
|
|
13585
|
+
__name(replaceImagesWithText, "replaceImagesWithText");
|
|
13586
|
+
function isUsableImagePart(part) {
|
|
13587
|
+
const data = part.inlineData?.data;
|
|
13588
|
+
if (typeof data !== "string" || data.length === 0) {
|
|
13589
|
+
return false;
|
|
13590
|
+
}
|
|
13591
|
+
return data.length <= VISION_BRIDGE_MAX_IMAGE_BASE64_BYTES;
|
|
13592
|
+
}
|
|
13593
|
+
__name(isUsableImagePart, "isUsableImagePart");
|
|
13594
|
+
function collectText(parts) {
|
|
13595
|
+
return parts.map((part) => typeof part.text === "string" ? part.text : "").filter((text) => text.length > 0).join("\n").trim();
|
|
13596
|
+
}
|
|
13597
|
+
__name(collectText, "collectText");
|
|
13598
|
+
|
|
13578
13599
|
// packages/core/src/tools/mcp-tool.ts
|
|
13579
13600
|
var debugLogger6 = createDebugLogger("MCP_TOOL");
|
|
13580
13601
|
var MCP_CONNECTION_ERROR_PATTERNS = [
|
|
@@ -13796,18 +13817,10 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
13796
13817
|
callToolResult
|
|
13797
13818
|
);
|
|
13798
13819
|
if (this.isMCPToolError(rawResponseParts)) {
|
|
13799
|
-
|
|
13820
|
+
return await this.buildMcpToolError(rawResponseParts, {
|
|
13800
13821
|
name: this.serverToolName,
|
|
13801
13822
|
args: this.params
|
|
13802
|
-
})
|
|
13803
|
-
return {
|
|
13804
|
-
llmContent: errorMessage,
|
|
13805
|
-
returnDisplay: `Error: MCP tool '${this.serverToolName}' reported an error.`,
|
|
13806
|
-
error: {
|
|
13807
|
-
message: errorMessage,
|
|
13808
|
-
type: "mcp_tool_error" /* MCP_TOOL_ERROR */
|
|
13809
|
-
}
|
|
13810
|
-
};
|
|
13823
|
+
});
|
|
13811
13824
|
}
|
|
13812
13825
|
const transformedParts = transformMcpContentToParts(rawResponseParts);
|
|
13813
13826
|
const truncated = await this.truncateTextParts(transformedParts);
|
|
@@ -13865,17 +13878,7 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
13865
13878
|
});
|
|
13866
13879
|
});
|
|
13867
13880
|
if (this.isMCPToolError(rawResponseParts)) {
|
|
13868
|
-
|
|
13869
|
-
functionCalls[0]
|
|
13870
|
-
)} with response: ${safeJsonStringify(rawResponseParts)}`;
|
|
13871
|
-
return {
|
|
13872
|
-
llmContent: errorMessage,
|
|
13873
|
-
returnDisplay: `Error: MCP tool '${this.serverToolName}' reported an error.`,
|
|
13874
|
-
error: {
|
|
13875
|
-
message: errorMessage,
|
|
13876
|
-
type: "mcp_tool_error" /* MCP_TOOL_ERROR */
|
|
13877
|
-
}
|
|
13878
|
-
};
|
|
13881
|
+
return await this.buildMcpToolError(rawResponseParts, functionCalls[0]);
|
|
13879
13882
|
}
|
|
13880
13883
|
const transformedParts = transformMcpContentToParts(rawResponseParts);
|
|
13881
13884
|
const truncated = await this.truncateTextParts(transformedParts);
|
|
@@ -13891,6 +13894,34 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
|
|
|
13891
13894
|
return this.handleReconnectOnError(error, signal);
|
|
13892
13895
|
}
|
|
13893
13896
|
}
|
|
13897
|
+
async buildMcpToolError(rawResponseParts, functionCall) {
|
|
13898
|
+
const imageContent = getMcpErrorImageContent(rawResponseParts);
|
|
13899
|
+
let llmContent;
|
|
13900
|
+
let errorMessage;
|
|
13901
|
+
let persistedOutputFiles;
|
|
13902
|
+
if (imageContent) {
|
|
13903
|
+
const truncatedContent = await this.truncateTextParts(imageContent);
|
|
13904
|
+
llmContent = truncatedContent.parts;
|
|
13905
|
+
persistedOutputFiles = truncatedContent.persistedOutputFiles;
|
|
13906
|
+
errorMessage = `MCP tool '${this.serverToolName}' reported tool error for function call: ${safeJsonStringify(
|
|
13907
|
+
functionCall
|
|
13908
|
+
)} with response: ${getDisplayFromParts(truncatedContent.parts)}`;
|
|
13909
|
+
} else {
|
|
13910
|
+
errorMessage = `MCP tool '${this.serverToolName}' reported tool error for function call: ${safeJsonStringify(
|
|
13911
|
+
functionCall
|
|
13912
|
+
)} with response: ${safeJsonStringify(rawResponseParts)}`;
|
|
13913
|
+
llmContent = errorMessage;
|
|
13914
|
+
}
|
|
13915
|
+
return {
|
|
13916
|
+
llmContent,
|
|
13917
|
+
returnDisplay: `Error: MCP tool '${this.serverToolName}' reported an error.`,
|
|
13918
|
+
error: {
|
|
13919
|
+
message: errorMessage,
|
|
13920
|
+
type: "mcp_tool_error" /* MCP_TOOL_ERROR */
|
|
13921
|
+
},
|
|
13922
|
+
...persistedOutputFiles !== void 0 ? { persistedOutputFiles } : {}
|
|
13923
|
+
};
|
|
13924
|
+
}
|
|
13894
13925
|
/**
|
|
13895
13926
|
* Truncates text parts in the transformed result if they exceed the
|
|
13896
13927
|
* configured threshold. Non-text parts (images, audio, etc.) are preserved.
|
|
@@ -14145,6 +14176,11 @@ function transformMcpContentToParts(sdkResponse) {
|
|
|
14145
14176
|
return transformed.filter((part) => part !== null);
|
|
14146
14177
|
}
|
|
14147
14178
|
__name(transformMcpContentToParts, "transformMcpContentToParts");
|
|
14179
|
+
function getMcpErrorImageContent(rawResponseParts) {
|
|
14180
|
+
const transformedParts = transformMcpContentToParts(rawResponseParts);
|
|
14181
|
+
return transformedParts.some(isImagePart) ? transformedParts : void 0;
|
|
14182
|
+
}
|
|
14183
|
+
__name(getMcpErrorImageContent, "getMcpErrorImageContent");
|
|
14148
14184
|
function getDisplayFromParts(parts) {
|
|
14149
14185
|
if (parts.length === 0) {
|
|
14150
14186
|
return "";
|
|
@@ -14245,19 +14281,6 @@ var StartSessionEvent = class {
|
|
|
14245
14281
|
}
|
|
14246
14282
|
}
|
|
14247
14283
|
};
|
|
14248
|
-
var EndSessionEvent = class {
|
|
14249
|
-
static {
|
|
14250
|
-
__name(this, "EndSessionEvent");
|
|
14251
|
-
}
|
|
14252
|
-
"event.name";
|
|
14253
|
-
"event.timestamp";
|
|
14254
|
-
session_id;
|
|
14255
|
-
constructor(config) {
|
|
14256
|
-
this["event.name"] = "end_session";
|
|
14257
|
-
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
14258
|
-
this.session_id = config?.getSessionId();
|
|
14259
|
-
}
|
|
14260
|
-
};
|
|
14261
14284
|
var UserPromptEvent = class {
|
|
14262
14285
|
static {
|
|
14263
14286
|
__name(this, "UserPromptEvent");
|
|
@@ -14454,12 +14477,14 @@ var ApiResponseEvent = class {
|
|
|
14454
14477
|
response_text;
|
|
14455
14478
|
prompt_id;
|
|
14456
14479
|
auth_type;
|
|
14480
|
+
/** Time from stream dispatch to first user-visible content. */
|
|
14481
|
+
ttft_ms;
|
|
14457
14482
|
/**
|
|
14458
14483
|
* Name of the subagent that issued this request, or undefined when the
|
|
14459
14484
|
* request originates from the main conversation.
|
|
14460
14485
|
*/
|
|
14461
14486
|
subagent_name;
|
|
14462
|
-
constructor(response_id, model, duration_ms, prompt_id, auth_type, usage_data, response_text, subagent_name) {
|
|
14487
|
+
constructor(response_id, model, duration_ms, prompt_id, auth_type, usage_data, response_text, subagent_name, ttft_ms) {
|
|
14463
14488
|
this["event.name"] = "api_response";
|
|
14464
14489
|
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
14465
14490
|
this.response_id = response_id;
|
|
@@ -14475,19 +14500,7 @@ var ApiResponseEvent = class {
|
|
|
14475
14500
|
this.prompt_id = prompt_id;
|
|
14476
14501
|
this.auth_type = auth_type;
|
|
14477
14502
|
this.subagent_name = subagent_name;
|
|
14478
|
-
|
|
14479
|
-
};
|
|
14480
|
-
var FlashFallbackEvent = class {
|
|
14481
|
-
static {
|
|
14482
|
-
__name(this, "FlashFallbackEvent");
|
|
14483
|
-
}
|
|
14484
|
-
"event.name";
|
|
14485
|
-
"event.timestamp";
|
|
14486
|
-
auth_type;
|
|
14487
|
-
constructor(auth_type) {
|
|
14488
|
-
this["event.name"] = "flash_fallback";
|
|
14489
|
-
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
14490
|
-
this.auth_type = auth_type;
|
|
14503
|
+
this.ttft_ms = ttft_ms;
|
|
14491
14504
|
}
|
|
14492
14505
|
};
|
|
14493
14506
|
var RipgrepFallbackEvent = class {
|
|
@@ -14507,19 +14520,6 @@ var RipgrepFallbackEvent = class {
|
|
|
14507
14520
|
this.error = error;
|
|
14508
14521
|
}
|
|
14509
14522
|
};
|
|
14510
|
-
var LoopType = /* @__PURE__ */ ((LoopType2) => {
|
|
14511
|
-
LoopType2["CONSECUTIVE_IDENTICAL_TOOL_CALLS"] = "consecutive_identical_tool_calls";
|
|
14512
|
-
LoopType2["CHANTING_IDENTICAL_SENTENCES"] = "chanting_identical_sentences";
|
|
14513
|
-
LoopType2["REPETITIVE_THOUGHTS"] = "repetitive_thoughts";
|
|
14514
|
-
LoopType2["READ_FILE_LOOP"] = "read_file_loop";
|
|
14515
|
-
LoopType2["ACTION_STAGNATION"] = "action_stagnation";
|
|
14516
|
-
LoopType2["SHELL_COMMAND_STAGNATION"] = "shell_command_stagnation";
|
|
14517
|
-
LoopType2["GLOBAL_TOOL_CALL_DUPLICATE"] = "global_tool_call_duplicate";
|
|
14518
|
-
LoopType2["ALTERNATING_TOOL_CALL_PATTERN"] = "alternating_tool_call_pattern";
|
|
14519
|
-
LoopType2["TURN_TOOL_CALL_CAP"] = "turn_tool_call_cap";
|
|
14520
|
-
LoopType2["INVALID_TOOL_PARAMS_STAGNATION"] = "invalid_tool_params_stagnation";
|
|
14521
|
-
return LoopType2;
|
|
14522
|
-
})(LoopType || {});
|
|
14523
14523
|
var LoopDetectedEvent = class {
|
|
14524
14524
|
static {
|
|
14525
14525
|
__name(this, "LoopDetectedEvent");
|
|
@@ -14579,11 +14579,6 @@ function makeSlashCommandEvent({
|
|
|
14579
14579
|
};
|
|
14580
14580
|
}
|
|
14581
14581
|
__name(makeSlashCommandEvent, "makeSlashCommandEvent");
|
|
14582
|
-
var SlashCommandStatus = /* @__PURE__ */ ((SlashCommandStatus2) => {
|
|
14583
|
-
SlashCommandStatus2["SUCCESS"] = "success";
|
|
14584
|
-
SlashCommandStatus2["ERROR"] = "error";
|
|
14585
|
-
return SlashCommandStatus2;
|
|
14586
|
-
})(SlashCommandStatus || {});
|
|
14587
14582
|
function makeChatCompressionEvent({
|
|
14588
14583
|
tokens_before,
|
|
14589
14584
|
tokens_after,
|
|
@@ -14600,11 +14595,6 @@ function makeChatCompressionEvent({
|
|
|
14600
14595
|
};
|
|
14601
14596
|
}
|
|
14602
14597
|
__name(makeChatCompressionEvent, "makeChatCompressionEvent");
|
|
14603
|
-
var IdeConnectionType = /* @__PURE__ */ ((IdeConnectionType2) => {
|
|
14604
|
-
IdeConnectionType2["START"] = "start";
|
|
14605
|
-
IdeConnectionType2["SESSION"] = "session";
|
|
14606
|
-
return IdeConnectionType2;
|
|
14607
|
-
})(IdeConnectionType || {});
|
|
14608
14598
|
var IdeConnectionEvent = class {
|
|
14609
14599
|
static {
|
|
14610
14600
|
__name(this, "IdeConnectionEvent");
|
|
@@ -14976,12 +14966,6 @@ var SkillLaunchEvent = class {
|
|
|
14976
14966
|
this.prompt_id = prompt_id;
|
|
14977
14967
|
}
|
|
14978
14968
|
};
|
|
14979
|
-
var UserFeedbackRating = /* @__PURE__ */ ((UserFeedbackRating2) => {
|
|
14980
|
-
UserFeedbackRating2[UserFeedbackRating2["BAD"] = 1] = "BAD";
|
|
14981
|
-
UserFeedbackRating2[UserFeedbackRating2["FINE"] = 2] = "FINE";
|
|
14982
|
-
UserFeedbackRating2[UserFeedbackRating2["GOOD"] = 3] = "GOOD";
|
|
14983
|
-
return UserFeedbackRating2;
|
|
14984
|
-
})(UserFeedbackRating || {});
|
|
14985
14969
|
var UserFeedbackEvent = class {
|
|
14986
14970
|
static {
|
|
14987
14971
|
__name(this, "UserFeedbackEvent");
|
|
@@ -15302,6 +15286,38 @@ function memoryFreshnessNote(mtimeMs) {
|
|
|
15302
15286
|
}
|
|
15303
15287
|
__name(memoryFreshnessNote, "memoryFreshnessNote");
|
|
15304
15288
|
|
|
15289
|
+
// packages/core/src/tools/file-read-permission.ts
|
|
15290
|
+
init_esbuild_shims();
|
|
15291
|
+
import path8 from "node:path";
|
|
15292
|
+
function getFileReadDefaultPermission(config, requestedPath) {
|
|
15293
|
+
const filePath = path8.resolve(requestedPath);
|
|
15294
|
+
const workspaceContext = config.getWorkspaceContext();
|
|
15295
|
+
const allowedRoots = [
|
|
15296
|
+
config.storage.getProjectTempDir(),
|
|
15297
|
+
// Background subagent transcripts live under <projectDir>/subagents/ and
|
|
15298
|
+
// are advertised to the model as polling targets via read_file.
|
|
15299
|
+
path8.join(config.storage.getProjectDir(), "subagents"),
|
|
15300
|
+
Storage.getGlobalTempDir(),
|
|
15301
|
+
...config.storage.getUserSkillsDirs(),
|
|
15302
|
+
Storage.getUserExtensionsDir(),
|
|
15303
|
+
// Approved plans are persisted here (default ~/.qwen/plans, outside
|
|
15304
|
+
// the workspace) and after approval nothing re-injects the plan text,
|
|
15305
|
+
// so the saved file is the model's only recovery route — reading it
|
|
15306
|
+
// back must not stall on a confirmation prompt. The dir holds only
|
|
15307
|
+
// session plan files, never credentials or settings.
|
|
15308
|
+
config.getPlansDir()
|
|
15309
|
+
];
|
|
15310
|
+
if (workspaceContext.isPathWithinWorkspace(filePath) || isSubpaths(allowedRoots, filePath) || // isAnyAutoMemPath narrows to the managed auto-memory roots
|
|
15311
|
+
// (per-project + user-level under ~/.qwen/memories/) — never the
|
|
15312
|
+
// broad getMemoryBaseDir() — to avoid exposing sensitive ~/.qwen
|
|
15313
|
+
// files such as settings.json or OAuth credentials.
|
|
15314
|
+
isAnyAutoMemPath(filePath, config.getTargetDir())) {
|
|
15315
|
+
return "allow";
|
|
15316
|
+
}
|
|
15317
|
+
return "ask";
|
|
15318
|
+
}
|
|
15319
|
+
__name(getFileReadDefaultPermission, "getFileReadDefaultPermission");
|
|
15320
|
+
|
|
15305
15321
|
// packages/core/src/services/visionBridge/vision-bridge-service.ts
|
|
15306
15322
|
init_esbuild_shims();
|
|
15307
15323
|
|
|
@@ -15503,77 +15519,9 @@ async function runSideQuery(config, options) {
|
|
|
15503
15519
|
}
|
|
15504
15520
|
__name(runSideQuery, "runSideQuery");
|
|
15505
15521
|
|
|
15506
|
-
// packages/core/src/services/visionBridge/image-part-utils.ts
|
|
15507
|
-
init_esbuild_shims();
|
|
15508
|
-
function normalizeParts(input) {
|
|
15509
|
-
if (typeof input === "string") {
|
|
15510
|
-
return [{ text: input }];
|
|
15511
|
-
}
|
|
15512
|
-
if (Array.isArray(input)) {
|
|
15513
|
-
return input.map(
|
|
15514
|
-
(part) => typeof part === "string" ? { text: part } : part
|
|
15515
|
-
);
|
|
15516
|
-
}
|
|
15517
|
-
return [input];
|
|
15518
|
-
}
|
|
15519
|
-
__name(normalizeParts, "normalizeParts");
|
|
15520
|
-
function isImagePart(part) {
|
|
15521
|
-
const mimeType = part.inlineData?.mimeType;
|
|
15522
|
-
const data = part.inlineData?.data;
|
|
15523
|
-
return typeof mimeType === "string" && mimeType.startsWith("image/") && typeof data === "string" && data.length > 0;
|
|
15524
|
-
}
|
|
15525
|
-
__name(isImagePart, "isImagePart");
|
|
15526
|
-
function hasImageParts(input) {
|
|
15527
|
-
return normalizeParts(input).some(isImagePart);
|
|
15528
|
-
}
|
|
15529
|
-
__name(hasImageParts, "hasImageParts");
|
|
15530
|
-
function splitImageParts(input) {
|
|
15531
|
-
const imageParts = [];
|
|
15532
|
-
const nonImageParts = [];
|
|
15533
|
-
for (const part of normalizeParts(input)) {
|
|
15534
|
-
if (isImagePart(part)) {
|
|
15535
|
-
imageParts.push(part);
|
|
15536
|
-
} else {
|
|
15537
|
-
nonImageParts.push(part);
|
|
15538
|
-
}
|
|
15539
|
-
}
|
|
15540
|
-
return { imageParts, nonImageParts };
|
|
15541
|
-
}
|
|
15542
|
-
__name(splitImageParts, "splitImageParts");
|
|
15543
|
-
function replaceImagesWithText(input, text) {
|
|
15544
|
-
const result = [];
|
|
15545
|
-
let replaced = false;
|
|
15546
|
-
for (const part of normalizeParts(input)) {
|
|
15547
|
-
if (isImagePart(part)) {
|
|
15548
|
-
if (!replaced) {
|
|
15549
|
-
result.push({ text });
|
|
15550
|
-
replaced = true;
|
|
15551
|
-
}
|
|
15552
|
-
continue;
|
|
15553
|
-
}
|
|
15554
|
-
result.push(part);
|
|
15555
|
-
}
|
|
15556
|
-
if (!replaced) {
|
|
15557
|
-
result.push({ text });
|
|
15558
|
-
}
|
|
15559
|
-
return result;
|
|
15560
|
-
}
|
|
15561
|
-
__name(replaceImagesWithText, "replaceImagesWithText");
|
|
15562
|
-
function isUsableImagePart(part) {
|
|
15563
|
-
const data = part.inlineData?.data;
|
|
15564
|
-
if (typeof data !== "string" || data.length === 0) {
|
|
15565
|
-
return false;
|
|
15566
|
-
}
|
|
15567
|
-
return data.length <= VISION_BRIDGE_MAX_IMAGE_BASE64_BYTES;
|
|
15568
|
-
}
|
|
15569
|
-
__name(isUsableImagePart, "isUsableImagePart");
|
|
15570
|
-
function collectText(parts) {
|
|
15571
|
-
return parts.map((part) => typeof part.text === "string" ? part.text : "").filter((text) => text.length > 0).join("\n").trim();
|
|
15572
|
-
}
|
|
15573
|
-
__name(collectText, "collectText");
|
|
15574
|
-
|
|
15575
15522
|
// packages/core/src/services/visionBridge/vision-bridge-service.ts
|
|
15576
15523
|
var debugLogger7 = createDebugLogger("VISION_BRIDGE");
|
|
15524
|
+
var turnImageCounts = /* @__PURE__ */ new WeakMap();
|
|
15577
15525
|
var BRIDGE_MAX_OUTPUT_TOKENS = 2048;
|
|
15578
15526
|
var VISION_BRIDGE_TIMEOUT_MS = 3e4;
|
|
15579
15527
|
var VISION_BRIDGE_MAX_ATTEMPTS = 2;
|
|
@@ -15730,8 +15678,10 @@ function formatFullTurnVisionNotice(selection) {
|
|
|
15730
15678
|
return `Routing this image turn to ${target}; retries and tool continuations will stay on that model until the turn ends.`;
|
|
15731
15679
|
}
|
|
15732
15680
|
__name(formatFullTurnVisionNotice, "formatFullTurnVisionNotice");
|
|
15733
|
-
function buildIntentPart(intentText, sourceContext) {
|
|
15734
|
-
const sourceHint = sourceContext ? `The images are consecutive pages ${sourceContext.renderedRange.firstPage}-${sourceContext.renderedRange.lastPage} from PDF ${JSON.stringify(sourceContext.displayName)}. Transcribe each page separately and label each section with its original PDF page number.` :
|
|
15681
|
+
function buildIntentPart(intentText, sourceContext, imageParts = []) {
|
|
15682
|
+
const sourceHint = sourceContext ? `The images are consecutive pages ${sourceContext.renderedRange.firstPage}-${sourceContext.renderedRange.lastPage} from PDF ${JSON.stringify(sourceContext.displayName)}. Transcribe each page separately and label each section with its original PDF page number.` : imageParts.length > 0 ? `Describe each image separately under these ordered labels: ${imageParts.map(
|
|
15683
|
+
(part, index) => `${index + 1}. ${JSON.stringify(part.inlineData?.displayName?.trim() || `image ${index + 1}`)}`
|
|
15684
|
+
).join("; ")}.` : "";
|
|
15735
15685
|
const focusHint = intentText.length > 0 ? `Focus hint \u2014 do NOT answer this, use it only to decide which details to transcribe thoroughly: ${intentText}` : "Describe the image(s) and transcribe any visible text, code, and errors.";
|
|
15736
15686
|
return sourceHint ? `${sourceHint}
|
|
15737
15687
|
${focusHint}` : focusHint;
|
|
@@ -15779,7 +15729,7 @@ function failure(reason, parts, omittedCount, extra = {}) {
|
|
|
15779
15729
|
}
|
|
15780
15730
|
__name(failure, "failure");
|
|
15781
15731
|
async function runVisionBridge(params) {
|
|
15782
|
-
const { config, parts, signal, sourceContext } = params;
|
|
15732
|
+
const { config, parts, signal, sourceContext, intentText } = params;
|
|
15783
15733
|
const { imageParts, nonImageParts } = splitImageParts(parts);
|
|
15784
15734
|
if (imageParts.length === 0) {
|
|
15785
15735
|
return {
|
|
@@ -15790,9 +15740,14 @@ async function runVisionBridge(params) {
|
|
|
15790
15740
|
};
|
|
15791
15741
|
}
|
|
15792
15742
|
const validImages = imageParts.filter(isUsableImagePart);
|
|
15793
|
-
const
|
|
15743
|
+
const usedImages = turnImageCounts.get(signal) ?? 0;
|
|
15744
|
+
const remainingImages = Math.max(0, VISION_BRIDGE_MAX_IMAGES - usedImages);
|
|
15745
|
+
const toConvert = validImages.slice(0, remainingImages);
|
|
15794
15746
|
const omittedCount = imageParts.length - toConvert.length;
|
|
15795
|
-
const intent = collectText(nonImageParts).slice(
|
|
15747
|
+
const intent = (intentText ?? collectText(nonImageParts)).slice(
|
|
15748
|
+
0,
|
|
15749
|
+
BRIDGE_INTENT_MAX_CHARS
|
|
15750
|
+
);
|
|
15796
15751
|
const resolvedSourceContext = sourceContext ?? inferPdfSourceContext(toConvert);
|
|
15797
15752
|
const selection = config.getDefaultVisionBridgeModel?.();
|
|
15798
15753
|
const modelId = selection?.id;
|
|
@@ -15814,13 +15769,14 @@ async function runVisionBridge(params) {
|
|
|
15814
15769
|
{ modelId, ...modelEndpoint && { modelEndpoint } }
|
|
15815
15770
|
);
|
|
15816
15771
|
}
|
|
15772
|
+
turnImageCounts.set(signal, usedImages + toConvert.length);
|
|
15817
15773
|
const timeoutMs = config.getVisionBridgeTimeoutMs?.() ?? VISION_BRIDGE_TIMEOUT_MS;
|
|
15818
15774
|
const requestContents = [
|
|
15819
15775
|
{
|
|
15820
15776
|
role: "user",
|
|
15821
15777
|
parts: [
|
|
15822
15778
|
...toConvert,
|
|
15823
|
-
{ text: buildIntentPart(intent, resolvedSourceContext) }
|
|
15779
|
+
{ text: buildIntentPart(intent, resolvedSourceContext, toConvert) }
|
|
15824
15780
|
]
|
|
15825
15781
|
}
|
|
15826
15782
|
];
|
|
@@ -15955,29 +15911,13 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
|
15955
15911
|
* Returns 'ask' for paths outside the workspace/temp/userSkills directories,
|
|
15956
15912
|
* so that external file reads require user confirmation.
|
|
15957
15913
|
*/
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
this.config.storage.getProjectTempDir(),
|
|
15963
|
-
// Background subagent transcripts live under <projectDir>/subagents/ and
|
|
15964
|
-
// are advertised to the model as polling targets via read_file.
|
|
15965
|
-
path8.join(this.config.storage.getProjectDir(), "subagents"),
|
|
15966
|
-
Storage.getGlobalTempDir(),
|
|
15967
|
-
...this.config.storage.getUserSkillsDirs(),
|
|
15968
|
-
Storage.getUserExtensionsDir()
|
|
15969
|
-
];
|
|
15970
|
-
if (workspaceContext.isPathWithinWorkspace(filePath) || isSubpaths(allowedRoots, filePath) || // isAnyAutoMemPath narrows to the managed auto-memory roots
|
|
15971
|
-
// (per-project + user-level under ~/.qwen/memories/) — never the
|
|
15972
|
-
// broad getMemoryBaseDir() — to avoid exposing sensitive ~/.qwen
|
|
15973
|
-
// files such as settings.json or OAuth credentials.
|
|
15974
|
-
isAnyAutoMemPath(filePath, this.config.getTargetDir())) {
|
|
15975
|
-
return "allow";
|
|
15976
|
-
}
|
|
15977
|
-
return "ask";
|
|
15914
|
+
getDefaultPermission() {
|
|
15915
|
+
return Promise.resolve(
|
|
15916
|
+
getFileReadDefaultPermission(this.config, this.params.file_path)
|
|
15917
|
+
);
|
|
15978
15918
|
}
|
|
15979
15919
|
async execute(signal) {
|
|
15980
|
-
const absPath =
|
|
15920
|
+
const absPath = path9.resolve(this.params.file_path);
|
|
15981
15921
|
const projectRoot = this.config.getTargetDir();
|
|
15982
15922
|
const isAutoMem = isAnyAutoMemPath(absPath, projectRoot);
|
|
15983
15923
|
const cacheEnabled = !this.config.getFileReadCacheDisabled();
|
|
@@ -16003,7 +15943,7 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
|
16003
15943
|
}
|
|
16004
15944
|
debugLogger8.debug("miss", { path: absPath, state: status.state });
|
|
16005
15945
|
}
|
|
16006
|
-
const
|
|
15946
|
+
const prepareForVisionBridge = shouldRunVisionBridge(this.config);
|
|
16007
15947
|
let result = await processSingleFileContent(
|
|
16008
15948
|
this.params.file_path,
|
|
16009
15949
|
this.config,
|
|
@@ -16011,7 +15951,8 @@ var ReadFileToolInvocation = class extends BaseToolInvocation {
|
|
|
16011
15951
|
offset: this.params.offset,
|
|
16012
15952
|
limit: this.params.limit,
|
|
16013
15953
|
pages: this.params.pages,
|
|
16014
|
-
|
|
15954
|
+
preserveUnsupportedImage: prepareForVisionBridge,
|
|
15955
|
+
preparePdfForVisionBridge: prepareForVisionBridge,
|
|
16015
15956
|
signal
|
|
16016
15957
|
}
|
|
16017
15958
|
);
|
|
@@ -16071,7 +16012,7 @@ ${result.llmContent}`;
|
|
|
16071
16012
|
"read" /* READ */,
|
|
16072
16013
|
lines,
|
|
16073
16014
|
mimetype,
|
|
16074
|
-
|
|
16015
|
+
path9.extname(this.params.file_path),
|
|
16075
16016
|
programming_language
|
|
16076
16017
|
)
|
|
16077
16018
|
);
|
|
@@ -16274,7 +16215,7 @@ var ReadFileTool = class _ReadFileTool extends BaseDeclarativeTool {
|
|
|
16274
16215
|
if (!filePath) {
|
|
16275
16216
|
return "The 'file_path' parameter must be non-empty.";
|
|
16276
16217
|
}
|
|
16277
|
-
if (!
|
|
16218
|
+
if (!path9.isAbsolute(filePath)) {
|
|
16278
16219
|
return `File path must be absolute, but was relative: ${filePath}. You must provide an absolute path.`;
|
|
16279
16220
|
}
|
|
16280
16221
|
if (params.offset !== void 0 && (!Number.isInteger(params.offset) || params.offset < 0)) {
|
|
@@ -16287,7 +16228,7 @@ var ReadFileTool = class _ReadFileTool extends BaseDeclarativeTool {
|
|
|
16287
16228
|
const pages = params.pages.trim();
|
|
16288
16229
|
params.pages = pages.length > 0 ? pages : void 0;
|
|
16289
16230
|
}
|
|
16290
|
-
const ext =
|
|
16231
|
+
const ext = path9.extname(filePath).toLowerCase();
|
|
16291
16232
|
if ((params.offset !== void 0 || params.limit !== void 0) && ext === ".ipynb") {
|
|
16292
16233
|
return "offset and limit are not supported for Jupyter notebook (.ipynb) files. Notebooks are always read in full with structured cell output.";
|
|
16293
16234
|
}
|
|
@@ -16327,13 +16268,10 @@ export {
|
|
|
16327
16268
|
isImagePart,
|
|
16328
16269
|
hasImageParts,
|
|
16329
16270
|
splitImageParts,
|
|
16330
|
-
replaceImagesWithText,
|
|
16331
|
-
isUsableImagePart,
|
|
16332
16271
|
collectText,
|
|
16333
16272
|
isImageCapable,
|
|
16334
16273
|
isFullTurnVisionCapable,
|
|
16335
16274
|
getQualifiedVisionModelId,
|
|
16336
|
-
getVisionModelSelector,
|
|
16337
16275
|
getFullTurnVisionModelSelector,
|
|
16338
16276
|
selectVisionBridgeModel,
|
|
16339
16277
|
shouldRunVisionBridge,
|
|
@@ -16344,40 +16282,28 @@ export {
|
|
|
16344
16282
|
runVisionBridge,
|
|
16345
16283
|
MAIN_SOURCE,
|
|
16346
16284
|
subagentNameContext,
|
|
16285
|
+
isInternalPromptId,
|
|
16347
16286
|
UiTelemetryService,
|
|
16348
16287
|
uiTelemetryService,
|
|
16349
|
-
isInternalPromptId,
|
|
16350
|
-
sanitizeHookName,
|
|
16351
16288
|
import_lru_cache,
|
|
16352
|
-
QwenLogger,
|
|
16353
16289
|
apiActivityTracker,
|
|
16354
16290
|
_recoverObjectsFromLine,
|
|
16355
16291
|
parseLineTolerant,
|
|
16356
16292
|
readLines,
|
|
16357
16293
|
read,
|
|
16358
|
-
_resetEnsuredDirsCacheForTest,
|
|
16359
16294
|
writeLine,
|
|
16360
16295
|
writeLineSync,
|
|
16361
|
-
write,
|
|
16362
|
-
countLines,
|
|
16363
16296
|
exists,
|
|
16364
|
-
getTokenUsageFilePath,
|
|
16365
|
-
apiResponseEventToTokenUsageRecord,
|
|
16366
|
-
recordTokenUsageFromApiResponse,
|
|
16367
|
-
recordTokenUsageFromApiResponseBestEffort,
|
|
16368
16297
|
queryTokenUsage,
|
|
16369
16298
|
formatTokenUsageSummaryAsCsv,
|
|
16370
16299
|
formatTokenUsageSummaryAsJson,
|
|
16371
|
-
exportTokenUsageSummary,
|
|
16372
16300
|
runWithChatRecordingSuppressed,
|
|
16373
16301
|
logStartSession,
|
|
16374
16302
|
logUserPrompt,
|
|
16375
16303
|
logUserRetry,
|
|
16376
16304
|
logToolCall,
|
|
16377
|
-
logToolOutputTruncated,
|
|
16378
16305
|
logFileOperation,
|
|
16379
16306
|
logApiRequest,
|
|
16380
|
-
logFlashFallback,
|
|
16381
16307
|
logRipgrepFallback,
|
|
16382
16308
|
logApiError,
|
|
16383
16309
|
logApiCancel,
|
|
@@ -16417,31 +16343,16 @@ export {
|
|
|
16417
16343
|
logMemoryDream,
|
|
16418
16344
|
logMemoryRecall,
|
|
16419
16345
|
logMemoryRecallDelivery,
|
|
16420
|
-
iconvEncode,
|
|
16421
|
-
iconvEncodingExists,
|
|
16422
16346
|
isUtf8CompatibleEncoding,
|
|
16423
|
-
|
|
16424
|
-
AGENT_CONTEXT_FILENAME,
|
|
16347
|
+
loadIconvLite,
|
|
16425
16348
|
LOCAL_CONTEXT_FILENAME,
|
|
16426
16349
|
MEMORY_SECTION_HEADER,
|
|
16427
16350
|
setGeminiMdFilename,
|
|
16428
16351
|
getCurrentGeminiMdFilename,
|
|
16429
16352
|
getAllGeminiMdFilenames,
|
|
16430
|
-
COMMON_IGNORE_PATTERNS,
|
|
16431
|
-
BINARY_FILE_PATTERNS,
|
|
16432
|
-
MEDIA_FILE_PATTERNS,
|
|
16433
|
-
COMMON_DIRECTORY_EXCLUDES,
|
|
16434
|
-
PYTHON_EXCLUDES,
|
|
16435
|
-
SYSTEM_FILE_EXCLUDES,
|
|
16436
|
-
DEFAULT_FILE_EXCLUDES,
|
|
16437
16353
|
FileExclusions,
|
|
16438
|
-
extractExtensionsFromPatterns,
|
|
16439
|
-
BINARY_EXTENSIONS,
|
|
16440
|
-
resetEncodingCache,
|
|
16441
16354
|
getCachedEncodingForBuffer,
|
|
16442
16355
|
getSystemEncoding,
|
|
16443
|
-
windowsCodePageToEncoding,
|
|
16444
|
-
detectEncodingFromBuffer,
|
|
16445
16356
|
extractPDFText,
|
|
16446
16357
|
normalizeSource,
|
|
16447
16358
|
parseNotebook,
|
|
@@ -16456,24 +16367,17 @@ export {
|
|
|
16456
16367
|
inferInsertedCellSourceArrayStyle,
|
|
16457
16368
|
toNotebookSource,
|
|
16458
16369
|
normalizeEditedCell,
|
|
16459
|
-
|
|
16460
|
-
detectBOM,
|
|
16461
|
-
decodeBufferWithEncodingInfo,
|
|
16462
|
-
readFileWithEncodingInfo,
|
|
16463
|
-
readFileWithEncoding,
|
|
16464
|
-
countFileLines,
|
|
16370
|
+
decodeBufferWithEncodingInfoAsync,
|
|
16465
16371
|
readFileWithLineAndLimit,
|
|
16466
|
-
detectFileEncoding,
|
|
16467
16372
|
getSpecificMimeType,
|
|
16468
16373
|
isWithinRoot,
|
|
16469
|
-
isBinaryFile,
|
|
16470
|
-
detectFileType,
|
|
16471
16374
|
isCacheableReadResult,
|
|
16472
16375
|
processSingleFileContent,
|
|
16473
16376
|
fileExists,
|
|
16474
16377
|
getLanguageFromFilePath,
|
|
16475
16378
|
memoryAge,
|
|
16476
16379
|
memoryFreshnessText,
|
|
16380
|
+
getFileReadDefaultPermission,
|
|
16477
16381
|
ReadFileTool,
|
|
16478
16382
|
MAX_SESSION_BYTES,
|
|
16479
16383
|
TOOL_OUTPUT_TRUNCATED_PREFIX,
|
|
@@ -16482,7 +16386,6 @@ export {
|
|
|
16482
16386
|
isAlreadyTruncated,
|
|
16483
16387
|
normalizeToolResultCallId,
|
|
16484
16388
|
persistAndTruncateToolResult,
|
|
16485
|
-
MCPServerStatus,
|
|
16486
16389
|
addMCPStatusChangeListener,
|
|
16487
16390
|
removeMCPStatusChangeListener,
|
|
16488
16391
|
updateMCPServerStatus,
|
|
@@ -16496,9 +16399,7 @@ export {
|
|
|
16496
16399
|
runWithInvocationContext,
|
|
16497
16400
|
getInvocationContext,
|
|
16498
16401
|
DiscoveredMCPTool,
|
|
16499
|
-
generateValidName,
|
|
16500
16402
|
StartSessionEvent,
|
|
16501
|
-
EndSessionEvent,
|
|
16502
16403
|
UserPromptEvent,
|
|
16503
16404
|
UserRetryEvent,
|
|
16504
16405
|
ToolCallEvent,
|
|
@@ -16506,16 +16407,12 @@ export {
|
|
|
16506
16407
|
ApiErrorEvent,
|
|
16507
16408
|
ApiCancelEvent,
|
|
16508
16409
|
ApiResponseEvent,
|
|
16509
|
-
FlashFallbackEvent,
|
|
16510
16410
|
RipgrepFallbackEvent,
|
|
16511
|
-
LoopType,
|
|
16512
16411
|
LoopDetectedEvent,
|
|
16513
16412
|
LoopDetectionDisabledEvent,
|
|
16514
16413
|
NextSpeakerCheckEvent,
|
|
16515
16414
|
makeSlashCommandEvent,
|
|
16516
|
-
SlashCommandStatus,
|
|
16517
16415
|
makeChatCompressionEvent,
|
|
16518
|
-
IdeConnectionType,
|
|
16519
16416
|
IdeConnectionEvent,
|
|
16520
16417
|
ConversationFinishedEvent,
|
|
16521
16418
|
KittySequenceOverflowEvent,
|
|
@@ -16525,7 +16422,6 @@ export {
|
|
|
16525
16422
|
ApiRetryEvent,
|
|
16526
16423
|
ContentRetryFailureEvent,
|
|
16527
16424
|
ExtensionInstallEvent,
|
|
16528
|
-
ToolOutputTruncatedEvent,
|
|
16529
16425
|
ExtensionUninstallEvent,
|
|
16530
16426
|
ExtensionUpdateEvent,
|
|
16531
16427
|
ExtensionEnableEvent,
|
|
@@ -16534,7 +16430,6 @@ export {
|
|
|
16534
16430
|
AuthEvent,
|
|
16535
16431
|
HookCallEvent,
|
|
16536
16432
|
SkillLaunchEvent,
|
|
16537
|
-
UserFeedbackRating,
|
|
16538
16433
|
UserFeedbackEvent,
|
|
16539
16434
|
makeArenaSessionStartedEvent,
|
|
16540
16435
|
makeArenaAgentCompletedEvent,
|
|
@@ -16551,17 +16446,17 @@ export {
|
|
|
16551
16446
|
};
|
|
16552
16447
|
/**
|
|
16553
16448
|
* @license
|
|
16554
|
-
* Copyright
|
|
16449
|
+
* Copyright 2026 Qwen Team
|
|
16555
16450
|
* SPDX-License-Identifier: Apache-2.0
|
|
16556
16451
|
*/
|
|
16557
16452
|
/**
|
|
16558
16453
|
* @license
|
|
16559
|
-
* Copyright 2025
|
|
16454
|
+
* Copyright 2025 Google LLC
|
|
16560
16455
|
* SPDX-License-Identifier: Apache-2.0
|
|
16561
16456
|
*/
|
|
16562
16457
|
/**
|
|
16563
16458
|
* @license
|
|
16564
|
-
* Copyright
|
|
16459
|
+
* Copyright 2025 Qwen Team
|
|
16565
16460
|
* SPDX-License-Identifier: Apache-2.0
|
|
16566
16461
|
*/
|
|
16567
16462
|
/**
|