@qwen-code/qwen-code 0.21.7 → 0.21.8-nightly.20260810.55e20db328
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bundled/qc-helper/docs/configuration/settings.md +73 -59
- package/bundled/qc-helper/docs/extension/introduction.md +15 -1
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +40 -2
- package/bundled/qc-helper/docs/features/channels/feishu.md +13 -2
- package/bundled/qc-helper/docs/features/channels/github.md +13 -11
- package/bundled/qc-helper/docs/features/channels/gitlab.md +13 -11
- package/bundled/qc-helper/docs/features/channels/overview.md +49 -31
- package/bundled/qc-helper/docs/features/channels/plugins.md +2 -2
- package/bundled/qc-helper/docs/features/channels/qqbot.md +4 -2
- package/bundled/qc-helper/docs/features/channels/telegram.md +4 -2
- package/bundled/qc-helper/docs/features/channels/wecom.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +52 -0
- package/bundled/qc-helper/docs/integration-jetbrains.md +1 -0
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +10 -5
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -36
- package/bundled/review/SKILL.md +32 -5
- package/chunks/{MaxSizedBox-ANWZBPTS.js → MaxSizedBox-A52T4GEU.js} +29 -25
- package/chunks/{StandaloneSessionPicker-XKS3VU3A.js → StandaloneSessionPicker-4J654SOB.js} +48 -44
- package/chunks/{acp-startup-profiler-ORIQ2CCQ.js → acp-startup-profiler-B5BYAMYQ.js} +2 -2
- package/chunks/{acpAgent-KUAZ3GCZ.js → acpAgent-65AM4AOR.js} +1833 -843
- package/chunks/{agent-T6PTGX5R.js → agent-SVQ7U7NJ.js} +28 -24
- package/chunks/{agent-headless-PR7YCB7S.js → agent-headless-XXGY2SQO.js} +28 -24
- package/chunks/{artifact-tool-U4VOZIK5.js → artifact-tool-N652YE4L.js} +1 -1
- package/chunks/{askUserQuestion-XOBQLPFA.js → askUserQuestion-ONW74PKJ.js} +1 -1
- package/chunks/{bridge-NU6YEEHK.js → bridge-Y32B5S3G.js} +34 -30
- package/chunks/{ca-NYKNH222.js → ca-ZLKAB4K3.js} +6 -0
- package/chunks/{channel-management-service-FSQ7SHYI.js → channel-management-service-PHELKOW2.js} +19 -10
- package/chunks/{channel-settings-store-35VQVUVV.js → channel-settings-store-OW43U6VB.js} +36 -32
- package/chunks/{channel-worker-group-JWQK224X.js → channel-worker-group-MSHT6CWR.js} +7 -7
- package/chunks/{channel-worker-manager-77E3OXRQ.js → channel-worker-manager-XXD3GDSK.js} +7 -7
- package/chunks/{channel-worker-supervisor-62YWUGP2.js → channel-worker-supervisor-IVSDIMI4.js} +4 -4
- package/chunks/{chunk-HYRDKNUY.js → chunk-2545EHZR.js} +1 -1
- package/chunks/{chunk-SPMY6CX6.js → chunk-2ASQDZSJ.js} +3 -3
- package/chunks/{chunk-CJXIIILK.js → chunk-2FRY5CRX.js} +1 -1
- package/chunks/{chunk-CNIID3TV.js → chunk-2UUMVNYT.js} +1 -1
- package/chunks/{chunk-KXSDEOFU.js → chunk-3KJQZEN3.js} +1 -1
- package/chunks/{chunk-22NBYCPD.js → chunk-3P2LV43B.js} +1 -1
- package/chunks/{chunk-Y7E5LNLO.js → chunk-47ZUMGGY.js} +2634 -2114
- package/chunks/{chunk-LA7YLSR6.js → chunk-4EOURKA4.js} +839 -153
- package/chunks/chunk-4JRM2BSM.js +48 -0
- package/chunks/{chunk-BGG4MBYD.js → chunk-4PYCZH2V.js} +4 -187
- package/chunks/{chunk-L4N6TIP7.js → chunk-4TRQPFDP.js} +4 -2
- package/chunks/{chunk-6XJMFJ4D.js → chunk-5WZL724W.js} +177 -120
- package/chunks/{chunk-23RZCH76.js → chunk-5ZTS3OQ3.js} +3 -3
- package/chunks/{chunk-VWOVHOTT.js → chunk-67EWJE77.js} +1 -1
- package/chunks/{chunk-3K7FH2KQ.js → chunk-67N6HB5H.js} +1310 -171
- package/chunks/{chunk-CXE7E23H.js → chunk-6Q5ABMTU.js} +45 -17
- package/chunks/{chunk-NG2R4N5O.js → chunk-6ZRFAKXK.js} +1 -1
- package/chunks/{chunk-RERATVSK.js → chunk-7XX5IBXL.js} +145 -10
- package/chunks/{chunk-S7CV4KO6.js → chunk-AKJQSWV4.js} +4 -4
- package/chunks/{chunk-5KH532V7.js → chunk-AUWN7BAG.js} +1 -1
- package/chunks/{chunk-DBOFL3LQ.js → chunk-BL65MO72.js} +10 -10
- package/chunks/{chunk-AKA24BGO.js → chunk-BT6GQIEJ.js} +1 -1
- package/chunks/{chunk-W7U4ESW2.js → chunk-CG3WBKJK.js} +1 -1
- package/chunks/{chunk-2M5N3DHY.js → chunk-CMOBWHWW.js} +1 -1
- package/chunks/chunk-COBO5EBO.js +135 -0
- package/chunks/chunk-CPG6P4GG.js +82 -0
- package/chunks/{chunk-3NB7TSE2.js → chunk-D2D7J3EW.js} +1 -1
- package/chunks/{chunk-NLREQJFK.js → chunk-DA4HRSBW.js} +15 -0
- package/chunks/{chunk-RNVQB725.js → chunk-DPMJLKUP.js} +2 -2
- package/chunks/{chunk-DIEFUBV6.js → chunk-DX3RGJMS.js} +218 -37
- package/chunks/{chunk-33ACCIIY.js → chunk-DZUO626D.js} +1 -1
- package/chunks/chunk-E2FPSSKP.js +244 -0
- package/chunks/{chunk-72LNFGUY.js → chunk-E2N554HK.js} +3 -3
- package/chunks/{chunk-6EOI4HOK.js → chunk-E2T7FLDU.js} +12 -17
- package/chunks/{chunk-EUQTXRKZ.js → chunk-EISUQQPS.js} +6 -6
- package/chunks/{chunk-H2UQ2M5Z.js → chunk-EUVOKP6Y.js} +96 -22
- package/chunks/{chunk-RMH5OWLD.js → chunk-F3II4BTZ.js} +1 -1
- package/chunks/{chunk-P3LEG54R.js → chunk-F6TUUA2U.js} +3 -3
- package/chunks/chunk-F6WFNA7U.js +22 -0
- package/chunks/{chunk-RZHU3ILK.js → chunk-FAD7OC7V.js} +4 -4
- package/chunks/{chunk-OMKQH5C5.js → chunk-FWWQIFDT.js} +6 -23
- package/chunks/{chunk-TLV2IMHR.js → chunk-FYB4GIDW.js} +3 -3
- package/chunks/{chunk-ZJ3VGYHK.js → chunk-GY24H6IA.js} +40 -22
- package/chunks/{chunk-P2AJ7FTI.js → chunk-H4JC7LZX.js} +1 -1
- package/chunks/{chunk-55LYDVPU.js → chunk-HDYQYYWB.js} +1 -1
- package/chunks/{chunk-PQBHU2IA.js → chunk-HKI3KHAO.js} +11 -11
- package/chunks/{chunk-Y4NGLFGJ.js → chunk-HUWENAHO.js} +1 -1
- package/chunks/{chunk-3ULCB3NE.js → chunk-HV76SFIA.js} +1 -1
- package/chunks/{chunk-CSZEXZBE.js → chunk-HWXGX534.js} +3 -3
- package/chunks/{chunk-E33LOKRA.js → chunk-I5VM3SKY.js} +22 -5
- package/chunks/{chunk-LZC3B5N2.js → chunk-IA7TGCN2.js} +2 -2
- package/chunks/{chunk-RGSBTHSU.js → chunk-KMS57JDD.js} +137 -7
- package/chunks/{chunk-VOARQPTA.js → chunk-KP25NJNM.js} +65 -21
- package/chunks/{chunk-6M26GBKX.js → chunk-L2AFWWJE.js} +42 -3
- package/chunks/{chunk-ZXU5UHMI.js → chunk-LHEC5V6G.js} +2 -2
- package/chunks/{chunk-J26HHFI5.js → chunk-LP2QGNSP.js} +32 -2
- package/chunks/{chunk-R574ATRM.js → chunk-M2PNLYGY.js} +41 -0
- package/chunks/{chunk-MKVZE4ZJ.js → chunk-MFDYOYZZ.js} +3 -2
- package/chunks/{chunk-ALGGS7UH.js → chunk-NPQ5ZKRP.js} +82 -1
- package/chunks/{chunk-YHEEE624.js → chunk-NV3F44FL.js} +7 -3
- package/chunks/{chunk-6GONZVLS.js → chunk-NZMXUSKS.js} +1 -1
- package/chunks/{chunk-HQB2KUAN.js → chunk-O277O7U6.js} +1 -1
- package/chunks/{chunk-Y4EWSQF7.js → chunk-OBP6QWD5.js} +2 -2
- package/chunks/{chunk-CYR3HI5X.js → chunk-OQTXYMKW.js} +2 -2
- package/chunks/{chunk-TYKC75AX.js → chunk-OR6R3IUW.js} +2 -2
- package/chunks/{chunk-TRLYP7OF.js → chunk-OSVH4SMN.js} +16 -141
- package/chunks/{chunk-FPM27XN4.js → chunk-OW2BWT2P.js} +4 -4
- package/chunks/{chunk-TDXGKHDN.js → chunk-P5ULXPK5.js} +2 -2
- package/chunks/{chunk-24ER7UV4.js → chunk-PBRVUF5B.js} +1 -1
- package/chunks/{chunk-LKRMNRSN.js → chunk-PDPFQ2FO.js} +2 -0
- package/chunks/{chunk-2VSTGY6M.js → chunk-PJRW65JO.js} +1 -1
- package/chunks/{chunk-6HVUFDS2.js → chunk-PNVPFARW.js} +22 -13
- package/chunks/{chunk-IC4Z6LX6.js → chunk-PYQADEFD.js} +5 -0
- package/chunks/chunk-R4ZA6GBK.js +208 -0
- package/chunks/{chunk-KR4ZSC7K.js → chunk-RMPLEWF3.js} +3 -3
- package/chunks/{chunk-EORNAQDT.js → chunk-RQ6U2JJQ.js} +1 -1
- package/chunks/{chunk-AE77C5ZU.js → chunk-RYQMJCUO.js} +1 -1
- package/chunks/{chunk-6UWFTUQL.js → chunk-S5CULOHB.js} +75 -31
- package/chunks/{chunk-7UFKAV7Y.js → chunk-S6HYI3MF.js} +2 -2
- package/chunks/chunk-SAH4BD2J.js +92 -0
- package/chunks/chunk-SR7RZ4MS.js +202 -0
- package/chunks/{chunk-QETYKPMG.js → chunk-T2O6NIOY.js} +1 -1
- package/chunks/chunk-TQOF5KBL.js +71 -0
- package/chunks/{chunk-OHJLEW5J.js → chunk-TWFFY5BP.js} +4 -4
- package/chunks/{chunk-SCI7K3GM.js → chunk-TXO5BMR2.js} +19 -10
- package/chunks/{chunk-YJQCUTT2.js → chunk-UAB6J2IE.js} +4 -4
- package/chunks/{chunk-OFI7IGST.js → chunk-UGUKH3SU.js} +10 -10
- package/chunks/{chunk-SHZYHGQH.js → chunk-V2226RFW.js} +1 -1
- package/chunks/{chunk-KKJJB5X6.js → chunk-V47QNK5W.js} +1526 -833
- package/chunks/{chunk-W4B7UBUS.js → chunk-VHXPSL57.js} +6 -6
- package/chunks/{chunk-WUC6ZFXO.js → chunk-VKJ4KTPJ.js} +1 -1
- package/chunks/{chunk-MAJS7AT4.js → chunk-VNNWAZSI.js} +2 -2
- package/chunks/{chunk-BVWVWGLE.js → chunk-WAUGQKUU.js} +4 -64
- package/chunks/{chunk-OH2VKQXH.js → chunk-WH6QMLUW.js} +37 -30
- package/chunks/{chunk-PJOBIWUG.js → chunk-WQYWK4DG.js} +1 -1
- package/chunks/{chunk-LEMXGVEP.js → chunk-YFRFZCIP.js} +3 -3
- package/chunks/{chunk-2U3WZGZG.js → chunk-YGT2AUJ7.js} +103 -135
- package/chunks/{chunk-6XU3PH66.js → chunk-YR7ZQ4RD.js} +22 -69
- package/chunks/{chunk-OA4JVLSA.js → chunk-Z7VOMGDC.js} +22 -1
- package/chunks/{chunk-RUL4S3K3.js → chunk-ZCJBCKL5.js} +175 -60
- package/chunks/{chunk-GSS34377.js → chunk-ZI5IH2HP.js} +2 -2
- package/chunks/{chunk-CB2464BK.js → chunk-ZIKTCMQF.js} +117 -10
- package/chunks/chunk-ZLBIFIMV.js +1099 -0
- package/chunks/{chunk-D3UEZIQH.js → chunk-ZSNBQXMZ.js} +48 -55
- package/chunks/{chunk-FZBZSYKU.js → chunk-ZV7LTLFE.js} +1 -1
- package/chunks/{computer-use-KEAPATUY.js → computer-use-SLN7DV2E.js} +28 -24
- package/chunks/{config-utils-K7SCOWHD.js → config-utils-ULCSRMWD.js} +4 -4
- package/chunks/{contextCommand-ZJA6A5K5.js → contextCommand-EHFYX6FW.js} +30 -26
- package/chunks/{core-runtime-QMJPWHCI.js → core-runtime-FBSP5IIG.js} +33 -29
- package/chunks/{create-sub-session-E4PBYXV5.js → create-sub-session-QIDZUOPU.js} +1 -1
- package/chunks/{create-sub-session-DJE6XICH.js → create-sub-session-WC7YGVSL.js} +29 -25
- package/chunks/{cron-create-GRBWYMIJ.js → cron-create-VONA5JYY.js} +1 -1
- package/chunks/{cron-delete-4CMKBR2M.js → cron-delete-5JXSP2MI.js} +1 -1
- package/chunks/{cron-list-W7K4ASOA.js → cron-list-KE4F2CIR.js} +1 -1
- package/chunks/{daemon-SCTQMM7Z.js → daemon-VSX3FHTY.js} +119 -4
- package/chunks/{daemon-status-provider-FSWDPE2G.js → daemon-status-provider-WW2AD2T7.js} +39 -35
- package/chunks/{daemon-trust-policy-P5L5VFAY.js → daemon-trust-policy-E4MAYWPI.js} +35 -31
- package/chunks/{daemon-trust-policy-monitor-73JYN6ET.js → daemon-trust-policy-monitor-XVIDV6T4.js} +35 -31
- package/chunks/{de-VL76CPLV.js → de-LIW4XVLN.js} +5 -0
- package/chunks/{deferred-core-runtime-BWRCCFTE.js → deferred-core-runtime-5SVUC6UC.js} +28 -24
- package/chunks/{display-image-O2XFPQTC.js → display-image-NQRSIBXM.js} +2 -2
- package/chunks/{dist-HVBMEYWK.js → dist-3NTTUAHT.js} +1 -1
- package/chunks/{dist-7JGAAQSC.js → dist-6BMOAE3Z.js} +2 -2
- package/chunks/{dist-3BMEUGTG.js → dist-B2CGTW6T.js} +1 -1
- package/chunks/{dist-C5U4LJKW.js → dist-EWW3J4HQ.js} +5 -4
- package/chunks/{dist-K4WWQBHS.js → dist-EZE3V3Q7.js} +55 -15
- package/chunks/{dist-DPPHJAVL.js → dist-J47AXBZC.js} +918 -142
- package/chunks/{dist-SFQ34F4M.js → dist-OTUO3AS2.js} +8 -1091
- package/chunks/{dist-KS4O2NKE.js → dist-Z3CS4OVP.js} +14 -8
- package/chunks/{earlyInputCapture-L5ST23A6.js → earlyInputCapture-72FYHYRD.js} +28 -24
- package/chunks/{edit-LHHRFNFK.js → edit-SWVVWHXW.js} +28 -24
- package/chunks/{en-IRJ2WN5T.js → en-SY5GTIGX.js} +6 -0
- package/chunks/{enter-worktree-6NXCRZPF.js → enter-worktree-2HF6WQEO.js} +28 -24
- package/chunks/{enterPlanMode-ZVQT4U7D.js → enterPlanMode-OW6S7L4P.js} +28 -24
- package/chunks/{environment-GJ2HWJOS.js → environment-LRTBTDXH.js} +32 -28
- package/chunks/{errors-6RLH3XXC.js → errors-4CO2DME6.js} +30 -26
- package/chunks/{exit-worktree-I2YLUHHY.js → exit-worktree-GHJEIRGL.js} +28 -24
- package/chunks/{exitPlanMode-7CCWKO7I.js → exitPlanMode-JVP4FNNK.js} +28 -24
- package/chunks/{fast-path-DVFD4HQD.js → fast-path-HCCY7GR2.js} +24 -3
- package/chunks/{fast-path-settings-WQJU2LAT.js → fast-path-settings-MN5QQQET.js} +6 -3
- package/chunks/{fr-GK3HQYVB.js → fr-RQFO7U4P.js} +5 -0
- package/chunks/{gemini-7FWGOYD4.js → gemini-V3YVRKXU.js} +85 -72
- package/chunks/{geminiContentGenerator-V2WVLIXU.js → geminiContentGenerator-LVPMQUWX.js} +1 -1
- package/chunks/{glob-3N6GGI75.js → glob-7HRXHYDR.js} +28 -24
- package/chunks/{goal-tools-APOW6UXL.js → goal-tools-PXWN5VK3.js} +4 -2
- package/chunks/{grep-V43ILZVX.js → grep-BITQUON5.js} +28 -24
- package/chunks/{handleAutoUpdate-A5WFVWIA.js → handleAutoUpdate-DKFY454S.js} +32 -28
- package/chunks/{i18n-PLVQ4FBZ.js → i18n-53BQIQSH.js} +29 -25
- package/chunks/{image-gen-7C6IK6DC.js → image-gen-H62FLDFB.js} +7 -5
- package/chunks/{initializer-CVAIKZYL.js → initializer-Q7NUQRSU.js} +35 -31
- package/chunks/{installationInfo-J6QDHNTK.js → installationInfo-BWFHT7WU.js} +29 -25
- package/chunks/{ja-3FA46IKD.js → ja-KOZKHJHZ.js} +5 -0
- package/chunks/{list-ZZ4OUUWV.js → list-OWQKR6JK.js} +38 -34
- package/chunks/{list-agents-KFFIIS2G.js → list-agents-Z4WABFDZ.js} +1 -1
- package/chunks/{loadedSettingsAdapter-QRYRJSWL.js → loadedSettingsAdapter-HNPKQMFA.js} +35 -31
- package/chunks/{loggingContentGenerator-OJCO75HM.js → loggingContentGenerator-A5I3VQUC.js} +10 -8
- package/chunks/{loop-wakeup-TLMJPMMP.js → loop-wakeup-UZ5RL5Y2.js} +2 -2
- package/chunks/{ls-UVVE2XGE.js → ls-TVHDGIES.js} +1 -1
- package/chunks/{lsp-QMEA2VLB.js → lsp-CVN6OQPI.js} +1 -1
- package/chunks/main-PXAUXNF2.js +8 -0
- package/chunks/{managed-npm-update-PCOSCP2N.js → managed-npm-update-CUUJGUTV.js} +29 -25
- package/chunks/{mcp-M3WKKWKY.js → mcp-GJSC7ZPO.js} +35 -31
- package/chunks/{monitor-GN24FH6C.js → monitor-TZ2II7JM.js} +38 -30
- package/chunks/{nonInteractiveCli-KPTU3VSQ.js → nonInteractiveCli-22RS4EVH.js} +72 -66
- package/chunks/{notebook-edit-4YM65BBO.js → notebook-edit-YZC3YPY2.js} +36 -24
- package/chunks/{openaiContentGenerator-EDQT6GTV.js → openaiContentGenerator-OIGO5XNF.js} +21 -11
- package/chunks/{pidfile-JOIIRN2C.js → pidfile-QJQ65RJ2.js} +28 -24
- package/chunks/{process-registry-2CHQBXH5.js → process-registry-PMJOA5CO.js} +15 -0
- package/chunks/{processUtils-5SV4MX3Q.js → processUtils-V5VSDIKS.js} +2 -2
- package/chunks/{pt-3AOBKPIJ.js → pt-U6AOCTMF.js} +5 -0
- package/chunks/{qwenContentGenerator-ODRJSUGR.js → qwenContentGenerator-HXM25BGB.js} +35 -30
- package/chunks/{qwenOAuth2-NESCMZ47.js → qwenOAuth2-7MTMS2Z5.js} +7 -5
- package/chunks/{read-file-HPSODLPK.js → read-file-PMGXB3ZB.js} +8 -6
- package/chunks/{read-mcp-resource-2TNSJTC3.js → read-mcp-resource-PZ4ZF6YL.js} +1 -1
- package/chunks/{record-artifact-RAON52FC.js → record-artifact-P4HFMS7X.js} +2 -2
- package/chunks/{resumeHistoryUtils-TXCOFFMQ.js → resumeHistoryUtils-YUTPLHUH.js} +33 -29
- package/chunks/{ripGrep-ZKQGTQAO.js → ripGrep-XUS66YIV.js} +28 -24
- package/chunks/{ru-VJRAMC4W.js → ru-CMX4UMYP.js} +5 -0
- package/chunks/{run-qwen-serve-ZPKPKECF.js → run-qwen-serve-4NVSU75L.js} +261 -62
- package/chunks/{runtime-2FLNNM36.js → runtime-QLRVP6HM.js} +40 -36
- package/chunks/{scheduler-365PJHNR.js → scheduler-PBB2NSOP.js} +28 -24
- package/chunks/{sdk-exporters-http-KHAB5JSD.js → sdk-exporters-http-XVTZQRCE.js} +2 -2
- package/chunks/{sdk-impl-KD7FSTC3.js → sdk-impl-7W7AKCS4.js} +7 -3
- package/chunks/{send-message-ZM7MRUGP.js → send-message-CAMSLG2L.js} +4 -3
- package/chunks/{serve-QD2RNLKJ.js → serve-BWKTRX72.js} +37 -31
- package/chunks/{server-XLJVLTYM.js → server-E7CH7WPK.js} +1437 -593
- package/chunks/{session-3VTUHH4Q.js → session-QEKSJ6YU.js} +166 -105
- package/chunks/{settings-KULVPCQC.js → settings-BRAOSJIM.js} +34 -30
- package/chunks/{shell-3SWW22MH.js → shell-OF3CK4AT.js} +28 -24
- package/chunks/{skill-KDHWYS7W.js → skill-HLH2NO2H.js} +9 -7
- package/chunks/{skill-settings-NMY4JEJC.js → skill-settings-DRPU7YI5.js} +34 -30
- package/chunks/{spawnChannel-ZKS4Q5OU.js → spawnChannel-4KO7YTFM.js} +31 -27
- package/chunks/{standalone-update-7CXPGAQ4.js → standalone-update-DJN2R3YW.js} +30 -26
- package/chunks/{startInteractiveUI-2QQLEKM6.js → startInteractiveUI-O3WQQ2WC.js} +384 -173
- package/chunks/{syntheticOutput-ZLCUTKO2.js → syntheticOutput-PEBJQYJV.js} +2 -2
- package/chunks/{task-create-CQP5UEA3.js → task-create-5NWCQSJF.js} +5 -4
- package/chunks/{task-list-XLEZOJXP.js → task-list-53265TRZ.js} +1 -1
- package/chunks/{task-stop-7ZQM5CFF.js → task-stop-FPCOIRYX.js} +1 -1
- package/chunks/{task-update-JA75U2SN.js → task-update-5HN577LS.js} +5 -4
- package/chunks/{team-create-2WTNGAOX.js → team-create-2E4ACBJD.js} +28 -24
- package/chunks/{team-delete-MHY3UZGY.js → team-delete-MMQB4OSC.js} +1 -1
- package/chunks/{team-plan-approval-LZTYLEG4.js → team-plan-approval-LWIDXYOA.js} +28 -24
- package/chunks/{terminal-image-renderer-R5HHAFJN.js → terminal-image-renderer-PJM7663W.js} +30 -26
- package/chunks/{theme-manager-PAUCSJFF.js → theme-manager-FDQTM3RP.js} +28 -24
- package/chunks/{todoWrite-UPVOHYGD.js → todoWrite-JGV6VLOX.js} +1 -1
- package/chunks/{tool-search-2BFCGLI6.js → tool-search-TL5ZXBF4.js} +11 -8
- package/chunks/{total-session-admission-MK4SINFK.js → total-session-admission-LS6EY5KT.js} +37 -32
- package/chunks/{trustedFolders-TJ5S26N7.js → trustedFolders-5RWP5OB7.js} +32 -26
- package/chunks/{types-ML3TRJQ5.js → types-WYCFCEHR.js} +5 -3
- package/chunks/{update-relaunch-N7AYLARF.js → update-relaunch-HWQ4USKY.js} +5 -5
- package/chunks/{updateCheck-QRZ3DVT5.js → updateCheck-EZMBTEIR.js} +31 -27
- package/chunks/{useAutoAcceptIndicator-DBJ7Y5AF.js → useAutoAcceptIndicator-JDMI627A.js} +37 -33
- package/chunks/{validateNonInterActiveAuth-6ZQWUDS3.js → validateNonInterActiveAuth-RRUHC5RO.js} +67 -63
- package/chunks/{version-AJQGQWXC.js → version-XS4UTKUX.js} +1 -1
- package/chunks/{web-fetch-QWJYRXFL.js → web-fetch-2JV7H6OM.js} +14 -10
- package/chunks/{web-search-2AOXJGHU.js → web-search-RCTN2GAM.js} +10 -7
- package/chunks/{workflow-ERH3SJG2.js → workflow-6MKLKQ6R.js} +909 -273
- package/chunks/{workspace-providers-status-HZ474RA4.js → workspace-providers-status-YZ2IJ4DK.js} +38 -34
- package/chunks/{workspace-registration-store-6EUP4JXG.js → workspace-registration-store-IYN72LBS.js} +1 -1
- package/chunks/{workspace-registry-R4APRRNC.js → workspace-registry-7LFBZQLT.js} +37 -32
- package/chunks/{workspace-service-HFIFDMU7.js → workspace-service-2EHSPRJB.js} +45 -39
- package/chunks/{workspace-skills-status-HAHEIHGK.js → workspace-skills-status-5VJ2D5HN.js} +36 -32
- package/chunks/{workspace-trust-reconciler-65GTAGDK.js → workspace-trust-reconciler-X2LZ6XCI.js} +44 -39
- package/chunks/{write-file-B34CDELV.js → write-file-CJK6SCCF.js} +28 -24
- package/chunks/{zh-ARWDLDLR.js → zh-AGL2FVBI.js} +6 -0
- package/chunks/{zh-TW-Y4RGI3P7.js → zh-TW-KI66MHQY.js} +6 -0
- package/chunks/{zoom-image-HPRBZHSS.js → zoom-image-BVW4RFYW.js} +8 -6
- package/cli.js +13 -13
- package/locales/ca.js +10 -0
- package/locales/de.js +9 -0
- package/locales/en.js +10 -0
- package/locales/fr.js +9 -0
- package/locales/ja.js +9 -0
- package/locales/pt.js +9 -0
- package/locales/ru.js +9 -0
- package/locales/zh-TW.js +10 -0
- package/locales/zh.js +10 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-Ip-FFDJ0.js → arc-DDtoJrAW.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CChqgwIb.js → architectureDiagram-3BPJPVTR-BAInIW4O.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BHN-Tfss.js → blockDiagram-GPEHLZMM-ChPDk7fP.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BhyjzDjN.js → c4Diagram-AAUBKEIU-Cd9BJuUy.js} +1 -1
- package/web-shell/assets/channel-0OQklTfP.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BB9eyHrx.js → chunk-2J33WTMH-COQkLp56.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BeV7ce_J.js → chunk-4BX2VUAB-GUJshQ_l.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DO7kXDiV.js → chunk-55IACEB6-Boaa7c10.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-B27MPznD.js → chunk-727SXJPM-CcRXaly2.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DHIjqjD_.js → chunk-AQP2D5EJ-BY0OARHh.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DabMqyN2.js → chunk-FMBD7UC4-DLFQfv0S.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-Dw7Nnnxc.js → chunk-ND2GUHAM-C_S0u-D2.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DdaZew1Q.js → chunk-QZHKN3VN-DP9m64hw.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CZ4-apsu.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CZ4-apsu.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CgBpCYH5.js → cose-bilkent-S5V4N54A-CGY6zGE1.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BB4IU8G0.js → dagre-BM42HDAG-yB7whKNn.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BcUTHU37.js → diagram-2AECGRRQ-Bdlc59La.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-B6Lyihyv.js → diagram-5GNKFQAL-BUClP18L.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CRIJOjpG.js → diagram-KO2AKTUF-aZm08kjn.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DdNiwWWT.js → diagram-LMA3HP47-7DGwEkxC.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Dz4b32Do.js → diagram-OG6HWLK6-CAGKayxx.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D-8NGw77.js → erDiagram-TEJ5UH35-CptoHHQi.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Dun26LyM.js → flowDiagram-I6XJVG4X-CNOH0s7Q.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-F10Hu1Gc.js → ganttDiagram-6RSMTGT7-CCQuCU3y.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Bf8Ez6-D.js → gitGraphDiagram-PVQCEYII-B7gv9f4E.js} +1 -1
- package/web-shell/assets/{index-BXqw-nGq.js → index-BoUPVvpf.js} +1 -1
- package/web-shell/assets/index-D1YQXYsB.css +5 -0
- package/web-shell/assets/index-J4N7zCmU.js +1768 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DVgTMLvj.js → infoDiagram-5YYISTIA-Bb3KYEbR.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-uT-KepvK.js → ishikawaDiagram-YF4QCWOH-DWEzbAGi.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-Vg_XadQf.js → journeyDiagram-JHISSGLW-CmxwEqeb.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dyv1ESBE.js → kanban-definition-UN3LZRKU-Ci0gDD8O.js} +1 -1
- package/web-shell/assets/{linear-BMIepYX3.js → linear-BqxZqGhS.js} +1 -1
- package/web-shell/assets/{mermaid.core-zA8pJ9ag.js → mermaid.core-BDAFffHv.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BCW_BZ_5.js → mindmap-definition-RKZ34NQL-Btvx-xvS.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DseNEGp2.js → pieDiagram-4H26LBE5-CKAg7yG7.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-6Z7wr1Fi.js → quadrantDiagram-W4KKPZXB-DIt8E1mC.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CVOlCRPf.js → requirementDiagram-4Y6WPE33-BA7mQWQJ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CGhgrUJZ.js → sankeyDiagram-5OEKKPKP-D0JppnVU.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-dlqmpLuQ.js → sequenceDiagram-3UESZ5HK-29DIQFjB.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-B9EW10Xb.js → stateDiagram-AJRCARHV-iiXMdK--.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CEGK3l80.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-BBRh0mgZ.js → timeline-definition-PNZ67QCA-CeF7ngSW.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-B8Gs-REP.js → vennDiagram-CIIHVFJN-Beilq8D6.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D_y80Ur7.js → wardley-L42UT6IY-DOYjY4zO.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-D-CNfHJ-.js → wardleyDiagram-YWT4CUSO-Dtqp8o18.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DQ5CvELo.js → xychartDiagram-2RQKCTM6-cdAc0Dfv.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-6PEXNQTX.js +0 -68
- package/chunks/chunk-IUFV6FYU.js +0 -81
- package/chunks/chunk-RXFQM6FQ.js +0 -42
- package/web-shell/assets/channel-Cu8qd6OB.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BI3KrXhq.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BI3KrXhq.js +0 -1
- package/web-shell/assets/index-QQlUCJGg.css +0 -5
- package/web-shell/assets/index-hcgjV7vS.js +0 -1768
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CJTZJJ5X.js +0 -1
- package/chunks/{anthropicContentGenerator-DTMVEL5M.js → anthropicContentGenerator-SSFE2753.js} +9 -9
- /package/chunks/{chunk-VXZBKKQR.js → chunk-NTTBXH7U.js} +0 -0
- /package/chunks/{chunk-GRC5HGPI.js → chunk-OIBUG24X.js} +0 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
writeStderrLineSafe
|
|
5
|
+
} from "./chunk-KGJGEEVR.js";
|
|
6
|
+
import {
|
|
7
|
+
init_esbuild_shims
|
|
8
|
+
} from "./chunk-5O2XNYP6.js";
|
|
9
|
+
import {
|
|
10
|
+
__name
|
|
11
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
12
|
+
|
|
13
|
+
// packages/cli/src/config/acp-channel-fallback.ts
|
|
14
|
+
init_esbuild_shims();
|
|
15
|
+
var QWEN_CODE_SERVE_ENV = "QWEN_CODE_SERVE";
|
|
16
|
+
var QWEN_CODE_DESKTOP_ENV = "QWEN_CODE_DESKTOP";
|
|
17
|
+
function resolveAcpChannelFallback(env = process.env) {
|
|
18
|
+
if (env[QWEN_CODE_DESKTOP_ENV] === "1") {
|
|
19
|
+
return "desktop";
|
|
20
|
+
}
|
|
21
|
+
if (env[QWEN_CODE_SERVE_ENV] === "1") {
|
|
22
|
+
return "daemon";
|
|
23
|
+
}
|
|
24
|
+
return "ACP";
|
|
25
|
+
}
|
|
26
|
+
__name(resolveAcpChannelFallback, "resolveAcpChannelFallback");
|
|
27
|
+
|
|
28
|
+
// packages/cli/src/config/shared-env-keys.ts
|
|
29
|
+
init_esbuild_shims();
|
|
30
|
+
var DEFAULT_EXCLUDED_ENV_VARS = ["DEBUG", "DEBUG_MODE"];
|
|
31
|
+
var ENV_CORRUPTED_PATH = "QWEN_CODE_SETTINGS_CORRUPTED_PATH";
|
|
32
|
+
var ENV_WAS_RECOVERED = "QWEN_CODE_SETTINGS_WAS_RECOVERED";
|
|
33
|
+
var ENV_ACP_REPEATED_TOOL_FAILURE_GUARD = "QWEN_CODE_ACP_REPEATED_TOOL_FAILURE_GUARD";
|
|
34
|
+
var PROJECT_ENV_HARDCODED_EXCLUSIONS = [
|
|
35
|
+
"QWEN_HOME",
|
|
36
|
+
"QWEN_RUNTIME_DIR",
|
|
37
|
+
"QWEN_CODE_MCP_APPROVALS_PATH",
|
|
38
|
+
"QWEN_CODE_TRUSTED_FOLDERS_PATH",
|
|
39
|
+
// Runtime attribution markers are stamped by trusted launchers. A project
|
|
40
|
+
// `.env` must not spoof client channel telemetry.
|
|
41
|
+
QWEN_CODE_SERVE_ENV,
|
|
42
|
+
QWEN_CODE_DESKTOP_ENV,
|
|
43
|
+
ENV_CORRUPTED_PATH,
|
|
44
|
+
ENV_WAS_RECOVERED,
|
|
45
|
+
// This is an operator rollout policy. A project must not be able to promote
|
|
46
|
+
// itself from the default shadow cohort into warning or enforcement.
|
|
47
|
+
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
48
|
+
// QWEN_TLS_INSECURE (and NODE_TLS_REJECT_UNAUTHORIZED, which it mirrors)
|
|
49
|
+
// disable TLS certificate verification for all outbound API connections. A
|
|
50
|
+
// project `.env` must never enable either — that would let an untrusted repo
|
|
51
|
+
// silently turn off MITM protection. Opt-in stays with the user via the
|
|
52
|
+
// `--insecure` flag, the shell environment, or a home `.env`. The initial
|
|
53
|
+
// `.env` load only consults this list, so both keys must be here (not just
|
|
54
|
+
// RELOAD_EXCLUDED_KEYS, which only applies on reload).
|
|
55
|
+
"QWEN_TLS_INSECURE",
|
|
56
|
+
"NODE_TLS_REJECT_UNAUTHORIZED",
|
|
57
|
+
// NODE_EXTRA_CA_CERTS reaches the same outcome by adding a TLS trust
|
|
58
|
+
// anchor instead of disabling verification.
|
|
59
|
+
"NODE_EXTRA_CA_CERTS",
|
|
60
|
+
// QWEN_CLI_ENTRY is the script path daemon-spawned session processes run.
|
|
61
|
+
// A project `.env` or settings.env fixing it turns
|
|
62
|
+
// `cd <untrusted repo> && qwen serve` into code execution as the daemon
|
|
63
|
+
// via an attacker-chosen ACP entrypoint, for every workspace's sessions.
|
|
64
|
+
"QWEN_CLI_ENTRY",
|
|
65
|
+
// DEV gates the daemon's inherited-loader-env scrub (run-qwen-serve.ts);
|
|
66
|
+
// only the dev harness (scripts/dev.js) stamps it into the launch env. A
|
|
67
|
+
// project file setting it would silently keep loader vars in the base env
|
|
68
|
+
// distributed to every workspace's session children — reopening the #8653
|
|
69
|
+
// vector for any repo whose .env happens to carry DEV=true.
|
|
70
|
+
"DEV"
|
|
71
|
+
];
|
|
72
|
+
var HARDCODED_PROJECT_ENV_EXCLUSIONS = new Set(
|
|
73
|
+
PROJECT_ENV_HARDCODED_EXCLUSIONS.map((key) => key.toLowerCase())
|
|
74
|
+
);
|
|
75
|
+
function isHardcodedProjectEnvExclusion(key) {
|
|
76
|
+
return HARDCODED_PROJECT_ENV_EXCLUSIONS.has(key.toLowerCase());
|
|
77
|
+
}
|
|
78
|
+
__name(isHardcodedProjectEnvExclusion, "isHardcodedProjectEnvExclusion");
|
|
79
|
+
var HOME_ENV_BOOTSTRAP_KEYS = [
|
|
80
|
+
"QWEN_HOME",
|
|
81
|
+
"QWEN_RUNTIME_DIR",
|
|
82
|
+
"QWEN_CODE_MCP_APPROVALS_PATH",
|
|
83
|
+
"QWEN_CODE_TRUSTED_FOLDERS_PATH"
|
|
84
|
+
];
|
|
85
|
+
var INHERITED_LOADER_ENV_KEYS = [
|
|
86
|
+
"NODE_OPTIONS",
|
|
87
|
+
// npm maps its `node-options` config onto npm_config_node_options in the
|
|
88
|
+
// environment, and `npm run` lifecycle scripts apply it like NODE_OPTIONS —
|
|
89
|
+
// the same hijack through an adjacent key. The config-file keys are the
|
|
90
|
+
// same hijack one level up: they point npm at an attacker-chosen .npmrc
|
|
91
|
+
// that can itself set node-options/script-shell/ignore-scripts, and `npm
|
|
92
|
+
// run` itself exports them into the script environment.
|
|
93
|
+
"npm_config_node_options",
|
|
94
|
+
"npm_config_userconfig",
|
|
95
|
+
"npm_config_globalconfig",
|
|
96
|
+
"npm_config_script_shell",
|
|
97
|
+
"npm_config_prefix",
|
|
98
|
+
"NODE_PATH",
|
|
99
|
+
"LD_PRELOAD",
|
|
100
|
+
"LD_AUDIT",
|
|
101
|
+
"DYLD_INSERT_LIBRARIES",
|
|
102
|
+
"BASH_ENV",
|
|
103
|
+
// zsh sources $ZDOTDIR/.zshenv on every invocation, including
|
|
104
|
+
// non-interactive `zsh -c` — the zsh analogue of BASH_ENV.
|
|
105
|
+
"ZDOTDIR"
|
|
106
|
+
// BASH_FUNC_* exported-function definitions are bash's other env-driven
|
|
107
|
+
// code-import channel (non-interactive `bash -c` still imports them);
|
|
108
|
+
// matched by prefix in isLoaderEnvKey, not listed here.
|
|
109
|
+
];
|
|
110
|
+
var canonicalLoaderKey = /* @__PURE__ */ __name((key) => key.toLowerCase().replace(/_/gu, "-"), "canonicalLoaderKey");
|
|
111
|
+
var LOADER_ENV_KEYS = new Set(
|
|
112
|
+
INHERITED_LOADER_ENV_KEYS.map(canonicalLoaderKey)
|
|
113
|
+
);
|
|
114
|
+
function isLoaderEnvKey(key) {
|
|
115
|
+
const canonical = canonicalLoaderKey(key);
|
|
116
|
+
return canonical.startsWith("bash-func-") || LOADER_ENV_KEYS.has(canonical);
|
|
117
|
+
}
|
|
118
|
+
__name(isLoaderEnvKey, "isLoaderEnvKey");
|
|
119
|
+
function scrubInheritedLoaderEnv(env) {
|
|
120
|
+
const removedKeys = [];
|
|
121
|
+
for (const key of Object.keys(env)) {
|
|
122
|
+
if (isLoaderEnvKey(key)) {
|
|
123
|
+
delete env[key];
|
|
124
|
+
removedKeys.push(key);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return removedKeys;
|
|
128
|
+
}
|
|
129
|
+
__name(scrubInheritedLoaderEnv, "scrubInheritedLoaderEnv");
|
|
130
|
+
function scrubAndReportInheritedLoaderEnv(env, commandLabel, processLabel) {
|
|
131
|
+
const removedKeys = scrubInheritedLoaderEnv(env);
|
|
132
|
+
if (removedKeys.length > 0) {
|
|
133
|
+
writeStderrLineSafe(
|
|
134
|
+
`${commandLabel}: scrubbed inherited loader env vars from the ${processLabel} process; session subprocesses will not inherit them: ${removedKeys.join(", ")}`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
return removedKeys;
|
|
138
|
+
}
|
|
139
|
+
__name(scrubAndReportInheritedLoaderEnv, "scrubAndReportInheritedLoaderEnv");
|
|
140
|
+
var reportedLoaderKeyRejections = /* @__PURE__ */ new Map();
|
|
141
|
+
var loaderKeyRejectionReporter;
|
|
142
|
+
function setLoaderKeyRejectionReporter(reporter) {
|
|
143
|
+
loaderKeyRejectionReporter = reporter;
|
|
144
|
+
}
|
|
145
|
+
__name(setLoaderKeyRejectionReporter, "setLoaderKeyRejectionReporter");
|
|
146
|
+
function reportRejectedLoaderKeys(source, candidateKeys) {
|
|
147
|
+
const rejectedKeys = candidateKeys.filter(isLoaderEnvKey);
|
|
148
|
+
const warnedKeys = reportedLoaderKeyRejections.get(source) ?? /* @__PURE__ */ new Set();
|
|
149
|
+
const freshKeys = rejectedKeys.filter((key) => !warnedKeys.has(key));
|
|
150
|
+
if (freshKeys.length === 0) return rejectedKeys;
|
|
151
|
+
for (const key of freshKeys) warnedKeys.add(key);
|
|
152
|
+
reportedLoaderKeyRejections.set(source, warnedKeys);
|
|
153
|
+
if (loaderKeyRejectionReporter) {
|
|
154
|
+
loaderKeyRejectionReporter(source, freshKeys);
|
|
155
|
+
} else {
|
|
156
|
+
writeStderrLineSafe(
|
|
157
|
+
`qwen: ${source} cannot set loader-affecting env vars; ignored: ` + freshKeys.join(", ")
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
return rejectedKeys;
|
|
161
|
+
}
|
|
162
|
+
__name(reportRejectedLoaderKeys, "reportRejectedLoaderKeys");
|
|
163
|
+
function resetLoaderKeyRejectionReportingForTesting() {
|
|
164
|
+
reportedLoaderKeyRejections.clear();
|
|
165
|
+
}
|
|
166
|
+
__name(resetLoaderKeyRejectionReportingForTesting, "resetLoaderKeyRejectionReportingForTesting");
|
|
167
|
+
|
|
168
|
+
// packages/cli/src/config/compile-cache.ts
|
|
169
|
+
init_esbuild_shims();
|
|
170
|
+
var PENDING_COMPILE_CACHE_ENV = "QWEN_CODE_PENDING_COMPILE_CACHE";
|
|
171
|
+
function publishPendingCompileCache(env = process.env) {
|
|
172
|
+
const pendingDirectory = env[PENDING_COMPILE_CACHE_ENV];
|
|
173
|
+
delete env[PENDING_COMPILE_CACHE_ENV];
|
|
174
|
+
if (pendingDirectory && !env["NODE_COMPILE_CACHE"] && env["NODE_DISABLE_COMPILE_CACHE"] !== "1") {
|
|
175
|
+
env["NODE_COMPILE_CACHE"] = pendingDirectory;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
__name(publishPendingCompileCache, "publishPendingCompileCache");
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
QWEN_CODE_SERVE_ENV,
|
|
182
|
+
QWEN_CODE_DESKTOP_ENV,
|
|
183
|
+
resolveAcpChannelFallback,
|
|
184
|
+
DEFAULT_EXCLUDED_ENV_VARS,
|
|
185
|
+
ENV_CORRUPTED_PATH,
|
|
186
|
+
ENV_WAS_RECOVERED,
|
|
187
|
+
ENV_ACP_REPEATED_TOOL_FAILURE_GUARD,
|
|
188
|
+
PROJECT_ENV_HARDCODED_EXCLUSIONS,
|
|
189
|
+
isHardcodedProjectEnvExclusion,
|
|
190
|
+
HOME_ENV_BOOTSTRAP_KEYS,
|
|
191
|
+
isLoaderEnvKey,
|
|
192
|
+
scrubInheritedLoaderEnv,
|
|
193
|
+
scrubAndReportInheritedLoaderEnv,
|
|
194
|
+
setLoaderKeyRejectionReporter,
|
|
195
|
+
reportRejectedLoaderKeys,
|
|
196
|
+
resetLoaderKeyRejectionReportingForTesting,
|
|
197
|
+
publishPendingCompileCache
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* @license
|
|
201
|
+
* Copyright 2026 Qwen Team
|
|
202
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
203
|
+
*/
|
|
204
|
+
/**
|
|
205
|
+
* @license
|
|
206
|
+
* Copyright 2025 Qwen Team
|
|
207
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
208
|
+
*/
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
t
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BL65MO72.js";
|
|
6
6
|
import {
|
|
7
7
|
SessionReferenceService,
|
|
8
8
|
SessionService,
|
|
9
9
|
readManyFiles,
|
|
10
10
|
stripTerminalControlSequences
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-47ZUMGGY.js";
|
|
12
12
|
import {
|
|
13
13
|
emptyMcpResourceText,
|
|
14
14
|
formatMcpResourceContents,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-ZPJWUGCS.js";
|
|
17
17
|
import {
|
|
18
18
|
shouldRunVisionBridge
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YGT2AUJ7.js";
|
|
20
20
|
import {
|
|
21
21
|
Storage,
|
|
22
22
|
getErrorMessage,
|
|
@@ -64,7 +64,7 @@ async function runExitCleanup(options = {}) {
|
|
|
64
64
|
}
|
|
65
65
|
__name(runExitCleanup, "runExitCleanup");
|
|
66
66
|
async function cleanupCheckpoints() {
|
|
67
|
-
const { Storage } = await import("./deferred-core-runtime-
|
|
67
|
+
const { Storage } = await import("./deferred-core-runtime-5SVUC6UC.js");
|
|
68
68
|
const storage = new Storage(process.cwd());
|
|
69
69
|
const tempDir = storage.getProjectTempDir();
|
|
70
70
|
const checkpointsDir = join(tempDir, "checkpoints");
|
|
@@ -15,20 +15,20 @@ import {
|
|
|
15
15
|
estimateCompactToolGroupHeight,
|
|
16
16
|
isCollapsibleTool,
|
|
17
17
|
wrapAnsi
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WH6QMLUW.js";
|
|
19
19
|
import {
|
|
20
20
|
disableMouseEvents,
|
|
21
21
|
enableMouseEvents,
|
|
22
22
|
useKeypress,
|
|
23
23
|
useKeypressContext
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VNNWAZSI.js";
|
|
25
25
|
import {
|
|
26
26
|
formatSupportedModes,
|
|
27
27
|
getCommandDisplayName,
|
|
28
28
|
getCommandSourceBadge,
|
|
29
29
|
getCommandSourceGroup,
|
|
30
30
|
getCommandSubcommandNames
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-T2O6NIOY.js";
|
|
32
32
|
import {
|
|
33
33
|
INLINE_CODE_SPAN_PATTERN_SOURCE,
|
|
34
34
|
calculateAverageLatency,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
readInlineMathSpanAt,
|
|
44
44
|
unescapeMarkdownBeforeMath,
|
|
45
45
|
unescapeMarkdownDollars
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DPMJLKUP.js";
|
|
47
47
|
import {
|
|
48
48
|
MINIMUM_MAX_HEIGHT,
|
|
49
49
|
MaxSizedBox
|
|
@@ -54,6 +54,10 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
require_jsx_runtime
|
|
56
56
|
} from "./chunk-SV5PQVQE.js";
|
|
57
|
+
import {
|
|
58
|
+
resolveColor,
|
|
59
|
+
themeManager
|
|
60
|
+
} from "./chunk-CTJLZLB5.js";
|
|
57
61
|
import {
|
|
58
62
|
Box_default,
|
|
59
63
|
Static,
|
|
@@ -72,17 +76,13 @@ import {
|
|
|
72
76
|
renderMermaidImageAsync,
|
|
73
77
|
renderTerminalImage,
|
|
74
78
|
wasKittyImageWritten
|
|
75
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-S6HYI3MF.js";
|
|
76
80
|
import {
|
|
77
81
|
formatInlineImageOverflow
|
|
78
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-PJRW65JO.js";
|
|
79
83
|
import {
|
|
80
84
|
relaunchApp
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import {
|
|
83
|
-
resolveColor,
|
|
84
|
-
themeManager
|
|
85
|
-
} from "./chunk-CTJLZLB5.js";
|
|
85
|
+
} from "./chunk-O277O7U6.js";
|
|
86
86
|
import {
|
|
87
87
|
cpLen,
|
|
88
88
|
cpSlice,
|
|
@@ -102,29 +102,29 @@ import {
|
|
|
102
102
|
import {
|
|
103
103
|
isTerminalGoalStatusKind
|
|
104
104
|
} from "./chunk-EKTCKZV5.js";
|
|
105
|
+
import {
|
|
106
|
+
formatDuration,
|
|
107
|
+
formatRelativeTime,
|
|
108
|
+
formatTokenCount
|
|
109
|
+
} from "./chunk-3SH53ANB.js";
|
|
105
110
|
import {
|
|
106
111
|
require_has_flag,
|
|
107
112
|
require_source
|
|
108
113
|
} from "./chunk-57OAHC2Y.js";
|
|
109
114
|
import {
|
|
110
115
|
createLoadedSettingsAdapter
|
|
111
|
-
} from "./chunk-
|
|
112
|
-
import {
|
|
113
|
-
formatDuration,
|
|
114
|
-
formatRelativeTime,
|
|
115
|
-
formatTokenCount
|
|
116
|
-
} from "./chunk-3SH53ANB.js";
|
|
116
|
+
} from "./chunk-AUWN7BAG.js";
|
|
117
117
|
import {
|
|
118
118
|
getPersistScopeForModelSelection
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-HKI3KHAO.js";
|
|
120
120
|
import {
|
|
121
121
|
getCurrentLanguage,
|
|
122
122
|
localizeToolDisplayName,
|
|
123
123
|
t
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-BL65MO72.js";
|
|
125
125
|
import {
|
|
126
126
|
isWorkspaceTrusted
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-YR7ZQ4RD.js";
|
|
128
128
|
import {
|
|
129
129
|
ALL_PROVIDERS,
|
|
130
130
|
IdeClient,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
resolveBaseUrl,
|
|
148
148
|
resolveMetadataKey,
|
|
149
149
|
resolveOwnsModel
|
|
150
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-47ZUMGGY.js";
|
|
151
151
|
import {
|
|
152
152
|
stripAnsi
|
|
153
153
|
} from "./chunk-TWPJO254.js";
|
|
@@ -155,20 +155,20 @@ import {
|
|
|
155
155
|
sanitizeForOsc,
|
|
156
156
|
supportsHyperlinks,
|
|
157
157
|
wrapForMultiplexer
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-3P2LV43B.js";
|
|
159
159
|
import {
|
|
160
160
|
MAIN_SOURCE,
|
|
161
161
|
formatVisionBridgeNoticeDisplay,
|
|
162
162
|
getMCPServerStatus,
|
|
163
163
|
isVisionBridgeNoticeDisplay,
|
|
164
164
|
uiTelemetryService
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-YGT2AUJ7.js";
|
|
166
166
|
import {
|
|
167
167
|
ToolDisplayNames,
|
|
168
168
|
ToolNames,
|
|
169
169
|
ToolNamesMigration,
|
|
170
170
|
isTerminalImageDisplay
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-PYQADEFD.js";
|
|
172
172
|
import {
|
|
173
173
|
createDebugLogger,
|
|
174
174
|
escapePath,
|
|
@@ -11884,7 +11884,15 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
|
|
|
11884
11884
|
key: "No, suggest changes (esc)"
|
|
11885
11885
|
});
|
|
11886
11886
|
bodyContent = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
|
|
11887
|
-
|
|
11887
|
+
infoProps.renderPromptAsPlainText ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
11888
|
+
MaxSizedBox,
|
|
11889
|
+
{
|
|
11890
|
+
maxHeight: availableBodyContentHeight(),
|
|
11891
|
+
maxWidth: warningContentWidth,
|
|
11892
|
+
overflowDirection: "bottom",
|
|
11893
|
+
children: infoProps.prompt.split("\n").map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, wrap: "wrap", children: line }) }, index))
|
|
11894
|
+
}
|
|
11895
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.link, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RenderInline, { text: infoProps.prompt, textColor: theme.text.link }) }),
|
|
11888
11896
|
displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
11889
11897
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text, { color: theme.text.primary, children: t("URLs to fetch:") }),
|
|
11890
11898
|
infoProps.urls.map((url) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Text, { children: [
|
|
@@ -12441,6 +12449,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12441
12449
|
name,
|
|
12442
12450
|
description,
|
|
12443
12451
|
resultDisplay,
|
|
12452
|
+
confirmationDetails,
|
|
12444
12453
|
images,
|
|
12445
12454
|
omittedImageCount,
|
|
12446
12455
|
visionBridgeNotice,
|
|
@@ -12535,7 +12544,11 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12535
12544
|
name,
|
|
12536
12545
|
status,
|
|
12537
12546
|
description,
|
|
12538
|
-
emphasis
|
|
12547
|
+
emphasis,
|
|
12548
|
+
hideDescription: status === "Confirming" /* Confirming */ && confirmationDetails?.type === "info" && confirmationDetails.renderPromptAsPlainText === true && isDescriptionRepeatedInPrompt(
|
|
12549
|
+
description,
|
|
12550
|
+
confirmationDetails.prompt
|
|
12551
|
+
)
|
|
12539
12552
|
}
|
|
12540
12553
|
),
|
|
12541
12554
|
shouldShowFocusHint && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { marginLeft: 1, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: theme.text.accent, children: isThisShellFocused ? "(Focused)" : "(ctrl+f to focus)" }) }),
|
|
@@ -12652,11 +12665,36 @@ var ToolMessage = /* @__PURE__ */ __name(({
|
|
|
12652
12665
|
) })
|
|
12653
12666
|
] });
|
|
12654
12667
|
}, "ToolMessage");
|
|
12668
|
+
function isDescriptionRepeatedInPrompt(description, prompt) {
|
|
12669
|
+
try {
|
|
12670
|
+
const parsed = JSON.parse(description);
|
|
12671
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
12672
|
+
return false;
|
|
12673
|
+
}
|
|
12674
|
+
const values = Object.values(parsed);
|
|
12675
|
+
if (values.length === 0 || !values.every((value) => typeof value === "string")) {
|
|
12676
|
+
return false;
|
|
12677
|
+
}
|
|
12678
|
+
const promptValues = prompt.split("\n").flatMap((line) => {
|
|
12679
|
+
try {
|
|
12680
|
+
const value = JSON.parse(line);
|
|
12681
|
+
return typeof value === "string" ? [value] : [];
|
|
12682
|
+
} catch {
|
|
12683
|
+
return [];
|
|
12684
|
+
}
|
|
12685
|
+
});
|
|
12686
|
+
return values.every((value) => promptValues.includes(value));
|
|
12687
|
+
} catch {
|
|
12688
|
+
return false;
|
|
12689
|
+
}
|
|
12690
|
+
}
|
|
12691
|
+
__name(isDescriptionRepeatedInPrompt, "isDescriptionRepeatedInPrompt");
|
|
12655
12692
|
var ToolInfo = /* @__PURE__ */ __name(({
|
|
12656
12693
|
name,
|
|
12657
12694
|
description,
|
|
12658
12695
|
status,
|
|
12659
|
-
emphasis
|
|
12696
|
+
emphasis,
|
|
12697
|
+
hideDescription
|
|
12660
12698
|
}) => {
|
|
12661
12699
|
const nameColor = import_react28.default.useMemo(() => {
|
|
12662
12700
|
switch (emphasis) {
|
|
@@ -12674,8 +12712,10 @@ var ToolInfo = /* @__PURE__ */ __name(({
|
|
|
12674
12712
|
}, [emphasis]);
|
|
12675
12713
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { wrap: "wrap", strikethrough: status === "Canceled" /* Canceled */, children: [
|
|
12676
12714
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: nameColor, bold: true, children: localizeToolDisplayName(name) }),
|
|
12677
|
-
|
|
12678
|
-
|
|
12715
|
+
!hideDescription && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
12716
|
+
" ",
|
|
12717
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Text, { color: theme.text.secondary, children: description })
|
|
12718
|
+
] })
|
|
12679
12719
|
] }) });
|
|
12680
12720
|
}, "ToolInfo");
|
|
12681
12721
|
var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { color: theme.text.primary, wrap: "truncate", children: [
|
|
@@ -16004,6 +16044,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
16004
16044
|
isEstimated,
|
|
16005
16045
|
showDetails = false
|
|
16006
16046
|
}) => {
|
|
16047
|
+
const hasTokenCount = totalTokens > 0;
|
|
16007
16048
|
const percentage = contextWindowSize > 0 ? totalTokens / contextWindowSize * 100 : 0;
|
|
16008
16049
|
const isOverLimit = percentage > 100;
|
|
16009
16050
|
const sortedBuiltinTools = [...builtinTools].sort(
|
|
@@ -16030,7 +16071,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
16030
16071
|
children: [
|
|
16031
16072
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, color: theme.text.accent, children: t("Context Usage") }),
|
|
16032
16073
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { height: 1 }),
|
|
16033
|
-
|
|
16074
|
+
!hasTokenCount ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
16034
16075
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, italic: true, children: t("No API response yet. Send a message to see actual usage.") }) }),
|
|
16035
16076
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Estimated pre-conversation overhead") }),
|
|
16036
16077
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { color: theme.text.secondary, children: [
|
|
@@ -16060,6 +16101,9 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
16060
16101
|
t("tokens")
|
|
16061
16102
|
] }) })
|
|
16062
16103
|
] }),
|
|
16104
|
+
isEstimated && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, italic: true, children: t(
|
|
16105
|
+
"Token usage is estimated until provider usage is received."
|
|
16106
|
+
) }) }),
|
|
16063
16107
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Box_default, { width: CONTENT_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
16064
16108
|
ProgressBar,
|
|
16065
16109
|
{
|
|
@@ -16154,7 +16198,7 @@ var ContextUsage = /* @__PURE__ */ __name(({
|
|
|
16154
16198
|
symbolColor: theme.text.accent
|
|
16155
16199
|
}
|
|
16156
16200
|
),
|
|
16157
|
-
|
|
16201
|
+
hasTokenCount && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
16158
16202
|
CategoryRow,
|
|
16159
16203
|
{
|
|
16160
16204
|
symbol: FILLED,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
MAX_INLINE_IMAGE_ENCODED_LENGTH
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PJRW65JO.js";
|
|
6
6
|
import {
|
|
7
7
|
MAX_TERMINAL_IMAGE_BYTES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PYQADEFD.js";
|
|
9
9
|
import {
|
|
10
10
|
init_esbuild_shims
|
|
11
11
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/core/src/core/openaiContentGenerator/prefix-caching.ts
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
var CACHE_KEY_PREFIX = "qwen-code:";
|
|
13
|
+
var EXPLICIT_BREAKPOINT_COUNT = 2;
|
|
14
|
+
function supportsOpenAIPrefixCaching(contentGeneratorConfig) {
|
|
15
|
+
return contentGeneratorConfig.authType === "openai" /* USE_OPENAI */ || contentGeneratorConfig.authType === "qwen-oauth" /* QWEN_OAUTH */;
|
|
16
|
+
}
|
|
17
|
+
__name(supportsOpenAIPrefixCaching, "supportsOpenAIPrefixCaching");
|
|
18
|
+
function isOfficialOpenAIEndpoint(contentGeneratorConfig) {
|
|
19
|
+
if (contentGeneratorConfig.authType !== "openai" /* USE_OPENAI */) return false;
|
|
20
|
+
const { baseUrl } = contentGeneratorConfig;
|
|
21
|
+
if (!baseUrl) return false;
|
|
22
|
+
try {
|
|
23
|
+
return new URL(baseUrl).hostname.toLowerCase() === "api.openai.com";
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
__name(isOfficialOpenAIEndpoint, "isOfficialOpenAIEndpoint");
|
|
29
|
+
function supportsExplicitOpenAIPromptCaching(model) {
|
|
30
|
+
const match = /^gpt-(\d+)(?:\.(\d+))?(?:[-.]|$)/i.exec(model);
|
|
31
|
+
if (!match) return false;
|
|
32
|
+
const major = Number(match[1]);
|
|
33
|
+
const minor = Number(match[2] ?? 0);
|
|
34
|
+
return major > 5 || major === 5 && minor >= 6;
|
|
35
|
+
}
|
|
36
|
+
__name(supportsExplicitOpenAIPromptCaching, "supportsExplicitOpenAIPromptCaching");
|
|
37
|
+
function withCacheBreakpoint(message) {
|
|
38
|
+
if (message.role !== "user" && message.role !== "tool") return void 0;
|
|
39
|
+
const marker = { prompt_cache_breakpoint: { mode: "explicit" } };
|
|
40
|
+
if (typeof message.content === "string") {
|
|
41
|
+
return {
|
|
42
|
+
...message,
|
|
43
|
+
content: [{ type: "text", text: message.content, ...marker }]
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (!Array.isArray(message.content) || message.content.length === 0) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
49
|
+
const content = [...message.content];
|
|
50
|
+
const lastIndex = content.length - 1;
|
|
51
|
+
content[lastIndex] = { ...content[lastIndex], ...marker };
|
|
52
|
+
return { ...message, content };
|
|
53
|
+
}
|
|
54
|
+
__name(withCacheBreakpoint, "withCacheBreakpoint");
|
|
55
|
+
function applyOfficialOpenAIPromptCaching(request, sessionId, cacheSharing, cacheKeyPartition) {
|
|
56
|
+
const result = { ...request };
|
|
57
|
+
if (sessionId && !result.prompt_cache_key) {
|
|
58
|
+
const partition = cacheKeyPartition ? `:${cacheKeyPartition}` : "";
|
|
59
|
+
result.prompt_cache_key = `${CACHE_KEY_PREFIX}${sessionId}${partition}`;
|
|
60
|
+
}
|
|
61
|
+
if (!cacheSharing || !supportsExplicitOpenAIPromptCaching(request.model)) {
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
const messages = [...request.messages];
|
|
65
|
+
let marked = 0;
|
|
66
|
+
for (let index = messages.length - 2; index >= 0 && marked < EXPLICIT_BREAKPOINT_COUNT; index -= 1) {
|
|
67
|
+
const message = messages[index];
|
|
68
|
+
const updated = message ? withCacheBreakpoint(message) : void 0;
|
|
69
|
+
if (!updated) continue;
|
|
70
|
+
messages[index] = updated;
|
|
71
|
+
marked += 1;
|
|
72
|
+
}
|
|
73
|
+
if (marked === 0) return result;
|
|
74
|
+
result.messages = messages;
|
|
75
|
+
result.prompt_cache_options = {
|
|
76
|
+
...result.prompt_cache_options,
|
|
77
|
+
mode: "explicit"
|
|
78
|
+
};
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
__name(applyOfficialOpenAIPromptCaching, "applyOfficialOpenAIPromptCaching");
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
supportsOpenAIPrefixCaching,
|
|
85
|
+
isOfficialOpenAIEndpoint,
|
|
86
|
+
applyOfficialOpenAIPromptCaching
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* @license
|
|
90
|
+
* Copyright 2025 Qwen
|
|
91
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
92
|
+
*/
|