@qwen-code/qwen-code 0.19.6-nightly.20260707.bcdb44c5d → 0.19.6-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +17 -9
- package/bundled/qc-helper/docs/features/channels/wecom.md +111 -0
- package/bundled/qc-helper/docs/features/code-review.md +0 -4
- package/bundled/review/DESIGN.md +0 -4
- package/bundled/review/SKILL.md +2 -29
- package/chunks/{MaxSizedBox-EFDCCPYQ.js → MaxSizedBox-2JOX4MMR.js} +11 -9
- package/chunks/{StandaloneSessionPicker-5TQG34MY.js → StandaloneSessionPicker-Z2G37ETA.js} +24 -21
- package/chunks/{acpAgent-KQT52XWB.js → acpAgent-MQJT2H4Y.js} +74 -49
- package/chunks/{agent-RL2YOM2V.js → agent-HEVJ76EO.js} +6 -6
- package/chunks/{agent-headless-SCVFLRZ3.js → agent-headless-UNB5SWYC.js} +6 -6
- package/chunks/{anthropicContentGenerator-PPPLABT5.js → anthropicContentGenerator-AKYPSZIV.js} +3 -3
- package/chunks/{artifact-tool-H2TNPNP5.js → artifact-tool-D233YJFH.js} +25 -6
- package/chunks/{bridge-G3LFYH2D.js → bridge-GX2LGQDS.js} +11 -9
- package/chunks/{channel-worker-supervisor-B7MSMB5K.js → channel-worker-supervisor-CRCVYQIE.js} +1 -1
- package/chunks/{chunk-XUYYEFCM.js → chunk-27QGW3BK.js} +5 -5
- package/chunks/{chunk-HLJMZYTD.js → chunk-2D5Q33PT.js} +3 -3
- package/chunks/{chunk-TNIZ2HCQ.js → chunk-2MDHTI6A.js} +2 -2
- package/chunks/{chunk-VCKMHAEZ.js → chunk-2MJAXDFK.js} +6 -6
- package/chunks/{chunk-WSVZFWN4.js → chunk-2NPS2UDH.js} +305 -97
- package/chunks/{chunk-WAVK7GV6.js → chunk-2X3ZVAAT.js} +2 -2
- package/chunks/chunk-332PWN27.js +19 -0
- package/chunks/{chunk-FVMWEHWU.js → chunk-3B26UVCX.js} +114 -12
- package/chunks/{chunk-XZ2LJL4O.js → chunk-43W4YSO6.js} +1 -12
- package/chunks/{chunk-DLHOIROF.js → chunk-44NROQYV.js} +4 -2
- package/chunks/{chunk-65P5ZXUE.js → chunk-4XV2MRNK.js} +1 -1
- package/chunks/{chunk-DS6NG7SB.js → chunk-5HMMLTUD.js} +11 -11
- package/chunks/{chunk-A2CS67WK.js → chunk-5IGNZP2J.js} +1 -1
- package/chunks/{chunk-N7BUPX4V.js → chunk-6GHEZDDX.js} +1 -1
- package/chunks/{chunk-QU6OLW25.js → chunk-7O6DD2ES.js} +1 -1
- package/chunks/{chunk-RXDYWLOG.js → chunk-7R62CLMI.js} +4 -4
- package/chunks/{chunk-2BJWUJCW.js → chunk-7SAH6M3Y.js} +3 -3
- package/chunks/{chunk-OGAC66WF.js → chunk-7VCI24VZ.js} +4 -107
- package/chunks/chunk-A2X3KLC3.js +3807 -0
- package/chunks/chunk-A3ZQMFO6.js +949 -0
- package/chunks/{chunk-AY7CP32Q.js → chunk-A7UKINBT.js} +7 -7
- package/chunks/{chunk-72DDO73Z.js → chunk-ADO6IDOZ.js} +8 -8
- package/chunks/{chunk-UOGOM4NJ.js → chunk-AJ3CEJRJ.js} +10 -5
- package/chunks/{chunk-NCFY7PWS.js → chunk-CCGOFQV3.js} +51 -2
- package/chunks/{chunk-YFE4YEDW.js → chunk-DB7CZERZ.js} +1 -1
- package/chunks/{chunk-UECJ7AG2.js → chunk-DF74IL3R.js} +4 -4
- package/chunks/{chunk-7YLLBKDB.js → chunk-FCEHOKYP.js} +5 -5
- package/chunks/{chunk-JO6RDLLE.js → chunk-FRR5I3SQ.js} +1 -1
- package/chunks/{chunk-2NL7ED5Q.js → chunk-FV7425LN.js} +22 -1
- package/chunks/{chunk-NCOLCOA6.js → chunk-GPLKAQUX.js} +8 -8
- package/chunks/{chunk-AKGA72ZM.js → chunk-GV2S4F6Q.js} +5 -3
- package/chunks/{chunk-V63Q7BVE.js → chunk-GW67O5SO.js} +1 -1
- package/chunks/{chunk-2A6XOMBQ.js → chunk-HW4N45EE.js} +0 -44
- package/chunks/{chunk-S6PM5JQZ.js → chunk-IFDJAMJW.js} +484 -1222
- package/chunks/{chunk-B2FUQ22Z.js → chunk-ILFQAFWH.js} +1 -1
- package/chunks/chunk-JYFZFWSL.js +167 -0
- package/chunks/{chunk-CA373SPN.js → chunk-K56RTEBN.js} +1 -1
- package/chunks/chunk-LGFAYIKX.js +115 -0
- package/chunks/{chunk-6JESGXWU.js → chunk-LLTFLVFK.js} +4 -4
- package/chunks/{chunk-3A4MUHRP.js → chunk-MZWODTEA.js} +5 -13
- package/chunks/{chunk-IPKM25FZ.js → chunk-N33JAGJ7.js} +505 -62
- package/chunks/{chunk-B2NCNYBK.js → chunk-NVQVIJMO.js} +112 -42
- package/chunks/{chunk-INNPK6XG.js → chunk-O6T7PBUM.js} +30 -6
- package/chunks/{chunk-RN36CE4M.js → chunk-P452E6XF.js} +2 -2
- package/chunks/chunk-PS2NG7KU.js +262 -0
- package/chunks/{chunk-FTEFJT6V.js → chunk-QM4FKX7H.js} +2 -2
- package/chunks/chunk-RODQXLGZ.js +28 -0
- package/chunks/{chunk-KSPVDFE4.js → chunk-SAIILPQ3.js} +0 -3
- package/chunks/{chunk-EKDTGEX4.js → chunk-SJ3QRPN2.js} +14 -8
- package/chunks/{chunk-R57UD732.js → chunk-SKO6VJHG.js} +16 -4
- package/chunks/{chunk-66KNL43D.js → chunk-TBAZMRW3.js} +1 -1
- package/chunks/{chunk-H2UZO2II.js → chunk-TPTG52XG.js} +1 -1
- package/chunks/chunk-UIDXQNMV.js +13 -0
- package/chunks/chunk-VP2FB7OC.js +8223 -0
- package/chunks/{chunk-32KIF557.js → chunk-WKBA74DD.js} +1 -1
- package/chunks/{chunk-IEFMDFCG.js → chunk-WKTLDGD6.js} +1 -1
- package/chunks/{chunk-HT553O4R.js → chunk-WRLMLPWI.js} +3 -3
- package/chunks/{chunk-CYXPEKVN.js → chunk-XXICIIS5.js} +5 -5
- package/chunks/{chunk-5GSUPP7K.js → chunk-Y3QQV7WE.js} +2 -2
- package/chunks/{chunk-CKBRK552.js → chunk-ZKX7IBXU.js} +4 -4
- package/chunks/{chunk-CCPKBMZ4.js → chunk-ZOSL7K3L.js} +203 -38
- package/chunks/{chunk-KD4KV6XW.js → chunk-ZWFS7YCB.js} +4505 -3850
- package/chunks/{computer-use-NKJX6RTG.js → computer-use-IQ46C3YP.js} +6 -6
- package/chunks/{contextCommand-BCABFW4A.js → contextCommand-TTT6AP2W.js} +10 -9
- package/chunks/{cron-create-DDYU4DIR.js → cron-create-JSXEIPVS.js} +1 -1
- package/chunks/{cron-delete-DFKOUZWN.js → cron-delete-OIFVEPGU.js} +1 -1
- package/chunks/{cron-list-ME5QGAR5.js → cron-list-D4ZX4IOE.js} +1 -1
- package/chunks/{daemon-XWG2EGFX.js → daemon-F3I2RXP6.js} +23 -3
- package/chunks/{daemon-status-provider-V7BMA4EH.js → daemon-status-provider-5GAWK65R.js} +13 -12
- package/chunks/dist-573HNSVO.js +3217 -0
- package/chunks/{dist-VHBP2PIG.js → dist-FQ5WRJPL.js} +2 -2
- package/chunks/{dist-LPVU3L2M.js → dist-IMFFBMAT.js} +6 -3792
- package/chunks/{dist-7GU63KI5.js → dist-OT7G2WNM.js} +1 -1
- package/chunks/{dist-H4HHZYCI.js → dist-PKFTNUHO.js} +2 -2
- package/chunks/{dist-3UDX5T4T.js → dist-YTRKAVUB.js} +1 -1
- package/chunks/{earlyInputCapture-TVECMHWI.js → earlyInputCapture-LAGZUGGV.js} +6 -6
- package/chunks/{edit-VKUCEX2N.js → edit-Q5BUQC2S.js} +6 -6
- package/chunks/{en-AXARKOWO.js → en-GA2RMXY5.js} +5 -1
- package/chunks/{enter-worktree-TF6N7GA7.js → enter-worktree-DC4FHMVF.js} +6 -6
- package/chunks/{enterPlanMode-XXQGZP5T.js → enterPlanMode-5BGJBWIY.js} +6 -6
- package/chunks/{errors-LLC2B5D6.js → errors-EGX5DECS.js} +8 -8
- package/chunks/{exit-worktree-YBOMMZLI.js → exit-worktree-2EOSZNZI.js} +6 -6
- package/chunks/{exitPlanMode-74D7EOBH.js → exitPlanMode-JAQ35ELJ.js} +6 -6
- package/chunks/{fast-path-OGY4P74O.js → fast-path-QEWDA6O6.js} +5 -2
- package/chunks/{fr-MBMNQSQ6.js → fr-GWNQG4XH.js} +4 -0
- package/chunks/{gemini-IL6H4VNW.js → gemini-TQ5XANRS.js} +64 -187
- package/chunks/{geminiContentGenerator-O7OCAUQU.js → geminiContentGenerator-DCM2XGDQ.js} +1 -1
- package/chunks/{glob-X5XFJTAC.js → glob-7JLTQ4IQ.js} +6 -6
- package/chunks/{grep-53GLRSNS.js → grep-CAUXEO7Q.js} +6 -6
- package/chunks/handleAutoUpdate-XKXULZQX.js +65 -0
- package/chunks/{initializer-YBUEYP6D.js → initializer-3NRWU5JV.js} +12 -10
- package/chunks/{ja-HFV5QCHR.js → ja-2HOTA47X.js} +4 -0
- package/chunks/{list-2F3FSN46.js → list-NWO6QBDQ.js} +12 -12
- package/chunks/{loadedSettingsAdapter-AJBE627U.js → loadedSettingsAdapter-PJ77LGFS.js} +10 -10
- package/chunks/{loop-wakeup-ZW5P6VPY.js → loop-wakeup-OHWEMFP5.js} +2 -2
- package/chunks/{mcp-SEE2Z7TA.js → mcp-VFEHVF5A.js} +10 -10
- package/chunks/{monitor-YQW2M3DL.js → monitor-FY2ITVSC.js} +14 -9
- package/chunks/{nonInteractiveCli-TGWJDY47.js → nonInteractiveCli-KPCXTVWY.js} +41 -36
- package/chunks/{notebook-edit-O5G3EBYN.js → notebook-edit-BSJMXIWX.js} +6 -6
- package/chunks/{openaiContentGenerator-WAO7PPR6.js → openaiContentGenerator-BA6NWY4S.js} +5 -5
- package/chunks/{pidfile-XMDB2SF7.js → pidfile-WXMRN6QF.js} +6 -6
- package/chunks/{qwenContentGenerator-5NZ5EHRA.js → qwenContentGenerator-U4ZSLGFN.js} +8 -8
- package/chunks/{read-file-KJTMBLFF.js → read-file-VMVHNOMA.js} +2 -2
- package/chunks/{ripGrep-BCDYVQQR.js → ripGrep-NC6MUWXN.js} +6 -6
- package/chunks/{run-qwen-serve-LIWM3CMV.js → run-qwen-serve-NQH6LQTH.js} +124 -31
- package/chunks/{scheduler-VETDW3HX.js → scheduler-35T3E2UQ.js} +6 -6
- package/chunks/{serve-XKFTUZET.js → serve-C36LOB5N.js} +10 -10
- package/chunks/{server-W64GXOEJ.js → server-TDFPIDC3.js} +858 -105
- package/chunks/{session-GXNRZGVF.js → session-STHNQGRJ.js} +42 -37
- package/chunks/{settings-TIQCDHBZ.js → settings-GIE22AYF.js} +9 -9
- package/chunks/{shell-3ZZLLA35.js → shell-JD52AIMU.js} +6 -6
- package/chunks/{skill-TOX5QGBX.js → skill-L4IFKRQ5.js} +14 -4
- package/chunks/{spawnChannel-JBLAIP7L.js → spawnChannel-HGMOEPM7.js} +8 -8
- package/chunks/{src-Q7BIRWUP.js → src-3SNF3G3V.js} +15 -7
- package/chunks/{startInteractiveUI-PP72WI64.js → startInteractiveUI-C7DCDHGF.js} +4981 -13173
- package/chunks/{team-create-S44Z3N62.js → team-create-NYL7KAMA.js} +6 -6
- package/chunks/{team-plan-approval-2YPLSLO5.js → team-plan-approval-LH65JBEH.js} +6 -6
- package/chunks/{theme-manager-4MJVYHPB.js → theme-manager-ANKQO5DR.js} +6 -6
- package/chunks/{tool-search-4LSRQ24Z.js → tool-search-WZEGJFO4.js} +4 -21
- package/chunks/{trustedFolders-XMKLRQDH.js → trustedFolders-HECAG3S3.js} +7 -7
- package/chunks/updateCheck-72BBAE5V.js +65 -0
- package/chunks/{validateNonInterActiveAuth-MMMRF6WS.js → validateNonInterActiveAuth-PDQCPSNA.js} +38 -33
- package/chunks/{version-6HMEMR4K.js → version-VSEUTPNM.js} +2 -1
- package/chunks/{workflow-VYBLLOLC.js → workflow-DPF2CL7U.js} +7 -7
- package/chunks/{workspace-providers-status-5LSCQPWQ.js → workspace-providers-status-TQ23DQ2D.js} +12 -12
- package/chunks/{workspace-service-HBMBWJ4K.js → workspace-service-D34UDMEY.js} +14 -14
- package/chunks/{workspace-skills-status-TLBAQWKQ.js → workspace-skills-status-4DR5UNNC.js} +11 -11
- package/chunks/{write-file-QMAWLWCT.js → write-file-VFNAKGYM.js} +6 -6
- package/chunks/{zh-RS3HZHFH.js → zh-7XVVRTDH.js} +5 -1
- package/chunks/{zh-TW-L5GRQ4S4.js → zh-TW-DPH554OG.js} +5 -1
- package/cli.js +11 -11
- package/locales/en.js +8 -2
- package/locales/fr.js +6 -0
- package/locales/ja.js +6 -0
- package/locales/zh-TW.js +8 -2
- package/locales/zh.js +8 -2
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CqwzD3ok.js → arc-C7hjaa7g.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BfA-P0-O.js → architectureDiagram-3BPJPVTR-pm9KtMZY.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-DNTzkXRp.js → blockDiagram-GPEHLZMM-CApElKsU.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-D5axQoXQ.js → c4Diagram-AAUBKEIU-BeDe0-9N.js} +1 -1
- package/web-shell/assets/channel-BNf1dW-j.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CV0P48eN.js → chunk-2J33WTMH-DJEkmLdl.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-CghJNPCS.js → chunk-4BX2VUAB-DXX8gdpe.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BrD-776x.js → chunk-55IACEB6-DORmk1kQ.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DLKkI5Yu.js → chunk-727SXJPM-DWmO4mCZ.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-C0HWhZNK.js → chunk-AQP2D5EJ-C7LRaYw2.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-Cg6PsiNL.js → chunk-FMBD7UC4-CCdXgyC5.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-B1pCuSlf.js → chunk-ND2GUHAM-SyL_xvWc.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CkE8llI2.js → chunk-QZHKN3VN-BzOuCKxa.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-Btr-W-vN.js → cose-bilkent-S5V4N54A-BMPWyDKc.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CAhjVa5L.js → dagre-BM42HDAG-B_GnPWik.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-eUQodUXw.js → diagram-2AECGRRQ-fJqMc3S_.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BiPKbH6E.js → diagram-5GNKFQAL-ximV3O9D.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DxuwR-Pu.js → diagram-KO2AKTUF-2vVyjzqw.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-nz9SQ3Az.js → diagram-LMA3HP47-Dckcx1sT.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-UBbYk-Jq.js → diagram-OG6HWLK6-BAVv47ga.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BLpRQmgi.js → erDiagram-TEJ5UH35-Bn3nf5J0.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C5Qqg1hx.js → flowDiagram-I6XJVG4X-BIbGF9JT.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BMdf3kjL.js → ganttDiagram-6RSMTGT7-CDbhb3AH.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-D9qG7BKD.js → gitGraphDiagram-PVQCEYII-CbKG1a_w.js} +1 -1
- package/web-shell/assets/index-CnE2ur2L.js +779 -0
- package/web-shell/assets/index-hSKXrlSE.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CtDBPJM8.js → infoDiagram-5YYISTIA-DUFxTy8m.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BQaS7H3_.js → ishikawaDiagram-YF4QCWOH-D69hrBG8.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-CEEujCNX.js → journeyDiagram-JHISSGLW-DsvEw51Y.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-B3QqyyNi.js → kanban-definition-UN3LZRKU-lFFjZEYd.js} +1 -1
- package/web-shell/assets/{linear-DC2Azd_6.js → linear-Bo5bWzvo.js} +1 -1
- package/web-shell/assets/{mermaid.core-DL5PRmh-.js → mermaid.core-C_HKMJx5.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DGlkd_fb.js → mindmap-definition-RKZ34NQL-DlV-NUTs.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-Dew4R8DT.js → pieDiagram-4H26LBE5-B2e6FH2a.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Bk02Tejc.js → quadrantDiagram-W4KKPZXB-D75kSk-b.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-BkWJE-6M.js → requirementDiagram-4Y6WPE33-CQ6xakhM.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BM9bZAuM.js → sankeyDiagram-5OEKKPKP-J_XTKrcY.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-IaE2rOTu.js → sequenceDiagram-3UESZ5HK-D7jTcBtf.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CQH-ENFJ.js → stateDiagram-AJRCARHV-CrlM_OT3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DVH5FaeF.js → timeline-definition-PNZ67QCA-5oZi76Ef.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-ChT6J8JT.js → vennDiagram-CIIHVFJN-DO5YptPK.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D9W5AEjE.js → wardley-L42UT6IY-4t1eJDvM.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-cNYKmuIA.js → wardleyDiagram-YWT4CUSO-DKZc661S.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BleLm4BJ.js → xychartDiagram-2RQKCTM6-su9hp08G.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-EyH7BS8F.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CPWvwYMM.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CPWvwYMM.js +0 -1
- package/web-shell/assets/index-CgttHpqB.js +0 -763
- package/web-shell/assets/index-sVELoa_9.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CFqBlFdE.js +0 -1
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
buildPermissionSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6GHEZDDX.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveVoiceStreamConfig,
|
|
8
8
|
resolveVoiceTranscriptionConfig,
|
|
9
9
|
transcribeVoiceAudio
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WKTLDGD6.js";
|
|
11
11
|
import {
|
|
12
12
|
getVoiceSettingsScope,
|
|
13
13
|
isSelectableVoiceModel,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
readVoiceMode,
|
|
17
17
|
readVoiceModel,
|
|
18
18
|
resolveVoiceTransport
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ILFQAFWH.js";
|
|
20
20
|
import {
|
|
21
21
|
WorkspacePermissionRulesSessionRequiredError,
|
|
22
22
|
WorkspaceSettingsPartialPersistError
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
getPersistScopeForModelSelection,
|
|
26
26
|
loadSettings
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-O6T7PBUM.js";
|
|
28
28
|
import {
|
|
29
29
|
MCP_RESTART_SERVER_DEADLINE_MS
|
|
30
30
|
} from "./chunk-P7M4GA57.js";
|
|
@@ -49,16 +49,16 @@ import {
|
|
|
49
49
|
createIdleWorkspaceProvidersStatus,
|
|
50
50
|
createIdleWorkspaceSkillsStatus,
|
|
51
51
|
mapDomainErrorToErrorKind
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-7O6DD2ES.js";
|
|
53
53
|
import {
|
|
54
54
|
getWorkspaceTrustStatus
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-WKBA74DD.js";
|
|
56
56
|
import {
|
|
57
57
|
writeStderrLine
|
|
58
58
|
} from "./chunk-Y6Z2O3WR.js";
|
|
59
59
|
import {
|
|
60
60
|
ModelsConfig
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
62
62
|
import {
|
|
63
63
|
createDebugLogger
|
|
64
64
|
} from "./chunk-22MNNNXE.js";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
handleAtCommand,
|
|
5
5
|
resolveAtCommandQuery,
|
|
6
6
|
sanitizeDisplayText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LLTFLVFK.js";
|
|
8
8
|
import {
|
|
9
9
|
isAtCommand,
|
|
10
10
|
isBtwCommand,
|
|
11
11
|
isSlashCommand,
|
|
12
12
|
normalizePartList,
|
|
13
13
|
recordGoalStatusItem
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IFDJAMJW.js";
|
|
15
15
|
import {
|
|
16
16
|
SHELL_COMMAND_NAME,
|
|
17
17
|
fitPendingSlice,
|
|
18
18
|
useSessionStats
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7R62CLMI.js";
|
|
20
20
|
import {
|
|
21
21
|
require_react
|
|
22
22
|
} from "./chunk-KYMBIKIW.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
} from "./chunk-KHDZHZMH.js";
|
|
29
29
|
import {
|
|
30
30
|
isInlineModelOverrideAllowed
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QM4FKX7H.js";
|
|
32
32
|
import {
|
|
33
33
|
t
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2MJAXDFK.js";
|
|
35
35
|
import {
|
|
36
36
|
AutonomousLoopTickResolver,
|
|
37
37
|
CoreToolScheduler,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
setActiveGoal,
|
|
54
54
|
shouldRunVisionBridge,
|
|
55
55
|
splitImageParts
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
57
57
|
import {
|
|
58
58
|
ApiCancelEvent,
|
|
59
59
|
ConversationFinishedEvent,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
logConversationFinishedEvent,
|
|
64
64
|
logUserPrompt,
|
|
65
65
|
logUserRetry
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-N33JAGJ7.js";
|
|
67
67
|
import {
|
|
68
68
|
isAnyAutoMemPath
|
|
69
69
|
} from "./chunk-4KJ2BPIT.js";
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
import {
|
|
74
74
|
getUnsupportedImageFormatWarning,
|
|
75
75
|
isSupportedImageMimeType
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-HW4N45EE.js";
|
|
77
77
|
import {
|
|
78
78
|
FinishReason
|
|
79
79
|
} from "./chunk-55ZMG67I.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-Y6Z2O3WR.js";
|
|
9
9
|
import {
|
|
10
10
|
getActiveGoal
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
12
12
|
import {
|
|
13
13
|
ToolNames
|
|
14
14
|
} from "./chunk-X3YGAX7V.js";
|
|
@@ -136,12 +136,16 @@ var MessageEmitter = class extends BaseEmitter {
|
|
|
136
136
|
* @param text - The user message text content
|
|
137
137
|
* @param timestamp - Optional server-side timestamp (ISO string or ms) for message ordering
|
|
138
138
|
*/
|
|
139
|
-
async emitUserMessage(text, timestamp) {
|
|
139
|
+
async emitUserMessage(text, timestamp, options = {}) {
|
|
140
140
|
const epochMs = BaseEmitter.toEpochMs(timestamp);
|
|
141
|
+
const _meta = {
|
|
142
|
+
...epochMs != null ? { timestamp: epochMs } : {},
|
|
143
|
+
...options.source ? { source: options.source } : {}
|
|
144
|
+
};
|
|
141
145
|
await this.sendUpdate({
|
|
142
146
|
sessionUpdate: "user_message_chunk",
|
|
143
147
|
content: { type: "text", text },
|
|
144
|
-
...
|
|
148
|
+
...Object.keys(_meta).length > 0 ? { _meta } : {}
|
|
145
149
|
});
|
|
146
150
|
}
|
|
147
151
|
/**
|
|
@@ -734,7 +738,8 @@ var HistoryReplayer = class {
|
|
|
734
738
|
if (displayText) {
|
|
735
739
|
await this.messageEmitter.emitUserMessage(
|
|
736
740
|
displayText,
|
|
737
|
-
record.timestamp
|
|
741
|
+
record.timestamp,
|
|
742
|
+
record.subtype === "cron" ? { source: "cron" } : void 0
|
|
738
743
|
);
|
|
739
744
|
}
|
|
740
745
|
break;
|
|
@@ -1598,7 +1603,7 @@ async function extractMetadata(conversation, config) {
|
|
|
1598
1603
|
const gitBranch = firstRecord?.gitBranch;
|
|
1599
1604
|
let gitRepo;
|
|
1600
1605
|
if (cwd) {
|
|
1601
|
-
const { getGitRepoName } = await import("./src-
|
|
1606
|
+
const { getGitRepoName } = await import("./src-3SNF3G3V.js");
|
|
1602
1607
|
gitRepo = getGitRepoName(cwd);
|
|
1603
1608
|
}
|
|
1604
1609
|
let model;
|
|
@@ -10,6 +10,53 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-J2S4EL5Y.js";
|
|
12
12
|
|
|
13
|
+
// packages/core/src/utils/request-tokenizer/textTokenizer.ts
|
|
14
|
+
init_esbuild_shims();
|
|
15
|
+
function estimateTextTokens(text) {
|
|
16
|
+
if (!text || text.length === 0) {
|
|
17
|
+
return 0;
|
|
18
|
+
}
|
|
19
|
+
let asciiChars = 0;
|
|
20
|
+
let nonAsciiChars = 0;
|
|
21
|
+
for (let i = 0; i < text.length; i++) {
|
|
22
|
+
const charCode = text.charCodeAt(i);
|
|
23
|
+
if (charCode < 128) {
|
|
24
|
+
asciiChars++;
|
|
25
|
+
} else {
|
|
26
|
+
nonAsciiChars++;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const tokens = asciiChars / 4 + nonAsciiChars * 1.1;
|
|
30
|
+
return Math.ceil(tokens);
|
|
31
|
+
}
|
|
32
|
+
__name(estimateTextTokens, "estimateTextTokens");
|
|
33
|
+
var TextTokenizer = class {
|
|
34
|
+
static {
|
|
35
|
+
__name(this, "TextTokenizer");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Calculate tokens for text content
|
|
39
|
+
*
|
|
40
|
+
* @param text - The text to estimate tokens for
|
|
41
|
+
* @returns The estimated token count
|
|
42
|
+
*/
|
|
43
|
+
async calculateTokens(text) {
|
|
44
|
+
return this.calculateTokensSync(text);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Calculate tokens for multiple text strings
|
|
48
|
+
*
|
|
49
|
+
* @param texts - Array of text strings to estimate tokens for
|
|
50
|
+
* @returns Array of token counts corresponding to each input text
|
|
51
|
+
*/
|
|
52
|
+
async calculateTokensBatch(texts) {
|
|
53
|
+
return texts.map((text) => this.calculateTokensSync(text));
|
|
54
|
+
}
|
|
55
|
+
calculateTokensSync(text) {
|
|
56
|
+
return estimateTextTokens(text);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
13
60
|
// packages/core/src/utils/runtimeDiagnostics.ts
|
|
14
61
|
init_esbuild_shims();
|
|
15
62
|
var RUNTIME_PROFILE_ENV = "QWEN_CODE_PROFILE_RUNTIME";
|
|
@@ -1193,6 +1240,8 @@ function toOpenAPI30(schema) {
|
|
|
1193
1240
|
__name(toOpenAPI30, "toOpenAPI30");
|
|
1194
1241
|
|
|
1195
1242
|
export {
|
|
1243
|
+
estimateTextTokens,
|
|
1244
|
+
TextTokenizer,
|
|
1196
1245
|
safeJsonParse,
|
|
1197
1246
|
convertSchema,
|
|
1198
1247
|
isRuntimeDiagnosticsEnabled,
|
|
@@ -1203,12 +1252,12 @@ export {
|
|
|
1203
1252
|
};
|
|
1204
1253
|
/**
|
|
1205
1254
|
* @license
|
|
1206
|
-
* Copyright
|
|
1255
|
+
* Copyright 2025 Qwen
|
|
1207
1256
|
* SPDX-License-Identifier: Apache-2.0
|
|
1208
1257
|
*/
|
|
1209
1258
|
/**
|
|
1210
1259
|
* @license
|
|
1211
|
-
* Copyright
|
|
1260
|
+
* Copyright 2026 Qwen
|
|
1212
1261
|
* SPDX-License-Identifier: Apache-2.0
|
|
1213
1262
|
*/
|
|
1214
1263
|
/**
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
TaggedThinkingParser,
|
|
6
6
|
getRateLimitErrorDetails,
|
|
7
7
|
openaiRequestCaptureContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-N33JAGJ7.js";
|
|
9
9
|
import {
|
|
10
10
|
RequestTokenizer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-44NROQYV.js";
|
|
12
12
|
import {
|
|
13
13
|
DASHSCOPE_PROXY_BASE_URL,
|
|
14
14
|
DEFAULT_DASHSCOPE_BASE_URL,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
parsePositiveIntegerEnvValue,
|
|
21
21
|
resolveRequestTimeout,
|
|
22
22
|
tokenLimit
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HW4N45EE.js";
|
|
24
24
|
import {
|
|
25
25
|
runtimeDiagnostics,
|
|
26
26
|
safeJsonParse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CCGOFQV3.js";
|
|
28
28
|
import {
|
|
29
29
|
GenerateContentResponse
|
|
30
30
|
} from "./chunk-55ZMG67I.js";
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
t
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2MJAXDFK.js";
|
|
6
6
|
import {
|
|
7
7
|
computeThresholds,
|
|
8
8
|
getCoreSystemPrompt
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillLlmContent
|
|
12
12
|
} from "./chunk-NQKLOAVJ.js";
|
|
13
13
|
import {
|
|
14
14
|
DiscoveredMCPTool,
|
|
15
15
|
uiTelemetryService
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N33JAGJ7.js";
|
|
17
17
|
import {
|
|
18
18
|
ToolNames
|
|
19
19
|
} from "./chunk-X3YGAX7V.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TOKEN_LIMIT
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HW4N45EE.js";
|
|
23
23
|
import {
|
|
24
24
|
init_esbuild_shims
|
|
25
25
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -90,7 +90,7 @@ async function collectContextData(config, showDetails) {
|
|
|
90
90
|
const builtinTools = [];
|
|
91
91
|
const mcpTools = [];
|
|
92
92
|
for (const tool of allTools) {
|
|
93
|
-
if (
|
|
93
|
+
if (toolRegistry?.isDeferredAndHidden(tool.name)) {
|
|
94
94
|
continue;
|
|
95
95
|
}
|
|
96
96
|
const toolJsonStr = JSON.stringify(tool.schema);
|
|
@@ -21,6 +21,13 @@ import {
|
|
|
21
21
|
init_esbuild_shims();
|
|
22
22
|
import * as fs from "node:fs/promises";
|
|
23
23
|
import * as path from "node:path";
|
|
24
|
+
var MAX_TASK_RUNS = 20;
|
|
25
|
+
function appendCronRun(runs, entry) {
|
|
26
|
+
const base = Array.isArray(runs) ? runs : [];
|
|
27
|
+
const next = [...base, entry];
|
|
28
|
+
return next.length > MAX_TASK_RUNS ? next.slice(next.length - MAX_TASK_RUNS) : next;
|
|
29
|
+
}
|
|
30
|
+
__name(appendCronRun, "appendCronRun");
|
|
24
31
|
function generateCronTaskId() {
|
|
25
32
|
const chars = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
26
33
|
let id = "";
|
|
@@ -173,6 +180,15 @@ function isFiniteTimestamp(value) {
|
|
|
173
180
|
return typeof value === "number" && Number.isFinite(value);
|
|
174
181
|
}
|
|
175
182
|
__name(isFiniteTimestamp, "isFiniteTimestamp");
|
|
183
|
+
function isValidRuns(value) {
|
|
184
|
+
if (!Array.isArray(value)) return false;
|
|
185
|
+
return value.every((entry) => {
|
|
186
|
+
if (typeof entry !== "object" || entry === null) return false;
|
|
187
|
+
const run = entry;
|
|
188
|
+
return isFiniteTimestamp(run["at"]) && (run["kind"] === void 0 || typeof run["kind"] === "string") && (run["sessionId"] === void 0 || typeof run["sessionId"] === "string");
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
__name(isValidRuns, "isValidRuns");
|
|
176
192
|
function isValidTask(value) {
|
|
177
193
|
if (typeof value !== "object" || value === null) return false;
|
|
178
194
|
const obj = value;
|
|
@@ -180,11 +196,16 @@ function isValidTask(value) {
|
|
|
180
196
|
// means "unnamed" / "enabled". Present-but-wrong-type routes through
|
|
181
197
|
// the same fix-or-delete contract as any other corrupt field rather
|
|
182
198
|
// than being silently coerced or dropped.
|
|
183
|
-
(obj["name"] === void 0 || typeof obj["name"] === "string") && (obj["enabled"] === void 0 || typeof obj["enabled"] === "boolean")
|
|
199
|
+
(obj["name"] === void 0 || typeof obj["name"] === "string") && (obj["enabled"] === void 0 || typeof obj["enabled"] === "boolean") && (obj["disabledByArchive"] === void 0 || typeof obj["disabledByArchive"] === "boolean") && // A bound sessionId must be a NON-EMPTY string: an empty string would pass
|
|
200
|
+
// a bare `typeof` check but the scheduler's truthy `task.sessionId` guard
|
|
201
|
+
// would treat it as unbound, so a "bound" task would silently run unbound.
|
|
202
|
+
(obj["sessionId"] === void 0 || typeof obj["sessionId"] === "string" && obj["sessionId"].length > 0) && (obj["runs"] === void 0 || isValidRuns(obj["runs"]));
|
|
184
203
|
}
|
|
185
204
|
__name(isValidTask, "isValidTask");
|
|
186
205
|
|
|
187
206
|
export {
|
|
207
|
+
MAX_TASK_RUNS,
|
|
208
|
+
appendCronRun,
|
|
188
209
|
generateCronTaskId,
|
|
189
210
|
CRON_TASKS_DISPLAY_PATH,
|
|
190
211
|
getCronFilePath,
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
noteInteraction
|
|
5
|
-
} from "./chunk-MRO43B25.js";
|
|
6
3
|
import {
|
|
7
4
|
require_jsx_runtime,
|
|
8
5
|
use_stdin_default,
|
|
9
6
|
use_stdout_default
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MZWODTEA.js";
|
|
11
8
|
import {
|
|
12
9
|
require_react
|
|
13
10
|
} from "./chunk-KYMBIKIW.js";
|
|
11
|
+
import {
|
|
12
|
+
noteInteraction
|
|
13
|
+
} from "./chunk-MRO43B25.js";
|
|
14
14
|
import {
|
|
15
15
|
sanitizeFilenameForDisplay
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7VCI24VZ.js";
|
|
17
17
|
import {
|
|
18
18
|
t
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2MJAXDFK.js";
|
|
20
20
|
import {
|
|
21
21
|
fetchGitDiff,
|
|
22
22
|
findProviderByCredentials,
|
|
23
23
|
resolveMetadataKey
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
25
25
|
import {
|
|
26
26
|
KittySequenceOverflowEvent,
|
|
27
27
|
logKittySequenceOverflow
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-N33JAGJ7.js";
|
|
29
29
|
import {
|
|
30
30
|
createDebugLogger
|
|
31
31
|
} from "./chunk-22MNNNXE.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-MX2YXRER.js";
|
|
9
9
|
import {
|
|
10
10
|
loadSettings
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O6T7PBUM.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_RING_SIZE
|
|
14
14
|
} from "./chunk-G7ZG7CA6.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
MCP_BUDGET_WARN_FRACTION,
|
|
20
20
|
parsePositiveIntegerEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZWFS7YCB.js";
|
|
22
22
|
import {
|
|
23
23
|
openBrowserSecurely,
|
|
24
24
|
shouldLaunchBrowser
|
|
@@ -94,6 +94,8 @@ var serveCommand = {
|
|
|
94
94
|
description: "Per-session cap on accepted prompts waiting or running. New prompts beyond this return 503. Set to 0 to disable."
|
|
95
95
|
}).option("workspace", {
|
|
96
96
|
type: "string",
|
|
97
|
+
array: true,
|
|
98
|
+
requiresArg: true,
|
|
97
99
|
description: "Absolute workspace path this daemon binds to. POST /session requests with a mismatched cwd return 400 workspace_mismatch. Defaults to process.cwd() when omitted. For multi-workspace deployments, run one `qwen serve` per workspace on separate ports (or behind an external orchestrator)."
|
|
98
100
|
}).option("max-connections", {
|
|
99
101
|
type: "number",
|
|
@@ -285,7 +287,7 @@ var serveCommand = {
|
|
|
285
287
|
process.exit(1);
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
|
-
const { runQwenServe } = await import("./run-qwen-serve-
|
|
290
|
+
const { runQwenServe } = await import("./run-qwen-serve-NQH6LQTH.js");
|
|
289
291
|
try {
|
|
290
292
|
const handle = await runQwenServe({
|
|
291
293
|
port: argv.port,
|
|
@@ -224,49 +224,6 @@ var DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
|
|
|
224
224
|
var DEFAULT_DASHSCOPE_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
225
225
|
var DASHSCOPE_PROXY_BASE_URL = process.env["DASHSCOPE_PROXY_BASE_URL"];
|
|
226
226
|
|
|
227
|
-
// packages/core/src/utils/request-tokenizer/textTokenizer.ts
|
|
228
|
-
init_esbuild_shims();
|
|
229
|
-
var TextTokenizer = class {
|
|
230
|
-
static {
|
|
231
|
-
__name(this, "TextTokenizer");
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Calculate tokens for text content
|
|
235
|
-
*
|
|
236
|
-
* @param text - The text to estimate tokens for
|
|
237
|
-
* @returns The estimated token count
|
|
238
|
-
*/
|
|
239
|
-
async calculateTokens(text) {
|
|
240
|
-
return this.calculateTokensSync(text);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Calculate tokens for multiple text strings
|
|
244
|
-
*
|
|
245
|
-
* @param texts - Array of text strings to estimate tokens for
|
|
246
|
-
* @returns Array of token counts corresponding to each input text
|
|
247
|
-
*/
|
|
248
|
-
async calculateTokensBatch(texts) {
|
|
249
|
-
return texts.map((text) => this.calculateTokensSync(text));
|
|
250
|
-
}
|
|
251
|
-
calculateTokensSync(text) {
|
|
252
|
-
if (!text || text.length === 0) {
|
|
253
|
-
return 0;
|
|
254
|
-
}
|
|
255
|
-
let asciiChars = 0;
|
|
256
|
-
let nonAsciiChars = 0;
|
|
257
|
-
for (let i = 0; i < text.length; i++) {
|
|
258
|
-
const charCode = text.charCodeAt(i);
|
|
259
|
-
if (charCode < 128) {
|
|
260
|
-
asciiChars++;
|
|
261
|
-
} else {
|
|
262
|
-
nonAsciiChars++;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
const tokens = asciiChars / 4 + nonAsciiChars * 1.1;
|
|
266
|
-
return Math.ceil(tokens);
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
|
|
270
227
|
// packages/core/src/utils/request-tokenizer/supportedImageFormats.ts
|
|
271
228
|
init_esbuild_shims();
|
|
272
229
|
var SUPPORTED_IMAGE_MIME_TYPES = [
|
|
@@ -315,7 +272,6 @@ export {
|
|
|
315
272
|
DEFAULT_OPENAI_BASE_URL,
|
|
316
273
|
DEFAULT_DASHSCOPE_BASE_URL,
|
|
317
274
|
DASHSCOPE_PROXY_BASE_URL,
|
|
318
|
-
TextTokenizer,
|
|
319
275
|
SUPPORTED_IMAGE_MIME_TYPES,
|
|
320
276
|
isSupportedImageMimeType,
|
|
321
277
|
getSupportedImageFormatsString,
|