@qwen-code/qwen-code 0.22.0 → 0.22.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/computer-use/SKILL.md +229 -0
- package/bundled/computer-use/agents/openai.yaml +4 -0
- package/bundled/coordinate/SKILL.md +5 -5
- package/bundled/qc-helper/docs/configuration/auth.md +7 -7
- package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
- package/bundled/qc-helper/docs/configuration/settings.md +40 -40
- package/bundled/qc-helper/docs/extension/introduction.md +3 -1
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
- package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +3 -3
- package/bundled/qc-helper/docs/features/code-review.md +25 -21
- package/bundled/qc-helper/docs/features/commands.md +2 -2
- package/bundled/qc-helper/docs/features/computer-use.md +57 -51
- package/bundled/qc-helper/docs/features/mcp.md +35 -12
- package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
- package/bundled/qc-helper/docs/features/worktree.md +1 -1
- package/bundled/qc-helper/docs/overview.md +1 -1
- package/bundled/qc-helper/docs/quickstart.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +29 -6
- package/bundled/review/SKILL.md +119 -417
- package/bundled/review/references/aone.md +18 -0
- package/bundled/review/references/persistence.md +105 -0
- package/bundled/review/references/posting.md +270 -0
- package/chunks/MaxSizedBox-UUTUE42J.js +112 -0
- package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-XF2TVJFK.js} +87 -86
- package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
- package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-GY53MJIW.js} +2216 -1931
- package/chunks/agent-7U6CC5KF.js +97 -0
- package/chunks/agent-headless-32O4L2CT.js +87 -0
- package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-U76GTVB6.js} +128 -58
- package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XDJCZZCF.js} +2 -2
- package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-ZXXERLEV.js} +2 -2
- package/chunks/bridge-DFX2FFH4.js +119 -0
- package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
- package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-HXXS3HOZ.js} +4 -4
- package/chunks/channel-settings-store-ELLH2M4M.js +117 -0
- package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-EVDC2P4K.js} +8 -7
- package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-IJJZHGEI.js} +8 -7
- package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-YSKB5GVB.js} +12 -7
- package/chunks/{chunk-2TRNCJK4.js → chunk-27ONXAFY.js} +1 -1
- package/chunks/{chunk-OVH5Y7KS.js → chunk-2CRNTW2B.js} +19 -3
- package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
- package/chunks/{chunk-DB2OKNTU.js → chunk-2FN2HNTI.js} +2 -2
- package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
- package/chunks/{chunk-QJHPWLZC.js → chunk-2MHGD7EE.js} +1 -1
- package/chunks/{chunk-BMCSKS37.js → chunk-2NCVUT3C.js} +6 -6
- package/chunks/{chunk-A5F2YNO6.js → chunk-2NNTE2ED.js} +245 -10
- package/chunks/{chunk-Z3JMO2CH.js → chunk-2SERYG4T.js} +1 -1
- package/chunks/{chunk-4J7OPYNS.js → chunk-2YDYDDE2.js} +6 -6
- package/chunks/{chunk-PXOJLJ5W.js → chunk-2YEZNBSD.js} +333 -184
- package/chunks/{chunk-UU4WC7DK.js → chunk-2ZV3CZKI.js} +82 -12
- package/chunks/{chunk-SE55HQGF.js → chunk-3B5DCAQU.js} +74 -52
- package/chunks/{chunk-UIRLQ3N7.js → chunk-3BV7TZNQ.js} +3 -3
- package/chunks/{chunk-2Z6LSQMF.js → chunk-3FSBMAYD.js} +1 -1
- package/chunks/{chunk-DJEHYM4H.js → chunk-3UZCLCXR.js} +3 -3
- package/chunks/{chunk-WWUSHZ7M.js → chunk-43C2II2G.js} +5 -5
- package/chunks/{chunk-2GXYDNXP.js → chunk-47SIHHPL.js} +8 -8
- package/chunks/{chunk-PHJJ3RVO.js → chunk-4DCP3362.js} +7 -15
- package/chunks/chunk-4K7NQDCG.js +104 -0
- package/chunks/{chunk-UZPYR3EV.js → chunk-4TPAG3O7.js} +1 -1
- package/chunks/{chunk-BEGIBJAZ.js → chunk-5CI4AXDD.js} +4 -4
- package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
- package/chunks/{chunk-7HFULI45.js → chunk-5MK32KJV.js} +3 -3
- package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
- package/chunks/{chunk-IBJ5S45N.js → chunk-5T4LWWNX.js} +2 -2
- package/chunks/{chunk-VUMLT7E5.js → chunk-5Y2JCJAH.js} +2 -2
- package/chunks/{chunk-YZBDKFRQ.js → chunk-5ZYZPDDF.js} +993 -895
- package/chunks/{chunk-2A4C2MEG.js → chunk-62PXFOK4.js} +35 -12
- package/chunks/{chunk-IIWGSX4L.js → chunk-6E4WHQJV.js} +1 -1
- package/chunks/{chunk-6PCOVQO2.js → chunk-6HTMIKXZ.js} +8 -8
- package/chunks/{chunk-RDG44S5I.js → chunk-6KS24S3X.js} +2 -2
- package/chunks/{chunk-GAHYKJPV.js → chunk-6US7BF3G.js} +7 -59
- package/chunks/{chunk-MHG6NDS6.js → chunk-6YAR6ZU3.js} +2 -2
- package/chunks/{chunk-3CLIDIVQ.js → chunk-73WFGVIZ.js} +3 -3
- package/chunks/{chunk-ZZUVC6RI.js → chunk-76WGY6LW.js} +3 -3
- package/chunks/{chunk-XLDFW44M.js → chunk-77TOMRBG.js} +3 -3
- package/chunks/{chunk-PDL6LKB5.js → chunk-7AS7QX72.js} +1 -1
- package/chunks/{chunk-ND7NOI4P.js → chunk-7CWEZQ6T.js} +0 -15
- package/chunks/{chunk-DWCKACFL.js → chunk-7DPKPBOQ.js} +2 -2
- package/chunks/{chunk-45NQKMYB.js → chunk-7JPW6IYH.js} +1 -1
- package/chunks/{chunk-HDKCKCYO.js → chunk-7QGEJI7M.js} +1 -1
- package/chunks/{chunk-S4C4JJKE.js → chunk-A7X32SCT.js} +5 -5
- package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
- package/chunks/{chunk-7DYNJFES.js → chunk-AYVIGUUK.js} +6 -1
- package/chunks/{chunk-7DMTAQJ6.js → chunk-BDHLBR46.js} +132 -49
- package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
- package/chunks/{chunk-AP3B7LKD.js → chunk-BKDAF7ES.js} +2 -2
- package/chunks/{chunk-B6UBOIFE.js → chunk-BQBUZDDH.js} +14 -11
- package/chunks/{chunk-VLRBJ24J.js → chunk-BVE5EMIG.js} +2 -2
- package/chunks/{chunk-P47E4SJC.js → chunk-BX2BZPFJ.js} +3 -3
- package/chunks/{chunk-OARZJFZX.js → chunk-C4WBKZJT.js} +4 -4
- package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
- package/chunks/{chunk-URN2JIAQ.js → chunk-CITGRGCM.js} +2 -1
- package/chunks/{chunk-WU5E4HMO.js → chunk-CPPYZHBN.js} +1 -1
- package/chunks/chunk-DCSAVGDJ.js +20 -0
- package/chunks/{chunk-Q54XG7IX.js → chunk-DEYPMJPD.js} +1 -1
- package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
- package/chunks/{chunk-I432KXWD.js → chunk-DP7LABIB.js} +1 -1
- package/chunks/{chunk-36OF5PRW.js → chunk-E4I5MVBR.js} +7 -3
- package/chunks/{chunk-AW27A43Y.js → chunk-E55H6BZ7.js} +93 -1
- package/chunks/{chunk-K623ENWT.js → chunk-E6FGMDFQ.js} +4 -0
- package/chunks/{chunk-5XUTPXQU.js → chunk-EAV3TENS.js} +6 -9
- package/chunks/{chunk-LI4YHTQK.js → chunk-EB4VDXNI.js} +1 -1
- package/chunks/{chunk-JOLJTKIG.js → chunk-EC5BONC3.js} +1 -1
- package/chunks/{chunk-25NESM4G.js → chunk-EEQYTWGU.js} +29 -5
- package/chunks/{chunk-4CWDWDL6.js → chunk-EKP3M4RF.js} +1 -1
- package/chunks/{chunk-W4CRPSC5.js → chunk-ELY4QVIB.js} +1 -1
- package/chunks/{chunk-BB5IMQCV.js → chunk-EMGAVCBZ.js} +2 -2
- package/chunks/chunk-FBX2SDQ4.js +48 -0
- package/chunks/{chunk-C72BXMJ5.js → chunk-FJWICLG7.js} +1 -1
- package/chunks/{chunk-6FRJEE2S.js → chunk-FK4H3V6S.js} +5 -5
- package/chunks/{chunk-LDGWX737.js → chunk-FN5C6C7G.js} +160 -59
- package/chunks/{chunk-3ZFJUBTP.js → chunk-FPH6TXD3.js} +1 -1
- package/chunks/{chunk-WRT324N6.js → chunk-FVDQ5E67.js} +3 -3
- package/chunks/{chunk-VFACN2CE.js → chunk-GNMJNDZE.js} +1 -1
- package/chunks/{chunk-FVBVJEBG.js → chunk-GNRVKN76.js} +10 -8
- package/chunks/{chunk-PZRUV52H.js → chunk-GTUKW3I6.js} +20 -2
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-VMJL7RH6.js → chunk-GZJUCMH4.js} +4 -4
- package/chunks/{chunk-MQP3MHWN.js → chunk-HJOWQUE2.js} +21 -15
- package/chunks/{chunk-ZS5BHEPD.js → chunk-I32QCIK7.js} +1 -1
- package/chunks/{chunk-7IV52LTO.js → chunk-I6VVOZDK.js} +2 -2
- package/chunks/{chunk-X7V3N6YH.js → chunk-I6YW3T3W.js} +218 -37
- package/chunks/{chunk-2E3V7G6Y.js → chunk-ICWGPK23.js} +55 -50
- package/chunks/{chunk-SQS55KR4.js → chunk-IJVDHPKD.js} +2 -2
- package/chunks/{chunk-QS4ENGVF.js → chunk-IKN3IUJP.js} +9 -8
- package/chunks/{chunk-2UZJWSVD.js → chunk-ILPXSKGQ.js} +2 -2
- package/chunks/{chunk-ZRYQMWEP.js → chunk-IPQA4SR5.js} +2 -2
- package/chunks/{chunk-XYQHT3AW.js → chunk-IRIX323G.js} +2 -2
- package/chunks/{chunk-5HJUPACR.js → chunk-J7MLXFC5.js} +2 -2
- package/chunks/{chunk-AZF6SME3.js → chunk-JECO75XD.js} +3 -3
- package/chunks/chunk-JLGFGPZJ.js +346 -0
- package/chunks/{chunk-WZDM44SB.js → chunk-JUIJ3FXC.js} +7 -7
- package/chunks/{chunk-A6NRNRKE.js → chunk-JVPFTDBK.js} +1 -1
- package/chunks/{chunk-2J3OJGTL.js → chunk-K2OJUPOE.js} +1 -21
- package/chunks/{chunk-GHY5OIYP.js → chunk-K63NK3KL.js} +13 -13
- package/chunks/{chunk-7JBHIQS2.js → chunk-KCOXDRQL.js} +7 -13
- package/chunks/{chunk-6NFAEG54.js → chunk-KOJ6MHD5.js} +24 -13
- package/chunks/{chunk-WS7PAXXR.js → chunk-KWFP3WV6.js} +18 -13
- package/chunks/{chunk-A5F63FEW.js → chunk-L436XFLJ.js} +1 -1
- package/chunks/{chunk-KIVGVFMM.js → chunk-LI2HEMKO.js} +16 -4
- package/chunks/{chunk-GIWB5QLV.js → chunk-LJP2BBMK.js} +4 -4
- package/chunks/{create-sub-session-XBCVGNFU.js → chunk-LRKMQPMD.js} +4 -6
- package/chunks/{chunk-6UQSU7CQ.js → chunk-MDZO5V2O.js} +58 -107
- package/chunks/{chunk-AO4M6NMD.js → chunk-MW5AHWOZ.js} +60 -20
- package/chunks/{chunk-FYZMB6DB.js → chunk-MYLXL7F6.js} +11 -11
- package/chunks/{chunk-ZLCT4C5A.js → chunk-MZS7GEC7.js} +1 -1
- package/chunks/{chunk-VEND4KA4.js → chunk-NER3H7PI.js} +1 -1
- package/chunks/{chunk-AVCCKIZ6.js → chunk-NVK4HJYQ.js} +1 -1
- package/chunks/{chunk-MPHLIJYL.js → chunk-NY3IJYAV.js} +14 -8
- package/chunks/{chunk-XZJKSETB.js → chunk-O3BUXIPM.js} +3 -3
- package/chunks/{chunk-4XPSVIED.js → chunk-O5YGAEQS.js} +6 -6
- package/chunks/{chunk-NW35NVFN.js → chunk-ODXCSIH5.js} +4 -4
- package/chunks/{chunk-5XHAOUWD.js → chunk-OI2DR6QB.js} +3 -3
- package/chunks/{chunk-BUGYW6FB.js → chunk-OQ6LTSX3.js} +1 -1
- package/chunks/{chunk-J5ZDDUKM.js → chunk-OT26ITEY.js} +4 -4
- package/chunks/{chunk-EFB657PR.js → chunk-OX44MOAN.js} +3 -3
- package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
- package/chunks/{chunk-4F5WV4RF.js → chunk-PAJGKZAA.js} +281 -10
- package/chunks/{chunk-HIK2OF33.js → chunk-PVBT5QPD.js} +1 -1
- package/chunks/chunk-QHMLYMMS.js +32 -0
- package/chunks/{chunk-U2UYQMM6.js → chunk-R2ZJH3FV.js} +3 -3
- package/chunks/{chunk-K52PZNU4.js → chunk-RRKNX553.js} +2 -2
- package/chunks/chunk-RXFQM6FQ.js +42 -0
- package/chunks/{chunk-SJ4HB27T.js → chunk-SDVF6A42.js} +3 -3
- package/chunks/{chunk-TBVSALA3.js → chunk-SKNVVYIJ.js} +3 -3
- package/chunks/{chunk-JGUBDRBC.js → chunk-SLEWBQWM.js} +3 -3
- package/chunks/{chunk-ZRFUT5VV.js → chunk-SM7ZVKTF.js} +7 -7
- package/chunks/{chunk-UUQFJILB.js → chunk-SQPOJ4ZI.js} +15 -3
- package/chunks/{chunk-RPJQ3O4M.js → chunk-SRGENTPF.js} +31 -41
- package/chunks/{chunk-ISJMN3ML.js → chunk-T2CRBIDJ.js} +1 -1
- package/chunks/{chunk-MZKWFWVG.js → chunk-T2HMXHYA.js} +6 -6
- package/chunks/{chunk-FEMQ6Y7W.js → chunk-T6OODF2U.js} +47 -126
- package/chunks/{chunk-VYC7XFYV.js → chunk-TKO4TLT6.js} +5 -5
- package/chunks/{chunk-KVGR4MCF.js → chunk-TOF4UZHH.js} +3 -3
- package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
- package/chunks/{chunk-7NBVNAJJ.js → chunk-UCSV2IZW.js} +3 -3
- package/chunks/{chunk-FDD2IUEL.js → chunk-UX3IFLJM.js} +229 -21
- package/chunks/{chunk-YDJRMQU4.js → chunk-V3GINY6K.js} +3 -3
- package/chunks/{chunk-XL5K4SVK.js → chunk-VL4YX3FH.js} +1 -1
- package/chunks/{chunk-62JOGZL5.js → chunk-VMDURMFY.js} +199 -87
- package/chunks/{chunk-OE52YHCZ.js → chunk-W2WRNJKX.js} +11 -11
- package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
- package/chunks/{chunk-IWOWEENB.js → chunk-WBT3STGU.js} +385 -25
- package/chunks/{chunk-S3G6YFQC.js → chunk-WEGXPP5E.js} +1 -1
- package/chunks/{chunk-RDQ7QB4Y.js → chunk-XJS54K4A.js} +2 -2
- package/chunks/{chunk-L4HVF7LM.js → chunk-XNXWEGKB.js} +3 -3
- package/chunks/{chunk-T6XLJRQY.js → chunk-XYX474JQ.js} +36509 -5182
- package/chunks/{chunk-F6WFNA7U.js → chunk-XZA32HII.js} +3 -6
- package/chunks/{chunk-NUGZAFR2.js → chunk-ZEADBZLO.js} +147 -6
- package/chunks/chunk-ZELCTN6Y.js +29 -0
- package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
- package/chunks/{chunk-IOSEW6KP.js → chunk-ZJG323IA.js} +5 -4
- package/chunks/{chunk-VSNPOSDN.js → chunk-ZKAZP2ZG.js} +107 -12
- package/chunks/{chunk-YMVFIYHV.js → chunk-ZLTEQYNC.js} +2 -2
- package/chunks/{chunk-O5BDEWBC.js → chunk-ZWKGZB2K.js} +3 -3
- package/chunks/{chunk-6QSA4JHL.js → chunk-ZXDM7DYV.js} +2772 -814
- package/chunks/chunk-ZYNTSXWK.js +32 -0
- package/chunks/config-utils-7M6PCTLT.js +113 -0
- package/chunks/contextCommand-G4QG3TW6.js +108 -0
- package/chunks/{core-runtime-CES6JSVV.js → core-runtime-PKNQ63VL.js} +63 -58
- package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-PLGPY6TV.js} +60 -58
- package/chunks/create-sub-session-RVHSWVAP.js +17 -0
- package/chunks/{cron-create-IKA56DAF.js → cron-create-IJGVR5R2.js} +4 -4
- package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-4N5BI6GL.js} +4 -4
- package/chunks/{cron-list-QBFGAMP7.js → cron-list-2CATIPUX.js} +4 -4
- package/chunks/{daemon-RZZUPGOJ.js → daemon-NAYK4XXU.js} +51 -24
- package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-LDBJXH2U.js} +338 -92
- package/chunks/daemon-status-provider-F5FEHVVG.js +118 -0
- package/chunks/daemon-trust-policy-C6YTU5CQ.js +114 -0
- package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-IGEJPHQ4.js} +68 -66
- package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
- package/chunks/deferred-core-runtime-GHT3GDOR.js +116 -0
- package/chunks/{display-image-OEJMJV3S.js → display-image-DR55LL6M.js} +5 -5
- package/chunks/dist-4Q7NTUNB.js +2512 -0
- package/chunks/{dist-ESS34DHC.js → dist-6H6RZ5H6.js} +2 -2
- package/chunks/{dist-LZO24N3E.js → dist-7CKN54NL.js} +1 -1
- package/chunks/{dist-5EV2G6MC.js → dist-DJBNNPLN.js} +1 -1
- package/chunks/{dist-J6P3C52Z.js → dist-FVJZSIO4.js} +28 -7
- package/chunks/{dist-K7IQB53U.js → dist-SATKXKUR.js} +1 -1
- package/chunks/{dist-ES6HNUW2.js → dist-TJUDJTCB.js} +246 -17
- package/chunks/{dist-VVQBOKDH.js → dist-UQUFZDIY.js} +1 -1
- package/chunks/{dist-2OG3PGKO.js → dist-ZBVOXSKF.js} +3 -3
- package/chunks/earlyInputCapture-HOSJTLWP.js +109 -0
- package/chunks/{edit-A2633SLR.js → edit-KSPVUEAS.js} +48 -48
- package/chunks/{en-3RHLPITS.js → en-6MDBWMTG.js} +3 -0
- package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-UOZ6ZTP7.js} +7 -8
- package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-DZTABSKN.js} +47 -47
- package/chunks/environment-JXOSW25V.js +131 -0
- package/chunks/errors-IOXFDE4J.js +115 -0
- package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-G2QATUCV.js} +7 -8
- package/chunks/exitPlanMode-PZG4FXRB.js +85 -0
- package/chunks/{fast-path-3AVP3G35.js → fast-path-EBS7NAVL.js} +28 -7
- package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
- package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
- package/chunks/{gemini-7PVQWHTH.js → gemini-JELEKOVS.js} +129 -123
- package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-I2CKP7XI.js} +16 -13
- package/chunks/{glob-7YGXE6OV.js → glob-TDVEVPQZ.js} +47 -47
- package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-CNVXMSZD.js} +72 -28
- package/chunks/{grep-6DV6LTON.js → grep-3NLSS32D.js} +6 -6
- package/chunks/handleAutoUpdate-AWAGHKOX.js +111 -0
- package/chunks/i18n-CYA25C5F.js +126 -0
- package/chunks/{image-gen-7CSCJ73T.js → image-gen-63NN2H5N.js} +9 -11
- package/chunks/initializer-JD2FLNLO.js +115 -0
- package/chunks/installationInfo-N3DCWVWR.js +109 -0
- package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
- package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-3MGFRYGM.js} +2 -2
- package/chunks/list-XDQAUET5.js +118 -0
- package/chunks/{list-agents-43XUEXJV.js → list-agents-EXRSHIDJ.js} +2 -2
- package/chunks/loadedSettingsAdapter-IK7H5JRK.js +112 -0
- package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-CZWUAHAI.js} +27 -30
- package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XBPB2BRO.js} +5 -5
- package/chunks/{ls-CGL2UC3H.js → ls-WFONAND2.js} +4 -4
- package/chunks/{lsp-5IKUO5DX.js → lsp-DUKPDUXN.js} +2 -2
- package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-54W23SP5.js} +61 -59
- package/chunks/mcp-2E7ZLMEE.js +112 -0
- package/chunks/{monitor-PXYSGSUN.js → monitor-A4J5QRGJ.js} +47 -47
- package/chunks/nonInteractiveCli-ZNDXB62Y.js +185 -0
- package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-4ANFZON5.js} +48 -48
- package/chunks/open-with-auth-4UI3KHUR.js +55 -0
- package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-JCCJJQZC.js} +29 -30
- package/chunks/pidfile-DHV2Y7UD.js +113 -0
- package/chunks/{processUtils-YK2TDTTU.js → processUtils-JJAR56SO.js} +2 -2
- package/chunks/prompt-terminal-ledger-LDZ6QVYA.js +107 -0
- package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
- package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-5JM44ZSA.js} +53 -59
- package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-JIYAWXTW.js} +8 -10
- package/chunks/{read-file-2HOD2ATO.js → read-file-N3E5DY7N.js} +13 -14
- package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-7A7NFSFL.js} +2 -2
- package/chunks/read-package-up-6T6ICKR7.js +13 -0
- package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-CPJ4IJSD.js} +4 -5
- package/chunks/report-findings-VFM5DENC.js +33 -0
- package/chunks/request-shutdown-AXVOFN5C.js +133 -0
- package/chunks/resumeHistoryUtils-YQRITQAG.js +120 -0
- package/chunks/ripGrep-NEIHKBKB.js +39 -0
- package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
- package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-IWGPZADI.js} +622 -79
- package/chunks/{runtime-J4SPTJRQ.js → runtime-I76HPFUE.js} +73 -71
- package/chunks/{scheduler-VRAEZZ4E.js → scheduler-M6YL4K4I.js} +62 -60
- package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-XXSKBD2C.js} +5 -5
- package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-VPNBLV7I.js} +7 -7
- package/chunks/{send-message-J4VT46OI.js → send-message-A2GXDX3B.js} +10 -31
- package/chunks/serve-XY5S63GN.js +120 -0
- package/chunks/{server-74ONDK62.js → server-TWXRRREO.js} +965 -405
- package/chunks/{session-BO6VBWJP.js → session-IT5ZXU7A.js} +151 -140
- package/chunks/{settings-35QZNFDG.js → settings-IX5HOOCG.js} +71 -69
- package/chunks/shell-LZ55AAJB.js +95 -0
- package/chunks/{skill-DKEMQSNJ.js → skill-WSZ53D2R.js} +108 -25
- package/chunks/skill-settings-5U7FTJIK.js +120 -0
- package/chunks/spawnChannel-TMC6VXGN.js +113 -0
- package/chunks/standalone-update-CUYGWTR4.js +120 -0
- package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-O6BI2OSA.js} +381 -293
- package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-5AJ444QT.js} +3 -3
- package/chunks/{task-create-I2H322E4.js → task-create-CDJSOEQD.js} +11 -11
- package/chunks/{task-list-3OLIWFTQ.js → task-list-BELMPA75.js} +5 -5
- package/chunks/{task-stop-JAUY6MSY.js → task-stop-U3S3KZG2.js} +2 -2
- package/chunks/{task-update-B3XO4CPI.js → task-update-77VCFDDZ.js} +11 -11
- package/chunks/{team-create-W534PMGX.js → team-create-UF4TMQEH.js} +48 -48
- package/chunks/{team-delete-Q7GE7RRI.js → team-delete-YWFXX77L.js} +5 -5
- package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-U57NSR6C.js} +47 -47
- package/chunks/terminal-image-renderer-DRL3BROJ.js +116 -0
- package/chunks/theme-manager-HHJPUDRN.js +104 -0
- package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-435EO2CS.js} +4 -4
- package/chunks/{tool-search-Y4KL3LRE.js → tool-search-SV35UV72.js} +18 -19
- package/chunks/total-session-admission-TQI7TCTL.js +114 -0
- package/chunks/trustedFolders-YKK67IP3.js +124 -0
- package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-DX7LVA4P.js} +6 -6
- package/chunks/updateCheck-6JRTKTUF.js +120 -0
- package/chunks/useAutoAcceptIndicator-MYXYSKSL.js +122 -0
- package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-B26O4YJP.js} +113 -106
- package/chunks/{version-QMDRADXM.js → version-K5D7VJ4B.js} +2 -2
- package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-VFHZLLNZ.js} +25 -242
- package/chunks/{web-search-JS3E76O6.js → web-search-AQE5A4J5.js} +11 -11
- package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
- package/chunks/webapi-Z5OM224P.js +4118 -0
- package/chunks/{workflow-2FCMBTBZ.js → workflow-XL6AEUZ7.js} +635 -94
- package/chunks/workspace-providers-status-H6TG34YV.js +116 -0
- package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-I4U3V5LL.js} +1 -1
- package/chunks/workspace-registry-2PWNIYNI.js +123 -0
- package/chunks/workspace-service-4FGTUJLA.js +131 -0
- package/chunks/workspace-skills-status-7VOLUDT6.js +115 -0
- package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-GJ466KCE.js} +74 -73
- package/chunks/write-file-PWOYCT2K.js +90 -0
- package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-MV4FWFB6.js} +3 -0
- package/chunks/{zh-3JQ75KFU.js → zh-X3WGU6SI.js} +3 -0
- package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-NYJPC3NI.js} +13 -14
- package/cli.js +15 -15
- package/locales/ca.js +3 -0
- package/locales/de.js +1 -0
- package/locales/en.js +3 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +3 -0
- package/locales/zh.js +3 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-yq7z7Anb.js} +1 -1
- package/web-shell/assets/{arc-CXKjm86V.js → arc-CbJO0xnT.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-CRh89421.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-C75KAhKv.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-BzlMveFB.js} +1 -1
- package/web-shell/assets/channel-B3sGR79J.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-DA8QDX3a.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-Bgu7gQ7Y.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-BOew7pIK.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-DHx1I-hO.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-SarFW0WU.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-BLzP083Z.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-Bmkv_iKm.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-MPx9r1N2.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-Ck-09rKG.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-sTGo0K3v.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-sTGo0K3v.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-DWm6lfOG.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DcBUyr5R.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-Df8qmd_p.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DDmGspD7.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-BK_qFvbi.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-Uw3AP_bi.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-CJOQKxY7.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-DhdvZna5.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-edQU0nlP.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-4kugBEsO.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-BMkFivWO.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-BM1ea8g-.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-CXj_cKRf.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-D0nEqwqu.js} +1 -1
- package/web-shell/assets/{index-tYXRIPz4.js → index-B6JN54Pd.js} +1 -1
- package/web-shell/assets/{index-BN_m_uHJ.css → index-C-XlQn24.css} +1 -1
- package/web-shell/assets/index-DLjXM0dn.js +1860 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-DF7aGGbQ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CZYNX1lL.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CvrqMUz1.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-BZNJQZBj.js} +1 -1
- package/web-shell/assets/{layout-O2uHVkPd.js → layout-Bf83x7D6.js} +1 -1
- package/web-shell/assets/{linear-BVqYgjSc.js → linear-Bkc3ES2f.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-C6xuovwz.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-DzH6gVRg.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-DCvLh2fa.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-BtjVlx_6.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-IbroqxFe.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-BvMykiWW.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-D-HHMyrh.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-C0XXhB6d.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DseAXj5d.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-Cek2EweK.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-yLv8wafW.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DeThXnol.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-Cwz-opvE.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-GW0R1ZSv.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-BJuFD7OG.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-CNAavdoV.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-DaIjAidq.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-DkcQXjTy.js} +1 -1
- package/web-shell/index.html +19 -4
- package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
- package/chunks/agent-BFE3DQM3.js +0 -93
- package/chunks/agent-headless-LLVKZZ4P.js +0 -87
- package/chunks/bridge-EBYO4SYM.js +0 -118
- package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
- package/chunks/chunk-AXMWHKXA.js +0 -42
- package/chunks/chunk-IO257NUD.js +0 -623
- package/chunks/chunk-YHC2EYYG.js +0 -125
- package/chunks/computer-use-EGPWFEX6.js +0 -2142
- package/chunks/config-utils-WZ43VOBS.js +0 -25
- package/chunks/contextCommand-5DSEQI6S.js +0 -106
- package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
- package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
- package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
- package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
- package/chunks/environment-WUPHLPKZ.js +0 -127
- package/chunks/errors-WPMPVIAT.js +0 -113
- package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
- package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
- package/chunks/i18n-C562S6KN.js +0 -124
- package/chunks/initializer-7YPGOFP4.js +0 -113
- package/chunks/installationInfo-ARU5Q2H7.js +0 -107
- package/chunks/list-KTSK275C.js +0 -116
- package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
- package/chunks/mcp-6ONTVPAY.js +0 -110
- package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
- package/chunks/pidfile-IO7ALSZF.js +0 -111
- package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
- package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
- package/chunks/ripGrep-E7P6K4QR.js +0 -40
- package/chunks/serve-KEAWV4TI.js +0 -118
- package/chunks/shell-H6K63WG3.js +0 -95
- package/chunks/skill-settings-TCKLXIXM.js +0 -118
- package/chunks/spawnChannel-2K6NKWM5.js +0 -111
- package/chunks/standalone-update-LSCGOEFP.js +0 -118
- package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
- package/chunks/theme-manager-6B47ZPIF.js +0 -102
- package/chunks/total-session-admission-NSCFWGJH.js +0 -113
- package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
- package/chunks/updateCheck-EOVLHD4T.js +0 -118
- package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
- package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
- package/chunks/workspace-registry-BQISXT6Y.js +0 -122
- package/chunks/workspace-service-LLY6HCUC.js +0 -129
- package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
- package/chunks/write-file-EJHU2Z3E.js +0 -90
- package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
- package/web-shell/assets/index-DrlJu79f.js +0 -1792
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
PIPELINE_IMAGE_MIME_TYPES,
|
|
5
|
-
estimateTextTokens
|
|
6
|
-
} from "./chunk-YHC2EYYG.js";
|
|
7
3
|
import {
|
|
8
4
|
createDebugLogger,
|
|
9
5
|
getErrorMessage,
|
|
10
6
|
isAbortError,
|
|
11
7
|
isNodeError
|
|
12
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2NNTE2ED.js";
|
|
13
9
|
import {
|
|
14
10
|
init_esbuild_shims
|
|
15
11
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -5746,7 +5742,7 @@ var require_lib = __commonJS({
|
|
|
5746
5742
|
}
|
|
5747
5743
|
});
|
|
5748
5744
|
|
|
5749
|
-
// packages/core/src/memory
|
|
5745
|
+
// packages/core/src/utils/memory-constants.ts
|
|
5750
5746
|
init_esbuild_shims();
|
|
5751
5747
|
var DEFAULT_CONTEXT_FILENAME = "QWEN.md";
|
|
5752
5748
|
var AGENT_CONTEXT_FILENAME = "AGENTS.md";
|
|
@@ -5792,6 +5788,47 @@ import { execFile } from "node:child_process";
|
|
|
5792
5788
|
import { mkdtemp, readdir, readFile, rm } from "node:fs/promises";
|
|
5793
5789
|
import { tmpdir } from "node:os";
|
|
5794
5790
|
import { join } from "node:path";
|
|
5791
|
+
|
|
5792
|
+
// packages/core/src/utils/request-tokenizer/textTokenizer.ts
|
|
5793
|
+
init_esbuild_shims();
|
|
5794
|
+
var NON_ASCII_RE = /[\u0080-\uffff]/;
|
|
5795
|
+
var TOKEN_ESTIMATE_UNITS_PER_TOKEN = 20;
|
|
5796
|
+
function estimateTextTokens(text) {
|
|
5797
|
+
if (!text || text.length === 0) {
|
|
5798
|
+
return 0;
|
|
5799
|
+
}
|
|
5800
|
+
if (!NON_ASCII_RE.test(text)) {
|
|
5801
|
+
return Math.ceil(text.length / 4);
|
|
5802
|
+
}
|
|
5803
|
+
const nonAsciiChars = countNonAsciiChars(text);
|
|
5804
|
+
const asciiChars = text.length - nonAsciiChars;
|
|
5805
|
+
return Math.ceil(asciiChars / 4 + nonAsciiChars * 1.1);
|
|
5806
|
+
}
|
|
5807
|
+
__name(estimateTextTokens, "estimateTextTokens");
|
|
5808
|
+
function estimateTextTokenUnits(text) {
|
|
5809
|
+
if (!text || text.length === 0) {
|
|
5810
|
+
return 0;
|
|
5811
|
+
}
|
|
5812
|
+
if (!NON_ASCII_RE.test(text)) {
|
|
5813
|
+
return text.length * 5;
|
|
5814
|
+
}
|
|
5815
|
+
const nonAsciiChars = countNonAsciiChars(text);
|
|
5816
|
+
const asciiChars = text.length - nonAsciiChars;
|
|
5817
|
+
return asciiChars * 5 + nonAsciiChars * 22;
|
|
5818
|
+
}
|
|
5819
|
+
__name(estimateTextTokenUnits, "estimateTextTokenUnits");
|
|
5820
|
+
function countNonAsciiChars(text) {
|
|
5821
|
+
let count = 0;
|
|
5822
|
+
for (let i = 0; i < text.length; i++) {
|
|
5823
|
+
if (text.charCodeAt(i) >= 128) {
|
|
5824
|
+
count++;
|
|
5825
|
+
}
|
|
5826
|
+
}
|
|
5827
|
+
return count;
|
|
5828
|
+
}
|
|
5829
|
+
__name(countNonAsciiChars, "countNonAsciiChars");
|
|
5830
|
+
|
|
5831
|
+
// packages/core/src/utils/pdf.ts
|
|
5795
5832
|
var MAX_PDF_TEXT_OUTPUT_CHARS = 1e5;
|
|
5796
5833
|
var PDF_FULL_TEXT_PAGE_LIMIT = 10;
|
|
5797
5834
|
var PDF_MAX_PAGES_PER_READ = 20;
|
|
@@ -6147,6 +6184,227 @@ async function renderPDFPagesToImages(filePath, options) {
|
|
|
6147
6184
|
}
|
|
6148
6185
|
__name(renderPDFPagesToImages, "renderPDFPagesToImages");
|
|
6149
6186
|
|
|
6187
|
+
// packages/core/src/utils/binary-content.ts
|
|
6188
|
+
init_esbuild_shims();
|
|
6189
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
6190
|
+
import * as path from "node:path";
|
|
6191
|
+
var BINARY_APPLICATION_TYPES = /* @__PURE__ */ new Set([
|
|
6192
|
+
"application/pdf",
|
|
6193
|
+
"application/zip",
|
|
6194
|
+
"application/gzip",
|
|
6195
|
+
"application/x-gzip",
|
|
6196
|
+
"application/octet-stream",
|
|
6197
|
+
"application/msword",
|
|
6198
|
+
"application/vnd.ms-excel",
|
|
6199
|
+
"application/vnd.ms-powerpoint",
|
|
6200
|
+
"application/x-tar",
|
|
6201
|
+
"application/x-7z-compressed",
|
|
6202
|
+
"application/x-rar-compressed",
|
|
6203
|
+
"application/vnd.rar",
|
|
6204
|
+
"application/wasm",
|
|
6205
|
+
"application/java-archive"
|
|
6206
|
+
]);
|
|
6207
|
+
function isBinaryContentType(contentType) {
|
|
6208
|
+
if (!contentType) return false;
|
|
6209
|
+
const mt = (contentType.split(";")[0] ?? "").trim().toLowerCase();
|
|
6210
|
+
if (mt.startsWith("text/")) return false;
|
|
6211
|
+
if (mt.endsWith("+json") || mt.endsWith("+xml")) return false;
|
|
6212
|
+
if (mt.startsWith("image/") || mt.startsWith("audio/") || mt.startsWith("video/") || mt.startsWith("font/")) {
|
|
6213
|
+
return true;
|
|
6214
|
+
}
|
|
6215
|
+
if (BINARY_APPLICATION_TYPES.has(mt)) return true;
|
|
6216
|
+
if (mt.startsWith("application/vnd.openxmlformats")) return true;
|
|
6217
|
+
if (mt.startsWith("application/vnd.oasis.opendocument")) return true;
|
|
6218
|
+
return false;
|
|
6219
|
+
}
|
|
6220
|
+
__name(isBinaryContentType, "isBinaryContentType");
|
|
6221
|
+
var MIME_EXTENSIONS = /* @__PURE__ */ new Map([
|
|
6222
|
+
["application/pdf", "pdf"],
|
|
6223
|
+
["application/zip", "zip"],
|
|
6224
|
+
[
|
|
6225
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
6226
|
+
"docx"
|
|
6227
|
+
],
|
|
6228
|
+
["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "xlsx"],
|
|
6229
|
+
[
|
|
6230
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
6231
|
+
"pptx"
|
|
6232
|
+
],
|
|
6233
|
+
["application/msword", "doc"],
|
|
6234
|
+
["application/vnd.ms-excel", "xls"],
|
|
6235
|
+
["application/vnd.ms-powerpoint", "ppt"],
|
|
6236
|
+
["application/gzip", "gz"],
|
|
6237
|
+
["application/x-gzip", "gz"],
|
|
6238
|
+
["application/x-tar", "tar"],
|
|
6239
|
+
["application/x-7z-compressed", "7z"],
|
|
6240
|
+
["application/x-rar-compressed", "rar"],
|
|
6241
|
+
["application/vnd.rar", "rar"],
|
|
6242
|
+
["application/wasm", "wasm"],
|
|
6243
|
+
["application/java-archive", "jar"],
|
|
6244
|
+
["audio/mpeg", "mp3"],
|
|
6245
|
+
["audio/wav", "wav"],
|
|
6246
|
+
["audio/ogg", "ogg"],
|
|
6247
|
+
["video/mp4", "mp4"],
|
|
6248
|
+
["video/webm", "webm"],
|
|
6249
|
+
["image/png", "png"],
|
|
6250
|
+
["image/jpeg", "jpg"],
|
|
6251
|
+
["image/gif", "gif"],
|
|
6252
|
+
["image/webp", "webp"],
|
|
6253
|
+
["image/svg+xml", "svg"]
|
|
6254
|
+
]);
|
|
6255
|
+
function extensionForMimeType(mimeType) {
|
|
6256
|
+
if (!mimeType) return "bin";
|
|
6257
|
+
const mt = (mimeType.split(";")[0] ?? "").trim().toLowerCase();
|
|
6258
|
+
return MIME_EXTENSIONS.get(mt) ?? "bin";
|
|
6259
|
+
}
|
|
6260
|
+
__name(extensionForMimeType, "extensionForMimeType");
|
|
6261
|
+
var KNOWN_EXTENSIONS = /* @__PURE__ */ new Set([...MIME_EXTENSIONS.values(), "jpeg", "bin"]);
|
|
6262
|
+
function extensionFromFilename(name) {
|
|
6263
|
+
if (!name) return void 0;
|
|
6264
|
+
const ext = name.split(".").pop()?.trim().toLowerCase();
|
|
6265
|
+
return ext && ext !== name && KNOWN_EXTENSIONS.has(ext) ? ext : void 0;
|
|
6266
|
+
}
|
|
6267
|
+
__name(extensionFromFilename, "extensionFromFilename");
|
|
6268
|
+
function filenameFromContentDisposition(contentDisposition) {
|
|
6269
|
+
const star = /filename\*\s*=\s*[^']*'[^']*'([^;]+)/i.exec(contentDisposition);
|
|
6270
|
+
if (star?.[1]) {
|
|
6271
|
+
try {
|
|
6272
|
+
return decodeURIComponent(star[1].trim());
|
|
6273
|
+
} catch {
|
|
6274
|
+
return star[1].trim();
|
|
6275
|
+
}
|
|
6276
|
+
}
|
|
6277
|
+
const plain = /filename\s*=\s*"?([^";]+)"?/i.exec(contentDisposition);
|
|
6278
|
+
return plain?.[1]?.trim();
|
|
6279
|
+
}
|
|
6280
|
+
__name(filenameFromContentDisposition, "filenameFromContentDisposition");
|
|
6281
|
+
function sniffFileKind(bytes, contentType, contentDisposition, url) {
|
|
6282
|
+
const dispositionExt = extensionFromFilename(
|
|
6283
|
+
filenameFromContentDisposition(contentDisposition)
|
|
6284
|
+
);
|
|
6285
|
+
let urlExt;
|
|
6286
|
+
try {
|
|
6287
|
+
urlExt = extensionFromFilename(new URL(url).pathname.split("/").pop());
|
|
6288
|
+
} catch {
|
|
6289
|
+
urlExt = void 0;
|
|
6290
|
+
}
|
|
6291
|
+
if (bytes.length >= 5 && bytes.subarray(0, 5).toString("latin1") === "%PDF-") {
|
|
6292
|
+
return {
|
|
6293
|
+
extension: "pdf",
|
|
6294
|
+
mimeType: "application/pdf",
|
|
6295
|
+
magicMatched: true,
|
|
6296
|
+
extensionSource: "magic"
|
|
6297
|
+
};
|
|
6298
|
+
}
|
|
6299
|
+
if (bytes.length >= 4 && bytes[0] === 80 && bytes[1] === 75 && bytes[2] === 3 && bytes[3] === 4) {
|
|
6300
|
+
const zipHint = dispositionExt ?? urlExt ?? extensionForMimeType(contentType);
|
|
6301
|
+
const refined = zipHint && ["docx", "xlsx", "pptx", "jar"].includes(zipHint) ? zipHint : "zip";
|
|
6302
|
+
return {
|
|
6303
|
+
extension: refined,
|
|
6304
|
+
mimeType: contentType || "application/zip",
|
|
6305
|
+
magicMatched: true,
|
|
6306
|
+
extensionSource: "magic"
|
|
6307
|
+
};
|
|
6308
|
+
}
|
|
6309
|
+
if (bytes.length >= 2 && bytes[0] === 31 && bytes[1] === 139) {
|
|
6310
|
+
return {
|
|
6311
|
+
extension: "gz",
|
|
6312
|
+
mimeType: "application/gzip",
|
|
6313
|
+
magicMatched: true,
|
|
6314
|
+
extensionSource: "magic"
|
|
6315
|
+
};
|
|
6316
|
+
}
|
|
6317
|
+
if (bytes.length >= 7 && bytes.subarray(0, 4).toString("latin1") === "Rar!" && bytes[4] === 26 && bytes[5] === 7) {
|
|
6318
|
+
return {
|
|
6319
|
+
extension: "rar",
|
|
6320
|
+
mimeType: "application/vnd.rar",
|
|
6321
|
+
magicMatched: true,
|
|
6322
|
+
extensionSource: "magic"
|
|
6323
|
+
};
|
|
6324
|
+
}
|
|
6325
|
+
if (bytes.length >= 8 && bytes[0] === 137 && bytes.subarray(1, 4).toString("latin1") === "PNG") {
|
|
6326
|
+
return {
|
|
6327
|
+
extension: "png",
|
|
6328
|
+
mimeType: "image/png",
|
|
6329
|
+
magicMatched: true,
|
|
6330
|
+
extensionSource: "magic"
|
|
6331
|
+
};
|
|
6332
|
+
}
|
|
6333
|
+
if (bytes.length >= 3 && bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255) {
|
|
6334
|
+
return {
|
|
6335
|
+
extension: "jpg",
|
|
6336
|
+
mimeType: "image/jpeg",
|
|
6337
|
+
magicMatched: true,
|
|
6338
|
+
extensionSource: "magic"
|
|
6339
|
+
};
|
|
6340
|
+
}
|
|
6341
|
+
if (bytes.length >= 4 && bytes.subarray(0, 4).toString("latin1") === "GIF8") {
|
|
6342
|
+
return {
|
|
6343
|
+
extension: "gif",
|
|
6344
|
+
mimeType: "image/gif",
|
|
6345
|
+
magicMatched: true,
|
|
6346
|
+
extensionSource: "magic"
|
|
6347
|
+
};
|
|
6348
|
+
}
|
|
6349
|
+
if (bytes.length >= 12 && bytes.subarray(0, 4).toString("latin1") === "RIFF" && bytes.subarray(8, 12).toString("latin1") === "WEBP") {
|
|
6350
|
+
return {
|
|
6351
|
+
extension: "webp",
|
|
6352
|
+
mimeType: "image/webp",
|
|
6353
|
+
magicMatched: true,
|
|
6354
|
+
extensionSource: "magic"
|
|
6355
|
+
};
|
|
6356
|
+
}
|
|
6357
|
+
const nameExt = dispositionExt ?? urlExt;
|
|
6358
|
+
if (nameExt) {
|
|
6359
|
+
return {
|
|
6360
|
+
extension: nameExt,
|
|
6361
|
+
mimeType: contentType,
|
|
6362
|
+
magicMatched: false,
|
|
6363
|
+
extensionSource: "name"
|
|
6364
|
+
};
|
|
6365
|
+
}
|
|
6366
|
+
const mimeExt = extensionForMimeType(contentType);
|
|
6367
|
+
return {
|
|
6368
|
+
extension: mimeExt,
|
|
6369
|
+
mimeType: contentType,
|
|
6370
|
+
magicMatched: false,
|
|
6371
|
+
extensionSource: mimeExt !== "bin" ? "mime" : "fallback"
|
|
6372
|
+
};
|
|
6373
|
+
}
|
|
6374
|
+
__name(sniffFileKind, "sniffFileKind");
|
|
6375
|
+
function looksLikeText(bytes) {
|
|
6376
|
+
const window = bytes.subarray(0, 8192);
|
|
6377
|
+
if (window.includes(0)) return false;
|
|
6378
|
+
const decoded = new TextDecoder("utf-8").decode(window);
|
|
6379
|
+
let bad = 0;
|
|
6380
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
6381
|
+
if (decoded[i] === "\uFFFD" && ++bad > 2) return false;
|
|
6382
|
+
}
|
|
6383
|
+
return true;
|
|
6384
|
+
}
|
|
6385
|
+
__name(looksLikeText, "looksLikeText");
|
|
6386
|
+
async function persistBinaryContent(bytes, ext, dir, persistId) {
|
|
6387
|
+
const filepath = path.join(dir, `${persistId}.${ext}`);
|
|
6388
|
+
try {
|
|
6389
|
+
await mkdir(dir, { recursive: true, mode: 448 });
|
|
6390
|
+
await writeFile(filepath, bytes, { mode: 384 });
|
|
6391
|
+
} catch (error) {
|
|
6392
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
6393
|
+
}
|
|
6394
|
+
return { filepath, size: bytes.length, ext };
|
|
6395
|
+
}
|
|
6396
|
+
__name(persistBinaryContent, "persistBinaryContent");
|
|
6397
|
+
function formatByteSize(sizeInBytes) {
|
|
6398
|
+
const kb = sizeInBytes / 1024;
|
|
6399
|
+
if (kb < 1) return `${sizeInBytes} bytes`;
|
|
6400
|
+
const fmt = /* @__PURE__ */ __name((n) => n.toFixed(1).replace(/\.0$/, ""), "fmt");
|
|
6401
|
+
if (kb < 1024) return `${fmt(kb)}KB`;
|
|
6402
|
+
const mb = kb / 1024;
|
|
6403
|
+
if (mb < 1024) return `${fmt(mb)}MB`;
|
|
6404
|
+
return `${fmt(mb / 1024)}GB`;
|
|
6405
|
+
}
|
|
6406
|
+
__name(formatByteSize, "formatByteSize");
|
|
6407
|
+
|
|
6150
6408
|
// packages/core/src/utils/notebook.ts
|
|
6151
6409
|
init_esbuild_shims();
|
|
6152
6410
|
import fs from "node:fs";
|
|
@@ -6639,7 +6897,7 @@ __name(renderNormalizedImageCrop, "renderNormalizedImageCrop");
|
|
|
6639
6897
|
init_esbuild_shims();
|
|
6640
6898
|
import fs3 from "node:fs";
|
|
6641
6899
|
import fsPromises from "node:fs/promises";
|
|
6642
|
-
import
|
|
6900
|
+
import path3 from "node:path";
|
|
6643
6901
|
|
|
6644
6902
|
// packages/core/node_modules/mime/dist/src/index_lite.js
|
|
6645
6903
|
init_esbuild_shims();
|
|
@@ -7063,12 +7321,12 @@ var Mime = class {
|
|
|
7063
7321
|
}
|
|
7064
7322
|
return this;
|
|
7065
7323
|
}
|
|
7066
|
-
getType(
|
|
7067
|
-
if (typeof
|
|
7324
|
+
getType(path4) {
|
|
7325
|
+
if (typeof path4 !== "string")
|
|
7068
7326
|
return null;
|
|
7069
|
-
const last =
|
|
7327
|
+
const last = path4.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
7070
7328
|
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
7071
|
-
const hasPath = last.length <
|
|
7329
|
+
const hasPath = last.length < path4.length;
|
|
7072
7330
|
const hasDot = ext.length < last.length - 1;
|
|
7073
7331
|
if (!hasDot && hasPath)
|
|
7074
7332
|
return null;
|
|
@@ -7138,7 +7396,7 @@ __name(loadIconvLite, "loadIconvLite");
|
|
|
7138
7396
|
|
|
7139
7397
|
// packages/core/src/utils/ignorePatterns.ts
|
|
7140
7398
|
init_esbuild_shims();
|
|
7141
|
-
import
|
|
7399
|
+
import path2 from "node:path";
|
|
7142
7400
|
var COMMON_IGNORE_PATTERNS = [
|
|
7143
7401
|
"**/node_modules/**",
|
|
7144
7402
|
"**/.git/**",
|
|
@@ -7277,7 +7535,7 @@ function extractExtensionsFromPatterns(patterns) {
|
|
|
7277
7535
|
return inner.split(",").map((ext) => `.${ext.trim()}`).filter((ext) => ext !== ".");
|
|
7278
7536
|
}
|
|
7279
7537
|
if (extPart.startsWith(".") && !extPart.includes("/") && !extPart.includes("{") && !extPart.includes("}")) {
|
|
7280
|
-
const extracted =
|
|
7538
|
+
const extracted = path2.extname(`dummy${extPart}`);
|
|
7281
7539
|
const result = extracted || extPart;
|
|
7282
7540
|
return result && result !== "." && !result.substring(1).includes(".") ? [result] : [];
|
|
7283
7541
|
}
|
|
@@ -7411,7 +7669,7 @@ function detectEncodingFromBuffer(buffer) {
|
|
|
7411
7669
|
}
|
|
7412
7670
|
__name(detectEncodingFromBuffer, "detectEncodingFromBuffer");
|
|
7413
7671
|
|
|
7414
|
-
// packages/core/src/
|
|
7672
|
+
// packages/core/src/utils/vision-bridge-constants.ts
|
|
7415
7673
|
init_esbuild_shims();
|
|
7416
7674
|
var VISION_BRIDGE_MAX_IMAGES = 4;
|
|
7417
7675
|
var VISION_BRIDGE_MAX_IMAGE_BASE64_BYTES = Math.floor(
|
|
@@ -7907,6 +8165,43 @@ function detectLineEndingFromContent(content) {
|
|
|
7907
8165
|
}
|
|
7908
8166
|
__name(detectLineEndingFromContent, "detectLineEndingFromContent");
|
|
7909
8167
|
|
|
8168
|
+
// packages/core/src/utils/request-tokenizer/supportedImageFormats.ts
|
|
8169
|
+
init_esbuild_shims();
|
|
8170
|
+
var SUPPORTED_IMAGE_MIME_TYPES = [
|
|
8171
|
+
"image/bmp",
|
|
8172
|
+
"image/gif",
|
|
8173
|
+
"image/jpeg",
|
|
8174
|
+
"image/jpg",
|
|
8175
|
+
// Alternative MIME type for JPEG
|
|
8176
|
+
"image/png",
|
|
8177
|
+
"image/tiff",
|
|
8178
|
+
"image/webp",
|
|
8179
|
+
"image/heic"
|
|
8180
|
+
];
|
|
8181
|
+
var PIPELINE_IMAGE_MIME_TYPES = [
|
|
8182
|
+
"image/gif",
|
|
8183
|
+
"image/jpeg",
|
|
8184
|
+
"image/jpg",
|
|
8185
|
+
"image/png",
|
|
8186
|
+
"image/webp"
|
|
8187
|
+
];
|
|
8188
|
+
function isSupportedImageMimeType(mimeType) {
|
|
8189
|
+
return SUPPORTED_IMAGE_MIME_TYPES.includes(
|
|
8190
|
+
mimeType
|
|
8191
|
+
);
|
|
8192
|
+
}
|
|
8193
|
+
__name(isSupportedImageMimeType, "isSupportedImageMimeType");
|
|
8194
|
+
function getSupportedImageFormatsString() {
|
|
8195
|
+
return PIPELINE_IMAGE_MIME_TYPES.map(
|
|
8196
|
+
(type) => type.replace("image/", "").toUpperCase()
|
|
8197
|
+
).join(", ");
|
|
8198
|
+
}
|
|
8199
|
+
__name(getSupportedImageFormatsString, "getSupportedImageFormatsString");
|
|
8200
|
+
function getUnsupportedImageFormatWarning() {
|
|
8201
|
+
return `Only the following image formats are supported: ${getSupportedImageFormatsString()}. Other formats may not work as expected.`;
|
|
8202
|
+
}
|
|
8203
|
+
__name(getUnsupportedImageFormatWarning, "getUnsupportedImageFormatWarning");
|
|
8204
|
+
|
|
7910
8205
|
// packages/core/src/utils/fileUtils.ts
|
|
7911
8206
|
var debugLogger2 = createDebugLogger("FILE_UTILS");
|
|
7912
8207
|
var CANONICAL_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -7914,6 +8209,18 @@ var CANONICAL_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
|
7914
8209
|
"image/png",
|
|
7915
8210
|
"image/webp"
|
|
7916
8211
|
]);
|
|
8212
|
+
var CANONICAL_IMAGE_EXTENSIONS = new Set(
|
|
8213
|
+
[...CANONICAL_IMAGE_MIME_TYPES].map(
|
|
8214
|
+
(mimeType) => extensionForMimeType(mimeType)
|
|
8215
|
+
)
|
|
8216
|
+
);
|
|
8217
|
+
var SNIFFABLE_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
|
|
8218
|
+
"image/gif",
|
|
8219
|
+
"image/jpeg",
|
|
8220
|
+
"image/png",
|
|
8221
|
+
"image/webp"
|
|
8222
|
+
]);
|
|
8223
|
+
var IMAGE_SNIFF_BYTES = 8192;
|
|
7917
8224
|
var PROVIDER_SAFE_IMAGE_MIME_TYPES = new Set(
|
|
7918
8225
|
PIPELINE_IMAGE_MIME_TYPES
|
|
7919
8226
|
);
|
|
@@ -8139,9 +8446,9 @@ function getSpecificMimeType(filePath) {
|
|
|
8139
8446
|
}
|
|
8140
8447
|
__name(getSpecificMimeType, "getSpecificMimeType");
|
|
8141
8448
|
function isWithinRoot(pathToCheck, rootDirectory) {
|
|
8142
|
-
const normalizedPathToCheck =
|
|
8143
|
-
const normalizedRootDirectory =
|
|
8144
|
-
const rootWithSeparator = normalizedRootDirectory ===
|
|
8449
|
+
const normalizedPathToCheck = path3.resolve(pathToCheck);
|
|
8450
|
+
const normalizedRootDirectory = path3.resolve(rootDirectory);
|
|
8451
|
+
const rootWithSeparator = normalizedRootDirectory === path3.sep || normalizedRootDirectory.endsWith(path3.sep) ? normalizedRootDirectory : normalizedRootDirectory + path3.sep;
|
|
8145
8452
|
return normalizedPathToCheck === normalizedRootDirectory || normalizedPathToCheck.startsWith(rootWithSeparator);
|
|
8146
8453
|
}
|
|
8147
8454
|
__name(isWithinRoot, "isWithinRoot");
|
|
@@ -8352,8 +8659,45 @@ __name(isTextMime, "isTextMime");
|
|
|
8352
8659
|
var MIME_LITE_MISSING_VIDEO_TYPES = /* @__PURE__ */ new Map([
|
|
8353
8660
|
[".m4v", "video/x-m4v"]
|
|
8354
8661
|
]);
|
|
8662
|
+
async function classifyImageContent(filePath, mimeType) {
|
|
8663
|
+
if (!SNIFFABLE_IMAGE_MIME_TYPES.has(mimeType)) return "image";
|
|
8664
|
+
let handle;
|
|
8665
|
+
try {
|
|
8666
|
+
handle = await fs3.promises.open(
|
|
8667
|
+
filePath,
|
|
8668
|
+
(fs3.constants?.O_RDONLY ?? 0) | (fs3.constants?.O_NONBLOCK ?? 0)
|
|
8669
|
+
);
|
|
8670
|
+
if ((await handle.stat()).size > IMAGE_MAX_SOURCE_BYTES) return "image";
|
|
8671
|
+
const sample = Buffer.alloc(IMAGE_SNIFF_BYTES);
|
|
8672
|
+
const { bytesRead } = await handle.read(sample, 0, sample.length, 0);
|
|
8673
|
+
const bytes = sample.subarray(0, bytesRead);
|
|
8674
|
+
if (bytes.length === 0) return "image";
|
|
8675
|
+
const sniffed = sniffFileKind(bytes, mimeType, "", `file://${filePath}`);
|
|
8676
|
+
let result;
|
|
8677
|
+
if (sniffed.magicMatched) {
|
|
8678
|
+
result = sniffed.extension === extensionForMimeType(mimeType) || CANONICAL_IMAGE_EXTENSIONS.has(sniffed.extension) ? "image" : "binary";
|
|
8679
|
+
} else {
|
|
8680
|
+
result = bytes.length < 3 || !(detectBOM(bytes) || looksLikeText(bytes)) ? "binary" : "text";
|
|
8681
|
+
}
|
|
8682
|
+
if (result !== "image") {
|
|
8683
|
+
debugLogger2.debug(
|
|
8684
|
+
`classifyImageContent: ${filePath} -> ${result} (mime ${mimeType})`
|
|
8685
|
+
);
|
|
8686
|
+
}
|
|
8687
|
+
return result;
|
|
8688
|
+
} catch (error) {
|
|
8689
|
+
debugLogger2.debug(
|
|
8690
|
+
`Unable to sniff image content for ${filePath}; preserving extension classification`,
|
|
8691
|
+
error instanceof Error ? error.message : String(error)
|
|
8692
|
+
);
|
|
8693
|
+
return "image";
|
|
8694
|
+
} finally {
|
|
8695
|
+
await handle?.close().catch(() => void 0);
|
|
8696
|
+
}
|
|
8697
|
+
}
|
|
8698
|
+
__name(classifyImageContent, "classifyImageContent");
|
|
8355
8699
|
async function detectFileType(filePath) {
|
|
8356
|
-
const ext =
|
|
8700
|
+
const ext = path3.extname(filePath).toLowerCase();
|
|
8357
8701
|
if ([".ts", ".mts", ".cts", ".tsx"].includes(ext)) {
|
|
8358
8702
|
return "text";
|
|
8359
8703
|
}
|
|
@@ -8366,7 +8710,7 @@ async function detectFileType(filePath) {
|
|
|
8366
8710
|
const lookedUpMimeType = index_lite_default.getType(filePath) ?? MIME_LITE_MISSING_VIDEO_TYPES.get(ext) ?? null;
|
|
8367
8711
|
if (lookedUpMimeType) {
|
|
8368
8712
|
if (lookedUpMimeType.startsWith("image/")) {
|
|
8369
|
-
return
|
|
8713
|
+
return classifyImageContent(filePath, lookedUpMimeType);
|
|
8370
8714
|
}
|
|
8371
8715
|
if (lookedUpMimeType.startsWith("audio/")) {
|
|
8372
8716
|
return "audio";
|
|
@@ -8393,7 +8737,7 @@ async function detectFileType(filePath) {
|
|
|
8393
8737
|
);
|
|
8394
8738
|
return "text";
|
|
8395
8739
|
}
|
|
8396
|
-
if (KNOWN_TEXT_BASENAMES.has(
|
|
8740
|
+
if (KNOWN_TEXT_BASENAMES.has(path3.basename(filePath))) {
|
|
8397
8741
|
debugLogger2.debug(
|
|
8398
8742
|
`detectFileType: ${filePath} \u2192 text (basename-override, mime ${lookedUpMimeType ?? "null"})`
|
|
8399
8743
|
);
|
|
@@ -8438,7 +8782,7 @@ async function processSingleFileContent(filePath, config, optionsOrOffset, legac
|
|
|
8438
8782
|
displayPath = filePath
|
|
8439
8783
|
} = options;
|
|
8440
8784
|
const rootDirectory = config.getTargetDir();
|
|
8441
|
-
const relativePathForDisplay = (
|
|
8785
|
+
const relativePathForDisplay = (path3.isAbsolute(displayPath) ? path3.relative(rootDirectory, displayPath) : displayPath).replace(/\\/g, "/");
|
|
8442
8786
|
try {
|
|
8443
8787
|
signal?.throwIfAborted();
|
|
8444
8788
|
let stats;
|
|
@@ -8465,16 +8809,17 @@ async function processSingleFileContent(filePath, config, optionsOrOffset, legac
|
|
|
8465
8809
|
}
|
|
8466
8810
|
if (!stats.isFile()) {
|
|
8467
8811
|
return {
|
|
8468
|
-
llmContent: `Cannot read file: ${
|
|
8812
|
+
llmContent: `Cannot read file: ${path3.basename(filePath)} is not a regular file (e.g. device, socket, or pipe).`,
|
|
8469
8813
|
returnDisplay: "Not a regular file.",
|
|
8470
8814
|
error: `Not a regular file: ${displayPath}`,
|
|
8471
8815
|
errorType: "read_content_failure" /* READ_CONTENT_FAILURE */
|
|
8472
8816
|
};
|
|
8473
8817
|
}
|
|
8474
|
-
const
|
|
8475
|
-
const
|
|
8818
|
+
const mediaMimeType = index_lite_default.getType(filePath) ?? MIME_LITE_MISSING_VIDEO_TYPES.get(path3.extname(filePath).toLowerCase()) ?? "application/octet-stream";
|
|
8819
|
+
const bridgePreservesImage = preserveUnsupportedImage && mediaMimeType.startsWith("image/") && SNIFFABLE_IMAGE_MIME_TYPES.has(mediaMimeType);
|
|
8820
|
+
const fileType = options.textFileHandle ? "text" : options.fileType ?? (bridgePreservesImage ? "image" : await detectFileType(filePath));
|
|
8476
8821
|
const shouldRenderImageOverview = fileType === "image" && CANONICAL_IMAGE_MIME_TYPES.has(mediaMimeType);
|
|
8477
|
-
const displayName =
|
|
8822
|
+
const displayName = path3.basename(displayPath);
|
|
8478
8823
|
const modalities = config.getContentGeneratorConfig?.()?.modalities ?? {};
|
|
8479
8824
|
const willRenderPdfImages = fileType === "pdf" && !!modalities.image && largePdfBehavior !== "reference";
|
|
8480
8825
|
const renderForBridge = fileType === "pdf" && !modalities.image && !modalities.pdf && (preserveUnsupportedImage || preparePdfForVisionBridge);
|
|
@@ -9105,6 +9450,9 @@ __name(fileExists, "fileExists");
|
|
|
9105
9450
|
export {
|
|
9106
9451
|
VISION_BRIDGE_MAX_IMAGES,
|
|
9107
9452
|
VISION_BRIDGE_MAX_IMAGE_BASE64_BYTES,
|
|
9453
|
+
TOKEN_ESTIMATE_UNITS_PER_TOKEN,
|
|
9454
|
+
estimateTextTokens,
|
|
9455
|
+
estimateTextTokenUnits,
|
|
9108
9456
|
isUtf8CompatibleEncoding,
|
|
9109
9457
|
loadIconvLite,
|
|
9110
9458
|
LOCAL_CONTEXT_FILENAME,
|
|
@@ -9118,6 +9466,11 @@ export {
|
|
|
9118
9466
|
PDF_MAX_PAGES_PER_READ,
|
|
9119
9467
|
parsePDFPageRange,
|
|
9120
9468
|
extractPDFText,
|
|
9469
|
+
isBinaryContentType,
|
|
9470
|
+
sniffFileKind,
|
|
9471
|
+
looksLikeText,
|
|
9472
|
+
persistBinaryContent,
|
|
9473
|
+
formatByteSize,
|
|
9121
9474
|
normalizeSource,
|
|
9122
9475
|
parseNotebook,
|
|
9123
9476
|
inferNotebookJsonFormat,
|
|
@@ -9138,6 +9491,8 @@ export {
|
|
|
9138
9491
|
readTextCursorWindowFromHandle,
|
|
9139
9492
|
ImageViewError,
|
|
9140
9493
|
renderNormalizedImageCrop,
|
|
9494
|
+
isSupportedImageMimeType,
|
|
9495
|
+
getUnsupportedImageFormatWarning,
|
|
9141
9496
|
decodeBufferWithEncodingInfoAsync,
|
|
9142
9497
|
readFileWithLineAndLimit,
|
|
9143
9498
|
getSpecificMimeType,
|
|
@@ -9152,6 +9507,11 @@ export {
|
|
|
9152
9507
|
* Copyright 2025 Google LLC
|
|
9153
9508
|
* SPDX-License-Identifier: Apache-2.0
|
|
9154
9509
|
*/
|
|
9510
|
+
/**
|
|
9511
|
+
* @license
|
|
9512
|
+
* Copyright 2025 Qwen
|
|
9513
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9514
|
+
*/
|
|
9155
9515
|
/**
|
|
9156
9516
|
* @license
|
|
9157
9517
|
* Copyright 2025 Qwen Team
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
isTeamAutoMemPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PVBT5QPD.js";
|
|
6
6
|
import {
|
|
7
7
|
createDebugLogger
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2NNTE2ED.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esbuild_shims
|
|
11
11
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -12,19 +12,19 @@ import {
|
|
|
12
12
|
} from "./chunk-MR3PXB6E.js";
|
|
13
13
|
import {
|
|
14
14
|
ideContextStore
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XYX474JQ.js";
|
|
16
16
|
import {
|
|
17
17
|
require_proper_lockfile
|
|
18
18
|
} from "./chunk-MLXTMF7H.js";
|
|
19
19
|
import {
|
|
20
20
|
atomicWriteFileSync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7QGEJI7M.js";
|
|
22
22
|
import {
|
|
23
23
|
FatalConfigError,
|
|
24
24
|
Storage,
|
|
25
25
|
createDebugLogger,
|
|
26
26
|
getErrorMessage
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2NNTE2ED.js";
|
|
28
28
|
import {
|
|
29
29
|
writeStderrLine
|
|
30
30
|
} from "./chunk-KGJGEEVR.js";
|