@qwen-code/qwen-code 0.19.9 → 0.19.10-nightly.20260716.506ce0a1a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +14 -6
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -2
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +33 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +64 -20
- package/bundled/qc-helper/docs/features/channels/wecom.md +8 -7
- package/bundled/qc-helper/docs/features/code-review.md +88 -44
- package/bundled/qc-helper/docs/features/commands.md +6 -6
- package/bundled/qc-helper/docs/features/hooks.md +29 -0
- package/bundled/qc-helper/docs/features/sandbox.md +2 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
- package/bundled/qc-helper/docs/qwen-serve.md +49 -20
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/DESIGN.md +219 -33
- package/bundled/review/SKILL.md +429 -382
- package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-WOC3YDWA.js} +31 -32
- package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-H5HZCAFD.js} +49 -48
- package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-55YDJDNM.js} +922 -550
- package/chunks/{agent-HOLHB3RT.js → agent-H6VE5W3L.js} +26 -27
- package/chunks/{agent-headless-SXL6H56A.js → agent-headless-T4XJOCRU.js} +26 -27
- package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-HBRXJSP4.js} +78 -16
- package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-MIZLXBLF.js} +2 -2
- package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-XMJVPNWM.js} +2 -2
- package/chunks/{bridge-BCJQ7BBB.js → bridge-FTB6ZP3R.js} +31 -34
- package/chunks/{ca-UJ6HC4H2.js → ca-CODEN7TD.js} +9 -1
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-CUDPU4CN.js +418 -0
- package/chunks/channel-worker-supervisor-4XTO2ZD3.js +20 -0
- package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
- package/chunks/{chunk-VA4KQY6V.js → chunk-2JNR4VP2.js} +3 -3
- package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
- package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
- package/chunks/{chunk-CUMMSHH6.js → chunk-3DWIFU7L.js} +1 -1
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-SJHDYNHF.js → chunk-4BJVSIS3.js} +3 -3
- package/chunks/{chunk-TO6QE22P.js → chunk-5CNYZ7TN.js} +26 -22
- package/chunks/{chunk-N3EMS75V.js → chunk-5DEJ4T6C.js} +1333 -1232
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
- package/chunks/{chunk-SCGXUJBT.js → chunk-6LI3L22E.js} +3 -3
- package/chunks/{chunk-K434OPES.js → chunk-6WPJRYLZ.js} +3 -3
- package/chunks/{chunk-YAUFFXDS.js → chunk-7GM2RWCR.js} +12 -11
- package/chunks/{chunk-OQ4DRIOA.js → chunk-7HWE2W74.js} +2 -2
- package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
- package/chunks/{chunk-MC23XKFE.js → chunk-A2HWMJVO.js} +37 -3
- package/chunks/{chunk-3G7CIHVV.js → chunk-ABNYOMDG.js} +4 -4
- package/chunks/{chunk-3AHXV67U.js → chunk-AGZLXLBY.js} +1 -1
- package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
- package/chunks/{chunk-Q4YQW46J.js → chunk-AMRZVQUY.js} +43 -40
- package/chunks/{chunk-W3JHSWRP.js → chunk-AN6C2U46.js} +4 -4
- package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
- package/chunks/{chunk-5SFOMFG4.js → chunk-AVEOWVOM.js} +36 -2
- package/chunks/{chunk-34MW4KTI.js → chunk-BA5JGE5F.js} +2 -2
- package/chunks/{chunk-5HOMWMCL.js → chunk-BSJAQUFD.js} +5492 -1336
- package/chunks/{chunk-L6P4KPHR.js → chunk-BWJKL5DB.js} +58 -38
- package/chunks/{chunk-PVZM22CK.js → chunk-C32JFRGV.js} +5 -5
- package/chunks/{chunk-AKIVHSJR.js → chunk-CZIHPO7L.js} +163 -782
- package/chunks/chunk-DL7RCO6V.js +493 -0
- package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
- package/chunks/{chunk-5VXNZWGF.js → chunk-ENUQSKEY.js} +1 -1
- package/chunks/{chunk-PDZ7MBDG.js → chunk-EWILX3BM.js} +27 -6
- package/chunks/{chunk-BMGVRZN4.js → chunk-EZWX232B.js} +1 -1
- package/chunks/{chunk-4GORAUCN.js → chunk-F333XEAU.js} +1 -1
- package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
- package/chunks/chunk-FEOZBUMT.js +77 -0
- package/chunks/{chunk-5U27BZ72.js → chunk-FKEGVMPX.js} +269 -83
- package/chunks/chunk-FNX3LGAK.js +34 -0
- package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
- package/chunks/{chunk-PODM4SZ4.js → chunk-G3BIBPI7.js} +5 -5
- package/chunks/{chunk-A3XKDTSH.js → chunk-GA65O2TB.js} +4 -4
- package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
- package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-GXGIM7QP.js} +67 -35
- package/chunks/{chunk-6PESIEKJ.js → chunk-GXUWGPYX.js} +68 -6
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-GZRTYZ2R.js → chunk-H3XMJV7T.js} +218 -1
- package/chunks/{chunk-WQUQVGTF.js → chunk-HGRXW4HQ.js} +467 -106
- package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
- package/chunks/{chunk-ECNYL4AA.js → chunk-HUEWOHKV.js} +1 -1
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/{chunk-KHUQZZJ6.js → chunk-IHDRJLLR.js} +382 -36
- package/chunks/{chunk-CLFKOZEK.js → chunk-J4SEAF4X.js} +114 -4
- package/chunks/{chunk-B5ORX3FG.js → chunk-JGUT3LWZ.js} +6 -1
- package/chunks/{chunk-P67PFTUT.js → chunk-KEYEYCHZ.js} +4 -4
- package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
- package/chunks/{chunk-7PU4FYLG.js → chunk-KOXFAG6P.js} +4 -18
- package/chunks/{chunk-EGYZ275M.js → chunk-KWLVWNF5.js} +55 -7
- package/chunks/{chunk-XLA62MYB.js → chunk-KXECVZPD.js} +2 -2
- package/chunks/{chunk-IAVB3HM3.js → chunk-L4Y55KIS.js} +33 -1
- package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
- package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
- package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
- package/chunks/chunk-LXXMOYPL.js +22 -0
- package/chunks/{chunk-Q6I5QHMH.js → chunk-MFNKBXYH.js} +1 -1
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-JZETEN3Z.js → chunk-N45S36AH.js} +3 -3
- package/chunks/{chunk-GWLSNBG4.js → chunk-NA3IG6XG.js} +748 -27
- package/chunks/{chunk-D5SKC4YG.js → chunk-O3M25JXE.js} +213 -29
- package/chunks/{chunk-EAXLGSFP.js → chunk-O6XGHDS5.js} +11 -11
- package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
- package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
- package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
- package/chunks/{chunk-CNEIYWSA.js → chunk-OVIV236K.js} +5 -5
- package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
- package/chunks/{chunk-E2IY465S.js → chunk-PWNOAWXB.js} +59 -12
- package/chunks/{chunk-B4G2WOFA.js → chunk-Q5MKHNIR.js} +28 -5
- package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
- package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
- package/chunks/{chunk-HKMAENAO.js → chunk-QDTGDM2T.js} +14 -9
- package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
- package/chunks/{chunk-W2UIXQDL.js → chunk-RTV5TUYB.js} +12 -4
- package/chunks/chunk-RW7DUKFO.js +91 -0
- package/chunks/{chunk-NVYTCB5Z.js → chunk-SA6QVLWI.js} +17325 -16259
- package/chunks/chunk-SJSI7PXU.js +59 -0
- package/chunks/{chunk-HVY356M2.js → chunk-SMGBWLNU.js} +3 -3
- package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
- package/chunks/{chunk-CC2ITGCF.js → chunk-STZQCNN3.js} +49 -6
- package/chunks/{chunk-HPDUL5MF.js → chunk-T2ZDAER2.js} +1 -1
- package/chunks/{chunk-XUOOWUZS.js → chunk-T3TQ3ACP.js} +1 -1
- package/chunks/{chunk-4C5BQ2D2.js → chunk-TIKDHS6V.js} +100 -17
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
- package/chunks/{chunk-D2GFWEXB.js → chunk-UCUUH2JV.js} +6 -6
- package/chunks/{chunk-BAPGSC7U.js → chunk-UZP7K33Y.js} +23 -9
- package/chunks/{chunk-77XJ3SWN.js → chunk-VDAR6UO2.js} +8 -6
- package/chunks/{chunk-XYQSMABS.js → chunk-VKLVGA2D.js} +4 -4
- package/chunks/{chunk-JSG7ZSBC.js → chunk-VRR65QYW.js} +251 -3
- package/chunks/{chunk-U2NNEY4R.js → chunk-VT5AWJN4.js} +1 -1
- package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
- package/chunks/{chunk-X6TJ3YZV.js → chunk-WKEO3GLZ.js} +160 -60
- package/chunks/{chunk-J3JA76CF.js → chunk-WTNZ6DXB.js} +1 -1
- package/chunks/{chunk-VWPVHAMO.js → chunk-XIWQ5QST.js} +8 -1
- package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
- package/chunks/{chunk-3VAGG5T5.js → chunk-YYBZUIPL.js} +1015 -100
- package/chunks/{chunk-CCDMCZPP.js → chunk-YZ3SBNP7.js} +1 -1
- package/chunks/{chunk-ATAKVRIF.js → chunk-Z3XA2TNG.js} +7 -7
- package/chunks/{chunk-EMDMPBJ4.js → chunk-Z7SVC7PJ.js} +10 -3
- package/chunks/{chunk-AURZZYMD.js → chunk-ZIVSSTUG.js} +4 -4
- package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
- package/chunks/{chunk-34Z3U5RQ.js → chunk-ZQIYGQCG.js} +765 -168
- package/chunks/{computer-use-HM37RX6A.js → computer-use-NADT7ULB.js} +26 -27
- package/chunks/{config-utils-NV2SVGPB.js → config-utils-IQQT3GCI.js} +3 -2
- package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-U7NEJYJ7.js} +28 -29
- package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-EAB2U5XW.js} +2 -2
- package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-SUN33INC.js} +26 -27
- package/chunks/{cron-create-AMBKGZX6.js → cron-create-GMVKSXZT.js} +4 -4
- package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-VDZKUAVK.js} +4 -4
- package/chunks/{cron-list-WVP2JXER.js → cron-list-UG7C7RAR.js} +4 -4
- package/chunks/{daemon-ARHTSTXP.js → daemon-SJXEKP3H.js} +773 -126
- package/chunks/daemon-status-provider-WIIYLGZJ.js +74 -0
- package/chunks/{de-EBJN3OVN.js → de-NOXPCSYN.js} +9 -1
- package/chunks/{dist-XKU3ABM5.js → dist-4WCQEZIN.js} +4 -51
- package/chunks/{dist-QYCAEZIT.js → dist-DOPL5LSQ.js} +5 -1
- package/chunks/{dist-WKPOYU7O.js → dist-GXJVCOS7.js} +1 -1
- package/chunks/{dist-R7LN5AZE.js → dist-PX2ERZ6I.js} +2 -2
- package/chunks/{dist-PNVLTKTL.js → dist-V2YVLYOW.js} +215 -33
- package/chunks/{dist-VHV4EVHG.js → dist-VYWUKURL.js} +1 -1
- package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-6FRM6UMU.js} +27 -28
- package/chunks/{edit-VNI4NJ73.js → edit-7GOIQTCZ.js} +27 -28
- package/chunks/{en-5A6LA7RK.js → en-JFVULHTB.js} +11 -1
- package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-476E6WIK.js} +26 -27
- package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-IRJM6W3C.js} +42 -28
- package/chunks/{environment-5HSSRMJ7.js → environment-ROMULS2X.js} +30 -30
- package/chunks/{errors-HMFCJJ7P.js → errors-OUIWPUDY.js} +28 -29
- package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-PPSFK753.js} +26 -27
- package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-YKQMD4D7.js} +26 -27
- package/chunks/{fast-path-FRDMDVHG.js → fast-path-CNK2HHKH.js} +3 -3
- package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
- package/chunks/{fr-YXRABLYZ.js → fr-HVFNU42H.js} +9 -1
- package/chunks/{gemini-QYSEGHAX.js → gemini-WQNFT6TR.js} +216 -90
- package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-4QJH2JDP.js} +4 -4
- package/chunks/{glob-BRCSGFOT.js → glob-36TVLBWW.js} +28 -28
- package/chunks/{grep-EE2DUOSY.js → grep-QTYLNO2M.js} +26 -27
- package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-36FQFODK.js} +30 -31
- package/chunks/{i18n-BASPENNQ.js → i18n-JUGYPVSP.js} +27 -28
- package/chunks/initializer-OBBJUS25.js +72 -0
- package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-MCKTPX64.js} +27 -28
- package/chunks/{ja-7VQOANVG.js → ja-PY5AF544.js} +10 -2
- package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
- package/chunks/list-VW5QY4VJ.js +75 -0
- package/chunks/loadedSettingsAdapter-IELOOXG6.js +69 -0
- package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-QXWZSCYM.js} +5 -5
- package/chunks/{ls-ZB2BDP6T.js → ls-2OUTG3IZ.js} +4 -4
- package/chunks/{lsp-V5DN4YUJ.js → lsp-4VMNXZW6.js} +2 -2
- package/chunks/mcp-Q3EC37ZS.js +69 -0
- package/chunks/{monitor-X5Z3H4FY.js → monitor-DCZ27AFR.js} +26 -27
- package/chunks/nonInteractiveCli-KXD7PFO4.js +128 -0
- package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-YU4XF5LI.js} +27 -28
- package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-KL5WER2D.js} +13 -13
- package/chunks/{pidfile-D4I4FTVA.js → pidfile-WBOD7EJV.js} +27 -28
- package/chunks/processUtils-AOV4R34M.js +29 -0
- package/chunks/{pt-2C6YCSHL.js → pt-A3PRQXMU.js} +9 -1
- package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-YIGBHYE3.js} +28 -29
- package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
- package/chunks/{read-file-7SZSIZOL.js → read-file-WVL4Y76X.js} +9 -9
- package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-JUFHCKSC.js} +2 -2
- package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-DWSMBXYY.js} +2 -2
- package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-6GSWJERP.js} +26 -27
- package/chunks/{ru-6BBHVZZV.js → ru-IBCWUTOC.js} +9 -1
- package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-QYUQMEDT.js} +1233 -371
- package/chunks/{runtime-57WWRVHN.js → runtime-K2YZCNB3.js} +42 -38
- package/chunks/{scheduler-YBLGWSIL.js → scheduler-EQCSN7QV.js} +26 -27
- package/chunks/{send-message-F36YD6KQ.js → send-message-JZ752NWD.js} +3 -3
- package/chunks/{serve-R63NK3CV.js → serve-DX5UGZD4.js} +36 -35
- package/chunks/{server-Z22GCAXP.js → server-T6HJH3DR.js} +5869 -1398
- package/chunks/{session-HKAAI7BN.js → session-SNU6ACY6.js} +299 -100
- package/chunks/{settings-3EYN66GK.js → settings-AKHZZNEL.js} +34 -33
- package/chunks/{shell-6YXINTWJ.js → shell-EY74IEZK.js} +28 -27
- package/chunks/{skill-OO57P4X6.js → skill-DPU62O3H.js} +11 -11
- package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-RQZRWJ2V.js} +28 -30
- package/chunks/{src-G5UPLZSZ.js → src-7FITDSVC.js} +164 -52
- package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-XO3RK6DO.js} +28 -29
- package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-DVWZRHYQ.js} +728 -382
- package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-LELY6HAI.js} +3 -3
- package/chunks/{task-create-FRGOEIKY.js → task-create-QY3BIMNM.js} +8 -7
- package/chunks/{task-list-OW766BXZ.js → task-list-D2U47WBJ.js} +6 -5
- package/chunks/{task-stop-SIR5SNBN.js → task-stop-N6E5IYLH.js} +2 -2
- package/chunks/{task-update-YRA532MT.js → task-update-HJCQILLB.js} +8 -7
- package/chunks/{team-create-PECAAPXK.js → team-create-FOSRT62K.js} +26 -27
- package/chunks/{team-delete-6OSECUZC.js → team-delete-RCWYDRF4.js} +6 -5
- package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-6VUDV27J.js} +26 -27
- package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-6UT6IO5T.js} +27 -28
- package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-FKCGATPJ.js} +4 -4
- package/chunks/{tool-search-THVIWAPB.js → tool-search-ASSFMMN5.js} +10 -10
- package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-YYWUO23H.js} +32 -35
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-4BWV2IBK.js} +29 -29
- package/chunks/types-ML3TRJQ5.js +16 -0
- package/chunks/update-relaunch-74DLGH73.js +87 -0
- package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-CRFCGFO5.js} +31 -30
- package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-BTTEPBGQ.js} +76 -73
- package/chunks/{version-3UEA6ZIR.js → version-Y5JE5Q63.js} +1 -1
- package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-CFCWTCAP.js} +5 -6
- package/chunks/{workflow-QCCCMYP3.js → workflow-6WC7VPQN.js} +27 -28
- package/chunks/workspace-providers-status-RVG2C5ZS.js +72 -0
- package/chunks/workspace-registration-store-SLEU3D3X.js +27 -0
- package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-QMWGVOTF.js} +32 -35
- package/chunks/workspace-service-G572JSEU.js +84 -0
- package/chunks/workspace-skills-status-VSSMSMNK.js +71 -0
- package/chunks/{write-file-I3MUDRIE.js → write-file-5XVDRORP.js} +27 -28
- package/chunks/{zh-RQE7I22T.js → zh-PAUNIMHQ.js} +12 -2
- package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-GNEUIUFF.js} +12 -2
- package/cli-entry.js +92 -8
- package/cli.js +11 -11
- package/locales/ca.js +16 -0
- package/locales/de.js +16 -0
- package/locales/en.js +19 -0
- package/locales/fr.js +16 -0
- package/locales/ja.js +17 -1
- package/locales/pt.js +16 -0
- package/locales/ru.js +16 -0
- package/locales/zh-TW.js +20 -1
- package/locales/zh.js +20 -1
- package/package.json +3 -3
- package/web-shell/assets/{arc-C15hqnJe.js → arc-vx1tRwnX.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-DBi6iUA1.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-Ga9JJ4Ak.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-D8Vi5FYw.js} +1 -1
- package/web-shell/assets/channel-B29zQDTL.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-CSV6yQpU.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-toYlppdI.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-DbjzuyAr.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-IkkSjSkk.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-D5wUL6Zm.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-C3o2DXG0.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-CutIi14T.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-DZ0NRHH-.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BNGI2SvC.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BNGI2SvC.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-B3Dl88UJ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-DfTxfF6-.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-CJyH98yO.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-EbOiJNmW.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-AYNqpqqA.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-BY5VPa4H.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-BhMYAKlk.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-Bp8S_F9l.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-az3TE9PU.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-CfkAEpCe.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-D1QmjMCy.js} +1 -1
- package/web-shell/assets/index-C8sDwQUv.js +1130 -0
- package/web-shell/assets/index-CaBoc5bb.js +3 -0
- package/web-shell/assets/index-Dpg5Wymg.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-D3ompLrG.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-D3MRWp9I.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-DVkKCa44.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-BLif81wF.js} +1 -1
- package/web-shell/assets/{linear-C8wKCbIC.js → linear-BDU96EGS.js} +1 -1
- package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-B-CwC26B.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-CS1WOJ4G.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-BzgtNXVP.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-BRfGC8MA.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-CPBZkC7g.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-nqNvinIk.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-CM_Wdjh3.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-L0y-48VE.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BX1DdF8s.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-B_n5rb3A.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-C9NmLV5e.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-CrefK9gt.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BUccf-bC.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-DM6ef92l.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-524RQP4Q.js +0 -305
- package/chunks/chunk-CARU2RR2.js +0 -24
- package/chunks/chunk-CU3L64TP.js +0 -93
- package/chunks/chunk-OCPBI7J5.js +0 -18
- package/chunks/chunk-TEGEBB2I.js +0 -122
- package/chunks/chunk-VTU57BWZ.js +0 -30
- package/chunks/daemon-status-provider-B2UTZUJ2.js +0 -76
- package/chunks/initializer-UTQ7FB7G.js +0 -71
- package/chunks/list-DEICDL65.js +0 -74
- package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
- package/chunks/mcp-L5JXEEIA.js +0 -68
- package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
- package/chunks/types-JNKGKUJT.js +0 -12
- package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
- package/chunks/workspace-service-RVLBMSMZ.js +0 -80
- package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
- package/web-shell/assets/channel-CLiQD50f.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
- package/web-shell/assets/index-D5IWFVk1.css +0 -5
- package/web-shell/assets/index-KFJRDhX7.js +0 -783
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
createDaemonStatusProvider
|
|
5
|
+
} from "./chunk-KOXFAG6P.js";
|
|
6
|
+
import "./chunk-LXXMOYPL.js";
|
|
7
|
+
import "./chunk-AN6C2U46.js";
|
|
8
|
+
import "./chunk-E5Z2AVNV.js";
|
|
9
|
+
import "./chunk-KXECVZPD.js";
|
|
10
|
+
import "./chunk-HGRXW4HQ.js";
|
|
11
|
+
import "./chunk-PZL23GTM.js";
|
|
12
|
+
import "./chunk-6RLROE6G.js";
|
|
13
|
+
import "./chunk-COH43MRJ.js";
|
|
14
|
+
import "./chunk-L4Y55KIS.js";
|
|
15
|
+
import "./chunk-J4SEAF4X.js";
|
|
16
|
+
import "./chunk-XIWQ5QST.js";
|
|
17
|
+
import "./chunk-W7FJ3N32.js";
|
|
18
|
+
import "./chunk-M5GB774H.js";
|
|
19
|
+
import "./chunk-UDXSXLER.js";
|
|
20
|
+
import "./chunk-AGZLXLBY.js";
|
|
21
|
+
import "./chunk-VJNBRRZG.js";
|
|
22
|
+
import "./chunk-SA6QVLWI.js";
|
|
23
|
+
import "./chunk-H6XPXXMH.js";
|
|
24
|
+
import "./chunk-5M6IDOMF.js";
|
|
25
|
+
import "./chunk-A2HWMJVO.js";
|
|
26
|
+
import "./chunk-RCEEXIOO.js";
|
|
27
|
+
import "./chunk-KKRTYONM.js";
|
|
28
|
+
import "./chunk-TV6K2FB4.js";
|
|
29
|
+
import "./chunk-E2UVIFI2.js";
|
|
30
|
+
import "./chunk-XU457J4V.js";
|
|
31
|
+
import "./chunk-VDDGDZMA.js";
|
|
32
|
+
import "./chunk-SPJQO2CE.js";
|
|
33
|
+
import "./chunk-SZRN75WQ.js";
|
|
34
|
+
import "./chunk-HTO4JFDZ.js";
|
|
35
|
+
import "./chunk-CPBF7KYF.js";
|
|
36
|
+
import "./chunk-F333XEAU.js";
|
|
37
|
+
import "./chunk-6AM5D4ME.js";
|
|
38
|
+
import "./chunk-2Z5UX4KI.js";
|
|
39
|
+
import "./chunk-ARKANCNX.js";
|
|
40
|
+
import "./chunk-L5U3ELZX.js";
|
|
41
|
+
import "./chunk-TYLOFD2U.js";
|
|
42
|
+
import "./chunk-YYBZUIPL.js";
|
|
43
|
+
import "./chunk-4WKAA4KS.js";
|
|
44
|
+
import "./chunk-CR3C7WXL.js";
|
|
45
|
+
import "./chunk-RTV5TUYB.js";
|
|
46
|
+
import "./chunk-VGC4I5JJ.js";
|
|
47
|
+
import "./chunk-FBU7WRZI.js";
|
|
48
|
+
import "./chunk-Y66VOBRP.js";
|
|
49
|
+
import "./chunk-WTNZ6DXB.js";
|
|
50
|
+
import "./chunk-JGUT3LWZ.js";
|
|
51
|
+
import "./chunk-OKAIGAYW.js";
|
|
52
|
+
import "./chunk-ZPAHLFZU.js";
|
|
53
|
+
import "./chunk-JESCGQM3.js";
|
|
54
|
+
import "./chunk-WIEO4CWB.js";
|
|
55
|
+
import "./chunk-XVNQMZ2I.js";
|
|
56
|
+
import "./chunk-FEOZBUMT.js";
|
|
57
|
+
import "./chunk-VRR65QYW.js";
|
|
58
|
+
import "./chunk-A4UCTEB5.js";
|
|
59
|
+
import "./chunk-XWRJCPHC.js";
|
|
60
|
+
import "./chunk-4LD5APFL.js";
|
|
61
|
+
import "./chunk-TYAMGABM.js";
|
|
62
|
+
import "./chunk-FCMNKVXT.js";
|
|
63
|
+
import "./chunk-DJ2GSRLV.js";
|
|
64
|
+
import "./chunk-LQIDP6K5.js";
|
|
65
|
+
import "./chunk-7NFB7LBQ.js";
|
|
66
|
+
import "./chunk-75DOP5OR.js";
|
|
67
|
+
import "./chunk-DMTGGOSA.js";
|
|
68
|
+
import "./chunk-YQ3U5MUC.js";
|
|
69
|
+
import "./chunk-TB6UDU4T.js";
|
|
70
|
+
import "./chunk-5O2XNYP6.js";
|
|
71
|
+
import "./chunk-J2S4EL5Y.js";
|
|
72
|
+
export {
|
|
73
|
+
createDaemonStatusProvider
|
|
74
|
+
};
|
|
@@ -23,6 +23,7 @@ var de_default = {
|
|
|
23
23
|
"Shell mode": "Shell-Modus",
|
|
24
24
|
"YOLO mode": "YOLO-Modus",
|
|
25
25
|
"Auto mode": "Auto-Modus",
|
|
26
|
+
"auto_mode.entry_notice": "Auto-Modus aktiviert.\n Ein LLM-Klassifikator bewertet jeden Tool-Aufruf \u2014 sichere Aktionen werden automatisch genehmigt,\n riskante werden blockiert. Beenden: Shift+Tab oder /approval-mode default.",
|
|
26
27
|
"plan mode": "Planungsmodus",
|
|
27
28
|
"auto-accept edits": "\xC4nderungen automatisch akzeptieren",
|
|
28
29
|
"Accepting edits": "\xC4nderungen werden akzeptiert",
|
|
@@ -1616,6 +1617,11 @@ var de_default = {
|
|
|
1616
1617
|
"Run the following to update:": "F\xFChren Sie Folgendes zum Aktualisieren aus:",
|
|
1617
1618
|
"Unable to auto-update this standalone installation. Please reinstall from:": "Diese Standalone-Installation kann nicht automatisch aktualisiert werden. Bitte neu installieren von:",
|
|
1618
1619
|
"Manual update required. Please reinstall Qwen Code.": "Manuelles Update erforderlich. Bitte installieren Sie Qwen Code neu.",
|
|
1620
|
+
"This session uses the custom sandbox image {{image}}. Update that image and restart Qwen Code.": "Diese Sitzung verwendet das benutzerdefinierte Sandbox-Image {{image}}. Aktualisieren Sie das Image und starten Sie Qwen Code neu.",
|
|
1621
|
+
"Update Qwen Code on the host, then restart the sandbox.": "Aktualisieren Sie Qwen Code auf dem Host und starten Sie anschlie\xDFend die Sandbox neu.",
|
|
1622
|
+
"The update will be installed after you exit this session.": "Das Update wird nach dem Beenden dieser Sitzung installiert.",
|
|
1623
|
+
"Run /update to install the update on the host.": "F\xFChren Sie /update aus, um das Update auf dem Host zu installieren.",
|
|
1624
|
+
"Run /update to install the update.": "F\xFChren Sie /update aus, um das Update zu installieren.",
|
|
1619
1625
|
// ============================================================================
|
|
1620
1626
|
// reload-plugins command
|
|
1621
1627
|
// ============================================================================
|
|
@@ -1640,7 +1646,9 @@ var de_default = {
|
|
|
1640
1646
|
"Extensions changed on disk. Run /reload-plugins to apply updates.": "Extensions changed on disk. Run /reload-plugins to apply updates.",
|
|
1641
1647
|
"Failed to refresh extension content: {{message}}. Run /reload-plugins to apply updates.": "Failed to refresh extension content: {{message}}. Run /reload-plugins to apply updates.",
|
|
1642
1648
|
"Failed to refresh extension content. Run /reload-plugins to apply updates.": "Failed to refresh extension content. Run /reload-plugins to apply updates.",
|
|
1643
|
-
"Extension reload did not complete. Run /reload-plugins to try again.": "Extension reload did not complete. Run /reload-plugins to try again."
|
|
1649
|
+
"Extension reload did not complete. Run /reload-plugins to try again.": "Extension reload did not complete. Run /reload-plugins to try again.",
|
|
1650
|
+
"Session recording stopped after a write failure. New messages for the affected session will not be saved. Check disk space and permissions, then start a new session to resume recording. See the debug log for details.": "Die Sitzungsaufzeichnung wurde nach einem Schreibfehler beendet. Neue Nachrichten der betroffenen Sitzung werden nicht gespeichert. Pr\xFCfen Sie Speicherplatz und Berechtigungen und starten Sie anschlie\xDFend eine neue Sitzung, um die Aufzeichnung fortzusetzen. Weitere Details finden Sie im Debug-Protokoll.",
|
|
1651
|
+
"Session recording stopped after a write failure. New messages for the affected session will not be saved. Check disk space and permissions, then run `/clear` to start a new recorded session. See the debug log for details.": "Die Sitzungsaufzeichnung wurde nach einem Schreibfehler beendet. Neue Nachrichten der betroffenen Sitzung werden nicht gespeichert. Pr\xFCfen Sie Speicherplatz und Berechtigungen und f\xFChren Sie anschlie\xDFend `/clear` aus, um eine neue aufgezeichnete Sitzung zu starten. Weitere Details finden Sie im Debug-Protokoll."
|
|
1644
1652
|
};
|
|
1645
1653
|
export {
|
|
1646
1654
|
de_default as default
|
|
@@ -9,7 +9,7 @@ import "./chunk-T2NCM2ET.js";
|
|
|
9
9
|
import {
|
|
10
10
|
ChannelBase,
|
|
11
11
|
sanitizeLogText
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZQIYGQCG.js";
|
|
13
13
|
import "./chunk-UDXSXLER.js";
|
|
14
14
|
import "./chunk-H6XPXXMH.js";
|
|
15
15
|
import "./chunk-CR3C7WXL.js";
|
|
@@ -1843,7 +1843,6 @@ var WeComChannel = class extends ChannelBase {
|
|
|
1843
1843
|
this.inFlightMessages.add(rawMessageId);
|
|
1844
1844
|
}
|
|
1845
1845
|
const text = extractText(body);
|
|
1846
|
-
const explicitMention = getExplicitMention(body, this.wecom.botId);
|
|
1847
1846
|
const quote = getRecord(body, "quote");
|
|
1848
1847
|
const envelope = {
|
|
1849
1848
|
channelName: this.name,
|
|
@@ -1853,7 +1852,9 @@ var WeComChannel = class extends ChannelBase {
|
|
|
1853
1852
|
text,
|
|
1854
1853
|
messageId: rawMessageId ?? messageId,
|
|
1855
1854
|
isGroup,
|
|
1856
|
-
|
|
1855
|
+
// WeCom only delivers group callbacks when the intelligent robot is
|
|
1856
|
+
// mentioned, so each delivered group message is already mention-scoped.
|
|
1857
|
+
isMentioned: true,
|
|
1857
1858
|
isReplyToBot: getString(getRecord(quote, "from"), "userid") === this.wecom.botId,
|
|
1858
1859
|
referencedText: extractQuoteText(quote)
|
|
1859
1860
|
};
|
|
@@ -3155,54 +3156,6 @@ function getString(value, key) {
|
|
|
3155
3156
|
return typeof raw === "string" ? raw : "";
|
|
3156
3157
|
}
|
|
3157
3158
|
__name(getString, "getString");
|
|
3158
|
-
function getBoolean(value, key) {
|
|
3159
|
-
const raw = value?.[key];
|
|
3160
|
-
return typeof raw === "boolean" ? raw : void 0;
|
|
3161
|
-
}
|
|
3162
|
-
__name(getBoolean, "getBoolean");
|
|
3163
|
-
function getExplicitMention(body, botId) {
|
|
3164
|
-
const botSpecificMention = getBoolean(body, "isInAtList") ?? getBoolean(body, "is_in_at_list");
|
|
3165
|
-
if (botSpecificMention !== void 0)
|
|
3166
|
-
return botSpecificMention;
|
|
3167
|
-
const mentions = collectMentionValues(body);
|
|
3168
|
-
if (!mentions.present)
|
|
3169
|
-
return getBoolean(body, "isMentioned");
|
|
3170
|
-
return mentions.values.some((mention) => mention === botId || mention === "@all" || mention === "all");
|
|
3171
|
-
}
|
|
3172
|
-
__name(getExplicitMention, "getExplicitMention");
|
|
3173
|
-
function collectMentionValues(body) {
|
|
3174
|
-
const values = [];
|
|
3175
|
-
let present = false;
|
|
3176
|
-
for (const key of [
|
|
3177
|
-
"mentions",
|
|
3178
|
-
"mentioned_list",
|
|
3179
|
-
"mentionedList",
|
|
3180
|
-
"at_list",
|
|
3181
|
-
"atList",
|
|
3182
|
-
"at_userids",
|
|
3183
|
-
"atUserIds"
|
|
3184
|
-
]) {
|
|
3185
|
-
if (Object.prototype.hasOwnProperty.call(body, key)) {
|
|
3186
|
-
present = true;
|
|
3187
|
-
}
|
|
3188
|
-
for (const item of getArray(body, key)) {
|
|
3189
|
-
if (typeof item === "string") {
|
|
3190
|
-
values.push(item);
|
|
3191
|
-
continue;
|
|
3192
|
-
}
|
|
3193
|
-
const record = asRecord(item);
|
|
3194
|
-
if (!record)
|
|
3195
|
-
continue;
|
|
3196
|
-
for (const itemKey of ["userid", "userId", "id", "open_id", "openId"]) {
|
|
3197
|
-
const value = getString(record, itemKey);
|
|
3198
|
-
if (value)
|
|
3199
|
-
values.push(value);
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
}
|
|
3203
|
-
return { present, values };
|
|
3204
|
-
}
|
|
3205
|
-
__name(collectMentionValues, "collectMentionValues");
|
|
3206
3159
|
|
|
3207
3160
|
// packages/channels/wecom/dist/index.js
|
|
3208
3161
|
var plugin = {
|
|
@@ -12,7 +12,7 @@ import "./chunk-T2NCM2ET.js";
|
|
|
12
12
|
import {
|
|
13
13
|
ChannelBase,
|
|
14
14
|
isTerminalTaskLifecycleType
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZQIYGQCG.js";
|
|
16
16
|
import "./chunk-UDXSXLER.js";
|
|
17
17
|
import "./chunk-H6XPXXMH.js";
|
|
18
18
|
import {
|
|
@@ -89090,6 +89090,10 @@ var FeishuChannel = class extends ChannelBase {
|
|
|
89090
89090
|
}
|
|
89091
89091
|
await this.connectWebhook(webhookPort, verificationToken, encryptKey);
|
|
89092
89092
|
} else {
|
|
89093
|
+
const token = await this.getTenantAccessToken();
|
|
89094
|
+
if (!token) {
|
|
89095
|
+
throw new Error(`Channel "${this.name}" failed to authenticate Feishu credentials.`);
|
|
89096
|
+
}
|
|
89093
89097
|
await this.connectWebSocket();
|
|
89094
89098
|
}
|
|
89095
89099
|
await this.fetchBotInfo();
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
sendMessage,
|
|
12
12
|
sendTyping,
|
|
13
13
|
uploadToCdn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3DWIFU7L.js";
|
|
15
15
|
import {
|
|
16
16
|
ChannelBase,
|
|
17
17
|
isTerminalTaskLifecycleType
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZQIYGQCG.js";
|
|
19
19
|
import "./chunk-UDXSXLER.js";
|
|
20
20
|
import "./chunk-H6XPXXMH.js";
|
|
21
21
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
isTerminalTaskLifecycleType,
|
|
12
12
|
sanitizeLogText,
|
|
13
13
|
sanitizeSenderName
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZQIYGQCG.js";
|
|
15
15
|
import "./chunk-UDXSXLER.js";
|
|
16
16
|
import "./chunk-H6XPXXMH.js";
|
|
17
17
|
import "./chunk-CR3C7WXL.js";
|
|
@@ -4589,7 +4589,7 @@ var DingtalkConnectionManager = class {
|
|
|
4589
4589
|
if (!this.running || client !== this.activeClient) {
|
|
4590
4590
|
return;
|
|
4591
4591
|
}
|
|
4592
|
-
if (client.connected &&
|
|
4592
|
+
if (client.connected && this.options.getSocket(client)?.readyState === SOCKET_OPEN) {
|
|
4593
4593
|
this.healthFailures = 0;
|
|
4594
4594
|
return;
|
|
4595
4595
|
}
|
|
@@ -4698,7 +4698,7 @@ var DingtalkConnectionManager = class {
|
|
|
4698
4698
|
}
|
|
4699
4699
|
async waitUntilReady(client, generation, deadline) {
|
|
4700
4700
|
while (this.running && generation === this.generation) {
|
|
4701
|
-
if (client.connected &&
|
|
4701
|
+
if (client.connected && this.options.getSocket(client)?.readyState === SOCKET_OPEN) {
|
|
4702
4702
|
return;
|
|
4703
4703
|
}
|
|
4704
4704
|
if (Date.now() >= deadline) {
|
|
@@ -4743,16 +4743,39 @@ var ACK_EMOTION_ID = "2659900";
|
|
|
4743
4743
|
var ACK_EMOTION_BG_ID = "im_bg_1";
|
|
4744
4744
|
var EMOTION_API = "https://api.dingtalk.com/v1.0/robot/emotion";
|
|
4745
4745
|
var GROUP_MSG_API = "https://api.dingtalk.com/v1.0/robot/groupMessages/send";
|
|
4746
|
-
var
|
|
4746
|
+
var DIRECT_MSG_API = "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend";
|
|
4747
|
+
var PROACTIVE_MSG_KEY = "sampleMarkdown";
|
|
4747
4748
|
var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
|
|
4748
4749
|
var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
|
|
4750
|
+
var TEXT_MESSAGE_LIMIT = 3800;
|
|
4751
|
+
var mentionTarget = Symbol("mentionTarget");
|
|
4752
|
+
function splitTextChunks(text, firstChunkLimit) {
|
|
4753
|
+
if (!text)
|
|
4754
|
+
return [text];
|
|
4755
|
+
const chunks = [];
|
|
4756
|
+
let offset = 0;
|
|
4757
|
+
let chunkLimit = firstChunkLimit;
|
|
4758
|
+
while (offset < text.length) {
|
|
4759
|
+
chunks.push(text.slice(offset, offset + chunkLimit));
|
|
4760
|
+
offset += chunkLimit;
|
|
4761
|
+
chunkLimit = TEXT_MESSAGE_LIMIT;
|
|
4762
|
+
}
|
|
4763
|
+
return chunks;
|
|
4764
|
+
}
|
|
4765
|
+
__name(splitTextChunks, "splitTextChunks");
|
|
4749
4766
|
var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
4750
4767
|
static {
|
|
4751
4768
|
__name(this, "DingtalkChannel");
|
|
4752
4769
|
}
|
|
4753
4770
|
client;
|
|
4771
|
+
atSender;
|
|
4754
4772
|
connectionManager;
|
|
4755
4773
|
seenMessages = /* @__PURE__ */ new Map();
|
|
4774
|
+
mentionTargets = /* @__PURE__ */ new Map();
|
|
4775
|
+
sessionMentionTargets = /* @__PURE__ */ new Map();
|
|
4776
|
+
textReplySessions = /* @__PURE__ */ new Set();
|
|
4777
|
+
bufferedMentionTargets = /* @__PURE__ */ new Set();
|
|
4778
|
+
bufferedMentionTargetsBySession = /* @__PURE__ */ new Map();
|
|
4756
4779
|
dedupTimer;
|
|
4757
4780
|
/** Map conversationId → latest sessionWebhook URL for sending replies. */
|
|
4758
4781
|
webhooks = /* @__PURE__ */ new Map();
|
|
@@ -4772,6 +4795,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4772
4795
|
proactiveToken;
|
|
4773
4796
|
constructor(name, config, bridge, options) {
|
|
4774
4797
|
super(name, config, bridge, options);
|
|
4798
|
+
this.atSender = config["atSender"] === true;
|
|
4775
4799
|
if (!config.clientId || !config.clientSecret) {
|
|
4776
4800
|
throw new Error(`Channel "${name}" requires clientId and clientSecret for DingTalk.`);
|
|
4777
4801
|
}
|
|
@@ -4924,7 +4948,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4924
4948
|
static isUnroutableGroupMessage(isGroup, conversationId) {
|
|
4925
4949
|
return isGroup && !conversationId;
|
|
4926
4950
|
}
|
|
4927
|
-
async
|
|
4951
|
+
async sendReply(chatId, text) {
|
|
4928
4952
|
const webhook = this.webhooks.get(chatId);
|
|
4929
4953
|
if (!webhook) {
|
|
4930
4954
|
process.stderr.write(`[DingTalk:${this.name}] No webhook for chatId ${chatId}, cannot send.
|
|
@@ -4954,15 +4978,55 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4954
4978
|
}
|
|
4955
4979
|
}
|
|
4956
4980
|
}
|
|
4981
|
+
async sendTextReply(chatId, text, atUserId) {
|
|
4982
|
+
const webhook = this.webhooks.get(chatId);
|
|
4983
|
+
if (!webhook)
|
|
4984
|
+
return;
|
|
4985
|
+
const mentionPrefix = atUserId ? `@${atUserId}
|
|
4986
|
+
|
|
4987
|
+
` : "";
|
|
4988
|
+
const chunks = splitTextChunks(text, TEXT_MESSAGE_LIMIT - mentionPrefix.length);
|
|
4989
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
4990
|
+
const isMention = i === 0 && atUserId !== void 0;
|
|
4991
|
+
const resp = await fetch(webhook, {
|
|
4992
|
+
method: "POST",
|
|
4993
|
+
headers: { "Content-Type": "application/json" },
|
|
4994
|
+
body: JSON.stringify({
|
|
4995
|
+
msgtype: "text",
|
|
4996
|
+
text: {
|
|
4997
|
+
content: isMention ? `${mentionPrefix}${chunks[i]}` : chunks[i]
|
|
4998
|
+
},
|
|
4999
|
+
...isMention ? { at: { atUserIds: [atUserId] } } : {}
|
|
5000
|
+
})
|
|
5001
|
+
});
|
|
5002
|
+
if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
|
|
5003
|
+
const payload = await resp.clone().json().catch(() => void 0);
|
|
5004
|
+
const response = payload && typeof payload === "object" ? payload : {};
|
|
5005
|
+
const value = response["errcode"] ?? response["code"];
|
|
5006
|
+
const code = typeof value === "number" || typeof value === "string" ? String(value) : "unknown";
|
|
5007
|
+
process.stderr.write(`[DingTalk:${this.name}] mention delivery status=${resp.status} code=${code}
|
|
5008
|
+
`);
|
|
5009
|
+
}
|
|
5010
|
+
if (!resp.ok) {
|
|
5011
|
+
const detail = await resp.text().catch(() => "");
|
|
5012
|
+
process.stderr.write(`[DingTalk:${this.name}] sendTextReply failed: HTTP ${resp.status} ${detail}
|
|
5013
|
+
`);
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
}
|
|
5017
|
+
async sendMessage(chatId, text) {
|
|
5018
|
+
await this.sendReply(chatId, text);
|
|
5019
|
+
}
|
|
4957
5020
|
supportsProactiveSend() {
|
|
4958
5021
|
return true;
|
|
4959
5022
|
}
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
* (a different API) and webhook-URL fallback chatIds.
|
|
4963
|
-
*/
|
|
5023
|
+
// Regular proactive paths accept only group targets; webhook tasks may use
|
|
5024
|
+
// DMs through the one-to-one API.
|
|
4964
5025
|
supportsProactiveTarget(target) {
|
|
4965
|
-
return target.isGroup === true && target.threadId === void 0 && this.
|
|
5026
|
+
return target.isGroup === true && target.threadId === void 0 && this.isStableTargetId(target.chatId);
|
|
5027
|
+
}
|
|
5028
|
+
supportsProactiveWebhookTarget(target) {
|
|
5029
|
+
return typeof target.isGroup === "boolean" && target.threadId === void 0 && this.isStableTargetId(target.chatId);
|
|
4966
5030
|
}
|
|
4967
5031
|
/**
|
|
4968
5032
|
* Single-shot cold send: a failed chunk aborts the remainder (already-sent
|
|
@@ -4974,7 +5038,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4974
5038
|
const chunks = normalizeDingTalkMarkdown(text);
|
|
4975
5039
|
const title = extractTitle(text);
|
|
4976
5040
|
for (let i = 0; i < chunks.length; i++) {
|
|
4977
|
-
await this.sendProactiveChunk(target
|
|
5041
|
+
await this.sendProactiveChunk(target, i === 0 ? title : `${title} (cont.)`, chunks[i], `chunk ${i + 1}/${chunks.length}`);
|
|
4978
5042
|
}
|
|
4979
5043
|
}
|
|
4980
5044
|
async getProactiveToken() {
|
|
@@ -4988,16 +5052,16 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
4988
5052
|
signal: AbortSignal.timeout(PROACTIVE_FETCH_TIMEOUT_MS)
|
|
4989
5053
|
});
|
|
4990
5054
|
data = await resp.json();
|
|
4991
|
-
} catch
|
|
4992
|
-
process.stderr.write(`[DingTalk:${this.name}]
|
|
5055
|
+
} catch {
|
|
5056
|
+
process.stderr.write(`[DingTalk:${this.name}] access token fetch failed.
|
|
4993
5057
|
`);
|
|
4994
|
-
throw new Error("DingTalk
|
|
5058
|
+
throw new Error("DingTalk access token fetch failed");
|
|
4995
5059
|
}
|
|
4996
5060
|
if (!data.access_token) {
|
|
4997
5061
|
const errmsg = sanitizeLogText(String(data.errmsg ?? ""), 200);
|
|
4998
|
-
process.stderr.write(`[DingTalk:${this.name}]
|
|
5062
|
+
process.stderr.write(`[DingTalk:${this.name}] access token request failed: gettoken errcode=${data.errcode} ${errmsg}
|
|
4999
5063
|
`);
|
|
5000
|
-
throw new Error(`DingTalk
|
|
5064
|
+
throw new Error(`DingTalk access token request failed: gettoken errcode=${data.errcode}${errmsg ? ` ${errmsg}` : ""}`);
|
|
5001
5065
|
}
|
|
5002
5066
|
this.proactiveToken = {
|
|
5003
5067
|
token: data.access_token,
|
|
@@ -5006,12 +5070,14 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5006
5070
|
};
|
|
5007
5071
|
return data.access_token;
|
|
5008
5072
|
}
|
|
5009
|
-
async sendProactiveChunk(
|
|
5073
|
+
async sendProactiveChunk(target, title, text, chunkLabel) {
|
|
5074
|
+
const targetKind = target.isGroup === true ? "group" : "dm";
|
|
5010
5075
|
for (let attempt = 0; ; attempt++) {
|
|
5011
5076
|
const token = await this.getProactiveToken();
|
|
5012
5077
|
let resp;
|
|
5013
5078
|
try {
|
|
5014
|
-
|
|
5079
|
+
const targetBody = target.isGroup === true ? { openConversationId: target.chatId } : { userIds: [target.chatId] };
|
|
5080
|
+
resp = await fetch(target.isGroup === true ? GROUP_MSG_API : DIRECT_MSG_API, {
|
|
5015
5081
|
method: "POST",
|
|
5016
5082
|
headers: {
|
|
5017
5083
|
"x-acs-dingtalk-access-token": token,
|
|
@@ -5019,15 +5085,15 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5019
5085
|
},
|
|
5020
5086
|
body: JSON.stringify({
|
|
5021
5087
|
robotCode: this.config.clientId,
|
|
5022
|
-
|
|
5023
|
-
msgKey:
|
|
5088
|
+
...targetBody,
|
|
5089
|
+
msgKey: PROACTIVE_MSG_KEY,
|
|
5024
5090
|
msgParam: JSON.stringify({ title, text })
|
|
5025
5091
|
}),
|
|
5026
5092
|
signal: AbortSignal.timeout(PROACTIVE_FETCH_TIMEOUT_MS)
|
|
5027
5093
|
});
|
|
5028
5094
|
} catch (err) {
|
|
5029
5095
|
const cause = err.cause;
|
|
5030
|
-
process.stderr.write(`[DingTalk:${this.name}] proactive send error (${chunkLabel}): ${err}${cause ? ` (${cause})` : ""}
|
|
5096
|
+
process.stderr.write(`[DingTalk:${this.name}] proactive send error (${targetKind}, ${chunkLabel}): ${err}${cause ? ` (${cause})` : ""}
|
|
5031
5097
|
`);
|
|
5032
5098
|
throw new Error(`DingTalk proactive send failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
5033
5099
|
}
|
|
@@ -5038,10 +5104,31 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5038
5104
|
}
|
|
5039
5105
|
if (!resp.ok) {
|
|
5040
5106
|
const detail = sanitizeLogText(await resp.text().catch(() => ""), 300);
|
|
5041
|
-
process.stderr.write(`[DingTalk:${this.name}] proactive send failed (${chunkLabel}): HTTP ${resp.status} ${detail}
|
|
5107
|
+
process.stderr.write(`[DingTalk:${this.name}] proactive send failed (${targetKind}, ${chunkLabel}): HTTP ${resp.status} ${detail}
|
|
5042
5108
|
`);
|
|
5043
5109
|
throw new Error(`DingTalk proactive send failed: HTTP ${resp.status}${detail ? ` ${detail}` : ""}`);
|
|
5044
5110
|
}
|
|
5111
|
+
if (target.isGroup === false) {
|
|
5112
|
+
let data;
|
|
5113
|
+
try {
|
|
5114
|
+
data = await resp.json();
|
|
5115
|
+
} catch {
|
|
5116
|
+
process.stderr.write(`[DingTalk:${this.name}] proactive send failed (${targetKind}, ${chunkLabel}): invalid JSON response
|
|
5117
|
+
`);
|
|
5118
|
+
throw new Error("DingTalk proactive send failed: invalid JSON response");
|
|
5119
|
+
}
|
|
5120
|
+
if (data.invalidStaffIdList?.includes(target.chatId)) {
|
|
5121
|
+
process.stderr.write(`[DingTalk:${this.name}] proactive send failed (${targetKind}, ${chunkLabel}): invalid direct recipient
|
|
5122
|
+
`);
|
|
5123
|
+
throw new Error("DingTalk proactive send failed: invalid direct recipient");
|
|
5124
|
+
}
|
|
5125
|
+
if (data.flowControlledStaffIdList?.includes(target.chatId)) {
|
|
5126
|
+
process.stderr.write(`[DingTalk:${this.name}] proactive send failed (${targetKind}, ${chunkLabel}): direct recipient rate limited
|
|
5127
|
+
`);
|
|
5128
|
+
throw new Error("DingTalk proactive send failed: direct recipient rate limited");
|
|
5129
|
+
}
|
|
5130
|
+
return;
|
|
5131
|
+
}
|
|
5045
5132
|
await resp.body?.cancel();
|
|
5046
5133
|
return;
|
|
5047
5134
|
}
|
|
@@ -5105,12 +5192,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5105
5192
|
process.stderr.write(`[DingTalk:${this.name}] Disconnected.
|
|
5106
5193
|
`);
|
|
5107
5194
|
}
|
|
5108
|
-
/**
|
|
5109
|
-
|
|
5110
|
-
* sessionWebhook` (see message handler below). Reactions and proactive
|
|
5111
|
-
* sends require a real conversation ID — skip the webhook-URL fallback case.
|
|
5112
|
-
*/
|
|
5113
|
-
isConversationId(chatId) {
|
|
5195
|
+
/** Stable API targets are conversation or user IDs, never webhook URLs. */
|
|
5196
|
+
isStableTargetId(chatId) {
|
|
5114
5197
|
return !!chatId && !/^https?:\/\//i.test(chatId);
|
|
5115
5198
|
}
|
|
5116
5199
|
reactionKey(messageId, conversationId) {
|
|
@@ -5130,7 +5213,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5130
5213
|
`);
|
|
5131
5214
|
}
|
|
5132
5215
|
startReaction(chatId, messageId, sessionId) {
|
|
5133
|
-
if (!messageId || !this.
|
|
5216
|
+
if (!messageId || !this.isStableTargetId(chatId))
|
|
5134
5217
|
return;
|
|
5135
5218
|
if (!this.inboundMessageIds.has(messageId))
|
|
5136
5219
|
return;
|
|
@@ -5158,7 +5241,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5158
5241
|
});
|
|
5159
5242
|
}
|
|
5160
5243
|
stopReaction(chatId, messageId, sessionId) {
|
|
5161
|
-
if (!messageId || !this.
|
|
5244
|
+
if (!messageId || !this.isStableTargetId(chatId))
|
|
5162
5245
|
return;
|
|
5163
5246
|
const key = this.reactionKey(messageId, chatId);
|
|
5164
5247
|
if (sessionId) {
|
|
@@ -5177,6 +5260,16 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5177
5260
|
}
|
|
5178
5261
|
/** Recall reactions left behind when a session dies without terminal lifecycle events. */
|
|
5179
5262
|
onSessionDied(sessionId) {
|
|
5263
|
+
const bufferedTargets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5264
|
+
if (bufferedTargets) {
|
|
5265
|
+
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
5266
|
+
for (const messageId of bufferedTargets) {
|
|
5267
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5268
|
+
this.mentionTargets.delete(messageId);
|
|
5269
|
+
}
|
|
5270
|
+
}
|
|
5271
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5272
|
+
this.textReplySessions.delete(sessionId);
|
|
5180
5273
|
const keys = this.sessionReactionKeys.get(sessionId);
|
|
5181
5274
|
if (keys) {
|
|
5182
5275
|
this.sessionReactionKeys.delete(sessionId);
|
|
@@ -5196,15 +5289,94 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5196
5289
|
return;
|
|
5197
5290
|
}
|
|
5198
5291
|
if (isTerminalTaskLifecycleType(event.type)) {
|
|
5292
|
+
if (event.messageId)
|
|
5293
|
+
this.mentionTargets.delete(event.messageId);
|
|
5199
5294
|
this.stopReaction(event.chatId, event.messageId, event.sessionId);
|
|
5200
5295
|
}
|
|
5201
5296
|
}
|
|
5297
|
+
onPromptBufferDropped(_chatId, sessionId, messageIds) {
|
|
5298
|
+
for (const messageId of messageIds) {
|
|
5299
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5300
|
+
this.mentionTargets.delete(messageId);
|
|
5301
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5302
|
+
}
|
|
5303
|
+
}
|
|
5304
|
+
onPromptBufferDrained(_chatId, sessionId, messageIds) {
|
|
5305
|
+
for (const messageId of messageIds) {
|
|
5306
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5307
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5308
|
+
}
|
|
5309
|
+
for (const messageId of messageIds.slice(0, -1)) {
|
|
5310
|
+
this.mentionTargets.delete(messageId);
|
|
5311
|
+
}
|
|
5312
|
+
}
|
|
5313
|
+
onPromptBuffered(_chatId, sessionId, messageId) {
|
|
5314
|
+
if (messageId && this.mentionTargets.has(messageId)) {
|
|
5315
|
+
this.bufferedMentionTargets.add(messageId);
|
|
5316
|
+
let targets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5317
|
+
if (!targets) {
|
|
5318
|
+
targets = /* @__PURE__ */ new Set();
|
|
5319
|
+
this.bufferedMentionTargetsBySession.set(sessionId, targets);
|
|
5320
|
+
}
|
|
5321
|
+
targets.add(messageId);
|
|
5322
|
+
}
|
|
5323
|
+
}
|
|
5202
5324
|
onPromptStart(chatId, sessionId, messageId) {
|
|
5325
|
+
if (messageId) {
|
|
5326
|
+
this.bufferedMentionTargets.delete(messageId);
|
|
5327
|
+
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
5328
|
+
const atUserId = this.mentionTargets.get(messageId);
|
|
5329
|
+
this.mentionTargets.delete(messageId);
|
|
5330
|
+
if (this.atSender && atUserId) {
|
|
5331
|
+
this.sessionMentionTargets.set(sessionId, atUserId);
|
|
5332
|
+
this.textReplySessions.add(sessionId);
|
|
5333
|
+
}
|
|
5334
|
+
}
|
|
5203
5335
|
this.startReaction(chatId, messageId, sessionId);
|
|
5204
5336
|
}
|
|
5337
|
+
async handleInbound(envelope) {
|
|
5338
|
+
if (!await this.preflightInbound(envelope))
|
|
5339
|
+
return;
|
|
5340
|
+
const messageId = envelope.messageId;
|
|
5341
|
+
const atUserId = envelope[mentionTarget];
|
|
5342
|
+
if (this.atSender && messageId && atUserId) {
|
|
5343
|
+
this.mentionTargets.set(messageId, atUserId);
|
|
5344
|
+
}
|
|
5345
|
+
await this.processInbound(envelope);
|
|
5346
|
+
}
|
|
5347
|
+
async processInbound(envelope) {
|
|
5348
|
+
const messageId = envelope.messageId;
|
|
5349
|
+
try {
|
|
5350
|
+
await super.processInbound(envelope);
|
|
5351
|
+
} finally {
|
|
5352
|
+
if (messageId && !this.bufferedMentionTargets.has(messageId)) {
|
|
5353
|
+
this.mentionTargets.delete(messageId);
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5356
|
+
}
|
|
5357
|
+
untrackBufferedMentionTarget(sessionId, messageId) {
|
|
5358
|
+
const targets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
5359
|
+
if (!targets)
|
|
5360
|
+
return;
|
|
5361
|
+
targets.delete(messageId);
|
|
5362
|
+
if (targets.size === 0)
|
|
5363
|
+
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
5364
|
+
}
|
|
5205
5365
|
onPromptEnd(chatId, sessionId, messageId) {
|
|
5366
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5367
|
+
this.textReplySessions.delete(sessionId);
|
|
5206
5368
|
this.stopReaction(chatId, messageId, sessionId);
|
|
5207
5369
|
}
|
|
5370
|
+
async sendResponseMessage(chatId, text, sessionId) {
|
|
5371
|
+
const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
5372
|
+
if (atUserId)
|
|
5373
|
+
this.sessionMentionTargets.delete(sessionId);
|
|
5374
|
+
if (this.textReplySessions.has(sessionId)) {
|
|
5375
|
+
await this.sendTextReply(chatId, text, atUserId);
|
|
5376
|
+
return;
|
|
5377
|
+
}
|
|
5378
|
+
await this.sendReply(chatId, text);
|
|
5379
|
+
}
|
|
5208
5380
|
/**
|
|
5209
5381
|
* Extract quoted/referenced message context from a reply.
|
|
5210
5382
|
* DingTalk provides this via text.repliedMsg (newer) or quoteMessage (legacy).
|
|
@@ -5333,10 +5505,17 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5333
5505
|
* Images → base64 in envelope; files → saved to temp dir with path in text.
|
|
5334
5506
|
*/
|
|
5335
5507
|
async attachMedia(envelope, downloadCode, mediaType, fileName) {
|
|
5336
|
-
|
|
5508
|
+
let token;
|
|
5509
|
+
try {
|
|
5510
|
+
token = await this.getProactiveToken();
|
|
5511
|
+
} catch {
|
|
5512
|
+
process.stderr.write(`[DingTalk:${this.name}] Cannot download media: access token refresh failed.
|
|
5513
|
+
`);
|
|
5514
|
+
return;
|
|
5515
|
+
}
|
|
5337
5516
|
const robotCode = this.config.clientId;
|
|
5338
|
-
if (!
|
|
5339
|
-
process.stderr.write(`[DingTalk:${this.name}] Cannot download media: missing
|
|
5517
|
+
if (!robotCode) {
|
|
5518
|
+
process.stderr.write(`[DingTalk:${this.name}] Cannot download media: missing robotCode.
|
|
5340
5519
|
`);
|
|
5341
5520
|
return;
|
|
5342
5521
|
}
|
|
@@ -5431,6 +5610,9 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
5431
5610
|
referencedText: quoted.referencedText
|
|
5432
5611
|
};
|
|
5433
5612
|
envelope.messageId = msgId;
|
|
5613
|
+
if (this.atSender && isGroup && senderStaffId) {
|
|
5614
|
+
envelope[mentionTarget] = senderStaffId;
|
|
5615
|
+
}
|
|
5434
5616
|
const processMessage = /* @__PURE__ */ __name(async () => {
|
|
5435
5617
|
if (content.downloadCodes.length > 0 && content.mediaType) {
|
|
5436
5618
|
await this.attachMedia(envelope, content.downloadCodes[0], content.mediaType, content.fileName);
|