@qwen-code/qwen-code 0.22.2 → 0.22.3-nightly.20260831.3a0c4c6108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/computer-use/SKILL.md +3 -3
- package/bundled/qc-helper/docs/common-workflow.md +32 -0
- package/bundled/qc-helper/docs/configuration/auth.md +6 -6
- package/bundled/qc-helper/docs/configuration/model-providers.md +4 -2
- package/bundled/qc-helper/docs/configuration/settings.md +47 -44
- package/bundled/qc-helper/docs/extension/introduction.md +1 -1
- package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
- package/bundled/qc-helper/docs/features/auto-mode.md +34 -17
- package/bundled/qc-helper/docs/features/channels/dws.md +2 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +36 -3
- package/bundled/qc-helper/docs/features/code-review.md +5 -5
- package/bundled/qc-helper/docs/features/commands.md +41 -0
- package/bundled/qc-helper/docs/features/computer-use.md +2 -2
- package/bundled/qc-helper/docs/features/hooks.md +6 -2
- package/bundled/qc-helper/docs/features/memory.md +1 -0
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +17 -7
- package/bundled/qc-helper/docs/qwen-serve.md +59 -55
- package/bundled/review/SKILL.md +90 -31
- package/bundled/review/references/persistence.md +7 -3
- package/bundled/review/references/posting.md +11 -5
- package/chunks/MaxSizedBox-IHRTWGSY.js +115 -0
- package/chunks/{StandaloneSessionPicker-AVLI6VJP.js → StandaloneSessionPicker-TLVWVTJ7.js} +88 -85
- package/chunks/{acp-startup-profiler-GNYAL6LI.js → acp-startup-profiler-M4X5F3VK.js} +2 -2
- package/chunks/{acpAgent-MXEAN54C.js → acpAgent-7I5LLPP3.js} +1563 -407
- package/chunks/agent-4Z4NTJXD.js +99 -0
- package/chunks/agent-headless-TVUJXQWU.js +89 -0
- package/chunks/{anthropicContentGenerator-HGMBACVE.js → anthropicContentGenerator-VSSPG7XV.js} +84 -55
- package/chunks/{artifact-tool-5YT4QF7Y.js → artifact-tool-TEYW6I4A.js} +11 -3
- package/chunks/{askUserQuestion-4SWJY65V.js → askUserQuestion-PYNBWV63.js} +45 -7
- package/chunks/bridge-EVURP4NO.js +122 -0
- package/chunks/{ca-7HPYOYSZ.js → ca-BNU7YNDE.js} +3 -0
- package/chunks/{channel-management-service-X4AZ6IXX.js → channel-management-service-IDBNYSFW.js} +6 -6
- package/chunks/channel-settings-store-MZNXRKVI.js +125 -0
- package/chunks/{channel-worker-group-27HMGD5S.js → channel-worker-group-ZLP5SJHT.js} +7 -7
- package/chunks/{channel-worker-manager-QEGX646Z.js → channel-worker-manager-FG5377T2.js} +7 -7
- package/chunks/{channel-worker-supervisor-UEW2WWCC.js → channel-worker-supervisor-HDVE4ADS.js} +4 -4
- package/chunks/{chunk-PPKZ7JOE.js → chunk-22UH7VTP.js} +1 -1
- package/chunks/chunk-24FVUD5P.js +49 -0
- package/chunks/{chunk-CMHFCLBU.js → chunk-26SIKQIC.js} +1 -1
- package/chunks/{chunk-5PA6UEYA.js → chunk-3452WXOK.js} +4 -1
- package/chunks/{chunk-SFPGAQUL.js → chunk-373DQUVA.js} +72 -31
- package/chunks/{chunk-H2WDGQ6D.js → chunk-3AKCBZVW.js} +3 -3
- package/chunks/{chunk-LXIBMVRN.js → chunk-3CZGSTZX.js} +15 -9
- package/chunks/{chunk-JVPFTDBK.js → chunk-3EGEBDTW.js} +1 -1
- package/chunks/{chunk-K2NQPH5D.js → chunk-3NQCZMUB.js} +79 -5
- package/chunks/{chunk-E7REAOTN.js → chunk-47ECGEJC.js} +4 -0
- package/chunks/{chunk-WKK5BQNP.js → chunk-4P7PPAHN.js} +45 -421
- package/chunks/chunk-4VQBQLIZ.js +293 -0
- package/chunks/{chunk-4JWNNLPT.js → chunk-5FGWVPCM.js} +4 -4
- package/chunks/{chunk-ZFKOCECU.js → chunk-5ICKESC3.js} +2 -2
- package/chunks/{chunk-3I6UTTDX.js → chunk-67AY5D3M.js} +20 -20
- package/chunks/chunk-6HUXPLB5.js +110 -0
- package/chunks/{chunk-BRVWYMKV.js → chunk-6MBXY6WM.js} +1 -1
- package/chunks/{chunk-6LFTG244.js → chunk-6NWPR2EB.js} +19 -9
- package/chunks/chunk-6OO7QEWV.js +2581 -0
- package/chunks/{chunk-TWSKM647.js → chunk-6VHIWUJP.js} +1 -1
- package/chunks/{chunk-RJC5EIKY.js → chunk-6YXNJXQW.js} +7 -5
- package/chunks/{chunk-TPI7O7HR.js → chunk-7DDTI7Q3.js} +1 -1
- package/chunks/{chunk-KGJGEEVR.js → chunk-7FA2II6K.js} +10 -1
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-NIFYWDYN.js → chunk-7TBU7PU2.js} +1 -1
- package/chunks/{chunk-3FDFA4MZ.js → chunk-7XICSE62.js} +3 -3
- package/chunks/{chunk-V2NDP3I4.js → chunk-7XL4WRXM.js} +2 -2
- package/chunks/{chunk-F7TNAPZ4.js → chunk-AAX236AR.js} +45 -11
- package/chunks/{chunk-T32W2JHI.js → chunk-ACZ4YRYK.js} +6 -6
- package/chunks/chunk-ADJD4LZF.js +210 -0
- package/chunks/{chunk-JWALNCLT.js → chunk-AF3QB6OL.js} +1 -1
- package/chunks/{chunk-P2SU6ZTI.js → chunk-AI35S34R.js} +3 -3
- package/chunks/{chunk-OIP7C4FE.js → chunk-AKNQMSL2.js} +5 -5
- package/chunks/{chunk-6CGL7E7G.js → chunk-AN3KFCNH.js} +2 -2
- package/chunks/{chunk-ABS25QER.js → chunk-ANVG3BVV.js} +1 -1
- package/chunks/chunk-AYYKUUKP.js +972 -0
- package/chunks/chunk-B2RIIK3K.js +346 -0
- package/chunks/{chunk-F5SZP77N.js → chunk-BBYTY46C.js} +153 -112
- package/chunks/{chunk-XRSOI3DL.js → chunk-BE5FGT5Z.js} +1 -1
- package/chunks/{chunk-BGXZBI5B.js → chunk-BHTYRHJF.js} +3 -2
- package/chunks/{chunk-CSMI4FP5.js → chunk-BSJOBW4U.js} +1 -1
- package/chunks/{chunk-Z7TGYN5F.js → chunk-BXNKREX7.js} +3 -3
- package/chunks/{chunk-4MQEPP3Y.js → chunk-BY24DZ4J.js} +5 -119
- package/chunks/{chunk-5XBFCMWD.js → chunk-CAZADEU7.js} +17 -9
- package/chunks/chunk-CHEIIBT3.js +40 -0
- package/chunks/{chunk-BBWV7ONL.js → chunk-CM4F4JBB.js} +6 -6
- package/chunks/{chunk-CAJTKR6W.js → chunk-D7D3HSYQ.js} +6 -5
- package/chunks/{chunk-3DXFGHAJ.js → chunk-DBTMP3P4.js} +213 -185
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-RXFQM6FQ.js → chunk-DMEUXLSS.js} +16 -1
- package/chunks/{chunk-3AFMQUTI.js → chunk-E4JNFXNI.js} +3 -3
- package/chunks/{chunk-UHQFIS7N.js → chunk-EAHOJF6V.js} +28 -4
- package/chunks/{chunk-OIVXBW3W.js → chunk-ED7DD7MV.js} +3 -3
- package/chunks/{chunk-6DIGWMGT.js → chunk-EIJT2PQ6.js} +2 -2
- package/chunks/{chunk-XQFT3QUF.js → chunk-ENYUKMFK.js} +1 -1
- package/chunks/{chunk-CQH5KTKC.js → chunk-ERHAMGAA.js} +1 -1
- package/chunks/{chunk-IOPCFOTF.js → chunk-ERRJA23L.js} +3 -3
- package/chunks/{chunk-LDP5OD6N.js → chunk-EU2B4P3D.js} +12 -12
- package/chunks/{chunk-W5MJJ2V7.js → chunk-FHPYRXRH.js} +1 -1
- package/chunks/{chunk-IZIVM7LZ.js → chunk-FIWZOMBF.js} +3 -3
- package/chunks/{chunk-4HV6HH33.js → chunk-FPMQT2YY.js} +9 -9
- package/chunks/{chunk-Z7VOMGDC.js → chunk-FTJMWDND.js} +0 -24
- package/chunks/{chunk-L2M46FP5.js → chunk-FXUSWLBF.js} +225 -12
- package/chunks/{chunk-VVW4ZNFY.js → chunk-GB4UKWY5.js} +16 -8
- package/chunks/{chunk-PKAYJDB3.js → chunk-GCUR24KK.js} +22 -4
- package/chunks/{chunk-DIMEPKCW.js → chunk-GDXSXL3H.js} +11 -1
- package/chunks/{chunk-7JPW6IYH.js → chunk-GN422P4J.js} +1 -1
- package/chunks/{chunk-66KDY3LV.js → chunk-GS7XT345.js} +3 -3
- package/chunks/{chunk-PFCQ62V4.js → chunk-H2A2GJGL.js} +6 -6
- package/chunks/{chunk-Z7FLBQPR.js → chunk-H5GPPDGY.js} +8 -8
- package/chunks/{chunk-CPGJJJLU.js → chunk-HDMKCJHI.js} +1 -1
- package/chunks/{chunk-6PJOTWAN.js → chunk-HT5S5TRQ.js} +1 -1
- package/chunks/{chunk-Z4X5MTRT.js → chunk-HWVUSYSN.js} +5 -12
- package/chunks/{chunk-V4QXXQJ2.js → chunk-I75VKFCJ.js} +4 -4
- package/chunks/{chunk-NU7RKEZR.js → chunk-IBMUI5EV.js} +3 -3
- package/chunks/{chunk-4J657AJR.js → chunk-ID33ZRWH.js} +42 -42
- package/chunks/{chunk-R4PMVSR5.js → chunk-IIFL7QDN.js} +30 -192
- package/chunks/{chunk-MQM5PJML.js → chunk-IVUWTA2D.js} +1 -1
- package/chunks/{chunk-E55H6BZ7.js → chunk-IXEZHTDR.js} +1616 -151
- package/chunks/{chunk-XF63PKEN.js → chunk-IXHV5MIC.js} +1 -1
- package/chunks/{chunk-JHS74YAB.js → chunk-J4Y3QJHF.js} +3 -1
- package/chunks/{chunk-MIIVI25Q.js → chunk-JDIO45X7.js} +3 -3
- package/chunks/{chunk-QFCDF5PL.js → chunk-JHN7UIDW.js} +1 -1
- package/chunks/{chunk-FDY5RMGH.js → chunk-JLSZT354.js} +2 -2
- package/chunks/chunk-JMRE4WJQ.js +1849 -0
- package/chunks/{chunk-FY76G3G5.js → chunk-JOTYTYYW.js} +6 -6
- package/chunks/{chunk-TRZTNIQ6.js → chunk-JOWQD4LO.js} +3 -3
- package/chunks/{chunk-KEKZFOL6.js → chunk-JPKTAQS3.js} +1 -1
- package/chunks/chunk-JS73NNWF.js +30 -0
- package/chunks/chunk-JX6XHPTX.js +26 -0
- package/chunks/{chunk-5JTIYALA.js → chunk-JZWOCUZ3.js} +1 -1
- package/chunks/{chunk-3JGZSIDA.js → chunk-KFN2IZYR.js} +3 -3
- package/chunks/{chunk-23RFD54N.js → chunk-KHP66DFN.js} +1 -1
- package/chunks/{chunk-AGR5UROZ.js → chunk-KUDI54QQ.js} +23 -33
- package/chunks/{chunk-3SGB2UHX.js → chunk-L2OKAIUK.js} +28 -16
- package/chunks/{chunk-BXDAPVQU.js → chunk-L6CUJZDG.js} +28 -4
- package/chunks/chunk-LAUEEBDL.js +277 -0
- package/chunks/{chunk-BNMF3K5X.js → chunk-LFAR7CPW.js} +55 -39
- package/chunks/{chunk-Y3QL45LS.js → chunk-LKODFJRD.js} +9 -9
- package/chunks/{chunk-BWORX6FA.js → chunk-LMMHS3RS.js} +1 -1
- package/chunks/{chunk-UTLCH2FK.js → chunk-LYSZVCCD.js} +10 -7
- package/chunks/{chunk-F6FV3C5K.js → chunk-MBZ5ORJB.js} +264 -283
- package/chunks/{chunk-L6YT5H34.js → chunk-MJBHSZEJ.js} +5 -5
- package/chunks/{chunk-B7CDU2SL.js → chunk-MOF6VZN2.js} +18 -21
- package/chunks/{chunk-6LFJEACX.js → chunk-MZ5A5PQW.js} +7 -7
- package/chunks/chunk-MZYWNU66.js +149 -0
- package/chunks/{chunk-2TNL5KPM.js → chunk-N4QWUPDM.js} +7 -0
- package/chunks/{chunk-5O72BNDD.js → chunk-ND7TQQPE.js} +9 -9
- package/chunks/{chunk-QP4C6WCE.js → chunk-NGKLMNWN.js} +3 -3
- package/chunks/{chunk-JSC3H3TD.js → chunk-NT5XIL5H.js} +46 -18
- package/chunks/{chunk-KUX5D6DK.js → chunk-NT7LXVV5.js} +11010 -11138
- package/chunks/{chunk-PDQGMSZK.js → chunk-ODZF64DM.js} +1 -1
- package/chunks/{chunk-FBSSIAAQ.js → chunk-OE5AQVNB.js} +8 -8
- package/chunks/chunk-OHU2H5CS.js +130 -0
- package/chunks/{chunk-2K6ORIHJ.js → chunk-OKMDOATP.js} +13 -13
- package/chunks/{chunk-JB4JIVTJ.js → chunk-OKTNXDVO.js} +1 -1
- package/chunks/{chunk-XDLEZ5HX.js → chunk-OQYXJK2V.js} +1 -1
- package/chunks/{chunk-EFUM7RVY.js → chunk-OSTQZIOY.js} +944 -18
- package/chunks/{chunk-VQUGEVGR.js → chunk-OTTNXUT5.js} +1 -1
- package/chunks/{chunk-T3WXYEZ4.js → chunk-PB7JBAHF.js} +53 -54
- package/chunks/{chunk-WAOIHTJS.js → chunk-PDAKFU7M.js} +1 -1
- package/chunks/{chunk-43GGFFLY.js → chunk-PDXYZBBQ.js} +3 -3
- package/chunks/{chunk-4CMJKUND.js → chunk-PNIGAVY6.js} +67 -2
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-4CDSK5AZ.js → chunk-PWR2NQBS.js} +6 -6
- package/chunks/{chunk-YTDVNSUQ.js → chunk-QAK5475D.js} +1 -1
- package/chunks/{chunk-IJKTMLBE.js → chunk-QE7DTCLX.js} +1 -1
- package/chunks/{chunk-SMPR7SPO.js → chunk-QJNDUTOL.js} +45 -239
- package/chunks/{chunk-C6K43ZDE.js → chunk-QTMPM6RC.js} +16 -10
- package/chunks/{chunk-P5GGM4KS.js → chunk-RAEEQEC5.js} +5 -5
- package/chunks/{chunk-XDFHY4R3.js → chunk-RGEV5AUD.js} +242 -14
- package/chunks/{chunk-M6FOJXW3.js → chunk-RKW36UWC.js} +1 -1
- package/chunks/{chunk-RIEFGNTP.js → chunk-RLSPPTWH.js} +5119 -683
- package/chunks/{chunk-PDMJ3KGS.js → chunk-RT4QNQ5P.js} +3 -3
- package/chunks/{chunk-SJ3ZUWFK.js → chunk-RVCGAHC7.js} +4 -26
- package/chunks/{chunk-77RG5SFQ.js → chunk-RY7DL5IF.js} +11 -6
- package/chunks/{chunk-4FTKQNWJ.js → chunk-S2T7H5MI.js} +182 -3
- package/chunks/{chunk-EOGELB3H.js → chunk-SDCHI64N.js} +4 -4
- package/chunks/{chunk-EKSCLBBF.js → chunk-SMJYTKTB.js} +23 -5
- package/chunks/{chunk-MZS7GEC7.js → chunk-SMRDCANI.js} +1 -1
- package/chunks/{chunk-43UYNAWX.js → chunk-T3TL6S3B.js} +4 -4
- package/chunks/{chunk-4K7NQDCG.js → chunk-T4EFG2P5.js} +18 -9
- package/chunks/{chunk-IK5BW3CS.js → chunk-T4RMUTTT.js} +16 -5
- package/chunks/{chunk-L6BZRIUL.js → chunk-TBJ3SNS3.js} +183 -5
- package/chunks/{chunk-CCBZDVUA.js → chunk-TNMOFNT4.js} +133 -122
- package/chunks/{chunk-Y6LSMB6J.js → chunk-TV7BJ7TX.js} +1 -1
- package/chunks/{chunk-G34IR3D6.js → chunk-U5RTYI7D.js} +102 -146
- package/chunks/{chunk-TTX2JUE6.js → chunk-U6D2PPMN.js} +1 -1
- package/chunks/{chunk-D5LUXLUH.js → chunk-UJ4DUYIH.js} +18 -4
- package/chunks/{chunk-A7YP63XN.js → chunk-UKB2TZAO.js} +5 -5
- package/chunks/{chunk-VTHREBQM.js → chunk-UKYXYWI2.js} +2 -2
- package/chunks/{chunk-2NYCN6F2.js → chunk-UVYKCRJZ.js} +46 -29
- package/chunks/{chunk-HVEYF6VT.js → chunk-UXEW7TQS.js} +2 -2
- package/chunks/{chunk-HVQ3B7FF.js → chunk-V4HN35IF.js} +44 -7
- package/chunks/chunk-VGHZT6JR.js +51 -0
- package/chunks/{chunk-V5J4J5TP.js → chunk-VYSZUQGU.js} +2 -20
- package/chunks/{chunk-6IUNAPLR.js → chunk-W4BDHLRT.js} +3 -3
- package/chunks/{chunk-Q26AYA62.js → chunk-W7KWB6AH.js} +7 -4
- package/chunks/chunk-WLEYH7CD.js +332 -0
- package/chunks/{chunk-RU7BK6B3.js → chunk-X7C7KFWA.js} +2 -2
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-BFPESSTR.js → chunk-XEAAO654.js} +1 -1
- package/chunks/{chunk-JU4EEXC7.js → chunk-XLENZQXH.js} +2 -2
- package/chunks/{chunk-JSHHYW6T.js → chunk-XPDKSOVW.js} +69 -64
- package/chunks/chunk-YDQ4OCDK.js +1222 -0
- package/chunks/{chunk-ZU4UDIWX.js → chunk-YKADANK6.js} +6 -7
- package/chunks/{chunk-JCQD3INC.js → chunk-YNG7XAJU.js} +3 -3
- package/chunks/{chunk-O2UN57NX.js → chunk-YOFULAHO.js} +19 -2
- package/chunks/{chunk-BAJKAAOY.js → chunk-YOMKOM7E.js} +4892 -1504
- package/chunks/{chunk-ERFDKH32.js → chunk-YPISTYEI.js} +8 -7
- package/chunks/{chunk-TGWAQ5RB.js → chunk-ZBDYI7VM.js} +6900 -6882
- package/chunks/{chunk-OZ6KS6KW.js → chunk-ZGCKTAL5.js} +6 -1
- package/chunks/chunk-ZHO2CW6D.js +205 -0
- package/chunks/{chunk-DZWPESIF.js → chunk-ZQ3FKEWA.js} +3 -3
- package/chunks/{chunk-7EQQR46F.js → chunk-ZVP4PWBU.js} +1 -1
- package/chunks/{chunk-7UYV53BC.js → chunk-ZYPJ7HVZ.js} +1 -1
- package/chunks/config-utils-NNUPVGEC.js +118 -0
- package/chunks/contextCommand-S3TPCDM5.js +111 -0
- package/chunks/{core-runtime-677KFX6Q.js → core-runtime-NASPCSQX.js} +66 -63
- package/chunks/{create-sub-session-23ITIELI.js → create-sub-session-36TNCHCP.js} +3 -3
- package/chunks/{create-sub-session-JKZAYZX7.js → create-sub-session-DS4BJLYZ.js} +97 -68
- package/chunks/{cron-create-KJ4IY6PP.js → cron-create-QXHTYUTO.js} +4 -4
- package/chunks/{cron-delete-MBLQCAYY.js → cron-delete-WV2BM42M.js} +4 -4
- package/chunks/{cron-list-DWH2PQ47.js → cron-list-7KVNBLZ7.js} +4 -4
- package/chunks/{daemon-MJQUO7RA.js → daemon-UCVUHPJD.js} +723 -90
- package/chunks/{daemon-git-worktree-guard-6MVAAZZZ.js → daemon-git-worktree-guard-ATXVQPS3.js} +63 -60
- package/chunks/daemon-status-provider-UI3GBTMO.js +121 -0
- package/chunks/daemon-trust-policy-SUCBJ2CA.js +117 -0
- package/chunks/{daemon-trust-policy-monitor-B5U6TQX5.js → daemon-trust-policy-monitor-3LM5RQNS.js} +71 -68
- package/chunks/{de-X6HLSIFE.js → de-T4BLOKEC.js} +3 -0
- package/chunks/deferred-core-runtime-SCOJLVYG.js +119 -0
- package/chunks/{display-image-BE7I6ZB6.js → display-image-Z4VBQDEJ.js} +5 -5
- package/chunks/{dist-TJUDJTCB.js → dist-5423MG3D.js} +411 -91
- package/chunks/{dist-ILDBUWDB.js → dist-7WDZYMWV.js} +43 -25
- package/chunks/{dist-ZBVOXSKF.js → dist-FLJLHASF.js} +219 -121
- package/chunks/{dist-QODVOVWI.js → dist-GPSRNVVP.js} +43 -35
- package/chunks/{dist-DJBNNPLN.js → dist-LY66XNUL.js} +10 -3
- package/chunks/{dist-7CKN54NL.js → dist-S3BKCTWF.js} +205 -89
- package/chunks/{dist-UQUFZDIY.js → dist-SDKHGH5O.js} +41 -20
- package/chunks/{dist-4Q7NTUNB.js → dist-WAUO5OMN.js} +46 -22
- package/chunks/{dist-SATKXKUR.js → dist-WIVVPE7M.js} +28 -14
- package/chunks/earlyInputCapture-INWJ2STR.js +112 -0
- package/chunks/{edit-BSV6YRVW.js → edit-B7ZRRGAE.js} +51 -49
- package/chunks/{en-YLXBXM4Z.js → en-E4AYTX6H.js} +3 -0
- package/chunks/{enter-worktree-MQXFFPKM.js → enter-worktree-SPZHEETQ.js} +7 -7
- package/chunks/{enterPlanMode-PKNF35FE.js → enterPlanMode-S554IKJ2.js} +55 -53
- package/chunks/environment-25ADH4Y6.js +134 -0
- package/chunks/errors-G2I6LFTW.js +118 -0
- package/chunks/{exit-worktree-L344UY7K.js → exit-worktree-AWUXAMAM.js} +7 -7
- package/chunks/exitPlanMode-ZFH4OYPM.js +87 -0
- package/chunks/{fast-path-773PV7PU.js → fast-path-WZHVZ2ER.js} +8 -7
- package/chunks/{fast-path-settings-XMFBYFUH.js → fast-path-settings-NILM6QZL.js} +3 -3
- package/chunks/{fr-FTZWF462.js → fr-BGHGYX6A.js} +3 -0
- package/chunks/{glob-CZHOWUEA.js → glob-UOVDMBUP.js} +50 -48
- package/chunks/{goal-tools-YZQJXTGH.js → goal-tools-7TNK5ZHC.js} +5 -4
- package/chunks/{grep-5GPICQBU.js → grep-LHYJ5V2N.js} +9 -7
- package/chunks/handleAutoUpdate-4MZ45DZY.js +114 -0
- package/chunks/i18n-KWUEI4DS.js +129 -0
- package/chunks/{image-gen-HAYOEQ4O.js → image-gen-YZDVO5YS.js} +8 -10
- package/chunks/initializer-2NBROGMG.js +118 -0
- package/chunks/installationInfo-YKUSY3ZB.js +112 -0
- package/chunks/{ja-2GL5FKYJ.js → ja-G3FTD5XE.js} +3 -0
- package/chunks/{keychain-token-storage-37XPR34V.js → keychain-token-storage-REZVMJA6.js} +2 -2
- package/chunks/list-W2WV3COM.js +121 -0
- package/chunks/list-agents-PMVMHNY7.js +128 -0
- package/chunks/{gemini-IP4FJAP5.js → llm-NPPHLIJI.js} +162 -133
- package/chunks/{geminiContentGenerator-PUNEBWJW.js → llm-content-generator-YK3WN6XW.js} +29 -29
- package/chunks/loadedSettingsAdapter-2P7DFWUR.js +115 -0
- package/chunks/{loggingContentGenerator-2GGZNGLG.js → loggingContentGenerator-QYYYGU6V.js} +318 -35
- package/chunks/{loop-wakeup-XJFONSQ7.js → loop-wakeup-EBM4F5MZ.js} +5 -5
- package/chunks/{ls-3VAT2J7A.js → ls-F6TRX3DD.js} +4 -4
- package/chunks/{lsp-5W7IRUBH.js → lsp-QYTOS2FI.js} +2 -2
- package/chunks/{managed-npm-update-5TEV2E3J.js → managed-npm-update-UMC4NBWW.js} +64 -61
- package/chunks/mcp-OFI6XDP2.js +115 -0
- package/chunks/{monitor-FI7PY36Z.js → monitor-QX3BM3JY.js} +50 -48
- package/chunks/nonInteractiveCli-NVRMD5MN.js +193 -0
- package/chunks/{notebook-edit-TPGMGBST.js → notebook-edit-AAILDPSV.js} +51 -49
- package/chunks/{open-with-auth-4UI3KHUR.js → open-with-auth-D6JD6LDS.js} +4 -4
- package/chunks/{openaiContentGenerator-SUCYANUZ.js → openaiContentGenerator-53PB3CMN.js} +27 -29
- package/chunks/pidfile-5ACKG2LI.js +116 -0
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-IQZBYWSB.js → processUtils-2BCDO3DZ.js} +2 -2
- package/chunks/prompt-terminal-ledger-3RKW73A2.js +110 -0
- package/chunks/{pt-XN2YWJVM.js → pt-D73IFYT7.js} +3 -0
- package/chunks/{qwenContentGenerator-J4TXFGJT.js → qwenContentGenerator-N4LLWDPH.js} +56 -54
- package/chunks/{qwenOAuth2-RF33DNZW.js → qwenOAuth2-7AOCKSOQ.js} +7 -9
- package/chunks/{read-file-QE2B5FTX.js → read-file-DPAKXHYE.js} +13 -13
- package/chunks/{read-mcp-resource-XD257PGJ.js → read-mcp-resource-R4NO75DW.js} +2 -2
- package/chunks/{record-artifact-RZGZBENU.js → record-artifact-2EAYLAL5.js} +4 -4
- package/chunks/{report-findings-Q3SYKKW5.js → report-findings-Y4MSHDS3.js} +9 -5
- package/chunks/{request-shutdown-BCLA3JV2.js → request-shutdown-DWRMGTMB.js} +8 -7
- package/chunks/resumeHistoryUtils-3JQORXAK.js +123 -0
- package/chunks/ripGrep-AHF5QCI7.js +39 -0
- package/chunks/{ru-OLTMFJEW.js → ru-QMISLKRH.js} +3 -0
- package/chunks/{run-qwen-serve-TPHZMSXJ.js → run-qwen-serve-3LKV7KDC.js} +728 -256
- package/chunks/runtime-66F4W3IA.js +153 -0
- package/chunks/scheduled-tasks-2NVKS5Q2.js +132 -0
- package/chunks/scheduler-JNV7T3ZO.js +127 -0
- package/chunks/{sdk-exporters-http-KCJ4ZFG7.js → sdk-exporters-http-MFIWD23D.js} +2 -2
- package/chunks/{sdk-impl-HLSEDAEP.js → sdk-impl-2RXJ4Q6X.js} +11 -5
- package/chunks/send-message-WPZRCJOB.js +442 -0
- package/chunks/serve-GP2UNRP7.js +123 -0
- package/chunks/{server-DFUSSSHI.js → server-7W6C3SOW.js} +5233 -3623
- package/chunks/{session-3TEHNENZ.js → session-PZLBAQGG.js} +125 -118
- package/chunks/session-pr-refresh-OIVL3U3Z.js +367 -0
- package/chunks/{settings-VOZYKLTT.js → settings-ZOHIQWYK.js} +70 -67
- package/chunks/shell-FWZT6IUR.js +97 -0
- package/chunks/{skill-FEOKFX26.js → skill-RTQC2YGA.js} +121 -65
- package/chunks/skill-settings-AKMIXFSJ.js +123 -0
- package/chunks/spawnChannel-ZP23JL6O.js +116 -0
- package/chunks/standalone-update-P2Q5H4ZU.js +123 -0
- package/chunks/{startInteractiveUI-WHJPFOGH.js → startInteractiveUI-NSA6QPQZ.js} +2018 -1526
- package/chunks/{stdioHelpers-7A2EE64Z.js → stdioHelpers-AY6XCDY2.js} +3 -1
- package/chunks/{syntheticOutput-ML43GEFN.js → syntheticOutput-5URSQLIS.js} +3 -3
- package/chunks/{task-create-TMSV7RD5.js → task-create-3EXVDG3G.js} +12 -12
- package/chunks/{task-list-W55RBFRX.js → task-list-PIBYNSE7.js} +5 -6
- package/chunks/{task-stop-CXEH5L2D.js → task-stop-IV3BYWJC.js} +2 -2
- package/chunks/{task-update-N536I4GQ.js → task-update-H5BPDS5Y.js} +13 -14
- package/chunks/{team-create-QYSWCYCL.js → team-create-53T42W37.js} +56 -55
- package/chunks/{team-delete-FJRFX33M.js → team-delete-X3WPELS6.js} +25 -8
- package/chunks/{team-plan-approval-P7DAD644.js → team-plan-approval-D45ZC5OE.js} +50 -48
- package/chunks/terminal-image-renderer-FCRUWT6C.js +121 -0
- package/chunks/theme-manager-MHNPEDP7.js +107 -0
- package/chunks/{todoWrite-WDJNQEMW.js → todoWrite-A5IOZZ3P.js} +4 -4
- package/chunks/{tool-search-F2EMIAPV.js → tool-search-6RPBGGUX.js} +27 -23
- package/chunks/total-session-admission-MGV56XDK.js +117 -0
- package/chunks/trustedFolders-QJYEFMTU.js +127 -0
- package/chunks/{types-WYCFCEHR.js → types-HKLPXZB3.js} +1 -3
- package/chunks/{update-relaunch-4GF3OXMB.js → update-relaunch-ZDMQX63C.js} +6 -6
- package/chunks/updateCheck-4QZWCGP6.js +123 -0
- package/chunks/useAutoAcceptIndicator-DLIQN256.js +125 -0
- package/chunks/{validateNonInterActiveAuth-BPPA563H.js → validateNonInterActiveAuth-HGTG7AEK.js} +114 -107
- package/chunks/{version-ANP4TS6O.js → version-CPAZMC4B.js} +1 -1
- package/chunks/{web-fetch-QJADSAH3.js → web-fetch-N4K5M3M4.js} +16 -18
- package/chunks/{web-search-7TTQKEKM.js → web-search-4VZKM5SF.js} +9 -11
- package/chunks/{web-shell-static-A6QMUNNV.js → web-shell-static-PW7OEDQO.js} +3 -2
- package/chunks/{workflow-5XN6XSOT.js → workflow-2ALQKTHG.js} +229 -146
- package/chunks/workspace-providers-status-5JM4CB6R.js +119 -0
- package/chunks/{workspace-registration-store-XKVW2YVH.js → workspace-registration-store-RNMFVCH7.js} +2 -1
- package/chunks/workspace-registry-6EULAPZC.js +126 -0
- package/chunks/workspace-runtime-coordinator-IRI2DRCJ.js +127 -0
- package/chunks/workspace-service-SETHN4WE.js +131 -0
- package/chunks/workspace-skills-status-4D4EUEQU.js +118 -0
- package/chunks/{workspace-trust-reconciler-KLGOB53D.js → workspace-trust-reconciler-4LR3CDL4.js} +77 -76
- package/chunks/write-file-45GWPSOI.js +92 -0
- package/chunks/{zh-UNY63FR3.js → zh-2BQ7P6OD.js} +3 -0
- package/chunks/{zh-TW-RPTMRTHG.js → zh-TW-UFXRZTXX.js} +3 -0
- package/chunks/{zoom-image-6ASG6J4C.js → zoom-image-K6IQUKRC.js} +13 -13
- package/cli.js +129 -92
- package/locales/ca.js +6 -0
- package/locales/de.js +6 -0
- package/locales/en.js +6 -0
- package/locales/fr.js +6 -0
- package/locales/ja.js +6 -0
- package/locales/pt.js +6 -0
- package/locales/ru.js +6 -0
- package/locales/zh-TW.js +6 -0
- package/locales/zh.js +6 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-uS-vtfs3.js → abnfDiagram-VCTEODGH-C80OZcPP.js} +1 -1
- package/web-shell/assets/{arc-BSTnk5pu.js → arc-AUqStYgf.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-DCMyiqzy.js → architectureDiagram-5GKGNRK7-CQYOdYla.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C7_gt0r1.js → blockDiagram-NRAW4CY4-lYKlFysy.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BeQg2L8B.js → c4Diagram-UCG6FXSJ-BoS23iIp.js} +1 -1
- package/web-shell/assets/channel-B0ovOJeK.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DnV9bKBe.js → chunk-2Q5K7J3B-DLLooL1E.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-rT1GAcT7.js → chunk-5VM5RSS4-kPfJxScY.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BcgSxqGA.js → chunk-F27PBJKO-CVGFBqkD.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-Bw1ZhyZq.js → chunk-G27WJ6UU-CnM_kOVV.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-D4iDw-96.js → chunk-JWPE2WC7-Cj-ajOkT.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-D3MB3GTZ.js → chunk-LCL6LL3I-8L5c-wFo.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Cep2ndrS.js → chunk-POPQ4Y6H-DsXTxpvL.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-BuahMHJc.js → chunk-SVP7TREG-DU5GE1_z.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-BdujIvJY.js → chunk-XXDRQBXY-D2IIWZKt.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DMll2-6_.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DMll2-6_.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CGLLUbF8.js → cose-bilkent-JH36ORCC-CF_txUJr.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-D6kDsRSh.js → cynefin-OW5HDTMX-DEZ-My-Z.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCy78qZx.js → cynefinDiagram-5FMLGOSQ-BV7EKUS6.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-D5gJuJsf.js → dagre-3AP2YEHR-JGIX0G4H.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-ZwEZ5W__.js → diagram-S7CK7UJ4-DdUY7q6A.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-B036APjv.js → diagram-UQ7AKVKN-fhzRZ19v.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BfDJ57Fq.js → diagram-VSXAHHWV-BOgOex6q.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Wha0p5rT.js → diagram-VX7I27RA-C0NknIz6.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-L20bz2K1.js → diagram-Z3DM3KII-C__3mUBX.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-D1ZM0Cp7.js → ebnfDiagram-PWID7BFC-BvPhqycH.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-CMtA19v8.js → erDiagram-SSCWMZ5O-BqzoNoL9.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-D96m326S.js → flowDiagram-A5DVABFB-CJKOre47.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BuHiYG2o.js → ganttDiagram-EL5Y4UJY-C5xZjrp0.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js → gitGraphDiagram-WWUBYQGX-C0EjwuPK.js} +1 -1
- package/web-shell/assets/index-B_IPzA0h.js +2020 -0
- package/web-shell/assets/{index-CBGz4Qjl.js → index-C5M93syE.js} +1 -1
- package/web-shell/assets/index-D1OKGQlM.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-B6DAOyXe.js → infoDiagram-RXCK75RN-BUwzsYOs.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Bpg-joFo.js → ishikawaDiagram-5VMMS53U-EDJ_DH3V.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BclrHzGa.js → journeyDiagram-EYS64GPL-BnfcOsS0.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-5gJzNTYG.js → kanban-definition-3QL26DDD-D_ofTVGu.js} +1 -1
- package/web-shell/assets/{layout-CEz_1L8z.js → layout-CBuQFdfZ.js} +1 -1
- package/web-shell/assets/{linear-CBjTq9Hc.js → linear-DRIHtmGv.js} +1 -1
- package/web-shell/assets/{mermaid.core-Dzhbxx_I.js → mermaid.core-CmR5wZH6.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DQdVqlBF.js → mindmap-definition-FBJOCRG2-BV374olC.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-D1JZlYXL.js → pegDiagram-XKGWAZYB-Bpy1SplK.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BmkpYL0w.js → pieDiagram-E7YTZNPT-CeZx4hR2.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DRvD6co5.js → quadrantDiagram-AXDQQJYC-COYKs14h.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CEdjDuoo.js → railroadDiagram-O6MQD6OU-5g2pOeTs.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BCHG-ie8.js → requirementDiagram-EFPCY7ZU-Yn8uPGtF.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C9cZMnye.js → sankeyDiagram-P5KCCOFB-CTayAGq6.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DYHRV4zL.js → sequenceDiagram-WJ2MYXX4-BFWDKzUU.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-DlK21aye.js → sizeCapture-X5ZJPWSS-CtErUbj4.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BrmZssvk.js → stateDiagram-HBIQ2CUA-Co3HFzOd.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C3gdRjPm.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-D9xfcayR.js → swimlanes-XN3QIQJK-CDZuxzOj.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-C34TGCPZ.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-D4gdDL_d.js → timeline-definition-24CTP7MA-UcNHj8At.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-DdhIExjI.js → vennDiagram-4TSXK5OY-JKR9pVFG.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C9RS_Zof.js → wardleyDiagram-VM6X3IG4-C4SU-yIW.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-orRgmxWk.js → xychartDiagram-S5SC5T6Z-D_yoWGZ4.js} +1 -1
- package/web-shell/index.html +197 -3
- package/chunks/MaxSizedBox-X5FZSNAJ.js +0 -112
- package/chunks/agent-PJIPDWHB.js +0 -97
- package/chunks/agent-headless-B4JVD7UK.js +0 -87
- package/chunks/bridge-FKZTVIS3.js +0 -121
- package/chunks/channel-settings-store-4UFCLBBG.js +0 -117
- package/chunks/chunk-7DJCPZE3.js +0 -945
- package/chunks/chunk-CPBF7KYF.js +0 -51
- package/chunks/chunk-H72BQNM3.js +0 -645
- package/chunks/chunk-J2OSJFP3.js +0 -202
- package/chunks/chunk-K2OJUPOE.js +0 -78
- package/chunks/chunk-P3QQPMQA.js +0 -19
- package/chunks/chunk-RUGNCYNO.js +0 -699
- package/chunks/chunk-T26EAKDL.js +0 -13
- package/chunks/chunk-ZGXYO7DY.js +0 -3416
- package/chunks/chunk-ZYNTSXWK.js +0 -32
- package/chunks/config-utils-BBOCOGZW.js +0 -113
- package/chunks/contextCommand-EET67MQ2.js +0 -108
- package/chunks/daemon-status-provider-RFKZOK3S.js +0 -119
- package/chunks/daemon-trust-policy-DRZPFB4Q.js +0 -114
- package/chunks/deferred-core-runtime-BBVIOP24.js +0 -116
- package/chunks/earlyInputCapture-2JOMMNQ4.js +0 -109
- package/chunks/environment-MOZMPUHR.js +0 -131
- package/chunks/errors-DMPQVYJL.js +0 -115
- package/chunks/exitPlanMode-UE4FGCY4.js +0 -85
- package/chunks/handleAutoUpdate-SGXKTQM6.js +0 -111
- package/chunks/i18n-B42HKHKH.js +0 -126
- package/chunks/initializer-FB66WYR3.js +0 -115
- package/chunks/installationInfo-Y7AULNMX.js +0 -109
- package/chunks/list-2HWGSVRA.js +0 -118
- package/chunks/list-agents-DI3YFTDT.js +0 -80
- package/chunks/loadedSettingsAdapter-7Y7IEI6T.js +0 -112
- package/chunks/mcp-QGG5NMJJ.js +0 -112
- package/chunks/nonInteractiveCli-4LO2TL72.js +0 -186
- package/chunks/pidfile-JMF2CLMY.js +0 -113
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/chunks/prompt-terminal-ledger-DCZO6S7C.js +0 -107
- package/chunks/resumeHistoryUtils-CZ4JRDVW.js +0 -120
- package/chunks/ripGrep-R6B6HWPX.js +0 -39
- package/chunks/runtime-TTIGSBM4.js +0 -150
- package/chunks/scheduled-tasks-QB4ZVUQS.js +0 -129
- package/chunks/scheduler-YRUG22M7.js +0 -124
- package/chunks/send-message-Y5I6NYAM.js +0 -295
- package/chunks/serve-MXXCDAQN.js +0 -120
- package/chunks/shell-6RTKZVMI.js +0 -95
- package/chunks/skill-settings-VA4XVYVL.js +0 -120
- package/chunks/spawnChannel-F6WVP723.js +0 -114
- package/chunks/standalone-update-RGILUQVK.js +0 -120
- package/chunks/terminal-image-renderer-SMQE46UJ.js +0 -116
- package/chunks/theme-manager-RFO5WWFF.js +0 -104
- package/chunks/total-session-admission-HTVTP4BS.js +0 -116
- package/chunks/trustedFolders-7OCNMUQE.js +0 -124
- package/chunks/updateCheck-7QBDXZRT.js +0 -120
- package/chunks/useAutoAcceptIndicator-UI4SNL2O.js +0 -122
- package/chunks/workspace-providers-status-PDFZWL5Q.js +0 -116
- package/chunks/workspace-registry-23R7XRB5.js +0 -125
- package/chunks/workspace-service-MUYO2QIC.js +0 -131
- package/chunks/workspace-skills-status-IKECTOOQ.js +0 -115
- package/chunks/write-file-GGRBB5TZ.js +0 -90
- package/web-shell/assets/channel-CENAhErJ.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +0 -1
- package/web-shell/assets/index-8hXIpvo4.js +0 -1865
- package/web-shell/assets/index-DclEv91i.css +0 -5
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +0 -8
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
sanitizePromptText,
|
|
15
15
|
sanitizeSenderName,
|
|
16
16
|
truncateUtf16Units
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IXEZHTDR.js";
|
|
18
18
|
import "./chunk-IW6RQPQB.js";
|
|
19
19
|
import "./chunk-CQ35AJ4Z.js";
|
|
20
20
|
import "./chunk-DMTGGOSA.js";
|
|
@@ -5792,9 +5792,21 @@ var DWClient = class extends EventEmitter2 {
|
|
|
5792
5792
|
|
|
5793
5793
|
// packages/channels/dingtalk/dist/markdown.js
|
|
5794
5794
|
init_esbuild_shims();
|
|
5795
|
-
var
|
|
5796
|
-
function
|
|
5797
|
-
|
|
5795
|
+
var DINGTALK_CHUNK_LIMIT = 3800;
|
|
5796
|
+
function escapeDingTalkMarkdown(value) {
|
|
5797
|
+
return value.replace(/([\\`*_[\]{}()#+.!|>~:-])/gu, "\\$1");
|
|
5798
|
+
}
|
|
5799
|
+
__name(escapeDingTalkMarkdown, "escapeDingTalkMarkdown");
|
|
5800
|
+
function safeUtf16SliceEnd(value, end) {
|
|
5801
|
+
if (end <= 0 || end >= value.length)
|
|
5802
|
+
return end;
|
|
5803
|
+
const previous = value.charCodeAt(end - 1);
|
|
5804
|
+
const next = value.charCodeAt(end);
|
|
5805
|
+
return previous >= 55296 && previous <= 56319 && next >= 56320 && next <= 57343 ? end - 1 : end;
|
|
5806
|
+
}
|
|
5807
|
+
__name(safeUtf16SliceEnd, "safeUtf16SliceEnd");
|
|
5808
|
+
function splitChunks(text, chunkLimit = DINGTALK_CHUNK_LIMIT) {
|
|
5809
|
+
if (!text || text.length <= chunkLimit) {
|
|
5798
5810
|
return [text];
|
|
5799
5811
|
}
|
|
5800
5812
|
const chunks = [];
|
|
@@ -5814,11 +5826,15 @@ function splitChunks(text) {
|
|
|
5814
5826
|
let lineOpenedFenceInBuffer = false;
|
|
5815
5827
|
while (remaining.length > 0 || prefixPending) {
|
|
5816
5828
|
const prefix = prefixPending ? "\n" : "";
|
|
5817
|
-
const fitsAsFinalPiece = remaining.length <=
|
|
5829
|
+
const fitsAsFinalPiece = remaining.length <= chunkLimit - buf.length - prefix.length;
|
|
5818
5830
|
const closeFenceOverhead = inCode && !(closesCodeFence && fitsAsFinalPiece) || !inCode && leavesCodeFenceOpen ? "\n```".length : 0;
|
|
5819
|
-
const available =
|
|
5831
|
+
const available = chunkLimit - closeFenceOverhead - buf.length - prefix.length;
|
|
5820
5832
|
if (available <= 0) {
|
|
5821
|
-
|
|
5833
|
+
const keepCodeOpen = inCode || lineOpenedFenceInBuffer;
|
|
5834
|
+
if (buf === (keepCodeOpen ? "```" : "")) {
|
|
5835
|
+
throw new RangeError("chunk limit cannot contain one Unicode character");
|
|
5836
|
+
}
|
|
5837
|
+
flush(keepCodeOpen);
|
|
5822
5838
|
continue;
|
|
5823
5839
|
}
|
|
5824
5840
|
let pieceLength = Math.min(available, remaining.length);
|
|
@@ -5830,8 +5846,13 @@ function splitChunks(text) {
|
|
|
5830
5846
|
}
|
|
5831
5847
|
}
|
|
5832
5848
|
}
|
|
5849
|
+
pieceLength = safeUtf16SliceEnd(remaining, pieceLength);
|
|
5833
5850
|
if (pieceLength === 0 && remaining.length > 0) {
|
|
5834
|
-
|
|
5851
|
+
const keepCodeOpen = inCode || lineOpenedFenceInBuffer;
|
|
5852
|
+
if (!buf || keepCodeOpen && buf === "```") {
|
|
5853
|
+
throw new RangeError("chunk limit cannot contain one Unicode character");
|
|
5854
|
+
}
|
|
5855
|
+
flush(keepCodeOpen);
|
|
5835
5856
|
continue;
|
|
5836
5857
|
}
|
|
5837
5858
|
const piece = remaining.slice(0, pieceLength);
|
|
@@ -5868,8 +5889,8 @@ function extractTitle(text) {
|
|
|
5868
5889
|
return cleaned || "Reply";
|
|
5869
5890
|
}
|
|
5870
5891
|
__name(extractTitle, "extractTitle");
|
|
5871
|
-
function normalizeDingTalkMarkdown(text) {
|
|
5872
|
-
return splitChunks(text);
|
|
5892
|
+
function normalizeDingTalkMarkdown(text, chunkLimit = DINGTALK_CHUNK_LIMIT) {
|
|
5893
|
+
return splitChunks(text, chunkLimit);
|
|
5873
5894
|
}
|
|
5874
5895
|
__name(normalizeDingTalkMarkdown, "normalizeDingTalkMarkdown");
|
|
5875
5896
|
|
|
@@ -6154,6 +6175,109 @@ async function uploadDingTalkImage(image, accessToken) {
|
|
|
6154
6175
|
}
|
|
6155
6176
|
__name(uploadDingTalkImage, "uploadDingTalkImage");
|
|
6156
6177
|
|
|
6178
|
+
// packages/channels/dingtalk/dist/outbound-file.js
|
|
6179
|
+
init_esbuild_shims();
|
|
6180
|
+
var FILE_OPENING = "[FILE:";
|
|
6181
|
+
var MAX_FILE_PATH_CHARS = 4096;
|
|
6182
|
+
var MAX_FILES_PER_RESPONSE = 5;
|
|
6183
|
+
var FILE_UNAVAILABLE_NOTICE = "[File delivery unavailable]";
|
|
6184
|
+
var OutboundFileProjector = class {
|
|
6185
|
+
static {
|
|
6186
|
+
__name(this, "OutboundFileProjector");
|
|
6187
|
+
}
|
|
6188
|
+
candidate = "";
|
|
6189
|
+
reserved = "";
|
|
6190
|
+
reservedAtLineStart = false;
|
|
6191
|
+
reservedTooLong = false;
|
|
6192
|
+
atLineStart = true;
|
|
6193
|
+
paths = [];
|
|
6194
|
+
invalidMarkers = 0;
|
|
6195
|
+
excessMarkers = 0;
|
|
6196
|
+
markerCount = 0;
|
|
6197
|
+
append(chunk) {
|
|
6198
|
+
let safe = "";
|
|
6199
|
+
for (const char of chunk) {
|
|
6200
|
+
if (this.reserved) {
|
|
6201
|
+
if (char === "\n") {
|
|
6202
|
+
this.finishReservedLine();
|
|
6203
|
+
safe += "\n";
|
|
6204
|
+
this.atLineStart = true;
|
|
6205
|
+
} else if (this.reserved.length <= MAX_FILE_PATH_CHARS + 9) {
|
|
6206
|
+
this.reserved += char;
|
|
6207
|
+
} else {
|
|
6208
|
+
this.reservedTooLong = true;
|
|
6209
|
+
}
|
|
6210
|
+
continue;
|
|
6211
|
+
}
|
|
6212
|
+
if (char === "\n") {
|
|
6213
|
+
safe += `${this.candidate}
|
|
6214
|
+
`;
|
|
6215
|
+
this.candidate = "";
|
|
6216
|
+
this.atLineStart = true;
|
|
6217
|
+
continue;
|
|
6218
|
+
}
|
|
6219
|
+
this.candidate += char;
|
|
6220
|
+
while (this.candidate && !FILE_OPENING.startsWith(this.candidate)) {
|
|
6221
|
+
safe += this.candidate[0];
|
|
6222
|
+
this.candidate = this.candidate.slice(1);
|
|
6223
|
+
this.atLineStart = false;
|
|
6224
|
+
}
|
|
6225
|
+
if (this.candidate === FILE_OPENING) {
|
|
6226
|
+
this.reserved = this.candidate;
|
|
6227
|
+
this.reservedAtLineStart = this.atLineStart;
|
|
6228
|
+
this.candidate = "";
|
|
6229
|
+
this.markerCount++;
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
return safe;
|
|
6233
|
+
}
|
|
6234
|
+
complete() {
|
|
6235
|
+
if (!this.reserved) {
|
|
6236
|
+
const safe = this.candidate;
|
|
6237
|
+
this.candidate = "";
|
|
6238
|
+
return safe;
|
|
6239
|
+
}
|
|
6240
|
+
this.finishReservedLine();
|
|
6241
|
+
return "";
|
|
6242
|
+
}
|
|
6243
|
+
result(text) {
|
|
6244
|
+
return {
|
|
6245
|
+
text,
|
|
6246
|
+
paths: [...this.paths],
|
|
6247
|
+
invalidMarkers: this.invalidMarkers,
|
|
6248
|
+
excessMarkers: this.excessMarkers,
|
|
6249
|
+
markerCount: this.markerCount
|
|
6250
|
+
};
|
|
6251
|
+
}
|
|
6252
|
+
finishReservedLine() {
|
|
6253
|
+
const match = /^\[FILE: ([^\]\r\n]+)\]\r?$/u.exec(this.reserved);
|
|
6254
|
+
const path = match?.[1];
|
|
6255
|
+
if (!this.reservedTooLong && this.reservedAtLineStart && path && path.length <= MAX_FILE_PATH_CHARS && path === path.trim()) {
|
|
6256
|
+
if (this.paths.length < MAX_FILES_PER_RESPONSE) {
|
|
6257
|
+
this.paths.push(path);
|
|
6258
|
+
} else {
|
|
6259
|
+
this.excessMarkers++;
|
|
6260
|
+
}
|
|
6261
|
+
} else {
|
|
6262
|
+
this.invalidMarkers++;
|
|
6263
|
+
}
|
|
6264
|
+
this.reserved = "";
|
|
6265
|
+
this.reservedAtLineStart = false;
|
|
6266
|
+
this.reservedTooLong = false;
|
|
6267
|
+
}
|
|
6268
|
+
};
|
|
6269
|
+
function projectFileText(text) {
|
|
6270
|
+
const projector = new OutboundFileProjector();
|
|
6271
|
+
const safe = projector.append(text) + projector.complete();
|
|
6272
|
+
return projector.result(safe);
|
|
6273
|
+
}
|
|
6274
|
+
__name(projectFileText, "projectFileText");
|
|
6275
|
+
function withFileUnavailableNotice(text) {
|
|
6276
|
+
const safe = text.trimEnd();
|
|
6277
|
+
return `${safe}${safe ? "\n" : ""}${FILE_UNAVAILABLE_NOTICE}`;
|
|
6278
|
+
}
|
|
6279
|
+
__name(withFileUnavailableNotice, "withFileUnavailableNotice");
|
|
6280
|
+
|
|
6157
6281
|
// packages/channels/dingtalk/dist/DingtalkConnectionManager.js
|
|
6158
6282
|
init_esbuild_shims();
|
|
6159
6283
|
var SOCKET_OPEN = 1;
|
|
@@ -7105,7 +7229,7 @@ var QuestionCardController = class {
|
|
|
7105
7229
|
}
|
|
7106
7230
|
await this.finalize(record, "cancelled");
|
|
7107
7231
|
try {
|
|
7108
|
-
await this.options.sendFallback(context.target.chatId, this.fallbackText(context));
|
|
7232
|
+
await this.options.sendFallback(context.target.chatId, this.fallbackText(context), ...context.sourceLabel ? [context.sourceLabel] : []);
|
|
7109
7233
|
} catch (fallbackError) {
|
|
7110
7234
|
this.options.onError?.("question fallback delivery", fallbackError);
|
|
7111
7235
|
}
|
|
@@ -7247,22 +7371,22 @@ var QuestionCardController = class {
|
|
|
7247
7371
|
const cardParamMap = {
|
|
7248
7372
|
submitted: {
|
|
7249
7373
|
card_status: "submitted",
|
|
7250
|
-
question_desc: "Submitted.",
|
|
7374
|
+
question_desc: this.withSourceLabel(record.context, "Submitted."),
|
|
7251
7375
|
form_btn_text: "Submitted"
|
|
7252
7376
|
},
|
|
7253
7377
|
expired: {
|
|
7254
7378
|
card_status: "expired",
|
|
7255
|
-
question_desc: "This question expired. Please retry.",
|
|
7379
|
+
question_desc: this.withSourceLabel(record.context, "This question expired. Please retry."),
|
|
7256
7380
|
form_btn_text: "Expired"
|
|
7257
7381
|
},
|
|
7258
7382
|
resolved_outside_presenter: {
|
|
7259
7383
|
card_status: "expired",
|
|
7260
|
-
question_desc: "Resolved outside this card.",
|
|
7384
|
+
question_desc: this.withSourceLabel(record.context, "Resolved outside this card."),
|
|
7261
7385
|
form_btn_text: "Expired"
|
|
7262
7386
|
},
|
|
7263
7387
|
cancelled: {
|
|
7264
7388
|
card_status: "cancelled",
|
|
7265
|
-
question_desc: "Cancelled.",
|
|
7389
|
+
question_desc: this.withSourceLabel(record.context, "Cancelled."),
|
|
7266
7390
|
form_btn_text: "Cancelled"
|
|
7267
7391
|
}
|
|
7268
7392
|
};
|
|
@@ -7271,7 +7395,9 @@ var QuestionCardController = class {
|
|
|
7271
7395
|
outTrackId: record.outTrackId,
|
|
7272
7396
|
cardParamMap: {
|
|
7273
7397
|
...cardParamMap[record.terminalState],
|
|
7274
|
-
...record.terminalDescription ? {
|
|
7398
|
+
...record.terminalDescription ? {
|
|
7399
|
+
question_desc: this.withSourceLabel(record.context, record.terminalDescription)
|
|
7400
|
+
} : {}
|
|
7275
7401
|
}
|
|
7276
7402
|
});
|
|
7277
7403
|
} catch (error) {
|
|
@@ -7331,7 +7457,7 @@ var QuestionCardController = class {
|
|
|
7331
7457
|
return {
|
|
7332
7458
|
question_id: context.requestId,
|
|
7333
7459
|
question_title: first.header,
|
|
7334
|
-
question_desc: first.question,
|
|
7460
|
+
question_desc: this.withSourceLabel(context, first.question),
|
|
7335
7461
|
card_status: "pending",
|
|
7336
7462
|
form_btn_text: "Submit",
|
|
7337
7463
|
selected_text: "",
|
|
@@ -7367,19 +7493,27 @@ var QuestionCardController = class {
|
|
|
7367
7493
|
return `The interactive question could not be delivered, so this request was cancelled. Please retry.
|
|
7368
7494
|
${questions}`;
|
|
7369
7495
|
}
|
|
7496
|
+
withSourceLabel(context, text) {
|
|
7497
|
+
if (!context.sourceLabel)
|
|
7498
|
+
return text;
|
|
7499
|
+
const label = escapeDingTalkMarkdown(context.sourceLabel);
|
|
7500
|
+
return `${label}
|
|
7501
|
+
|
|
7502
|
+
${text}`;
|
|
7503
|
+
}
|
|
7370
7504
|
};
|
|
7371
7505
|
|
|
7372
7506
|
// packages/channels/dingtalk/dist/interaction-presenter.js
|
|
7373
7507
|
init_esbuild_shims();
|
|
7374
7508
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
7375
|
-
function
|
|
7509
|
+
function escapeSenderMarkdownText(text) {
|
|
7376
7510
|
return text.replace(/([\\`*_[\]{}()#+.!|>~-])/gu, "\\$1");
|
|
7377
7511
|
}
|
|
7378
|
-
__name(
|
|
7512
|
+
__name(escapeSenderMarkdownText, "escapeSenderMarkdownText");
|
|
7379
7513
|
function formatSenderPrefixes(sender) {
|
|
7380
7514
|
const senderName = sanitizeSenderName(sender.senderName);
|
|
7381
7515
|
return {
|
|
7382
|
-
senderPrefix: `@${
|
|
7516
|
+
senderPrefix: `@${escapeSenderMarkdownText(senderName)}`,
|
|
7383
7517
|
senderRawPrefix: `@${senderName}`
|
|
7384
7518
|
};
|
|
7385
7519
|
}
|
|
@@ -7395,7 +7529,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7395
7529
|
constructor(options) {
|
|
7396
7530
|
this.options = options;
|
|
7397
7531
|
}
|
|
7398
|
-
registerRun(runId, ownerId, target, sessionId = "", sender) {
|
|
7532
|
+
registerRun(runId, ownerId, target, sessionId = "", sender, sourceLabel) {
|
|
7399
7533
|
this.runs.set(runId, {
|
|
7400
7534
|
runId,
|
|
7401
7535
|
ownerId,
|
|
@@ -7411,10 +7545,12 @@ var DingtalkInteractionPresenter = class {
|
|
|
7411
7545
|
chatId: target.chatId,
|
|
7412
7546
|
senderId: ownerId,
|
|
7413
7547
|
isGroup: target.isGroup
|
|
7414
|
-
}
|
|
7548
|
+
},
|
|
7549
|
+
sourceLabel
|
|
7415
7550
|
},
|
|
7416
7551
|
projectionChain: Promise.resolve(),
|
|
7417
7552
|
...target.isGroup && sender ? formatSenderPrefixes(sender) : {},
|
|
7553
|
+
...sourceLabel ? { sourceLabel } : {},
|
|
7418
7554
|
terminal: false
|
|
7419
7555
|
});
|
|
7420
7556
|
}
|
|
@@ -7426,7 +7562,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7426
7562
|
void this.enqueue(run, () => {
|
|
7427
7563
|
const statusCards = this.options.statusCards;
|
|
7428
7564
|
const target = this.cardTarget(statusContext.target);
|
|
7429
|
-
statusCards?.
|
|
7565
|
+
statusCards?.replace(statusContext, target, this.withSourcePrefix(run, ""));
|
|
7430
7566
|
});
|
|
7431
7567
|
}
|
|
7432
7568
|
appendOutput(segment, chunk) {
|
|
@@ -7447,7 +7583,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7447
7583
|
run.activeSegmentId = segment.segmentId;
|
|
7448
7584
|
const statusContext = this.ensureStatusContext(run, segment);
|
|
7449
7585
|
void this.enqueue(run, () => {
|
|
7450
|
-
this.options.statusCards?.replace(statusContext, this.cardTarget(statusContext.target), presentation.content);
|
|
7586
|
+
this.options.statusCards?.replace(statusContext, this.cardTarget(statusContext.target), this.withSourcePrefix(run, presentation.content));
|
|
7451
7587
|
});
|
|
7452
7588
|
}
|
|
7453
7589
|
closeOutput(segmentId, text, reason, segment) {
|
|
@@ -7491,7 +7627,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7491
7627
|
const fallbackText2 = stripPartialImageMarker(text || presentation.content);
|
|
7492
7628
|
if (!fallbackText2 || !this.options.sendFallback)
|
|
7493
7629
|
return false;
|
|
7494
|
-
await this.
|
|
7630
|
+
await this.sendFallback(run, presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
|
|
7495
7631
|
return true;
|
|
7496
7632
|
}
|
|
7497
7633
|
if (reason === "input_requested") {
|
|
@@ -7502,7 +7638,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7502
7638
|
const fallbackText2 = stripPartialImageMarker(text || presentation.content);
|
|
7503
7639
|
if (!fallbackText2 || !this.options.sendFallback)
|
|
7504
7640
|
return false;
|
|
7505
|
-
await this.
|
|
7641
|
+
await this.sendFallback(run, presentation.context.target.chatId, fallbackText2, presentation.context.sessionId);
|
|
7506
7642
|
return true;
|
|
7507
7643
|
}
|
|
7508
7644
|
statusCards?.ensure(statusContext, this.cardTarget(statusContext.target));
|
|
@@ -7512,7 +7648,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7512
7648
|
const fallbackText = stripPartialImageMarker(text || presentation.content);
|
|
7513
7649
|
if (!fallbackText || !this.options.sendFallback)
|
|
7514
7650
|
return false;
|
|
7515
|
-
await this.
|
|
7651
|
+
await this.sendFallback(run, presentation.context.target.chatId, fallbackText, presentation.context.sessionId);
|
|
7516
7652
|
return true;
|
|
7517
7653
|
});
|
|
7518
7654
|
}
|
|
@@ -7554,7 +7690,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7554
7690
|
} else {
|
|
7555
7691
|
const statusContext = run.statusContext;
|
|
7556
7692
|
if (statusContext) {
|
|
7557
|
-
await this.options.statusCards?.complete(statusContext.segmentId, "", (retained) => retained ? this.withSenderPrefix(run, retained) : retained);
|
|
7693
|
+
await this.options.statusCards?.complete(statusContext.segmentId, "", (retained) => retained ? this.withSenderPrefix(run, this.withoutRenderedSourcePrefix(run, retained)) : retained);
|
|
7558
7694
|
}
|
|
7559
7695
|
}
|
|
7560
7696
|
});
|
|
@@ -7597,7 +7733,7 @@ var DingtalkInteractionPresenter = class {
|
|
|
7597
7733
|
if (!delivered || !this.options.sendFallback)
|
|
7598
7734
|
return;
|
|
7599
7735
|
run.cardDelivered = void 0;
|
|
7600
|
-
await this.
|
|
7736
|
+
await this.sendFallback(run, delivered.chatId, delivered.text, delivered.sessionId);
|
|
7601
7737
|
}
|
|
7602
7738
|
enqueue(run, operation) {
|
|
7603
7739
|
const result = run.projectionChain.then(operation);
|
|
@@ -7614,14 +7750,38 @@ var DingtalkInteractionPresenter = class {
|
|
|
7614
7750
|
return `${TRUNCATION_MARKER}${content.slice(content.length - (limit - TRUNCATION_MARKER.length))}`;
|
|
7615
7751
|
}
|
|
7616
7752
|
withSenderPrefix(run, content) {
|
|
7617
|
-
|
|
7753
|
+
const prefixes = [
|
|
7754
|
+
run.senderPrefix,
|
|
7755
|
+
run.sourceLabel ? escapeDingTalkMarkdown(run.sourceLabel) : void 0
|
|
7756
|
+
].filter((value) => Boolean(value));
|
|
7757
|
+
if (prefixes.length === 0)
|
|
7618
7758
|
return this.boundContent(content);
|
|
7619
7759
|
const body = this.withoutExistingSenderPrefix(run, content);
|
|
7760
|
+
const prefix = prefixes.join("\n\n");
|
|
7620
7761
|
if (!body)
|
|
7621
|
-
return
|
|
7762
|
+
return prefix;
|
|
7622
7763
|
const separator = "\n\n";
|
|
7623
|
-
const bodyLimit = Math.max(0, CONTENT_LIMIT -
|
|
7624
|
-
return `${
|
|
7764
|
+
const bodyLimit = Math.max(0, CONTENT_LIMIT - prefix.length - separator.length);
|
|
7765
|
+
return `${prefix}${separator}${this.boundContent(body, bodyLimit)}`;
|
|
7766
|
+
}
|
|
7767
|
+
withSourcePrefix(run, content) {
|
|
7768
|
+
if (!run.sourceLabel)
|
|
7769
|
+
return this.boundContent(content);
|
|
7770
|
+
const sourceLabel = escapeDingTalkMarkdown(run.sourceLabel);
|
|
7771
|
+
if (!content)
|
|
7772
|
+
return sourceLabel;
|
|
7773
|
+
return `${sourceLabel}
|
|
7774
|
+
|
|
7775
|
+
${this.boundContent(content, Math.max(0, CONTENT_LIMIT - sourceLabel.length - 2))}`;
|
|
7776
|
+
}
|
|
7777
|
+
async sendFallback(run, chatId, text, sessionId) {
|
|
7778
|
+
if (!this.options.sendFallback)
|
|
7779
|
+
return;
|
|
7780
|
+
if (run.sourceLabel) {
|
|
7781
|
+
await this.options.sendFallback(chatId, text, sessionId, run.sourceLabel);
|
|
7782
|
+
return;
|
|
7783
|
+
}
|
|
7784
|
+
await this.options.sendFallback(chatId, text, sessionId);
|
|
7625
7785
|
}
|
|
7626
7786
|
withoutExistingSenderPrefix(run, content) {
|
|
7627
7787
|
const prefixes = /* @__PURE__ */ new Set([run.senderPrefix, run.senderRawPrefix]);
|
|
@@ -7647,6 +7807,17 @@ var DingtalkInteractionPresenter = class {
|
|
|
7647
7807
|
}
|
|
7648
7808
|
return body;
|
|
7649
7809
|
}
|
|
7810
|
+
withoutRenderedSourcePrefix(run, content) {
|
|
7811
|
+
if (!run.sourceLabel)
|
|
7812
|
+
return content;
|
|
7813
|
+
const rendered = escapeDingTalkMarkdown(run.sourceLabel);
|
|
7814
|
+
if (content === rendered)
|
|
7815
|
+
return "";
|
|
7816
|
+
const prefix = `${rendered}
|
|
7817
|
+
|
|
7818
|
+
`;
|
|
7819
|
+
return content.startsWith(prefix) ? content.slice(prefix.length) : content;
|
|
7820
|
+
}
|
|
7650
7821
|
ensureStatusContext(run, segment) {
|
|
7651
7822
|
if (run.statusContext)
|
|
7652
7823
|
return run.statusContext;
|
|
@@ -7879,6 +8050,7 @@ var DIRECT_MSG_API = "https://api.dingtalk.com/v1.0/robot/oToMessages/batchSend"
|
|
|
7879
8050
|
var PROACTIVE_MSG_KEY = "sampleMarkdown";
|
|
7880
8051
|
var TOKEN_API = "https://oapi.dingtalk.com/gettoken";
|
|
7881
8052
|
var PROACTIVE_FETCH_TIMEOUT_MS = 15e3;
|
|
8053
|
+
var REPLY_FETCH_TIMEOUT_MS = 15e3;
|
|
7882
8054
|
var GENERATED_MEDIA_EXT = {
|
|
7883
8055
|
"image/jpeg": "jpg",
|
|
7884
8056
|
"image/png": "png",
|
|
@@ -7954,6 +8126,18 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
7954
8126
|
inboundCardOwners = /* @__PURE__ */ new Map();
|
|
7955
8127
|
cardRunBySession = /* @__PURE__ */ new Map();
|
|
7956
8128
|
cardRuns = /* @__PURE__ */ new Map();
|
|
8129
|
+
// Keyed by runId, not segmentId: a mid-turn segment reset (response
|
|
8130
|
+
// boundary, input requested) mints a fresh segment UUID but the projection
|
|
8131
|
+
// state must survive it, or a marker split across the reset leaks.
|
|
8132
|
+
fileProjectors = /* @__PURE__ */ new Map();
|
|
8133
|
+
blockFileProjectors = /* @__PURE__ */ new Map();
|
|
8134
|
+
// Sessions armed for block projection by onPromptStart and disarmed when
|
|
8135
|
+
// the turn settles (or the session dies). A block send that finds NO
|
|
8136
|
+
// projector state is only legitimate as a turn's FIRST block, which always
|
|
8137
|
+
// lands while armed: late sends from an evicted (/clear) or dead session
|
|
8138
|
+
// must be dropped, because recreating state would post the tail of a
|
|
8139
|
+
// force-split [FILE: ...] marker verbatim.
|
|
8140
|
+
blockProjectionArmed = /* @__PURE__ */ new Set();
|
|
7957
8141
|
constructor(name, config, bridge, options) {
|
|
7958
8142
|
super(name, config, bridge, options);
|
|
7959
8143
|
this.atSender = config["atSender"] === true;
|
|
@@ -7997,7 +8181,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
7997
8181
|
this.questionCardController = new QuestionCardController({
|
|
7998
8182
|
client: this.interactiveCardClient,
|
|
7999
8183
|
timeoutMs: this.interactiveCardConfig.questionCard.timeoutMs,
|
|
8000
|
-
sendFallback: /* @__PURE__ */ __name((chatId, text) => this.
|
|
8184
|
+
sendFallback: /* @__PURE__ */ __name((chatId, text, sourceLabel) => this.sendReply(chatId, text, void 0, sourceLabel), "sendFallback"),
|
|
8001
8185
|
reserveRunProjection: /* @__PURE__ */ __name((runId) => this.interactionPresenter?.reserveProjection(runId), "reserveRunProjection"),
|
|
8002
8186
|
onError: /* @__PURE__ */ __name((operation, error) => {
|
|
8003
8187
|
process.stderr.write(`[DingTalk:${this.name}] ${operation} failed: ${sanitizeLogText(String(error), 300)}
|
|
@@ -8010,7 +8194,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8010
8194
|
statusCards: this.statusCardController,
|
|
8011
8195
|
questionCards: this.questionCardController,
|
|
8012
8196
|
...config.blockStreaming !== "on" ? {
|
|
8013
|
-
sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId) => this.sendFallbackReply(chatId, text, sessionId), "sendFallback")
|
|
8197
|
+
sendFallback: /* @__PURE__ */ __name((chatId, text, sessionId, sourceLabel) => this.sendFallbackReply(chatId, text, sessionId, sourceLabel), "sendFallback")
|
|
8014
8198
|
} : {}
|
|
8015
8199
|
});
|
|
8016
8200
|
}
|
|
@@ -8199,10 +8383,21 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8199
8383
|
static isUnroutableGroupMessage(isGroup, conversationId) {
|
|
8200
8384
|
return isGroup && !conversationId;
|
|
8201
8385
|
}
|
|
8202
|
-
|
|
8203
|
-
const
|
|
8386
|
+
projectOutgoingFileText(text, streamed) {
|
|
8387
|
+
const projection = projectFileText(text);
|
|
8388
|
+
const streamedMarkers = streamed ? streamed.result("").markerCount : 0;
|
|
8389
|
+
if (projection.markerCount === 0 && streamedMarkers === 0) {
|
|
8390
|
+
return projection.text;
|
|
8391
|
+
}
|
|
8392
|
+
process.stderr.write(`[DingTalk:${this.name}] file markers redacted (final=${projection.markerCount}, streamed=${streamedMarkers})
|
|
8393
|
+
`);
|
|
8394
|
+
return withFileUnavailableNotice(projection.text);
|
|
8395
|
+
}
|
|
8396
|
+
async prepareOutgoingText(text, streamed) {
|
|
8397
|
+
const fileSafeText = this.projectOutgoingFileText(text, streamed);
|
|
8398
|
+
const markers = findImageMarkers(fileSafeText);
|
|
8204
8399
|
if (markers.length === 0)
|
|
8205
|
-
return
|
|
8400
|
+
return fileSafeText;
|
|
8206
8401
|
const replacements = [];
|
|
8207
8402
|
for (const marker of markers) {
|
|
8208
8403
|
const fileName = basename2(marker.path).replace(/[\r\n[\]]+/g, "_").slice(0, 100) || "image";
|
|
@@ -8234,9 +8429,9 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8234
8429
|
replacements.push(`[Image delivery failed: ${fileName}]`);
|
|
8235
8430
|
}
|
|
8236
8431
|
}
|
|
8237
|
-
return replaceImageMarkers(
|
|
8432
|
+
return replaceImageMarkers(fileSafeText, markers, replacements);
|
|
8238
8433
|
}
|
|
8239
|
-
async sendReply(chatId, text, atUserId) {
|
|
8434
|
+
async sendReply(chatId, text, atUserId, sourceLabel) {
|
|
8240
8435
|
const webhook = this.webhooks.get(chatId);
|
|
8241
8436
|
if (!webhook) {
|
|
8242
8437
|
process.stderr.write(`[DingTalk:${this.name}] No webhook for chatId ${chatId}, cannot send.
|
|
@@ -8247,7 +8442,14 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8247
8442
|
const mentionPrefix = atUserId ? `@${atUserId}
|
|
8248
8443
|
|
|
8249
8444
|
` : "";
|
|
8250
|
-
const
|
|
8445
|
+
const sourcePrefix = sourceLabel && outgoingText.trim().length > 0 ? `${escapeDingTalkMarkdown(sourceLabel)}
|
|
8446
|
+
|
|
8447
|
+
` : "";
|
|
8448
|
+
const contentLimit = DINGTALK_CHUNK_LIMIT - mentionPrefix.length - sourcePrefix.length;
|
|
8449
|
+
if (contentLimit <= 0) {
|
|
8450
|
+
throw new Error("DingTalk source label exceeds the message limit.");
|
|
8451
|
+
}
|
|
8452
|
+
const chunks = normalizeDingTalkMarkdown(outgoingText, contentLimit).map((chunk, index) => `${index === 0 ? mentionPrefix : ""}${sourcePrefix}${chunk}`);
|
|
8251
8453
|
const title = extractTitle(outgoingText);
|
|
8252
8454
|
for (let i = 0; i < chunks.length; i++) {
|
|
8253
8455
|
const chunk = chunks[i];
|
|
@@ -8260,11 +8462,19 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8260
8462
|
},
|
|
8261
8463
|
...isMention ? { at: { atUserIds: [atUserId] } } : {}
|
|
8262
8464
|
};
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8465
|
+
let resp;
|
|
8466
|
+
try {
|
|
8467
|
+
resp = await fetch(webhook, {
|
|
8468
|
+
method: "POST",
|
|
8469
|
+
headers: { "Content-Type": "application/json" },
|
|
8470
|
+
body: JSON.stringify(body),
|
|
8471
|
+
signal: AbortSignal.timeout(REPLY_FETCH_TIMEOUT_MS)
|
|
8472
|
+
});
|
|
8473
|
+
} catch (err) {
|
|
8474
|
+
process.stderr.write(`[DingTalk:${this.name}] sendMessage failed: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 300)}
|
|
8475
|
+
`);
|
|
8476
|
+
throw err;
|
|
8477
|
+
}
|
|
8268
8478
|
if (isMention && process.env["QWEN_CHANNEL_DEBUG_MENTIONS"] === "1") {
|
|
8269
8479
|
const payload = await resp.clone().json().catch(() => void 0);
|
|
8270
8480
|
const response = payload && typeof payload === "object" ? payload : {};
|
|
@@ -8283,6 +8493,9 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8283
8493
|
async sendMessage(chatId, text) {
|
|
8284
8494
|
await this.sendReply(chatId, text);
|
|
8285
8495
|
}
|
|
8496
|
+
async sendThreadMessage(chatId, _threadId, text, sourceLabel) {
|
|
8497
|
+
await this.sendReply(chatId, text, void 0, sourceLabel);
|
|
8498
|
+
}
|
|
8286
8499
|
supportsProactiveSend() {
|
|
8287
8500
|
return true;
|
|
8288
8501
|
}
|
|
@@ -8301,11 +8514,18 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8301
8514
|
* Single-shot cold send: a failed chunk aborts the remainder (already-sent
|
|
8302
8515
|
* chunks are not recalled) and the error surfaces in the loop's lastError.
|
|
8303
8516
|
*/
|
|
8304
|
-
async pushProactive(target, text) {
|
|
8517
|
+
async pushProactive(target, text, sourceLabel) {
|
|
8305
8518
|
if (!text.trim())
|
|
8306
8519
|
return;
|
|
8307
8520
|
const outgoingText = await this.prepareOutgoingText(text);
|
|
8308
|
-
const
|
|
8521
|
+
const sourcePrefix = sourceLabel ? `${escapeDingTalkMarkdown(sourceLabel)}
|
|
8522
|
+
|
|
8523
|
+
` : "";
|
|
8524
|
+
const contentLimit = DINGTALK_CHUNK_LIMIT - sourcePrefix.length;
|
|
8525
|
+
if (contentLimit <= 0) {
|
|
8526
|
+
throw new Error("DingTalk source label exceeds the message limit.");
|
|
8527
|
+
}
|
|
8528
|
+
const chunks = normalizeDingTalkMarkdown(outgoingText, contentLimit).map((chunk) => `${sourcePrefix}${chunk}`);
|
|
8309
8529
|
const title = extractTitle(outgoingText);
|
|
8310
8530
|
for (let i = 0; i < chunks.length; i++) {
|
|
8311
8531
|
await this.sendProactiveChunk(target, i === 0 ? title : `${title} (cont.)`, chunks[i], `chunk ${i + 1}/${chunks.length}`);
|
|
@@ -8555,6 +8775,12 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8555
8775
|
}
|
|
8556
8776
|
/** Recall reactions left behind when a session dies without terminal lifecycle events. */
|
|
8557
8777
|
onSessionDied(sessionId) {
|
|
8778
|
+
this.blockProjectionArmed.delete(sessionId);
|
|
8779
|
+
this.blockFileProjectors.delete(sessionId);
|
|
8780
|
+
for (const [runId, state] of this.fileProjectors) {
|
|
8781
|
+
if (state.sessionId === sessionId)
|
|
8782
|
+
this.fileProjectors.delete(runId);
|
|
8783
|
+
}
|
|
8558
8784
|
const bufferedTargets = this.bufferedMentionTargetsBySession.get(sessionId);
|
|
8559
8785
|
if (bufferedTargets) {
|
|
8560
8786
|
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
@@ -8592,7 +8818,8 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8592
8818
|
if (event.runId && event.owner && inboundOwner?.ownerId === event.owner.id) {
|
|
8593
8819
|
this.cardRuns.set(event.runId, inboundOwner);
|
|
8594
8820
|
this.cardRunBySession.set(event.sessionId, event.runId);
|
|
8595
|
-
this.
|
|
8821
|
+
const sourceLabel = this.getResponseSourceLabel(event.sessionId);
|
|
8822
|
+
this.interactionPresenter?.registerRun(event.runId, event.owner.id, inboundOwner.target, event.sessionId, inboundOwner.sender, ...sourceLabel ? [sourceLabel] : []);
|
|
8596
8823
|
this.interactionPresenter?.startStatusCard(event.runId);
|
|
8597
8824
|
}
|
|
8598
8825
|
return;
|
|
@@ -8602,6 +8829,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8602
8829
|
this.mentionTargets.delete(event.messageId);
|
|
8603
8830
|
this.stopReaction(event.chatId, event.messageId, event.sessionId);
|
|
8604
8831
|
if (event.runId) {
|
|
8832
|
+
this.deleteFileProjectorsForRun(event.runId);
|
|
8605
8833
|
if (event.type === "failed") {
|
|
8606
8834
|
this.interactionPresenter?.terminalizeRun(event.runId, "failed", event.error);
|
|
8607
8835
|
} else if (event.type === "cancelled") {
|
|
@@ -8644,6 +8872,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8644
8872
|
}
|
|
8645
8873
|
}
|
|
8646
8874
|
onPromptStart(chatId, sessionId, messageId) {
|
|
8875
|
+
this.blockProjectionArmed.add(sessionId);
|
|
8647
8876
|
if (messageId) {
|
|
8648
8877
|
this.bufferedMentionTargets.delete(messageId);
|
|
8649
8878
|
this.untrackBufferedMentionTarget(sessionId, messageId);
|
|
@@ -8658,32 +8887,34 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8658
8887
|
async handleInbound(envelope) {
|
|
8659
8888
|
if (!await this.preflightInbound(envelope))
|
|
8660
8889
|
return;
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8890
|
+
await this.processPreflightedInbound(envelope, async () => {
|
|
8891
|
+
const messageId = envelope.messageId;
|
|
8892
|
+
if (messageId && envelope.senderId) {
|
|
8893
|
+
this.inboundCardOwners.delete(messageId);
|
|
8894
|
+
this.inboundCardOwners.set(messageId, {
|
|
8895
|
+
ownerId: envelope.senderId,
|
|
8896
|
+
target: {
|
|
8897
|
+
chatId: envelope.chatId,
|
|
8898
|
+
isGroup: envelope.isGroup
|
|
8899
|
+
},
|
|
8900
|
+
...this.atSender && envelope.isGroup ? {
|
|
8901
|
+
sender: {
|
|
8902
|
+
senderName: envelope.senderName
|
|
8903
|
+
}
|
|
8904
|
+
} : {}
|
|
8905
|
+
});
|
|
8906
|
+
if (this.inboundCardOwners.size > 1e3) {
|
|
8907
|
+
const oldest = this.inboundCardOwners.keys().next().value;
|
|
8908
|
+
if (oldest !== void 0)
|
|
8909
|
+
this.inboundCardOwners.delete(oldest);
|
|
8910
|
+
}
|
|
8680
8911
|
}
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8912
|
+
const atUserId = envelope[mentionTarget];
|
|
8913
|
+
if (this.atSender && messageId && atUserId) {
|
|
8914
|
+
this.mentionTargets.set(messageId, atUserId);
|
|
8915
|
+
}
|
|
8916
|
+
await this.processInbound(envelope);
|
|
8917
|
+
});
|
|
8687
8918
|
}
|
|
8688
8919
|
async processInbound(envelope) {
|
|
8689
8920
|
const messageId = envelope.messageId;
|
|
@@ -8704,36 +8935,123 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8704
8935
|
this.bufferedMentionTargetsBySession.delete(sessionId);
|
|
8705
8936
|
}
|
|
8706
8937
|
onPromptEnd(chatId, sessionId, messageId) {
|
|
8938
|
+
this.settleBlockFileProjector(chatId, sessionId);
|
|
8707
8939
|
this.sessionMentionTargets.delete(sessionId);
|
|
8708
8940
|
this.stopReaction(chatId, messageId, sessionId);
|
|
8709
8941
|
}
|
|
8710
|
-
|
|
8711
|
-
|
|
8942
|
+
/**
|
|
8943
|
+
* Turn end is the only point where the block projector's held state can be
|
|
8944
|
+
* settled: ChannelBase drains the turn's queued block sends before calling
|
|
8945
|
+
* onPromptEnd, so everything already appended belongs to this turn. Flush
|
|
8946
|
+
* the held candidate bytes (a trailing `[FILE:` prefix the stream never
|
|
8947
|
+
* completed) before deleting the entry — a later delete-without-settle
|
|
8948
|
+
* would silently drop them from the delivered answer. Also disarm the
|
|
8949
|
+
* session: /clear eviction and session death settle WITHOUT draining the
|
|
8950
|
+
* turn's send chain, and any block that lands afterwards must be dropped
|
|
8951
|
+
* rather than recreating projector state.
|
|
8952
|
+
*/
|
|
8953
|
+
settleBlockFileProjector(chatId, sessionId) {
|
|
8954
|
+
this.blockProjectionArmed.delete(sessionId);
|
|
8955
|
+
const state = this.blockFileProjectors.get(sessionId);
|
|
8956
|
+
if (!state)
|
|
8957
|
+
return;
|
|
8958
|
+
this.blockFileProjectors.delete(sessionId);
|
|
8959
|
+
const tail = state.projector.complete();
|
|
8960
|
+
if (!tail.trim())
|
|
8961
|
+
return;
|
|
8962
|
+
void this.sendReply(chatId, tail, void 0, this.getResponseSourceLabel(sessionId)).catch((err) => {
|
|
8963
|
+
process.stderr.write(`[DingTalk:${this.name}] projector tail delivery failed for session ${sessionId}: ${err instanceof Error ? err.message : String(err)}
|
|
8964
|
+
`);
|
|
8965
|
+
});
|
|
8966
|
+
}
|
|
8967
|
+
/**
|
|
8968
|
+
* Out-of-turn one-shot sends (background responses) must not flow through
|
|
8969
|
+
* the session's block-streaming projector: a second sender interleaving with
|
|
8970
|
+
* mid-projection state can swallow the send or split a held marker.
|
|
8971
|
+
*/
|
|
8972
|
+
async deliverBackgroundReply(chatId, text, sessionId, sourceLabel) {
|
|
8973
|
+
if (this.config.blockStreaming !== "on") {
|
|
8974
|
+
return super.deliverBackgroundReply(chatId, text, sessionId, sourceLabel);
|
|
8975
|
+
}
|
|
8976
|
+
await this.sendReply(chatId, text, void 0, sourceLabel);
|
|
8977
|
+
}
|
|
8978
|
+
async sendResponseMessage(chatId, text, sessionId, sourceLabel) {
|
|
8979
|
+
let outgoingText = text;
|
|
8980
|
+
let consumesMention = true;
|
|
8981
|
+
if (this.config.blockStreaming === "on") {
|
|
8982
|
+
const projected = this.projectBlockStreamChunk(text, sessionId);
|
|
8983
|
+
if (!projected.text.trim())
|
|
8984
|
+
return;
|
|
8985
|
+
outgoingText = projected.text;
|
|
8986
|
+
consumesMention = projected.hasContent;
|
|
8987
|
+
}
|
|
8988
|
+
const atUserId = consumesMention && this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
8712
8989
|
if (atUserId)
|
|
8713
8990
|
this.sessionMentionTargets.delete(sessionId);
|
|
8714
|
-
await this.sendReply(chatId,
|
|
8991
|
+
await this.sendReply(chatId, outgoingText, atUserId, sourceLabel ?? this.getResponseSourceLabel(sessionId));
|
|
8992
|
+
}
|
|
8993
|
+
projectBlockStreamChunk(text, sessionId) {
|
|
8994
|
+
let state = this.blockFileProjectors.get(sessionId);
|
|
8995
|
+
if (!state) {
|
|
8996
|
+
if (!this.blockProjectionArmed.has(sessionId)) {
|
|
8997
|
+
return { text: "", hasContent: false };
|
|
8998
|
+
}
|
|
8999
|
+
state = { projector: new OutboundFileProjector(), reportedMarkers: 0 };
|
|
9000
|
+
this.blockFileProjectors.set(sessionId, state);
|
|
9001
|
+
}
|
|
9002
|
+
const safe = state.projector.append(text);
|
|
9003
|
+
const hasContent = safe.trim().length > 0;
|
|
9004
|
+
const result = state.projector.result(safe);
|
|
9005
|
+
let outgoingText = safe;
|
|
9006
|
+
if (result.markerCount > state.reportedMarkers) {
|
|
9007
|
+
outgoingText = withFileUnavailableNotice(safe);
|
|
9008
|
+
state.reportedMarkers = result.markerCount;
|
|
9009
|
+
process.stderr.write(`[DingTalk:${this.name}] file markers redacted in block stream (session ${sessionId}, markers=${result.markerCount})
|
|
9010
|
+
`);
|
|
9011
|
+
}
|
|
9012
|
+
return { text: outgoingText, hasContent };
|
|
8715
9013
|
}
|
|
8716
|
-
async sendFallbackReply(chatId, text, sessionId) {
|
|
9014
|
+
async sendFallbackReply(chatId, text, sessionId, sourceLabel) {
|
|
8717
9015
|
const atUserId = this.atSender ? this.sessionMentionTargets.get(sessionId) : void 0;
|
|
8718
|
-
await this.sendReply(chatId, text, atUserId);
|
|
9016
|
+
await this.sendReply(chatId, text, atUserId, sourceLabel);
|
|
8719
9017
|
}
|
|
8720
9018
|
async onResponseComplete(chatId, text, sessionId, segment) {
|
|
9019
|
+
const streamed = segment ? this.fileProjectors.get(segment.runId)?.projector : void 0;
|
|
9020
|
+
if (segment)
|
|
9021
|
+
this.fileProjectors.delete(segment.runId);
|
|
9022
|
+
const outgoingText = await this.prepareOutgoingText(text, streamed);
|
|
8721
9023
|
if (segment && this.interactionPresenter) {
|
|
8722
|
-
const outgoingText = await this.prepareOutgoingText(text);
|
|
8723
9024
|
if (await this.interactionPresenter.closeOutput(segment.segmentId, outgoingText, "completed", segment)) {
|
|
8724
9025
|
return;
|
|
8725
9026
|
}
|
|
8726
9027
|
}
|
|
8727
|
-
await this.sendResponseMessage(chatId,
|
|
9028
|
+
await this.sendResponseMessage(chatId, outgoingText, sessionId, segment?.sourceLabel);
|
|
8728
9029
|
}
|
|
8729
9030
|
onOutputSegmentEnd(_chatId, _sessionId, segment, reason) {
|
|
9031
|
+
if (reason === "completed" || reason === "failed" || reason === "cancelled") {
|
|
9032
|
+
this.fileProjectors.delete(segment.runId);
|
|
9033
|
+
}
|
|
8730
9034
|
if (!this.interactionPresenter)
|
|
8731
9035
|
return;
|
|
8732
9036
|
return this.interactionPresenter.closeOutput(segment.segmentId, "", reason, segment).then(() => void 0);
|
|
8733
9037
|
}
|
|
8734
9038
|
onResponseChunk(_chatId, chunk, _sessionId, segment) {
|
|
8735
|
-
if (segment)
|
|
8736
|
-
|
|
9039
|
+
if (!segment)
|
|
9040
|
+
return;
|
|
9041
|
+
let state = this.fileProjectors.get(segment.runId);
|
|
9042
|
+
if (!state) {
|
|
9043
|
+
state = {
|
|
9044
|
+
sessionId: segment.sessionId,
|
|
9045
|
+
projector: new OutboundFileProjector()
|
|
9046
|
+
};
|
|
9047
|
+
this.fileProjectors.set(segment.runId, state);
|
|
9048
|
+
}
|
|
9049
|
+
const safe = state.projector.append(chunk);
|
|
9050
|
+
if (safe)
|
|
9051
|
+
this.interactionPresenter?.appendOutput(segment, safe);
|
|
9052
|
+
}
|
|
9053
|
+
deleteFileProjectorsForRun(runId) {
|
|
9054
|
+
this.fileProjectors.delete(runId);
|
|
8737
9055
|
}
|
|
8738
9056
|
async presentUserInputRequest(context) {
|
|
8739
9057
|
const run = this.cardRuns.get(context.runId);
|
|
@@ -8958,8 +9276,7 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
8958
9276
|
const media = await downloadMedia(downloadCode, robotCode, token);
|
|
8959
9277
|
if (!media)
|
|
8960
9278
|
return;
|
|
8961
|
-
|
|
8962
|
-
if (mediaType === "image" && inlineImageSlotFree) {
|
|
9279
|
+
if (mediaType === "image") {
|
|
8963
9280
|
const mimeType = media.mimeType.startsWith("image/") ? media.mimeType : "image/jpeg";
|
|
8964
9281
|
envelope.attachments = [
|
|
8965
9282
|
...envelope.attachments || [],
|
|
@@ -9069,19 +9386,22 @@ var DingtalkChannel = class _DingtalkChannel extends ChannelBase {
|
|
|
9069
9386
|
if (this.atSender && isGroup && senderStaffId) {
|
|
9070
9387
|
envelope[mentionTarget] = senderStaffId;
|
|
9071
9388
|
}
|
|
9072
|
-
const processMessage =
|
|
9389
|
+
const processMessage = content.downloadCodes.length > 0 || quoted.media ? this.prepareThenHandleInbound(envelope, async () => {
|
|
9073
9390
|
if (content.downloadCodes.length > 0 && content.mediaType) {
|
|
9074
|
-
|
|
9391
|
+
for (const downloadCode of content.downloadCodes) {
|
|
9392
|
+
await this.attachMedia(envelope, downloadCode, content.mediaType, content.fileName, content.placeholder);
|
|
9393
|
+
}
|
|
9075
9394
|
}
|
|
9076
9395
|
if (quoted.media) {
|
|
9077
9396
|
await this.attachMedia(envelope, quoted.media.downloadCode, quoted.media.mediaType, quoted.media.fileName);
|
|
9078
9397
|
}
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
processMessage().catch((err) => {
|
|
9398
|
+
}) : this.handleInbound(envelope);
|
|
9399
|
+
processMessage.catch((err) => {
|
|
9082
9400
|
process.stderr.write(`[DingTalk:${this.name}] Error handling message: ${err}
|
|
9083
9401
|
`);
|
|
9084
|
-
|
|
9402
|
+
const sourceLabel = this.getInboundErrorSourceLabel(envelope);
|
|
9403
|
+
const delivery = sourceLabel ? this.sendThreadMessage(chatId, envelope.threadId, "Sorry, something went wrong processing your message.", sourceLabel) : this.sendMessage(chatId, "Sorry, something went wrong processing your message.");
|
|
9404
|
+
delivery.catch(() => {
|
|
9085
9405
|
});
|
|
9086
9406
|
});
|
|
9087
9407
|
} catch (err) {
|