@qwen-code/qwen-code 0.21.11 → 0.21.12-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{MaxSizedBox-G7QPSZTF.js → MaxSizedBox-VSAJNP52.js} +22 -22
- package/chunks/{StandaloneSessionPicker-3CTEPV7S.js → StandaloneSessionPicker-N5MC42M2.js} +44 -42
- package/chunks/{acpAgent-43JURWOW.js → acpAgent-GUV7LTDH.js} +98 -94
- package/chunks/{agent-MIY4LJJJ.js → agent-WJT3BALC.js} +20 -20
- package/chunks/{agent-headless-LWVA6GR5.js → agent-headless-JRRUUVP3.js} +20 -20
- package/chunks/{anthropicContentGenerator-7HEP7Q5D.js → anthropicContentGenerator-4JSC3ZFL.js} +20 -20
- package/chunks/{bridge-PTTJEBNP.js → bridge-VB3BPG7G.js} +21 -21
- package/chunks/{build-GDBLPA24.js → build-RZS65IIX.js} +1 -1
- package/chunks/{channel-management-service-PQ6SU56M.js → channel-management-service-SKAN6NOB.js} +1 -1
- package/chunks/{channel-settings-store-IKK34GMH.js → channel-settings-store-UM7JZEW7.js} +27 -27
- package/chunks/{channel-worker-group-WBRE33ZV.js → channel-worker-group-YPTB5ASD.js} +3 -3
- package/chunks/{channel-worker-manager-V4LYVTPH.js → channel-worker-manager-4EHJSPRH.js} +3 -3
- package/chunks/{channel-worker-supervisor-YDAGW2RP.js → channel-worker-supervisor-DZKHYFHV.js} +2 -2
- package/chunks/{chunk-2IIJTXYF.js → chunk-2SB4SLKC.js} +3 -1
- package/chunks/{chunk-U7QUDFPD.js → chunk-3SIXC6QC.js} +5 -5
- package/chunks/{chunk-BTYS2JAY.js → chunk-3XZYK76R.js} +1 -1
- package/chunks/{chunk-4PFKN7CQ.js → chunk-3ZLUA4GV.js} +7 -7
- package/chunks/{chunk-RUVZZKDH.js → chunk-45TYWBCB.js} +1 -1
- package/chunks/{chunk-QG2IEE2E.js → chunk-4W25XH7F.js} +6 -6
- package/chunks/{chunk-2R2HYSUQ.js → chunk-5AWARYOK.js} +6 -4
- package/chunks/{chunk-23GFHEM3.js → chunk-5DDUYIY6.js} +6 -6
- package/chunks/{chunk-XBLYC4MI.js → chunk-5TXOGH4I.js} +1 -1
- package/chunks/{chunk-G64M7R2Y.js → chunk-67LXZ6LV.js} +6 -6
- package/chunks/{chunk-KFCTC5IJ.js → chunk-6LK2QPIA.js} +1 -1
- package/chunks/{chunk-2XZWO53E.js → chunk-6XZERB6P.js} +3 -3
- package/chunks/{chunk-W2ITCESM.js → chunk-7L64FSYQ.js} +6 -127
- package/chunks/{chunk-UM57UTTV.js → chunk-7N6WK2W6.js} +1 -1
- package/chunks/chunk-7P32M35F.js +51 -0
- package/chunks/{chunk-X5GLCWPX.js → chunk-7PBUQKMT.js} +1 -1
- package/chunks/{chunk-3SOTXJNO.js → chunk-A7M57KOL.js} +4 -4
- package/chunks/{chunk-RUKNJEJO.js → chunk-ABGS4FDQ.js} +1 -1
- package/chunks/{chunk-BIXG46YI.js → chunk-AJL3SAZG.js} +10 -10
- package/chunks/{chunk-TNQLAI6I.js → chunk-AMXMM7DH.js} +1 -1
- package/chunks/{chunk-N3ZWGKXN.js → chunk-C2VGLLNA.js} +4 -4
- package/chunks/{chunk-UEUE6LJX.js → chunk-CX2MARRJ.js} +1 -1
- package/chunks/{chunk-JPA7IDTE.js → chunk-DEG7R6Z6.js} +2 -2
- package/chunks/{chunk-TNS2M7VL.js → chunk-DEVFUPC5.js} +6 -6
- package/chunks/{chunk-EOBM4T2Z.js → chunk-DGM2XA3R.js} +1 -1
- package/chunks/{chunk-NFSSQDB5.js → chunk-DNRV2US3.js} +3 -3
- package/chunks/{chunk-TYAMGABM.js → chunk-E3GLDLYB.js} +6 -0
- package/chunks/{chunk-HUE2M6VI.js → chunk-E5BWLU5J.js} +1 -1
- package/chunks/{chunk-ESVSQKPY.js → chunk-EAJESCBT.js} +6 -8
- package/chunks/{chunk-HZV75ET2.js → chunk-FLUYVAQZ.js} +1 -1
- package/chunks/{chunk-YVVIFFU4.js → chunk-FMLUVVQ6.js} +2 -2
- package/chunks/{chunk-JOXXPM3X.js → chunk-FWJRWCKU.js} +4 -4
- package/chunks/{chunk-T4576UW4.js → chunk-G4C5RLX6.js} +1 -1
- package/chunks/{chunk-HMCSRTDY.js → chunk-GQW6P73F.js} +1 -1
- package/chunks/{chunk-U2JLICUY.js → chunk-HB6QW4LM.js} +7 -7
- package/chunks/{chunk-UIZGNLBP.js → chunk-INQN4KIA.js} +148 -148
- package/chunks/{chunk-OGQERNHD.js → chunk-JO45C3OY.js} +2 -2
- package/chunks/{chunk-DSKLWQHC.js → chunk-JRRZFO4A.js} +2 -2
- package/chunks/{chunk-4EX3DBFH.js → chunk-JWXBLIQL.js} +4 -4
- package/chunks/{chunk-JHMFKJEP.js → chunk-KNQZXSLW.js} +8 -2
- package/chunks/{chunk-LA3FF7RO.js → chunk-L2O7DJIE.js} +1 -1
- package/chunks/{chunk-DM4C3OX5.js → chunk-LCWRQA5U.js} +1 -1
- package/chunks/{chunk-22C7BQ6D.js → chunk-LHOG4E6Y.js} +3 -3
- package/chunks/{chunk-MDQSCFAZ.js → chunk-LOJO2RPW.js} +6 -6
- package/chunks/{chunk-YIKMBYMT.js → chunk-M2S67TPJ.js} +1 -1
- package/chunks/{chunk-3LHYTQ2R.js → chunk-M3QYOPGN.js} +1 -1
- package/chunks/{chunk-AZQ3DT76.js → chunk-M4NWDIFU.js} +1 -1
- package/chunks/{chunk-OC5SKSNX.js → chunk-MJ5FMYVQ.js} +2 -2
- package/chunks/{chunk-AAOONL5N.js → chunk-MM4XBXF7.js} +1 -1
- package/chunks/{chunk-7QE3QFU3.js → chunk-MMH3GO4Z.js} +9 -9
- package/chunks/chunk-N2TNM3QB.js +9 -0
- package/chunks/{chunk-BJKREW56.js → chunk-O5AZPHYZ.js} +1 -1
- package/chunks/{chunk-QGZN4RYB.js → chunk-OH5UKBLL.js} +3 -3
- package/chunks/{chunk-BR6TUEKJ.js → chunk-OLU7GIF4.js} +9 -41
- package/chunks/{chunk-BNRNVMOT.js → chunk-OSPIZEAM.js} +20 -18
- package/chunks/{chunk-4C4QSXE3.js → chunk-OYLNJPY3.js} +55 -358
- package/chunks/{chunk-KCDQGIHS.js → chunk-P2UCMHDT.js} +1 -1
- package/chunks/chunk-PDKLO2DN.js +526 -0
- package/chunks/{chunk-PBYVS6QT.js → chunk-PRWGIKKU.js} +4 -4
- package/chunks/{chunk-NQPYPDOY.js → chunk-Q6FGSG6B.js} +1 -1
- package/chunks/{chunk-MCHGE3EC.js → chunk-QIN5P5BP.js} +51 -829
- package/chunks/{chunk-JLYYGKRN.js → chunk-QZ5G26ZE.js} +19 -19
- package/chunks/{chunk-W2PNY24B.js → chunk-RE6JD2BH.js} +1 -1
- package/chunks/{chunk-F4T5J34H.js → chunk-SZ36WFVK.js} +1 -1
- package/chunks/{chunk-NM3E6GGL.js → chunk-T2VEHZH3.js} +2 -2
- package/chunks/chunk-T5ZFG4CI.js +830 -0
- package/chunks/{chunk-XT6TGJFD.js → chunk-U6LT3QBF.js} +1 -1
- package/chunks/{chunk-DEKY5Y7V.js → chunk-VESDV72K.js} +1 -1
- package/chunks/{chunk-45HPDU3F.js → chunk-VO52SIZW.js} +2 -2
- package/chunks/{chunk-TTB6GBJ6.js → chunk-VUFEW3SF.js} +42 -42
- package/chunks/{chunk-2AAFGCWP.js → chunk-VUTOKX6F.js} +3 -3
- package/chunks/{chunk-P7KCJGBR.js → chunk-WFBG4MF5.js} +3 -3
- package/chunks/chunk-WLML6VIA.js +18 -0
- package/chunks/{chunk-MZQ4I4AP.js → chunk-WQOE4IYF.js} +1 -1
- package/chunks/{chunk-XUMBOJC2.js → chunk-XAAL4IFG.js} +3 -3
- package/chunks/{chunk-J4EVBAB3.js → chunk-XDN6SMAQ.js} +4 -4
- package/chunks/chunk-XYVBANG5.js +336 -0
- package/chunks/{chunk-JKEO6OQY.js → chunk-YQB3HSQ7.js} +5 -5
- package/chunks/{chunk-VRWOMUZM.js → chunk-YTYPRVIZ.js} +1 -1
- package/chunks/chunk-ZBBVBZBR.js +137 -0
- package/chunks/{chunk-AKLY5M2C.js → chunk-ZIS5I56G.js} +3 -3
- package/chunks/{chunk-SUTP6CZA.js → chunk-ZXUMPZRT.js} +3 -3
- package/chunks/chunk-bdqvmfwv-OHYAFAAO.js +17446 -0
- package/chunks/{computer-use-7TIKEXBX.js → computer-use-YOYLKIHT.js} +23 -23
- package/chunks/{config-utils-6MVJ54TY.js → config-utils-TXVKR27S.js} +2 -2
- package/chunks/{contextCommand-5QKI7MRY.js → contextCommand-KZMV5EOI.js} +22 -22
- package/chunks/{core-runtime-USS7ZF3H.js → core-runtime-VFUL2R7U.js} +20 -20
- package/chunks/{create-sub-session-ZD2F3BH2.js → create-sub-session-EZW2NP4Z.js} +20 -20
- package/chunks/{daemon-Y3NOHFKQ.js → daemon-PXIC4ZDK.js} +148 -0
- package/chunks/{daemon-status-provider-PMP4J7BC.js → daemon-status-provider-6L3ZKVVR.js} +25 -25
- package/chunks/{daemon-trust-policy-2252VKXI.js → daemon-trust-policy-SZ3V4JEY.js} +26 -26
- package/chunks/{daemon-trust-policy-monitor-OSGGKJXT.js → daemon-trust-policy-monitor-HN34EJQ5.js} +26 -26
- package/chunks/{deferred-core-runtime-3VD4V6YZ.js → deferred-core-runtime-Z462KPKI.js} +22 -22
- package/chunks/{devtools-4QFYJT6U.js → devtools-X6ROTKHE.js} +1 -1
- package/chunks/dispatch-B53LNEO4.js +37 -0
- package/chunks/{dist-MAIUUIWN.js → dist-BW2LDPV3.js} +1 -1
- package/chunks/{dist-Q2WJ2IZU.js → dist-KTYDJNYM.js} +1 -1
- package/chunks/{earlyInputCapture-ER4HGLJN.js → earlyInputCapture-GSE6MMC7.js} +20 -20
- package/chunks/{edit-B3MT7O53.js → edit-YJX2HMSA.js} +28 -28
- package/chunks/{enter-worktree-WVIYVSDJ.js → enter-worktree-H3GV4KQ7.js} +25 -25
- package/chunks/{enterPlanMode-DDCIM6HA.js → enterPlanMode-6LPSFIN2.js} +28 -28
- package/chunks/{environment-LITGMOUP.js → environment-IVCQ3H7T.js} +22 -22
- package/chunks/{errors-E5CIOR2I.js → errors-2K5VJQVK.js} +22 -22
- package/chunks/{exit-worktree-NQ2A6URE.js → exit-worktree-QZC6DXGO.js} +25 -25
- package/chunks/{exitPlanMode-YXSWN4D3.js → exitPlanMode-UHGM7I4A.js} +20 -20
- package/chunks/{fast-path-PH3DBS6X.js → fast-path-BDDOO4H6.js} +2 -2
- package/chunks/{gemini-4YPO4ADY.js → gemini-VDUDROF7.js} +71 -71
- package/chunks/{geminiContentGenerator-GMSVVXOU.js → geminiContentGenerator-O4HYJOR7.js} +8 -8
- package/chunks/{glob-3Y3VHLM2.js → glob-Z7VZDN7C.js} +27 -27
- package/chunks/{grep-VUHUDZYG.js → grep-JQ6AGN62.js} +27 -27
- package/chunks/{handleAutoUpdate-OBFFPWSJ.js → handleAutoUpdate-XZCLKEMR.js} +24 -24
- package/chunks/{i18n-4PJA5KKU.js → i18n-G2BMPGAS.js} +21 -21
- package/chunks/{image-gen-4IFV4HES.js → image-gen-NMKTIERQ.js} +7 -7
- package/chunks/{initializer-ZTY3VSWL.js → initializer-JEYFVIIG.js} +26 -26
- package/chunks/{installationInfo-6USRNCD2.js → installationInfo-GY2OCLIS.js} +21 -21
- package/chunks/{list-U2ZDKYWN.js → list-ZJ4GEKM4.js} +29 -29
- package/chunks/{loadedSettingsAdapter-WW4HIVLO.js → loadedSettingsAdapter-5BO2PZLD.js} +26 -26
- package/chunks/{loggingContentGenerator-XXG6YWUE.js → loggingContentGenerator-ER2Z5L3L.js} +25 -25
- package/chunks/{managed-npm-update-7GM2LPLL.js → managed-npm-update-X66EZDQD.js} +21 -21
- package/chunks/{mcp-7KZW2T5P.js → mcp-BDWPEXJF.js} +26 -26
- package/chunks/{monitor-RQROQHLD.js → monitor-7J3DCMBL.js} +25 -25
- package/chunks/{node-UUDY34IG.js → node-YSOU44FX.js} +3 -3
- package/chunks/{nonInteractiveCli-U7JNJGS6.js → nonInteractiveCli-THJJIXKG.js} +61 -58
- package/chunks/{notebook-edit-XQA6YCH2.js → notebook-edit-IX7GCTIL.js} +28 -28
- package/chunks/{openaiContentGenerator-BZW2IB42.js → openaiContentGenerator-K65IDMQ6.js} +20 -20
- package/chunks/opentui-entry-L76XJNPE.js +47945 -0
- package/chunks/{pidfile-NX5VZ3IK.js → pidfile-NNWTPHX2.js} +20 -20
- package/chunks/{processUtils-M635AD23.js → processUtils-ILOXESNR.js} +2 -2
- package/chunks/{qwenContentGenerator-KHJ73E2C.js → qwenContentGenerator-YIKX3NHW.js} +26 -26
- package/chunks/{qwenOAuth2-QMK25XO7.js → qwenOAuth2-BLYU65Y4.js} +4 -4
- package/chunks/{read-file-6LKIKKXD.js → read-file-GLBZFPNV.js} +5 -5
- package/chunks/{resumeHistoryUtils-RR2KEVH5.js → resumeHistoryUtils-UMC4Y3E2.js} +26 -25
- package/chunks/{ripGrep-CF2WRBYV.js → ripGrep-53XOGSZ4.js} +20 -20
- package/chunks/{run-qwen-serve-L5TF57J4.js → run-qwen-serve-BTZ46CLW.js} +47 -47
- package/chunks/{runtime-3RE3BPR4.js → runtime-RQ3ACQKH.js} +29 -29
- package/chunks/runtime-gate-T4ICWGQJ.js +89 -0
- package/chunks/{scheduler-LXQZAMYT.js → scheduler-WEIFVKQH.js} +22 -22
- package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-4QKV6MCX.js} +2 -2
- package/chunks/{sdk-exporters-http-7SYSCGEO.js → sdk-exporters-http-2VPMAPFI.js} +11 -11
- package/chunks/{sdk-impl-VZI6M6EH.js → sdk-impl-5W3JUCWF.js} +7 -7
- package/chunks/{serve-5D4S7GIA.js → serve-RJUR5OJH.js} +26 -26
- package/chunks/{server-ILZB6TTC.js → server-WQ2ID4U7.js} +618 -198
- package/chunks/{session-SXCZITZ4.js → session-O4OXRVNI.js} +64 -61
- package/chunks/{settings-4RQB3OVF.js → settings-4BVJ36YG.js} +25 -25
- package/chunks/{shell-FCTR3OI2.js → shell-DCQZWM5T.js} +20 -20
- package/chunks/{skill-IAKHPD5H.js → skill-4KWZ4J7U.js} +14 -14
- package/chunks/{skill-settings-SOR23NOP.js → skill-settings-TEMNXCLU.js} +25 -25
- package/chunks/{spawnChannel-I6VAWYQJ.js → spawnChannel-ROYEZK57.js} +20 -20
- package/chunks/{standalone-update-5NN3MTYH.js → standalone-update-G4BETY4B.js} +22 -22
- package/chunks/{startInteractiveUI-OYGL3NZJ.js → startInteractiveUI-PDFQ7N7A.js} +2150 -2572
- package/chunks/task-create-URFZ5EUX.js +2 -2
- package/chunks/{team-create-J4JP6AXN.js → team-create-KW4LOVHD.js} +25 -25
- package/chunks/{team-plan-approval-7BEAIR2H.js → team-plan-approval-XHFK2RTF.js} +27 -27
- package/chunks/{terminal-image-renderer-SGGTG5LN.js → terminal-image-renderer-46R2LHGR.js} +20 -20
- package/chunks/{theme-manager-67TSB7LH.js → theme-manager-E56XY2JG.js} +20 -20
- package/chunks/{tool-search-XPOFDWOX.js → tool-search-EVVFQUMJ.js} +9 -9
- package/chunks/{total-session-admission-SZJFAM25.js → total-session-admission-CULMHRTA.js} +21 -21
- package/chunks/{trustedFolders-44NTYYV4.js → trustedFolders-BKLVSCXW.js} +21 -21
- package/chunks/{update-relaunch-K33Q3WEH.js → update-relaunch-46H4Q4VL.js} +5 -5
- package/chunks/{updateCheck-VBRNPLS4.js → updateCheck-3BQA7KNI.js} +24 -24
- package/chunks/{useAutoAcceptIndicator-AUNRB5S7.js → useAutoAcceptIndicator-3QJ7QV5R.js} +31 -31
- package/chunks/{validateNonInterActiveAuth-WTO36MTA.js → validateNonInterActiveAuth-QVFJVBSY.js} +57 -55
- package/chunks/{version-JZA6HYPI.js → version-6JJA54HH.js} +1 -1
- package/chunks/{web-fetch-LLHPV2IR.js → web-fetch-75JBSDA3.js} +14 -14
- package/chunks/{web-search-4HCHRZ3U.js → web-search-PKBISWS3.js} +11 -11
- package/chunks/{workflow-YI74QTWW.js → workflow-KEZDQISR.js} +36 -36
- package/chunks/{workspace-providers-status-CI3AO2BH.js → workspace-providers-status-YQW4VNIV.js} +28 -28
- package/chunks/{workspace-registration-store-KPIKXDHA.js → workspace-registration-store-GQ42PR72.js} +1 -1
- package/chunks/{workspace-registry-XE22QDE6.js → workspace-registry-ZR6DVZQ6.js} +21 -21
- package/chunks/{workspace-service-WI2FD72A.js → workspace-service-BCMK3NLA.js} +30 -30
- package/chunks/{workspace-skills-status-FFZU6FXL.js → workspace-skills-status-ZHBYM2X7.js} +26 -26
- package/chunks/{workspace-trust-reconciler-GJLNXR2U.js → workspace-trust-reconciler-TWRB3TW2.js} +29 -29
- package/chunks/wrapper-46Z24CTM.js +35 -0
- package/chunks/{write-file-IEAC3XC3.js → write-file-CQBI7HXO.js} +20 -20
- package/chunks/{zoom-image-GTVVT25J.js → zoom-image-36I4WZIL.js} +5 -5
- package/cli.js +12 -12
- package/package.json +3 -3
- package/web-shell/assets/{arc-B13-S0Yo.js → arc-CgGUyHWd.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CHvWNlVW.js → architectureDiagram-3BPJPVTR-BR0Qv-1Y.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CXebOlXF.js → blockDiagram-GPEHLZMM-DIoaceaI.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BQpx4y3Q.js → c4Diagram-AAUBKEIU-Bc5k6BbI.js} +1 -1
- package/web-shell/assets/channel-D2b9IYpS.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Cak1exSv.js → chunk-2J33WTMH-DtPEz2WX.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BIc8BV5_.js → chunk-4BX2VUAB-Dydo6ydE.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DoeJ5BL1.js → chunk-55IACEB6-DD9_VWXm.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-BDR_wYSu.js → chunk-727SXJPM-DVI2m59k.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BhRRGRq1.js → chunk-AQP2D5EJ-luatmaTN.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BJGAwVXr.js → chunk-FMBD7UC4-Duy8NTIi.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-vhE73bsD.js → chunk-ND2GUHAM-CrL1yhms.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BuTBZsdR.js → chunk-QZHKN3VN-C7BX6bu1.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-DHatTCmD.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHatTCmD.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-CVHKipHP.js → cose-bilkent-S5V4N54A-BTzs7mIi.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-C1DPa8SV.js → dagre-BM42HDAG-3VTUmWts.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-BYP_QxkT.js → diagram-2AECGRRQ-Ehdp75GN.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-Cray7ruQ.js → diagram-5GNKFQAL-B3wu3teE.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Ds4vJANi.js → diagram-KO2AKTUF-DjgTSf2S.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DxFrDykH.js → diagram-LMA3HP47-Br9mwjY3.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BdIO-pF_.js → diagram-OG6HWLK6-D4xz5M-z.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-5JA8KDYV.js → erDiagram-TEJ5UH35-CXayWlG_.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-DL4drKro.js → flowDiagram-I6XJVG4X-CLonjQTi.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-ijX2DD6_.js → ganttDiagram-6RSMTGT7-BTySFT-1.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-_lPsFLFF.js → gitGraphDiagram-PVQCEYII--2WcUjOe.js} +1 -1
- package/web-shell/assets/{index-dHAFxPHb.css → index-CIFO52Wx.css} +1 -1
- package/web-shell/assets/{index-C-YoqYbs.js → index-DPJHkFOG.js} +1 -1
- package/web-shell/assets/index-bhq3CUUF.js +1789 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-COFClLab.js → infoDiagram-5YYISTIA-9vpgAf1m.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-Div9KOgO.js → ishikawaDiagram-YF4QCWOH-DcRpHnAW.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-VAw5u0wc.js → journeyDiagram-JHISSGLW-C2TKorRm.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-CncCn8Nl.js → kanban-definition-UN3LZRKU-DdsFwB8b.js} +1 -1
- package/web-shell/assets/{linear-D6ad7e_k.js → linear-7PjRvJrf.js} +1 -1
- package/web-shell/assets/{mermaid.core-BV1IECGb.js → mermaid.core-raDXa11C.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-a3jeNgPr.js → mindmap-definition-RKZ34NQL-DLHc-PRN.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DsVRY5BW.js → pieDiagram-4H26LBE5-BftYpeTW.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D6zgexJK.js → quadrantDiagram-W4KKPZXB-O-6ygOYn.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-VEpSwJjn.js → requirementDiagram-4Y6WPE33-BmZWVufJ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CYEuOFne.js → sankeyDiagram-5OEKKPKP-2x5beiWt.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CCg0lI-9.js → sequenceDiagram-3UESZ5HK-BH8uKokQ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-BHXPsL0B.js → stateDiagram-AJRCARHV-Dq1MFgX_.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-spuAYji6.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-gqTf9a0k.js → timeline-definition-PNZ67QCA-Cl2WKbv9.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-C4DXXkBh.js → vennDiagram-CIIHVFJN-BqoRo_Q-.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-CMK46EiX.js → wardley-L42UT6IY-BTxp-Yot.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DTk1Gzt9.js → wardleyDiagram-YWT4CUSO-DFXVCSH2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BcJsM1dH.js → xychartDiagram-2RQKCTM6-qQhWx0aE.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-BB_Hm8Rf.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B_hFK54Y.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B_hFK54Y.js +0 -1
- package/web-shell/assets/index-BTwNYZkp.js +0 -1785
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-eTG8D0QT.js +0 -1
- package/chunks/{artifact-tool-M7UAJ5NT.js → artifact-tool-FRMBPDPB.js} +3 -3
- package/chunks/{chunk-NWNEANAT.js → chunk-44CTCCLY.js} +0 -0
- package/chunks/{chunk-25OFRBH2.js → chunk-5PWLQ7SK.js} +4 -4
- package/chunks/{chunk-KCCODSAA.js → chunk-TBVNYG5B.js} +3 -3
- package/chunks/{chunk-4MHDNGAV.js → chunk-ZGWY4YUB.js} +3 -3
- package/chunks/{ls-O4VBQRG7.js → ls-FSHISLLA.js} +3 -3
- package/chunks/{task-update-LCJM3EYG.js → task-update-DVV6CUGI.js} +2 -2
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
BuiltinCommandLoader,
|
|
5
|
+
BundledSkillLoader,
|
|
6
|
+
CommandService,
|
|
7
|
+
FileCommandLoader,
|
|
8
|
+
McpPromptLoader,
|
|
9
|
+
SavedWorkflowLoader,
|
|
10
|
+
SkillCommandLoader,
|
|
11
|
+
appendUserPromptExpansionAdditionalContext,
|
|
12
|
+
formatUserPromptExpansionBlockedMessage,
|
|
13
|
+
parseSlashCommand,
|
|
14
|
+
parseStackedSlashCommands,
|
|
15
|
+
recordAutoSkillCommandUsage,
|
|
16
|
+
serializeUserPromptExpansionPrompt
|
|
17
|
+
} from "./chunk-QIN5P5BP.js";
|
|
18
|
+
import {
|
|
19
|
+
computeSessionStats
|
|
20
|
+
} from "./chunk-JRRZFO4A.js";
|
|
21
|
+
import {
|
|
22
|
+
t
|
|
23
|
+
} from "./chunk-6LK2QPIA.js";
|
|
24
|
+
import {
|
|
25
|
+
Logger,
|
|
26
|
+
getArenaSystemReminder,
|
|
27
|
+
getPlanModeSystemReminder
|
|
28
|
+
} from "./chunk-INQN4KIA.js";
|
|
29
|
+
import {
|
|
30
|
+
getMCPServerStatus,
|
|
31
|
+
recordSkillInvocation,
|
|
32
|
+
uiTelemetryService
|
|
33
|
+
} from "./chunk-HB6QW4LM.js";
|
|
34
|
+
import {
|
|
35
|
+
isShellProgressData
|
|
36
|
+
} from "./chunk-XTH2OMDS.js";
|
|
37
|
+
import {
|
|
38
|
+
createDebugLogger
|
|
39
|
+
} from "./chunk-MPBRV3UU.js";
|
|
40
|
+
import {
|
|
41
|
+
init_esbuild_shims
|
|
42
|
+
} from "./chunk-5O2XNYP6.js";
|
|
43
|
+
import {
|
|
44
|
+
__name
|
|
45
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
46
|
+
|
|
47
|
+
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
48
|
+
init_esbuild_shims();
|
|
49
|
+
|
|
50
|
+
// packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
|
|
51
|
+
init_esbuild_shims();
|
|
52
|
+
function createNonInteractiveUI() {
|
|
53
|
+
return {
|
|
54
|
+
history: [],
|
|
55
|
+
addItem: /* @__PURE__ */ __name((_item, _timestamp) => 0, "addItem"),
|
|
56
|
+
clear: /* @__PURE__ */ __name(() => {
|
|
57
|
+
}, "clear"),
|
|
58
|
+
setDebugMessage: /* @__PURE__ */ __name((_message) => {
|
|
59
|
+
}, "setDebugMessage"),
|
|
60
|
+
loadHistory: /* @__PURE__ */ __name((_newHistory) => {
|
|
61
|
+
}, "loadHistory"),
|
|
62
|
+
refreshStatic: /* @__PURE__ */ __name(() => {
|
|
63
|
+
}, "refreshStatic"),
|
|
64
|
+
pendingItem: null,
|
|
65
|
+
setPendingItem: /* @__PURE__ */ __name((_item) => {
|
|
66
|
+
}, "setPendingItem"),
|
|
67
|
+
btwItem: null,
|
|
68
|
+
setBtwItem: /* @__PURE__ */ __name((_item) => {
|
|
69
|
+
}, "setBtwItem"),
|
|
70
|
+
cancelBtw: /* @__PURE__ */ __name(() => {
|
|
71
|
+
}, "cancelBtw"),
|
|
72
|
+
btwAbortControllerRef: { current: null },
|
|
73
|
+
isIdleRef: { current: true },
|
|
74
|
+
toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
|
|
75
|
+
setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
|
|
76
|
+
}, "setGeminiMdFileCount"),
|
|
77
|
+
reloadCommands: /* @__PURE__ */ __name(() => {
|
|
78
|
+
}, "reloadCommands"),
|
|
79
|
+
setSessionName: /* @__PURE__ */ __name(() => {
|
|
80
|
+
}, "setSessionName"),
|
|
81
|
+
extensionsUpdateState: /* @__PURE__ */ new Map(),
|
|
82
|
+
dispatchExtensionStateUpdate: /* @__PURE__ */ __name((_action) => {
|
|
83
|
+
}, "dispatchExtensionStateUpdate"),
|
|
84
|
+
addConfirmUpdateExtensionRequest: /* @__PURE__ */ __name((_request) => {
|
|
85
|
+
}, "addConfirmUpdateExtensionRequest")
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
__name(createNonInteractiveUI, "createNonInteractiveUI");
|
|
89
|
+
|
|
90
|
+
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
91
|
+
var debugLogger = createDebugLogger("NON_INTERACTIVE_COMMANDS");
|
|
92
|
+
function getSkillCommandName(command) {
|
|
93
|
+
return command.skillDetail?.name ?? command.name;
|
|
94
|
+
}
|
|
95
|
+
__name(getSkillCommandName, "getSkillCommandName");
|
|
96
|
+
function handleCommandResult(result, outputHistoryItems) {
|
|
97
|
+
switch (result.type) {
|
|
98
|
+
case "submit_prompt":
|
|
99
|
+
return {
|
|
100
|
+
type: "submit_prompt",
|
|
101
|
+
content: result.content,
|
|
102
|
+
...result.modelOverride ? { modelOverride: result.modelOverride } : {},
|
|
103
|
+
...result.refreshContextFilesOnWrite ? { refreshContextFilesOnWrite: true } : {},
|
|
104
|
+
...outputHistoryItems?.length ? { outputHistoryItems } : {}
|
|
105
|
+
};
|
|
106
|
+
case "message":
|
|
107
|
+
return {
|
|
108
|
+
type: "message",
|
|
109
|
+
messageType: result.messageType,
|
|
110
|
+
content: result.content,
|
|
111
|
+
...outputHistoryItems?.length ? { outputHistoryItems } : {}
|
|
112
|
+
};
|
|
113
|
+
case "stream_messages":
|
|
114
|
+
return {
|
|
115
|
+
type: "stream_messages",
|
|
116
|
+
messages: result.messages
|
|
117
|
+
};
|
|
118
|
+
case "goal_control":
|
|
119
|
+
return {
|
|
120
|
+
type: "goal_control",
|
|
121
|
+
operation: result.operation,
|
|
122
|
+
response: result.response,
|
|
123
|
+
...result.cause ? { cause: result.cause } : {}
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Currently return types below are never generated due to the
|
|
127
|
+
* whitelist of allowed slash commands in ACP and non-interactive mode.
|
|
128
|
+
* We'll try to add more supported return types in the future.
|
|
129
|
+
*/
|
|
130
|
+
case "tool":
|
|
131
|
+
return {
|
|
132
|
+
type: "unsupported",
|
|
133
|
+
reason: "Tool execution from slash commands is not supported in non-interactive mode.",
|
|
134
|
+
originalType: "tool"
|
|
135
|
+
};
|
|
136
|
+
case "quit":
|
|
137
|
+
return {
|
|
138
|
+
type: "unsupported",
|
|
139
|
+
reason: "Quit command is not supported in non-interactive mode. The process will exit naturally after completion.",
|
|
140
|
+
originalType: "quit"
|
|
141
|
+
};
|
|
142
|
+
case "dialog":
|
|
143
|
+
return {
|
|
144
|
+
type: "unsupported",
|
|
145
|
+
reason: `Dialog '${result.dialog}' cannot be opened in non-interactive mode.`,
|
|
146
|
+
originalType: "dialog"
|
|
147
|
+
};
|
|
148
|
+
case "load_history":
|
|
149
|
+
return {
|
|
150
|
+
type: "unsupported",
|
|
151
|
+
reason: "Loading history is not supported in non-interactive mode. Each invocation starts with a fresh context.",
|
|
152
|
+
originalType: "load_history"
|
|
153
|
+
};
|
|
154
|
+
case "confirm_shell_commands":
|
|
155
|
+
return {
|
|
156
|
+
type: "unsupported",
|
|
157
|
+
reason: "Shell command confirmation is not supported in non-interactive mode. Use YOLO mode or pre-approve commands.",
|
|
158
|
+
originalType: "confirm_shell_commands"
|
|
159
|
+
};
|
|
160
|
+
case "confirm_action":
|
|
161
|
+
return {
|
|
162
|
+
type: "unsupported",
|
|
163
|
+
reason: "Action confirmation is not supported in non-interactive mode. Commands requiring confirmation cannot be executed.",
|
|
164
|
+
originalType: "confirm_action"
|
|
165
|
+
};
|
|
166
|
+
default: {
|
|
167
|
+
const _exhaustive = result;
|
|
168
|
+
return {
|
|
169
|
+
type: "unsupported",
|
|
170
|
+
reason: `Unknown command result type: ${_exhaustive.type}`,
|
|
171
|
+
originalType: "unknown"
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
__name(handleCommandResult, "handleCommandResult");
|
|
177
|
+
async function fireUserPromptExpansionHook(config, commandName, commandArgs, content, signal) {
|
|
178
|
+
if (config.getDisableAllHooks?.() || !(config.hasHooksForEvent?.("UserPromptExpansion") ?? false)) {
|
|
179
|
+
return { content };
|
|
180
|
+
}
|
|
181
|
+
const hookSystem = config.getHookSystem();
|
|
182
|
+
if (!hookSystem) {
|
|
183
|
+
return { content };
|
|
184
|
+
}
|
|
185
|
+
const output = await hookSystem.fireUserPromptExpansionEvent(
|
|
186
|
+
commandName,
|
|
187
|
+
commandArgs,
|
|
188
|
+
serializeUserPromptExpansionPrompt(content),
|
|
189
|
+
signal
|
|
190
|
+
);
|
|
191
|
+
if (!output) {
|
|
192
|
+
return { content };
|
|
193
|
+
}
|
|
194
|
+
const blockingError = output.getBlockingError();
|
|
195
|
+
if (blockingError.blocked || output.shouldStopExecution()) {
|
|
196
|
+
return {
|
|
197
|
+
blockedResult: {
|
|
198
|
+
type: "message",
|
|
199
|
+
messageType: "error",
|
|
200
|
+
content: formatUserPromptExpansionBlockedMessage(
|
|
201
|
+
blockingError.reason || output.getEffectiveReason()
|
|
202
|
+
)
|
|
203
|
+
},
|
|
204
|
+
content
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
content: appendUserPromptExpansionAdditionalContext(
|
|
209
|
+
content,
|
|
210
|
+
output.getAdditionalContext()
|
|
211
|
+
)
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
__name(fireUserPromptExpansionHook, "fireUserPromptExpansionHook");
|
|
215
|
+
async function registerModelInvocableCommands(commandService, config, executionMode, settings) {
|
|
216
|
+
if (!settings) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
config.setModelInvocableCommandsProvider(
|
|
220
|
+
() => commandService.getModelInvocableCommands().map((cmd) => ({
|
|
221
|
+
name: cmd.name,
|
|
222
|
+
description: cmd.modelDescription ?? cmd.description
|
|
223
|
+
}))
|
|
224
|
+
);
|
|
225
|
+
config.setModelInvocableCommandsExecutor(
|
|
226
|
+
async (name, args = "") => {
|
|
227
|
+
const commands = commandService.getModelInvocableCommands();
|
|
228
|
+
const cmd = commands.find((c) => c.name === name);
|
|
229
|
+
if (!cmd?.action) return null;
|
|
230
|
+
const minimalContext = {
|
|
231
|
+
executionMode,
|
|
232
|
+
invocation: {
|
|
233
|
+
raw: args ? `/${name} ${args}` : `/${name}`,
|
|
234
|
+
name,
|
|
235
|
+
args
|
|
236
|
+
},
|
|
237
|
+
services: { config, settings, logger: null }
|
|
238
|
+
};
|
|
239
|
+
const result = await cmd.action(minimalContext, args);
|
|
240
|
+
if (!result || result.type !== "submit_prompt") return null;
|
|
241
|
+
const hookSignal = new AbortController().signal;
|
|
242
|
+
const hookResult = await fireUserPromptExpansionHook(
|
|
243
|
+
config,
|
|
244
|
+
name,
|
|
245
|
+
args,
|
|
246
|
+
result.content,
|
|
247
|
+
hookSignal
|
|
248
|
+
);
|
|
249
|
+
if (hookResult.blockedResult) {
|
|
250
|
+
return hookResult.blockedResult.type === "message" ? { error: hookResult.blockedResult.content } : null;
|
|
251
|
+
}
|
|
252
|
+
const content = hookResult.content;
|
|
253
|
+
if (typeof content === "string") return content;
|
|
254
|
+
if (Array.isArray(content)) {
|
|
255
|
+
return content.map(
|
|
256
|
+
(p) => typeof p === "string" ? p : p.text ?? ""
|
|
257
|
+
).join("");
|
|
258
|
+
}
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
const skillManager = typeof config.getSkillManager === "function" ? config.getSkillManager() : null;
|
|
263
|
+
await skillManager?.notifyConfigChanged();
|
|
264
|
+
}
|
|
265
|
+
__name(registerModelInvocableCommands, "registerModelInvocableCommands");
|
|
266
|
+
var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings, sessionHooks) => {
|
|
267
|
+
const trimmed = rawQuery.trim();
|
|
268
|
+
if (!trimmed.startsWith("/")) {
|
|
269
|
+
return { type: "no_command" };
|
|
270
|
+
}
|
|
271
|
+
const isAcpMode = config.getExperimentalZedIntegration();
|
|
272
|
+
const isInteractive = config.isInteractive();
|
|
273
|
+
const executionMode = isAcpMode ? "acp" : isInteractive ? "interactive" : "non_interactive";
|
|
274
|
+
const allLoaders = [
|
|
275
|
+
new McpPromptLoader(config),
|
|
276
|
+
new BuiltinCommandLoader(config),
|
|
277
|
+
new BundledSkillLoader(config),
|
|
278
|
+
new SkillCommandLoader(config),
|
|
279
|
+
new SavedWorkflowLoader(config),
|
|
280
|
+
new FileCommandLoader(config)
|
|
281
|
+
];
|
|
282
|
+
const disabledSlashCommandsRaw = config.getDisabledSlashCommands();
|
|
283
|
+
const disabledNameSet = /* @__PURE__ */ new Set();
|
|
284
|
+
for (const name of disabledSlashCommandsRaw) {
|
|
285
|
+
const trimmed2 = name.trim();
|
|
286
|
+
if (trimmed2) disabledNameSet.add(trimmed2.toLowerCase());
|
|
287
|
+
}
|
|
288
|
+
const isDisabled = /* @__PURE__ */ __name((cmd) => disabledNameSet.has(cmd.name.toLowerCase()) || (cmd.altNames ?? []).some((a) => disabledNameSet.has(a.toLowerCase())), "isDisabled");
|
|
289
|
+
const allCommandService = await CommandService.create(
|
|
290
|
+
allLoaders,
|
|
291
|
+
abortController.signal
|
|
292
|
+
);
|
|
293
|
+
const commandService = disabledNameSet.size > 0 ? await CommandService.create(
|
|
294
|
+
allLoaders,
|
|
295
|
+
abortController.signal,
|
|
296
|
+
disabledNameSet
|
|
297
|
+
) : allCommandService;
|
|
298
|
+
await registerModelInvocableCommands(
|
|
299
|
+
commandService,
|
|
300
|
+
config,
|
|
301
|
+
executionMode,
|
|
302
|
+
settings
|
|
303
|
+
);
|
|
304
|
+
const allCommands = allCommandService.getCommands();
|
|
305
|
+
const filteredCommands = commandService.getCommandsForMode(executionMode).filter((cmd) => !isDisabled(cmd));
|
|
306
|
+
const { commandToExecute, args } = parseSlashCommand(
|
|
307
|
+
rawQuery,
|
|
308
|
+
filteredCommands
|
|
309
|
+
);
|
|
310
|
+
const stackedResult = parseStackedSlashCommands(rawQuery, filteredCommands);
|
|
311
|
+
if (stackedResult.skills.length >= 2) {
|
|
312
|
+
const combinedContent = [];
|
|
313
|
+
let firstModelOverride;
|
|
314
|
+
let refreshContextFilesOnWrite = false;
|
|
315
|
+
const onCompleteCallbacks = [];
|
|
316
|
+
const successfulSkillCommands = [];
|
|
317
|
+
for (const skill of stackedResult.skills) {
|
|
318
|
+
if (!skill.action) continue;
|
|
319
|
+
const skillContext = {
|
|
320
|
+
executionMode,
|
|
321
|
+
invocation: {
|
|
322
|
+
raw: `/${skill.name}`,
|
|
323
|
+
name: skill.name,
|
|
324
|
+
args: ""
|
|
325
|
+
},
|
|
326
|
+
services: { config, settings, logger: null }
|
|
327
|
+
};
|
|
328
|
+
const skillResult = await skill.action(skillContext, "");
|
|
329
|
+
if (skillResult?.type === "submit_prompt") {
|
|
330
|
+
combinedContent.push(skillResult.content);
|
|
331
|
+
firstModelOverride ??= skillResult.modelOverride;
|
|
332
|
+
refreshContextFilesOnWrite ||= Boolean(
|
|
333
|
+
skillResult.refreshContextFilesOnWrite
|
|
334
|
+
);
|
|
335
|
+
if (skillResult.onComplete) {
|
|
336
|
+
onCompleteCallbacks.push(skillResult.onComplete);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
const succeeded = skillResult?.type === "submit_prompt";
|
|
340
|
+
recordSkillInvocation(config, {
|
|
341
|
+
skillName: getSkillCommandName(skill),
|
|
342
|
+
success: succeeded
|
|
343
|
+
});
|
|
344
|
+
if (succeeded) {
|
|
345
|
+
successfulSkillCommands.push(skill);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if (stackedResult.remainingText) {
|
|
349
|
+
combinedContent.push([{ text: stackedResult.remainingText }]);
|
|
350
|
+
}
|
|
351
|
+
const mergedContent = combinedContent.flat();
|
|
352
|
+
const hookResult = await fireUserPromptExpansionHook(
|
|
353
|
+
config,
|
|
354
|
+
stackedResult.skills.map((s) => s.name).join(" "),
|
|
355
|
+
stackedResult.remainingText,
|
|
356
|
+
mergedContent,
|
|
357
|
+
abortController.signal
|
|
358
|
+
);
|
|
359
|
+
if (hookResult.blockedResult) {
|
|
360
|
+
return hookResult.blockedResult;
|
|
361
|
+
}
|
|
362
|
+
for (const skill of successfulSkillCommands) {
|
|
363
|
+
void recordAutoSkillCommandUsage(config, skill);
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
type: "submit_prompt",
|
|
367
|
+
content: hookResult.content,
|
|
368
|
+
...firstModelOverride ? { modelOverride: firstModelOverride } : {},
|
|
369
|
+
...refreshContextFilesOnWrite ? { refreshContextFilesOnWrite: true } : {},
|
|
370
|
+
...onCompleteCallbacks.length ? {
|
|
371
|
+
onComplete: /* @__PURE__ */ __name(async () => {
|
|
372
|
+
for (const cb of onCompleteCallbacks) await cb();
|
|
373
|
+
}, "onComplete")
|
|
374
|
+
} : {}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
if (!commandToExecute) {
|
|
378
|
+
const { commandToExecute: knownCommand } = parseSlashCommand(
|
|
379
|
+
rawQuery,
|
|
380
|
+
allCommands
|
|
381
|
+
);
|
|
382
|
+
if (knownCommand) {
|
|
383
|
+
const typedToken = rawQuery.trim().substring(1).trim().split(/\s+/)[0] ?? knownCommand.name;
|
|
384
|
+
if (isDisabled(knownCommand)) {
|
|
385
|
+
return {
|
|
386
|
+
type: "unsupported",
|
|
387
|
+
reason: t(
|
|
388
|
+
'The command "/{{command}}" is disabled by the current configuration.',
|
|
389
|
+
{ command: typedToken }
|
|
390
|
+
),
|
|
391
|
+
originalType: "filtered_command"
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
return {
|
|
395
|
+
type: "unsupported",
|
|
396
|
+
reason: t('The command "/{{command}}" is not supported in this mode.', {
|
|
397
|
+
command: typedToken
|
|
398
|
+
}),
|
|
399
|
+
originalType: "filtered_command"
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
return { type: "no_command" };
|
|
403
|
+
}
|
|
404
|
+
if (!commandToExecute.action) {
|
|
405
|
+
return { type: "no_command" };
|
|
406
|
+
}
|
|
407
|
+
const sessionStats = {
|
|
408
|
+
sessionId: config?.getSessionId(),
|
|
409
|
+
sessionStartTime: /* @__PURE__ */ new Date(),
|
|
410
|
+
metrics: config ? uiTelemetryService.getMetricsForSession(config.getSessionId()) : uiTelemetryService.getMetrics(),
|
|
411
|
+
lastPromptTokenCount: 0,
|
|
412
|
+
promptCount: 1
|
|
413
|
+
};
|
|
414
|
+
const logger = new Logger(config?.getSessionId() || "", config?.storage);
|
|
415
|
+
const outputHistoryItems = [];
|
|
416
|
+
const ui = createNonInteractiveUI();
|
|
417
|
+
ui.addItem = (item) => {
|
|
418
|
+
outputHistoryItems.push(item);
|
|
419
|
+
return 0;
|
|
420
|
+
};
|
|
421
|
+
const context = {
|
|
422
|
+
executionMode,
|
|
423
|
+
services: {
|
|
424
|
+
config,
|
|
425
|
+
settings,
|
|
426
|
+
logger
|
|
427
|
+
},
|
|
428
|
+
ui,
|
|
429
|
+
session: {
|
|
430
|
+
stats: sessionStats,
|
|
431
|
+
sessionShellAllowlist: /* @__PURE__ */ new Set(),
|
|
432
|
+
...sessionHooks?.startNewSession ? { startNewSession: sessionHooks.startNewSession } : {}
|
|
433
|
+
},
|
|
434
|
+
invocation: {
|
|
435
|
+
raw: trimmed,
|
|
436
|
+
name: commandToExecute.name,
|
|
437
|
+
args
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
const isSkillCommand = commandToExecute.kind === "skill" /* SKILL */;
|
|
441
|
+
let skillInvocationRecorded = false;
|
|
442
|
+
const recordSkillCommandInvocation = /* @__PURE__ */ __name((success) => {
|
|
443
|
+
if (!isSkillCommand || skillInvocationRecorded) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
recordSkillInvocation(config, {
|
|
447
|
+
skillName: getSkillCommandName(commandToExecute),
|
|
448
|
+
success
|
|
449
|
+
});
|
|
450
|
+
skillInvocationRecorded = true;
|
|
451
|
+
}, "recordSkillCommandInvocation");
|
|
452
|
+
let result;
|
|
453
|
+
try {
|
|
454
|
+
result = await commandToExecute.action(context, args);
|
|
455
|
+
} catch (error) {
|
|
456
|
+
recordSkillCommandInvocation(false);
|
|
457
|
+
throw error;
|
|
458
|
+
}
|
|
459
|
+
if (!result) {
|
|
460
|
+
return {
|
|
461
|
+
type: "message",
|
|
462
|
+
messageType: "info",
|
|
463
|
+
content: "Command executed successfully."
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
if (result.type === "submit_prompt") {
|
|
467
|
+
let hookResult;
|
|
468
|
+
try {
|
|
469
|
+
hookResult = await fireUserPromptExpansionHook(
|
|
470
|
+
config,
|
|
471
|
+
commandToExecute.name,
|
|
472
|
+
args,
|
|
473
|
+
result.content,
|
|
474
|
+
abortController.signal
|
|
475
|
+
);
|
|
476
|
+
} catch (error) {
|
|
477
|
+
recordSkillCommandInvocation(false);
|
|
478
|
+
throw error;
|
|
479
|
+
}
|
|
480
|
+
if (hookResult.blockedResult) {
|
|
481
|
+
recordSkillCommandInvocation(false);
|
|
482
|
+
return hookResult.blockedResult;
|
|
483
|
+
}
|
|
484
|
+
recordSkillCommandInvocation(true);
|
|
485
|
+
void recordAutoSkillCommandUsage(config, commandToExecute);
|
|
486
|
+
return handleCommandResult(
|
|
487
|
+
{ ...result, content: hookResult.content },
|
|
488
|
+
outputHistoryItems
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
return handleCommandResult(result, outputHistoryItems);
|
|
492
|
+
}, "handleSlashCommand");
|
|
493
|
+
var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mode = "acp", settings) => {
|
|
494
|
+
try {
|
|
495
|
+
const loaders = [
|
|
496
|
+
new McpPromptLoader(config),
|
|
497
|
+
new BuiltinCommandLoader(config),
|
|
498
|
+
new BundledSkillLoader(config),
|
|
499
|
+
new SkillCommandLoader(config),
|
|
500
|
+
new SavedWorkflowLoader(config),
|
|
501
|
+
new FileCommandLoader(config)
|
|
502
|
+
];
|
|
503
|
+
const disabledSlashCommands = config.getDisabledSlashCommands();
|
|
504
|
+
const commandService = await CommandService.create(
|
|
505
|
+
loaders,
|
|
506
|
+
abortSignal,
|
|
507
|
+
disabledSlashCommands.length > 0 ? new Set(disabledSlashCommands) : void 0
|
|
508
|
+
);
|
|
509
|
+
await registerModelInvocableCommands(
|
|
510
|
+
commandService,
|
|
511
|
+
config,
|
|
512
|
+
mode,
|
|
513
|
+
settings
|
|
514
|
+
);
|
|
515
|
+
return commandService.getCommandsForMode(mode);
|
|
516
|
+
} catch (error) {
|
|
517
|
+
debugLogger.error("Error loading available commands:", error);
|
|
518
|
+
return [];
|
|
519
|
+
}
|
|
520
|
+
}, "getAvailableCommands");
|
|
521
|
+
|
|
522
|
+
// packages/cli/src/utils/nonInteractiveHelpers.ts
|
|
523
|
+
init_esbuild_shims();
|
|
524
|
+
var debugLogger2 = createDebugLogger("NON_INTERACTIVE");
|
|
525
|
+
function normalizePartList(parts) {
|
|
526
|
+
if (!parts) {
|
|
527
|
+
return [];
|
|
528
|
+
}
|
|
529
|
+
if (typeof parts === "string") {
|
|
530
|
+
return [{ text: parts }];
|
|
531
|
+
}
|
|
532
|
+
if (Array.isArray(parts)) {
|
|
533
|
+
return parts.map(
|
|
534
|
+
(part) => typeof part === "string" ? { text: part } : part
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
return [parts];
|
|
538
|
+
}
|
|
539
|
+
__name(normalizePartList, "normalizePartList");
|
|
540
|
+
function extractPartsFromUserMessage(message) {
|
|
541
|
+
if (!message) {
|
|
542
|
+
return null;
|
|
543
|
+
}
|
|
544
|
+
const content = message.message?.content;
|
|
545
|
+
if (typeof content === "string") {
|
|
546
|
+
return content;
|
|
547
|
+
}
|
|
548
|
+
if (Array.isArray(content)) {
|
|
549
|
+
const parts = [];
|
|
550
|
+
for (const block of content) {
|
|
551
|
+
if (!block || typeof block !== "object" || !("type" in block)) {
|
|
552
|
+
continue;
|
|
553
|
+
}
|
|
554
|
+
if (block.type === "text" && "text" in block && block.text) {
|
|
555
|
+
parts.push({ text: block.text });
|
|
556
|
+
} else {
|
|
557
|
+
parts.push({ text: JSON.stringify(block) });
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return parts.length > 0 ? parts : null;
|
|
561
|
+
}
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
__name(extractPartsFromUserMessage, "extractPartsFromUserMessage");
|
|
565
|
+
function computeUsageFromMetrics(metrics) {
|
|
566
|
+
const stats = computeSessionStats(metrics);
|
|
567
|
+
const { models } = metrics;
|
|
568
|
+
const totalOutputTokens = Object.values(models).reduce(
|
|
569
|
+
(acc, model) => acc + model.tokens.candidates,
|
|
570
|
+
0
|
|
571
|
+
);
|
|
572
|
+
const totalTokens = Object.values(models).reduce(
|
|
573
|
+
(acc, model) => acc + model.tokens.total,
|
|
574
|
+
0
|
|
575
|
+
);
|
|
576
|
+
const usage = {
|
|
577
|
+
input_tokens: stats.totalPromptTokens,
|
|
578
|
+
output_tokens: totalOutputTokens,
|
|
579
|
+
cache_read_input_tokens: stats.totalCachedTokens
|
|
580
|
+
};
|
|
581
|
+
if (totalTokens > 0) {
|
|
582
|
+
usage.total_tokens = totalTokens;
|
|
583
|
+
}
|
|
584
|
+
return usage;
|
|
585
|
+
}
|
|
586
|
+
__name(computeUsageFromMetrics, "computeUsageFromMetrics");
|
|
587
|
+
function buildInitialSystemReminders(config) {
|
|
588
|
+
const reminders = [];
|
|
589
|
+
if (config.getApprovalMode() === "plan" /* PLAN */) {
|
|
590
|
+
reminders.push({ text: getPlanModeSystemReminder(config.getSdkMode?.()) });
|
|
591
|
+
}
|
|
592
|
+
const arenaManager = config.getArenaManager?.();
|
|
593
|
+
if (arenaManager) {
|
|
594
|
+
try {
|
|
595
|
+
const sessionDir = arenaManager.getArenaSessionDir();
|
|
596
|
+
const configPath = `${sessionDir}/config.json`;
|
|
597
|
+
reminders.push({ text: getArenaSystemReminder(configPath) });
|
|
598
|
+
} catch {
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return reminders;
|
|
602
|
+
}
|
|
603
|
+
__name(buildInitialSystemReminders, "buildInitialSystemReminders");
|
|
604
|
+
function insertAfterFunctionResponses(parts, additions) {
|
|
605
|
+
const firstNonFunctionResponse = parts.findIndex(
|
|
606
|
+
(part) => !part.functionResponse
|
|
607
|
+
);
|
|
608
|
+
const insertAt = firstNonFunctionResponse === -1 ? parts.length : firstNonFunctionResponse;
|
|
609
|
+
return [...parts.slice(0, insertAt), ...additions, ...parts.slice(insertAt)];
|
|
610
|
+
}
|
|
611
|
+
__name(insertAfterFunctionResponses, "insertAfterFunctionResponses");
|
|
612
|
+
async function loadSlashCommandNames(config) {
|
|
613
|
+
const controller = new AbortController();
|
|
614
|
+
try {
|
|
615
|
+
const commands = await getAvailableCommands(
|
|
616
|
+
config,
|
|
617
|
+
controller.signal,
|
|
618
|
+
"non_interactive"
|
|
619
|
+
);
|
|
620
|
+
return commands.map((cmd) => cmd.name).sort();
|
|
621
|
+
} catch (error) {
|
|
622
|
+
debugLogger2.error(
|
|
623
|
+
"[buildSystemMessage] Failed to load slash commands:",
|
|
624
|
+
error
|
|
625
|
+
);
|
|
626
|
+
return [];
|
|
627
|
+
} finally {
|
|
628
|
+
controller.abort();
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
__name(loadSlashCommandNames, "loadSlashCommandNames");
|
|
632
|
+
async function buildSystemMessage(config, sessionId, permissionMode) {
|
|
633
|
+
const toolRegistry = config.getToolRegistry();
|
|
634
|
+
const tools = toolRegistry ? toolRegistry.getAllToolNames() : [];
|
|
635
|
+
const mcpServers = config.getMcpServers();
|
|
636
|
+
const mcpServerList = mcpServers ? Object.keys(mcpServers).map((name) => ({
|
|
637
|
+
name,
|
|
638
|
+
status: getMCPServerStatus(name)
|
|
639
|
+
})) : [];
|
|
640
|
+
const slashCommands = await loadSlashCommandNames(config);
|
|
641
|
+
let agentNames = [];
|
|
642
|
+
try {
|
|
643
|
+
const subagentManager = config.getSubagentManager();
|
|
644
|
+
const subagents = await subagentManager.listSubagents();
|
|
645
|
+
agentNames = subagents.map((subagent) => subagent.name);
|
|
646
|
+
} catch (error) {
|
|
647
|
+
debugLogger2.error("[buildSystemMessage] Failed to load subagents:", error);
|
|
648
|
+
}
|
|
649
|
+
const systemMessage = {
|
|
650
|
+
type: "system",
|
|
651
|
+
subtype: "init",
|
|
652
|
+
uuid: sessionId,
|
|
653
|
+
session_id: sessionId,
|
|
654
|
+
cwd: config.getTargetDir(),
|
|
655
|
+
tools,
|
|
656
|
+
mcp_servers: mcpServerList,
|
|
657
|
+
model: config.getModel(),
|
|
658
|
+
permission_mode: permissionMode,
|
|
659
|
+
slash_commands: slashCommands,
|
|
660
|
+
qwen_code_version: config.getCliVersion() || "unknown",
|
|
661
|
+
agents: agentNames
|
|
662
|
+
};
|
|
663
|
+
return systemMessage;
|
|
664
|
+
}
|
|
665
|
+
__name(buildSystemMessage, "buildSystemMessage");
|
|
666
|
+
function isMcpToolProgressData(output) {
|
|
667
|
+
return typeof output === "object" && output !== null && "type" in output && output.type === "mcp_tool_progress";
|
|
668
|
+
}
|
|
669
|
+
__name(isMcpToolProgressData, "isMcpToolProgressData");
|
|
670
|
+
function createToolProgressHandler(request, adapter) {
|
|
671
|
+
const handler = /* @__PURE__ */ __name((_callId, output) => {
|
|
672
|
+
if (isMcpToolProgressData(output) || isShellProgressData(output)) {
|
|
673
|
+
adapter.emitToolProgress(request, output);
|
|
674
|
+
}
|
|
675
|
+
}, "handler");
|
|
676
|
+
return { handler };
|
|
677
|
+
}
|
|
678
|
+
__name(createToolProgressHandler, "createToolProgressHandler");
|
|
679
|
+
function createAgentToolProgressHandler(config, agentToolCallId, adapter) {
|
|
680
|
+
const previousTaskStates = /* @__PURE__ */ new Map();
|
|
681
|
+
const emittedToolUseIds = /* @__PURE__ */ new Set();
|
|
682
|
+
const emittedToolResultIds = /* @__PURE__ */ new Set();
|
|
683
|
+
const buildRequest = /* @__PURE__ */ __name((toolCall) => ({
|
|
684
|
+
callId: toolCall.callId,
|
|
685
|
+
name: toolCall.name,
|
|
686
|
+
args: toolCall.args || {},
|
|
687
|
+
isClientInitiated: true,
|
|
688
|
+
prompt_id: "",
|
|
689
|
+
response_id: void 0
|
|
690
|
+
}), "buildRequest");
|
|
691
|
+
const buildResponse = /* @__PURE__ */ __name((toolCall) => ({
|
|
692
|
+
callId: toolCall.callId,
|
|
693
|
+
error: toolCall.status === "failed" ? new Error(toolCall.error || "Tool execution failed") : void 0,
|
|
694
|
+
errorType: toolCall.status === "failed" ? "execution_failed" /* EXECUTION_FAILED */ : void 0,
|
|
695
|
+
resultDisplay: toolCall.resultDisplay,
|
|
696
|
+
responseParts: toolCall.responseParts || []
|
|
697
|
+
}), "buildResponse");
|
|
698
|
+
const hasResultContent = /* @__PURE__ */ __name((toolCall) => {
|
|
699
|
+
if (typeof toolCall.resultDisplay === "string" && toolCall.resultDisplay.trim().length > 0) {
|
|
700
|
+
return true;
|
|
701
|
+
}
|
|
702
|
+
if (toolCall.responseParts && toolCall.responseParts.length > 0) {
|
|
703
|
+
return true;
|
|
704
|
+
}
|
|
705
|
+
return toolCall.status === "failed";
|
|
706
|
+
}, "hasResultContent");
|
|
707
|
+
const emitToolUseIfNeeded = /* @__PURE__ */ __name((toolCall, fallbackStatus) => {
|
|
708
|
+
if (emittedToolUseIds.has(toolCall.callId)) {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
const toolCallToEmit = fallbackStatus ? {
|
|
712
|
+
...toolCall,
|
|
713
|
+
status: fallbackStatus
|
|
714
|
+
} : toolCall;
|
|
715
|
+
if (toolCallToEmit.status === "executing" || toolCallToEmit.status === "awaiting_approval") {
|
|
716
|
+
if (adapter.processSubagentToolCall) {
|
|
717
|
+
adapter.processSubagentToolCall(toolCallToEmit, agentToolCallId);
|
|
718
|
+
emittedToolUseIds.add(toolCall.callId);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}, "emitToolUseIfNeeded");
|
|
722
|
+
const emitToolResultIfNeeded = /* @__PURE__ */ __name((toolCall) => {
|
|
723
|
+
if (emittedToolResultIds.has(toolCall.callId)) {
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
if (!hasResultContent(toolCall)) {
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
emittedToolResultIds.add(toolCall.callId);
|
|
730
|
+
const request = buildRequest(toolCall);
|
|
731
|
+
const response = buildResponse(toolCall);
|
|
732
|
+
if ("emitToolResult" in adapter && typeof adapter.emitToolResult === "function") {
|
|
733
|
+
adapter.emitToolResult(request, response, agentToolCallId);
|
|
734
|
+
} else {
|
|
735
|
+
adapter.emitToolResult(request, response);
|
|
736
|
+
}
|
|
737
|
+
}, "emitToolResultIfNeeded");
|
|
738
|
+
const processToolCall = /* @__PURE__ */ __name((toolCall, previousCall) => {
|
|
739
|
+
const isCompleted = toolCall.status === "success" || toolCall.status === "failed";
|
|
740
|
+
const isExecuting = toolCall.status === "executing" || toolCall.status === "awaiting_approval";
|
|
741
|
+
const wasExecuting = previousCall && (previousCall.status === "executing" || previousCall.status === "awaiting_approval");
|
|
742
|
+
if (isExecuting) {
|
|
743
|
+
emitToolUseIfNeeded(toolCall);
|
|
744
|
+
} else if (isCompleted && !emittedToolUseIds.has(toolCall.callId)) {
|
|
745
|
+
emitToolUseIfNeeded(toolCall, "executing");
|
|
746
|
+
} else if (wasExecuting && isCompleted) {
|
|
747
|
+
emitToolUseIfNeeded(toolCall, "executing");
|
|
748
|
+
}
|
|
749
|
+
if (isCompleted) {
|
|
750
|
+
emitToolResultIfNeeded(toolCall);
|
|
751
|
+
}
|
|
752
|
+
}, "processToolCall");
|
|
753
|
+
const outputUpdateHandler = /* @__PURE__ */ __name((callId, outputChunk) => {
|
|
754
|
+
if (typeof outputChunk === "object" && outputChunk !== null && "type" in outputChunk && outputChunk.type === "task_execution") {
|
|
755
|
+
const taskDisplay = outputChunk;
|
|
756
|
+
const previous = previousTaskStates.get(callId);
|
|
757
|
+
if (!adapter.processSubagentToolCall || !adapter.emitSubagentErrorResult) {
|
|
758
|
+
previousTaskStates.set(callId, taskDisplay);
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
if (taskDisplay.toolCalls) {
|
|
762
|
+
if (!previous || !previous.toolCalls) {
|
|
763
|
+
for (const toolCall of taskDisplay.toolCalls) {
|
|
764
|
+
processToolCall(toolCall);
|
|
765
|
+
}
|
|
766
|
+
} else {
|
|
767
|
+
for (const toolCall of taskDisplay.toolCalls) {
|
|
768
|
+
const previousCall = previous.toolCalls.find(
|
|
769
|
+
(tc) => tc.callId === toolCall.callId
|
|
770
|
+
);
|
|
771
|
+
processToolCall(toolCall, previousCall);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
if (taskDisplay.status === "failed" || taskDisplay.status === "cancelled") {
|
|
776
|
+
const previousStatus = previous?.status;
|
|
777
|
+
if (previousStatus !== "failed" && previousStatus !== "cancelled" && previousStatus !== void 0) {
|
|
778
|
+
const errorMessage = taskDisplay.terminateReason || (taskDisplay.status === "cancelled" ? "Task was cancelled" : "Task execution failed");
|
|
779
|
+
adapter.emitSubagentErrorResult(errorMessage, 0, agentToolCallId);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if (!previous && taskDisplay.taskPrompt && !config.isInteractive() && (config.getOutputFormat() === "json" /* JSON */ || config.getOutputFormat() === "stream-json" /* STREAM_JSON */)) {
|
|
783
|
+
adapter.emitUserMessage(
|
|
784
|
+
[{ text: taskDisplay.taskPrompt }],
|
|
785
|
+
agentToolCallId
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
previousTaskStates.set(callId, taskDisplay);
|
|
789
|
+
}
|
|
790
|
+
}, "outputUpdateHandler");
|
|
791
|
+
return {
|
|
792
|
+
handler: outputUpdateHandler
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
__name(createAgentToolProgressHandler, "createAgentToolProgressHandler");
|
|
796
|
+
function functionResponsePartsToString(parts) {
|
|
797
|
+
return parts.map((part) => {
|
|
798
|
+
if ("functionResponse" in part) {
|
|
799
|
+
const response = part.functionResponse?.response;
|
|
800
|
+
const content = response?.["output"] ?? response?.["error"] ?? "";
|
|
801
|
+
return content;
|
|
802
|
+
}
|
|
803
|
+
return JSON.stringify(part);
|
|
804
|
+
}).join("");
|
|
805
|
+
}
|
|
806
|
+
__name(functionResponsePartsToString, "functionResponsePartsToString");
|
|
807
|
+
|
|
808
|
+
export {
|
|
809
|
+
handleSlashCommand,
|
|
810
|
+
getAvailableCommands,
|
|
811
|
+
normalizePartList,
|
|
812
|
+
extractPartsFromUserMessage,
|
|
813
|
+
computeUsageFromMetrics,
|
|
814
|
+
buildInitialSystemReminders,
|
|
815
|
+
insertAfterFunctionResponses,
|
|
816
|
+
buildSystemMessage,
|
|
817
|
+
createToolProgressHandler,
|
|
818
|
+
createAgentToolProgressHandler,
|
|
819
|
+
functionResponsePartsToString
|
|
820
|
+
};
|
|
821
|
+
/**
|
|
822
|
+
* @license
|
|
823
|
+
* Copyright 2025 Google LLC
|
|
824
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
825
|
+
*/
|
|
826
|
+
/**
|
|
827
|
+
* @license
|
|
828
|
+
* Copyright 2025 Qwen Team
|
|
829
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
830
|
+
*/
|