@qwen-code/qwen-code 0.21.2 → 0.21.3-nightly.20260803.e1e5b42ce
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 +53 -38
- package/bundled/qc-helper/docs/features/channels/github.md +16 -5
- package/bundled/qc-helper/docs/features/channels/gitlab.md +6 -0
- package/bundled/qc-helper/docs/features/code-review.md +92 -24
- package/bundled/qc-helper/docs/features/commands.md +46 -38
- package/bundled/qc-helper/docs/features/hooks.md +115 -18
- package/bundled/qc-helper/docs/features/memory.md +27 -0
- package/bundled/qc-helper/docs/features/skills.md +46 -1
- package/bundled/qc-helper/docs/features/sub-agents.md +42 -9
- package/bundled/qc-helper/docs/features/tool-use-summaries.md +7 -7
- package/bundled/qc-helper/docs/qwen-serve.md +46 -25
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +62 -31
- package/bundled/qc-helper/docs/support/troubleshooting.md +6 -1
- package/bundled/review/DESIGN.md +167 -32
- package/bundled/review/SKILL.md +207 -38
- package/chunks/{MaxSizedBox-TQBQ247P.js → MaxSizedBox-FCEK5P5K.js} +41 -38
- package/chunks/{StandaloneSessionPicker-2HPTKCLX.js → StandaloneSessionPicker-AT77J3PM.js} +63 -59
- package/chunks/{acp-startup-profiler-2C4A5ZTJ.js → acp-startup-profiler-3RICG2YW.js} +2 -2
- package/chunks/{acpAgent-PS6EDGH3.js → acpAgent-PBMKZ5KH.js} +664 -560
- package/chunks/{agent-VDOUB35F.js → agent-55W5BPK3.js} +37 -34
- package/chunks/{agent-headless-EO53EFS2.js → agent-headless-I7VMHI22.js} +37 -34
- package/chunks/{anthropicContentGenerator-OFHSZJBF.js → anthropicContentGenerator-3CAHEZBM.js} +341 -29
- package/chunks/{artifact-tool-RDN2W7ND.js → artifact-tool-TBOYEKTY.js} +2 -2
- package/chunks/{askUserQuestion-OZERWH5R.js → askUserQuestion-23Y5WZFJ.js} +2 -2
- package/chunks/{bridge-W7AZSRZQ.js → bridge-XNAWEDAN.js} +43 -40
- package/chunks/{ca-6W3SK7OQ.js → ca-NYKNH222.js} +50 -5
- package/chunks/{channel-management-service-5S7YCWX5.js → channel-management-service-UHX56NBO.js} +7 -7
- package/chunks/{channel-settings-store-JFVRSNER.js → channel-settings-store-7P6RJSSF.js} +44 -41
- package/chunks/{channel-worker-group-OVWGYMZS.js → channel-worker-group-NDG4WOOZ.js} +8 -8
- package/chunks/{channel-worker-manager-H55GKOQA.js → channel-worker-manager-ZCW6UW34.js} +8 -8
- package/chunks/{channel-worker-supervisor-CABBXYHK.js → channel-worker-supervisor-ATGFTZRN.js} +4 -4
- package/chunks/{chunk-6MPDY6ZG.js → chunk-24ER7UV4.js} +1 -1
- package/chunks/{chunk-QDK4F2N5.js → chunk-2DNKEBXY.js} +1 -1
- package/chunks/{chunk-AUOULH6Q.js → chunk-2GF3IDEK.js} +1610 -2196
- package/chunks/{chunk-JYBU6YUE.js → chunk-2M5N3DHY.js} +1 -1
- package/chunks/{chunk-LHKCY7DY.js → chunk-2UISUFHQ.js} +3 -3
- package/chunks/{chunk-BBIQAX4V.js → chunk-2ZCYE3F2.js} +30 -18
- package/chunks/{chunk-GJ2GBPBD.js → chunk-332FMXSD.js} +5 -5
- package/chunks/{chunk-JXVC2PL3.js → chunk-33FNCQSY.js} +2 -2
- package/chunks/{chunk-P755N4CS.js → chunk-3GALLNII.js} +6 -6
- package/chunks/{chunk-YANIWTRZ.js → chunk-3ICGQSVO.js} +1 -1
- package/chunks/{chunk-NBD76HUW.js → chunk-3LGZEYOF.js} +2 -2
- package/chunks/{chunk-E2BHWIDT.js → chunk-3RXUYQJI.js} +6 -2
- package/chunks/{chunk-E5Z2AVNV.js → chunk-3SH53ANB.js} +0 -11
- package/chunks/{chunk-N4ACHWNH.js → chunk-432XCUHF.js} +1 -1
- package/chunks/{chunk-JLZ3RBQG.js → chunk-44EJDGMS.js} +144 -11
- package/chunks/{chunk-KR32NIAN.js → chunk-4JP34TZ6.js} +10 -10
- package/chunks/{chunk-L2E5GFAG.js → chunk-4LKVQFHM.js} +2 -2
- package/chunks/{chunk-YDLJGZHL.js → chunk-4NFY2S7N.js} +0 -33
- package/chunks/{chunk-NHFEMWAZ.js → chunk-5WY5QEM6.js} +1 -1
- package/chunks/{chunk-56Z7QEAQ.js → chunk-6BUPGI3J.js} +16 -16
- package/chunks/{chunk-H6I4PGRV.js → chunk-6DNHLK7F.js} +4 -4
- package/chunks/{chunk-XQK4XXTN.js → chunk-6O5DVH27.js} +1 -1
- package/chunks/{chunk-2RFKHEXL.js → chunk-6PLDPT2C.js} +1 -1
- package/chunks/{chunk-Q5WZTTWE.js → chunk-7UPJXZLD.js} +6 -8
- package/chunks/{chunk-CBBP4BMC.js → chunk-7UXI6P72.js} +82 -207
- package/chunks/{chunk-6CQWRWUC.js → chunk-7XLPYF6B.js} +3 -3
- package/chunks/{chunk-VEMNQMHA.js → chunk-7ZH55K26.js} +5 -13
- package/chunks/{chunk-JJPKFJBT.js → chunk-A2FOI762.js} +3 -3
- package/chunks/{chunk-LYI2PZDK.js → chunk-A5LNZGJB.js} +2 -2
- package/chunks/{chunk-3APUUXRF.js → chunk-A5YZ3FA2.js} +2 -1
- package/chunks/{chunk-SHN4KHDK.js → chunk-A6SX5TAH.js} +3 -3
- package/chunks/{chunk-QCXGC7QB.js → chunk-A7PONO5G.js} +3 -3
- package/chunks/{chunk-SZ3KHTDR.js → chunk-AKA24BGO.js} +1 -1
- package/chunks/{chunk-RSVPYAGK.js → chunk-B4HXOGF5.js} +5 -5
- package/chunks/{chunk-D6MDRSZ6.js → chunk-BBXSRVSN.js} +22 -11
- package/chunks/{chunk-Q3T5KA2V.js → chunk-BFHXDAR7.js} +1 -1
- package/chunks/{chunk-L55JWS76.js → chunk-BGXZBI5B.js} +1 -1
- package/chunks/{chunk-2KKCCLPT.js → chunk-C4IUDGPI.js} +1 -1
- package/chunks/{chunk-MM7TH7ZM.js → chunk-CFDR3GNL.js} +18 -3
- package/chunks/{chunk-3F2WDAV6.js → chunk-CFVFQWFB.js} +14 -14
- package/chunks/{chunk-E2FN6SM7.js → chunk-CIUUYB23.js} +5 -5
- package/chunks/{chunk-JCJ7LKNA.js → chunk-DIEFUBV6.js} +1644 -1570
- package/chunks/{chunk-KWHKHSIS.js → chunk-DTAPI453.js} +8 -8
- package/chunks/{chunk-WWCMSZII.js → chunk-DV2GAGR7.js} +71 -7
- package/chunks/{chunk-675H6PLP.js → chunk-DYA25Y7U.js} +1 -1
- package/chunks/{chunk-3I6DUGQD.js → chunk-E4WHKETF.js} +32 -4
- package/chunks/{chunk-QTERJVPZ.js → chunk-EKTCKZV5.js} +1 -0
- package/chunks/{chunk-HX6RLYUO.js → chunk-ENOHFX2M.js} +4 -4
- package/chunks/{chunk-VMX5RZQH.js → chunk-EZZJHMFK.js} +18 -9
- package/chunks/{chunk-KXDONCPU.js → chunk-FBDRTW3I.js} +4 -4
- package/chunks/{chunk-FCYYAB4S.js → chunk-FHPKHXHT.js} +3 -3
- package/chunks/{chunk-DQ2O5QOJ.js → chunk-FJZS2MXB.js} +1 -1
- package/chunks/{chunk-EQNUDTL6.js → chunk-FVLPZSKH.js} +3 -3
- package/chunks/{chunk-2LEOZTBT.js → chunk-FYMMZV5F.js} +111 -26
- package/chunks/{chunk-UV6KF7T3.js → chunk-GNZ7MX73.js} +3 -3
- package/chunks/chunk-GOFAQQZA.js +132 -0
- package/chunks/{chunk-YUFIEIWC.js → chunk-GTM6IHBB.js} +2 -2
- package/chunks/{chunk-W3UKBMSI.js → chunk-GU5B6IF3.js} +118 -9
- package/chunks/{chunk-PCK4B6LR.js → chunk-GU5XWZU2.js} +1 -1
- package/chunks/{chunk-DEEABGH2.js → chunk-H2EDCJIM.js} +5954 -1766
- package/chunks/{chunk-FJ5WUMUQ.js → chunk-H36SETQS.js} +1 -1
- package/chunks/{chunk-6FMJLI5M.js → chunk-HFVW54NL.js} +41 -6
- package/chunks/chunk-HGCQ5SE7.js +136 -0
- package/chunks/{chunk-OFZKFPYG.js → chunk-HR4CHEQS.js} +3 -3
- package/chunks/{chunk-CO2U743O.js → chunk-I3GX6LGS.js} +4 -4
- package/chunks/{chunk-5NNHICSA.js → chunk-I7JDGNG6.js} +3 -3
- package/chunks/{chunk-RDJOB6S3.js → chunk-IEBT6DXF.js} +1 -1
- package/chunks/{chunk-EU5TBFJI.js → chunk-IV7QPMC2.js} +2 -2
- package/chunks/{chunk-B4AJNNOL.js → chunk-J26HHFI5.js} +1 -1
- package/chunks/{chunk-CNTR4GR6.js → chunk-JELIWHXD.js} +1 -1
- package/chunks/{chunk-FNDXMN7I.js → chunk-JQFMW7BD.js} +936 -223
- package/chunks/{chunk-IGTHU3T4.js → chunk-KKN2IE7Q.js} +1 -1
- package/chunks/{chunk-TZTAV5RH.js → chunk-KVUBYJDM.js} +2 -2
- package/chunks/{chunk-DUNI4EBW.js → chunk-KZXSAQYV.js} +86 -52
- package/chunks/chunk-LBOVL47Y.js +29 -0
- package/chunks/{chunk-FS674JW4.js → chunk-LBWNSLJK.js} +3 -3
- package/chunks/{chunk-I5BT7ADR.js → chunk-LEZFUYPM.js} +4 -4
- package/chunks/chunk-LLMGP5IC.js +222 -0
- package/chunks/{chunk-44F4LBWZ.js → chunk-LVW7BHTW.js} +56 -18
- package/chunks/{chunk-YGE3IXJP.js → chunk-M744OFVE.js} +1 -1
- package/chunks/chunk-MISUEWB4.js +8749 -0
- package/chunks/{chunk-7SJN2IWT.js → chunk-MJ2SKNTY.js} +5 -5
- package/chunks/{chunk-JE2CEOBO.js → chunk-MNTXIO6T.js} +4 -4
- package/chunks/{chunk-TEGJSJDF.js → chunk-MOHAWIAW.js} +2 -2
- package/chunks/{chunk-54YCNSK5.js → chunk-MVMBE5EH.js} +4521 -10220
- package/chunks/{chunk-PZEXDV3H.js → chunk-NCY2CDDX.js} +71 -43
- package/chunks/{chunk-TTJZAIFP.js → chunk-NJELCSFL.js} +3 -3
- package/chunks/{chunk-A7Y5H4TX.js → chunk-NXDJEZCI.js} +7 -7
- package/chunks/{chunk-PQNHRFJC.js → chunk-NYX53SV4.js} +0 -2
- package/chunks/{chunk-QARJNL2V.js → chunk-O2ZYHG33.js} +5 -4
- package/chunks/{chunk-6PQPKTXP.js → chunk-OPMLL3B3.js} +1 -1
- package/chunks/{chunk-PVNQRENX.js → chunk-OUQGNGIU.js} +1 -1
- package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
- package/chunks/{chunk-GURGAJTX.js → chunk-PDDYAXL2.js} +4 -1
- package/chunks/chunk-PWCQRLM5.js +1170 -0
- package/chunks/{chunk-GL4JOZXU.js → chunk-Q43MIWDH.js} +4 -4
- package/chunks/{chunk-V4XNUDPE.js → chunk-QFIYH5KR.js} +28 -7
- package/chunks/chunk-QL4TN4HS.js +59 -0
- package/chunks/{chunk-E6CJ2SMM.js → chunk-QMBEW7EW.js} +2 -2
- package/chunks/{chunk-U4VTUMMK.js → chunk-QONSRAEV.js} +1 -1
- package/chunks/{chunk-LOY7RWQG.js → chunk-QYPT3QUD.js} +3 -3
- package/chunks/{chunk-RG64CDT2.js → chunk-RJAVNGJJ.js} +131 -48
- package/chunks/{chunk-Z3S5EMOW.js → chunk-RPYYTL7E.js} +60 -12
- package/chunks/{chunk-V25K5ID7.js → chunk-SWCEYR6T.js} +1 -1
- package/chunks/{chunk-77V3VIKL.js → chunk-SXGNNAMC.js} +9 -9
- package/chunks/{chunk-7KAXXBER.js → chunk-TNQ5BEEB.js} +3 -3
- package/chunks/{chunk-R2XWGR75.js → chunk-TYERNYH4.js} +2 -2
- package/chunks/{chunk-45IOTAUS.js → chunk-U25CMJYY.js} +1 -1
- package/chunks/{chunk-7ULQIS27.js → chunk-UEJESCS7.js} +1 -1
- package/chunks/{chunk-HC45LTEN.js → chunk-UH7Z7Y45.js} +1 -1
- package/chunks/{chunk-P5VC5USY.js → chunk-UIKCPMID.js} +1 -1
- package/chunks/{chunk-CPZAH673.js → chunk-UKZEXS6K.js} +2 -0
- package/chunks/{chunk-HIVKI6O6.js → chunk-UO7AWUZJ.js} +9 -7
- package/chunks/{chunk-XP4L6KS3.js → chunk-URN76TKR.js} +2 -2
- package/chunks/{chunk-XUGZYLDH.js → chunk-UWSXFI6E.js} +1 -1
- package/chunks/{chunk-AOHY3QJ3.js → chunk-VA5NLVPT.js} +3 -3
- package/chunks/{chunk-FANRZEAJ.js → chunk-VWOVHOTT.js} +1 -1
- package/chunks/{chunk-NTDH4IML.js → chunk-W2K4OEW4.js} +7 -7
- package/chunks/{chunk-L32VV3ZJ.js → chunk-WH7W24EN.js} +12 -12
- package/chunks/{chunk-QTHQ6Z5X.js → chunk-WK4TJUEA.js} +1 -1
- package/chunks/{chunk-ZPZ7ZJEE.js → chunk-WUC6ZFXO.js} +1 -1
- package/chunks/{chunk-TIRRPCFS.js → chunk-X6QNZOTC.js} +1 -1
- package/chunks/{chunk-IIUGIWWY.js → chunk-XC2VAFVZ.js} +1 -1
- package/chunks/{chunk-D4HTUMGX.js → chunk-XC656O42.js} +3 -3
- package/chunks/{chunk-ZMOJ7ISP.js → chunk-XXOVLDZQ.js} +1 -1
- package/chunks/{chunk-THVU3RNH.js → chunk-YAVY33G4.js} +1 -1
- package/chunks/{chunk-PJOHNFIY.js → chunk-YIAC2OXH.js} +5 -5
- package/chunks/{chunk-CU47KXB5.js → chunk-YTSN63PD.js} +6 -6
- package/chunks/{chunk-DSFHVTWD.js → chunk-YXEVDA66.js} +2 -2
- package/chunks/{chunk-MB32MS4U.js → chunk-ZLJQIGCH.js} +260 -175
- package/chunks/{chunk-6TAASXWL.js → chunk-ZX6RZZFB.js} +3 -3
- package/chunks/{computer-use-5QWCFNKD.js → computer-use-BG2EHNJE.js} +37 -34
- package/chunks/{config-utils-WADIDWGG.js → config-utils-E3ZQTHGM.js} +4 -4
- package/chunks/{contextCommand-4Z7T7TUM.js → contextCommand-JAPYNKFC.js} +41 -38
- package/chunks/{core-runtime-6N4EFC2Q.js → core-runtime-2VCZN5QF.js} +37 -34
- package/chunks/{create-sub-session-AEREHZBQ.js → create-sub-session-52OUA2VU.js} +52 -43
- package/chunks/{create-sub-session-62YZWVAY.js → create-sub-session-J32WC64U.js} +2 -2
- package/chunks/{cron-create-6E7GIQTG.js → cron-create-HMFSHIAR.js} +4 -4
- package/chunks/{cron-delete-JD26XY3W.js → cron-delete-ZJFHOX57.js} +4 -4
- package/chunks/{cron-list-CUWFB44G.js → cron-list-ZEX2NBMN.js} +4 -4
- package/chunks/{daemon-PCNCI5YU.js → daemon-CCIX4BMG.js} +47 -6
- package/chunks/{daemon-status-provider-DDF7C5M7.js → daemon-status-provider-F2YGDKHR.js} +48 -45
- package/chunks/{daemon-trust-policy-Q4KSOJTR.js → daemon-trust-policy-XCY7JETR.js} +43 -40
- package/chunks/{daemon-trust-policy-monitor-V6FTE3IY.js → daemon-trust-policy-monitor-FBHB5GMQ.js} +43 -40
- package/chunks/{de-SY6O76BF.js → de-VL76CPLV.js} +50 -5
- package/chunks/{deferred-core-runtime-GHJ5GQHK.js → deferred-core-runtime-BBLJ4JUM.js} +37 -34
- package/chunks/display-image-2WOG27DY.js +184 -0
- package/chunks/{dist-ZHXOBXDN.js → dist-3BMEUGTG.js} +1 -1
- package/chunks/{dist-OAOC5OV4.js → dist-7JGAAQSC.js} +2 -2
- package/chunks/{dist-SL2LUMML.js → dist-A7H2KKUC.js} +1 -1
- package/chunks/{dist-ULIG4M5H.js → dist-C5U4LJKW.js} +162 -15
- package/chunks/{dist-2PERFI23.js → dist-DPPHJAVL.js} +3 -3
- package/chunks/{dist-PVEAFLHY.js → dist-HVBMEYWK.js} +1 -1
- package/chunks/{dist-26BIMQT6.js → dist-IKGVITP3.js} +676 -37
- package/chunks/{dist-WGMNT3JQ.js → dist-SFQ34F4M.js} +24 -6
- package/chunks/{earlyInputCapture-TQXLLISD.js → earlyInputCapture-ALVSMKP7.js} +38 -35
- package/chunks/{edit-FJEUV6KZ.js → edit-POB3CIHQ.js} +37 -34
- package/chunks/{en-NBK3JKCE.js → en-IRJ2WN5T.js} +61 -6
- package/chunks/{enter-worktree-7GE3TZ4P.js → enter-worktree-Q2N7UZWC.js} +37 -34
- package/chunks/{enterPlanMode-KR5TMPCJ.js → enterPlanMode-QGAH2GMP.js} +37 -34
- package/chunks/{environment-SWL3CMB3.js → environment-FE5AX2U5.js} +40 -37
- package/chunks/{errors-XQE7BGZV.js → errors-SLMCFLSC.js} +40 -37
- package/chunks/{exit-worktree-CHKTYNCV.js → exit-worktree-7WO2LPLF.js} +37 -34
- package/chunks/{exitPlanMode-QYAG6LWX.js → exitPlanMode-3PINWUTY.js} +37 -34
- package/chunks/{fast-path-Z2K7W6DC.js → fast-path-SVFFEL6U.js} +17 -4
- package/chunks/{fr-4KG5V7UT.js → fr-GK3HQYVB.js} +50 -5
- package/chunks/{gemini-YU4XKEDG.js → gemini-QECJNKNJ.js} +151 -90
- package/chunks/{geminiContentGenerator-ZZX6NBO4.js → geminiContentGenerator-ZFAZKT6R.js} +6 -6
- package/chunks/{glob-VYF5CXSX.js → glob-GXUNQYNR.js} +37 -34
- package/chunks/{goal-tools-HGO6VXPB.js → goal-tools-SPQ5M6D3.js} +3 -3
- package/chunks/{grep-5DP5ZUTW.js → grep-LVU5KBCV.js} +37 -34
- package/chunks/{handleAutoUpdate-UVBJ56DL.js → handleAutoUpdate-MPDHQY72.js} +43 -40
- package/chunks/{i18n-UQNYHEUD.js → i18n-LEYRN6RV.js} +39 -36
- package/chunks/{image-gen-WHPIZNWF.js → image-gen-4T2D4PTP.js} +9 -9
- package/chunks/{initializer-GMIICF4W.js → initializer-PQV2THBS.js} +44 -41
- package/chunks/{installationInfo-4MGG4WVI.js → installationInfo-XC3HXLTX.js} +38 -35
- package/chunks/{ja-F3GSQXMF.js → ja-3FA46IKD.js} +50 -5
- package/chunks/{keychain-token-storage-IKO4G53C.js → keychain-token-storage-7BT4TQ2A.js} +2 -2
- package/chunks/{kittyProtocolDetector-MBRTDRBK.js → kittyProtocolDetector-BFLAKYXH.js} +1 -1
- package/chunks/{list-CPN2W334.js → list-AQBTPZRG.js} +46 -43
- package/chunks/{list-agents-PXJ7ZUFB.js → list-agents-TWEGRJWO.js} +2 -2
- package/chunks/{loadedSettingsAdapter-ZQAV5NDO.js → loadedSettingsAdapter-EZYPDX2J.js} +43 -40
- package/chunks/{loggingContentGenerator-5E7W4IEP.js → loggingContentGenerator-WD6YWU7Q.js} +52 -37
- package/chunks/{loop-wakeup-Y26NQZ5I.js → loop-wakeup-6LLEOQYV.js} +5 -5
- package/chunks/{ls-ONQTTMQR.js → ls-H5WX22VK.js} +4 -4
- package/chunks/{lsp-YGHHRGMD.js → lsp-G6FXYEIS.js} +2 -2
- package/chunks/{managed-npm-update-MKKAXYXA.js → managed-npm-update-BMM57CHD.js} +40 -37
- package/chunks/{mcp-V5NTJF6X.js → mcp-FMI6NCWA.js} +43 -40
- package/chunks/{monitor-CO3ASY6E.js → monitor-PZJOYAA2.js} +37 -34
- package/chunks/nonInteractiveCli-QPX6R4LL.js +152 -0
- package/chunks/{notebook-edit-Z7AEE6FM.js → notebook-edit-GZF2SKTQ.js} +37 -34
- package/chunks/{openaiContentGenerator-CA3MQOP3.js → openaiContentGenerator-ZPLCFAAG.js} +18 -18
- package/chunks/{pidfile-NL7MKDRU.js → pidfile-PCADVJQW.js} +38 -35
- package/chunks/{processUtils-PB5K2DYH.js → processUtils-FKUVQVEU.js} +2 -2
- package/chunks/{pt-EQ33KWEN.js → pt-3AOBKPIJ.js} +50 -5
- package/chunks/{qwenContentGenerator-JYFNDCOS.js → qwenContentGenerator-2Y4R6YLB.js} +42 -40
- package/chunks/{qwenOAuth2-W2ALKQDD.js → qwenOAuth2-UCEHY3I2.js} +8 -8
- package/chunks/{read-file-IEOR5H5W.js → read-file-DYHDFVAS.js} +10 -10
- package/chunks/{read-mcp-resource-U2IJN5HM.js → read-mcp-resource-DRZSI3HE.js} +2 -2
- package/chunks/{record-artifact-MGPJ7EG4.js → record-artifact-IPIRWMFY.js} +3 -3
- package/chunks/{resumeHistoryUtils-BNBTP5AS.js → resumeHistoryUtils-5JS6R3AJ.js} +45 -42
- package/chunks/{ripGrep-UMQODKEB.js → ripGrep-2QOR3ZQT.js} +37 -34
- package/chunks/{ru-7OZAUKGG.js → ru-VJRAMC4W.js} +50 -5
- package/chunks/{run-qwen-serve-RN2R6QQW.js → run-qwen-serve-MTVRAUBR.js} +271 -60
- package/chunks/{runtime-QFJ2MJF5.js → runtime-DQGE2DYR.js} +50 -45
- package/chunks/{scheduler-AMYUFOZI.js → scheduler-BXIZQ4OO.js} +37 -34
- package/chunks/{sdk-exporters-http-4BQANSJ6.js → sdk-exporters-http-IKNWQJNV.js} +2 -2
- package/chunks/{sdk-impl-Z4VXWVFX.js → sdk-impl-7CUUMQDB.js} +2 -2
- package/chunks/{send-message-PMP4ATVM.js → send-message-LHJLVWFD.js} +5 -4
- package/chunks/{serve-EIIYJVX3.js → serve-D4GYHFLL.js} +44 -40
- package/chunks/{server-EP2LLAPD.js → server-S22MLWTJ.js} +618 -387
- package/chunks/{session-GMPZBLOW.js → session-AHNM6YXP.js} +151 -87
- package/chunks/{settings-LN7RNKBS.js → settings-77MDDUSX.js} +42 -39
- package/chunks/{shell-EM2OWU5X.js → shell-DLD2VQTQ.js} +37 -34
- package/chunks/{skill-T5VPSK73.js → skill-3B2PAQE4.js} +27 -14
- package/chunks/{skill-settings-GMR3GMNY.js → skill-settings-STR5NF4B.js} +42 -39
- package/chunks/{spawnChannel-YPCU62DI.js → spawnChannel-TOWYOVDZ.js} +39 -36
- package/chunks/{standalone-update-JAKIM2NF.js → standalone-update-F6ZWABD7.js} +40 -37
- package/chunks/{startInteractiveUI-YETQWGYF.js → startInteractiveUI-QR7MHDX7.js} +1829 -1036
- package/chunks/{syntheticOutput-D7E6ZFKR.js → syntheticOutput-EYL7DWO7.js} +3 -3
- package/chunks/{task-create-NFCYD43L.js → task-create-4ALZMGP5.js} +10 -9
- package/chunks/{task-list-TAVMGEVD.js → task-list-6CVQPORX.js} +6 -6
- package/chunks/{task-stop-ZDF2UJRM.js → task-stop-Y5ZTFVRX.js} +2 -2
- package/chunks/{task-update-6L7LHGEX.js → task-update-IKCEEWJ6.js} +10 -9
- package/chunks/{team-create-LFJ6HGNY.js → team-create-LQVIAVRF.js} +37 -34
- package/chunks/{team-delete-DPGGRQBU.js → team-delete-CE7DC53R.js} +6 -6
- package/chunks/{team-plan-approval-C2KLSDGO.js → team-plan-approval-G5PUNI52.js} +37 -34
- package/chunks/terminal-image-renderer-33GSM55L.js +90 -0
- package/chunks/{theme-manager-JQ3ZGBP5.js → theme-manager-DBFM5QOG.js} +38 -35
- package/chunks/{todoWrite-2UO5G6G6.js → todoWrite-FTZWQRZH.js} +108 -36
- package/chunks/{tool-search-FAZBFRJZ.js → tool-search-RGG7BBC4.js} +13 -12
- package/chunks/{total-session-admission-5CALIVYO.js → total-session-admission-LY3RMXXI.js} +44 -41
- package/chunks/{trustedFolders-KOPSP44S.js → trustedFolders-3M4IQ6K6.js} +39 -36
- package/chunks/{update-relaunch-6QL2TICS.js → update-relaunch-G3CMSX3M.js} +5 -5
- package/chunks/{updateCheck-4Q6RIKFW.js → updateCheck-ZKFGBDTG.js} +42 -39
- package/chunks/{useAutoAcceptIndicator-Q5BMKZV3.js → useAutoAcceptIndicator-7SAFZK5H.js} +47 -44
- package/chunks/{validateNonInterActiveAuth-GKOC5F6Z.js → validateNonInterActiveAuth-F2K6UGE4.js} +88 -84
- package/chunks/{version-VSATY2LD.js → version-KM6MYV2D.js} +1 -1
- package/chunks/{web-fetch-JCLKL6NL.js → web-fetch-SM4LZHRS.js} +13 -13
- package/chunks/{web-search-DSQTFUBX.js → web-search-OGKZNDAC.js} +8 -8
- package/chunks/{workflow-M6QAVKVJ.js → workflow-HU365RFR.js} +419 -304
- package/chunks/{workspace-providers-status-YKLTLMJA.js → workspace-providers-status-QKKXQHL7.js} +46 -43
- package/chunks/{workspace-registration-store-5DMGKU64.js → workspace-registration-store-7J7KOXFD.js} +2 -2
- package/chunks/{workspace-registry-PTYUSYXX.js → workspace-registry-KC66O6DH.js} +44 -41
- package/chunks/{workspace-service-25ML3T47.js → workspace-service-TEV5Q2AA.js} +51 -48
- package/chunks/{workspace-skills-status-YKZWOYRX.js → workspace-skills-status-VRL55OMU.js} +45 -42
- package/chunks/{workspace-trust-reconciler-5FI2S3OS.js → workspace-trust-reconciler-COC5M7CY.js} +50 -47
- package/chunks/{write-file-AY7VLP5X.js → write-file-3SO2BMNO.js} +37 -34
- package/chunks/{zh-H3YDK5QW.js → zh-ARWDLDLR.js} +58 -6
- package/chunks/{zh-TW-JYCP7XUA.js → zh-TW-Y4RGI3P7.js} +58 -6
- package/chunks/{zoom-image-S4LJZMD5.js → zoom-image-O3RWTVKV.js} +10 -10
- package/cli.js +32 -48
- package/locales/ca.js +68 -4
- package/locales/de.js +70 -4
- package/locales/en.js +84 -6
- package/locales/fr.js +72 -4
- package/locales/ja.js +69 -4
- package/locales/pt.js +68 -4
- package/locales/ru.js +71 -4
- package/locales/zh-TW.js +74 -6
- package/locales/zh.js +74 -6
- package/package.json +3 -3
- package/web-shell/assets/{arc-xjArKHU2.js → arc-KuwiZ67W.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BgrQDNYG.js → architectureDiagram-3BPJPVTR-Cppop6HB.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CXxWC-1_.js → blockDiagram-GPEHLZMM-DQ6HT72s.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-Dx1tLm3v.js → c4Diagram-AAUBKEIU-B8TX_Mh-.js} +1 -1
- package/web-shell/assets/channel-BZd6Ile0.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CBxjogVR.js → chunk-2J33WTMH-B2WBUTp8.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-izb-rY5W.js → chunk-4BX2VUAB-DXUsWC6O.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-NzLyvSb8.js → chunk-55IACEB6-DtB-6cyk.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DVyKb0dl.js → chunk-727SXJPM-B-PhPyC3.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-BtqL7NzB.js → chunk-AQP2D5EJ-DNaTFMSC.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-iNpdKIO0.js → chunk-FMBD7UC4-DZ345tFf.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-DI7cbFmX.js → chunk-ND2GUHAM-BR_EpgzJ.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-3Y_-xFYs.js → chunk-QZHKN3VN-BTU-0gDT.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B7c-TqtK.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B7c-TqtK.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A--raRatZn.js → cose-bilkent-S5V4N54A-BmsKBCNt.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-B8SU70mO.js → dagre-BM42HDAG-Ba8YWdDC.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-ewgoakXo.js → diagram-2AECGRRQ-CCt2SnI6.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-Bm_JLTnS.js → diagram-5GNKFQAL-BVTLXEU7.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-DEIUjUy9.js → diagram-KO2AKTUF-DpDAVCYV.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-C2Wmrpj-.js → diagram-LMA3HP47-8ljXg-TB.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-CtYe6bFx.js → diagram-OG6HWLK6-JAXfQSmd.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-DfpHcWLV.js → erDiagram-TEJ5UH35-CUeakG6k.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-CAiUhio5.js → flowDiagram-I6XJVG4X-Cd4Wrdwv.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CYc7ezr4.js → ganttDiagram-6RSMTGT7-C0nMFvH_.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-70lbkcRS.js → gitGraphDiagram-PVQCEYII-uKk88n_L.js} +1 -1
- package/web-shell/assets/index-BXGtjHs5.js +1756 -0
- package/web-shell/assets/{index-Ww86nT9f.js → index-C1UWBJSX.js} +1 -1
- package/web-shell/assets/index-WxSvj2tI.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-C7e8DWPa.js → infoDiagram-5YYISTIA-GfPN17hR.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BYLr2op-.js → ishikawaDiagram-YF4QCWOH-CDbWTcGa.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-hEibAHKX.js → journeyDiagram-JHISSGLW-J8TvvVFz.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-F2rt8Uhp.js → kanban-definition-UN3LZRKU-Ds_ndLrs.js} +1 -1
- package/web-shell/assets/{linear-DPhyNezd.js → linear-DuL9O4i3.js} +1 -1
- package/web-shell/assets/{mermaid.core-ZUtnug0n.js → mermaid.core-DtK4PsQB.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DDWcMoi8.js → mindmap-definition-RKZ34NQL-DD0r7MS3.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-CTRKzw1_.js → pieDiagram-4H26LBE5-CxGPZ8Q-.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CAEwYG_z.js → quadrantDiagram-W4KKPZXB-Ds7Buxed.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CRjnH9D9.js → requirementDiagram-4Y6WPE33-DIx28ph5.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-LPQT_sOd.js → sankeyDiagram-5OEKKPKP-AxdAYcVX.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-Ht2Iqvb0.js → sequenceDiagram-3UESZ5HK-CojoXAZ5.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CIUdqOXu.js → stateDiagram-AJRCARHV-Dy1WN3mi.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BaTNMz02.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-BcilneZF.js → timeline-definition-PNZ67QCA-DeWe_43M.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BljwiiH1.js → vennDiagram-CIIHVFJN-BN8PVlFq.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-DeKjkYjq.js → wardley-L42UT6IY-CbjV_1hf.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-L3U1H7KG.js → wardleyDiagram-YWT4CUSO-D2mw84_p.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-IJnWsgMT.js → xychartDiagram-2RQKCTM6-er9CTQXi.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-4KP2F2TE.js +0 -82
- package/chunks/chunk-HGT6JR3U.js +0 -177
- package/chunks/nonInteractiveCli-ZJYEOO7U.js +0 -148
- package/web-shell/assets/channel-B1cyk94G.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BpBYZoRE.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BpBYZoRE.js +0 -1
- package/web-shell/assets/index-C1k3PDuU.css +0 -5
- package/web-shell/assets/index-DZLIXILO.js +0 -1750
- package/web-shell/assets/insert-DmRbh9Rv.svg +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BmqqQZ6w.js +0 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
contextCommand
|
|
5
|
-
} from "./chunk-H6I4PGRV.js";
|
|
6
3
|
import {
|
|
7
4
|
ExtensionRefreshState,
|
|
8
5
|
clearSkillArgs,
|
|
@@ -12,7 +9,13 @@ import {
|
|
|
12
9
|
staleArgsWarning,
|
|
13
10
|
validateAuthMethod,
|
|
14
11
|
writeSkillArgs
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H2EDCJIM.js";
|
|
13
|
+
import {
|
|
14
|
+
isKittyProtocolEnabled
|
|
15
|
+
} from "./chunk-NYX53SV4.js";
|
|
16
|
+
import {
|
|
17
|
+
contextCommand
|
|
18
|
+
} from "./chunk-6DNHLK7F.js";
|
|
16
19
|
import {
|
|
17
20
|
calculateCost,
|
|
18
21
|
computeSessionStats,
|
|
@@ -21,23 +24,20 @@ import {
|
|
|
21
24
|
findInlineMathExpressions,
|
|
22
25
|
getSystemInfoFields,
|
|
23
26
|
levelLabel
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
isKittyProtocolEnabled
|
|
27
|
-
} from "./chunk-PQNHRFJC.js";
|
|
27
|
+
} from "./chunk-GNZ7MX73.js";
|
|
28
28
|
import {
|
|
29
29
|
VSCODE_SHIFT_ENTER_SEQUENCE,
|
|
30
30
|
writeOsc52
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3LGZEYOF.js";
|
|
32
|
+
import {
|
|
33
|
+
rollbackStandaloneUpdate
|
|
34
|
+
} from "./chunk-HR4CHEQS.js";
|
|
32
35
|
import {
|
|
33
36
|
themeManager
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KKN2IE7Q.js";
|
|
35
38
|
import {
|
|
36
39
|
getErrorMessage as getErrorMessage2
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
rollbackStandaloneUpdate
|
|
40
|
-
} from "./chunk-OFZKFPYG.js";
|
|
40
|
+
} from "./chunk-YTSN63PD.js";
|
|
41
41
|
import {
|
|
42
42
|
GITHUB_WORKFLOW_PATHS,
|
|
43
43
|
INSIGHT_CSS,
|
|
@@ -51,11 +51,11 @@ import {
|
|
|
51
51
|
toJson,
|
|
52
52
|
toJsonl,
|
|
53
53
|
toMarkdown
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-NCY2CDDX.js";
|
|
55
55
|
import {
|
|
56
56
|
stripUnsafeCharacters,
|
|
57
57
|
toCodePoints
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-4NFY2S7N.js";
|
|
59
59
|
import {
|
|
60
60
|
formatUnsupportedVoiceModelMessage,
|
|
61
61
|
getVoiceSettingsScope,
|
|
@@ -63,21 +63,20 @@ import {
|
|
|
63
63
|
isVoiceEnabled,
|
|
64
64
|
readVoiceMode,
|
|
65
65
|
readVoiceModel
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-UIKCPMID.js";
|
|
67
67
|
import {
|
|
68
68
|
getExtendedSystemInfo,
|
|
69
69
|
getGitVersion,
|
|
70
70
|
getNpmVersion
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-7UPJXZLD.js";
|
|
72
72
|
import {
|
|
73
73
|
formatDuration,
|
|
74
|
-
formatMemoryUsage,
|
|
75
74
|
formatTokenCount
|
|
76
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-3SH53ANB.js";
|
|
77
76
|
import {
|
|
78
77
|
isInlineModelOverrideAllowed,
|
|
79
78
|
parseAcpModelOption
|
|
80
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ZX6RZZFB.js";
|
|
81
80
|
import {
|
|
82
81
|
OUTPUT_LANGUAGE_AUTO,
|
|
83
82
|
getAllSettingKeys,
|
|
@@ -89,7 +88,7 @@ import {
|
|
|
89
88
|
resolveOutputLanguageOrPreserveAuto,
|
|
90
89
|
validateSettingValue,
|
|
91
90
|
writeOutputLanguageAndRegisterPath
|
|
92
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-GU5B6IF3.js";
|
|
93
92
|
import {
|
|
94
93
|
SUPPORTED_LANGUAGES,
|
|
95
94
|
getCurrentLanguage,
|
|
@@ -97,14 +96,14 @@ import {
|
|
|
97
96
|
resolveSupportedLanguage,
|
|
98
97
|
setLanguageAsync,
|
|
99
98
|
t
|
|
100
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-CFVFQWFB.js";
|
|
101
100
|
import {
|
|
102
101
|
getInstallationInfo
|
|
103
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-332FMXSD.js";
|
|
104
103
|
import {
|
|
105
104
|
isFolderTrustEnabled,
|
|
106
105
|
loadTrustedFolders
|
|
107
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-3GALLNII.js";
|
|
108
107
|
import {
|
|
109
108
|
require_strip_json_comments
|
|
110
109
|
} from "./chunk-ALGGS7UH.js";
|
|
@@ -138,6 +137,7 @@ import {
|
|
|
138
137
|
escapeShellArg,
|
|
139
138
|
findProviderByCredentials,
|
|
140
139
|
flatMapTextParts,
|
|
140
|
+
formatMemoryUsage,
|
|
141
141
|
generateSessionRecap,
|
|
142
142
|
getActiveGoal,
|
|
143
143
|
getArenaSystemReminder,
|
|
@@ -162,7 +162,6 @@ import {
|
|
|
162
162
|
normalizeClaudeMcpServer,
|
|
163
163
|
normalizeContent,
|
|
164
164
|
normalizeSkillPriority,
|
|
165
|
-
parse,
|
|
166
165
|
parseInstallSource,
|
|
167
166
|
parseLearnVideoInput,
|
|
168
167
|
parseVisionModelSetting,
|
|
@@ -175,22 +174,32 @@ import {
|
|
|
175
174
|
runForkedAgent,
|
|
176
175
|
tryGenerateSessionTitle,
|
|
177
176
|
unregisterGoalHook
|
|
178
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-MVMBE5EH.js";
|
|
179
178
|
import {
|
|
180
179
|
external_exports
|
|
181
180
|
} from "./chunk-H6XPXXMH.js";
|
|
182
181
|
import {
|
|
183
182
|
resolveModelId
|
|
184
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-XXOVLDZQ.js";
|
|
184
|
+
import {
|
|
185
|
+
getAutoSkillCuratorStatus,
|
|
186
|
+
parse,
|
|
187
|
+
recordAutoSkillUsage,
|
|
188
|
+
restoreArchivedAutoSkill,
|
|
189
|
+
runAutoSkillCurator,
|
|
190
|
+
setAutoSkillPinned
|
|
191
|
+
} from "./chunk-MISUEWB4.js";
|
|
185
192
|
import {
|
|
186
193
|
HookEventName,
|
|
187
194
|
sanitizeUserPromptExpansionAdditionalContext
|
|
188
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-A5YZ3FA2.js";
|
|
196
|
+
import {
|
|
197
|
+
APPROVAL_MODES
|
|
198
|
+
} from "./chunk-LLMGP5IC.js";
|
|
189
199
|
import {
|
|
190
|
-
APPROVAL_MODES,
|
|
191
200
|
FORK_SUBAGENT_TYPE,
|
|
192
201
|
stripStartupContext
|
|
193
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-7UXI6P72.js";
|
|
194
203
|
import {
|
|
195
204
|
applySkillAllowedTools,
|
|
196
205
|
buildSkillLlmContent
|
|
@@ -204,7 +213,7 @@ import {
|
|
|
204
213
|
} from "./chunk-DGEIYUC3.js";
|
|
205
214
|
import {
|
|
206
215
|
resolveOpenAILogDir
|
|
207
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-7XLPYF6B.js";
|
|
208
217
|
import {
|
|
209
218
|
IdeConnectionEvent,
|
|
210
219
|
formatTokenUsageSummaryAsCsv,
|
|
@@ -218,14 +227,14 @@ import {
|
|
|
218
227
|
recordSkillInvocation,
|
|
219
228
|
runSideQuery,
|
|
220
229
|
uiTelemetryService
|
|
221
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-KZXSAQYV.js";
|
|
222
231
|
import {
|
|
223
232
|
getAutoMemoryRoot
|
|
224
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-E4WHKETF.js";
|
|
225
234
|
import {
|
|
226
235
|
ToolNames,
|
|
227
236
|
isShellProgressData
|
|
228
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-CFDR3GNL.js";
|
|
229
238
|
import {
|
|
230
239
|
Storage,
|
|
231
240
|
createDebugLogger,
|
|
@@ -234,12 +243,12 @@ import {
|
|
|
234
243
|
isSubpath,
|
|
235
244
|
resolvePath,
|
|
236
245
|
updateSymlink
|
|
237
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-3RXUYQJI.js";
|
|
238
247
|
import {
|
|
239
248
|
isCpuProfileRecording,
|
|
240
249
|
startCpuProfile,
|
|
241
250
|
stopCpuProfile
|
|
242
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-OPMLL3B3.js";
|
|
243
252
|
import {
|
|
244
253
|
init_esbuild_shims
|
|
245
254
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -835,6 +844,7 @@ var aboutCommand = {
|
|
|
835
844
|
},
|
|
836
845
|
kind: "built-in" /* BUILT_IN */,
|
|
837
846
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
847
|
+
canRunDuringStreaming: true,
|
|
838
848
|
action: /* @__PURE__ */ __name(async (context) => {
|
|
839
849
|
const systemInfo = await getExtendedSystemInfo(context);
|
|
840
850
|
if (context.executionMode !== "interactive") {
|
|
@@ -871,6 +881,7 @@ var aboutCommand = {
|
|
|
871
881
|
},
|
|
872
882
|
kind: "built-in" /* BUILT_IN */,
|
|
873
883
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
884
|
+
canRunDuringStreaming: true,
|
|
874
885
|
action: /* @__PURE__ */ __name(async (context) => {
|
|
875
886
|
const info = await collectSessionPathInfo(context);
|
|
876
887
|
const content = formatSessionPathInfo(info);
|
|
@@ -1103,6 +1114,7 @@ function snapshotToTask(s) {
|
|
|
1103
1114
|
tokensSpent: s.tokensSpent ?? 0,
|
|
1104
1115
|
tokenBudgetTotal: s.tokenBudgetTotal ?? null,
|
|
1105
1116
|
perPhaseTokens: new Map(s.perPhaseTokens ?? []),
|
|
1117
|
+
pendingApprovals: [],
|
|
1106
1118
|
script: s.script ?? "",
|
|
1107
1119
|
scriptPath: s.scriptPath,
|
|
1108
1120
|
result: s.result,
|
|
@@ -1576,8 +1588,8 @@ function executeArenaCommand(config, ui, input) {
|
|
|
1576
1588
|
debugLogger4.debug("Arena agents settled");
|
|
1577
1589
|
},
|
|
1578
1590
|
(error) => {
|
|
1579
|
-
const
|
|
1580
|
-
addAndRecordArenaMessage("error" /* ERROR */, `${
|
|
1591
|
+
const message2 = error instanceof Error ? error.message : String(error);
|
|
1592
|
+
addAndRecordArenaMessage("error" /* ERROR */, `${message2}`);
|
|
1581
1593
|
debugLogger4.error("Arena session failed:", error);
|
|
1582
1594
|
config.setArenaManager(null);
|
|
1583
1595
|
for (const detach of detachListeners) {
|
|
@@ -1933,7 +1945,7 @@ var approvalModeCommand = {
|
|
|
1933
1945
|
};
|
|
1934
1946
|
}
|
|
1935
1947
|
}
|
|
1936
|
-
const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-
|
|
1948
|
+
const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-7SAFZK5H.js") : void 0;
|
|
1937
1949
|
if (config) {
|
|
1938
1950
|
try {
|
|
1939
1951
|
config.setApprovalMode(mode);
|
|
@@ -3042,17 +3054,17 @@ var configCommand = {
|
|
|
3042
3054
|
})
|
|
3043
3055
|
};
|
|
3044
3056
|
}
|
|
3045
|
-
let
|
|
3057
|
+
let message3 = t("Set {{key}} = {{value}}", {
|
|
3046
3058
|
key,
|
|
3047
3059
|
value: String(newValue)
|
|
3048
3060
|
});
|
|
3049
3061
|
if (def.requiresRestart) {
|
|
3050
|
-
|
|
3062
|
+
message3 += "\n" + t("(This setting requires a restart to take effect.)");
|
|
3051
3063
|
}
|
|
3052
3064
|
return {
|
|
3053
3065
|
type: "message",
|
|
3054
3066
|
messageType: "info",
|
|
3055
|
-
content:
|
|
3067
|
+
content: message3
|
|
3056
3068
|
};
|
|
3057
3069
|
}
|
|
3058
3070
|
const result = coerceValue(def, rawValue);
|
|
@@ -3087,22 +3099,22 @@ var configCommand = {
|
|
|
3087
3099
|
};
|
|
3088
3100
|
}
|
|
3089
3101
|
const displayValue = isSensitiveKey(key) ? maskValue(result.value) : formatValue(result.value);
|
|
3090
|
-
let
|
|
3102
|
+
let message2 = t("Set {{key}} = {{value}}", {
|
|
3091
3103
|
key,
|
|
3092
3104
|
value: displayValue
|
|
3093
3105
|
});
|
|
3094
3106
|
if (def.requiresRestart) {
|
|
3095
|
-
|
|
3107
|
+
message2 += "\n" + t("(This setting requires a restart to take effect.)");
|
|
3096
3108
|
}
|
|
3097
3109
|
if (isSensitiveKey(key)) {
|
|
3098
|
-
|
|
3110
|
+
message2 += "\n" + t(
|
|
3099
3111
|
"(Security-sensitive setting \u2014 verify you are not exposing credentials.)"
|
|
3100
3112
|
);
|
|
3101
3113
|
}
|
|
3102
3114
|
return {
|
|
3103
3115
|
type: "message",
|
|
3104
3116
|
messageType: "info",
|
|
3105
|
-
content:
|
|
3117
|
+
content: message2
|
|
3106
3118
|
};
|
|
3107
3119
|
}, "action"),
|
|
3108
3120
|
completion: /* @__PURE__ */ __name(async (_context, partialArg) => {
|
|
@@ -3218,7 +3230,8 @@ var compressCommand = {
|
|
|
3218
3230
|
}
|
|
3219
3231
|
yield {
|
|
3220
3232
|
messageType: "info",
|
|
3221
|
-
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
3233
|
+
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).` + (compressed.warning ? `
|
|
3234
|
+
\u26A0\uFE0F ${compressed.warning}` : "")
|
|
3222
3235
|
};
|
|
3223
3236
|
} catch (e) {
|
|
3224
3237
|
yield {
|
|
@@ -3275,12 +3288,19 @@ var compressCommand = {
|
|
|
3275
3288
|
},
|
|
3276
3289
|
Date.now()
|
|
3277
3290
|
);
|
|
3291
|
+
if (compressed.warning) {
|
|
3292
|
+
ui.addItem(
|
|
3293
|
+
{ type: "info" /* INFO */, text: `\u26A0\uFE0F ${compressed.warning}` },
|
|
3294
|
+
Date.now()
|
|
3295
|
+
);
|
|
3296
|
+
}
|
|
3278
3297
|
return;
|
|
3279
3298
|
}
|
|
3280
3299
|
return {
|
|
3281
3300
|
type: "message",
|
|
3282
3301
|
messageType: "info",
|
|
3283
|
-
content: `${truncationNotice ? `${truncationNotice} ` : ""}Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
3302
|
+
content: `${truncationNotice ? `${truncationNotice} ` : ""}Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).` + (compressed.warning ? `
|
|
3303
|
+
\u26A0\uFE0F ${compressed.warning}` : "")
|
|
3284
3304
|
};
|
|
3285
3305
|
} catch (e) {
|
|
3286
3306
|
if (abortSignal?.aborted) {
|
|
@@ -3463,6 +3483,290 @@ var compressFastCommand = {
|
|
|
3463
3483
|
}, "action")
|
|
3464
3484
|
};
|
|
3465
3485
|
|
|
3486
|
+
// packages/cli/src/ui/commands/curator-command.ts
|
|
3487
|
+
init_esbuild_shims();
|
|
3488
|
+
function message(content, messageType = "info") {
|
|
3489
|
+
return { type: "message", messageType, content };
|
|
3490
|
+
}
|
|
3491
|
+
__name(message, "message");
|
|
3492
|
+
function mutationGuard(config) {
|
|
3493
|
+
if (config.isSafeMode()) {
|
|
3494
|
+
return message(
|
|
3495
|
+
t("Auto-skill curator changes are disabled in safe mode."),
|
|
3496
|
+
"error"
|
|
3497
|
+
);
|
|
3498
|
+
}
|
|
3499
|
+
if (!config.isTrustedFolder()) {
|
|
3500
|
+
return message(
|
|
3501
|
+
t(
|
|
3502
|
+
"Auto-skill curator changes are only available in trusted workspaces. Trust this folder via `/trust` and try again."
|
|
3503
|
+
),
|
|
3504
|
+
"error"
|
|
3505
|
+
);
|
|
3506
|
+
}
|
|
3507
|
+
return void 0;
|
|
3508
|
+
}
|
|
3509
|
+
__name(mutationGuard, "mutationGuard");
|
|
3510
|
+
async function refreshSkillCache(config) {
|
|
3511
|
+
try {
|
|
3512
|
+
await config.getSkillManager()?.refreshCache();
|
|
3513
|
+
} catch {
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
__name(refreshSkillCache, "refreshSkillCache");
|
|
3517
|
+
function displayName(entry) {
|
|
3518
|
+
return entry.skillName === entry.directoryName ? entry.directoryName : `${entry.skillName} (${entry.directoryName})`;
|
|
3519
|
+
}
|
|
3520
|
+
__name(displayName, "displayName");
|
|
3521
|
+
function formatStatus(status) {
|
|
3522
|
+
const lines = [
|
|
3523
|
+
t("Auto-skill curator"),
|
|
3524
|
+
t("Last run: {{time}}", { time: status.lastRunAt ?? t("never") }),
|
|
3525
|
+
t("Active: {{count}}", { count: String(status.active.length) }),
|
|
3526
|
+
t("Stale: {{count}}", { count: String(status.stale.length) }),
|
|
3527
|
+
t("Archived: {{count}}", { count: String(status.archived.length) })
|
|
3528
|
+
];
|
|
3529
|
+
if (status.stale.length > 0) {
|
|
3530
|
+
lines.push("", t("Stale skills:"));
|
|
3531
|
+
lines.push(...status.stale.map((entry) => ` ${displayName(entry)}`));
|
|
3532
|
+
}
|
|
3533
|
+
const pinned = [...status.active, ...status.stale].filter(
|
|
3534
|
+
(entry) => entry.pinned
|
|
3535
|
+
);
|
|
3536
|
+
if (pinned.length > 0) {
|
|
3537
|
+
lines.push("", t("Pinned skills:"));
|
|
3538
|
+
lines.push(...pinned.map((entry) => ` ${displayName(entry)}`));
|
|
3539
|
+
}
|
|
3540
|
+
if (status.archived.length > 0) {
|
|
3541
|
+
lines.push("", t("Archived skills:"));
|
|
3542
|
+
lines.push(...status.archived.map((entry) => ` ${displayName(entry)}`));
|
|
3543
|
+
}
|
|
3544
|
+
return lines.join("\n");
|
|
3545
|
+
}
|
|
3546
|
+
__name(formatStatus, "formatStatus");
|
|
3547
|
+
function formatRun(result) {
|
|
3548
|
+
const prefix = result.dryRun ? t("Dry run complete.") : t("Curator run complete.");
|
|
3549
|
+
const lines = [
|
|
3550
|
+
prefix,
|
|
3551
|
+
t("Checked: {{count}}", { count: String(result.checked) }),
|
|
3552
|
+
t("First observed: {{count}}", { count: String(result.seeded.length) }),
|
|
3553
|
+
t("Marked stale: {{count}}", {
|
|
3554
|
+
count: String(result.markedStale.length)
|
|
3555
|
+
}),
|
|
3556
|
+
t("Reactivated: {{count}}", {
|
|
3557
|
+
count: String(result.reactivated.length)
|
|
3558
|
+
}),
|
|
3559
|
+
t("{{verb}}: {{count}}", {
|
|
3560
|
+
verb: result.dryRun ? t("Would archive") : t("Archived"),
|
|
3561
|
+
count: String(result.archived.length)
|
|
3562
|
+
}),
|
|
3563
|
+
t("Skipped archive collisions: {{count}}", {
|
|
3564
|
+
count: String(result.skippedCollisions.length)
|
|
3565
|
+
}),
|
|
3566
|
+
t("Skipped rename errors: {{count}}", {
|
|
3567
|
+
count: String(result.skippedErrors.length)
|
|
3568
|
+
})
|
|
3569
|
+
];
|
|
3570
|
+
if (result.archived.length > 0) {
|
|
3571
|
+
lines.push(
|
|
3572
|
+
"",
|
|
3573
|
+
result.dryRun ? t("Archive candidates:") : t("Archived skills:")
|
|
3574
|
+
);
|
|
3575
|
+
lines.push(...result.archived.map((name) => ` ${name}`));
|
|
3576
|
+
}
|
|
3577
|
+
if (result.skippedCollisions.length > 0) {
|
|
3578
|
+
lines.push("", t("Skipped archive collisions:"));
|
|
3579
|
+
lines.push(
|
|
3580
|
+
...result.skippedCollisions.map(
|
|
3581
|
+
(name) => ` ${name} \u2014 remove or rename .qwen/archived-skills/${name} to re-archive`
|
|
3582
|
+
)
|
|
3583
|
+
);
|
|
3584
|
+
}
|
|
3585
|
+
if (result.skippedErrors.length > 0) {
|
|
3586
|
+
lines.push("", t("Skipped rename errors:"));
|
|
3587
|
+
lines.push(...result.skippedErrors.map((name) => ` ${name}`));
|
|
3588
|
+
}
|
|
3589
|
+
return lines.join("\n");
|
|
3590
|
+
}
|
|
3591
|
+
__name(formatRun, "formatRun");
|
|
3592
|
+
async function statusAction(context) {
|
|
3593
|
+
const config = context.services.config;
|
|
3594
|
+
if (!config) return message(t("Config not loaded."), "error");
|
|
3595
|
+
try {
|
|
3596
|
+
return message(
|
|
3597
|
+
formatStatus(await getAutoSkillCuratorStatus(config.getProjectRoot()))
|
|
3598
|
+
);
|
|
3599
|
+
} catch (error) {
|
|
3600
|
+
return message(
|
|
3601
|
+
t("Failed to read auto-skill curator status: {{message}}", {
|
|
3602
|
+
message: error instanceof Error ? error.message : String(error)
|
|
3603
|
+
}),
|
|
3604
|
+
"error"
|
|
3605
|
+
);
|
|
3606
|
+
}
|
|
3607
|
+
}
|
|
3608
|
+
__name(statusAction, "statusAction");
|
|
3609
|
+
var statusCommand = {
|
|
3610
|
+
name: "status",
|
|
3611
|
+
get description() {
|
|
3612
|
+
return t("Show project auto-skill lifecycle status.");
|
|
3613
|
+
},
|
|
3614
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3615
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3616
|
+
action: statusAction
|
|
3617
|
+
};
|
|
3618
|
+
var runCommand = {
|
|
3619
|
+
name: "run",
|
|
3620
|
+
get description() {
|
|
3621
|
+
return t("Run project auto-skill lifecycle maintenance.");
|
|
3622
|
+
},
|
|
3623
|
+
argumentHint: "[--dry-run]",
|
|
3624
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3625
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3626
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
3627
|
+
const config = context.services.config;
|
|
3628
|
+
if (!config) return message(t("Config not loaded."), "error");
|
|
3629
|
+
const normalized = args.trim();
|
|
3630
|
+
if (normalized !== "" && normalized !== "--dry-run") {
|
|
3631
|
+
return message(t("Usage: /curator run [--dry-run]"), "error");
|
|
3632
|
+
}
|
|
3633
|
+
if (normalized !== "--dry-run") {
|
|
3634
|
+
const blocked = mutationGuard(config);
|
|
3635
|
+
if (blocked) return blocked;
|
|
3636
|
+
}
|
|
3637
|
+
try {
|
|
3638
|
+
const result = await runAutoSkillCurator(config.getProjectRoot(), {
|
|
3639
|
+
dryRun: normalized === "--dry-run"
|
|
3640
|
+
});
|
|
3641
|
+
if (!result.dryRun && result.archived.length > 0) {
|
|
3642
|
+
await refreshSkillCache(config);
|
|
3643
|
+
}
|
|
3644
|
+
return message(formatRun(result));
|
|
3645
|
+
} catch (error) {
|
|
3646
|
+
return message(
|
|
3647
|
+
t("Failed to run auto-skill curator: {{message}}", {
|
|
3648
|
+
message: error instanceof Error ? error.message : String(error)
|
|
3649
|
+
}),
|
|
3650
|
+
"error"
|
|
3651
|
+
);
|
|
3652
|
+
}
|
|
3653
|
+
}, "action")
|
|
3654
|
+
};
|
|
3655
|
+
var restoreCommand = {
|
|
3656
|
+
name: "restore",
|
|
3657
|
+
get description() {
|
|
3658
|
+
return t("Restore an archived project auto-skill.");
|
|
3659
|
+
},
|
|
3660
|
+
argumentHint: "<directory>",
|
|
3661
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3662
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3663
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
3664
|
+
const config = context.services.config;
|
|
3665
|
+
if (!config) return message(t("Config not loaded."), "error");
|
|
3666
|
+
const directoryName = args.trim();
|
|
3667
|
+
if (!directoryName) {
|
|
3668
|
+
return message(t("Usage: /curator restore <directory>"), "error");
|
|
3669
|
+
}
|
|
3670
|
+
const blocked = mutationGuard(config);
|
|
3671
|
+
if (blocked) return blocked;
|
|
3672
|
+
try {
|
|
3673
|
+
await restoreArchivedAutoSkill(config.getProjectRoot(), directoryName);
|
|
3674
|
+
await refreshSkillCache(config);
|
|
3675
|
+
return message(
|
|
3676
|
+
t("Restored auto-skill: {{name}}", { name: directoryName })
|
|
3677
|
+
);
|
|
3678
|
+
} catch (error) {
|
|
3679
|
+
return message(
|
|
3680
|
+
t("Failed to restore auto-skill: {{message}}", {
|
|
3681
|
+
message: error instanceof Error ? error.message : String(error)
|
|
3682
|
+
}),
|
|
3683
|
+
"error"
|
|
3684
|
+
);
|
|
3685
|
+
}
|
|
3686
|
+
}, "action"),
|
|
3687
|
+
completion: /* @__PURE__ */ __name(async (context, partialArg) => {
|
|
3688
|
+
const config = context.services.config;
|
|
3689
|
+
if (!config) return [];
|
|
3690
|
+
try {
|
|
3691
|
+
const status = await getAutoSkillCuratorStatus(config.getProjectRoot());
|
|
3692
|
+
return status.archived.map((entry) => entry.directoryName).filter((name) => name.startsWith(partialArg));
|
|
3693
|
+
} catch {
|
|
3694
|
+
return [];
|
|
3695
|
+
}
|
|
3696
|
+
}, "completion")
|
|
3697
|
+
};
|
|
3698
|
+
function pinCommand(name, pinned) {
|
|
3699
|
+
return {
|
|
3700
|
+
name,
|
|
3701
|
+
get description() {
|
|
3702
|
+
return pinned ? t("Exclude an auto-skill from automatic maintenance.") : t("Return a pinned auto-skill to automatic maintenance.");
|
|
3703
|
+
},
|
|
3704
|
+
argumentHint: "<directory>",
|
|
3705
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3706
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3707
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
3708
|
+
const config = context.services.config;
|
|
3709
|
+
if (!config) return message(t("Config not loaded."), "error");
|
|
3710
|
+
const directoryName = args.trim();
|
|
3711
|
+
if (!directoryName) {
|
|
3712
|
+
return message(
|
|
3713
|
+
pinned ? t("Usage: /curator pin <directory>") : t("Usage: /curator unpin <directory>"),
|
|
3714
|
+
"error"
|
|
3715
|
+
);
|
|
3716
|
+
}
|
|
3717
|
+
const blocked = mutationGuard(config);
|
|
3718
|
+
if (blocked) return blocked;
|
|
3719
|
+
try {
|
|
3720
|
+
await setAutoSkillPinned(
|
|
3721
|
+
config.getProjectRoot(),
|
|
3722
|
+
directoryName,
|
|
3723
|
+
pinned
|
|
3724
|
+
);
|
|
3725
|
+
return message(
|
|
3726
|
+
pinned ? t("Pinned auto-skill: {{name}}", { name: directoryName }) : t("Unpinned auto-skill: {{name}}", { name: directoryName })
|
|
3727
|
+
);
|
|
3728
|
+
} catch (error) {
|
|
3729
|
+
return message(
|
|
3730
|
+
t("Failed to update auto-skill pin: {{message}}", {
|
|
3731
|
+
message: error instanceof Error ? error.message : String(error)
|
|
3732
|
+
}),
|
|
3733
|
+
"error"
|
|
3734
|
+
);
|
|
3735
|
+
}
|
|
3736
|
+
}, "action"),
|
|
3737
|
+
completion: /* @__PURE__ */ __name(async (context, partialArg) => {
|
|
3738
|
+
const config = context.services.config;
|
|
3739
|
+
if (!config) return [];
|
|
3740
|
+
try {
|
|
3741
|
+
const status = await getAutoSkillCuratorStatus(config.getProjectRoot());
|
|
3742
|
+
return [...status.active, ...status.stale].filter((entry) => entry.pinned !== pinned).map((entry) => entry.directoryName).filter((directoryName) => directoryName.startsWith(partialArg));
|
|
3743
|
+
} catch {
|
|
3744
|
+
return [];
|
|
3745
|
+
}
|
|
3746
|
+
}, "completion")
|
|
3747
|
+
};
|
|
3748
|
+
}
|
|
3749
|
+
__name(pinCommand, "pinCommand");
|
|
3750
|
+
var pinAutoSkillCommand = pinCommand("pin", true);
|
|
3751
|
+
var unpinAutoSkillCommand = pinCommand("unpin", false);
|
|
3752
|
+
var curatorCommand = {
|
|
3753
|
+
name: "curator",
|
|
3754
|
+
get description() {
|
|
3755
|
+
return t("Maintain project auto-skills based on recent use.");
|
|
3756
|
+
},
|
|
3757
|
+
argumentHint: "[status|run [--dry-run]|pin <directory>|unpin <directory>|restore <directory>]",
|
|
3758
|
+
kind: "built-in" /* BUILT_IN */,
|
|
3759
|
+
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
3760
|
+
action: statusAction,
|
|
3761
|
+
subCommands: [
|
|
3762
|
+
statusCommand,
|
|
3763
|
+
runCommand,
|
|
3764
|
+
pinAutoSkillCommand,
|
|
3765
|
+
unpinAutoSkillCommand,
|
|
3766
|
+
restoreCommand
|
|
3767
|
+
]
|
|
3768
|
+
};
|
|
3769
|
+
|
|
3466
3770
|
// packages/cli/src/ui/commands/copyCommand.ts
|
|
3467
3771
|
init_esbuild_shims();
|
|
3468
3772
|
function parseFencedCodeBlocks(markdown) {
|
|
@@ -3765,12 +4069,12 @@ var copyCommand = {
|
|
|
3765
4069
|
content: selectedCodeBlock ? `${selectedCodeBlock.label} copied to the clipboard` : isIndexed ? `AI message ${messageIndex} copied to the clipboard` : "Last output copied to the clipboard"
|
|
3766
4070
|
};
|
|
3767
4071
|
} catch (error) {
|
|
3768
|
-
const
|
|
3769
|
-
context.services.config?.getDebugLogger().debug(
|
|
4072
|
+
const message2 = error instanceof Error ? error.message : String(error);
|
|
4073
|
+
context.services.config?.getDebugLogger().debug(message2);
|
|
3770
4074
|
return {
|
|
3771
4075
|
type: "message",
|
|
3772
4076
|
messageType: "error",
|
|
3773
|
-
content: `Failed to copy to the clipboard. ${
|
|
4077
|
+
content: `Failed to copy to the clipboard. ${message2}`
|
|
3774
4078
|
};
|
|
3775
4079
|
}
|
|
3776
4080
|
} else {
|
|
@@ -4614,8 +4918,8 @@ function formatErrorMessage2(error) {
|
|
|
4614
4918
|
}
|
|
4615
4919
|
__name(formatErrorMessage2, "formatErrorMessage");
|
|
4616
4920
|
function formatHeapSnapshotErrorMessage(error) {
|
|
4617
|
-
const
|
|
4618
|
-
return
|
|
4921
|
+
const message2 = formatErrorMessage2(error);
|
|
4922
|
+
return message2.startsWith("Heap snapshot") ? message2 : `${t("Heap snapshot failed:")} ${message2}`;
|
|
4619
4923
|
}
|
|
4620
4924
|
__name(formatHeapSnapshotErrorMessage, "formatHeapSnapshotErrorMessage");
|
|
4621
4925
|
var doctorCommand = {
|
|
@@ -6049,147 +6353,256 @@ var CLEAR_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
6049
6353
|
"none",
|
|
6050
6354
|
"cancel"
|
|
6051
6355
|
]);
|
|
6052
|
-
function
|
|
6053
|
-
return
|
|
6054
|
-
}
|
|
6055
|
-
__name(
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
switch (kind) {
|
|
6356
|
+
function formatLegacyTurns(count) {
|
|
6357
|
+
return `${count} ${count === 1 ? "turn" : "turns"}`;
|
|
6358
|
+
}
|
|
6359
|
+
__name(formatLegacyTurns, "formatLegacyTurns");
|
|
6360
|
+
function assertNeverTerminalKind(kind) {
|
|
6361
|
+
throw new Error(`Unexpected GoalTerminalKind: ${kind}`);
|
|
6362
|
+
}
|
|
6363
|
+
__name(assertNeverTerminalKind, "assertNeverTerminalKind");
|
|
6364
|
+
function formatLegacyTerminalSummary(event) {
|
|
6365
|
+
let title;
|
|
6366
|
+
switch (event.kind) {
|
|
6064
6367
|
case "achieved":
|
|
6065
|
-
|
|
6368
|
+
title = "Goal achieved";
|
|
6369
|
+
break;
|
|
6066
6370
|
case "failed":
|
|
6067
|
-
|
|
6371
|
+
title = "Goal could not be achieved";
|
|
6372
|
+
break;
|
|
6068
6373
|
case "aborted":
|
|
6069
|
-
|
|
6374
|
+
title = "Goal aborted";
|
|
6375
|
+
break;
|
|
6070
6376
|
default:
|
|
6071
|
-
|
|
6377
|
+
title = assertNeverTerminalKind(event.kind);
|
|
6072
6378
|
}
|
|
6073
|
-
}
|
|
6074
|
-
__name(terminalGoalTitle, "terminalGoalTitle");
|
|
6075
|
-
function formatTerminalSummary(event) {
|
|
6076
|
-
const title = terminalGoalTitle(event.kind);
|
|
6077
6379
|
const stats = [];
|
|
6078
|
-
if (event.iterations > 0) stats.push(
|
|
6079
|
-
if (typeof event.durationMs === "number")
|
|
6380
|
+
if (event.iterations > 0) stats.push(formatLegacyTurns(event.iterations));
|
|
6381
|
+
if (typeof event.durationMs === "number") {
|
|
6080
6382
|
stats.push(formatDuration(event.durationMs, { hideTrailingZeros: true }));
|
|
6383
|
+
}
|
|
6081
6384
|
const subtitle = stats.length > 0 ? ` \xB7 ${stats.join(" \xB7 ")}` : "";
|
|
6082
6385
|
const reason = event.lastReason?.trim();
|
|
6083
|
-
const reasonLine = reason ? `
|
|
6084
|
-
Last check: ${reason}` : "";
|
|
6085
6386
|
return `${title}${subtitle}
|
|
6086
|
-
Goal: ${event.condition}${
|
|
6387
|
+
Goal: ${event.condition}${reason ? `
|
|
6388
|
+
Last check: ${reason}` : ""}`;
|
|
6087
6389
|
}
|
|
6088
|
-
__name(
|
|
6089
|
-
function
|
|
6090
|
-
|
|
6390
|
+
__name(formatLegacyTerminalSummary, "formatLegacyTerminalSummary");
|
|
6391
|
+
async function runLegacyGoalCommand(context, args, explicitSet = false) {
|
|
6392
|
+
const { config } = context.services;
|
|
6393
|
+
if (!config) return errorMessage("Configuration is not available.");
|
|
6394
|
+
const sessionId = config.getSessionId();
|
|
6395
|
+
const objective = args.trim();
|
|
6396
|
+
if (!objective) {
|
|
6397
|
+
const active = getActiveGoal(sessionId);
|
|
6398
|
+
if (active) {
|
|
6399
|
+
const turns = active.iterations === 0 ? "not yet evaluated" : formatLegacyTurns(active.iterations);
|
|
6400
|
+
return {
|
|
6401
|
+
type: "message",
|
|
6402
|
+
messageType: "info",
|
|
6403
|
+
content: `Goal active: ${active.condition} (${turns})${active.lastReason ? `
|
|
6404
|
+
Last check: ${active.lastReason}` : ""}`
|
|
6405
|
+
};
|
|
6406
|
+
}
|
|
6407
|
+
const terminal = getLastGoalTerminal(sessionId);
|
|
6408
|
+
return {
|
|
6409
|
+
type: "message",
|
|
6410
|
+
messageType: "info",
|
|
6411
|
+
content: terminal ? formatLegacyTerminalSummary(terminal) : "No goal set. Usage: `/goal <condition>` (or `/goal clear`)."
|
|
6412
|
+
};
|
|
6413
|
+
}
|
|
6414
|
+
if (!explicitSet && CLEAR_KEYWORDS.has(objective.toLowerCase())) {
|
|
6415
|
+
const cleared = unregisterGoalHook(config, sessionId);
|
|
6416
|
+
if (!cleared) {
|
|
6417
|
+
return {
|
|
6418
|
+
type: "message",
|
|
6419
|
+
messageType: "info",
|
|
6420
|
+
content: "No goal set."
|
|
6421
|
+
};
|
|
6422
|
+
}
|
|
6423
|
+
const item = {
|
|
6424
|
+
type: "goal_status" /* GOAL_STATUS */,
|
|
6425
|
+
kind: "cleared",
|
|
6426
|
+
condition: cleared.condition,
|
|
6427
|
+
iterations: cleared.iterations,
|
|
6428
|
+
durationMs: Date.now() - cleared.setAt
|
|
6429
|
+
};
|
|
6430
|
+
context.ui.addItem(item, Date.now());
|
|
6431
|
+
return {
|
|
6432
|
+
type: "message",
|
|
6433
|
+
messageType: "info",
|
|
6434
|
+
content: `Goal cleared: ${cleared.condition}`
|
|
6435
|
+
};
|
|
6436
|
+
}
|
|
6437
|
+
if (!config.isTrustedFolder()) {
|
|
6438
|
+
return errorMessage(
|
|
6439
|
+
"/goal is only available in trusted workspaces. Trust this folder via `/trust` and try again."
|
|
6440
|
+
);
|
|
6441
|
+
}
|
|
6442
|
+
if (config.getDisableAllHooks()) {
|
|
6443
|
+
return errorMessage(
|
|
6444
|
+
"/goal is disabled because hooks are turned off in this session (`disableAllHooks` or bare mode)."
|
|
6445
|
+
);
|
|
6446
|
+
}
|
|
6447
|
+
if (!config.getHookSystem()) {
|
|
6448
|
+
return errorMessage(
|
|
6449
|
+
"Hook system is not initialized; cannot set a /goal in this session."
|
|
6450
|
+
);
|
|
6451
|
+
}
|
|
6452
|
+
let registered;
|
|
6453
|
+
try {
|
|
6454
|
+
registered = registerGoalHook({
|
|
6455
|
+
config,
|
|
6456
|
+
sessionId,
|
|
6457
|
+
condition: objective,
|
|
6458
|
+
tokensAtStart: 0
|
|
6459
|
+
});
|
|
6460
|
+
} catch (error) {
|
|
6461
|
+
return errorMessage(
|
|
6462
|
+
`Failed to set goal: ${error instanceof Error ? error.message : String(error)}`
|
|
6463
|
+
);
|
|
6464
|
+
}
|
|
6465
|
+
context.ui.addItem(
|
|
6466
|
+
{
|
|
6467
|
+
type: "goal_status" /* GOAL_STATUS */,
|
|
6468
|
+
kind: "set",
|
|
6469
|
+
condition: registered.condition,
|
|
6470
|
+
setAt: registered.setAt
|
|
6471
|
+
},
|
|
6472
|
+
Date.now()
|
|
6473
|
+
);
|
|
6474
|
+
installGoalTerminalObserver({
|
|
6475
|
+
sessionId,
|
|
6476
|
+
config,
|
|
6477
|
+
addItem: context.ui.addItem
|
|
6478
|
+
});
|
|
6479
|
+
const result = {
|
|
6480
|
+
type: "submit_prompt",
|
|
6481
|
+
content: [
|
|
6482
|
+
{
|
|
6483
|
+
text: `A session-scoped Stop hook is now active with condition: "${objective.replace(/[\r\n]+/g, " ").replace(/"/g, "'")}". Briefly acknowledge the goal, then immediately start (or continue) working toward it \u2014 treat the condition itself as your directive and do not pause to ask the user what to do. The hook will block stopping until the condition holds. It auto-clears once the condition is met \u2014 do not tell the user to run \`/goal clear\` after success; that is only for clearing a goal early.`
|
|
6484
|
+
}
|
|
6485
|
+
]
|
|
6486
|
+
};
|
|
6487
|
+
return result;
|
|
6091
6488
|
}
|
|
6092
|
-
__name(
|
|
6489
|
+
__name(runLegacyGoalCommand, "runLegacyGoalCommand");
|
|
6490
|
+
function parseGoalCommand(args) {
|
|
6491
|
+
let input = args.trim();
|
|
6492
|
+
if (/^\/goal(?:\s|$)/i.test(input)) {
|
|
6493
|
+
input = input.slice("/goal".length).trim();
|
|
6494
|
+
}
|
|
6495
|
+
if (!input) return { kind: "status" };
|
|
6496
|
+
const [head = "", ...tail] = input.split(/\s+/);
|
|
6497
|
+
const keyword = head.toLowerCase();
|
|
6498
|
+
const objective = tail.join(" ").trim();
|
|
6499
|
+
if (keyword === "set") {
|
|
6500
|
+
return objective ? { kind: "set", objective } : { kind: "error", message: "`/goal set` requires an objective." };
|
|
6501
|
+
}
|
|
6502
|
+
if (keyword === "edit") {
|
|
6503
|
+
return objective ? { kind: "edit", objective } : { kind: "error", message: "`/goal edit` requires an objective." };
|
|
6504
|
+
}
|
|
6505
|
+
if (tail.length === 0) {
|
|
6506
|
+
if (keyword === "pause") return { kind: "pause" };
|
|
6507
|
+
if (keyword === "resume") return { kind: "resume" };
|
|
6508
|
+
if (CLEAR_KEYWORDS.has(keyword)) return { kind: "clear" };
|
|
6509
|
+
}
|
|
6510
|
+
return { kind: "set", objective: input };
|
|
6511
|
+
}
|
|
6512
|
+
__name(parseGoalCommand, "parseGoalCommand");
|
|
6093
6513
|
function errorMessage(content) {
|
|
6094
6514
|
return { type: "message", messageType: "error", content };
|
|
6095
6515
|
}
|
|
6096
6516
|
__name(errorMessage, "errorMessage");
|
|
6517
|
+
function goalControl(operation, response, cause) {
|
|
6518
|
+
return {
|
|
6519
|
+
type: "goal_control",
|
|
6520
|
+
operation,
|
|
6521
|
+
response,
|
|
6522
|
+
...cause ? { cause } : {}
|
|
6523
|
+
};
|
|
6524
|
+
}
|
|
6525
|
+
__name(goalControl, "goalControl");
|
|
6097
6526
|
var goalCommand = {
|
|
6098
6527
|
name: "goal",
|
|
6099
6528
|
get description() {
|
|
6100
|
-
return t("Set
|
|
6529
|
+
return t("Set or control a session goal");
|
|
6101
6530
|
},
|
|
6102
|
-
argumentHint: "[<
|
|
6531
|
+
argumentHint: "[<objective> | set <objective> | edit <objective> | pause | resume | clear]",
|
|
6103
6532
|
kind: "built-in" /* BUILT_IN */,
|
|
6104
6533
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
6105
6534
|
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
if (q === "") {
|
|
6113
|
-
const active = getActiveGoal(sessionId);
|
|
6114
|
-
if (active) {
|
|
6115
|
-
const turns = active.iterations === 0 ? "not yet evaluated" : formatTurns(active.iterations);
|
|
6116
|
-
const lastReason = active.lastReason ? `
|
|
6117
|
-
Last check: ${active.lastReason}` : "";
|
|
6118
|
-
return infoMessage(
|
|
6119
|
-
`Goal active: ${active.condition} (${turns})${lastReason}`
|
|
6535
|
+
if (context.executionMode !== "interactive") {
|
|
6536
|
+
const operation2 = parseGoalCommand(args);
|
|
6537
|
+
if (operation2.kind === "error") return errorMessage(operation2.message);
|
|
6538
|
+
if (operation2.kind !== "status" && operation2.kind !== "clear" && operation2.kind !== "set") {
|
|
6539
|
+
return errorMessage(
|
|
6540
|
+
`'/goal ${operation2.kind}' is only available in interactive mode.`
|
|
6120
6541
|
);
|
|
6121
6542
|
}
|
|
6122
|
-
const
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
);
|
|
6129
|
-
}
|
|
6130
|
-
if (CLEAR_KEYWORDS.has(q.toLowerCase())) {
|
|
6131
|
-
const cleared = unregisterGoalHook(config, sessionId);
|
|
6132
|
-
if (!cleared) {
|
|
6133
|
-
return infoMessage("No goal set.");
|
|
6134
|
-
}
|
|
6135
|
-
const clearedItem = {
|
|
6136
|
-
type: "goal_status" /* GOAL_STATUS */,
|
|
6137
|
-
kind: "cleared",
|
|
6138
|
-
condition: cleared.condition,
|
|
6139
|
-
iterations: cleared.iterations,
|
|
6140
|
-
durationMs: Date.now() - cleared.setAt
|
|
6543
|
+
const explicitSet = operation2.kind === "set";
|
|
6544
|
+
const legacyArgs = explicitSet ? operation2.objective : args;
|
|
6545
|
+
return await runLegacyGoalCommand(context, legacyArgs, explicitSet) ?? {
|
|
6546
|
+
type: "message",
|
|
6547
|
+
messageType: "info",
|
|
6548
|
+
content: "Command executed successfully."
|
|
6141
6549
|
};
|
|
6142
|
-
context.ui.addItem(clearedItem, Date.now());
|
|
6143
|
-
if (context.executionMode !== "interactive") {
|
|
6144
|
-
return infoMessage(`Goal cleared: ${cleared.condition}`);
|
|
6145
|
-
}
|
|
6146
|
-
return;
|
|
6147
6550
|
}
|
|
6148
|
-
|
|
6551
|
+
const { config } = context.services;
|
|
6552
|
+
if (!config) return errorMessage("Configuration is not available.");
|
|
6553
|
+
const operation = parseGoalCommand(args);
|
|
6554
|
+
if (operation.kind === "error") return errorMessage(operation.message);
|
|
6555
|
+
const requiresTrustedFolder = operation.kind === "set" || operation.kind === "edit" || operation.kind === "resume";
|
|
6556
|
+
if (requiresTrustedFolder && !config.isTrustedFolder()) {
|
|
6149
6557
|
return errorMessage(
|
|
6150
6558
|
"/goal is only available in trusted workspaces. Trust this folder via `/trust` and try again."
|
|
6151
6559
|
);
|
|
6152
6560
|
}
|
|
6153
|
-
if (config.getDisableAllHooks()) {
|
|
6154
|
-
return errorMessage(
|
|
6155
|
-
"/goal is disabled because hooks are turned off in this session (`disableAllHooks` or bare mode)."
|
|
6156
|
-
);
|
|
6157
|
-
}
|
|
6158
|
-
if (!config.getHookSystem()) {
|
|
6159
|
-
return errorMessage(
|
|
6160
|
-
"Hook system is not initialized; cannot set a /goal in this session."
|
|
6161
|
-
);
|
|
6162
|
-
}
|
|
6163
|
-
let registered;
|
|
6164
6561
|
try {
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6562
|
+
const runtime = await config.getGoalRuntimeReady();
|
|
6563
|
+
const snapshot = runtime.getSnapshot();
|
|
6564
|
+
if (operation.kind === "status") {
|
|
6565
|
+
return goalControl(operation, { snapshot });
|
|
6566
|
+
}
|
|
6567
|
+
const current = snapshot.goal;
|
|
6568
|
+
if (operation.kind === "set") {
|
|
6569
|
+
const request2 = current ? {
|
|
6570
|
+
action: "replace",
|
|
6571
|
+
objective: operation.objective,
|
|
6572
|
+
expectedGoalId: current.goalId,
|
|
6573
|
+
expectedRevision: current.revision
|
|
6574
|
+
} : { action: "create", objective: operation.objective };
|
|
6575
|
+
return goalControl(
|
|
6576
|
+
operation,
|
|
6577
|
+
await runtime.dispatch(request2),
|
|
6578
|
+
request2.action
|
|
6579
|
+
);
|
|
6580
|
+
}
|
|
6581
|
+
if (!current) {
|
|
6582
|
+
if (operation.kind === "clear") {
|
|
6583
|
+
return goalControl(operation, { snapshot });
|
|
6584
|
+
}
|
|
6585
|
+
return errorMessage(`Cannot ${operation.kind}: no Goal is active.`);
|
|
6586
|
+
}
|
|
6587
|
+
const version = {
|
|
6588
|
+
expectedGoalId: current.goalId,
|
|
6589
|
+
expectedRevision: current.revision
|
|
6590
|
+
};
|
|
6591
|
+
const request = operation.kind === "edit" ? {
|
|
6592
|
+
action: "edit",
|
|
6593
|
+
objective: operation.objective,
|
|
6594
|
+
...version
|
|
6595
|
+
} : { action: operation.kind, ...version };
|
|
6596
|
+
return goalControl(
|
|
6597
|
+
operation,
|
|
6598
|
+
await runtime.dispatch(request),
|
|
6599
|
+
request.action
|
|
6600
|
+
);
|
|
6601
|
+
} catch (error) {
|
|
6172
6602
|
return errorMessage(
|
|
6173
|
-
|
|
6603
|
+
error instanceof Error ? error.message : String(error)
|
|
6174
6604
|
);
|
|
6175
6605
|
}
|
|
6176
|
-
const setItem = {
|
|
6177
|
-
type: "goal_status" /* GOAL_STATUS */,
|
|
6178
|
-
kind: "set",
|
|
6179
|
-
condition: registered.condition,
|
|
6180
|
-
setAt: registered.setAt
|
|
6181
|
-
};
|
|
6182
|
-
context.ui.addItem(setItem, Date.now());
|
|
6183
|
-
installGoalTerminalObserver({
|
|
6184
|
-
sessionId,
|
|
6185
|
-
config,
|
|
6186
|
-
addItem: context.ui.addItem
|
|
6187
|
-
});
|
|
6188
|
-
const result = {
|
|
6189
|
-
type: "submit_prompt",
|
|
6190
|
-
content: [{ text: goalInstructionPrompt(q) }]
|
|
6191
|
-
};
|
|
6192
|
-
return result;
|
|
6193
6606
|
}, "action")
|
|
6194
6607
|
};
|
|
6195
6608
|
|
|
@@ -6200,6 +6613,7 @@ var helpCommand = {
|
|
|
6200
6613
|
altNames: ["?"],
|
|
6201
6614
|
kind: "built-in" /* BUILT_IN */,
|
|
6202
6615
|
supportedModes: ["interactive"],
|
|
6616
|
+
canRunDuringStreaming: true,
|
|
6203
6617
|
get description() {
|
|
6204
6618
|
return t("for help on Qwen Code");
|
|
6205
6619
|
},
|
|
@@ -6268,7 +6682,7 @@ var expandNowCommand = {
|
|
|
6268
6682
|
content: t("History is already expanded in this session.")
|
|
6269
6683
|
};
|
|
6270
6684
|
}
|
|
6271
|
-
const { expandCollapsedHistory } = await import("./resumeHistoryUtils-
|
|
6685
|
+
const { expandCollapsedHistory } = await import("./resumeHistoryUtils-5JS6R3AJ.js");
|
|
6272
6686
|
const updated = expandCollapsedHistory(history);
|
|
6273
6687
|
loadHistory(updated);
|
|
6274
6688
|
refreshStatic();
|
|
@@ -6383,6 +6797,13 @@ function getHookExitCodes(eventName) {
|
|
|
6383
6797
|
{ code: 0, description: t("command completes successfully") },
|
|
6384
6798
|
{ code: "Other", description: t("show stderr to user only") }
|
|
6385
6799
|
],
|
|
6800
|
+
["SessionDelete" /* SessionDelete */]: [
|
|
6801
|
+
{ code: 0, description: t("fire-and-forget; exit status is ignored") },
|
|
6802
|
+
{
|
|
6803
|
+
code: "Other",
|
|
6804
|
+
description: t("fire-and-forget; exit status is ignored")
|
|
6805
|
+
}
|
|
6806
|
+
],
|
|
6386
6807
|
["SubagentStart" /* SubagentStart */]: [
|
|
6387
6808
|
{ code: 0, description: t("stdout shown to subagent") },
|
|
6388
6809
|
{
|
|
@@ -6480,6 +6901,9 @@ function getHookShortDescription(eventName) {
|
|
|
6480
6901
|
"When the turn ends due to an API error (fires instead of Stop)"
|
|
6481
6902
|
),
|
|
6482
6903
|
["SessionEnd" /* SessionEnd */]: t("When a session is ending"),
|
|
6904
|
+
["SessionDelete" /* SessionDelete */]: t(
|
|
6905
|
+
"After an explicitly selected session is deleted"
|
|
6906
|
+
),
|
|
6483
6907
|
["PermissionRequest" /* PermissionRequest */]: t(
|
|
6484
6908
|
"When a permission dialog is displayed"
|
|
6485
6909
|
),
|
|
@@ -6528,6 +6952,9 @@ function getHookDescription(eventName) {
|
|
|
6528
6952
|
["SessionEnd" /* SessionEnd */]: t(
|
|
6529
6953
|
"Input to command is JSON with session end reason."
|
|
6530
6954
|
),
|
|
6955
|
+
["SessionDelete" /* SessionDelete */]: t(
|
|
6956
|
+
"Input to command is JSON with deleted_session_id. It runs after an explicitly selected session is deleted; output and failures are ignored."
|
|
6957
|
+
),
|
|
6531
6958
|
["SubagentStart" /* SubagentStart */]: t(
|
|
6532
6959
|
"Input to command is JSON with agent_id and agent_type."
|
|
6533
6960
|
),
|
|
@@ -6806,16 +7233,16 @@ function formatFileList(openFiles) {
|
|
|
6806
7233
|
const basename3 = path6.basename(file.path);
|
|
6807
7234
|
const isDuplicate = (basenameCounts.get(basename3) || 0) > 1;
|
|
6808
7235
|
const parentDir = path6.basename(path6.dirname(file.path));
|
|
6809
|
-
const
|
|
6810
|
-
return ` - ${
|
|
7236
|
+
const displayName2 = isDuplicate ? `${basename3} (/${parentDir})` : basename3;
|
|
7237
|
+
return ` - ${displayName2}${file.isActive ? " (active)" : ""}`;
|
|
6811
7238
|
}).join("\n");
|
|
6812
|
-
const
|
|
7239
|
+
const infoMessage = `
|
|
6813
7240
|
(Note: The file list is limited to a number of recently accessed files within your workspace and only includes local files on disk)`;
|
|
6814
7241
|
return `
|
|
6815
7242
|
|
|
6816
7243
|
Open files:
|
|
6817
7244
|
${fileList}
|
|
6818
|
-
${
|
|
7245
|
+
${infoMessage}`;
|
|
6819
7246
|
}
|
|
6820
7247
|
__name(formatFileList, "formatFileList");
|
|
6821
7248
|
async function getIdeStatusMessageWithFiles(ideClient) {
|
|
@@ -6891,7 +7318,7 @@ var ideCommand = /* @__PURE__ */ __name(async () => {
|
|
|
6891
7318
|
supportedModes: ["interactive"],
|
|
6892
7319
|
subCommands: []
|
|
6893
7320
|
};
|
|
6894
|
-
const
|
|
7321
|
+
const statusCommand2 = {
|
|
6895
7322
|
name: "status",
|
|
6896
7323
|
get description() {
|
|
6897
7324
|
return t("check status of IDE integration");
|
|
@@ -7041,11 +7468,11 @@ var ideCommand = /* @__PURE__ */ __name(async () => {
|
|
|
7041
7468
|
const { status } = ideClient.getConnectionStatus();
|
|
7042
7469
|
const isConnected = status === "connected" /* Connected */;
|
|
7043
7470
|
if (isConnected) {
|
|
7044
|
-
ideSlashCommand.subCommands = [
|
|
7471
|
+
ideSlashCommand.subCommands = [statusCommand2, disableCommand];
|
|
7045
7472
|
} else {
|
|
7046
7473
|
ideSlashCommand.subCommands = [
|
|
7047
7474
|
enableCommand,
|
|
7048
|
-
|
|
7475
|
+
statusCommand2,
|
|
7049
7476
|
installCommand2
|
|
7050
7477
|
];
|
|
7051
7478
|
}
|
|
@@ -8236,6 +8663,7 @@ init_esbuild_shims();
|
|
|
8236
8663
|
var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model without arguments to choose from configured models.";
|
|
8237
8664
|
var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --fast without a model to choose from configured models.";
|
|
8238
8665
|
var VISION_MODEL_CONFIGURATION_HINT = "Configure an image-capable model in settings.modelProviders and ensure the required environment variables are set. Run /model --vision <model-id> to set it, or leave it unset to auto-pick a same-provider vision model.";
|
|
8666
|
+
var COMPACTION_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --compaction without a model to choose from configured models.";
|
|
8239
8667
|
var IMAGE_MODEL_CONFIGURATION_HINT = "Configure a model with imageOnly: true, baseUrl, and envKey in settings.modelProviders. Run /model --image <model-id> to select it.";
|
|
8240
8668
|
function parseScopeFlags(args) {
|
|
8241
8669
|
let scopeOverride;
|
|
@@ -8303,7 +8731,7 @@ function formatUnavailableModelMessage(kind, modelName, authType, availableModel
|
|
|
8303
8731
|
new Set(availableModels.map((model) => model.id))
|
|
8304
8732
|
);
|
|
8305
8733
|
const availableModelsLine = availableModelIds.length === 0 ? `No models are configured for auth type '${authType}'.` : `Available models for '${authType}': ${availableModelIds.join(", ")}.`;
|
|
8306
|
-
const hint = kind === "Fast model" ? FAST_MODEL_CONFIGURATION_HINT : kind === "Vision model" ? VISION_MODEL_CONFIGURATION_HINT : kind === "Image model" ? IMAGE_MODEL_CONFIGURATION_HINT : MAIN_MODEL_CONFIGURATION_HINT;
|
|
8734
|
+
const hint = kind === "Fast model" ? FAST_MODEL_CONFIGURATION_HINT : kind === "Vision model" ? VISION_MODEL_CONFIGURATION_HINT : kind === "Compaction model" ? COMPACTION_MODEL_CONFIGURATION_HINT : kind === "Image model" ? IMAGE_MODEL_CONFIGURATION_HINT : MAIN_MODEL_CONFIGURATION_HINT;
|
|
8307
8735
|
return `${kind} '${modelName}' is not available for auth type '${authType}'.
|
|
8308
8736
|
${availableModelsLine}
|
|
8309
8737
|
` + hint;
|
|
@@ -8337,6 +8765,15 @@ function formatUnavailableVisionModelMessage(modelName, availableModels) {
|
|
|
8337
8765
|
);
|
|
8338
8766
|
}
|
|
8339
8767
|
__name(formatUnavailableVisionModelMessage, "formatUnavailableVisionModelMessage");
|
|
8768
|
+
function formatUnavailableCompactionModelMessage(modelName, availableModels) {
|
|
8769
|
+
return formatUnavailableAuxModelMessage(
|
|
8770
|
+
"Compaction model",
|
|
8771
|
+
modelName,
|
|
8772
|
+
availableModels,
|
|
8773
|
+
COMPACTION_MODEL_CONFIGURATION_HINT
|
|
8774
|
+
);
|
|
8775
|
+
}
|
|
8776
|
+
__name(formatUnavailableCompactionModelMessage, "formatUnavailableCompactionModelMessage");
|
|
8340
8777
|
function formatUnavailableImageModelMessage(modelName, availableModels) {
|
|
8341
8778
|
return formatUnavailableAuxModelMessage(
|
|
8342
8779
|
"Image model",
|
|
@@ -8400,9 +8837,10 @@ function getAvailableModelIds(context, mode = "main") {
|
|
|
8400
8837
|
const availableModels = models.filter((m) => {
|
|
8401
8838
|
if (mode === "image")
|
|
8402
8839
|
return m.imageOnly === true && !m.fastOnly && !m.voiceOnly;
|
|
8403
|
-
if (mode === "
|
|
8404
|
-
if (mode === "
|
|
8405
|
-
return !m.fastOnly && !m.
|
|
8840
|
+
if (mode === "vision") return !m.fastOnly && !m.voiceOnly && !m.imageOnly;
|
|
8841
|
+
if (mode === "fast") return !m.voiceOnly && !m.imageOnly && !m.visionOnly;
|
|
8842
|
+
if (mode === "voice") return !m.fastOnly && !m.imageOnly && !m.visionOnly;
|
|
8843
|
+
return !m.fastOnly && !m.voiceOnly && !m.imageOnly && !m.visionOnly;
|
|
8406
8844
|
});
|
|
8407
8845
|
return availableModels.map((model) => model.id);
|
|
8408
8846
|
}
|
|
@@ -8412,10 +8850,10 @@ var modelCommand = {
|
|
|
8412
8850
|
completionPriority: 100,
|
|
8413
8851
|
get description() {
|
|
8414
8852
|
return t(
|
|
8415
|
-
"Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, --vision for the vision bridge model, --image for the image generation model, --project to persist to project settings, --global to persist to user settings, [model-id] to switch immediately, or [model-id] [prompt] to run a one-off prompt on another model; the inline prompt is sent verbatim without @file expansion)."
|
|
8853
|
+
"Switch the model for this session (--fast for suggestion model, --voice for voice transcription model, --vision for the vision bridge model, --compaction for chat compression model, --image for the image generation model, --project to persist to project settings, --global to persist to user settings, [model-id] to switch immediately, or [model-id] [prompt] to run a one-off prompt on another model; the inline prompt is sent verbatim without @file expansion)."
|
|
8416
8854
|
);
|
|
8417
8855
|
},
|
|
8418
|
-
argumentHint: "[--fast|--voice|--vision|--image] [--project|--global] [<model-id>] | <model-id> <prompt>",
|
|
8856
|
+
argumentHint: "[--fast|--voice|--vision|--compaction|--image] [--project|--global] [<model-id>] | <model-id> <prompt>",
|
|
8419
8857
|
kind: "built-in" /* BUILT_IN */,
|
|
8420
8858
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
8421
8859
|
completion: /* @__PURE__ */ __name(async (context, partialArg) => {
|
|
@@ -8437,6 +8875,12 @@ var modelCommand = {
|
|
|
8437
8875
|
"Set the image-capable model used to transcribe images for a text-only main model"
|
|
8438
8876
|
)
|
|
8439
8877
|
},
|
|
8878
|
+
{
|
|
8879
|
+
value: "--compaction",
|
|
8880
|
+
description: t(
|
|
8881
|
+
"Set the model used for chat compression (auto-compaction)"
|
|
8882
|
+
)
|
|
8883
|
+
},
|
|
8440
8884
|
{
|
|
8441
8885
|
value: "--image",
|
|
8442
8886
|
description: t("Set the model used to generate images")
|
|
@@ -8460,10 +8904,12 @@ var modelCommand = {
|
|
|
8460
8904
|
const trimmed = partialArg.trim();
|
|
8461
8905
|
if (trimmed) {
|
|
8462
8906
|
let mode = "main";
|
|
8463
|
-
const modelPrefix = trimmed.replace(/(?:^|\s)--fast(?:\s|$)/, " ").replace(/(?:^|\s)--voice(?:\s|$)/, " ").replace(/(?:^|\s)--vision(?:\s|$)/, " ").replace(/(?:^|\s)--image(?:\s|$)/, " ").replace(/(?:^|\s)--project(?:\s|$)/, " ").replace(/(?:^|\s)--global(?:\s|$)/, " ").trim();
|
|
8907
|
+
const modelPrefix = trimmed.replace(/(?:^|\s)--fast(?:\s|$)/, " ").replace(/(?:^|\s)--voice(?:\s|$)/, " ").replace(/(?:^|\s)--vision(?:\s|$)/, " ").replace(/(?:^|\s)--compaction(?:\s|$)/, " ").replace(/(?:^|\s)--image(?:\s|$)/, " ").replace(/(?:^|\s)--project(?:\s|$)/, " ").replace(/(?:^|\s)--global(?:\s|$)/, " ").trim();
|
|
8464
8908
|
if (/(?:^|\s)--fast(?:\s|$)/.test(trimmed)) mode = "fast";
|
|
8465
8909
|
else if (/(?:^|\s)--voice(?:\s|$)/.test(trimmed)) mode = "voice";
|
|
8466
8910
|
else if (/(?:^|\s)--vision(?:\s|$)/.test(trimmed)) mode = "vision";
|
|
8911
|
+
else if (/(?:^|\s)--compaction(?:\s|$)/.test(trimmed))
|
|
8912
|
+
mode = "compaction";
|
|
8467
8913
|
else if (/(?:^|\s)--image(?:\s|$)/.test(trimmed)) mode = "image";
|
|
8468
8914
|
return getAvailableModelIds(context, mode).filter(
|
|
8469
8915
|
(id) => id.startsWith(modelPrefix)
|
|
@@ -8536,7 +8982,7 @@ var modelCommand = {
|
|
|
8536
8982
|
content: t("Settings service not available.")
|
|
8537
8983
|
};
|
|
8538
8984
|
}
|
|
8539
|
-
const availableModels = config.getAllConfiguredModels().filter((m) => !m.fastOnly && !m.imageOnly);
|
|
8985
|
+
const availableModels = config.getAllConfiguredModels().filter((m) => !m.fastOnly && !m.imageOnly && !m.visionOnly);
|
|
8540
8986
|
const matches = availableModels.filter((model) => model.id === modelName2);
|
|
8541
8987
|
if (matches.length === 0) {
|
|
8542
8988
|
return {
|
|
@@ -8621,7 +9067,7 @@ Use "/model --fast <model-id>" to set fast model.`
|
|
|
8621
9067
|
content: formatUnavailableFastModelMessage(modelName2, [])
|
|
8622
9068
|
};
|
|
8623
9069
|
}
|
|
8624
|
-
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter((m) => !m.voiceOnly && !m.imageOnly);
|
|
9070
|
+
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter((m) => !m.voiceOnly && !m.imageOnly && !m.visionOnly);
|
|
8625
9071
|
if (!availableModels.some((model) => model.id === selector.modelId)) {
|
|
8626
9072
|
return {
|
|
8627
9073
|
type: "message",
|
|
@@ -8732,6 +9178,90 @@ ${formatNonVisionModelWarning(modelName2)}`;
|
|
|
8732
9178
|
content: t("Vision Model") + ": " + modelName2 + scopeSuffix + visionWarning
|
|
8733
9179
|
};
|
|
8734
9180
|
}
|
|
9181
|
+
const isCompactionModelCommand = args === "--compaction" || args.startsWith("--compaction ");
|
|
9182
|
+
if (isCompactionModelCommand) {
|
|
9183
|
+
const modelName2 = args.replace("--compaction", "").trim();
|
|
9184
|
+
if (!modelName2 || modelName2 === "clear") {
|
|
9185
|
+
if (modelName2 === "clear") {
|
|
9186
|
+
if (!settings) {
|
|
9187
|
+
return {
|
|
9188
|
+
type: "message",
|
|
9189
|
+
messageType: "error",
|
|
9190
|
+
content: t("Settings service not available.")
|
|
9191
|
+
};
|
|
9192
|
+
}
|
|
9193
|
+
persistSetting(settings, "compactionModel", void 0, scopeOverride);
|
|
9194
|
+
config.setCompactionModel(void 0);
|
|
9195
|
+
return {
|
|
9196
|
+
type: "message",
|
|
9197
|
+
messageType: "info",
|
|
9198
|
+
content: t("Compaction model override cleared") + scopeSuffix
|
|
9199
|
+
};
|
|
9200
|
+
}
|
|
9201
|
+
if (context.executionMode !== "interactive") {
|
|
9202
|
+
const compactionModel = context.services.settings?.merged?.compactionModel?.trim() || t("not set (falls back to the main model)");
|
|
9203
|
+
return {
|
|
9204
|
+
type: "message",
|
|
9205
|
+
messageType: "info",
|
|
9206
|
+
content: t(
|
|
9207
|
+
'Current compaction model: {{compactionModel}}\nUse "/model --compaction <model-id>" to set compaction model, or "/model --compaction clear" to clear the override.',
|
|
9208
|
+
{ compactionModel }
|
|
9209
|
+
)
|
|
9210
|
+
};
|
|
9211
|
+
}
|
|
9212
|
+
return {
|
|
9213
|
+
type: "dialog",
|
|
9214
|
+
dialog: "compaction-model",
|
|
9215
|
+
...persistScopeSpread(scopeOverride)
|
|
9216
|
+
};
|
|
9217
|
+
}
|
|
9218
|
+
if (!settings) {
|
|
9219
|
+
return {
|
|
9220
|
+
type: "message",
|
|
9221
|
+
messageType: "error",
|
|
9222
|
+
content: t("Settings service not available.")
|
|
9223
|
+
};
|
|
9224
|
+
}
|
|
9225
|
+
const selector = (() => {
|
|
9226
|
+
try {
|
|
9227
|
+
return resolveModelId(modelName2);
|
|
9228
|
+
} catch {
|
|
9229
|
+
return void 0;
|
|
9230
|
+
}
|
|
9231
|
+
})();
|
|
9232
|
+
if (!selector) {
|
|
9233
|
+
return {
|
|
9234
|
+
type: "message",
|
|
9235
|
+
messageType: "error",
|
|
9236
|
+
content: formatUnavailableCompactionModelMessage(modelName2, [])
|
|
9237
|
+
};
|
|
9238
|
+
}
|
|
9239
|
+
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter(
|
|
9240
|
+
(m) => !m.fastOnly && !m.voiceOnly && !m.imageOnly && !m.visionOnly
|
|
9241
|
+
);
|
|
9242
|
+
if (!availableModels.some((model) => model.id === selector.modelId)) {
|
|
9243
|
+
return {
|
|
9244
|
+
type: "message",
|
|
9245
|
+
messageType: "error",
|
|
9246
|
+
content: selector.authType ? formatUnavailableModelMessage(
|
|
9247
|
+
"Compaction model",
|
|
9248
|
+
selector.modelId,
|
|
9249
|
+
selector.authType,
|
|
9250
|
+
availableModels
|
|
9251
|
+
) : formatUnavailableCompactionModelMessage(
|
|
9252
|
+
modelName2,
|
|
9253
|
+
availableModels
|
|
9254
|
+
)
|
|
9255
|
+
};
|
|
9256
|
+
}
|
|
9257
|
+
persistSetting(settings, "compactionModel", modelName2, scopeOverride);
|
|
9258
|
+
config.setCompactionModel(modelName2);
|
|
9259
|
+
return {
|
|
9260
|
+
type: "message",
|
|
9261
|
+
messageType: "info",
|
|
9262
|
+
content: t("Compaction Model") + ": " + modelName2 + scopeSuffix
|
|
9263
|
+
};
|
|
9264
|
+
}
|
|
8735
9265
|
const isImageModelCommand = args === "--image" || args.startsWith("--image ");
|
|
8736
9266
|
if (isImageModelCommand) {
|
|
8737
9267
|
const modelName2 = args.replace("--image", "").trim();
|
|
@@ -9686,7 +10216,7 @@ async function completion(context, _partialArg) {
|
|
|
9686
10216
|
}
|
|
9687
10217
|
}
|
|
9688
10218
|
__name(completion, "completion");
|
|
9689
|
-
var
|
|
10219
|
+
var restoreCommand2 = /* @__PURE__ */ __name((config) => {
|
|
9690
10220
|
if (!config?.getFileCheckpointingEnabled()) {
|
|
9691
10221
|
return null;
|
|
9692
10222
|
}
|
|
@@ -9784,6 +10314,7 @@ var settingsCommand = {
|
|
|
9784
10314
|
},
|
|
9785
10315
|
kind: "built-in" /* BUILT_IN */,
|
|
9786
10316
|
supportedModes: ["interactive"],
|
|
10317
|
+
canRunDuringStreaming: true,
|
|
9787
10318
|
action: /* @__PURE__ */ __name((_context, _args) => ({
|
|
9788
10319
|
type: "dialog",
|
|
9789
10320
|
dialog: "settings"
|
|
@@ -10612,6 +11143,59 @@ var statsCommand = {
|
|
|
10612
11143
|
init_esbuild_shims();
|
|
10613
11144
|
import * as fsPromises from "fs/promises";
|
|
10614
11145
|
import path12 from "path";
|
|
11146
|
+
var realpathNearestExisting3 = /* @__PURE__ */ __name(async (targetPath) => {
|
|
11147
|
+
let currentPath = targetPath;
|
|
11148
|
+
for (; ; ) {
|
|
11149
|
+
try {
|
|
11150
|
+
return await fsPromises.realpath(currentPath);
|
|
11151
|
+
} catch (error) {
|
|
11152
|
+
if (error.code !== "ENOENT") {
|
|
11153
|
+
throw error;
|
|
11154
|
+
}
|
|
11155
|
+
const parentPath = path12.dirname(currentPath);
|
|
11156
|
+
if (parentPath === currentPath) {
|
|
11157
|
+
return currentPath;
|
|
11158
|
+
}
|
|
11159
|
+
currentPath = parentPath;
|
|
11160
|
+
}
|
|
11161
|
+
}
|
|
11162
|
+
}, "realpathNearestExisting");
|
|
11163
|
+
var assertLeafNotSymlinkEscape = /* @__PURE__ */ __name(async (filePath, realProjectRoot) => {
|
|
11164
|
+
let current = filePath;
|
|
11165
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11166
|
+
for (; ; ) {
|
|
11167
|
+
const linkStat = await fsPromises.lstat(current).catch(() => null);
|
|
11168
|
+
if (!linkStat?.isSymbolicLink()) break;
|
|
11169
|
+
if (seen.has(current)) {
|
|
11170
|
+
throw new Error(t("Summary path must be within the project root."));
|
|
11171
|
+
}
|
|
11172
|
+
seen.add(current);
|
|
11173
|
+
const linkTarget = await fsPromises.readlink(current);
|
|
11174
|
+
current = path12.isAbsolute(linkTarget) ? linkTarget : path12.resolve(path12.dirname(current), linkTarget);
|
|
11175
|
+
}
|
|
11176
|
+
const realTarget = await realpathNearestExisting3(current);
|
|
11177
|
+
if (!isSubpath(realProjectRoot, realTarget)) {
|
|
11178
|
+
throw new Error(t("Summary path must be within the project root."));
|
|
11179
|
+
}
|
|
11180
|
+
}, "assertLeafNotSymlinkEscape");
|
|
11181
|
+
var SUMMARY_FOOTER_PREFIX = "\n---\n\n## Summary Metadata\n**Update time**: ";
|
|
11182
|
+
var buildSummaryFooter = /* @__PURE__ */ __name((timestamp) => `${SUMMARY_FOOTER_PREFIX}${timestamp}
|
|
11183
|
+
`, "buildSummaryFooter");
|
|
11184
|
+
var readSummaryTail = /* @__PURE__ */ __name(async (p, bytes = 4096) => {
|
|
11185
|
+
const handle = await fsPromises.open(p, "r");
|
|
11186
|
+
try {
|
|
11187
|
+
const { size } = await handle.stat();
|
|
11188
|
+
const length = Math.min(size, bytes);
|
|
11189
|
+
const buffer = Buffer.alloc(length);
|
|
11190
|
+
await handle.read(buffer, 0, length, Math.max(0, size - length));
|
|
11191
|
+
return buffer.toString("utf8");
|
|
11192
|
+
} finally {
|
|
11193
|
+
await handle.close();
|
|
11194
|
+
}
|
|
11195
|
+
}, "readSummaryTail");
|
|
11196
|
+
var isGeneratedSummary = /* @__PURE__ */ __name((content) => new RegExp(
|
|
11197
|
+
`${SUMMARY_FOOTER_PREFIX.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[^\\n]*\\n?$`
|
|
11198
|
+
).test(content.replace(/\r\n/g, "\n")), "isGeneratedSummary");
|
|
10615
11199
|
var summaryCommand = {
|
|
10616
11200
|
name: "summary",
|
|
10617
11201
|
get description() {
|
|
@@ -10619,9 +11203,10 @@ var summaryCommand = {
|
|
|
10619
11203
|
"Generate a project summary and save it to .qwen/PROJECT_SUMMARY.md"
|
|
10620
11204
|
);
|
|
10621
11205
|
},
|
|
11206
|
+
argumentHint: "[path]",
|
|
10622
11207
|
kind: "built-in" /* BUILT_IN */,
|
|
10623
11208
|
supportedModes: ["interactive", "non_interactive", "acp"],
|
|
10624
|
-
action: /* @__PURE__ */ __name(async (context) => {
|
|
11209
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
10625
11210
|
const { config } = context.services;
|
|
10626
11211
|
const { ui } = context;
|
|
10627
11212
|
const executionMode = context.executionMode ?? "interactive";
|
|
@@ -10669,9 +11254,9 @@ var summaryCommand = {
|
|
|
10669
11254
|
}
|
|
10670
11255
|
}, "validateChatHistory");
|
|
10671
11256
|
const generateSummaryMarkdown = /* @__PURE__ */ __name(async (history2) => {
|
|
10672
|
-
const conversationContext = history2.map((
|
|
10673
|
-
role:
|
|
10674
|
-
parts:
|
|
11257
|
+
const conversationContext = history2.map((message2) => ({
|
|
11258
|
+
role: message2.role,
|
|
11259
|
+
parts: message2.parts
|
|
10675
11260
|
}));
|
|
10676
11261
|
const rawSystemInstruction = geminiClient.getChat().getGenerationConfig().systemInstruction;
|
|
10677
11262
|
const chatSystemInstruction = typeof rawSystemInstruction === "string" ? rawSystemInstruction : void 0;
|
|
@@ -10702,25 +11287,111 @@ var summaryCommand = {
|
|
|
10702
11287
|
}
|
|
10703
11288
|
return result.text;
|
|
10704
11289
|
}, "generateSummaryMarkdown");
|
|
10705
|
-
const
|
|
11290
|
+
const resolveSummaryTarget = /* @__PURE__ */ __name(async () => {
|
|
10706
11291
|
const projectRoot = config.getProjectRoot();
|
|
10707
|
-
const
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
11292
|
+
const defaultSummaryPath = path12.join(
|
|
11293
|
+
projectRoot,
|
|
11294
|
+
".qwen",
|
|
11295
|
+
"PROJECT_SUMMARY.md"
|
|
11296
|
+
);
|
|
11297
|
+
const customPath = args?.trim();
|
|
11298
|
+
if (!customPath) {
|
|
11299
|
+
return {
|
|
11300
|
+
summaryPath: defaultSummaryPath,
|
|
11301
|
+
filePathForDisplay: ".qwen/PROJECT_SUMMARY.md",
|
|
11302
|
+
isDefaultTarget: true,
|
|
11303
|
+
realProjectRoot: await fsPromises.realpath(projectRoot)
|
|
11304
|
+
};
|
|
11305
|
+
}
|
|
11306
|
+
const resolved = resolvePath(projectRoot, customPath);
|
|
11307
|
+
if (!isSubpath(projectRoot, resolved)) {
|
|
11308
|
+
throw new Error(t("Summary path must be within the project root."));
|
|
11309
|
+
}
|
|
11310
|
+
const realProjectRoot = await fsPromises.realpath(projectRoot);
|
|
11311
|
+
await assertLeafNotSymlinkEscape(resolved, realProjectRoot);
|
|
11312
|
+
const realResolved = await realpathNearestExisting3(resolved);
|
|
11313
|
+
if (!isSubpath(realProjectRoot, realResolved)) {
|
|
11314
|
+
throw new Error(t("Summary path must be within the project root."));
|
|
11315
|
+
}
|
|
11316
|
+
const hasTrailingSep = customPath.endsWith("/") || customPath.endsWith(path12.sep);
|
|
11317
|
+
const resolvedStat = await fsPromises.stat(resolved).catch(() => null);
|
|
11318
|
+
if (hasTrailingSep && resolvedStat?.isFile()) {
|
|
11319
|
+
throw new Error(
|
|
11320
|
+
t(
|
|
11321
|
+
"Summary path ends with a separator but is an existing file: {{path}}",
|
|
11322
|
+
{ path: customPath }
|
|
11323
|
+
)
|
|
11324
|
+
);
|
|
11325
|
+
}
|
|
11326
|
+
const isDir = hasTrailingSep || (resolvedStat?.isDirectory() ?? false);
|
|
11327
|
+
const summaryPath = isDir ? path12.join(resolved, "PROJECT_SUMMARY.md") : resolved;
|
|
11328
|
+
if (isDir) {
|
|
11329
|
+
await assertLeafNotSymlinkEscape(summaryPath, realProjectRoot);
|
|
11330
|
+
}
|
|
11331
|
+
const filePathForDisplay = (path12.isAbsolute(customPath) ? summaryPath : path12.relative(projectRoot, summaryPath)).replaceAll(path12.sep, "/");
|
|
11332
|
+
const isDefaultTarget = summaryPath === defaultSummaryPath;
|
|
11333
|
+
const existingStat = await fsPromises.stat(summaryPath).catch(() => null);
|
|
11334
|
+
if (existingStat?.isDirectory()) {
|
|
11335
|
+
throw new Error(
|
|
11336
|
+
t("Summary path resolves to an existing directory: {{path}}", {
|
|
11337
|
+
path: filePathForDisplay
|
|
11338
|
+
})
|
|
11339
|
+
);
|
|
10711
11340
|
}
|
|
10712
|
-
|
|
11341
|
+
if (!isDefaultTarget && existingStat?.isFile() && existingStat.size > 0) {
|
|
11342
|
+
const existing = await readSummaryTail(summaryPath).catch(() => "");
|
|
11343
|
+
if (!isGeneratedSummary(existing)) {
|
|
11344
|
+
throw new Error(
|
|
11345
|
+
t(
|
|
11346
|
+
"Summary path already exists and is not a generated summary: {{path}}",
|
|
11347
|
+
{ path: filePathForDisplay }
|
|
11348
|
+
)
|
|
11349
|
+
);
|
|
11350
|
+
}
|
|
11351
|
+
}
|
|
11352
|
+
return {
|
|
11353
|
+
summaryPath,
|
|
11354
|
+
filePathForDisplay,
|
|
11355
|
+
isDefaultTarget,
|
|
11356
|
+
realProjectRoot
|
|
11357
|
+
};
|
|
11358
|
+
}, "resolveSummaryTarget");
|
|
11359
|
+
const saveSummaryToDisk = /* @__PURE__ */ __name(async (markdownSummary, target) => {
|
|
10713
11360
|
const summaryContent = `${markdownSummary}
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
11361
|
+
${buildSummaryFooter(
|
|
11362
|
+
(/* @__PURE__ */ new Date()).toISOString()
|
|
11363
|
+
)}`;
|
|
11364
|
+
if (!target.isDefaultTarget) {
|
|
11365
|
+
await assertLeafNotSymlinkEscape(
|
|
11366
|
+
target.summaryPath,
|
|
11367
|
+
target.realProjectRoot
|
|
11368
|
+
);
|
|
11369
|
+
}
|
|
11370
|
+
const preWriteStat = await fsPromises.stat(target.summaryPath).catch(() => null);
|
|
11371
|
+
if (!target.isDefaultTarget && preWriteStat?.isFile() && preWriteStat.size > 0) {
|
|
11372
|
+
const existing = await readSummaryTail(target.summaryPath).catch(
|
|
11373
|
+
() => ""
|
|
11374
|
+
);
|
|
11375
|
+
if (!isGeneratedSummary(existing)) {
|
|
11376
|
+
throw new Error(
|
|
11377
|
+
t(
|
|
11378
|
+
"Summary path already exists and is not a generated summary: {{path}}",
|
|
11379
|
+
{ path: target.filePathForDisplay }
|
|
11380
|
+
)
|
|
11381
|
+
);
|
|
11382
|
+
}
|
|
11383
|
+
}
|
|
11384
|
+
await fsPromises.mkdir(path12.dirname(target.summaryPath), {
|
|
11385
|
+
recursive: true,
|
|
11386
|
+
...target.isDefaultTarget ? { mode: 448 } : {}
|
|
11387
|
+
});
|
|
11388
|
+
await fsPromises.writeFile(target.summaryPath, summaryContent, {
|
|
11389
|
+
encoding: "utf8",
|
|
11390
|
+
mode: 384
|
|
11391
|
+
});
|
|
10721
11392
|
return {
|
|
10722
|
-
filePathForDisplay:
|
|
10723
|
-
fullPath: summaryPath
|
|
11393
|
+
filePathForDisplay: target.filePathForDisplay,
|
|
11394
|
+
fullPath: target.summaryPath
|
|
10724
11395
|
};
|
|
10725
11396
|
}, "saveSummaryToDisk");
|
|
10726
11397
|
const emitInteractivePending = /* @__PURE__ */ __name((stage) => {
|
|
@@ -10794,13 +11465,17 @@ var summaryCommand = {
|
|
|
10794
11465
|
};
|
|
10795
11466
|
}, "returnNoConversationMessage");
|
|
10796
11467
|
const executeSummaryGeneration = /* @__PURE__ */ __name(async (history2) => {
|
|
11468
|
+
const target = await resolveSummaryTarget();
|
|
10797
11469
|
emitInteractivePending("generating");
|
|
10798
11470
|
const markdownSummary = await generateSummaryMarkdown(history2);
|
|
10799
11471
|
if (abortSignal?.aborted) {
|
|
10800
11472
|
throw new DOMException("Summary generation cancelled.", "AbortError");
|
|
10801
11473
|
}
|
|
10802
11474
|
emitInteractivePending("saving");
|
|
10803
|
-
const { filePathForDisplay } = await saveSummaryToDisk(
|
|
11475
|
+
const { filePathForDisplay } = await saveSummaryToDisk(
|
|
11476
|
+
markdownSummary,
|
|
11477
|
+
target
|
|
11478
|
+
);
|
|
10804
11479
|
completeInteractive(filePathForDisplay);
|
|
10805
11480
|
return { markdownSummary, filePathForDisplay };
|
|
10806
11481
|
}, "executeSummaryGeneration");
|
|
@@ -10854,7 +11529,7 @@ var summaryCommand = {
|
|
|
10854
11529
|
return {
|
|
10855
11530
|
type: "message",
|
|
10856
11531
|
messageType: "error",
|
|
10857
|
-
content: formatErrorMessage3(error)
|
|
11532
|
+
content: executionMode === "interactive" ? "" : formatErrorMessage3(error)
|
|
10858
11533
|
};
|
|
10859
11534
|
}
|
|
10860
11535
|
}, "action")
|
|
@@ -11210,11 +11885,11 @@ var vimCommand = {
|
|
|
11210
11885
|
supportedModes: ["interactive"],
|
|
11211
11886
|
action: /* @__PURE__ */ __name(async (context, _args) => {
|
|
11212
11887
|
const newVimState = await context.ui.toggleVimEnabled();
|
|
11213
|
-
const
|
|
11888
|
+
const message2 = newVimState ? "Entered Vim mode. Run /vim again to exit." : "Exited Vim mode.";
|
|
11214
11889
|
return {
|
|
11215
11890
|
type: "message",
|
|
11216
11891
|
messageType: "info",
|
|
11217
|
-
content:
|
|
11892
|
+
content: message2
|
|
11218
11893
|
};
|
|
11219
11894
|
}, "action")
|
|
11220
11895
|
};
|
|
@@ -12835,8 +13510,8 @@ var insightCommand = {
|
|
|
12835
13510
|
resume = null;
|
|
12836
13511
|
resolve4();
|
|
12837
13512
|
}, "flushResume");
|
|
12838
|
-
const pushMessage = /* @__PURE__ */ __name((
|
|
12839
|
-
pendingMessages.push(
|
|
13513
|
+
const pushMessage = /* @__PURE__ */ __name((message2) => {
|
|
13514
|
+
pendingMessages.push(message2);
|
|
12840
13515
|
flushResume();
|
|
12841
13516
|
}, "pushMessage");
|
|
12842
13517
|
const streamMessages = /* @__PURE__ */ __name(async function* () {
|
|
@@ -12847,9 +13522,9 @@ var insightCommand = {
|
|
|
12847
13522
|
});
|
|
12848
13523
|
}
|
|
12849
13524
|
while (pendingMessages.length > 0) {
|
|
12850
|
-
const
|
|
12851
|
-
if (
|
|
12852
|
-
yield
|
|
13525
|
+
const message2 = pendingMessages.shift();
|
|
13526
|
+
if (message2) {
|
|
13527
|
+
yield message2;
|
|
12853
13528
|
}
|
|
12854
13529
|
}
|
|
12855
13530
|
}
|
|
@@ -13219,10 +13894,10 @@ var updateCommand = {
|
|
|
13219
13894
|
{ performStandaloneUpdate },
|
|
13220
13895
|
installationInfo
|
|
13221
13896
|
] = await Promise.all([
|
|
13222
|
-
import("./updateCheck-
|
|
13223
|
-
import("./processUtils-
|
|
13224
|
-
import("./standalone-update-
|
|
13225
|
-
import("./installationInfo-
|
|
13897
|
+
import("./updateCheck-ZKFGBDTG.js"),
|
|
13898
|
+
import("./processUtils-FKUVQVEU.js"),
|
|
13899
|
+
import("./standalone-update-F6ZWABD7.js"),
|
|
13900
|
+
import("./installationInfo-XC3HXLTX.js")
|
|
13226
13901
|
]);
|
|
13227
13902
|
const { formatUpdateInstructions, getInstallationInfo: getInstallationInfo2 } = installationInfo;
|
|
13228
13903
|
const settings = context.services.settings;
|
|
@@ -13314,7 +13989,7 @@ ${t(
|
|
|
13314
13989
|
installInfo.standaloneDir,
|
|
13315
13990
|
info.update.latest
|
|
13316
13991
|
);
|
|
13317
|
-
const
|
|
13992
|
+
const message2 = result === "done" ? t(
|
|
13318
13993
|
"Update successful! The new version will be used on your next run."
|
|
13319
13994
|
) : t(
|
|
13320
13995
|
"Update downloaded. It will be applied after you exit this session."
|
|
@@ -13324,17 +13999,17 @@ ${t(
|
|
|
13324
13999
|
messageType: "info",
|
|
13325
14000
|
content: `${info.message}
|
|
13326
14001
|
${t("Downloading update...")}
|
|
13327
|
-
${
|
|
14002
|
+
${message2}`
|
|
13328
14003
|
};
|
|
13329
14004
|
} catch (err) {
|
|
13330
|
-
const
|
|
14005
|
+
const message2 = t("Update failed: {{error}}", {
|
|
13331
14006
|
error: err instanceof Error ? err.message : String(err)
|
|
13332
14007
|
});
|
|
13333
14008
|
return {
|
|
13334
14009
|
type: "message",
|
|
13335
14010
|
messageType: "error",
|
|
13336
14011
|
content: `${info.message}
|
|
13337
|
-
${
|
|
14012
|
+
${message2}`
|
|
13338
14013
|
};
|
|
13339
14014
|
}
|
|
13340
14015
|
}
|
|
@@ -13391,6 +14066,7 @@ var BuiltinCommandLoader = class {
|
|
|
13391
14066
|
compressFastCommand,
|
|
13392
14067
|
configCommand,
|
|
13393
14068
|
contextCommand,
|
|
14069
|
+
curatorCommand,
|
|
13394
14070
|
copyCommand,
|
|
13395
14071
|
diffCommand,
|
|
13396
14072
|
deleteCommand,
|
|
@@ -13422,7 +14098,7 @@ var BuiltinCommandLoader = class {
|
|
|
13422
14098
|
recapCommand,
|
|
13423
14099
|
reloadPluginsCommand,
|
|
13424
14100
|
renameCommand,
|
|
13425
|
-
|
|
14101
|
+
restoreCommand2(this.config),
|
|
13426
14102
|
resumeCommand,
|
|
13427
14103
|
rewindCommand,
|
|
13428
14104
|
skillsCommand,
|
|
@@ -13514,6 +14190,8 @@ var BundledSkillLoader = class {
|
|
|
13514
14190
|
);
|
|
13515
14191
|
let body = skill.body;
|
|
13516
14192
|
const modelId = this.config?.getModel()?.trim() || "";
|
|
14193
|
+
const cliVersion = this.config?.getCliVersion()?.trim() || "unknown";
|
|
14194
|
+
body = body.replaceAll("{{cliVersion}}", cliVersion);
|
|
13517
14195
|
if (body.includes("{{model}}") || body.includes("YOUR_MODEL_ID")) {
|
|
13518
14196
|
body = body.replaceAll("{{model}}", modelId);
|
|
13519
14197
|
body = body.replaceAll("YOUR_MODEL_ID", modelId);
|
|
@@ -13678,8 +14356,8 @@ __name(extractInjections, "extractInjections");
|
|
|
13678
14356
|
|
|
13679
14357
|
// packages/cli/src/services/prompt-processors/shellProcessor.ts
|
|
13680
14358
|
var ConfirmationRequiredError = class extends Error {
|
|
13681
|
-
constructor(
|
|
13682
|
-
super(
|
|
14359
|
+
constructor(message2, commandsToConfirm) {
|
|
14360
|
+
super(message2);
|
|
13683
14361
|
this.commandsToConfirm = commandsToConfirm;
|
|
13684
14362
|
this.name = "ConfirmationRequiredError";
|
|
13685
14363
|
}
|
|
@@ -13871,8 +14549,8 @@ var AtFileProcessor = class {
|
|
|
13871
14549
|
}
|
|
13872
14550
|
output.push(...fileContentParts);
|
|
13873
14551
|
} catch (error) {
|
|
13874
|
-
const
|
|
13875
|
-
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${
|
|
14552
|
+
const message2 = error instanceof Error ? error.message : String(error);
|
|
14553
|
+
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message2}`;
|
|
13876
14554
|
debugLogger13.error(
|
|
13877
14555
|
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
|
|
13878
14556
|
);
|
|
@@ -14566,6 +15244,24 @@ var McpPromptLoader = class {
|
|
|
14566
15244
|
init_esbuild_shims();
|
|
14567
15245
|
import { dirname as dirname3 } from "node:path";
|
|
14568
15246
|
var debugLogger17 = createDebugLogger("SKILL_COMMAND_LOADER");
|
|
15247
|
+
async function recordAutoSkillCommandUsage(config, command) {
|
|
15248
|
+
const detail = command.skillDetail;
|
|
15249
|
+
if (!config || detail?.level !== "project" || !detail.filePath) {
|
|
15250
|
+
return;
|
|
15251
|
+
}
|
|
15252
|
+
try {
|
|
15253
|
+
await recordAutoSkillUsage(config.getProjectRoot(), {
|
|
15254
|
+
name: detail.name,
|
|
15255
|
+
level: "project",
|
|
15256
|
+
filePath: detail.filePath
|
|
15257
|
+
});
|
|
15258
|
+
} catch (error) {
|
|
15259
|
+
debugLogger17.warn(
|
|
15260
|
+
`Failed to record auto-skill command usage: ${error instanceof Error ? error.message : String(error)}`
|
|
15261
|
+
);
|
|
15262
|
+
}
|
|
15263
|
+
}
|
|
15264
|
+
__name(recordAutoSkillCommandUsage, "recordAutoSkillCommandUsage");
|
|
14569
15265
|
var SkillCommandLoader = class {
|
|
14570
15266
|
constructor(config) {
|
|
14571
15267
|
this.config = config;
|
|
@@ -14620,6 +15316,7 @@ var SkillCommandLoader = class {
|
|
|
14620
15316
|
name: skill.name,
|
|
14621
15317
|
description: skill.description,
|
|
14622
15318
|
body: skill.body,
|
|
15319
|
+
filePath: skill.filePath,
|
|
14623
15320
|
level: skill.level,
|
|
14624
15321
|
...isExtension && skill.extensionName ? { extensionName: skill.extensionName } : {}
|
|
14625
15322
|
},
|
|
@@ -14795,6 +15492,12 @@ function handleCommandResult(result, outputHistoryItems) {
|
|
|
14795
15492
|
reason: "Action confirmation is not supported in non-interactive mode. Commands requiring confirmation cannot be executed.",
|
|
14796
15493
|
originalType: "confirm_action"
|
|
14797
15494
|
};
|
|
15495
|
+
case "goal_control":
|
|
15496
|
+
return {
|
|
15497
|
+
type: "unsupported",
|
|
15498
|
+
reason: "Goal control is not supported in non-interactive mode yet.",
|
|
15499
|
+
originalType: "goal_control"
|
|
15500
|
+
};
|
|
14798
15501
|
default: {
|
|
14799
15502
|
const _exhaustive = result;
|
|
14800
15503
|
return {
|
|
@@ -14944,6 +15647,7 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
14944
15647
|
const combinedContent = [];
|
|
14945
15648
|
let firstModelOverride;
|
|
14946
15649
|
const onCompleteCallbacks = [];
|
|
15650
|
+
const successfulSkillCommands = [];
|
|
14947
15651
|
for (const skill of stackedResult.skills) {
|
|
14948
15652
|
if (!skill.action) continue;
|
|
14949
15653
|
const skillContext = {
|
|
@@ -14963,10 +15667,14 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
14963
15667
|
onCompleteCallbacks.push(skillResult.onComplete);
|
|
14964
15668
|
}
|
|
14965
15669
|
}
|
|
15670
|
+
const succeeded = skillResult?.type === "submit_prompt";
|
|
14966
15671
|
recordSkillInvocation(config, {
|
|
14967
15672
|
skillName: getSkillCommandName(skill),
|
|
14968
|
-
success:
|
|
15673
|
+
success: succeeded
|
|
14969
15674
|
});
|
|
15675
|
+
if (succeeded) {
|
|
15676
|
+
successfulSkillCommands.push(skill);
|
|
15677
|
+
}
|
|
14970
15678
|
}
|
|
14971
15679
|
if (stackedResult.remainingText) {
|
|
14972
15680
|
combinedContent.push([{ text: stackedResult.remainingText }]);
|
|
@@ -14982,6 +15690,9 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
14982
15690
|
if (hookResult.blockedResult) {
|
|
14983
15691
|
return hookResult.blockedResult;
|
|
14984
15692
|
}
|
|
15693
|
+
for (const skill of successfulSkillCommands) {
|
|
15694
|
+
void recordAutoSkillCommandUsage(config, skill);
|
|
15695
|
+
}
|
|
14985
15696
|
return {
|
|
14986
15697
|
type: "submit_prompt",
|
|
14987
15698
|
content: hookResult.content,
|
|
@@ -15100,6 +15811,7 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
15100
15811
|
return hookResult.blockedResult;
|
|
15101
15812
|
}
|
|
15102
15813
|
recordSkillCommandInvocation(true);
|
|
15814
|
+
void recordAutoSkillCommandUsage(config, commandToExecute);
|
|
15103
15815
|
return handleCommandResult(
|
|
15104
15816
|
{ ...result, content: hookResult.content },
|
|
15105
15817
|
outputHistoryItems
|
|
@@ -15154,11 +15866,11 @@ function normalizePartList(parts) {
|
|
|
15154
15866
|
return [parts];
|
|
15155
15867
|
}
|
|
15156
15868
|
__name(normalizePartList, "normalizePartList");
|
|
15157
|
-
function extractPartsFromUserMessage(
|
|
15158
|
-
if (!
|
|
15869
|
+
function extractPartsFromUserMessage(message2) {
|
|
15870
|
+
if (!message2) {
|
|
15159
15871
|
return null;
|
|
15160
15872
|
}
|
|
15161
|
-
const content =
|
|
15873
|
+
const content = message2.message?.content;
|
|
15162
15874
|
if (typeof content === "string") {
|
|
15163
15875
|
return content;
|
|
15164
15876
|
}
|
|
@@ -15456,6 +16168,7 @@ export {
|
|
|
15456
16168
|
FileCommandLoader,
|
|
15457
16169
|
SavedWorkflowLoader,
|
|
15458
16170
|
McpPromptLoader,
|
|
16171
|
+
recordAutoSkillCommandUsage,
|
|
15459
16172
|
SkillCommandLoader,
|
|
15460
16173
|
appendUserPromptExpansionAdditionalContext,
|
|
15461
16174
|
serializeUserPromptExpansionPrompt,
|