@qwen-code/qwen-code 0.21.12-preview.5 → 0.21.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +7 -5
- package/bundled/qc-helper/docs/features/channels/overview.md +1 -1
- package/bundled/qc-helper/docs/features/channels/plugins.md +11 -11
- package/bundled/qc-helper/docs/features/code-review.md +13 -12
- package/bundled/qc-helper/docs/qwen-serve.md +65 -0
- package/bundled/review/SKILL.md +96 -68
- package/chunks/{MaxSizedBox-6STELMXN.js → MaxSizedBox-UQALOVVT.js} +46 -46
- package/chunks/{StandaloneSessionPicker-LXMGCAIF.js → StandaloneSessionPicker-KEGXNUG6.js} +68 -69
- package/chunks/{acp-startup-profiler-TVI2OVUN.js → acp-startup-profiler-NMDXYGDN.js} +2 -2
- package/chunks/{acpAgent-NFRP4O5A.js → acpAgent-XPES32S7.js} +804 -380
- package/chunks/{agent-4AGYD6I6.js → agent-DPTOZFEM.js} +42 -42
- package/chunks/{agent-headless-GH4UIDXU.js → agent-headless-GJCQMURW.js} +42 -42
- package/chunks/{anthropicContentGenerator-ZBBX5VMY.js → anthropicContentGenerator-G7BVXTKN.js} +25 -25
- package/chunks/{artifact-tool-RWJAKYBZ.js → artifact-tool-GEXTOPVO.js} +5 -5
- package/chunks/{askUserQuestion-IQCA2SOX.js → askUserQuestion-B33XRSB7.js} +2 -2
- package/chunks/{bridge-3S4SKXSQ.js → bridge-YNQBAA4Z.js} +48 -48
- package/chunks/{build-RZS65IIX.js → build-GDBLPA24.js} +1 -1
- package/chunks/{channel-management-service-5ZYX4ROW.js → channel-management-service-GWY2GAIC.js} +4 -4
- package/chunks/{channel-settings-store-62E3TWVK.js → channel-settings-store-WNWYFHG7.js} +49 -49
- package/chunks/{channel-worker-group-QFJKXO7R.js → channel-worker-group-7LXCMZ77.js} +6 -6
- package/chunks/{channel-worker-manager-PWD2UURZ.js → channel-worker-manager-RYEME4ZZ.js} +6 -6
- package/chunks/{channel-worker-supervisor-XQJBGFCM.js → channel-worker-supervisor-OEVWBHGT.js} +4 -4
- package/chunks/{chunk-LHOG4E6Y.js → chunk-22C7BQ6D.js} +3 -3
- package/chunks/{chunk-KTWUFHS4.js → chunk-25EYDK42.js} +3 -3
- package/chunks/{chunk-QEWAHAW2.js → chunk-2B2BF7P7.js} +3 -3
- package/chunks/{chunk-2SB4SLKC.js → chunk-2IIJTXYF.js} +1 -3
- package/chunks/{chunk-6LDLDK6E.js → chunk-2M55OBEB.js} +1 -3
- package/chunks/{chunk-V3NMFQD2.js → chunk-3EZLLVDF.js} +2 -2
- package/chunks/{chunk-HUDUANHL.js → chunk-3U3VAL47.js} +1 -1
- package/chunks/{chunk-BKHCW2BI.js → chunk-3VUENPWF.js} +10 -0
- package/chunks/{chunk-XY7DGTIC.js → chunk-45NQKMYB.js} +1 -1
- package/chunks/{chunk-VGGNHRYZ.js → chunk-4PKCUT7F.js} +7 -7
- package/chunks/{chunk-T7YMWGFY.js → chunk-4S5337WV.js} +1491 -711
- package/chunks/{chunk-FVHLDSQS.js → chunk-4W5U2TUT.js} +3 -3
- package/chunks/{chunk-6SU6OW5Z.js → chunk-5CVO7YES.js} +1 -1
- package/chunks/{chunk-OZTGLK53.js → chunk-5EYKMUUY.js} +1 -1
- package/chunks/{chunk-ZRT36RSF.js → chunk-6HY6IF3Z.js} +1 -1
- package/chunks/{chunk-HRAFAUM7.js → chunk-6ORZ2EDC.js} +3 -3
- package/chunks/{chunk-JOVJCXN4.js → chunk-6QFDQMQX.js} +1 -1
- package/chunks/{chunk-CPTIJGUK.js → chunk-6YKYPVDV.js} +4 -4
- package/chunks/{chunk-62OKKUOX.js → chunk-76J3IJ3M.js} +9 -7
- package/chunks/{chunk-JVY7FHUZ.js → chunk-7U5G6JXI.js} +9 -0
- package/chunks/{chunk-TIM7NVEO.js → chunk-7UXUJ5T3.js} +1 -1
- package/chunks/{chunk-YCGXJ4Q3.js → chunk-A267JX7H.js} +6 -6
- package/chunks/{chunk-4JS2QK7P.js → chunk-A4MFR4C5.js} +1 -1
- package/chunks/{chunk-TN3REXN4.js → chunk-A4QRWUDE.js} +79 -36
- package/chunks/{chunk-JW5UEE3V.js → chunk-A6NRNRKE.js} +1 -1
- package/chunks/{chunk-T4G33L3W.js → chunk-AA2BEKV3.js} +3 -3
- package/chunks/{chunk-M3DWLXEO.js → chunk-AFSG32D5.js} +1 -1
- package/chunks/{chunk-R4YAQULI.js → chunk-AS5IN4GK.js} +5 -5
- package/chunks/{chunk-ADJDLEVO.js → chunk-AW27A43Y.js} +9 -11
- package/chunks/{chunk-RIDUB2GC.js → chunk-AW4TRXOC.js} +1 -1
- package/chunks/{chunk-XL6GYJL2.js → chunk-AXN7UPYQ.js} +2 -2
- package/chunks/{chunk-M4NWDIFU.js → chunk-AZQ3DT76.js} +1 -1
- package/chunks/{chunk-OSA2TFDI.js → chunk-BHILXOC3.js} +3 -3
- package/chunks/{chunk-YMIQ24FR.js → chunk-BKPPWD33.js} +2 -2
- package/chunks/{chunk-YMB77M76.js → chunk-BUQDLC2G.js} +59 -0
- package/chunks/{chunk-DXXYMK2U.js → chunk-BVJS5BSP.js} +1 -1
- package/chunks/{chunk-EGB2PIYM.js → chunk-BZ263IKX.js} +1 -1
- package/chunks/{chunk-6OJDN5ZT.js → chunk-CHHABXPE.js} +1 -1
- package/chunks/{chunk-ZPZANKVP.js → chunk-CKSJECTU.js} +4 -4
- package/chunks/{chunk-H6BFLALJ.js → chunk-CPHEPGAO.js} +1 -1
- package/chunks/{chunk-V6PERRH4.js → chunk-CU6GJD55.js} +1 -1
- package/chunks/{chunk-ZZ7RUTJ4.js → chunk-CZBYX5MY.js} +1 -1
- package/chunks/{chunk-2OFDCPMS.js → chunk-DGK6P3BQ.js} +13 -13
- package/chunks/{chunk-NM33GGOM.js → chunk-DGZEMW5R.js} +3 -3
- package/chunks/{chunk-UPUAGRKY.js → chunk-DXIBNLBZ.js} +2 -4
- package/chunks/{chunk-J5SUM3ZJ.js → chunk-E23IPNGS.js} +25 -2
- package/chunks/{chunk-TNETSI2A.js → chunk-E3DYKPYZ.js} +3 -3
- package/chunks/{chunk-3MJ44LNC.js → chunk-EL5SXY3T.js} +265 -138
- package/chunks/{chunk-AFKOAHC3.js → chunk-EZ5RP345.js} +13 -11
- package/chunks/{chunk-PSTHNTHF.js → chunk-FAAUPSY2.js} +1 -1
- package/chunks/{chunk-NW7SPXVG.js → chunk-FDGGZIYW.js} +1 -1
- package/chunks/{chunk-6YSSQFHQ.js → chunk-GGDBMYGZ.js} +5 -5
- package/chunks/{chunk-CDDLHCC2.js → chunk-GMIEIY3Y.js} +5 -5
- package/chunks/{chunk-6JFPUJ2O.js → chunk-GO7STP6N.js} +4 -4
- package/chunks/{chunk-7JL5YBSA.js → chunk-H4A72DE5.js} +1 -1
- package/chunks/{chunk-I3UEXUWJ.js → chunk-HUTNYWBG.js} +2 -2
- package/chunks/{chunk-UQPLUR4A.js → chunk-IA2K2HJE.js} +2 -2
- package/chunks/{chunk-Q7VJUIIB.js → chunk-IGGGG5CX.js} +4104 -1293
- package/chunks/{chunk-VE2UV7IN.js → chunk-IWPYVAO2.js} +4 -4
- package/chunks/{chunk-HAR4G5K2.js → chunk-JNDY2MDR.js} +2 -2
- package/chunks/{chunk-UALXTL5Y.js → chunk-JOOFMXGF.js} +6 -6
- package/chunks/{chunk-HOXEJHJQ.js → chunk-JUEPY766.js} +3 -3
- package/chunks/{chunk-Q7YDKOGY.js → chunk-JVEGA3MM.js} +1 -1
- package/chunks/{chunk-QBJYSIQ4.js → chunk-K3LPAED5.js} +53 -12
- package/chunks/{chunk-UHF5VBKO.js → chunk-KBXKR5R2.js} +1 -1
- package/chunks/{chunk-32SNBMNP.js → chunk-KD5BOPLP.js} +27 -27
- package/chunks/{chunk-67F2BEYW.js → chunk-KV27IEHM.js} +1 -1
- package/chunks/{chunk-DLDVO2NY.js → chunk-LJQAUZMR.js} +360 -174
- package/chunks/{chunk-BNRIQWXW.js → chunk-M732YJPW.js} +7 -7
- package/chunks/{chunk-JRTJEGSP.js → chunk-MA2HEDVP.js} +1 -1
- package/chunks/{chunk-5IW3FJGD.js → chunk-MC4TLKEI.js} +2 -2
- package/chunks/{chunk-2ASWIM4A.js → chunk-MIPFDQAF.js} +1 -1
- package/chunks/{chunk-6GTKI2YX.js → chunk-MLPXSYXR.js} +133 -28
- package/chunks/{chunk-KRXPRVGL.js → chunk-MLXTMF7H.js} +0 -1
- package/chunks/{chunk-NNGCKJAD.js → chunk-MRMJCLIY.js} +3 -3
- package/chunks/{chunk-E7XJWIWC.js → chunk-N5YPT6PH.js} +7 -7
- package/chunks/{chunk-72SKJ3E7.js → chunk-NEFOOD54.js} +3 -3
- package/chunks/{chunk-2U3UCXZ3.js → chunk-NHDR76JX.js} +45 -13
- package/chunks/{chunk-QLFTWYTO.js → chunk-NM5V5OVW.js} +3 -3
- package/chunks/{chunk-N4LVA3S6.js → chunk-NNHNLJ2X.js} +840 -60
- package/chunks/chunk-NYWWQ437.js +24 -0
- package/chunks/{chunk-DGNQ5AFX.js → chunk-O4D7SPJN.js} +2 -2
- package/chunks/{chunk-YY23TR4M.js → chunk-O565M6A4.js} +411 -10
- package/chunks/{chunk-VUTOV2HG.js → chunk-OD2WU5QY.js} +4 -3
- package/chunks/{chunk-B66LYK4B.js → chunk-OMLJNPBE.js} +42 -12
- package/chunks/{chunk-WAF6AR5Y.js → chunk-OOQUVWIG.js} +4 -4
- package/chunks/{chunk-A6GQUQ7I.js → chunk-OVZPVYZB.js} +2 -2
- package/chunks/{chunk-VPZMLGD3.js → chunk-OXCMMLED.js} +5 -5
- package/chunks/{chunk-646ZB2TS.js → chunk-OY5RNSV4.js} +3 -3
- package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
- package/chunks/{chunk-O6SLWH4X.js → chunk-P7MPQI75.js} +2 -2
- package/chunks/{chunk-3HXLH5QV.js → chunk-PP4FUZNV.js} +47 -4
- package/chunks/{chunk-4XX2LZ3E.js → chunk-PQ36L4F5.js} +1 -1
- package/chunks/{chunk-SKRHR6N2.js → chunk-PT4I7NBA.js} +1 -1
- package/chunks/{chunk-KQLW7LLV.js → chunk-QF2NHSPB.js} +603 -66
- package/chunks/{chunk-KK3FEHPJ.js → chunk-QFJ5JHQR.js} +1 -1
- package/chunks/{chunk-N2G4RA77.js → chunk-QIH2HAEN.js} +1 -1
- package/chunks/{chunk-QSWDGAIC.js → chunk-QILD6R27.js} +1 -1
- package/chunks/{chunk-NHZF4VCD.js → chunk-QNQAPSN2.js} +1 -1
- package/chunks/{chunk-6DH5YA3X.js → chunk-QRCNA3SR.js} +8 -8
- package/chunks/{chunk-3RC5Q66G.js → chunk-QV5YN5YD.js} +7 -5
- package/chunks/{chunk-7TKNMQ6L.js → chunk-RIAABG2K.js} +2 -2
- package/chunks/{chunk-LYRA6ZTI.js → chunk-RLKC46YT.js} +138 -11
- package/chunks/{chunk-YI5G32RU.js → chunk-ROIYNTHJ.js} +3 -3
- package/chunks/{chunk-UAAWNTOC.js → chunk-RVOJ2FBP.js} +12 -12
- package/chunks/{chunk-SNHBRO4C.js → chunk-RWDNJBWN.js} +2 -2
- package/chunks/{chunk-UFHPAMAV.js → chunk-S5DWMTHO.js} +11 -1
- package/chunks/{chunk-TROB4PZY.js → chunk-SG7ZP5PG.js} +4 -4
- package/chunks/{chunk-E74YSVIN.js → chunk-SXCOEJO4.js} +1 -1
- package/chunks/{chunk-U5C2GIN2.js → chunk-TIGA2IVL.js} +117 -3
- package/chunks/chunk-TS6625XH.js +488 -0
- package/chunks/{chunk-EHXS5MAC.js → chunk-TUGSVUJB.js} +7 -7
- package/chunks/{chunk-E3GLDLYB.js → chunk-TYAMGABM.js} +0 -6
- package/chunks/{chunk-ZLX7FTZQ.js → chunk-U3VNBPUO.js} +3 -3
- package/chunks/{chunk-F7PTQFTB.js → chunk-UKMR3CKV.js} +4 -4
- package/chunks/{chunk-7WUMS2UA.js → chunk-UPDOZBWO.js} +1 -1
- package/chunks/{chunk-YK4O72LT.js → chunk-UZPM4XHR.js} +4 -4
- package/chunks/{chunk-VKEA37IR.js → chunk-V26NVGAU.js} +1 -1
- package/chunks/{chunk-IJCZP2MA.js → chunk-V57QC6WW.js} +3 -3
- package/chunks/{chunk-LSMCI42W.js → chunk-WFSTRPRO.js} +3 -3
- package/chunks/{chunk-5KZNWF2M.js → chunk-WGHHA7ZH.js} +1 -1
- package/chunks/{chunk-A4BAHMJF.js → chunk-WSH6GRKG.js} +4 -4
- package/chunks/{chunk-OK727E5D.js → chunk-X26JYGTD.js} +1 -1
- package/chunks/{chunk-VAPNUDD5.js → chunk-XHRY7BXD.js} +4 -4
- package/chunks/{chunk-XNL23MGG.js → chunk-XIT3GURH.js} +3 -3
- package/chunks/{chunk-2RTRFLWH.js → chunk-XLLKYULU.js} +6 -6
- package/chunks/{chunk-C2DR57L6.js → chunk-XUJNK7Y6.js} +1 -1
- package/chunks/{chunk-AAZWJAPQ.js → chunk-Y3YCSWG5.js} +2 -2
- package/chunks/{chunk-ZTBFA7I6.js → chunk-YEYY7TEP.js} +7 -7
- package/chunks/{chunk-FTGU6G45.js → chunk-YZHRN3CF.js} +2 -2
- package/chunks/{chunk-2N6CV4PW.js → chunk-YZOSNW4R.js} +1 -1
- package/chunks/{chunk-U7ROFHSH.js → chunk-ZLCT4C5A.js} +1 -1
- package/chunks/{chunk-VBKTP7TH.js → chunk-ZYBBISBY.js} +15 -34
- package/chunks/{chunk-7ATQGA6V.js → chunk-ZYYTZUI2.js} +6 -6
- package/chunks/{chunk-RXX5T3IF.js → chunk-ZZO74WKW.js} +44 -8
- package/chunks/{computer-use-ZFBJYSR3.js → computer-use-77C5FHMW.js} +45 -45
- package/chunks/{config-utils-7JZQN6L2.js → config-utils-IVHRSXWI.js} +4 -4
- package/chunks/{contextCommand-G3TAIY7T.js → contextCommand-PJ77GBWL.js} +44 -44
- package/chunks/{core-runtime-K3MQVNSF.js → core-runtime-7VMIKUTG.js} +42 -42
- package/chunks/{create-sub-session-DMTLJPDG.js → create-sub-session-2L5MQRN4.js} +42 -42
- package/chunks/{create-sub-session-23ULO5PO.js → create-sub-session-KRQULJE6.js} +2 -2
- package/chunks/{cron-create-5WUTNKNF.js → cron-create-H7UEPDSN.js} +4 -4
- package/chunks/{cron-delete-JEQ27YPS.js → cron-delete-6SZK7YFM.js} +4 -4
- package/chunks/{cron-list-IXGCA7UR.js → cron-list-H25JIHEZ.js} +4 -4
- package/chunks/{daemon-UBVOQMWY.js → daemon-2KTG7ZBN.js} +108 -9
- package/chunks/daemon-git-worktree-guard-DXYIMWFT.js +2062 -0
- package/chunks/{daemon-status-provider-KFLEZGD7.js → daemon-status-provider-ZDOYJCU6.js} +52 -53
- package/chunks/{daemon-trust-policy-ZZ6DRDAC.js → daemon-trust-policy-E67OYUK2.js} +48 -48
- package/chunks/{daemon-trust-policy-monitor-CIKHNV2K.js → daemon-trust-policy-monitor-RYYGCQ3J.js} +48 -48
- package/chunks/{deferred-core-runtime-MM7X7UYR.js → deferred-core-runtime-3SGXFXEQ.js} +44 -44
- package/chunks/{devtools-X6ROTKHE.js → devtools-4QFYJT6U.js} +1 -1
- package/chunks/discovery-ORA5J7YP.js +27 -0
- package/chunks/{display-image-CAD7RAUM.js → display-image-ON3EYFRD.js} +4 -4
- package/chunks/{dist-B3ODKYEB.js → dist-4ZPG4BY6.js} +2 -2
- package/chunks/{dist-CCUH2Z4C.js → dist-BROOP2EG.js} +1 -1
- package/chunks/{dist-DANKRAB3.js → dist-IYYN3RUT.js} +2 -2
- package/chunks/{dist-5VDE7U3A.js → dist-JWMKPWT5.js} +3 -1
- package/chunks/{dist-6RK4U6VU.js → dist-K7IQB53U.js} +1 -1
- package/chunks/{dist-EZHCZSW6.js → dist-MAQXAQ2Y.js} +1 -1
- package/chunks/{dist-362MN6CP.js → dist-WJ4BHIEW.js} +2 -2
- package/chunks/{dist-M3XMEIP2.js → dist-YEPL4RAW.js} +1 -1
- package/chunks/{earlyInputCapture-O77TUBIF.js → earlyInputCapture-KJMLFVQV.js} +43 -43
- package/chunks/{edit-CZ23AVP6.js → edit-I4LQFAEC.js} +50 -49
- package/chunks/{enter-worktree-4EMS7IRL.js → enter-worktree-YNPOJSRH.js} +47 -47
- package/chunks/{enterPlanMode-TS6KO6DU.js → enterPlanMode-XCPK62ER.js} +47 -47
- package/chunks/{environment-7JAXEU6I.js → environment-S7CTIHMX.js} +44 -44
- package/chunks/{errors-NBABPF4S.js → errors-7HB2AIDS.js} +44 -44
- package/chunks/{exit-worktree-Q3NFHYUI.js → exit-worktree-AIIY7SR6.js} +47 -47
- package/chunks/{exitPlanMode-4JH6WLKL.js → exitPlanMode-R4JY7V2O.js} +42 -42
- package/chunks/{external-tool-guard-provider-5HTGOPGU.js → external-tool-guard-provider-TE4DRY36.js} +1 -1
- package/chunks/{fast-path-5LFDLPHJ.js → fast-path-NDJV3ZFJ.js} +3 -3
- package/chunks/{gemini-MB4S7YLN.js → gemini-RSUFP5OE.js} +108 -103
- package/chunks/{geminiContentGenerator-EQY2QU7K.js → geminiContentGenerator-SQ5XBPZ7.js} +11 -11
- package/chunks/{glob-LA5XO2H7.js → glob-J4RUJAHX.js} +49 -49
- package/chunks/{goal-tools-LQFO4BRY.js → goal-tools-VHTNVOKK.js} +56 -12
- package/chunks/{grep-KYBZMY36.js → grep-VJWPLFOT.js} +47 -47
- package/chunks/{handleAutoUpdate-HZJSAUNC.js → handleAutoUpdate-POCX2MNB.js} +46 -46
- package/chunks/{i18n-BSCIN4J4.js → i18n-RM5YOICI.js} +43 -43
- package/chunks/{image-gen-HGURQAHX.js → image-gen-EXECB5XM.js} +11 -11
- package/chunks/{initializer-WUHJXIB3.js → initializer-Z2AFGBNR.js} +49 -49
- package/chunks/{installationInfo-G3PDBWG2.js → installationInfo-4I5FXNMH.js} +43 -43
- package/chunks/{keychain-token-storage-GU75J2T2.js → keychain-token-storage-3XFJ5ZB2.js} +2 -2
- package/chunks/{list-IC7KDSZ6.js → list-ZMBFIGZA.js} +51 -51
- package/chunks/{list-agents-5PNMK2AM.js → list-agents-OSVDFI6S.js} +2 -2
- package/chunks/{loadedSettingsAdapter-Z3GOJRI7.js → loadedSettingsAdapter-T6TV4YJ7.js} +48 -48
- package/chunks/{loggingContentGenerator-E2QENFPH.js → loggingContentGenerator-WF4ZOJEZ.js} +99 -66
- package/chunks/{loop-wakeup-OV65FEGR.js → loop-wakeup-WQS6JYAG.js} +5 -5
- package/chunks/{ls-RPRSX26R.js → ls-D3HUFHDP.js} +6 -6
- package/chunks/{lsp-IWTJWFLT.js → lsp-3QDDJTCS.js} +2 -2
- package/chunks/{managed-npm-update-MX2OPCW4.js → managed-npm-update-E7IW6N7V.js} +43 -43
- package/chunks/{mcp-QQEWPNWV.js → mcp-6UNYX4HG.js} +48 -48
- package/chunks/{monitor-SV64FNV3.js → monitor-EE2UYMGE.js} +47 -47
- package/chunks/{node-YSOU44FX.js → node-UUDY34IG.js} +3 -3
- package/chunks/nonInteractiveCli-WAY237O4.js +163 -0
- package/chunks/{notebook-edit-QPYSWPRI.js → notebook-edit-NTDY4QDU.js} +47 -47
- package/chunks/{openaiContentGenerator-CMZXOSVA.js → openaiContentGenerator-YNFVJMRJ.js} +30 -30
- package/chunks/{pidfile-D5UXVVAI.js → pidfile-4XSFLYBZ.js} +43 -43
- package/chunks/{processUtils-ZEIMIVPX.js → processUtils-WDA2MJFD.js} +2 -2
- package/chunks/proper-lockfile-3LHWIM44.js +8 -0
- package/chunks/{qwenContentGenerator-JAXZKB7R.js → qwenContentGenerator-434M7QKY.js} +50 -50
- package/chunks/{qwenOAuth2-C2QWTD2G.js → qwenOAuth2-GMYZOO6A.js} +10 -10
- package/chunks/{read-file-2V5GE6ZW.js → read-file-TAFBKMNI.js} +11 -11
- package/chunks/{read-mcp-resource-THCSZHXO.js → read-mcp-resource-XD54ZQMC.js} +2 -2
- package/chunks/{record-artifact-76YYQA5F.js → record-artifact-SEYFJEJF.js} +3 -3
- package/chunks/{resumeHistoryUtils-UZ7GHPNY.js → resumeHistoryUtils-EVG3WYK2.js} +50 -50
- package/chunks/{ripGrep-MUTMPQSV.js → ripGrep-WOEK2PXS.js} +42 -42
- package/chunks/{run-qwen-serve-WU43JKEA.js → run-qwen-serve-3QSGRXAN.js} +417 -208
- package/chunks/{runtime-YLOFDP2P.js → runtime-5MLLZ7DC.js} +53 -53
- package/chunks/{scheduler-G44OPSZE.js → scheduler-RPBJ63CH.js} +44 -44
- package/chunks/{sdk-exporters-grpc-4QKV6MCX.js → sdk-exporters-grpc-54L4LS5L.js} +2 -2
- package/chunks/{sdk-exporters-http-A7XLKZO7.js → sdk-exporters-http-XUVP63H6.js} +12 -12
- package/chunks/{sdk-impl-XO4UF6PR.js → sdk-impl-YXUEN2Z2.js} +8 -8
- package/chunks/{send-message-P5SLP57G.js → send-message-VZENRWRH.js} +6 -6
- package/chunks/{serve-CZQDBDYV.js → serve-HS3XLPXU.js} +50 -50
- package/chunks/{server-HGI2KF3Y.js → server-TC4A7AAZ.js} +3850 -1630
- package/chunks/{session-OVMSHAO5.js → session-UBOFXVMN.js} +92 -95
- package/chunks/{settings-TWX6ROGP.js → settings-D5644OM5.js} +47 -47
- package/chunks/{shell-JDSWGVC7.js → shell-3PZULQQV.js} +42 -42
- package/chunks/{skill-QILHTMYJ.js → skill-PEVVXQ3L.js} +22 -22
- package/chunks/{skill-settings-RKRD34RZ.js → skill-settings-J65JKKES.js} +47 -47
- package/chunks/{spawnChannel-V5PYSDEI.js → spawnChannel-IYGXRHSQ.js} +45 -47
- package/chunks/{standalone-update-Y52CWCGG.js → standalone-update-IFM53PE7.js} +44 -44
- package/chunks/{startInteractiveUI-RVA62ZM6.js → startInteractiveUI-3AVH7L6H.js} +3340 -2460
- package/chunks/{syntheticOutput-SEW4NA47.js → syntheticOutput-7GWFIDXT.js} +3 -3
- package/chunks/{task-create-247EAVF7.js → task-create-FCBDX7UH.js} +12 -12
- package/chunks/{task-list-ZJN4QHLK.js → task-list-YIYIUFUA.js} +6 -6
- package/chunks/{task-stop-MAYQJ42I.js → task-stop-X37KYTKB.js} +2 -2
- package/chunks/{task-update-SU5TMZGG.js → task-update-MYPFVOVM.js} +12 -12
- package/chunks/{team-create-YMWUDIE3.js → team-create-ZAIA7KAV.js} +47 -47
- package/chunks/{team-delete-3XVRPQBP.js → team-delete-6UMU4XLS.js} +6 -6
- package/chunks/{team-plan-approval-3GPZAW46.js → team-plan-approval-UNIUS7OD.js} +47 -47
- package/chunks/{terminal-image-renderer-UGQKWDM3.js → terminal-image-renderer-G343P2RV.js} +44 -44
- package/chunks/{theme-manager-KRG4GGFY.js → theme-manager-Z3RIT7DB.js} +43 -43
- package/chunks/{todoWrite-IE2YTCK7.js → todoWrite-U2R4NVF4.js} +4 -4
- package/chunks/{tool-search-SZRO5G72.js → tool-search-5R2OE4C7.js} +17 -17
- package/chunks/{total-session-admission-JYHYOKWX.js → total-session-admission-4KBHMQQ2.js} +48 -48
- package/chunks/{trustedFolders-2BDCB5NJ.js → trustedFolders-LK6T4XC7.js} +43 -43
- package/chunks/{update-relaunch-XSYVPSDL.js → update-relaunch-UBKROIC6.js} +5 -5
- package/chunks/{updateCheck-SMMJ27GG.js → updateCheck-W4Y2GFSD.js} +45 -45
- package/chunks/{useAutoAcceptIndicator-HPG4UFIZ.js → useAutoAcceptIndicator-C7BEICBF.js} +51 -51
- package/chunks/{validateNonInterActiveAuth-IIL774NT.js → validateNonInterActiveAuth-LTEI2TB6.js} +84 -86
- package/chunks/{version-WSGAB2PA.js → version-G5A5DGVS.js} +1 -1
- package/chunks/{web-fetch-LKC2F5DM.js → web-fetch-RTEQTR5Z.js} +20 -20
- package/chunks/{web-search-BHMAMXEU.js → web-search-5OXHEZPV.js} +16 -16
- package/chunks/{workflow-A7AQ52HO.js → workflow-ISQJHPG2.js} +54 -53
- package/chunks/{workspace-providers-status-JRT57TLL.js → workspace-providers-status-2ZPZPUPZ.js} +51 -51
- package/chunks/{workspace-registration-store-EACJNCM5.js → workspace-registration-store-CYNY6IP6.js} +2 -2
- package/chunks/{workspace-registry-OV5SI4ES.js → workspace-registry-34GTUUHB.js} +50 -49
- package/chunks/{workspace-service-PUHU4EEK.js → workspace-service-XCDQLE2Y.js} +53 -53
- package/chunks/{workspace-skills-status-YAJE3UW3.js → workspace-skills-status-RS4O7AIJ.js} +49 -49
- package/chunks/{workspace-trust-reconciler-JP5UR2H6.js → workspace-trust-reconciler-AYGXC7A3.js} +57 -56
- package/chunks/{write-file-UBIHUP5M.js → write-file-EWXKVVXF.js} +42 -42
- package/chunks/{zoom-image-4QTKAMTP.js → zoom-image-4BFYJ3HG.js} +11 -11
- package/cli.js +18 -17
- package/package.json +3 -3
- package/web-shell/assets/{arc-lZ04kynw.js → arc-CgOpDKvm.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B1wZVhzD.js → architectureDiagram-3BPJPVTR-0Ag_m34F.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CO0e0yJt.js → blockDiagram-GPEHLZMM-IwTwFau0.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Dfpo6Qie.js → c4Diagram-AAUBKEIU-DLa5GUv8.js} +1 -1
- package/web-shell/assets/channel-BrGVBa2L.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-BvxArftT.js → chunk-2J33WTMH-DcYP-WFG.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BS2XXjGY.js → chunk-4BX2VUAB-C8MVPMiQ.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-CYL6h3Ph.js → chunk-55IACEB6-BUi4Yfv3.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-C-cWPX30.js → chunk-727SXJPM-Cy3Su2YY.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CJLxNbVV.js → chunk-AQP2D5EJ-Dp8Teqv6.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DwfzKywA.js → chunk-FMBD7UC4-BDTDM-4j.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BI5raYHQ.js → chunk-ND2GUHAM-7HfDt0r2.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-_GkNI90J.js → chunk-QZHKN3VN-BIBU0uCF.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BAVLNxh9.js → cose-bilkent-S5V4N54A-DRLdcg9p.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BD4XNLqp.js → dagre-BM42HDAG-DCCgDwqW.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-WO567p8w.js → diagram-2AECGRRQ-CsBTBmk3.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-mAk23VWO.js → diagram-5GNKFQAL-C9qjH8Lt.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-YQEeHKze.js → diagram-KO2AKTUF-Brjs_lj2.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-CMVjxAjv.js → diagram-LMA3HP47-DtiWCl_F.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-42hPvbM-.js → diagram-OG6HWLK6-DmfKLkBT.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CXU_cPfu.js → erDiagram-TEJ5UH35-Bve_4deH.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-D-3TdhMT.js → flowDiagram-I6XJVG4X-C2_kXCcV.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CsgkXolz.js → ganttDiagram-6RSMTGT7-BSBIjiTF.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-B6Q3PBLD.js → gitGraphDiagram-PVQCEYII-CyebwI55.js} +1 -1
- package/web-shell/assets/index-CIDsgxTe.js +1792 -0
- package/web-shell/assets/index-DiQnWi_E.css +5 -0
- package/web-shell/assets/{index-BFrkGj2B.js → index-d0yfnV1M.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-jiAfSXp8.js → infoDiagram-5YYISTIA-CSDGnWxU.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BWif5KeJ.js → ishikawaDiagram-YF4QCWOH-BK4jU13p.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-B-GAZthS.js → journeyDiagram-JHISSGLW-D_W6j-oF.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-9TEuATdL.js → kanban-definition-UN3LZRKU-C7xf-SdC.js} +1 -1
- package/web-shell/assets/{linear-dy_QPfyE.js → linear-DQmzxpxd.js} +1 -1
- package/web-shell/assets/{mermaid.core-DB2uLAnq.js → mermaid.core-9P7AGOLG.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-ey_dyxi-.js → mindmap-definition-RKZ34NQL-DgcgMyPk.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-_6BuMdDj.js → pieDiagram-4H26LBE5-3wWGb9eG.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-B2rM19W2.js → quadrantDiagram-W4KKPZXB-BeCXnQw9.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DWj8b7vW.js → requirementDiagram-4Y6WPE33-Bi1UOHDz.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D5dtYh0N.js → sankeyDiagram-5OEKKPKP-lrLUjjbb.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DVkdn_qW.js → sequenceDiagram-3UESZ5HK-BFuqKz6Q.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-DgwD_fi6.js → stateDiagram-AJRCARHV-8DemQLhu.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-vNr_1UNX.js → timeline-definition-PNZ67QCA-uzEuVQXg.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-ChFcGAcu.js → vennDiagram-CIIHVFJN-BQTeZ_-o.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-C8PXoSWk.js → wardley-L42UT6IY-B6yM5Im7.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-C2nqOV6i.js → wardleyDiagram-YWT4CUSO-ChM8bmgn.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BntaqhSB.js → xychartDiagram-2RQKCTM6-oNG6HyB1.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-5PLOQW7H.js +0 -830
- package/chunks/chunk-DMODRHNL.js +0 -649
- package/chunks/chunk-L34XSHIZ.js +0 -28
- package/chunks/chunk-N2TNM3QB.js +0 -9
- package/chunks/chunk-RECPKBBD.js +0 -622
- package/chunks/chunk-WLML6VIA.js +0 -18
- package/chunks/chunk-ZBBVBZBR.js +0 -137
- package/chunks/chunk-bdqvmfwv-OHYAFAAO.js +0 -17446
- package/chunks/discovery-XLHITE74.js +0 -220
- package/chunks/dispatch-FW7DX2CR.js +0 -43
- package/chunks/nonInteractiveCli-3XFIFXBR.js +0 -166
- package/chunks/opentui-entry-TEHHLGN7.js +0 -52419
- package/chunks/runtime-gate-T4ICWGQJ.js +0 -89
- package/chunks/wrapper-46Z24CTM.js +0 -35
- package/web-shell/assets/channel-BxvRq3pV.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-tL8nAxYf.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-tL8nAxYf.js +0 -1
- package/web-shell/assets/index-BgjULKyF.css +0 -5
- package/web-shell/assets/index-CxXlPYfl.js +0 -1789
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BWGkVGVB.js +0 -1
- /package/chunks/{chunk-44CTCCLY.js → chunk-NWNEANAT.js} +0 -0
package/chunks/chunk-5PLOQW7H.js
DELETED
|
@@ -1,830 +0,0 @@
|
|
|
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-N4LVA3S6.js";
|
|
18
|
-
import {
|
|
19
|
-
computeSessionStats
|
|
20
|
-
} from "./chunk-DGNQ5AFX.js";
|
|
21
|
-
import {
|
|
22
|
-
t
|
|
23
|
-
} from "./chunk-I3UEXUWJ.js";
|
|
24
|
-
import {
|
|
25
|
-
Logger,
|
|
26
|
-
getArenaSystemReminder,
|
|
27
|
-
getPlanModeSystemReminder
|
|
28
|
-
} from "./chunk-T7YMWGFY.js";
|
|
29
|
-
import {
|
|
30
|
-
getMCPServerStatus,
|
|
31
|
-
recordSkillInvocation,
|
|
32
|
-
uiTelemetryService
|
|
33
|
-
} from "./chunk-UAAWNTOC.js";
|
|
34
|
-
import {
|
|
35
|
-
isShellProgressData
|
|
36
|
-
} from "./chunk-ZRT36RSF.js";
|
|
37
|
-
import {
|
|
38
|
-
createDebugLogger
|
|
39
|
-
} from "./chunk-YMB77M76.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
|
-
*/
|