@qwen-code/qwen-code 0.22.0 → 0.22.2-nightly.20260828.7357136dd1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/computer-use/SKILL.md +229 -0
- package/bundled/computer-use/agents/openai.yaml +4 -0
- package/bundled/coordinate/SKILL.md +5 -5
- package/bundled/goal-draft/SKILL.md +109 -0
- package/bundled/qc-helper/docs/configuration/auth.md +7 -7
- package/bundled/qc-helper/docs/configuration/model-providers.md +70 -9
- package/bundled/qc-helper/docs/configuration/settings.md +48 -48
- package/bundled/qc-helper/docs/extension/introduction.md +3 -1
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -0
- package/bundled/qc-helper/docs/features/channels/dws.md +120 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +37 -6
- package/bundled/qc-helper/docs/features/code-review.md +27 -23
- package/bundled/qc-helper/docs/features/commands.md +4 -3
- package/bundled/qc-helper/docs/features/computer-use.md +57 -51
- package/bundled/qc-helper/docs/features/goals.md +58 -0
- package/bundled/qc-helper/docs/features/headless.md +13 -11
- package/bundled/qc-helper/docs/features/mcp.md +35 -12
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/bundled/qc-helper/docs/features/sub-agents.md +1 -1
- package/bundled/qc-helper/docs/features/worktree.md +1 -1
- package/bundled/qc-helper/docs/overview.md +1 -1
- package/bundled/qc-helper/docs/quickstart.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +29 -6
- package/bundled/review/SKILL.md +185 -435
- package/bundled/review/references/aone.md +18 -0
- package/bundled/review/references/persistence.md +109 -0
- package/bundled/review/references/posting.md +272 -0
- package/chunks/MaxSizedBox-LMWXCLDV.js +110 -0
- package/chunks/{StandaloneSessionPicker-KTHPCSR6.js → StandaloneSessionPicker-W3F7U3JL.js} +87 -88
- package/chunks/{acp-startup-profiler-T4GEAPLX.js → acp-startup-profiler-GNYAL6LI.js} +2 -2
- package/chunks/{acpAgent-CRY3JZ5O.js → acpAgent-EYZ6EEHD.js} +3223 -2145
- package/chunks/agent-RBLGBY65.js +95 -0
- package/chunks/agent-headless-L5T4Y4OZ.js +85 -0
- package/chunks/{anthropicContentGenerator-Y2OX6LS4.js → anthropicContentGenerator-GMHML35Q.js} +128 -59
- package/chunks/{artifact-tool-SBXMTVCB.js → artifact-tool-XSMPHZBT.js} +11 -3
- package/chunks/{askUserQuestion-KEQJRFD6.js → askUserQuestion-4SWJY65V.js} +2 -2
- package/chunks/bridge-5LR2F2ND.js +119 -0
- package/chunks/{ca-D3F4S6NG.js → ca-7HPYOYSZ.js} +3 -0
- package/chunks/{channel-management-service-IRTT7RNE.js → channel-management-service-KHR3N6CH.js} +6 -6
- package/chunks/channel-settings-store-4FOAZW72.js +120 -0
- package/chunks/{channel-worker-group-BJNMR2MP.js → channel-worker-group-6NA6BBZV.js} +9 -7
- package/chunks/{channel-worker-manager-EMA7CQDJ.js → channel-worker-manager-NEZ2J6RK.js} +11 -8
- package/chunks/{channel-worker-supervisor-F6I6WSWW.js → channel-worker-supervisor-FKU7DIHJ.js} +12 -6
- package/chunks/{chunk-HDKCKCYO.js → chunk-23RFD54N.js} +1 -1
- package/chunks/{read-package-up-UXSW3YPB.js → chunk-2EAZ43JQ.js} +1 -0
- package/chunks/{chunk-KM73TBQ4.js → chunk-2LD5U7Q3.js} +31 -0
- package/chunks/{chunk-GIWB5QLV.js → chunk-2SXSLSQE.js} +4 -4
- package/chunks/chunk-2TNL5KPM.js +49 -0
- package/chunks/chunk-335CJSNF.js +2320 -0
- package/chunks/chunk-36LGBEM6.js +130 -0
- package/chunks/{chunk-O5BDEWBC.js → chunk-3JXM2CVW.js} +3 -3
- package/chunks/{chunk-2E3V7G6Y.js → chunk-3K6TUZHS.js} +55 -50
- package/chunks/{chunk-WWUSHZ7M.js → chunk-3OOXT6CR.js} +5 -5
- package/chunks/{chunk-2UZJWSVD.js → chunk-3WK3QDNV.js} +2 -2
- package/chunks/{chunk-4J7OPYNS.js → chunk-3XOKEVII.js} +6 -6
- package/chunks/chunk-3Y34Q3JV.js +1584 -0
- package/chunks/{chunk-YMVFIYHV.js → chunk-42IDLQWS.js} +26 -20
- package/chunks/{chunk-7HFULI45.js → chunk-454XFGH4.js} +3 -3
- package/chunks/chunk-4CMJKUND.js +95 -0
- package/chunks/{chunk-XLDFW44M.js → chunk-4K7KNVWH.js} +3 -3
- package/chunks/{chunk-YDJRMQU4.js → chunk-4QHPPXK2.js} +16 -8
- package/chunks/{chunk-7KOFLDEP.js → chunk-5JTIYALA.js} +1 -1
- package/chunks/{chunk-CXJHQVEK.js → chunk-5PA6UEYA.js} +4 -0
- package/chunks/{chunk-7NBVNAJJ.js → chunk-62GQFYID.js} +3 -3
- package/chunks/{chunk-JGUBDRBC.js → chunk-6DIGWMGT.js} +3 -3
- package/chunks/{chunk-X7V3N6YH.js → chunk-6JCGO55P.js} +885 -3380
- package/chunks/{chunk-HIK2OF33.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-VUMLT7E5.js → chunk-6W2IK5KC.js} +956 -17
- package/chunks/{chunk-S4C4JJKE.js → chunk-6ZZBRRKQ.js} +5 -5
- package/chunks/{chunk-W4CRPSC5.js → chunk-7EQQR46F.js} +1 -1
- package/chunks/{chunk-PHJJ3RVO.js → chunk-7GWQW5ID.js} +7 -15
- package/chunks/chunk-7J6OTNGO.js +424 -0
- package/chunks/{chunk-URN2JIAQ.js → chunk-7TUBJBBJ.js} +5 -1
- package/chunks/{chunk-A5F63FEW.js → chunk-7VD6IPQM.js} +1 -1
- package/chunks/{chunk-36OF5PRW.js → chunk-ABS25QER.js} +7 -3
- package/chunks/{chunk-UU4WC7DK.js → chunk-AJGR6E6Z.js} +117 -30
- package/chunks/{chunk-MQP3MHWN.js → chunk-AU3MMVJF.js} +43 -20
- package/chunks/{chunk-ZS5BHEPD.js → chunk-AXC26UCQ.js} +1 -1
- package/chunks/{chunk-PDL6LKB5.js → chunk-AY3BNYEQ.js} +1 -1
- package/chunks/{chunk-O5Z7EB6Y.js → chunk-AYHQZBJ4.js} +170 -207
- package/chunks/{chunk-WRT324N6.js → chunk-B466ZSHZ.js} +3 -3
- package/chunks/{chunk-5XHAOUWD.js → chunk-B5OUL5EL.js} +3 -3
- package/chunks/{chunk-GAHYKJPV.js → chunk-B5PHIJGI.js} +186 -60
- package/chunks/{chunk-IBJ5S45N.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-UZPYR3EV.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-43T5WDQ7.js → chunk-BFSFJR3D.js} +1 -1
- package/chunks/{chunk-IWOWEENB.js → chunk-BKWNKLZB.js} +404 -44
- package/chunks/{chunk-3CLIDIVQ.js → chunk-BOWFGCEU.js} +3 -3
- package/chunks/{chunk-BB5IMQCV.js → chunk-BPAKYXQ3.js} +2 -2
- package/chunks/{chunk-ZRYQMWEP.js → chunk-BWORX6FA.js} +2 -2
- package/chunks/{chunk-AP3B7LKD.js → chunk-BXDAPVQU.js} +2 -2
- package/chunks/{chunk-NUGZAFR2.js → chunk-C2X7KY45.js} +147 -6
- package/chunks/{chunk-MZKWFWVG.js → chunk-C3KURPP7.js} +6 -6
- package/chunks/{chunk-WZDM44SB.js → chunk-CAJTKR6W.js} +7 -7
- package/chunks/{chunk-DB2OKNTU.js → chunk-CFJY4DGX.js} +2 -2
- package/chunks/{chunk-QKBYFU2Q.js → chunk-CFKIH3D3.js} +21 -1
- package/chunks/{chunk-I432KXWD.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{create-sub-session-XBCVGNFU.js → chunk-CQH5KTKC.js} +4 -6
- package/chunks/{chunk-5HJUPACR.js → chunk-CRKKHXTI.js} +185 -174
- package/chunks/{chunk-L4HVF7LM.js → chunk-CYAUBK46.js} +3 -3
- package/chunks/{chunk-AZF6SME3.js → chunk-D5LUXLUH.js} +3 -3
- package/chunks/{chunk-RPJQ3O4M.js → chunk-DFDWJE6Z.js} +60 -53
- package/chunks/{chunk-KSPRQSB4.js → chunk-DIMEPKCW.js} +52 -12
- package/chunks/chunk-DJBQCO2E.js +842 -0
- package/chunks/{chunk-OVH5Y7KS.js → chunk-DP4MWIM3.js} +19 -3
- package/chunks/{chunk-LI4YHTQK.js → chunk-DYXFD5RO.js} +182 -3
- package/chunks/{chunk-NW35NVFN.js → chunk-E3XVSVKK.js} +26 -4
- package/chunks/{chunk-VSNPOSDN.js → chunk-EB6QRGHM.js} +108 -13
- package/chunks/{chunk-FVBVJEBG.js → chunk-EKNBU2X7.js} +10 -8
- package/chunks/{chunk-DJEHYM4H.js → chunk-EKSCLBBF.js} +3 -3
- package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
- package/chunks/chunk-EW5VVLJT.js +3525 -0
- package/chunks/{chunk-T6XLJRQY.js → chunk-EWIQ3NAE.js} +38774 -6955
- package/chunks/{chunk-4XPSVIED.js → chunk-FALBWZF4.js} +6 -6
- package/chunks/chunk-FBX2SDQ4.js +48 -0
- package/chunks/{chunk-VMJL7RH6.js → chunk-FEHMA4RO.js} +539 -651
- package/chunks/{chunk-PXOJLJ5W.js → chunk-FMFBLTLY.js} +606 -223
- package/chunks/{chunk-ZLCT4C5A.js → chunk-FTF2YIZ5.js} +1 -1
- package/chunks/{chunk-IOSEW6KP.js → chunk-G6FECKTJ.js} +9 -6
- package/chunks/{chunk-RDG44S5I.js → chunk-GGNE3JAW.js} +2 -2
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-B6UBOIFE.js → chunk-H33EQVMG.js} +14 -11
- package/chunks/chunk-H72BQNM3.js +645 -0
- package/chunks/{chunk-YZBDKFRQ.js → chunk-HGIMWQVT.js} +995 -892
- package/chunks/chunk-HOCJDUFY.js +20 -0
- package/chunks/{chunk-6UQSU7CQ.js → chunk-HPXV655A.js} +60 -107
- package/chunks/{chunk-45NQKMYB.js → chunk-HVC3PNVC.js} +1 -1
- package/chunks/{chunk-QJHPWLZC.js → chunk-HYDJDQGJ.js} +1 -1
- package/chunks/{chunk-7DMTAQJ6.js → chunk-IB7FQJRY.js} +163 -57
- package/chunks/{chunk-AW27A43Y.js → chunk-ICURCKIU.js} +1428 -120
- package/chunks/{chunk-4F5WV4RF.js → chunk-ISKH4QX3.js} +288 -15
- package/chunks/{chunk-SE55HQGF.js → chunk-J6S24ZJE.js} +92 -70
- package/chunks/{chunk-7DYNJFES.js → chunk-JB4JIVTJ.js} +6 -1
- package/chunks/{chunk-OARZJFZX.js → chunk-JN4IWWMN.js} +4 -4
- package/chunks/{chunk-6PCOVQO2.js → chunk-JUUBLSZU.js} +8 -8
- package/chunks/{chunk-FEMQ6Y7W.js → chunk-JWALNCLT.js} +47 -126
- package/chunks/{chunk-TBVSALA3.js → chunk-K5KXUXWC.js} +3 -3
- package/chunks/{chunk-XYQHT3AW.js → chunk-KTJFDCX4.js} +2 -2
- package/chunks/{chunk-6FRJEE2S.js → chunk-LEFCFTEX.js} +6 -6
- package/chunks/{chunk-BUGYW6FB.js → chunk-LEGTMYAE.js} +1 -1
- package/chunks/{chunk-MPHLIJYL.js → chunk-LLZA2IK3.js} +20 -8
- package/chunks/{chunk-BEGIBJAZ.js → chunk-LNETQKBE.js} +4 -4
- package/chunks/{chunk-KVGR4MCF.js → chunk-LUEHOUHM.js} +3 -3
- package/chunks/{chunk-2A4C2MEG.js → chunk-LVPZO674.js} +35 -12
- package/chunks/{chunk-25NESM4G.js → chunk-M4ORUPYI.js} +29 -5
- package/chunks/{chunk-VFACN2CE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-FYZMB6DB.js → chunk-MAYHGRP4.js} +12 -12
- package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
- package/chunks/{chunk-ZRFUT5VV.js → chunk-MTJN7FOT.js} +7 -7
- package/chunks/{chunk-BGXZBI5B.js → chunk-N4X7G4J2.js} +2 -1
- package/chunks/{chunk-2TRNCJK4.js → chunk-NIFYWDYN.js} +1 -1
- package/chunks/{chunk-SQS55KR4.js → chunk-NU7RKEZR.js} +2 -2
- package/chunks/{chunk-U2UYQMM6.js → chunk-NXMBRVMQ.js} +3 -3
- package/chunks/chunk-OI4NY7RA.js +346 -0
- package/chunks/{chunk-LURJYO2T.js → chunk-OZ6KS6KW.js} +4 -0
- package/chunks/{chunk-K52PZNU4.js → chunk-PDQGMSZK.js} +2 -2
- package/chunks/{chunk-PZRUV52H.js → chunk-PPKZ7JOE.js} +20 -2
- package/chunks/{chunk-SAH4BD2J.js → chunk-PQEISIKS.js} +67 -0
- package/chunks/{chunk-AO4M6NMD.js → chunk-PWIGAMA4.js} +146 -27
- package/chunks/{chunk-S3G6YFQC.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/chunk-QHMLYMMS.js +32 -0
- package/chunks/{chunk-5XUTPXQU.js → chunk-QPTRRPZU.js} +47 -13
- package/chunks/{chunk-UUQFJILB.js → chunk-RFI4YGMR.js} +34 -267
- package/chunks/{chunk-A6NRNRKE.js → chunk-RFIDDFAL.js} +1 -1
- package/chunks/chunk-RKFGE7JH.js +93 -0
- package/chunks/chunk-RNVFRIOO.js +275 -0
- package/chunks/{chunk-WU5E4HMO.js → chunk-RU7BK6B3.js} +1 -1
- package/chunks/{chunk-J5ZDDUKM.js → chunk-RVXDXY6I.js} +4 -4
- package/chunks/{chunk-OE52YHCZ.js → chunk-RWZB422L.js} +11 -11
- package/chunks/chunk-RXFQM6FQ.js +42 -0
- package/chunks/{chunk-MHG6NDS6.js → chunk-RYNZQGXN.js} +19 -2
- package/chunks/{chunk-4CWDWDL6.js → chunk-SJ5ERAW3.js} +1 -1
- package/chunks/{chunk-Q54XG7IX.js → chunk-SMPR7SPO.js} +1 -1
- package/chunks/{chunk-UIRLQ3N7.js → chunk-SRZZY4IY.js} +3 -3
- package/chunks/{chunk-ND7NOI4P.js → chunk-STUJ7IMZ.js} +0 -92
- package/chunks/{chunk-VYC7XFYV.js → chunk-SUX7HDNA.js} +5 -5
- package/chunks/{chunk-ZZUVC6RI.js → chunk-SVNO44PF.js} +3 -3
- package/chunks/{chunk-FDD2IUEL.js → chunk-SZLBBZH4.js} +370 -35
- package/chunks/{chunk-GHY5OIYP.js → chunk-T2NKRHZZ.js} +13 -13
- package/chunks/chunk-T4EFG2P5.js +113 -0
- package/chunks/{chunk-BMCSKS37.js → chunk-TLHUNMO7.js} +6 -6
- package/chunks/{chunk-JOLJTKIG.js → chunk-TPI7O7HR.js} +1 -1
- package/chunks/{chunk-6QSA4JHL.js → chunk-TQHGJYR3.js} +4492 -1121
- package/chunks/{chunk-ISJMN3ML.js → chunk-TTX2JUE6.js} +1 -1
- package/chunks/{chunk-EFB657PR.js → chunk-TW3E6YNO.js} +3 -3
- package/chunks/{chunk-LD5VIJ7S.js → chunk-TWSKM647.js} +1 -1
- package/chunks/chunk-U54AYGEC.js +337 -0
- package/chunks/{chunk-A5F2YNO6.js → chunk-UHQFIS7N.js} +260 -10
- package/chunks/{chunk-6NFAEG54.js → chunk-UTLCH2FK.js} +24 -13
- package/chunks/{chunk-7JBHIQS2.js → chunk-UY3PBNY3.js} +19 -37
- package/chunks/{chunk-DWCKACFL.js → chunk-V2NDP3I4.js} +2 -2
- package/chunks/{chunk-2GXYDNXP.js → chunk-V2QDDC5J.js} +19 -9
- package/chunks/{chunk-VLRBJ24J.js → chunk-V5J4J5TP.js} +2 -2
- package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
- package/chunks/{chunk-RDQ7QB4Y.js → chunk-VTHREBQM.js} +2 -2
- package/chunks/{chunk-YLFLHKDL.js → chunk-W3N5XAZ6.js} +1 -1
- package/chunks/{chunk-62JOGZL5.js → chunk-W6DUQ5GA.js} +11497 -10502
- package/chunks/{chunk-P47E4SJC.js → chunk-WALC5VJH.js} +4 -4
- package/chunks/{chunk-3ZFJUBTP.js → chunk-WAOIHTJS.js} +1 -1
- package/chunks/{chunk-KIVGVFMM.js → chunk-WBHKK3CU.js} +16 -4
- package/chunks/{chunk-XZJKSETB.js → chunk-WXEA74YB.js} +3 -3
- package/chunks/{chunk-VEND4KA4.js → chunk-X3ZRTCJD.js} +1 -1
- package/chunks/{chunk-YRLW2MSX.js → chunk-XBVNNDPK.js} +11 -4
- package/chunks/{chunk-XL5K4SVK.js → chunk-XF63PKEN.js} +1 -1
- package/chunks/{chunk-LDGWX737.js → chunk-XLLQJRAH.js} +323 -510
- package/chunks/{chunk-2Z6LSQMF.js → chunk-XQFT3QUF.js} +1 -1
- package/chunks/{chunk-P3QQPMQA.js → chunk-XZA32HII.js} +4 -4
- package/chunks/{chunk-C72BXMJ5.js → chunk-Y3QL45LS.js} +1 -1
- package/chunks/{chunk-QS4ENGVF.js → chunk-Y4TPOUEV.js} +17 -8
- package/chunks/{chunk-AVCCKIZ6.js → chunk-YRZX2PHA.js} +1 -1
- package/chunks/{chunk-Z3JMO2CH.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-WS7PAXXR.js → chunk-YWQ237GX.js} +15 -199
- package/chunks/chunk-ZELCTN6Y.js +29 -0
- package/chunks/{chunk-TQOF5KBL.js → chunk-ZEZKIS2K.js} +0 -31
- package/chunks/{chunk-IIWGSX4L.js → chunk-ZTP35P4B.js} +1 -1
- package/chunks/{chunk-K623ENWT.js → chunk-ZU4UDIWX.js} +23 -1
- package/chunks/chunk-ZYNTSXWK.js +32 -0
- package/chunks/config-utils-JVGAP34H.js +113 -0
- package/chunks/contextCommand-XDB7OSO7.js +106 -0
- package/chunks/{core-runtime-CES6JSVV.js → core-runtime-XHYA2RH7.js} +66 -63
- package/chunks/create-sub-session-23ITIELI.js +17 -0
- package/chunks/{create-sub-session-UJTPMVOG.js → create-sub-session-MHYCFNCM.js} +168 -87
- package/chunks/{cron-create-IKA56DAF.js → cron-create-KJ4IY6PP.js} +57 -10
- package/chunks/{cron-delete-K5Q62EGH.js → cron-delete-MBLQCAYY.js} +4 -4
- package/chunks/{cron-list-QBFGAMP7.js → cron-list-DWH2PQ47.js} +4 -4
- package/chunks/{daemon-RZZUPGOJ.js → daemon-K5XS42ID.js} +567 -27
- package/chunks/{daemon-git-worktree-guard-3QY2BQYB.js → daemon-git-worktree-guard-V3P5XLHB.js} +339 -95
- package/chunks/daemon-status-provider-KKU7ZTLM.js +117 -0
- package/chunks/daemon-trust-policy-TZGK34DW.js +112 -0
- package/chunks/{daemon-trust-policy-monitor-TK4K7M63.js → daemon-trust-policy-monitor-F23DD2M4.js} +69 -69
- package/chunks/{de-RYUHH2C6.js → de-X6HLSIFE.js} +1 -0
- package/chunks/deferred-core-runtime-LKLGBCGZ.js +114 -0
- package/chunks/{display-image-OEJMJV3S.js → display-image-BE7I6ZB6.js} +5 -5
- package/chunks/{dist-5EV2G6MC.js → dist-4WXLCBDR.js} +1 -1
- package/chunks/{dist-ES6HNUW2.js → dist-5VXFRTWU.js} +525 -64
- package/chunks/{dist-ESS34DHC.js → dist-6BPYWHVD.js} +89 -65
- package/chunks/{dist-2OG3PGKO.js → dist-GFN5DCBX.js} +76 -67
- package/chunks/{dist-K7IQB53U.js → dist-HZNT6GQS.js} +1 -1
- package/chunks/{dist-J6P3C52Z.js → dist-LVZCXVPF.js} +99 -26
- package/chunks/{dist-LZO24N3E.js → dist-N6W6E753.js} +71 -64
- package/chunks/dist-QDLFKWOL.js +2512 -0
- package/chunks/{dist-VVQBOKDH.js → dist-SWQMYP2Q.js} +18 -16
- package/chunks/earlyInputCapture-NERYFYTR.js +107 -0
- package/chunks/{edit-A2633SLR.js → edit-ACCATIXB.js} +49 -51
- package/chunks/{en-3RHLPITS.js → en-YLXBXM4Z.js} +5 -1
- package/chunks/{enter-worktree-OIAHE2TB.js → enter-worktree-35QCAAFP.js} +7 -8
- package/chunks/{enterPlanMode-SUGIKLR7.js → enterPlanMode-NEN6EPVM.js} +48 -50
- package/chunks/environment-CKWHBC5T.js +129 -0
- package/chunks/errors-XTZPNQ77.js +113 -0
- package/chunks/{exit-worktree-3UT3SSWT.js → exit-worktree-XQD6D543.js} +7 -8
- package/chunks/exitPlanMode-CY344X5J.js +83 -0
- package/chunks/{fast-path-3AVP3G35.js → fast-path-YSOX4PAM.js} +31 -10
- package/chunks/{fast-path-settings-WHX3J3ZI.js → fast-path-settings-XMFBYFUH.js} +2 -2
- package/chunks/{fr-4PL5GHG4.js → fr-FTZWF462.js} +1 -0
- package/chunks/{gemini-7PVQWHTH.js → gemini-VQY2YCPH.js} +137 -129
- package/chunks/{geminiContentGenerator-B2FOJJDJ.js → geminiContentGenerator-PAPXNIGU.js} +16 -13
- package/chunks/{glob-7YGXE6OV.js → glob-GVCUSBBF.js} +48 -50
- package/chunks/{goal-tools-TLJCE7YZ.js → goal-tools-5STK6OXW.js} +77 -31
- package/chunks/{grep-6DV6LTON.js → grep-5GPICQBU.js} +6 -6
- package/chunks/handleAutoUpdate-ZJPJN42W.js +109 -0
- package/chunks/i18n-BZYKOST7.js +124 -0
- package/chunks/{image-gen-7CSCJ73T.js → image-gen-J6FDGUZP.js} +8 -12
- package/chunks/initializer-GO2C5HE3.js +113 -0
- package/chunks/installationInfo-WM2GXQZ6.js +107 -0
- package/chunks/{ja-HZ7X7PQO.js → ja-2GL5FKYJ.js} +1 -0
- package/chunks/{keychain-token-storage-MTFTAESK.js → keychain-token-storage-37XPR34V.js} +2 -2
- package/chunks/list-ERDJB7PQ.js +116 -0
- package/chunks/{list-agents-43XUEXJV.js → list-agents-DI3YFTDT.js} +2 -2
- package/chunks/loadedSettingsAdapter-7JOCVOKV.js +110 -0
- package/chunks/{loggingContentGenerator-RNE66CKK.js → loggingContentGenerator-3ONLU3BS.js} +327 -39
- package/chunks/{loop-wakeup-E54KDUXC.js → loop-wakeup-XJFONSQ7.js} +5 -5
- package/chunks/{ls-CGL2UC3H.js → ls-3VAT2J7A.js} +4 -4
- package/chunks/{lsp-5IKUO5DX.js → lsp-5W7IRUBH.js} +2 -2
- package/chunks/{managed-npm-update-Y3SC3GLJ.js → managed-npm-update-TLRCC2GE.js} +62 -62
- package/chunks/mcp-2LH3QXR2.js +110 -0
- package/chunks/{monitor-PXYSGSUN.js → monitor-P7LDAL4W.js} +48 -50
- package/chunks/nonInteractiveCli-E5T7PZ27.js +184 -0
- package/chunks/{notebook-edit-ISIBJVBR.js → notebook-edit-F7KSG4WQ.js} +49 -51
- package/chunks/open-with-auth-4UI3KHUR.js +55 -0
- package/chunks/{openaiContentGenerator-6TBOPEGT.js → openaiContentGenerator-2EXCZUGN.js} +29 -32
- package/chunks/pidfile-P25DWA5Q.js +111 -0
- package/chunks/process-registry-OAEG6WGC.js +662 -0
- package/chunks/{processUtils-YK2TDTTU.js → processUtils-PVDKBL35.js} +2 -2
- package/chunks/prompt-terminal-ledger-AJ7T7OIV.js +105 -0
- package/chunks/{pt-QT5N2Q6Q.js → pt-XN2YWJVM.js} +1 -0
- package/chunks/{qwenContentGenerator-CLDMA2Y4.js → qwenContentGenerator-TBBRLWIT.js} +54 -62
- package/chunks/{qwenOAuth2-DLDR6UC5.js → qwenOAuth2-OF5WRBQT.js} +7 -11
- package/chunks/read-file-6IIY4RLJ.js +32 -0
- package/chunks/{read-mcp-resource-XYES2B42.js → read-mcp-resource-XD257PGJ.js} +2 -2
- package/chunks/read-package-up-6T6ICKR7.js +13 -0
- package/chunks/{record-artifact-W3IBTGL7.js → record-artifact-VW23GS4F.js} +4 -5
- package/chunks/report-findings-XA3FJG3N.js +33 -0
- package/chunks/request-shutdown-BCLA3JV2.js +133 -0
- package/chunks/resumeHistoryUtils-44IETXDY.js +118 -0
- package/chunks/ripGrep-E7ESZ7SS.js +39 -0
- package/chunks/{ru-STMG5BPD.js → ru-OLTMFJEW.js} +1 -0
- package/chunks/{run-qwen-serve-XJHOW2NY.js → run-qwen-serve-DXBCYW7V.js} +924 -356
- package/chunks/runtime-RUSPD35D.js +148 -0
- package/chunks/scheduled-tasks-DVRJZO6I.js +127 -0
- package/chunks/scheduler-TDRB2NSY.js +122 -0
- package/chunks/{sdk-exporters-http-RSIOP3G2.js → sdk-exporters-http-TTU2CHBU.js} +5 -5
- package/chunks/{sdk-impl-CB3KARSK.js → sdk-impl-UUMVYMAL.js} +12 -6
- package/chunks/{send-message-J4VT46OI.js → send-message-AJ4OCUBV.js} +24 -29
- package/chunks/serve-KITOM7OR.js +118 -0
- package/chunks/{server-74ONDK62.js → server-THCOMUC2.js} +5814 -4549
- package/chunks/{session-BO6VBWJP.js → session-XKR5MPXE.js} +152 -142
- package/chunks/session-pr-refresh-KRBH7KDA.js +278 -0
- package/chunks/{settings-35QZNFDG.js → settings-YXZ4XBKK.js} +72 -72
- package/chunks/shell-5FJ2DZ3W.js +93 -0
- package/chunks/{skill-DKEMQSNJ.js → skill-VMMJZ6CJ.js} +161 -33
- package/chunks/skill-settings-7SG4YA2W.js +118 -0
- package/chunks/spawnChannel-BPMIXRBI.js +112 -0
- package/chunks/standalone-update-QN5HFRIC.js +118 -0
- package/chunks/{startInteractiveUI-J2QSGWPU.js → startInteractiveUI-5A7RQFRP.js} +3139 -2438
- package/chunks/{syntheticOutput-JAXMIMZP.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-I2H322E4.js → task-create-QN4LYRSE.js} +11 -11
- package/chunks/{task-list-3OLIWFTQ.js → task-list-JPLGK45U.js} +5 -5
- package/chunks/{task-stop-JAUY6MSY.js → task-stop-CXEH5L2D.js} +2 -2
- package/chunks/{task-update-B3XO4CPI.js → task-update-IWEOJFV2.js} +11 -11
- package/chunks/{team-create-W534PMGX.js → team-create-HVGVUL2L.js} +49 -51
- package/chunks/{team-delete-Q7GE7RRI.js → team-delete-RZVVSGCY.js} +5 -5
- package/chunks/{team-plan-approval-WNV6P6NG.js → team-plan-approval-S5A5FQWU.js} +48 -50
- package/chunks/terminal-image-renderer-SIVPPXDI.js +114 -0
- package/chunks/theme-manager-TA33UZZX.js +102 -0
- package/chunks/{todoWrite-FJJTY2TI.js → todoWrite-WDJNQEMW.js} +43 -25
- package/chunks/{tool-search-Y4KL3LRE.js → tool-search-NX7IPDKP.js} +19 -20
- package/chunks/total-session-admission-PWXZBOVX.js +114 -0
- package/chunks/trustedFolders-V6Y4CU3F.js +122 -0
- package/chunks/{update-relaunch-OHVFN6KF.js → update-relaunch-CGSX3R37.js} +6 -6
- package/chunks/updateCheck-T5O2WGIB.js +118 -0
- package/chunks/useAutoAcceptIndicator-ULBJJWPY.js +120 -0
- package/chunks/{validateNonInterActiveAuth-WJXH426F.js → validateNonInterActiveAuth-E5S2JSRC.js} +114 -108
- package/chunks/{version-QMDRADXM.js → version-LS5JPU36.js} +2 -2
- package/chunks/{web-fetch-ROS6P4LP.js → web-fetch-RLMFZTS3.js} +25 -244
- package/chunks/{web-search-JS3E76O6.js → web-search-LMCIC4N5.js} +11 -13
- package/chunks/{web-shell-static-3NUTRHAH.js → web-shell-static-A6QMUNNV.js} +11 -4
- package/chunks/webapi-Z5OM224P.js +4118 -0
- package/chunks/{workflow-2FCMBTBZ.js → workflow-JBXU3IGA.js} +713 -138
- package/chunks/workspace-providers-status-525ORQBH.js +114 -0
- package/chunks/{workspace-registration-store-SU4EJKSD.js → workspace-registration-store-7Y44R4LV.js} +1 -1
- package/chunks/workspace-registry-HS4RWUSQ.js +123 -0
- package/chunks/workspace-service-7PXDM6EB.js +129 -0
- package/chunks/workspace-skills-status-FMJGC2XI.js +113 -0
- package/chunks/{workspace-trust-reconciler-4Y4F7XIX.js → workspace-trust-reconciler-3YTWSQBY.js} +78 -77
- package/chunks/write-file-BVQRYQQO.js +88 -0
- package/chunks/{zh-TW-NX43Z2S2.js → zh-TW-RPTMRTHG.js} +5 -1
- package/chunks/{zh-3JQ75KFU.js → zh-UNY63FR3.js} +5 -1
- package/chunks/{zoom-image-DNBKCGGF.js → zoom-image-FGCELNS4.js} +14 -15
- package/cli.js +13 -13
- package/locales/ca.js +3 -0
- package/locales/de.js +1 -0
- package/locales/en.js +5 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +5 -0
- package/locales/zh.js +5 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DWHXEVlf.js → abnfDiagram-VCTEODGH-2XZDeWYO.js} +1 -1
- package/web-shell/assets/{arc-CXKjm86V.js → arc-B6UgMh90.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-B_ynI0cX.js → architectureDiagram-5GKGNRK7-DZgNFeN1.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-DMebd9X0.js → blockDiagram-NRAW4CY4-DQ2wvBFN.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BZ5BlxS-.js → c4Diagram-UCG6FXSJ-DMmQMrc4.js} +1 -1
- package/web-shell/assets/channel-D_TyfiTx.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-CluJKopE.js → chunk-2Q5K7J3B-C8Zh2e9y.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-hzDAPFOo.js → chunk-5VM5RSS4-C3LTenP8.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-6vHioKJe.js → chunk-F27PBJKO-CxABOc8n.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-B_5hKTGo.js → chunk-G27WJ6UU-CD_JxHDC.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-CO9VoFCH.js → chunk-JWPE2WC7-BdmZPmce.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-7L5JpxYu.js → chunk-LCL6LL3I-80bcHmfK.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DHLJMAqj.js → chunk-POPQ4Y6H-CNpLZyQF.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-Dt-4Cqdl.js → chunk-SVP7TREG-CXlKgMv3.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-QlSQ3ssG.js → chunk-XXDRQBXY-CivyYyvL.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-Bw_H3xMd.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-Bw_H3xMd.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DMw3EOxl.js → cose-bilkent-JH36ORCC-COAjRH3w.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-s6vEA7RQ.js → cynefin-OW5HDTMX-DqU1JHO6.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-AOKsvYLt.js → cynefinDiagram-5FMLGOSQ-BCLI1Bvj.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-9QAZn3m7.js → dagre-3AP2YEHR-DmAz8nqF.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-CWpnu4FN.js → diagram-S7CK7UJ4-Ck-5QLT5.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-9l0jXD8q.js → diagram-UQ7AKVKN-C0ljX0mW.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BMUHroj4.js → diagram-VSXAHHWV-DPgvT24v.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-Co9x27vm.js → diagram-VX7I27RA-D7hWr1LR.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BKnTeOER.js → diagram-Z3DM3KII-D59tlOta.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-QBZD9CKG.js → ebnfDiagram-PWID7BFC-CY2DDx00.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-dKWAEGun.js → erDiagram-SSCWMZ5O-AR4h8Q8k.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CR_UgVqj.js → flowDiagram-A5DVABFB-DbF0HqBz.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DQUnjWO6.js → ganttDiagram-EL5Y4UJY-J52mrIhc.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C4j59wPL.js → gitGraphDiagram-WWUBYQGX-CcgMY5EV.js} +1 -1
- package/web-shell/assets/index-BjUg3vPr.css +5 -0
- package/web-shell/assets/index-CFwYYVFU.js +1873 -0
- package/web-shell/assets/{index-tYXRIPz4.js → index-MQs7l15A.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-mzqbt50w.js → infoDiagram-RXCK75RN-Buu3ibp2.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-ChLOqhGl.js → ishikawaDiagram-5VMMS53U-CoKQxnF3.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-SifZE-R8.js → journeyDiagram-EYS64GPL-CxK35mTC.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-Sft2qlbc.js → kanban-definition-3QL26DDD-tk2CHTQ1.js} +1 -1
- package/web-shell/assets/{layout-O2uHVkPd.js → layout-DEpMwb4u.js} +1 -1
- package/web-shell/assets/{linear-BVqYgjSc.js → linear-DSQsLh53.js} +1 -1
- package/web-shell/assets/{mermaid.core-CZ9MQaJ6.js → mermaid.core-DIZuPBQT.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BNQYjBqM.js → mindmap-definition-FBJOCRG2-CCAvk8r_.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-rh1J8uv6.js → pegDiagram-XKGWAZYB-CpJ28jxz.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BQHR5mn9.js → pieDiagram-E7YTZNPT-ziJR2R32.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CLCbP7mK.js → quadrantDiagram-AXDQQJYC-B60zE3Mh.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-CDQhrkbm.js → railroadDiagram-O6MQD6OU-M3GqQ_g1.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BdP9uswg.js → requirementDiagram-EFPCY7ZU-ntCtYqTk.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CFZDFBXF.js → sankeyDiagram-P5KCCOFB-AYLoItcZ.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BW9WOJXI.js → sequenceDiagram-WJ2MYXX4-DEWk4Mlj.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CPMia32z.js → sizeCapture-X5ZJPWSS-OOWvzPay.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-BANp9p7F.js → stateDiagram-HBIQ2CUA-BcMmvxem.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DRLLqPWO.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-JroXksK-.js → swimlanes-XN3QIQJK-DuZTWWvh.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DOfLQQYt.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-DfuVIfYY.js → timeline-definition-24CTP7MA-CjqtZXEd.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-BZXoSjRB.js → vennDiagram-4TSXK5OY-knVCVkQ4.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BdiY8avC.js → wardleyDiagram-VM6X3IG4-yoWhw0a2.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DcXh_U4H.js → xychartDiagram-S5SC5T6Z-ue14E_gL.js} +1 -1
- package/web-shell/index.html +20 -5
- package/chunks/MaxSizedBox-3OZJCC3J.js +0 -110
- package/chunks/agent-BFE3DQM3.js +0 -93
- package/chunks/agent-headless-LLVKZZ4P.js +0 -87
- package/chunks/bridge-EBYO4SYM.js +0 -118
- package/chunks/channel-settings-store-5VP2Y2YM.js +0 -115
- package/chunks/chunk-2J3OJGTL.js +0 -98
- package/chunks/chunk-7IV52LTO.js +0 -202
- package/chunks/chunk-AXMWHKXA.js +0 -42
- package/chunks/chunk-F6WFNA7U.js +0 -22
- package/chunks/chunk-IO257NUD.js +0 -623
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-SJ4HB27T.js +0 -945
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/chunk-YHC2EYYG.js +0 -125
- package/chunks/computer-use-EGPWFEX6.js +0 -2142
- package/chunks/config-utils-WZ43VOBS.js +0 -25
- package/chunks/contextCommand-5DSEQI6S.js +0 -106
- package/chunks/daemon-status-provider-EYMLPYJU.js +0 -116
- package/chunks/daemon-trust-policy-CQYKZ7VO.js +0 -112
- package/chunks/deferred-core-runtime-WFEPUXZR.js +0 -114
- package/chunks/earlyInputCapture-PN4PP7V5.js +0 -107
- package/chunks/environment-WUPHLPKZ.js +0 -127
- package/chunks/errors-WPMPVIAT.js +0 -113
- package/chunks/exitPlanMode-MLFHYZNB.js +0 -85
- package/chunks/handleAutoUpdate-F5OTWUT5.js +0 -109
- package/chunks/i18n-C562S6KN.js +0 -124
- package/chunks/initializer-7YPGOFP4.js +0 -113
- package/chunks/installationInfo-ARU5Q2H7.js +0 -107
- package/chunks/list-KTSK275C.js +0 -116
- package/chunks/loadedSettingsAdapter-F3T2EQ5J.js +0 -110
- package/chunks/mcp-6ONTVPAY.js +0 -110
- package/chunks/nonInteractiveCli-KZDWFAN6.js +0 -178
- package/chunks/pidfile-IO7ALSZF.js +0 -111
- package/chunks/process-registry-PMJOA5CO.js +0 -172
- package/chunks/prompt-terminal-ledger-TCE7PMCE.js +0 -105
- package/chunks/read-file-2HOD2ATO.js +0 -33
- package/chunks/resumeHistoryUtils-DDSBAQJS.js +0 -118
- package/chunks/ripGrep-E7P6K4QR.js +0 -40
- package/chunks/runtime-J4SPTJRQ.js +0 -148
- package/chunks/scheduler-VRAEZZ4E.js +0 -122
- package/chunks/serve-KEAWV4TI.js +0 -118
- package/chunks/shell-H6K63WG3.js +0 -95
- package/chunks/skill-settings-TCKLXIXM.js +0 -118
- package/chunks/spawnChannel-2K6NKWM5.js +0 -111
- package/chunks/standalone-update-LSCGOEFP.js +0 -118
- package/chunks/terminal-image-renderer-UHX3UD66.js +0 -114
- package/chunks/theme-manager-6B47ZPIF.js +0 -102
- package/chunks/total-session-admission-NSCFWGJH.js +0 -113
- package/chunks/trustedFolders-7XMJWGQ3.js +0 -122
- package/chunks/updateCheck-EOVLHD4T.js +0 -118
- package/chunks/useAutoAcceptIndicator-ZNMIGBTN.js +0 -120
- package/chunks/workspace-providers-status-GPGU5YMT.js +0 -113
- package/chunks/workspace-registry-BQISXT6Y.js +0 -122
- package/chunks/workspace-service-LLY6HCUC.js +0 -129
- package/chunks/workspace-skills-status-L5N2Y3ZP.js +0 -113
- package/chunks/write-file-EJHU2Z3E.js +0 -90
- package/web-shell/assets/channel-Zg3WHgq_.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-C16l9jQz.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-C16l9jQz.js +0 -1
- package/web-shell/assets/index-BN_m_uHJ.css +0 -5
- package/web-shell/assets/index-DrlJu79f.js +0 -1792
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-NZYAoQLU.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3YdVX3vj.js +0 -8
|
@@ -8,7 +8,13 @@ import {
|
|
|
8
8
|
staleArgsWarning,
|
|
9
9
|
validateAuthMethod,
|
|
10
10
|
writeSkillArgs
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TQHGJYR3.js";
|
|
12
|
+
import {
|
|
13
|
+
isKittyProtocolEnabled
|
|
14
|
+
} from "./chunk-NYX53SV4.js";
|
|
15
|
+
import {
|
|
16
|
+
contextCommand
|
|
17
|
+
} from "./chunk-UY3PBNY3.js";
|
|
12
18
|
import {
|
|
13
19
|
calculateCost,
|
|
14
20
|
computeSessionStats,
|
|
@@ -17,31 +23,25 @@ import {
|
|
|
17
23
|
findInlineMathExpressions,
|
|
18
24
|
getSystemInfoFields,
|
|
19
25
|
levelLabel
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
formatDuration,
|
|
23
|
-
formatTokenCount
|
|
24
|
-
} from "./chunk-3SH53ANB.js";
|
|
25
|
-
import {
|
|
26
|
-
isKittyProtocolEnabled
|
|
27
|
-
} from "./chunk-NYX53SV4.js";
|
|
26
|
+
} from "./chunk-RVXDXY6I.js";
|
|
28
27
|
import {
|
|
29
28
|
VSCODE_SHIFT_ENTER_SEQUENCE,
|
|
30
29
|
isWaylandSession,
|
|
31
30
|
writeOsc52
|
|
32
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CFJY4DGX.js";
|
|
33
32
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
formatDuration,
|
|
34
|
+
formatTokenCount
|
|
35
|
+
} from "./chunk-3SH53ANB.js";
|
|
36
36
|
import {
|
|
37
37
|
rollbackStandaloneUpdate
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SUX7HDNA.js";
|
|
39
39
|
import {
|
|
40
40
|
themeManager
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QFCDF5PL.js";
|
|
42
42
|
import {
|
|
43
43
|
getErrorMessage as getErrorMessage2
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JN4IWWMN.js";
|
|
45
45
|
import {
|
|
46
46
|
GITHUB_WORKFLOW_PATHS,
|
|
47
47
|
INSIGHT_CSS,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
toJson,
|
|
55
55
|
toJsonl,
|
|
56
56
|
toMarkdown
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-AU3MMVJF.js";
|
|
58
58
|
import {
|
|
59
59
|
stripUnsafeCharacters,
|
|
60
60
|
toCodePoints,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-E7REAOTN.js";
|
|
63
63
|
import {
|
|
64
64
|
isValidSessionId
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ZEZKIS2K.js";
|
|
66
66
|
import {
|
|
67
67
|
formatUnsupportedVoiceModelMessage,
|
|
68
68
|
getVoiceSettingsScope,
|
|
@@ -70,16 +70,16 @@ import {
|
|
|
70
70
|
isVoiceEnabled,
|
|
71
71
|
readVoiceMode,
|
|
72
72
|
readVoiceModel
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-HYDJDQGJ.js";
|
|
74
74
|
import {
|
|
75
75
|
getExtendedSystemInfo,
|
|
76
76
|
getGitVersion,
|
|
77
77
|
getNpmVersion
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-7GWQW5ID.js";
|
|
79
79
|
import {
|
|
80
80
|
isInlineModelOverrideAllowed,
|
|
81
81
|
parseAcpModelOption
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-EKNBU2X7.js";
|
|
83
83
|
import {
|
|
84
84
|
OUTPUT_LANGUAGE_AUTO,
|
|
85
85
|
getAllSettingKeys,
|
|
@@ -91,12 +91,12 @@ import {
|
|
|
91
91
|
resolveOutputLanguageOrPreserveAuto,
|
|
92
92
|
validateSettingValue,
|
|
93
93
|
writeOutputLanguageAndRegisterPath
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-HPXV655A.js";
|
|
95
95
|
import {
|
|
96
96
|
getCurrentLanguage,
|
|
97
97
|
setLanguageAsync,
|
|
98
98
|
t
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-RWZB422L.js";
|
|
100
100
|
import {
|
|
101
101
|
SUPPORTED_LANGUAGES,
|
|
102
102
|
getSupportedLanguageIds,
|
|
@@ -104,11 +104,11 @@ import {
|
|
|
104
104
|
} from "./chunk-5EJZE3FP.js";
|
|
105
105
|
import {
|
|
106
106
|
getInstallationInfo
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-V2NDP3I4.js";
|
|
108
108
|
import {
|
|
109
109
|
isFolderTrustEnabled,
|
|
110
110
|
loadTrustedFolders
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-CYAUBK46.js";
|
|
112
112
|
import {
|
|
113
113
|
require_strip_json_comments
|
|
114
114
|
} from "./chunk-NPQ5ZKRP.js";
|
|
@@ -122,28 +122,27 @@ import {
|
|
|
122
122
|
buildLearnSkillPrompt,
|
|
123
123
|
buildLearnVideoSkillRequest,
|
|
124
124
|
buildManagedRememberPrompt,
|
|
125
|
+
canonicalizeMsgId,
|
|
126
|
+
describeHoldCause,
|
|
125
127
|
encodeInsightErrorMessage,
|
|
126
128
|
encodeInsightProgressMessage,
|
|
127
129
|
encodeInsightReadyMessage,
|
|
128
130
|
findProviderByCredentials,
|
|
131
|
+
flattenPeerLabel,
|
|
129
132
|
generateSessionRecap,
|
|
130
133
|
getIdeInstaller,
|
|
131
134
|
getMCPServerPrompts,
|
|
135
|
+
isWsl,
|
|
132
136
|
parseLearnVideoInput,
|
|
133
137
|
readPathFromWorkspace
|
|
134
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-W6DUQ5GA.js";
|
|
135
139
|
import {
|
|
136
140
|
listSavedWorkflows,
|
|
137
141
|
listWorkflowSnapshots
|
|
138
|
-
} from "./chunk-
|
|
139
|
-
import {
|
|
140
|
-
REASONING_EFFORT_TIERS,
|
|
141
|
-
applyReasoningEffort,
|
|
142
|
-
normalizeReasoningEffort
|
|
143
|
-
} from "./chunk-KM73TBQ4.js";
|
|
142
|
+
} from "./chunk-CRKKHXTI.js";
|
|
144
143
|
import {
|
|
145
144
|
resolveOpenAILogDir
|
|
146
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-TW3E6YNO.js";
|
|
147
146
|
import {
|
|
148
147
|
ArenaManager,
|
|
149
148
|
ConditionalRulesRegistry,
|
|
@@ -169,6 +168,7 @@ import {
|
|
|
169
168
|
ideContextStore,
|
|
170
169
|
isActiveWorkflowStatus,
|
|
171
170
|
isExtensionCommittedWithWarningsError,
|
|
171
|
+
isImageGenerationCapable,
|
|
172
172
|
isSignalTermination,
|
|
173
173
|
isSuccessStatus,
|
|
174
174
|
isTerminalStatus,
|
|
@@ -184,13 +184,15 @@ import {
|
|
|
184
184
|
resolveSlimmingConfig,
|
|
185
185
|
runForkedAgent,
|
|
186
186
|
tryGenerateSessionTitle
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-EWIQ3NAE.js";
|
|
188
188
|
import {
|
|
189
189
|
external_exports
|
|
190
190
|
} from "./chunk-CQ35AJ4Z.js";
|
|
191
191
|
import {
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
buildRuntimeSnapshotId,
|
|
193
|
+
resolveModelId,
|
|
194
|
+
stripRuntimeSnapshotPrefix
|
|
195
|
+
} from "./chunk-JB4JIVTJ.js";
|
|
194
196
|
import {
|
|
195
197
|
getAutoSkillCuratorStatus,
|
|
196
198
|
parse,
|
|
@@ -198,34 +200,41 @@ import {
|
|
|
198
200
|
restoreArchivedAutoSkill,
|
|
199
201
|
runAutoSkillCurator,
|
|
200
202
|
setAutoSkillPinned
|
|
201
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-6W2IK5KC.js";
|
|
202
204
|
import {
|
|
203
205
|
HookEventName,
|
|
204
206
|
sanitizeUserPromptExpansionAdditionalContext
|
|
205
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-TTX2JUE6.js";
|
|
206
208
|
import {
|
|
207
209
|
canUseRipgrep
|
|
208
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-4K7KNVWH.js";
|
|
209
211
|
import {
|
|
210
212
|
glob
|
|
211
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-SMPR7SPO.js";
|
|
212
214
|
import {
|
|
213
215
|
checkArgumentSafety,
|
|
214
216
|
checkCommandPermissions,
|
|
215
217
|
escapeShellArg,
|
|
216
218
|
getShellConfiguration
|
|
217
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-JWALNCLT.js";
|
|
218
220
|
import {
|
|
219
221
|
GoalPersistenceUnavailableError,
|
|
220
|
-
emptyGoalSnapshot
|
|
222
|
+
emptyGoalSnapshot
|
|
223
|
+
} from "./chunk-XLLQJRAH.js";
|
|
224
|
+
import {
|
|
221
225
|
projectUserTranscriptForDisplay
|
|
222
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-7J6OTNGO.js";
|
|
223
227
|
import {
|
|
224
228
|
APPROVAL_MODES
|
|
225
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-V5J4J5TP.js";
|
|
226
230
|
import {
|
|
227
231
|
openBrowserSecurely
|
|
228
232
|
} from "./chunk-NAVJD2PQ.js";
|
|
233
|
+
import {
|
|
234
|
+
REASONING_EFFORT_TIERS,
|
|
235
|
+
applyReasoningEffort,
|
|
236
|
+
normalizeReasoningEffort
|
|
237
|
+
} from "./chunk-2LD5U7Q3.js";
|
|
229
238
|
import {
|
|
230
239
|
COMBINED_PASS_TOLERANCE_FACTOR,
|
|
231
240
|
IdeConnectionEvent,
|
|
@@ -238,34 +247,37 @@ import {
|
|
|
238
247
|
read,
|
|
239
248
|
recordSkillInvocation,
|
|
240
249
|
uiTelemetryService
|
|
241
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-SZLBBZH4.js";
|
|
242
251
|
import {
|
|
243
|
-
|
|
244
|
-
} from "./chunk-
|
|
252
|
+
getCurrentMemoryFilename
|
|
253
|
+
} from "./chunk-BKWNKLZB.js";
|
|
245
254
|
import {
|
|
246
255
|
getAutoMemoryRoot
|
|
247
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-6PJOTWAN.js";
|
|
248
257
|
import {
|
|
249
258
|
runSideQuery
|
|
250
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-BWORX6FA.js";
|
|
260
|
+
import {
|
|
261
|
+
AuthType
|
|
262
|
+
} from "./chunk-PPKZ7JOE.js";
|
|
251
263
|
import {
|
|
252
264
|
normalizeContent,
|
|
253
265
|
redactUrlCredentials
|
|
254
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-B5PHIJGI.js";
|
|
255
267
|
import {
|
|
256
268
|
FORK_SUBAGENT_TYPE,
|
|
257
269
|
stripStartupContext
|
|
258
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-CAJTKR6W.js";
|
|
259
271
|
import {
|
|
260
272
|
applySkillAllowedTools,
|
|
261
273
|
buildSkillLlmContent
|
|
262
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-ZU4UDIWX.js";
|
|
263
275
|
import {
|
|
264
276
|
ToolDisplayNamesMigration,
|
|
265
277
|
ToolNames,
|
|
266
278
|
canonicalToolName,
|
|
267
279
|
isShellProgressData
|
|
268
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-UTLCH2FK.js";
|
|
269
281
|
import {
|
|
270
282
|
Storage,
|
|
271
283
|
createDebugLogger,
|
|
@@ -274,12 +286,12 @@ import {
|
|
|
274
286
|
isSubpath,
|
|
275
287
|
resolvePath,
|
|
276
288
|
updateSymlink
|
|
277
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-UHQFIS7N.js";
|
|
278
290
|
import {
|
|
279
291
|
isCpuProfileRecording,
|
|
280
292
|
startCpuProfile,
|
|
281
293
|
stopCpuProfile
|
|
282
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-X3ZRTCJD.js";
|
|
283
295
|
import {
|
|
284
296
|
init_esbuild_shims
|
|
285
297
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -292,7 +304,7 @@ import {
|
|
|
292
304
|
init_esbuild_shims();
|
|
293
305
|
import { spawn } from "node:child_process";
|
|
294
306
|
|
|
295
|
-
// packages/cli/src/
|
|
307
|
+
// packages/cli/src/ui/commands/commands.ts
|
|
296
308
|
init_esbuild_shims();
|
|
297
309
|
var MAX_STACKED_SKILLS = 5;
|
|
298
310
|
var isStackedSkillCompletableCommand = /* @__PURE__ */ __name((command) => command.kind === "skill" /* SKILL */ && command.userInvocable !== false && !command.hidden, "isStackedSkillCompletableCommand");
|
|
@@ -641,12 +653,163 @@ function findSlashCommandTokens(text, commands) {
|
|
|
641
653
|
}
|
|
642
654
|
__name(findSlashCommandTokens, "findSlashCommandTokens");
|
|
643
655
|
|
|
656
|
+
// packages/cli/src/acp-integration/session-model-persistence.ts
|
|
657
|
+
init_esbuild_shims();
|
|
658
|
+
var debugLogger2 = createDebugLogger("SESSION_MODEL");
|
|
659
|
+
var AUTH_TYPES = new Set(Object.values(AuthType));
|
|
660
|
+
function isAuthType(value) {
|
|
661
|
+
return AUTH_TYPES.has(value);
|
|
662
|
+
}
|
|
663
|
+
__name(isAuthType, "isAuthType");
|
|
664
|
+
function registryHonoredBaseUrl(config, authType, modelId, baseUrl) {
|
|
665
|
+
if (typeof baseUrl !== "string" || !baseUrl) {
|
|
666
|
+
return void 0;
|
|
667
|
+
}
|
|
668
|
+
return config.getResolvedModelConfig?.(authType, modelId, baseUrl) ? baseUrl : void 0;
|
|
669
|
+
}
|
|
670
|
+
__name(registryHonoredBaseUrl, "registryHonoredBaseUrl");
|
|
671
|
+
async function recordDaemonSessionModel(config, payload) {
|
|
672
|
+
const recording = config.getChatRecordingService?.();
|
|
673
|
+
if (!recording?.recordSessionModel) return;
|
|
674
|
+
try {
|
|
675
|
+
await recording.recordSessionModel(payload);
|
|
676
|
+
} catch (error) {
|
|
677
|
+
debugLogger2.debug("recordSessionModel failed", error);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
__name(recordDaemonSessionModel, "recordDaemonSessionModel");
|
|
681
|
+
async function recordDaemonSessionModelFromConfig(config) {
|
|
682
|
+
const modelId = config.getModel()?.trim();
|
|
683
|
+
const authType = config.getAuthType();
|
|
684
|
+
if (!modelId || !authType) return;
|
|
685
|
+
const snapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
686
|
+
const registryBaseUrl = snapshot ? void 0 : config.getCurrentModelRegistryBaseUrl?.();
|
|
687
|
+
await recordDaemonSessionModel(config, {
|
|
688
|
+
modelId,
|
|
689
|
+
authType,
|
|
690
|
+
...typeof registryBaseUrl === "string" ? { baseUrl: registryBaseUrl } : {},
|
|
691
|
+
...snapshot ? { isRuntime: true } : {}
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
__name(recordDaemonSessionModelFromConfig, "recordDaemonSessionModelFromConfig");
|
|
695
|
+
function hasMatchingRuntimeSnapshot(config, authType, modelId) {
|
|
696
|
+
const snapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
697
|
+
return snapshot?.authType === authType && snapshot.modelId === modelId;
|
|
698
|
+
}
|
|
699
|
+
__name(hasMatchingRuntimeSnapshot, "hasMatchingRuntimeSnapshot");
|
|
700
|
+
function liveAuthType(config) {
|
|
701
|
+
return config.getAuthType() ?? config.getModelsConfig?.()?.getCurrentAuthType?.();
|
|
702
|
+
}
|
|
703
|
+
__name(liveAuthType, "liveAuthType");
|
|
704
|
+
function runtimeSnapshotIdentity(snapshot) {
|
|
705
|
+
if (!snapshot) return void 0;
|
|
706
|
+
if (typeof snapshot.id === "string" && snapshot.id) {
|
|
707
|
+
return snapshot.id;
|
|
708
|
+
}
|
|
709
|
+
if (snapshot.authType && snapshot.modelId) {
|
|
710
|
+
return buildRuntimeSnapshotId(snapshot.authType, snapshot.modelId);
|
|
711
|
+
}
|
|
712
|
+
return void 0;
|
|
713
|
+
}
|
|
714
|
+
__name(runtimeSnapshotIdentity, "runtimeSnapshotIdentity");
|
|
715
|
+
function recordedRouteMatches(recorded, currentRegistryBaseUrl) {
|
|
716
|
+
if (!recorded || recorded.isRuntime) return true;
|
|
717
|
+
const targetBaseUrl = recorded.baseUrl;
|
|
718
|
+
if (targetBaseUrl === void 0) {
|
|
719
|
+
return currentRegistryBaseUrl === null || currentRegistryBaseUrl === void 0;
|
|
720
|
+
}
|
|
721
|
+
if (targetBaseUrl === "") {
|
|
722
|
+
return currentRegistryBaseUrl === null || currentRegistryBaseUrl === void 0 || currentRegistryBaseUrl === "";
|
|
723
|
+
}
|
|
724
|
+
return currentRegistryBaseUrl === targetBaseUrl;
|
|
725
|
+
}
|
|
726
|
+
__name(recordedRouteMatches, "recordedRouteMatches");
|
|
727
|
+
async function applyRestoredSessionModel(config, projection) {
|
|
728
|
+
const recorded = projection?.runtime.recording.sessionModel;
|
|
729
|
+
const fallbackModel = projection?.runtime.recording.lastAssistantModel;
|
|
730
|
+
const recordedAuth = recorded?.authType?.trim();
|
|
731
|
+
const authType = (recordedAuth && isAuthType(recordedAuth) ? recordedAuth : liveAuthType(config))?.trim();
|
|
732
|
+
const modelId = recorded?.modelId || fallbackModel;
|
|
733
|
+
if (!modelId?.trim() || !authType || !isAuthType(authType)) return;
|
|
734
|
+
const currentModel = stripRuntimeSnapshotPrefix(config.getModel() ?? "");
|
|
735
|
+
const currentAuth = liveAuthType(config);
|
|
736
|
+
const targetModel = stripRuntimeSnapshotPrefix(modelId.trim());
|
|
737
|
+
const targetBaseUrl = recorded?.isRuntime ? void 0 : registryHonoredBaseUrl(config, authType, targetModel, recorded?.baseUrl);
|
|
738
|
+
const recordedRoute = recorded ? {
|
|
739
|
+
...recorded,
|
|
740
|
+
...targetBaseUrl ? { baseUrl: targetBaseUrl } : { baseUrl: void 0 }
|
|
741
|
+
} : void 0;
|
|
742
|
+
const currentRegistryBaseUrl = config.getCurrentModelRegistryBaseUrl?.();
|
|
743
|
+
const baseUrlMatches = recordedRouteMatches(
|
|
744
|
+
recordedRoute,
|
|
745
|
+
currentRegistryBaseUrl
|
|
746
|
+
);
|
|
747
|
+
const currentRuntimeMatches = hasMatchingRuntimeSnapshot(
|
|
748
|
+
config,
|
|
749
|
+
authType,
|
|
750
|
+
targetModel
|
|
751
|
+
);
|
|
752
|
+
if (currentModel === targetModel && currentAuth === authType && baseUrlMatches && !(recorded && !recorded.isRuntime && currentRuntimeMatches)) {
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
const useRuntimeSnapshot = Boolean(recorded?.isRuntime) && hasMatchingRuntimeSnapshot(config, authType, targetModel);
|
|
756
|
+
const switchModelId = useRuntimeSnapshot ? buildRuntimeSnapshotId(authType, targetModel) : targetModel;
|
|
757
|
+
const requireCachedCredentials = authType === "qwen-oauth" /* QWEN_OAUTH */ && currentAuth !== authType;
|
|
758
|
+
const switchOptions = targetBaseUrl || requireCachedCredentials ? {
|
|
759
|
+
...targetBaseUrl ? { baseUrl: targetBaseUrl } : {},
|
|
760
|
+
...requireCachedCredentials ? { requireCachedCredentials: true } : {}
|
|
761
|
+
} : void 0;
|
|
762
|
+
try {
|
|
763
|
+
await config.switchModel(authType, switchModelId, switchOptions);
|
|
764
|
+
} catch (error) {
|
|
765
|
+
debugLogger2.warn(
|
|
766
|
+
`restore session model failed (${targetModel}/${authType}): ${error instanceof Error ? error.message : String(error)}`
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
__name(applyRestoredSessionModel, "applyRestoredSessionModel");
|
|
771
|
+
async function restoreSessionModelThenAuthenticate(config, projection, authenticate) {
|
|
772
|
+
const originalAuth = liveAuthType(config);
|
|
773
|
+
const originalModel = config.getModel();
|
|
774
|
+
const originalBaseUrl = config.getCurrentModelRegistryBaseUrl?.();
|
|
775
|
+
const originalRuntimeSnapshot = config.getActiveRuntimeModelSnapshot?.();
|
|
776
|
+
await applyRestoredSessionModel(config, projection);
|
|
777
|
+
try {
|
|
778
|
+
await authenticate();
|
|
779
|
+
} catch (error) {
|
|
780
|
+
if (liveAuthType(config) === originalAuth && config.getModel() === originalModel && (config.getCurrentModelRegistryBaseUrl?.() ?? void 0) === (originalBaseUrl ?? void 0) && runtimeSnapshotIdentity(config.getActiveRuntimeModelSnapshot?.()) === runtimeSnapshotIdentity(originalRuntimeSnapshot)) {
|
|
781
|
+
throw error;
|
|
782
|
+
}
|
|
783
|
+
debugLogger2.warn(
|
|
784
|
+
"restored session model made authentication fail; retrying with settings model"
|
|
785
|
+
);
|
|
786
|
+
if (!originalAuth || !originalModel) {
|
|
787
|
+
throw error;
|
|
788
|
+
}
|
|
789
|
+
const rollbackModelId = originalRuntimeSnapshot?.authType === originalAuth && originalRuntimeSnapshot.modelId === stripRuntimeSnapshotPrefix(originalModel) ? buildRuntimeSnapshotId(
|
|
790
|
+
originalAuth,
|
|
791
|
+
stripRuntimeSnapshotPrefix(originalModel)
|
|
792
|
+
) : originalModel;
|
|
793
|
+
try {
|
|
794
|
+
await config.switchModel(
|
|
795
|
+
originalAuth,
|
|
796
|
+
rollbackModelId,
|
|
797
|
+
typeof originalBaseUrl === "string" ? { baseUrl: originalBaseUrl } : void 0
|
|
798
|
+
);
|
|
799
|
+
} catch {
|
|
800
|
+
throw error;
|
|
801
|
+
}
|
|
802
|
+
await authenticate();
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
__name(restoreSessionModelThenAuthenticate, "restoreSessionModelThenAuthenticate");
|
|
806
|
+
|
|
644
807
|
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
645
808
|
init_esbuild_shims();
|
|
646
809
|
|
|
647
810
|
// packages/cli/src/services/CommandService.ts
|
|
648
811
|
init_esbuild_shims();
|
|
649
|
-
var
|
|
812
|
+
var debugLogger3 = createDebugLogger("CLI_COMMANDS");
|
|
650
813
|
var CommandService = class _CommandService {
|
|
651
814
|
/**
|
|
652
815
|
* Private constructor to enforce the use of the async factory.
|
|
@@ -690,7 +853,7 @@ var CommandService = class _CommandService {
|
|
|
690
853
|
if (result.status === "fulfilled") {
|
|
691
854
|
allCommands.push(...result.value);
|
|
692
855
|
} else {
|
|
693
|
-
|
|
856
|
+
debugLogger3.debug("A command loader failed:", result.reason);
|
|
694
857
|
}
|
|
695
858
|
}
|
|
696
859
|
const commandMap = /* @__PURE__ */ new Map();
|
|
@@ -777,7 +940,7 @@ init_esbuild_shims();
|
|
|
777
940
|
init_esbuild_shims();
|
|
778
941
|
import fs from "node:fs/promises";
|
|
779
942
|
import path from "node:path";
|
|
780
|
-
var
|
|
943
|
+
var debugLogger4 = createDebugLogger("SESSION_PATHS");
|
|
781
944
|
var OPENAI_LOG_SCAN_LIMIT = 100;
|
|
782
945
|
async function collectSessionPathInfo(context) {
|
|
783
946
|
const config = context.services.config;
|
|
@@ -849,7 +1012,7 @@ async function findLatestOpenAILogForSession(logDir, sessionId) {
|
|
|
849
1012
|
if (error instanceof SyntaxError || error.code === "ENOENT") {
|
|
850
1013
|
continue;
|
|
851
1014
|
}
|
|
852
|
-
|
|
1015
|
+
debugLogger4.warn("Error reading OpenAI log file", file, error);
|
|
853
1016
|
}
|
|
854
1017
|
}
|
|
855
1018
|
return void 0;
|
|
@@ -868,7 +1031,7 @@ async function listLogFiles(dir, predicate) {
|
|
|
868
1031
|
return files;
|
|
869
1032
|
} catch (error) {
|
|
870
1033
|
if (error.code !== "ENOENT") {
|
|
871
|
-
|
|
1034
|
+
debugLogger4.warn("Unable to list OpenAI log directory", dir, error);
|
|
872
1035
|
}
|
|
873
1036
|
return [];
|
|
874
1037
|
}
|
|
@@ -1683,7 +1846,7 @@ function parseArenaArgs(args) {
|
|
|
1683
1846
|
return { models, task };
|
|
1684
1847
|
}
|
|
1685
1848
|
__name(parseArenaArgs, "parseArenaArgs");
|
|
1686
|
-
var
|
|
1849
|
+
var debugLogger5 = createDebugLogger("ARENA_COMMAND");
|
|
1687
1850
|
function buildArenaExecutionInput(parsed, config) {
|
|
1688
1851
|
if (!parsed.task) {
|
|
1689
1852
|
return {
|
|
@@ -1760,7 +1923,7 @@ function recordArenaItem(config, item) {
|
|
|
1760
1923
|
outputHistoryItems: [{ ...item }]
|
|
1761
1924
|
});
|
|
1762
1925
|
} catch {
|
|
1763
|
-
|
|
1926
|
+
debugLogger5.error("Failed to record arena history item");
|
|
1764
1927
|
}
|
|
1765
1928
|
}
|
|
1766
1929
|
__name(recordArenaItem, "recordArenaItem");
|
|
@@ -1770,7 +1933,7 @@ function executeArenaCommand(config, ui, input) {
|
|
|
1770
1933
|
const fullHistory = config.getGeminiClient().getChat().getHistoryShallow();
|
|
1771
1934
|
chatHistory = stripStartupContext(fullHistory);
|
|
1772
1935
|
} catch {
|
|
1773
|
-
|
|
1936
|
+
debugLogger5.debug("Could not retrieve chat history for arena agents");
|
|
1774
1937
|
}
|
|
1775
1938
|
const manager = new ArenaManager(config);
|
|
1776
1939
|
const emitter = manager.getEventEmitter();
|
|
@@ -1800,7 +1963,7 @@ function executeArenaCommand(config, ui, input) {
|
|
|
1800
1963
|
}, "handleSessionStart");
|
|
1801
1964
|
const handleAgentStart = /* @__PURE__ */ __name((event) => {
|
|
1802
1965
|
agentLabels.set(event.agentId, event.model.modelId);
|
|
1803
|
-
|
|
1966
|
+
debugLogger5.debug(
|
|
1804
1967
|
`Arena agent started: ${event.model.modelId} (${event.agentId})`
|
|
1805
1968
|
);
|
|
1806
1969
|
}, "handleAgentStart");
|
|
@@ -1917,12 +2080,12 @@ function executeArenaCommand(config, ui, input) {
|
|
|
1917
2080
|
chatHistory
|
|
1918
2081
|
}).then(
|
|
1919
2082
|
() => {
|
|
1920
|
-
|
|
2083
|
+
debugLogger5.debug("Arena agents settled");
|
|
1921
2084
|
},
|
|
1922
2085
|
(error) => {
|
|
1923
2086
|
const message2 = error instanceof Error ? error.message : String(error);
|
|
1924
2087
|
addAndRecordArenaMessage("error" /* ERROR */, `${message2}`);
|
|
1925
|
-
|
|
2088
|
+
debugLogger5.error("Arena session failed:", error);
|
|
1926
2089
|
config.setArenaManager(null);
|
|
1927
2090
|
for (const detach of detachListeners) {
|
|
1928
2091
|
detach();
|
|
@@ -2277,7 +2440,7 @@ var approvalModeCommand = {
|
|
|
2277
2440
|
};
|
|
2278
2441
|
}
|
|
2279
2442
|
}
|
|
2280
|
-
const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-
|
|
2443
|
+
const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-ULBJJWPY.js") : void 0;
|
|
2281
2444
|
if (config) {
|
|
2282
2445
|
try {
|
|
2283
2446
|
config.setApprovalMode(mode);
|
|
@@ -2375,6 +2538,175 @@ var branchCommand = {
|
|
|
2375
2538
|
}, "action")
|
|
2376
2539
|
};
|
|
2377
2540
|
|
|
2541
|
+
// packages/cli/src/ui/commands/peers-command.ts
|
|
2542
|
+
init_esbuild_shims();
|
|
2543
|
+
function shortId(msgId) {
|
|
2544
|
+
return msgId.replace(/-/g, "").slice(0, 6);
|
|
2545
|
+
}
|
|
2546
|
+
__name(shortId, "shortId");
|
|
2547
|
+
function displayHandle(entry, held) {
|
|
2548
|
+
const own = canonicalizeMsgId(entry.frame.msgId);
|
|
2549
|
+
let length = Math.min(shortId(entry.frame.msgId).length, own.length);
|
|
2550
|
+
const collides = /* @__PURE__ */ __name((len) => held.some(
|
|
2551
|
+
(other) => other !== entry && canonicalizeMsgId(other.frame.msgId).startsWith(own.slice(0, len))
|
|
2552
|
+
), "collides");
|
|
2553
|
+
while (length < own.length && collides(length)) {
|
|
2554
|
+
length += 1;
|
|
2555
|
+
}
|
|
2556
|
+
return own.slice(0, length);
|
|
2557
|
+
}
|
|
2558
|
+
__name(displayHandle, "displayHandle");
|
|
2559
|
+
function preview(text, max = 100) {
|
|
2560
|
+
const oneLine = flattenPeerLabel(text).replace(/\s+/g, " ").trim();
|
|
2561
|
+
return oneLine.length > max ? `${oneLine.slice(0, max - 1)}\u2026` : oneLine;
|
|
2562
|
+
}
|
|
2563
|
+
__name(preview, "preview");
|
|
2564
|
+
function formatHeldList(held) {
|
|
2565
|
+
if (held.length === 0) return "No messages from other sessions are waiting.";
|
|
2566
|
+
const lines = held.map((entry) => {
|
|
2567
|
+
const who = flattenPeerLabel(
|
|
2568
|
+
entry.frame.fromName ?? entry.frame.from ?? "unknown session"
|
|
2569
|
+
);
|
|
2570
|
+
const handle = flattenPeerLabel(displayHandle(entry, held));
|
|
2571
|
+
return ` ${handle} ${who}
|
|
2572
|
+
${preview(entry.frame.message.content)}
|
|
2573
|
+
held because ${describeHoldCause(entry.cause)}`;
|
|
2574
|
+
});
|
|
2575
|
+
return [
|
|
2576
|
+
`${held.length} message${held.length === 1 ? "" : "s"} waiting for your review:`,
|
|
2577
|
+
...lines,
|
|
2578
|
+
"",
|
|
2579
|
+
"Release with /peers accept <id|all>, or drop with /peers deny <id|all>."
|
|
2580
|
+
].join("\n");
|
|
2581
|
+
}
|
|
2582
|
+
__name(formatHeldList, "formatHeldList");
|
|
2583
|
+
function resolveHeld(held, token) {
|
|
2584
|
+
const needle = token.toLowerCase();
|
|
2585
|
+
const exact = held.filter(
|
|
2586
|
+
(entry) => canonicalizeMsgId(entry.frame.msgId) === needle
|
|
2587
|
+
);
|
|
2588
|
+
if (exact.length === 1) return { kind: "one", msgId: exact[0].frame.msgId };
|
|
2589
|
+
const matches = held.filter(
|
|
2590
|
+
(entry) => canonicalizeMsgId(entry.frame.msgId).startsWith(needle) || entry.frame.msgId.toLowerCase().startsWith(needle)
|
|
2591
|
+
);
|
|
2592
|
+
if (matches.length === 0) return { kind: "none" };
|
|
2593
|
+
if (matches.length > 1) return { kind: "ambiguous" };
|
|
2594
|
+
return { kind: "one", msgId: matches[0].frame.msgId };
|
|
2595
|
+
}
|
|
2596
|
+
__name(resolveHeld, "resolveHeld");
|
|
2597
|
+
var peersCommand = {
|
|
2598
|
+
name: "peers",
|
|
2599
|
+
kind: "built-in" /* BUILT_IN */,
|
|
2600
|
+
get description() {
|
|
2601
|
+
return t(
|
|
2602
|
+
"Review messages held from other Qwen Code sessions (accept | deny)"
|
|
2603
|
+
);
|
|
2604
|
+
},
|
|
2605
|
+
action: /* @__PURE__ */ __name(async (context, args) => {
|
|
2606
|
+
const peerMessaging = context.services.peerMessaging;
|
|
2607
|
+
if (!peerMessaging) {
|
|
2608
|
+
const enabled = context.services.settings?.merged?.agents?.crossSessionMessaging === true;
|
|
2609
|
+
return {
|
|
2610
|
+
type: "message",
|
|
2611
|
+
messageType: enabled ? "error" : "info",
|
|
2612
|
+
content: enabled ? "Cross-session messaging is on, but this session has no inbox: it either failed to register in the session registry or failed to bind its socket. Re-run with DEBUG=1 to see the bind error." : 'Cross-session messaging is off. Enable it with "agents.crossSessionMessaging": true in settings.json, then restart.'
|
|
2613
|
+
};
|
|
2614
|
+
}
|
|
2615
|
+
const held = peerMessaging.getHeld();
|
|
2616
|
+
const [verb, ...rest] = args.trim().split(/\s+/).filter(Boolean);
|
|
2617
|
+
if (verb === void 0 || verb === "list") {
|
|
2618
|
+
peerMessaging.recordHeldListing(held);
|
|
2619
|
+
return {
|
|
2620
|
+
type: "message",
|
|
2621
|
+
messageType: "info",
|
|
2622
|
+
content: formatHeldList(held)
|
|
2623
|
+
};
|
|
2624
|
+
}
|
|
2625
|
+
if (verb !== "accept" && verb !== "deny") {
|
|
2626
|
+
return {
|
|
2627
|
+
type: "message",
|
|
2628
|
+
messageType: "error",
|
|
2629
|
+
content: `Unknown subcommand "${verb}". Use /peers, /peers accept <id|all>, or /peers deny <id|all>.`
|
|
2630
|
+
};
|
|
2631
|
+
}
|
|
2632
|
+
const decision = verb === "accept" ? "approve" : "deny";
|
|
2633
|
+
const target = rest[0];
|
|
2634
|
+
if (target === void 0) {
|
|
2635
|
+
return {
|
|
2636
|
+
type: "message",
|
|
2637
|
+
messageType: "error",
|
|
2638
|
+
content: `Which message? Use /peers ${verb} <id|all> \u2014 /peers lists the ids.`
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
if (peerMessaging.heldSetChangedSinceListing()) {
|
|
2642
|
+
return {
|
|
2643
|
+
type: "message",
|
|
2644
|
+
messageType: "error",
|
|
2645
|
+
content: "The waiting list changed since you listed it \u2014 run /peers again to review what is waiting now."
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
if (held.length === 0) {
|
|
2649
|
+
return {
|
|
2650
|
+
type: "message",
|
|
2651
|
+
messageType: "info",
|
|
2652
|
+
content: "No messages from other sessions are waiting."
|
|
2653
|
+
};
|
|
2654
|
+
}
|
|
2655
|
+
if (target.toLowerCase() === "all") {
|
|
2656
|
+
const ids = held.map((entry) => entry.frame.msgId);
|
|
2657
|
+
let count = 0;
|
|
2658
|
+
let failed = 0;
|
|
2659
|
+
for (const msgId of ids) {
|
|
2660
|
+
const outcome2 = peerMessaging.decide(msgId, decision);
|
|
2661
|
+
if (outcome2 === "done") count += 1;
|
|
2662
|
+
else if (outcome2 === "failed") failed += 1;
|
|
2663
|
+
}
|
|
2664
|
+
peerMessaging.recordHeldListing(peerMessaging.getHeld());
|
|
2665
|
+
return {
|
|
2666
|
+
type: "message",
|
|
2667
|
+
messageType: "info",
|
|
2668
|
+
content: `${verb === "accept" ? "Released" : "Dropped"} ${count} message${count === 1 ? "" : "s"}.` + (failed > 0 ? ` ${failed} could not be delivered and ${failed === 1 ? "is" : "are"} still waiting \u2014 try again once the session catches up.` : "")
|
|
2669
|
+
};
|
|
2670
|
+
}
|
|
2671
|
+
const resolved = resolveHeld(held, target);
|
|
2672
|
+
if (resolved.kind === "none") {
|
|
2673
|
+
return {
|
|
2674
|
+
type: "message",
|
|
2675
|
+
messageType: "error",
|
|
2676
|
+
content: `No held message matches "${target}". Run /peers to see what is waiting.`
|
|
2677
|
+
};
|
|
2678
|
+
}
|
|
2679
|
+
if (resolved.kind === "ambiguous") {
|
|
2680
|
+
return {
|
|
2681
|
+
type: "message",
|
|
2682
|
+
messageType: "error",
|
|
2683
|
+
content: `"${target}" matches more than one held message. Use more characters of the id.`
|
|
2684
|
+
};
|
|
2685
|
+
}
|
|
2686
|
+
const outcome = peerMessaging.decide(resolved.msgId, decision);
|
|
2687
|
+
peerMessaging.recordHeldListing(peerMessaging.getHeld());
|
|
2688
|
+
if (outcome === "gone") {
|
|
2689
|
+
return {
|
|
2690
|
+
type: "message",
|
|
2691
|
+
messageType: "info",
|
|
2692
|
+
content: "That message is no longer waiting \u2014 it may have expired or already been decided."
|
|
2693
|
+
};
|
|
2694
|
+
}
|
|
2695
|
+
if (outcome === "failed") {
|
|
2696
|
+
return {
|
|
2697
|
+
type: "message",
|
|
2698
|
+
messageType: "error",
|
|
2699
|
+
content: "The session could not take the message just now \u2014 its input queue is full. It is still waiting; try again in a moment."
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
return {
|
|
2703
|
+
type: "message",
|
|
2704
|
+
messageType: "info",
|
|
2705
|
+
content: verb === "accept" ? "Released to this session. It will be picked up on the next turn." : "Dropped. The sending session has been told."
|
|
2706
|
+
};
|
|
2707
|
+
}, "action")
|
|
2708
|
+
};
|
|
2709
|
+
|
|
2378
2710
|
// packages/cli/src/ui/commands/btwCommand.ts
|
|
2379
2711
|
init_esbuild_shims();
|
|
2380
2712
|
function formatBtwError(error) {
|
|
@@ -2746,12 +3078,12 @@ var directoryCommand = {
|
|
|
2746
3078
|
config.getContextRuleExcludes()
|
|
2747
3079
|
);
|
|
2748
3080
|
config.setUserMemory(memoryContent);
|
|
2749
|
-
config.
|
|
3081
|
+
config.setMemoryFileCount(fileCount);
|
|
2750
3082
|
config.setContextFilePaths(contextFilePaths);
|
|
2751
3083
|
config.setConditionalRulesRegistry(
|
|
2752
3084
|
new ConditionalRulesRegistry(conditionalRules, projectRoot)
|
|
2753
3085
|
);
|
|
2754
|
-
context.ui.
|
|
3086
|
+
context.ui.setMemoryFileCount(fileCount);
|
|
2755
3087
|
messages.push(
|
|
2756
3088
|
t(
|
|
2757
3089
|
"Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}",
|
|
@@ -3132,7 +3464,7 @@ __name(buildBackgroundWorkBlockedMessage, "buildBackgroundWorkBlockedMessage");
|
|
|
3132
3464
|
|
|
3133
3465
|
// packages/cli/src/ui/commands/clearCommand.ts
|
|
3134
3466
|
import process2 from "node:process";
|
|
3135
|
-
var
|
|
3467
|
+
var debugLogger6 = createDebugLogger("CLEAR_COMMAND");
|
|
3136
3468
|
var clearCommand = {
|
|
3137
3469
|
name: "clear",
|
|
3138
3470
|
altNames: ["reset", "new"],
|
|
@@ -3144,8 +3476,8 @@ var clearCommand = {
|
|
|
3144
3476
|
action: /* @__PURE__ */ __name(async (context, _args) => {
|
|
3145
3477
|
const { config } = context.services;
|
|
3146
3478
|
const memBefore = process2.memoryUsage();
|
|
3147
|
-
if (
|
|
3148
|
-
|
|
3479
|
+
if (debugLogger6.isEnabled()) {
|
|
3480
|
+
debugLogger6.debug(
|
|
3149
3481
|
`[CLEAR_START] Starting clear command, heapUsed=${(memBefore.heapUsed / 1024 / 1024).toFixed(1)}MB, rss=${(memBefore.rss / 1024 / 1024).toFixed(1)}MB`
|
|
3150
3482
|
);
|
|
3151
3483
|
}
|
|
@@ -3206,10 +3538,10 @@ var clearCommand = {
|
|
|
3206
3538
|
context.ui.clear();
|
|
3207
3539
|
}
|
|
3208
3540
|
const memAfter = process2.memoryUsage();
|
|
3209
|
-
if (
|
|
3541
|
+
if (debugLogger6.isEnabled()) {
|
|
3210
3542
|
const heapDiff = (memAfter.heapUsed - memBefore.heapUsed) / 1024 / 1024;
|
|
3211
3543
|
const rssDiff = (memAfter.rss - memBefore.rss) / 1024 / 1024;
|
|
3212
|
-
|
|
3544
|
+
debugLogger6.debug(
|
|
3213
3545
|
`[CLEAR_END] Clear command completed, heapUsed=${(memAfter.heapUsed / 1024 / 1024).toFixed(1)}MB, rss=${(memAfter.rss / 1024 / 1024).toFixed(1)}MB, heapDiff=${heapDiff.toFixed(1)}MB, rssDiff=${rssDiff.toFixed(1)}MB`
|
|
3214
3546
|
);
|
|
3215
3547
|
}
|
|
@@ -3570,6 +3902,7 @@ var deleteCommand = {
|
|
|
3570
3902
|
// packages/cli/src/ui/commands/compressCommand.ts
|
|
3571
3903
|
init_esbuild_shims();
|
|
3572
3904
|
var MAX_COMPRESS_INSTRUCTIONS_CHARS = 2e3;
|
|
3905
|
+
var formatTokenCount2 = /* @__PURE__ */ __name((count, isEstimated) => isEstimated ? `~${count}` : String(count), "formatTokenCount");
|
|
3573
3906
|
var compressCommand = {
|
|
3574
3907
|
name: "compress",
|
|
3575
3908
|
altNames: ["summarize"],
|
|
@@ -3648,7 +3981,7 @@ var compressCommand = {
|
|
|
3648
3981
|
}
|
|
3649
3982
|
yield {
|
|
3650
3983
|
messageType: "info",
|
|
3651
|
-
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).` + (compressed.warning ? `
|
|
3984
|
+
content: `Context compressed (${formatTokenCount2(compressed.originalTokenCount, compressed.originalTokenCountIsEstimated)} -> ${formatTokenCount2(compressed.newTokenCount, compressed.newTokenCountIsEstimated)}).` + (compressed.warning ? `
|
|
3652
3985
|
\u26A0\uFE0F ${compressed.warning}` : "")
|
|
3653
3986
|
};
|
|
3654
3987
|
} catch (e) {
|
|
@@ -3702,7 +4035,9 @@ var compressCommand = {
|
|
|
3702
4035
|
originalTokenCount: compressed.originalTokenCount,
|
|
3703
4036
|
newTokenCount: compressed.newTokenCount,
|
|
3704
4037
|
compressionStatus: compressed.compressionStatus,
|
|
3705
|
-
compressionKind: "summarize"
|
|
4038
|
+
compressionKind: "summarize",
|
|
4039
|
+
originalTokenCountIsEstimated: compressed.originalTokenCountIsEstimated,
|
|
4040
|
+
newTokenCountIsEstimated: compressed.newTokenCountIsEstimated
|
|
3706
4041
|
}
|
|
3707
4042
|
},
|
|
3708
4043
|
Date.now()
|
|
@@ -3718,7 +4053,7 @@ var compressCommand = {
|
|
|
3718
4053
|
return {
|
|
3719
4054
|
type: "message",
|
|
3720
4055
|
messageType: "info",
|
|
3721
|
-
content: `${truncationNotice ? `${truncationNotice} ` : ""}Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).` + (compressed.warning ? `
|
|
4056
|
+
content: `${truncationNotice ? `${truncationNotice} ` : ""}Context compressed (${formatTokenCount2(compressed.originalTokenCount, compressed.originalTokenCountIsEstimated)} -> ${formatTokenCount2(compressed.newTokenCount, compressed.newTokenCountIsEstimated)}).` + (compressed.warning ? `
|
|
3722
4057
|
\u26A0\uFE0F ${compressed.warning}` : "")
|
|
3723
4058
|
};
|
|
3724
4059
|
} catch (e) {
|
|
@@ -3754,6 +4089,7 @@ var compressCommand = {
|
|
|
3754
4089
|
|
|
3755
4090
|
// packages/cli/src/ui/commands/compressFastCommand.ts
|
|
3756
4091
|
init_esbuild_shims();
|
|
4092
|
+
var formatTokenCount3 = /* @__PURE__ */ __name((count, isEstimated) => isEstimated ? `~${count}` : String(count), "formatTokenCount");
|
|
3757
4093
|
var compressFastCommand = {
|
|
3758
4094
|
name: "compress-fast",
|
|
3759
4095
|
get description() {
|
|
@@ -3819,7 +4155,7 @@ var compressFastCommand = {
|
|
|
3819
4155
|
}
|
|
3820
4156
|
yield {
|
|
3821
4157
|
messageType: "info",
|
|
3822
|
-
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
4158
|
+
content: `Context compressed (${formatTokenCount3(compressed.originalTokenCount, compressed.originalTokenCountIsEstimated)} -> ${formatTokenCount3(compressed.newTokenCount, compressed.newTokenCountIsEstimated)}).`
|
|
3823
4159
|
};
|
|
3824
4160
|
} catch (e) {
|
|
3825
4161
|
yield {
|
|
@@ -3863,7 +4199,9 @@ var compressFastCommand = {
|
|
|
3863
4199
|
originalTokenCount: compressed.originalTokenCount,
|
|
3864
4200
|
newTokenCount: compressed.newTokenCount,
|
|
3865
4201
|
compressionStatus: compressed.compressionStatus,
|
|
3866
|
-
compressionKind: "fast"
|
|
4202
|
+
compressionKind: "fast",
|
|
4203
|
+
originalTokenCountIsEstimated: compressed.originalTokenCountIsEstimated,
|
|
4204
|
+
newTokenCountIsEstimated: compressed.newTokenCountIsEstimated
|
|
3867
4205
|
}
|
|
3868
4206
|
},
|
|
3869
4207
|
Date.now()
|
|
@@ -3873,7 +4211,7 @@ var compressFastCommand = {
|
|
|
3873
4211
|
return {
|
|
3874
4212
|
type: "message",
|
|
3875
4213
|
messageType: "info",
|
|
3876
|
-
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
4214
|
+
content: `Context compressed (${formatTokenCount3(compressed.originalTokenCount, compressed.originalTokenCountIsEstimated)} -> ${formatTokenCount3(compressed.newTokenCount, compressed.newTokenCountIsEstimated)}).`
|
|
3877
4215
|
};
|
|
3878
4216
|
} catch (e) {
|
|
3879
4217
|
if (executionMode === "interactive") {
|
|
@@ -4572,7 +4910,7 @@ var docsCommand = {
|
|
|
4572
4910
|
// packages/cli/src/ui/commands/doctorCommand.ts
|
|
4573
4911
|
init_esbuild_shims();
|
|
4574
4912
|
|
|
4575
|
-
// packages/cli/src/
|
|
4913
|
+
// packages/cli/src/ui/commands/doctorChecks.ts
|
|
4576
4914
|
init_esbuild_shims();
|
|
4577
4915
|
import process4 from "node:process";
|
|
4578
4916
|
import os from "node:os";
|
|
@@ -5320,7 +5658,7 @@ function formatMemoryDiagnostics(diagnostics) {
|
|
|
5320
5658
|
__name(formatMemoryDiagnostics, "formatMemoryDiagnostics");
|
|
5321
5659
|
|
|
5322
5660
|
// packages/cli/src/ui/commands/doctorCommand.ts
|
|
5323
|
-
var
|
|
5661
|
+
var debugLogger7 = createDebugLogger("DOCTOR_MEMORY");
|
|
5324
5662
|
var MEMORY_SUBCOMMAND = "memory";
|
|
5325
5663
|
var CPU_PROFILE_SUBCOMMAND = "cpu-profile";
|
|
5326
5664
|
var ROLLBACK_SUBCOMMAND = "rollback";
|
|
@@ -5644,8 +5982,8 @@ function formatSmapsRollup(smapsRollup) {
|
|
|
5644
5982
|
if (rssLine) {
|
|
5645
5983
|
return rssLine;
|
|
5646
5984
|
}
|
|
5647
|
-
const
|
|
5648
|
-
return `${t("parse error")}: ${
|
|
5985
|
+
const preview2 = smapsRollup.slice(0, 80).trim().replace(/\s+/g, " ");
|
|
5986
|
+
return `${t("parse error")}: ${preview2}`;
|
|
5649
5987
|
}
|
|
5650
5988
|
__name(formatSmapsRollup, "formatSmapsRollup");
|
|
5651
5989
|
function formatCoreDiagnostics(diagnostics) {
|
|
@@ -5734,7 +6072,7 @@ function collectToolResultRetention(context) {
|
|
|
5734
6072
|
presentInCompressionInput: stats.oversizedResultCount > 0
|
|
5735
6073
|
};
|
|
5736
6074
|
} catch (error) {
|
|
5737
|
-
|
|
6075
|
+
debugLogger7.warn(
|
|
5738
6076
|
`Tool result retention diagnostics unavailable: ${formatErrorMessage2(error)}`
|
|
5739
6077
|
);
|
|
5740
6078
|
return null;
|
|
@@ -6065,11 +6403,13 @@ var effortCommand = {
|
|
|
6065
6403
|
};
|
|
6066
6404
|
}
|
|
6067
6405
|
applyReasoningEffort(config, tier);
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6406
|
+
if (context.executionPolicy?.persistModelSelection !== false) {
|
|
6407
|
+
settings.setValue(
|
|
6408
|
+
getPersistScopeForModelSelection(settings),
|
|
6409
|
+
"model.reasoningEffort",
|
|
6410
|
+
tier
|
|
6411
|
+
);
|
|
6412
|
+
}
|
|
6073
6413
|
return {
|
|
6074
6414
|
type: "message",
|
|
6075
6415
|
messageType: "info",
|
|
@@ -6083,7 +6423,7 @@ init_esbuild_shims();
|
|
|
6083
6423
|
import * as fs5 from "node:fs/promises";
|
|
6084
6424
|
import path5 from "node:path";
|
|
6085
6425
|
var EXPORT_DIR_OUT_OF_CWD = "Export directory must be within the project working directory.";
|
|
6086
|
-
var
|
|
6426
|
+
var debugLogger8 = createDebugLogger("EXPORT_COMMAND");
|
|
6087
6427
|
function formatExportTargetContext(target) {
|
|
6088
6428
|
return `target: "${target.outputDir}", cwd: "${target.resolvedCwd}"`;
|
|
6089
6429
|
}
|
|
@@ -6112,7 +6452,7 @@ function resolveExportTarget(cwd, args, extension) {
|
|
|
6112
6452
|
}
|
|
6113
6453
|
__name(resolveExportTarget, "resolveExportTarget");
|
|
6114
6454
|
async function validateExportTargetWithinCwd(target) {
|
|
6115
|
-
|
|
6455
|
+
debugLogger8.debug(
|
|
6116
6456
|
"Validating export target realpath:",
|
|
6117
6457
|
formatExportTargetContext(target)
|
|
6118
6458
|
);
|
|
@@ -6125,7 +6465,7 @@ async function validateExportTargetWithinCwd(target) {
|
|
|
6125
6465
|
]);
|
|
6126
6466
|
} catch (error) {
|
|
6127
6467
|
if (error.code === "ENOENT") {
|
|
6128
|
-
|
|
6468
|
+
debugLogger8.debug(
|
|
6129
6469
|
"Export target realpath validation failed: missing path",
|
|
6130
6470
|
formatExportTargetContext(target)
|
|
6131
6471
|
);
|
|
@@ -6140,7 +6480,7 @@ async function validateExportTargetWithinCwd(target) {
|
|
|
6140
6480
|
throw error;
|
|
6141
6481
|
}
|
|
6142
6482
|
if (!isSubpath(realCwd, realOutputDir)) {
|
|
6143
|
-
|
|
6483
|
+
debugLogger8.debug("Export target realpath escaped cwd:", {
|
|
6144
6484
|
realCwd,
|
|
6145
6485
|
realOutputDir,
|
|
6146
6486
|
target
|
|
@@ -6158,21 +6498,21 @@ async function validateExportTargetWithinCwd(target) {
|
|
|
6158
6498
|
__name(validateExportTargetWithinCwd, "validateExportTargetWithinCwd");
|
|
6159
6499
|
async function realpathNearestExisting(outputDir, resolvedCwd) {
|
|
6160
6500
|
let currentPath = outputDir;
|
|
6161
|
-
|
|
6501
|
+
debugLogger8.debug("Resolving nearest existing export parent:", {
|
|
6162
6502
|
outputDir,
|
|
6163
6503
|
resolvedCwd
|
|
6164
6504
|
});
|
|
6165
6505
|
while (isSubpath(resolvedCwd, currentPath)) {
|
|
6166
6506
|
try {
|
|
6167
6507
|
const realCurrentPath = await fs5.realpath(currentPath);
|
|
6168
|
-
|
|
6508
|
+
debugLogger8.debug("Resolved nearest existing export parent:", {
|
|
6169
6509
|
currentPath,
|
|
6170
6510
|
realCurrentPath
|
|
6171
6511
|
});
|
|
6172
6512
|
return realCurrentPath;
|
|
6173
6513
|
} catch (error) {
|
|
6174
6514
|
if (error.code !== "ENOENT") {
|
|
6175
|
-
|
|
6515
|
+
debugLogger8.debug("Failed to resolve existing export parent:", error);
|
|
6176
6516
|
throw error;
|
|
6177
6517
|
}
|
|
6178
6518
|
const parentPath = path5.dirname(currentPath);
|
|
@@ -6186,7 +6526,7 @@ async function realpathNearestExisting(outputDir, resolvedCwd) {
|
|
|
6186
6526
|
}
|
|
6187
6527
|
__name(realpathNearestExisting, "realpathNearestExisting");
|
|
6188
6528
|
async function validateExistingExportParentWithinCwd(target) {
|
|
6189
|
-
|
|
6529
|
+
debugLogger8.debug(
|
|
6190
6530
|
"Validating existing export parent realpath:",
|
|
6191
6531
|
formatExportTargetContext(target)
|
|
6192
6532
|
);
|
|
@@ -6204,7 +6544,7 @@ async function validateExistingExportParentWithinCwd(target) {
|
|
|
6204
6544
|
target.resolvedCwd
|
|
6205
6545
|
);
|
|
6206
6546
|
if (!isSubpath(realCwd, realExistingParent)) {
|
|
6207
|
-
|
|
6547
|
+
debugLogger8.debug("Existing export parent escaped cwd:", {
|
|
6208
6548
|
realCwd,
|
|
6209
6549
|
realExistingParent,
|
|
6210
6550
|
target
|
|
@@ -6240,7 +6580,7 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6240
6580
|
}
|
|
6241
6581
|
const target = resolveExportTarget(cwd, args, exportFormat.extension);
|
|
6242
6582
|
const targetFilepath = target.filepath;
|
|
6243
|
-
|
|
6583
|
+
debugLogger8.debug("Resolved export target:", {
|
|
6244
6584
|
format: exportFormat.displayName,
|
|
6245
6585
|
cwd,
|
|
6246
6586
|
outputDirArg: args.trim(),
|
|
@@ -6249,7 +6589,7 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6249
6589
|
filepath: target.filepath
|
|
6250
6590
|
});
|
|
6251
6591
|
if (!target.isInsideCwd) {
|
|
6252
|
-
|
|
6592
|
+
debugLogger8.debug(
|
|
6253
6593
|
"Export target rejected before realpath validation:",
|
|
6254
6594
|
formatExportTargetContext(target)
|
|
6255
6595
|
);
|
|
@@ -6266,17 +6606,17 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6266
6606
|
if (initialValidationError) {
|
|
6267
6607
|
return initialValidationError;
|
|
6268
6608
|
}
|
|
6269
|
-
|
|
6609
|
+
debugLogger8.debug("Export target validation passed:", {
|
|
6270
6610
|
format: exportFormat.displayName,
|
|
6271
6611
|
outputDir: target.outputDir,
|
|
6272
6612
|
outputDirKind: target.outputDirKind
|
|
6273
6613
|
});
|
|
6274
6614
|
const sessionService = new SessionService(cwd);
|
|
6275
6615
|
const sessionId = config.getSessionId();
|
|
6276
|
-
|
|
6616
|
+
debugLogger8.debug("Loading session for export:", { sessionId, cwd });
|
|
6277
6617
|
const sessionData = await sessionService.loadSession(sessionId);
|
|
6278
6618
|
if (!sessionData) {
|
|
6279
|
-
|
|
6619
|
+
debugLogger8.debug("No active session found for export:", {
|
|
6280
6620
|
sessionId,
|
|
6281
6621
|
cwd
|
|
6282
6622
|
});
|
|
@@ -6296,12 +6636,12 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6296
6636
|
const content = exportFormat.format(normalizedData);
|
|
6297
6637
|
if (target.outputDirKind === "custom") {
|
|
6298
6638
|
try {
|
|
6299
|
-
|
|
6639
|
+
debugLogger8.debug("Creating export directory:", {
|
|
6300
6640
|
outputDir: target.outputDir
|
|
6301
6641
|
});
|
|
6302
6642
|
await fs5.mkdir(target.outputDir, { recursive: true, mode: 448 });
|
|
6303
6643
|
} catch (error) {
|
|
6304
|
-
|
|
6644
|
+
debugLogger8.debug("Failed to create export directory:", error);
|
|
6305
6645
|
return {
|
|
6306
6646
|
type: "message",
|
|
6307
6647
|
messageType: "error",
|
|
@@ -6315,7 +6655,7 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6315
6655
|
return writeValidationError;
|
|
6316
6656
|
}
|
|
6317
6657
|
} catch (error) {
|
|
6318
|
-
|
|
6658
|
+
debugLogger8.debug("Export path validation failed before write:", error);
|
|
6319
6659
|
return {
|
|
6320
6660
|
type: "message",
|
|
6321
6661
|
messageType: "error",
|
|
@@ -6323,7 +6663,7 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6323
6663
|
};
|
|
6324
6664
|
}
|
|
6325
6665
|
try {
|
|
6326
|
-
|
|
6666
|
+
debugLogger8.debug("Writing export file:", {
|
|
6327
6667
|
format: exportFormat.displayName,
|
|
6328
6668
|
filepath: target.filepath
|
|
6329
6669
|
});
|
|
@@ -6332,17 +6672,17 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6332
6672
|
mode: 384
|
|
6333
6673
|
});
|
|
6334
6674
|
await fs5.chmod(target.filepath, 384).catch((error) => {
|
|
6335
|
-
|
|
6675
|
+
debugLogger8.debug("Failed to tighten export file permissions:", error);
|
|
6336
6676
|
});
|
|
6337
6677
|
} catch (error) {
|
|
6338
|
-
|
|
6678
|
+
debugLogger8.debug("Failed to write export file:", error);
|
|
6339
6679
|
return {
|
|
6340
6680
|
type: "message",
|
|
6341
6681
|
messageType: "error",
|
|
6342
6682
|
content: `Failed to export session: ${error instanceof Error ? error.message : String(error)} (${exportFormat.displayName} target: "${targetFilepath}")`
|
|
6343
6683
|
};
|
|
6344
6684
|
}
|
|
6345
|
-
|
|
6685
|
+
debugLogger8.debug("Session export completed:", {
|
|
6346
6686
|
format: exportFormat.displayName,
|
|
6347
6687
|
filepath: target.filepath
|
|
6348
6688
|
});
|
|
@@ -6352,7 +6692,7 @@ async function exportSessionAction(context, args, exportFormat) {
|
|
|
6352
6692
|
content: `Session exported to ${exportFormat.displayName}: ${target.displayPath}`
|
|
6353
6693
|
};
|
|
6354
6694
|
} catch (error) {
|
|
6355
|
-
|
|
6695
|
+
debugLogger8.debug("Session export failed:", {
|
|
6356
6696
|
format: exportFormat.displayName,
|
|
6357
6697
|
target,
|
|
6358
6698
|
error
|
|
@@ -6448,7 +6788,7 @@ var exportCommand = {
|
|
|
6448
6788
|
|
|
6449
6789
|
// packages/cli/src/ui/commands/forkCommand.ts
|
|
6450
6790
|
init_esbuild_shims();
|
|
6451
|
-
var
|
|
6791
|
+
var debugLogger9 = createDebugLogger("FORK_COMMAND");
|
|
6452
6792
|
function deriveForkDescription(directive) {
|
|
6453
6793
|
const oneLine = directive.replace(/\s+/g, " ").trim();
|
|
6454
6794
|
return oneLine.length > 60 ? `${oneLine.slice(0, 57)}\u2026` : oneLine;
|
|
@@ -6504,7 +6844,7 @@ var forkCommand = {
|
|
|
6504
6844
|
try {
|
|
6505
6845
|
hasHistory = (config.getGeminiClient().getHistoryShallow() ?? []).length > 0;
|
|
6506
6846
|
} catch (error) {
|
|
6507
|
-
|
|
6847
|
+
debugLogger9.debug("Failed to read history before /fork:", error);
|
|
6508
6848
|
hasHistory = false;
|
|
6509
6849
|
}
|
|
6510
6850
|
if (!hasHistory) {
|
|
@@ -6564,7 +6904,7 @@ var forkCommand = {
|
|
|
6564
6904
|
]
|
|
6565
6905
|
});
|
|
6566
6906
|
} catch (error) {
|
|
6567
|
-
|
|
6907
|
+
debugLogger9.debug("Failed to record fork event in history:", error);
|
|
6568
6908
|
}
|
|
6569
6909
|
return {
|
|
6570
6910
|
type: "message",
|
|
@@ -6578,7 +6918,7 @@ var forkCommand = {
|
|
|
6578
6918
|
|
|
6579
6919
|
// packages/cli/src/ui/commands/extensionsCommand.ts
|
|
6580
6920
|
init_esbuild_shims();
|
|
6581
|
-
var
|
|
6921
|
+
var debugLogger10 = createDebugLogger("EXTENSIONS_COMMAND");
|
|
6582
6922
|
var EXTENSION_EXPLORE_URL = {
|
|
6583
6923
|
Gemini: "https://geminicli.com/extensions/",
|
|
6584
6924
|
ClaudeCode: "https://claudemarketplaces.com/"
|
|
@@ -6741,7 +7081,7 @@ async function installAction(context, args) {
|
|
|
6741
7081
|
}
|
|
6742
7082
|
const extensionManager = context.services.config?.getExtensionManager();
|
|
6743
7083
|
if (!(extensionManager instanceof ExtensionManager)) {
|
|
6744
|
-
|
|
7084
|
+
debugLogger10.error(
|
|
6745
7085
|
`Cannot ${context.invocation?.name} extensions in this environment`
|
|
6746
7086
|
);
|
|
6747
7087
|
return;
|
|
@@ -7075,7 +7415,7 @@ var expandNowCommand = {
|
|
|
7075
7415
|
content: t("History is already expanded in this session.")
|
|
7076
7416
|
};
|
|
7077
7417
|
}
|
|
7078
|
-
const { expandCollapsedHistory } = await import("./resumeHistoryUtils-
|
|
7418
|
+
const { expandCollapsedHistory } = await import("./resumeHistoryUtils-44IETXDY.js");
|
|
7079
7419
|
const updated = expandCollapsedHistory(history);
|
|
7080
7420
|
loadHistory(updated);
|
|
7081
7421
|
refreshStatic();
|
|
@@ -8458,6 +8798,15 @@ var importConfigCommand = {
|
|
|
8458
8798
|
${usage()}`
|
|
8459
8799
|
};
|
|
8460
8800
|
}
|
|
8801
|
+
if (parsed.scope === "project" && context.executionPolicy?.allowWorkspaceSettingsWrite === false) {
|
|
8802
|
+
return {
|
|
8803
|
+
type: "message",
|
|
8804
|
+
messageType: "error",
|
|
8805
|
+
content: t(
|
|
8806
|
+
"Project configuration imports are not available in this session."
|
|
8807
|
+
)
|
|
8808
|
+
};
|
|
8809
|
+
}
|
|
8461
8810
|
try {
|
|
8462
8811
|
const importSource = resolveImportSourceForScope(
|
|
8463
8812
|
parsed.source,
|
|
@@ -8514,7 +8863,7 @@ var initCommand = {
|
|
|
8514
8863
|
};
|
|
8515
8864
|
}
|
|
8516
8865
|
const targetDir = context.services.config.getTargetDir();
|
|
8517
|
-
const contextFileName =
|
|
8866
|
+
const contextFileName = getCurrentMemoryFilename();
|
|
8518
8867
|
const contextFilePath = path8.join(targetDir, contextFileName);
|
|
8519
8868
|
try {
|
|
8520
8869
|
if (fs7.existsSync(contextFilePath)) {
|
|
@@ -8609,7 +8958,7 @@ Write the complete content to the \`${contextFileName}\` file. The output must b
|
|
|
8609
8958
|
|
|
8610
8959
|
// packages/cli/src/ui/commands/languageCommand.ts
|
|
8611
8960
|
init_esbuild_shims();
|
|
8612
|
-
var
|
|
8961
|
+
var debugLogger11 = createDebugLogger("LANGUAGE_COMMAND");
|
|
8613
8962
|
function getCurrentOutputLanguage(context) {
|
|
8614
8963
|
const settingValue = context?.services?.settings?.merged?.general?.outputLanguage || OUTPUT_LANGUAGE_AUTO;
|
|
8615
8964
|
const resolved = resolveOutputLanguageOrPreserveAuto(settingValue);
|
|
@@ -8652,6 +9001,15 @@ function validateUiScopeFlags(context, parsed) {
|
|
|
8652
9001
|
)
|
|
8653
9002
|
};
|
|
8654
9003
|
}
|
|
9004
|
+
if (parsed.scope === "Workspace" /* Workspace */ && context.executionPolicy?.allowWorkspaceSettingsWrite === false) {
|
|
9005
|
+
return {
|
|
9006
|
+
type: "message",
|
|
9007
|
+
messageType: "error",
|
|
9008
|
+
content: t(
|
|
9009
|
+
"Project language settings are not available in this session."
|
|
9010
|
+
)
|
|
9011
|
+
};
|
|
9012
|
+
}
|
|
8655
9013
|
if (parsed.scope === "Workspace" /* Workspace */ && context.services.settings && !context.services.settings.isTrusted) {
|
|
8656
9014
|
return {
|
|
8657
9015
|
type: "message",
|
|
@@ -8677,7 +9035,7 @@ async function setUiLanguage(context, lang, scope = "User" /* User */) {
|
|
|
8677
9035
|
throwOnWriteFailure: true
|
|
8678
9036
|
});
|
|
8679
9037
|
} catch (error) {
|
|
8680
|
-
|
|
9038
|
+
debugLogger11.warn("Failed to save language setting:", error);
|
|
8681
9039
|
return {
|
|
8682
9040
|
type: "message",
|
|
8683
9041
|
messageType: "error",
|
|
@@ -8713,7 +9071,7 @@ async function setOutputLanguage(context, language) {
|
|
|
8713
9071
|
settingValue
|
|
8714
9072
|
);
|
|
8715
9073
|
} catch (error) {
|
|
8716
|
-
|
|
9074
|
+
debugLogger11.warn("Failed to save output language setting:", error);
|
|
8717
9075
|
}
|
|
8718
9076
|
}
|
|
8719
9077
|
const config = context.services.config;
|
|
@@ -8722,7 +9080,7 @@ async function setOutputLanguage(context, language) {
|
|
|
8722
9080
|
await config.refreshHierarchicalMemory();
|
|
8723
9081
|
await config.getGeminiClient().refreshSystemInstruction();
|
|
8724
9082
|
} catch (error) {
|
|
8725
|
-
|
|
9083
|
+
debugLogger11.warn(
|
|
8726
9084
|
"Failed to apply output language to running session:",
|
|
8727
9085
|
error
|
|
8728
9086
|
);
|
|
@@ -9077,7 +9435,7 @@ var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders
|
|
|
9077
9435
|
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.";
|
|
9078
9436
|
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.";
|
|
9079
9437
|
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.";
|
|
9080
|
-
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.";
|
|
9438
|
+
var IMAGE_MODEL_CONFIGURATION_HINT = "Configure a model with supportsImageGeneration: true (or legacy imageOnly: true), baseUrl, and envKey in settings.modelProviders. Run /model --image <model-id> to select it.";
|
|
9081
9439
|
var MODEL_PICKER_FLAGS = [
|
|
9082
9440
|
"fast",
|
|
9083
9441
|
"voice",
|
|
@@ -9132,7 +9490,7 @@ function persistSetting(settings, path18, value, scopeOverride) {
|
|
|
9132
9490
|
settings.setValue(resolveScope(settings, scopeOverride), path18, value);
|
|
9133
9491
|
}
|
|
9134
9492
|
__name(persistSetting, "persistSetting");
|
|
9135
|
-
async function switchMainModel(config, settings, currentAuthType, modelArg, scopeOverride) {
|
|
9493
|
+
async function switchMainModel(config, settings, currentAuthType, modelArg, scopeOverride, persistSelection = true) {
|
|
9136
9494
|
const parsed = parseAcpModelOption(modelArg);
|
|
9137
9495
|
if (parsed.authType) {
|
|
9138
9496
|
await config.switchModel(
|
|
@@ -9140,19 +9498,23 @@ async function switchMainModel(config, settings, currentAuthType, modelArg, scop
|
|
|
9140
9498
|
parsed.modelId,
|
|
9141
9499
|
parsed.authType !== currentAuthType && parsed.authType === "qwen-oauth" /* QWEN_OAUTH */ ? { requireCachedCredentials: true } : void 0
|
|
9142
9500
|
);
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9501
|
+
if (persistSelection) {
|
|
9502
|
+
persistSetting(
|
|
9503
|
+
settings,
|
|
9504
|
+
"security.auth.selectedType",
|
|
9505
|
+
parsed.authType,
|
|
9506
|
+
scopeOverride
|
|
9507
|
+
);
|
|
9508
|
+
persistSetting(settings, "model.name", parsed.modelId, scopeOverride);
|
|
9509
|
+
persistSetting(settings, "model.baseUrl", "", scopeOverride);
|
|
9510
|
+
}
|
|
9151
9511
|
return parsed.modelId;
|
|
9152
9512
|
}
|
|
9153
9513
|
await config.switchModel(currentAuthType, modelArg, void 0);
|
|
9154
|
-
|
|
9155
|
-
|
|
9514
|
+
if (persistSelection) {
|
|
9515
|
+
persistSetting(settings, "model.name", modelArg, scopeOverride);
|
|
9516
|
+
persistSetting(settings, "model.baseUrl", "", scopeOverride);
|
|
9517
|
+
}
|
|
9156
9518
|
return modelArg;
|
|
9157
9519
|
}
|
|
9158
9520
|
__name(switchMainModel, "switchMainModel");
|
|
@@ -9266,7 +9628,7 @@ function getAvailableModelIds(context, mode = "main") {
|
|
|
9266
9628
|
const models = mode === "image" ? config.getAllConfiguredModels() : config.getAvailableModels();
|
|
9267
9629
|
const availableModels = models.filter((m) => {
|
|
9268
9630
|
if (mode === "image")
|
|
9269
|
-
return m
|
|
9631
|
+
return isImageGenerationCapable(m) && !m.fastOnly && !m.voiceOnly;
|
|
9270
9632
|
if (mode === "vision") return !m.fastOnly && !m.voiceOnly && !m.imageOnly;
|
|
9271
9633
|
if (mode === "fast") return !m.voiceOnly && !m.imageOnly && !m.visionOnly;
|
|
9272
9634
|
if (mode === "voice") return !m.fastOnly && !m.imageOnly && !m.visionOnly;
|
|
@@ -9376,6 +9738,14 @@ var modelCommand = {
|
|
|
9376
9738
|
)
|
|
9377
9739
|
};
|
|
9378
9740
|
}
|
|
9741
|
+
const auxiliarySelection = /(?:^|\s)--(?:fast|voice|vision|compaction|image)(?:\s|$)/.test(rawArgs);
|
|
9742
|
+
if (hasProject && context.executionPolicy?.allowWorkspaceSettingsWrite === false || context.executionPolicy?.persistModelSelection === false && (hasProject || hasGlobal || auxiliarySelection)) {
|
|
9743
|
+
return {
|
|
9744
|
+
type: "message",
|
|
9745
|
+
messageType: "error",
|
|
9746
|
+
content: t("This model selection is not available in this session.")
|
|
9747
|
+
};
|
|
9748
|
+
}
|
|
9379
9749
|
if (scopeOverride === "Workspace" /* Workspace */ && settings && !settings.isTrusted) {
|
|
9380
9750
|
return {
|
|
9381
9751
|
type: "message",
|
|
@@ -9737,7 +10107,7 @@ ${formatNonVisionModelWarning(modelName2)}`;
|
|
|
9737
10107
|
};
|
|
9738
10108
|
}
|
|
9739
10109
|
const availableModels = (selector.authType ? config.getAvailableModelsForAuthType(selector.authType) : config.getAllConfiguredModels()).filter(
|
|
9740
|
-
(model) => model
|
|
10110
|
+
(model) => isImageGenerationCapable(model) && !model.fastOnly && !model.voiceOnly
|
|
9741
10111
|
);
|
|
9742
10112
|
const matchingModels = availableModels.filter(
|
|
9743
10113
|
(model) => model.id === selector.modelId
|
|
@@ -9872,8 +10242,12 @@ ${formatNonVisionModelWarning(modelName2)}`;
|
|
|
9872
10242
|
settings,
|
|
9873
10243
|
authType,
|
|
9874
10244
|
modelName,
|
|
9875
|
-
scopeOverride
|
|
10245
|
+
scopeOverride,
|
|
10246
|
+
context.executionPolicy?.persistModelSelection !== false
|
|
9876
10247
|
);
|
|
10248
|
+
if (context.executionMode === "acp") {
|
|
10249
|
+
await recordDaemonSessionModelFromConfig(config);
|
|
10250
|
+
}
|
|
9877
10251
|
return {
|
|
9878
10252
|
type: "message",
|
|
9879
10253
|
messageType: "info",
|
|
@@ -10141,7 +10515,7 @@ init_esbuild_shims();
|
|
|
10141
10515
|
|
|
10142
10516
|
// packages/cli/src/config/extension-runtime-reload.ts
|
|
10143
10517
|
init_esbuild_shims();
|
|
10144
|
-
var
|
|
10518
|
+
var debugLogger12 = createDebugLogger("EXTENSION_RUNTIME_RELOAD");
|
|
10145
10519
|
async function reloadPluginsRuntime(options) {
|
|
10146
10520
|
if (options.config.isSafeMode()) {
|
|
10147
10521
|
throw new Error("Extension reload is disabled in safe mode.");
|
|
@@ -10161,7 +10535,7 @@ async function refreshExtensionContentRuntime(options) {
|
|
|
10161
10535
|
await manager.refreshCache();
|
|
10162
10536
|
} catch (error) {
|
|
10163
10537
|
errors.push(error);
|
|
10164
|
-
|
|
10538
|
+
debugLogger12.warn(
|
|
10165
10539
|
"refreshExtensionContentRuntime: refreshCache failed:",
|
|
10166
10540
|
error
|
|
10167
10541
|
);
|
|
@@ -10174,7 +10548,7 @@ async function refreshExtensionContentRuntime(options) {
|
|
|
10174
10548
|
for (const result of settled) {
|
|
10175
10549
|
if (result.status === "rejected") {
|
|
10176
10550
|
errors.push(result.reason);
|
|
10177
|
-
|
|
10551
|
+
debugLogger12.warn(
|
|
10178
10552
|
"refreshExtensionContentRuntime: a refresh leg failed:",
|
|
10179
10553
|
result.reason
|
|
10180
10554
|
);
|
|
@@ -11983,7 +12357,7 @@ import * as os4 from "node:os";
|
|
|
11983
12357
|
import * as path13 from "node:path";
|
|
11984
12358
|
import { exec } from "node:child_process";
|
|
11985
12359
|
import { promisify } from "node:util";
|
|
11986
|
-
var
|
|
12360
|
+
var debugLogger13 = createDebugLogger("TERMINAL_SETUP");
|
|
11987
12361
|
var execAsync = promisify(exec);
|
|
11988
12362
|
function stripJsonComments2(content) {
|
|
11989
12363
|
return content.replace(/^\s*\/\/.*$/gm, "");
|
|
@@ -12016,7 +12390,7 @@ async function detectTerminal() {
|
|
|
12016
12390
|
if (parentName.includes("trae") || parentName.includes("Trae"))
|
|
12017
12391
|
return "trae";
|
|
12018
12392
|
} catch (error) {
|
|
12019
|
-
|
|
12393
|
+
debugLogger13.debug("Parent process detection failed:", error);
|
|
12020
12394
|
}
|
|
12021
12395
|
}
|
|
12022
12396
|
return null;
|
|
@@ -12028,7 +12402,7 @@ async function backupFile(filePath) {
|
|
|
12028
12402
|
const backupPath = `${filePath}.backup.${timestamp}`;
|
|
12029
12403
|
await fs10.copyFile(filePath, backupPath);
|
|
12030
12404
|
} catch (error) {
|
|
12031
|
-
|
|
12405
|
+
debugLogger13.warn(`Failed to create backup of ${filePath}:`, error);
|
|
12032
12406
|
}
|
|
12033
12407
|
}
|
|
12034
12408
|
__name(backupFile, "backupFile");
|
|
@@ -12360,10 +12734,6 @@ var SUPPORTED_PLATFORMS = [
|
|
|
12360
12734
|
"linux",
|
|
12361
12735
|
"win32"
|
|
12362
12736
|
];
|
|
12363
|
-
function isWsl(env) {
|
|
12364
|
-
return Boolean(env["WSL_DISTRO_NAME"] || env["WSL_INTEROP"]);
|
|
12365
|
-
}
|
|
12366
|
-
__name(isWsl, "isWsl");
|
|
12367
12737
|
function getVoiceUnavailableReason(environment = {
|
|
12368
12738
|
platform: process6.platform,
|
|
12369
12739
|
env: process6.env
|
|
@@ -14355,10 +14725,10 @@ var updateCommand = {
|
|
|
14355
14725
|
{ performStandaloneUpdate },
|
|
14356
14726
|
installationInfo
|
|
14357
14727
|
] = await Promise.all([
|
|
14358
|
-
import("./updateCheck-
|
|
14359
|
-
import("./processUtils-
|
|
14360
|
-
import("./standalone-update-
|
|
14361
|
-
import("./installationInfo-
|
|
14728
|
+
import("./updateCheck-T5O2WGIB.js"),
|
|
14729
|
+
import("./processUtils-PVDKBL35.js"),
|
|
14730
|
+
import("./standalone-update-QN5HFRIC.js"),
|
|
14731
|
+
import("./installationInfo-WM2GXQZ6.js")
|
|
14362
14732
|
]);
|
|
14363
14733
|
const { formatUpdateInstructions, getInstallationInfo: getInstallationInfo2 } = installationInfo;
|
|
14364
14734
|
const settings = context.services.settings;
|
|
@@ -14510,15 +14880,16 @@ var BuiltinCommandLoader = class {
|
|
|
14510
14880
|
agentsCommand,
|
|
14511
14881
|
tasksCommand,
|
|
14512
14882
|
// Gated behind isWorkflowsEnabled — feature flag honors
|
|
14513
|
-
// QWEN_CODE_ENABLE_WORKFLOWS (opt-in) and
|
|
14514
|
-
// (kill switch). When the flag is off the
|
|
14515
|
-
// from typeahead and help, matching the
|
|
14516
|
-
// experimental builtins.
|
|
14883
|
+
// tools.workflowsEnabled, QWEN_CODE_ENABLE_WORKFLOWS (opt-in), and
|
|
14884
|
+
// QWEN_CODE_DISABLE_WORKFLOWS (kill switch). When the flag is off the
|
|
14885
|
+
// command vanishes entirely from typeahead and help, matching the
|
|
14886
|
+
// established convention for experimental builtins.
|
|
14517
14887
|
this.config?.isWorkflowsEnabled() ? workflowsCommand : null,
|
|
14518
14888
|
arenaCommand,
|
|
14519
14889
|
approvalModeCommand,
|
|
14520
14890
|
authCommand,
|
|
14521
14891
|
branchCommand,
|
|
14892
|
+
peersCommand,
|
|
14522
14893
|
btwCommand,
|
|
14523
14894
|
forkCommand,
|
|
14524
14895
|
bugCommand,
|
|
@@ -14591,7 +14962,7 @@ var BuiltinCommandLoader = class {
|
|
|
14591
14962
|
// packages/cli/src/services/BundledSkillLoader.ts
|
|
14592
14963
|
init_esbuild_shims();
|
|
14593
14964
|
import { dirname as dirname2 } from "node:path";
|
|
14594
|
-
var
|
|
14965
|
+
var debugLogger14 = createDebugLogger("BUNDLED_SKILL_LOADER");
|
|
14595
14966
|
var BundledSkillLoader = class {
|
|
14596
14967
|
constructor(config) {
|
|
14597
14968
|
this.config = config;
|
|
@@ -14601,12 +14972,12 @@ var BundledSkillLoader = class {
|
|
|
14601
14972
|
}
|
|
14602
14973
|
async loadCommands(_signal) {
|
|
14603
14974
|
if (this.config?.getBareMode?.()) {
|
|
14604
|
-
|
|
14975
|
+
debugLogger14.debug("Bare mode enabled, skipping bundled skills");
|
|
14605
14976
|
return [];
|
|
14606
14977
|
}
|
|
14607
14978
|
const skillManager = this.config?.getSkillManager();
|
|
14608
14979
|
if (!skillManager) {
|
|
14609
|
-
|
|
14980
|
+
debugLogger14.debug("SkillManager not available, skipping bundled skills");
|
|
14610
14981
|
return [];
|
|
14611
14982
|
}
|
|
14612
14983
|
try {
|
|
@@ -14614,7 +14985,7 @@ var BundledSkillLoader = class {
|
|
|
14614
14985
|
const cronEnabled = this.config?.isCronEnabled() ?? false;
|
|
14615
14986
|
const cronVisible = allSkills.filter((skill) => {
|
|
14616
14987
|
if (!cronEnabled && skill.allowedTools?.some((t2) => t2.startsWith("cron_"))) {
|
|
14617
|
-
|
|
14988
|
+
debugLogger14.debug(
|
|
14618
14989
|
`Hiding skill "${skill.name}" because cron is not enabled`
|
|
14619
14990
|
);
|
|
14620
14991
|
return false;
|
|
@@ -14625,7 +14996,7 @@ var BundledSkillLoader = class {
|
|
|
14625
14996
|
const skills = cronVisible.filter(
|
|
14626
14997
|
(skill) => !disabled.has(skill.name.toLowerCase())
|
|
14627
14998
|
);
|
|
14628
|
-
|
|
14999
|
+
debugLogger14.debug(
|
|
14629
15000
|
`Loaded ${skills.length} bundled skill(s) as slash commands; ${cronVisible.length - skills.length} hidden by skills.disabled`
|
|
14630
15001
|
);
|
|
14631
15002
|
return skills.map((skill) => ({
|
|
@@ -14687,7 +15058,7 @@ ${body}`;
|
|
|
14687
15058
|
}, "action")
|
|
14688
15059
|
}));
|
|
14689
15060
|
} catch (error) {
|
|
14690
|
-
|
|
15061
|
+
debugLogger14.error("Failed to load bundled skills:", error);
|
|
14691
15062
|
return [];
|
|
14692
15063
|
}
|
|
14693
15064
|
}
|
|
@@ -14967,7 +15338,7 @@ var ShellProcessor = class {
|
|
|
14967
15338
|
|
|
14968
15339
|
// packages/cli/src/services/prompt-processors/atFileProcessor.ts
|
|
14969
15340
|
init_esbuild_shims();
|
|
14970
|
-
var
|
|
15341
|
+
var debugLogger15 = createDebugLogger("AT_FILE_PROCESSOR");
|
|
14971
15342
|
var AtFileProcessor = class {
|
|
14972
15343
|
constructor(commandName) {
|
|
14973
15344
|
this.commandName = commandName;
|
|
@@ -15013,7 +15384,7 @@ var AtFileProcessor = class {
|
|
|
15013
15384
|
} catch (error) {
|
|
15014
15385
|
const message2 = error instanceof Error ? error.message : String(error);
|
|
15015
15386
|
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message2}`;
|
|
15016
|
-
|
|
15387
|
+
debugLogger15.error(
|
|
15017
15388
|
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
|
|
15018
15389
|
);
|
|
15019
15390
|
context.ui.addItem(
|
|
@@ -15038,7 +15409,7 @@ var AtFileProcessor = class {
|
|
|
15038
15409
|
};
|
|
15039
15410
|
|
|
15040
15411
|
// packages/cli/src/services/command-factory.ts
|
|
15041
|
-
var
|
|
15412
|
+
var debugLogger16 = createDebugLogger("COMMAND_FACTORY");
|
|
15042
15413
|
function createSlashCommandFromDefinition(filePath, baseDir, definition, extensionName, fileExtension) {
|
|
15043
15414
|
const relativePathWithExt = path16.relative(baseDir, filePath);
|
|
15044
15415
|
const relativePath = relativePathWithExt.substring(
|
|
@@ -15082,7 +15453,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
|
|
|
15082
15453
|
whenToUse: definition.whenToUse,
|
|
15083
15454
|
action: /* @__PURE__ */ __name(async (context, _args) => {
|
|
15084
15455
|
if (!context.invocation) {
|
|
15085
|
-
|
|
15456
|
+
debugLogger16.error(
|
|
15086
15457
|
`[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
|
|
15087
15458
|
);
|
|
15088
15459
|
return {
|
|
@@ -15120,7 +15491,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
|
|
|
15120
15491
|
__name(createSlashCommandFromDefinition, "createSlashCommandFromDefinition");
|
|
15121
15492
|
|
|
15122
15493
|
// packages/cli/src/services/FileCommandLoader.ts
|
|
15123
|
-
var
|
|
15494
|
+
var debugLogger17 = createDebugLogger("FILE_COMMAND_LOADER");
|
|
15124
15495
|
var TomlCommandDefSchema = external_exports.object({
|
|
15125
15496
|
prompt: external_exports.string({
|
|
15126
15497
|
required_error: "The 'prompt' field is required.",
|
|
@@ -15154,7 +15525,7 @@ var FileCommandLoader = class {
|
|
|
15154
15525
|
*/
|
|
15155
15526
|
async loadCommands(signal) {
|
|
15156
15527
|
if (this.config?.getBareMode?.()) {
|
|
15157
|
-
|
|
15528
|
+
debugLogger17.debug("Bare mode enabled, skipping auto-discovered commands");
|
|
15158
15529
|
return [];
|
|
15159
15530
|
}
|
|
15160
15531
|
const allCommands = [];
|
|
@@ -15198,7 +15569,7 @@ var FileCommandLoader = class {
|
|
|
15198
15569
|
const isEnoent = error.code === "ENOENT";
|
|
15199
15570
|
const isAbortError = error instanceof Error && error.name === "AbortError";
|
|
15200
15571
|
if (!isEnoent && !isAbortError) {
|
|
15201
|
-
|
|
15572
|
+
debugLogger17.error(
|
|
15202
15573
|
`[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
|
|
15203
15574
|
error
|
|
15204
15575
|
);
|
|
@@ -15257,7 +15628,7 @@ var FileCommandLoader = class {
|
|
|
15257
15628
|
}
|
|
15258
15629
|
}
|
|
15259
15630
|
} catch (error) {
|
|
15260
|
-
|
|
15631
|
+
debugLogger17.warn(
|
|
15261
15632
|
`Failed to read extension config for ${ext.name}:`,
|
|
15262
15633
|
error
|
|
15263
15634
|
);
|
|
@@ -15283,7 +15654,7 @@ var FileCommandLoader = class {
|
|
|
15283
15654
|
try {
|
|
15284
15655
|
fileContent = await fs13.readFile(filePath, "utf-8");
|
|
15285
15656
|
} catch (error) {
|
|
15286
|
-
|
|
15657
|
+
debugLogger17.error(
|
|
15287
15658
|
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
15288
15659
|
error instanceof Error ? error.message : String(error)
|
|
15289
15660
|
);
|
|
@@ -15293,7 +15664,7 @@ var FileCommandLoader = class {
|
|
|
15293
15664
|
try {
|
|
15294
15665
|
parsed = import_toml.default.parse(fileContent);
|
|
15295
15666
|
} catch (error) {
|
|
15296
|
-
|
|
15667
|
+
debugLogger17.error(
|
|
15297
15668
|
`[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
|
|
15298
15669
|
error instanceof Error ? error.message : String(error)
|
|
15299
15670
|
);
|
|
@@ -15301,7 +15672,7 @@ var FileCommandLoader = class {
|
|
|
15301
15672
|
}
|
|
15302
15673
|
const validationResult = TomlCommandDefSchema.safeParse(parsed);
|
|
15303
15674
|
if (!validationResult.success) {
|
|
15304
|
-
|
|
15675
|
+
debugLogger17.error(
|
|
15305
15676
|
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
15306
15677
|
validationResult.error.flatten()
|
|
15307
15678
|
);
|
|
@@ -15328,7 +15699,7 @@ var FileCommandLoader = class {
|
|
|
15328
15699
|
try {
|
|
15329
15700
|
fileContent = await fs13.readFile(filePath, "utf-8");
|
|
15330
15701
|
} catch (error) {
|
|
15331
|
-
|
|
15702
|
+
debugLogger17.error(
|
|
15332
15703
|
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
15333
15704
|
error instanceof Error ? error.message : String(error)
|
|
15334
15705
|
);
|
|
@@ -15338,7 +15709,7 @@ var FileCommandLoader = class {
|
|
|
15338
15709
|
try {
|
|
15339
15710
|
parsed = parseMarkdownCommand(fileContent);
|
|
15340
15711
|
} catch (error) {
|
|
15341
|
-
|
|
15712
|
+
debugLogger17.error(
|
|
15342
15713
|
`[FileCommandLoader] Failed to parse Markdown file ${filePath}:`,
|
|
15343
15714
|
error instanceof Error ? error.message : String(error)
|
|
15344
15715
|
);
|
|
@@ -15346,7 +15717,7 @@ var FileCommandLoader = class {
|
|
|
15346
15717
|
}
|
|
15347
15718
|
const validationResult = MarkdownCommandDefSchema.safeParse(parsed);
|
|
15348
15719
|
if (!validationResult.success) {
|
|
15349
|
-
|
|
15720
|
+
debugLogger17.error(
|
|
15350
15721
|
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
15351
15722
|
validationResult.error.flatten()
|
|
15352
15723
|
);
|
|
@@ -15372,7 +15743,7 @@ var FileCommandLoader = class {
|
|
|
15372
15743
|
|
|
15373
15744
|
// packages/cli/src/services/saved-workflow-loader.ts
|
|
15374
15745
|
init_esbuild_shims();
|
|
15375
|
-
var
|
|
15746
|
+
var debugLogger18 = createDebugLogger("SavedWorkflowLoader");
|
|
15376
15747
|
var SavedWorkflowLoader = class {
|
|
15377
15748
|
constructor(config) {
|
|
15378
15749
|
this.config = config;
|
|
@@ -15391,7 +15762,7 @@ var SavedWorkflowLoader = class {
|
|
|
15391
15762
|
try {
|
|
15392
15763
|
entries = await listSavedWorkflows(this.config);
|
|
15393
15764
|
} catch (e) {
|
|
15394
|
-
|
|
15765
|
+
debugLogger18.debug(`listSavedWorkflows failed: ${e}`);
|
|
15395
15766
|
return [];
|
|
15396
15767
|
}
|
|
15397
15768
|
if (signal.aborted) return [];
|
|
@@ -15707,7 +16078,7 @@ var McpPromptLoader = class {
|
|
|
15707
16078
|
// packages/cli/src/services/SkillCommandLoader.ts
|
|
15708
16079
|
init_esbuild_shims();
|
|
15709
16080
|
import { dirname as dirname3 } from "node:path";
|
|
15710
|
-
var
|
|
16081
|
+
var debugLogger19 = createDebugLogger("SKILL_COMMAND_LOADER");
|
|
15711
16082
|
async function recordAutoSkillCommandUsage(config, command) {
|
|
15712
16083
|
const detail = command.skillDetail;
|
|
15713
16084
|
if (!config || detail?.level !== "project" || !detail.filePath) {
|
|
@@ -15720,7 +16091,7 @@ async function recordAutoSkillCommandUsage(config, command) {
|
|
|
15720
16091
|
filePath: detail.filePath
|
|
15721
16092
|
});
|
|
15722
16093
|
} catch (error) {
|
|
15723
|
-
|
|
16094
|
+
debugLogger19.warn(
|
|
15724
16095
|
`Failed to record auto-skill command usage: ${error instanceof Error ? error.message : String(error)}`
|
|
15725
16096
|
);
|
|
15726
16097
|
}
|
|
@@ -15735,12 +16106,12 @@ var SkillCommandLoader = class {
|
|
|
15735
16106
|
}
|
|
15736
16107
|
async loadCommands(_signal) {
|
|
15737
16108
|
if (this.config?.getBareMode?.()) {
|
|
15738
|
-
|
|
16109
|
+
debugLogger19.debug("Bare mode enabled, skipping skill commands");
|
|
15739
16110
|
return [];
|
|
15740
16111
|
}
|
|
15741
16112
|
const skillManager = this.config?.getSkillManager();
|
|
15742
16113
|
if (!skillManager) {
|
|
15743
|
-
|
|
16114
|
+
debugLogger19.debug("SkillManager not available, skipping skill commands");
|
|
15744
16115
|
return [];
|
|
15745
16116
|
}
|
|
15746
16117
|
try {
|
|
@@ -15757,13 +16128,13 @@ var SkillCommandLoader = class {
|
|
|
15757
16128
|
const nonUserInvocableCount = visibleSkills.filter(
|
|
15758
16129
|
(skill) => skill.userInvocable === false
|
|
15759
16130
|
).length;
|
|
15760
|
-
|
|
16131
|
+
debugLogger19.debug(
|
|
15761
16132
|
`Loaded ${userSkills.length} user + ${projectSkills.length} project + ${extensionSkills.length} extension skill(s) as slash commands; ${allSkills.length - visibleSkills.length} hidden by skills.disabled; ${nonUserInvocableCount} marked non-user-invocable`
|
|
15762
16133
|
);
|
|
15763
16134
|
return visibleSkills.map((skill) => {
|
|
15764
16135
|
const isExtension = skill.level === "extension";
|
|
15765
16136
|
const modelInvocable = skill.disableModelInvocation ? false : isExtension ? !!(skill.description || skill.whenToUse) : true;
|
|
15766
|
-
const sourceLabel = isExtension ? `${t("Extension:")} ${skill.extensionName ?? "unknown"}` : skill.level === "project" ? t("Project") : t("User");
|
|
16137
|
+
const sourceLabel = isExtension ? `${t("Extension:")} ${skill.extensionDisplayName ?? skill.extensionName ?? "unknown"}` : skill.level === "project" ? t("Project") : t("User");
|
|
15767
16138
|
return {
|
|
15768
16139
|
name: skill.name,
|
|
15769
16140
|
description: skill.description,
|
|
@@ -15814,7 +16185,7 @@ var SkillCommandLoader = class {
|
|
|
15814
16185
|
};
|
|
15815
16186
|
});
|
|
15816
16187
|
} catch (error) {
|
|
15817
|
-
|
|
16188
|
+
debugLogger19.error("Failed to load skill commands:", error);
|
|
15818
16189
|
return [];
|
|
15819
16190
|
}
|
|
15820
16191
|
}
|
|
@@ -15845,8 +16216,8 @@ function createNonInteractiveUI() {
|
|
|
15845
16216
|
btwAbortControllerRef: { current: null },
|
|
15846
16217
|
isIdleRef: { current: true },
|
|
15847
16218
|
toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
|
|
15848
|
-
|
|
15849
|
-
}, "
|
|
16219
|
+
setMemoryFileCount: /* @__PURE__ */ __name((_count) => {
|
|
16220
|
+
}, "setMemoryFileCount"),
|
|
15850
16221
|
reloadCommands: /* @__PURE__ */ __name(() => {
|
|
15851
16222
|
}, "reloadCommands"),
|
|
15852
16223
|
setSessionName: /* @__PURE__ */ __name(() => {
|
|
@@ -15889,11 +16260,17 @@ function formatUserPromptExpansionBlockedMessage(reason) {
|
|
|
15889
16260
|
__name(formatUserPromptExpansionBlockedMessage, "formatUserPromptExpansionBlockedMessage");
|
|
15890
16261
|
|
|
15891
16262
|
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
15892
|
-
var
|
|
16263
|
+
var debugLogger20 = createDebugLogger("NON_INTERACTIVE_COMMANDS");
|
|
15893
16264
|
function getSkillCommandName(command) {
|
|
15894
16265
|
return command.skillDetail?.name ?? command.name;
|
|
15895
16266
|
}
|
|
15896
16267
|
__name(getSkillCommandName, "getSkillCommandName");
|
|
16268
|
+
function isCommandAllowedByPolicy(command, policy) {
|
|
16269
|
+
if (!policy || command.kind !== "built-in" /* BUILT_IN */) return true;
|
|
16270
|
+
if (command.name === "clear" && !policy.allowSessionReset) return false;
|
|
16271
|
+
return !policy.blockedBuiltinCommandNames.includes(command.name);
|
|
16272
|
+
}
|
|
16273
|
+
__name(isCommandAllowedByPolicy, "isCommandAllowedByPolicy");
|
|
15897
16274
|
function handleCommandResult(result, outputHistoryItems) {
|
|
15898
16275
|
switch (result.type) {
|
|
15899
16276
|
case "submit_prompt":
|
|
@@ -16013,12 +16390,12 @@ async function fireUserPromptExpansionHook(config, commandName, commandArgs, con
|
|
|
16013
16390
|
};
|
|
16014
16391
|
}
|
|
16015
16392
|
__name(fireUserPromptExpansionHook, "fireUserPromptExpansionHook");
|
|
16016
|
-
async function registerModelInvocableCommands(commandService, config, executionMode, settings) {
|
|
16393
|
+
async function registerModelInvocableCommands(commandService, config, executionMode, settings, executionPolicy) {
|
|
16017
16394
|
if (!settings) {
|
|
16018
16395
|
return;
|
|
16019
16396
|
}
|
|
16020
16397
|
config.setModelInvocableCommandsProvider(
|
|
16021
|
-
() => commandService.getModelInvocableCommands().map((cmd) => ({
|
|
16398
|
+
() => commandService.getModelInvocableCommands().filter((cmd) => isCommandAllowedByPolicy(cmd, executionPolicy)).map((cmd) => ({
|
|
16022
16399
|
name: cmd.name,
|
|
16023
16400
|
description: cmd.modelDescription ?? cmd.description
|
|
16024
16401
|
}))
|
|
@@ -16026,7 +16403,9 @@ async function registerModelInvocableCommands(commandService, config, executionM
|
|
|
16026
16403
|
config.setModelInvocableCommandsExecutor(
|
|
16027
16404
|
async (name, args = "") => {
|
|
16028
16405
|
const commands = commandService.getModelInvocableCommands();
|
|
16029
|
-
const cmd = commands.find(
|
|
16406
|
+
const cmd = commands.find(
|
|
16407
|
+
(candidate) => candidate.name === name && isCommandAllowedByPolicy(candidate, executionPolicy)
|
|
16408
|
+
);
|
|
16030
16409
|
if (!cmd?.action) return null;
|
|
16031
16410
|
const minimalContext = {
|
|
16032
16411
|
executionMode,
|
|
@@ -16035,7 +16414,8 @@ async function registerModelInvocableCommands(commandService, config, executionM
|
|
|
16035
16414
|
name,
|
|
16036
16415
|
args
|
|
16037
16416
|
},
|
|
16038
|
-
services: { config, settings, logger: null }
|
|
16417
|
+
services: { config, settings, logger: null },
|
|
16418
|
+
...executionPolicy ? { executionPolicy } : {}
|
|
16039
16419
|
};
|
|
16040
16420
|
const result = await cmd.action(minimalContext, args);
|
|
16041
16421
|
if (!result || result.type !== "submit_prompt") return null;
|
|
@@ -16064,7 +16444,7 @@ async function registerModelInvocableCommands(commandService, config, executionM
|
|
|
16064
16444
|
await skillManager?.notifyConfigChanged();
|
|
16065
16445
|
}
|
|
16066
16446
|
__name(registerModelInvocableCommands, "registerModelInvocableCommands");
|
|
16067
|
-
var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings, sessionHooks) => {
|
|
16447
|
+
var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings, sessionHooks, executionPolicy) => {
|
|
16068
16448
|
const trimmed = rawQuery.trim();
|
|
16069
16449
|
if (!trimmed.startsWith("/")) {
|
|
16070
16450
|
return { type: "no_command" };
|
|
@@ -16100,10 +16480,13 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16100
16480
|
commandService,
|
|
16101
16481
|
config,
|
|
16102
16482
|
executionMode,
|
|
16103
|
-
settings
|
|
16483
|
+
settings,
|
|
16484
|
+
executionPolicy
|
|
16104
16485
|
);
|
|
16105
16486
|
const allCommands = allCommandService.getCommands();
|
|
16106
|
-
const filteredCommands = commandService.getCommandsForMode(executionMode).filter(
|
|
16487
|
+
const filteredCommands = commandService.getCommandsForMode(executionMode).filter(
|
|
16488
|
+
(cmd) => !isDisabled(cmd) && isCommandAllowedByPolicy(cmd, executionPolicy)
|
|
16489
|
+
);
|
|
16107
16490
|
const { commandToExecute, args } = parseSlashCommand(
|
|
16108
16491
|
rawQuery,
|
|
16109
16492
|
filteredCommands
|
|
@@ -16119,6 +16502,7 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16119
16502
|
if (!skill.action) continue;
|
|
16120
16503
|
const skillContext = {
|
|
16121
16504
|
executionMode,
|
|
16505
|
+
...executionPolicy ? { executionPolicy } : {},
|
|
16122
16506
|
invocation: {
|
|
16123
16507
|
raw: `/${skill.name}`,
|
|
16124
16508
|
name: skill.name,
|
|
@@ -16192,6 +16576,15 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16192
16576
|
originalType: "filtered_command"
|
|
16193
16577
|
};
|
|
16194
16578
|
}
|
|
16579
|
+
if (!isCommandAllowedByPolicy(knownCommand, executionPolicy)) {
|
|
16580
|
+
return {
|
|
16581
|
+
type: "unsupported",
|
|
16582
|
+
reason: t('The command "/{{command}}" is not available here.', {
|
|
16583
|
+
command: typedToken
|
|
16584
|
+
}),
|
|
16585
|
+
originalType: "unsupported_action"
|
|
16586
|
+
};
|
|
16587
|
+
}
|
|
16195
16588
|
return {
|
|
16196
16589
|
type: "unsupported",
|
|
16197
16590
|
reason: t('The command "/{{command}}" is not supported in this mode.', {
|
|
@@ -16225,6 +16618,7 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16225
16618
|
};
|
|
16226
16619
|
const context = {
|
|
16227
16620
|
executionMode,
|
|
16621
|
+
...executionPolicy ? { executionPolicy } : {},
|
|
16228
16622
|
abortSignal: commandToExecute.name === "advisor" ? abortController.signal : void 0,
|
|
16229
16623
|
services: {
|
|
16230
16624
|
config,
|
|
@@ -16303,7 +16697,7 @@ var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController
|
|
|
16303
16697
|
resolvedCommand
|
|
16304
16698
|
};
|
|
16305
16699
|
}, "handleSlashCommand");
|
|
16306
|
-
var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mode = "acp", settings) => {
|
|
16700
|
+
var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mode = "acp", settings, executionPolicy) => {
|
|
16307
16701
|
try {
|
|
16308
16702
|
const loaders = [
|
|
16309
16703
|
new McpPromptLoader(config),
|
|
@@ -16323,33 +16717,21 @@ var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mo
|
|
|
16323
16717
|
commandService,
|
|
16324
16718
|
config,
|
|
16325
16719
|
mode,
|
|
16326
|
-
settings
|
|
16720
|
+
settings,
|
|
16721
|
+
executionPolicy
|
|
16722
|
+
);
|
|
16723
|
+
return commandService.getCommandsForMode(mode).filter(
|
|
16724
|
+
(command) => isCommandAllowedByPolicy(command, executionPolicy)
|
|
16327
16725
|
);
|
|
16328
|
-
return commandService.getCommandsForMode(mode);
|
|
16329
16726
|
} catch (error) {
|
|
16330
|
-
|
|
16727
|
+
debugLogger20.error("Error loading available commands:", error);
|
|
16331
16728
|
return [];
|
|
16332
16729
|
}
|
|
16333
16730
|
}, "getAvailableCommands");
|
|
16334
16731
|
|
|
16335
|
-
// packages/cli/src/
|
|
16732
|
+
// packages/cli/src/nonInteractive/nonInteractiveHelpers.ts
|
|
16336
16733
|
init_esbuild_shims();
|
|
16337
|
-
var
|
|
16338
|
-
function normalizePartList(parts) {
|
|
16339
|
-
if (!parts) {
|
|
16340
|
-
return [];
|
|
16341
|
-
}
|
|
16342
|
-
if (typeof parts === "string") {
|
|
16343
|
-
return [{ text: parts }];
|
|
16344
|
-
}
|
|
16345
|
-
if (Array.isArray(parts)) {
|
|
16346
|
-
return parts.map(
|
|
16347
|
-
(part) => typeof part === "string" ? { text: part } : part
|
|
16348
|
-
);
|
|
16349
|
-
}
|
|
16350
|
-
return [parts];
|
|
16351
|
-
}
|
|
16352
|
-
__name(normalizePartList, "normalizePartList");
|
|
16734
|
+
var debugLogger21 = createDebugLogger("NON_INTERACTIVE");
|
|
16353
16735
|
function extractPartsFromUserMessage(message2) {
|
|
16354
16736
|
if (!message2) {
|
|
16355
16737
|
return null;
|
|
@@ -16432,7 +16814,7 @@ async function loadSlashCommandNames(config) {
|
|
|
16432
16814
|
);
|
|
16433
16815
|
return commands.map((cmd) => cmd.name).sort();
|
|
16434
16816
|
} catch (error) {
|
|
16435
|
-
|
|
16817
|
+
debugLogger21.error(
|
|
16436
16818
|
"[buildSystemMessage] Failed to load slash commands:",
|
|
16437
16819
|
error
|
|
16438
16820
|
);
|
|
@@ -16457,7 +16839,7 @@ async function buildSystemMessage(config, sessionId, permissionMode) {
|
|
|
16457
16839
|
const subagents = await subagentManager.listSubagents();
|
|
16458
16840
|
agentNames = subagents.map((subagent) => subagent.name);
|
|
16459
16841
|
} catch (error) {
|
|
16460
|
-
|
|
16842
|
+
debugLogger21.error("[buildSystemMessage] Failed to load subagents:", error);
|
|
16461
16843
|
}
|
|
16462
16844
|
const systemMessage = {
|
|
16463
16845
|
type: "system",
|
|
@@ -16652,6 +17034,8 @@ export {
|
|
|
16652
17034
|
createEmptyHookEventInfo,
|
|
16653
17035
|
addConfigToMatcherGroup,
|
|
16654
17036
|
getAllConfigs,
|
|
17037
|
+
recordDaemonSessionModel,
|
|
17038
|
+
restoreSessionModelThenAuthenticate,
|
|
16655
17039
|
isPickerOnlyModelInvocation,
|
|
16656
17040
|
refreshExtensionContentRuntime,
|
|
16657
17041
|
dayKey,
|
|
@@ -16668,7 +17052,6 @@ export {
|
|
|
16668
17052
|
formatUserPromptExpansionBlockedMessage,
|
|
16669
17053
|
handleSlashCommand,
|
|
16670
17054
|
getAvailableCommands,
|
|
16671
|
-
normalizePartList,
|
|
16672
17055
|
extractPartsFromUserMessage,
|
|
16673
17056
|
computeUsageFromMetrics,
|
|
16674
17057
|
buildInitialSystemReminders,
|
|
@@ -16685,22 +17068,22 @@ export {
|
|
|
16685
17068
|
*/
|
|
16686
17069
|
/**
|
|
16687
17070
|
* @license
|
|
16688
|
-
* Copyright 2025 Qwen
|
|
17071
|
+
* Copyright 2025 Qwen Team
|
|
16689
17072
|
* SPDX-License-Identifier: Apache-2.0
|
|
16690
17073
|
*/
|
|
16691
17074
|
/**
|
|
16692
17075
|
* @license
|
|
16693
|
-
* Copyright
|
|
17076
|
+
* Copyright 2025 Qwen Code
|
|
16694
17077
|
* SPDX-License-Identifier: Apache-2.0
|
|
16695
17078
|
*/
|
|
16696
17079
|
/**
|
|
16697
17080
|
* @license
|
|
16698
|
-
* Copyright
|
|
17081
|
+
* Copyright 2026 Qwen Team
|
|
16699
17082
|
* SPDX-License-Identifier: Apache-2.0
|
|
16700
17083
|
*/
|
|
16701
17084
|
/**
|
|
16702
17085
|
* @license
|
|
16703
|
-
* Copyright 2025 Qwen
|
|
17086
|
+
* Copyright 2025 Qwen
|
|
16704
17087
|
* SPDX-License-Identifier: Apache-2.0
|
|
16705
17088
|
*/
|
|
16706
17089
|
/**
|