@qwen-code/qwen-code 0.21.11-preview.0 → 0.21.12-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/bundled/coordinate/SKILL.md +52 -0
  2. package/bundled/qc-helper/docs/configuration/model-providers.md +10 -8
  3. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/arena.md +4 -3
  5. package/bundled/qc-helper/docs/features/commands.md +7 -6
  6. package/bundled/qc-helper/docs/features/dual-output.md +5 -0
  7. package/bundled/qc-helper/docs/features/headless.md +8 -0
  8. package/bundled/qc-helper/docs/features/multi-agent-coordination.md +30 -0
  9. package/bundled/qc-helper/docs/qwen-serve.md +7 -7
  10. package/bundled/review/SKILL.md +17 -7
  11. package/chunks/{MaxSizedBox-FVSXOMKP.js → MaxSizedBox-VSAJNP52.js} +49 -48
  12. package/chunks/{StandaloneSessionPicker-Q27UAQ3X.js → StandaloneSessionPicker-N5MC42M2.js} +73 -70
  13. package/chunks/{acp-startup-profiler-VNTFWYAC.js → acp-startup-profiler-JMJBZDVO.js} +2 -2
  14. package/chunks/{acpAgent-C6TV2BIU.js → acpAgent-GUV7LTDH.js} +1143 -317
  15. package/chunks/{agent-IPODFZTU.js → agent-WJT3BALC.js} +45 -44
  16. package/chunks/agent-headless-JRRUUVP3.js +87 -0
  17. package/chunks/{anthropicContentGenerator-D3Y4RFT4.js → anthropicContentGenerator-4JSC3ZFL.js} +27 -27
  18. package/chunks/{artifact-tool-N652YE4L.js → artifact-tool-FRMBPDPB.js} +5 -5
  19. package/chunks/{askUserQuestion-ONW74PKJ.js → askUserQuestion-7G3LI3IZ.js} +2 -2
  20. package/chunks/{bridge-YX2R6VVM.js → bridge-VB3BPG7G.js} +50 -49
  21. package/chunks/{build-GDBLPA24.js → build-RZS65IIX.js} +1 -1
  22. package/chunks/{ca-ZLKAB4K3.js → ca-4CQ6MYNQ.js} +2 -1
  23. package/chunks/{channel-management-service-PHELKOW2.js → channel-management-service-SKAN6NOB.js} +6 -6
  24. package/chunks/channel-settings-store-UM7JZEW7.js +102 -0
  25. package/chunks/{channel-worker-group-WQP4RCDO.js → channel-worker-group-YPTB5ASD.js} +8 -7
  26. package/chunks/{channel-worker-manager-MRDFAKIM.js → channel-worker-manager-4EHJSPRH.js} +8 -7
  27. package/chunks/{channel-worker-supervisor-IVSDIMI4.js → channel-worker-supervisor-DZKHYFHV.js} +6 -5
  28. package/chunks/{chunk-J6SZID63.js → chunk-2AZMF6G5.js} +2 -2
  29. package/chunks/{chunk-2IIJTXYF.js → chunk-2SB4SLKC.js} +3 -1
  30. package/chunks/{chunk-VKJ4KTPJ.js → chunk-3GCU5O2E.js} +1 -1
  31. package/chunks/{chunk-PDUIXSYP.js → chunk-3SIXC6QC.js} +7 -7
  32. package/chunks/{chunk-Q3JQ7OSU.js → chunk-3XZYK76R.js} +2 -2
  33. package/chunks/{chunk-SVY7G3WS.js → chunk-3ZLUA4GV.js} +9 -9
  34. package/chunks/{chunk-6CONQTS2.js → chunk-45TYWBCB.js} +1 -1
  35. package/chunks/{chunk-OWMAZHIX.js → chunk-47FQVRCO.js} +1 -1
  36. package/chunks/{chunk-VNNWAZSI.js → chunk-4W25XH7F.js} +7 -7
  37. package/chunks/{chunk-VVSMEI6C.js → chunk-5AWARYOK.js} +22 -101
  38. package/chunks/{chunk-I7XTOGIS.js → chunk-5DDUYIY6.js} +7 -7
  39. package/chunks/{chunk-HV76SFIA.js → chunk-5HBFERG5.js} +3 -3
  40. package/chunks/{chunk-IIJEYBNH.js → chunk-5PWLQ7SK.js} +191 -61
  41. package/chunks/{chunk-BSI645OU.js → chunk-5TXOGH4I.js} +3 -3
  42. package/chunks/{chunk-BO2VRKY2.js → chunk-67LXZ6LV.js} +7 -7
  43. package/chunks/{chunk-KHLBIO6M.js → chunk-6LK2QPIA.js} +11 -11
  44. package/chunks/{chunk-WAUGQKUU.js → chunk-6LYDH7VT.js} +9 -5
  45. package/chunks/{chunk-S6HYI3MF.js → chunk-6S52N6PG.js} +2 -2
  46. package/chunks/{chunk-DZUO626D.js → chunk-6XZERB6P.js} +5 -5
  47. package/chunks/{chunk-FVKHVJZQ.js → chunk-732MOPEM.js} +1 -1
  48. package/chunks/{chunk-5C7FDVHB.js → chunk-7L64FSYQ.js} +55 -477
  49. package/chunks/{chunk-V3KCCRKA.js → chunk-7N6WK2W6.js} +3 -3
  50. package/chunks/chunk-7P32M35F.js +51 -0
  51. package/chunks/{chunk-T3FNRMFJ.js → chunk-7PBUQKMT.js} +1 -1
  52. package/chunks/{chunk-WCG5O7IP.js → chunk-7SUQZ7QH.js} +2 -2
  53. package/chunks/{chunk-LU7RJB2W.js → chunk-A7M57KOL.js} +8 -8
  54. package/chunks/{chunk-6WIKTX4C.js → chunk-ABGS4FDQ.js} +1 -1
  55. package/chunks/{chunk-DVQECPGW.js → chunk-AJL3SAZG.js} +12 -12
  56. package/chunks/{chunk-NV3F44FL.js → chunk-AMXMM7DH.js} +2 -2
  57. package/chunks/{chunk-UVX4Y6IN.js → chunk-AQHNAA7E.js} +1 -1
  58. package/chunks/{chunk-TG3IUQ6M.js → chunk-C2VGLLNA.js} +4 -4
  59. package/chunks/{chunk-H6XPXXMH.js → chunk-CQ35AJ4Z.js} +252 -254
  60. package/chunks/{chunk-COBO5EBO.js → chunk-CTQE2NB2.js} +1 -1
  61. package/chunks/{chunk-PWYEWOZM.js → chunk-CX2MARRJ.js} +1 -1
  62. package/chunks/{chunk-E2FPSSKP.js → chunk-DEG7R6Z6.js} +57 -13
  63. package/chunks/{chunk-A6PSUNCY.js → chunk-DEVFUPC5.js} +8 -8
  64. package/chunks/{chunk-RKCPPZV6.js → chunk-DGM2XA3R.js} +1 -1
  65. package/chunks/{chunk-4P66JPNV.js → chunk-DNRV2US3.js} +5 -5
  66. package/chunks/{chunk-TYAMGABM.js → chunk-E3GLDLYB.js} +6 -0
  67. package/chunks/{chunk-L2AFWWJE.js → chunk-E5BWLU5J.js} +50 -5
  68. package/chunks/{chunk-7C7RTJPC.js → chunk-EAJESCBT.js} +7 -9
  69. package/chunks/{chunk-KKBPOU75.js → chunk-EFIMD5VA.js} +1 -1
  70. package/chunks/{chunk-CTJLZLB5.js → chunk-EN2J77G7.js} +1 -1
  71. package/chunks/{chunk-67EWJE77.js → chunk-ENEEQMGM.js} +1 -1
  72. package/chunks/{chunk-CPG6P4GG.js → chunk-EYS3GGM3.js} +1 -1
  73. package/chunks/{chunk-4PYCZH2V.js → chunk-EYW54TBD.js} +3 -3
  74. package/chunks/{chunk-FOGU3LJX.js → chunk-F6AOBFUN.js} +1 -1
  75. package/chunks/{chunk-F32C6V5B.js → chunk-FLUYVAQZ.js} +3 -3
  76. package/chunks/{chunk-7WUUNAJP.js → chunk-FMLUVVQ6.js} +3 -3
  77. package/chunks/{chunk-ZBVS26BY.js → chunk-FPGTNKCP.js} +7 -5
  78. package/chunks/{chunk-HOUK5CR2.js → chunk-FWJRWCKU.js} +6 -6
  79. package/chunks/{chunk-HGBUHVFO.js → chunk-G4C5RLX6.js} +3 -3
  80. package/chunks/{chunk-EI3HZX6C.js → chunk-GJJQV4PY.js} +1 -1
  81. package/chunks/{chunk-CKASRHZI.js → chunk-GLWWPFTW.js} +1 -1
  82. package/chunks/{chunk-2Z6PYTOK.js → chunk-GQW6P73F.js} +1 -1
  83. package/chunks/{chunk-GM463R2B.js → chunk-GZGDJ4E6.js} +1 -1
  84. package/chunks/{chunk-YGT2AUJ7.js → chunk-HB6QW4LM.js} +37 -20
  85. package/chunks/{chunk-W5UC37EE.js → chunk-HHGQGTJQ.js} +2 -0
  86. package/chunks/chunk-HHJLM3WQ.js +41 -0
  87. package/chunks/{chunk-6ZRFAKXK.js → chunk-IEP44U2R.js} +1 -1
  88. package/chunks/{chunk-O3VWAZLP.js → chunk-INQN4KIA.js} +871 -1033
  89. package/chunks/{chunk-AOHJKPKL.js → chunk-IQFYO5BF.js} +1 -1
  90. package/chunks/{chunk-UDXSXLER.js → chunk-IW6RQPQB.js} +14 -4
  91. package/chunks/{chunk-XCWO3SMQ.js → chunk-IX7CFQGA.js} +3 -3
  92. package/chunks/{chunk-6S4NCX23.js → chunk-JO45C3OY.js} +3 -3
  93. package/chunks/{chunk-HDHLWOG5.js → chunk-JRRZFO4A.js} +2 -2
  94. package/chunks/{chunk-OQTXYMKW.js → chunk-JS4Q5NG5.js} +3 -3
  95. package/chunks/{chunk-UMEB4DHF.js → chunk-JWXBLIQL.js} +4 -4
  96. package/chunks/{chunk-PBRVUF5B.js → chunk-K7JW6V5O.js} +1 -1
  97. package/chunks/{chunk-ZZCWJWTF.js → chunk-KNQZXSLW.js} +9 -3
  98. package/chunks/{chunk-M6HMMKVG.js → chunk-KPVVWKF3.js} +1 -1
  99. package/chunks/{chunk-MVUQRLOH.js → chunk-KT4OWAAZ.js} +3 -3
  100. package/chunks/{chunk-W4RQUHY3.js → chunk-L2GTEEEU.js} +142 -23
  101. package/chunks/{chunk-X7XXP7CN.js → chunk-L2O7DJIE.js} +2 -2
  102. package/chunks/{chunk-BCZ2TTSH.js → chunk-LCWRQA5U.js} +1 -1
  103. package/chunks/{chunk-22C7BQ6D.js → chunk-LHOG4E6Y.js} +3 -3
  104. package/chunks/{chunk-3WOZVMGJ.js → chunk-LOJO2RPW.js} +7 -7
  105. package/chunks/{chunk-DX3RGJMS.js → chunk-LT532KF4.js} +71 -12
  106. package/chunks/{chunk-JT7XS4YW.js → chunk-M2NMFAFR.js} +1 -1
  107. package/chunks/{chunk-P6RBCBBE.js → chunk-M2S67TPJ.js} +3 -3
  108. package/chunks/{chunk-AJ6LQ5A6.js → chunk-M3QYOPGN.js} +1 -1
  109. package/chunks/{chunk-AZQ3DT76.js → chunk-M4NWDIFU.js} +1 -1
  110. package/chunks/{chunk-YTFDX4PR.js → chunk-M6NDLY2T.js} +1 -1
  111. package/chunks/{chunk-X76PVMPQ.js → chunk-MJ5FMYVQ.js} +3 -3
  112. package/chunks/{chunk-EKPKKXY2.js → chunk-MLZCPGDX.js} +1 -1
  113. package/chunks/{chunk-CQGGDOR5.js → chunk-MM4XBXF7.js} +1 -1
  114. package/chunks/{chunk-UHJ5S7DF.js → chunk-MMH3GO4Z.js} +11 -11
  115. package/chunks/{chunk-OIVKILPI.js → chunk-MPBRV3UU.js} +3 -0
  116. package/chunks/{chunk-VFMASYQA.js → chunk-MS7GNABG.js} +3 -0
  117. package/chunks/{chunk-2FRY5CRX.js → chunk-MWZYNOCG.js} +3 -3
  118. package/chunks/chunk-N2TNM3QB.js +9 -0
  119. package/chunks/{chunk-7MH4J33A.js → chunk-N7NBMAMW.js} +2 -2
  120. package/chunks/{chunk-EUNWC2VS.js → chunk-NC4O6UE6.js} +2 -2
  121. package/chunks/{chunk-HUWENAHO.js → chunk-NWPO6I7V.js} +1 -1
  122. package/chunks/{chunk-SR7RZ4MS.js → chunk-O4BBDP2G.js} +2 -2
  123. package/chunks/{chunk-4TRQPFDP.js → chunk-O5AZPHYZ.js} +6 -8
  124. package/chunks/{chunk-XGLVQQ6F.js → chunk-OH5UKBLL.js} +4 -4
  125. package/chunks/{chunk-PIA35YOG.js → chunk-OLU7GIF4.js} +14 -45
  126. package/chunks/{chunk-DA4HRSBW.js → chunk-OPBATTFQ.js} +1 -1
  127. package/chunks/{chunk-7S4DYMFG.js → chunk-OSPIZEAM.js} +34 -23
  128. package/chunks/{chunk-K4QON4BH.js → chunk-OYLNJPY3.js} +61 -364
  129. package/chunks/{chunk-DREZZAZM.js → chunk-P2UCMHDT.js} +14 -6
  130. package/chunks/chunk-PDKLO2DN.js +526 -0
  131. package/chunks/{chunk-TZ3FN4B2.js → chunk-PRWGIKKU.js} +5 -5
  132. package/chunks/{chunk-FYTHSJDQ.js → chunk-Q6FGSG6B.js} +2 -2
  133. package/chunks/{chunk-VBU76UYP.js → chunk-QIN5P5BP.js} +315 -1081
  134. package/chunks/{chunk-2UUMVNYT.js → chunk-QTI7SRXI.js} +3 -3
  135. package/chunks/{chunk-B2GJNDTV.js → chunk-QUESTNOP.js} +1 -1
  136. package/chunks/{chunk-6Q5ABMTU.js → chunk-QZ5G26ZE.js} +36 -32
  137. package/chunks/{chunk-7OFX3YZW.js → chunk-RE6JD2BH.js} +1 -1
  138. package/chunks/{chunk-QUI267ZP.js → chunk-SAQHDAUJ.js} +42 -8
  139. package/chunks/{chunk-UXV3DYVT.js → chunk-SZ36WFVK.js} +1 -1
  140. package/chunks/{chunk-FTO3P6PZ.js → chunk-T2VEHZH3.js} +3 -3
  141. package/chunks/{chunk-TZEZYNYD.js → chunk-T4FTABSW.js} +1 -1
  142. package/chunks/chunk-T5ZFG4CI.js +830 -0
  143. package/chunks/{chunk-SEZ556DZ.js → chunk-T6W4KACQ.js} +1 -1
  144. package/chunks/{chunk-3P2LV43B.js → chunk-TBVNYG5B.js} +5 -5
  145. package/chunks/{chunk-EV3LZGGK.js → chunk-TKAEODJR.js} +572 -42
  146. package/chunks/{chunk-TCRQD7F6.js → chunk-U6LT3QBF.js} +1 -1
  147. package/chunks/{chunk-EQL65XGA.js → chunk-V3LXMASR.js} +47 -21
  148. package/chunks/{chunk-MTE6R5HF.js → chunk-VESDV72K.js} +3 -3
  149. package/chunks/{chunk-SKSOLRPK.js → chunk-VO52SIZW.js} +3 -3
  150. package/chunks/{chunk-ZUIOLZ4V.js → chunk-VUFEW3SF.js} +8471 -2375
  151. package/chunks/{chunk-E2XBEWAK.js → chunk-VUTOKX6F.js} +650 -129
  152. package/chunks/{chunk-5BRSWOSC.js → chunk-WFBG4MF5.js} +4 -4
  153. package/chunks/chunk-WLML6VIA.js +18 -0
  154. package/chunks/{chunk-ONSZH6VM.js → chunk-WQOE4IYF.js} +3 -3
  155. package/chunks/{chunk-PFWPBYL2.js → chunk-XAAL4IFG.js} +3 -3
  156. package/chunks/{chunk-UO2N5QWP.js → chunk-XDN6SMAQ.js} +27 -4
  157. package/chunks/{chunk-GNPNYXJB.js → chunk-XLQS3VI6.js} +2 -2
  158. package/chunks/{chunk-PYQADEFD.js → chunk-XTH2OMDS.js} +1 -1
  159. package/chunks/chunk-XYVBANG5.js +336 -0
  160. package/chunks/{chunk-Y3NNBNGM.js → chunk-YQB3HSQ7.js} +6 -6
  161. package/chunks/{chunk-WOJZWRAZ.js → chunk-YRLW2MSX.js} +1 -1
  162. package/chunks/{chunk-LHEC5V6G.js → chunk-YTYPRVIZ.js} +2 -2
  163. package/chunks/chunk-Z7B6SRPM.js +32 -0
  164. package/chunks/chunk-ZBBVBZBR.js +137 -0
  165. package/chunks/{chunk-MFDYOYZZ.js → chunk-ZGWY4YUB.js} +27 -4
  166. package/chunks/{chunk-B7SQOICP.js → chunk-ZIS5I56G.js} +4 -4
  167. package/chunks/{chunk-IA7TGCN2.js → chunk-ZV4XVYL3.js} +4 -4
  168. package/chunks/{chunk-PJRW65JO.js → chunk-ZWPWQEF5.js} +1 -1
  169. package/chunks/{chunk-DCGYLIYO.js → chunk-ZXUMPZRT.js} +5 -5
  170. package/chunks/chunk-bdqvmfwv-OHYAFAAO.js +17446 -0
  171. package/chunks/{computer-use-5LGM2YO5.js → computer-use-YOYLKIHT.js} +48 -47
  172. package/chunks/{config-utils-ULCSRMWD.js → config-utils-TXVKR27S.js} +6 -6
  173. package/chunks/{contextCommand-JT44ADUD.js → contextCommand-KZMV5EOI.js} +47 -46
  174. package/chunks/{core-runtime-XHEJM2VB.js → core-runtime-VFUL2R7U.js} +45 -44
  175. package/chunks/{create-sub-session-UQBDJF5G.js → create-sub-session-EZW2NP4Z.js} +45 -44
  176. package/chunks/{create-sub-session-QIDZUOPU.js → create-sub-session-Y4WYDZGC.js} +2 -2
  177. package/chunks/{cron-create-VONA5JYY.js → cron-create-ZOVA3CC2.js} +4 -4
  178. package/chunks/{cron-delete-5JXSP2MI.js → cron-delete-7Z3H4LJY.js} +4 -4
  179. package/chunks/{cron-list-KE4F2CIR.js → cron-list-UHGX3IQG.js} +4 -4
  180. package/chunks/{daemon-GWD7BT6E.js → daemon-PXIC4ZDK.js} +186 -7
  181. package/chunks/daemon-status-provider-6L3ZKVVR.js +103 -0
  182. package/chunks/daemon-trust-policy-SZ3V4JEY.js +99 -0
  183. package/chunks/{daemon-trust-policy-monitor-LUMB46CL.js → daemon-trust-policy-monitor-HN34EJQ5.js} +52 -51
  184. package/chunks/{de-LIW4XVLN.js → de-UBEBKG6V.js} +2 -1
  185. package/chunks/{deferred-core-runtime-BFB6YRTZ.js → deferred-core-runtime-Z462KPKI.js} +47 -46
  186. package/chunks/{devtools-4QFYJT6U.js → devtools-X6ROTKHE.js} +1 -1
  187. package/chunks/dispatch-B53LNEO4.js +37 -0
  188. package/chunks/{display-image-NQRSIBXM.js → display-image-ZE3GZNIK.js} +4 -4
  189. package/chunks/{dist-Z3CS4OVP.js → dist-AVUYBK7L.js} +11 -5
  190. package/chunks/{dist-6BMOAE3Z.js → dist-BNWP6IZL.js} +4 -4
  191. package/chunks/{dist-EZE3V3Q7.js → dist-BW2LDPV3.js} +4 -4
  192. package/chunks/{dist-3NTTUAHT.js → dist-EFJILGIS.js} +3 -3
  193. package/chunks/{dist-OTUO3AS2.js → dist-KTYDJNYM.js} +14 -6
  194. package/chunks/{dist-B2CGTW6T.js → dist-NPS52B2V.js} +3 -3
  195. package/chunks/{dist-J47AXBZC.js → dist-PKSRQAR2.js} +3 -3
  196. package/chunks/{dist-EWW3J4HQ.js → dist-ZWDH5HLS.js} +3 -3
  197. package/chunks/{earlyInputCapture-GPULMO2H.js → earlyInputCapture-GSE6MMC7.js} +46 -45
  198. package/chunks/{edit-XYMQNMWU.js → edit-YJX2HMSA.js} +51 -50
  199. package/chunks/{en-SY5GTIGX.js → en-X6YV7GME.js} +2 -1
  200. package/chunks/{enter-worktree-TIASENJP.js → enter-worktree-H3GV4KQ7.js} +50 -49
  201. package/chunks/{enterPlanMode-K6LTIGWM.js → enterPlanMode-6LPSFIN2.js} +51 -50
  202. package/chunks/{environment-3XX7LUMG.js → environment-IVCQ3H7T.js} +48 -47
  203. package/chunks/{errors-VTFZ6M4W.js → errors-2K5VJQVK.js} +47 -46
  204. package/chunks/{exit-worktree-IBKPEHUJ.js → exit-worktree-QZC6DXGO.js} +50 -49
  205. package/chunks/exitPlanMode-UHGM7I4A.js +85 -0
  206. package/chunks/{fast-path-QOBSDLA6.js → fast-path-BDDOO4H6.js} +3 -3
  207. package/chunks/{fast-path-settings-RPAVBD7P.js → fast-path-settings-LNOFM2YP.js} +2 -2
  208. package/chunks/{fr-RQFO7U4P.js → fr-VENTC2BS.js} +2 -1
  209. package/chunks/{gemini-OCRXJUWF.js → gemini-VDUDROF7.js} +105 -104
  210. package/chunks/{geminiContentGenerator-VHSPCS6F.js → geminiContentGenerator-O4HYJOR7.js} +11 -11
  211. package/chunks/{glob-BVX4L3CM.js → glob-Z7VZDN7C.js} +52 -51
  212. package/chunks/{goal-tools-SWNB6GP4.js → goal-tools-JDK2SNMV.js} +4 -4
  213. package/chunks/{grep-CJSUX5NJ.js → grep-JQ6AGN62.js} +51 -50
  214. package/chunks/handleAutoUpdate-XZCLKEMR.js +94 -0
  215. package/chunks/{i18n-BPEDXABF.js → i18n-G2BMPGAS.js} +46 -45
  216. package/chunks/{image-gen-DEEXNNA2.js → image-gen-NMKTIERQ.js} +11 -11
  217. package/chunks/initializer-JEYFVIIG.js +100 -0
  218. package/chunks/{installationInfo-JCUKPGDB.js → installationInfo-GY2OCLIS.js} +46 -45
  219. package/chunks/{ja-KOZKHJHZ.js → ja-QHT4EQTO.js} +2 -1
  220. package/chunks/{keychain-token-storage-TVAMTNP7.js → keychain-token-storage-JTWUYFU7.js} +2 -2
  221. package/chunks/list-ZJ4GEKM4.js +103 -0
  222. package/chunks/{list-agents-Z4WABFDZ.js → list-agents-4GQ2XNEU.js} +2 -2
  223. package/chunks/loadedSettingsAdapter-5BO2PZLD.js +97 -0
  224. package/chunks/{loggingContentGenerator-MOOIBKKR.js → loggingContentGenerator-ER2Z5L3L.js} +59 -40
  225. package/chunks/{loop-wakeup-UZ5RL5Y2.js → loop-wakeup-HOQI3K5D.js} +5 -5
  226. package/chunks/{ls-TVHDGIES.js → ls-FSHISLLA.js} +6 -6
  227. package/chunks/{lsp-CVN6OQPI.js → lsp-APQJ5ZEZ.js} +2 -2
  228. package/chunks/{managed-npm-update-7K2LDL7V.js → managed-npm-update-X66EZDQD.js} +46 -45
  229. package/chunks/mcp-BDWPEXJF.js +97 -0
  230. package/chunks/{monitor-EXI73A5P.js → monitor-7J3DCMBL.js} +50 -49
  231. package/chunks/{node-UUDY34IG.js → node-YSOU44FX.js} +3 -3
  232. package/chunks/nonInteractiveCli-THJJIXKG.js +166 -0
  233. package/chunks/{notebook-edit-GKKQJQQU.js → notebook-edit-IX7GCTIL.js} +51 -50
  234. package/chunks/{openaiContentGenerator-NSPCP4FY.js → openaiContentGenerator-K65IDMQ6.js} +35 -35
  235. package/chunks/opentui-entry-L76XJNPE.js +47945 -0
  236. package/chunks/{pidfile-IU4ETBRE.js → pidfile-NNWTPHX2.js} +46 -45
  237. package/chunks/{processUtils-GZOVMFK4.js → processUtils-ILOXESNR.js} +2 -2
  238. package/chunks/{pt-U6AOCTMF.js → pt-VL3I5RNY.js} +2 -1
  239. package/chunks/{qwenContentGenerator-BBTNTOMB.js → qwenContentGenerator-YIKX3NHW.js} +54 -54
  240. package/chunks/{qwenOAuth2-D6L2W25Z.js → qwenOAuth2-BLYU65Y4.js} +10 -10
  241. package/chunks/read-file-GLBZFPNV.js +32 -0
  242. package/chunks/{read-mcp-resource-PZ4ZF6YL.js → read-mcp-resource-TJSJRH4F.js} +2 -2
  243. package/chunks/{record-artifact-P4HFMS7X.js → record-artifact-FXF5LHPE.js} +3 -3
  244. package/chunks/{resumeHistoryUtils-VUY4B6BO.js → resumeHistoryUtils-UMC4Y3E2.js} +54 -52
  245. package/chunks/ripGrep-53XOGSZ4.js +85 -0
  246. package/chunks/{ru-CMX4UMYP.js → ru-4RCKL4PY.js} +2 -1
  247. package/chunks/{run-qwen-serve-7BDTKCFP.js → run-qwen-serve-BTZ46CLW.js} +67 -60
  248. package/chunks/{runtime-VMWGIAX7.js → runtime-RQ3ACQKH.js} +58 -57
  249. package/chunks/runtime-gate-T4ICWGQJ.js +89 -0
  250. package/chunks/{scheduler-MUKPARY5.js → scheduler-WEIFVKQH.js} +47 -46
  251. package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-4QKV6MCX.js} +2 -2
  252. package/chunks/{sdk-exporters-http-XVTZQRCE.js → sdk-exporters-http-2VPMAPFI.js} +13 -13
  253. package/chunks/{sdk-impl-7W7AKCS4.js → sdk-impl-5W3JUCWF.js} +12 -12
  254. package/chunks/{send-message-CAMSLG2L.js → send-message-RBYLV5NY.js} +6 -6
  255. package/chunks/{serve-7G5R52HX.js → serve-RJUR5OJH.js} +52 -51
  256. package/chunks/{server-FTSWAHXF.js → server-WQ2ID4U7.js} +961 -322
  257. package/chunks/{session-FLUDUMZJ.js → session-O4OXRVNI.js} +124 -101
  258. package/chunks/{settings-CJVTBEW7.js → settings-4BVJ36YG.js} +51 -50
  259. package/chunks/{shell-2DOQIYEE.js → shell-DCQZWM5T.js} +45 -44
  260. package/chunks/{skill-2GOEKN34.js → skill-4KWZ4J7U.js} +24 -24
  261. package/chunks/{skill-settings-5FEOMZQS.js → skill-settings-TEMNXCLU.js} +51 -50
  262. package/chunks/{spawnChannel-VJRIO75F.js → spawnChannel-ROYEZK57.js} +48 -46
  263. package/chunks/{standalone-update-OC5IKJGY.js → standalone-update-G4BETY4B.js} +47 -46
  264. package/chunks/{startInteractiveUI-HFHFI2ZR.js → startInteractiveUI-PDFQ7N7A.js} +2665 -2827
  265. package/chunks/{syntheticOutput-PEBJQYJV.js → syntheticOutput-D3Z64LJC.js} +3 -3
  266. package/chunks/{task-create-5NWCQSJF.js → task-create-URFZ5EUX.js} +11 -11
  267. package/chunks/{task-list-53265TRZ.js → task-list-6JDFMPUW.js} +5 -5
  268. package/chunks/{task-stop-FPCOIRYX.js → task-stop-HHUGCD25.js} +2 -2
  269. package/chunks/{task-update-5HN577LS.js → task-update-DVV6CUGI.js} +12 -12
  270. package/chunks/{team-create-ZWAXZR75.js → team-create-KW4LOVHD.js} +52 -51
  271. package/chunks/{team-delete-MMQB4OSC.js → team-delete-PZGGBQLM.js} +5 -5
  272. package/chunks/{team-plan-approval-LH23GCUV.js → team-plan-approval-XHFK2RTF.js} +51 -50
  273. package/chunks/{terminal-image-renderer-7L3GCHD5.js → terminal-image-renderer-46R2LHGR.js} +47 -46
  274. package/chunks/theme-manager-E56XY2JG.js +89 -0
  275. package/chunks/{todoWrite-JGV6VLOX.js → todoWrite-WINAZSZI.js} +4 -4
  276. package/chunks/{tool-search-BZOZHGKI.js → tool-search-EVVFQUMJ.js} +21 -21
  277. package/chunks/{total-session-admission-KP4CJTSB.js → total-session-admission-CULMHRTA.js} +50 -49
  278. package/chunks/{trustedFolders-57QEHV67.js → trustedFolders-BKLVSCXW.js} +46 -45
  279. package/chunks/{update-relaunch-53MODFE4.js → update-relaunch-46H4Q4VL.js} +5 -5
  280. package/chunks/{updateCheck-4QDI7CUZ.js → updateCheck-3BQA7KNI.js} +49 -48
  281. package/chunks/{useAutoAcceptIndicator-VVQUPTM5.js → useAutoAcceptIndicator-3QJ7QV5R.js} +57 -56
  282. package/chunks/{validateNonInterActiveAuth-KKVD5E43.js → validateNonInterActiveAuth-QVFJVBSY.js} +90 -87
  283. package/chunks/{version-IB5ASN63.js → version-6JJA54HH.js} +1 -1
  284. package/chunks/{web-fetch-APSFQMIH.js → web-fetch-75JBSDA3.js} +24 -24
  285. package/chunks/{web-search-EWEHMFIW.js → web-search-PKBISWS3.js} +17 -17
  286. package/chunks/{workflow-LA4ACRO4.js → workflow-KEZDQISR.js} +58 -57
  287. package/chunks/workspace-providers-status-YQW4VNIV.js +100 -0
  288. package/chunks/{workspace-registration-store-WSLHN7HA.js → workspace-registration-store-GQ42PR72.js} +1 -1
  289. package/chunks/{workspace-registry-5HXRV7L4.js → workspace-registry-ZR6DVZQ6.js} +50 -49
  290. package/chunks/{workspace-service-SSP4PLBC.js → workspace-service-BCMK3NLA.js} +58 -57
  291. package/chunks/workspace-skills-status-ZHBYM2X7.js +100 -0
  292. package/chunks/{workspace-trust-reconciler-PASUNEKQ.js → workspace-trust-reconciler-TWRB3TW2.js} +59 -58
  293. package/chunks/wrapper-46Z24CTM.js +35 -0
  294. package/chunks/write-file-CQBI7HXO.js +87 -0
  295. package/chunks/{zh-AGL2FVBI.js → zh-LMSTK4WD.js} +2 -1
  296. package/chunks/{zh-TW-KI66MHQY.js → zh-TW-SQ4HTSCW.js} +2 -1
  297. package/chunks/{zoom-image-NAVVM4R2.js → zoom-image-36I4WZIL.js} +15 -15
  298. package/cli.js +13 -13
  299. package/locales/ca.js +1 -0
  300. package/locales/de.js +1 -0
  301. package/locales/en.js +1 -0
  302. package/locales/fr.js +1 -0
  303. package/locales/ja.js +1 -0
  304. package/locales/pt.js +1 -0
  305. package/locales/ru.js +1 -0
  306. package/locales/zh-TW.js +1 -0
  307. package/locales/zh.js +1 -0
  308. package/package.json +3 -3
  309. package/web-shell/assets/{arc-BGiARkbG.js → arc-CgGUyHWd.js} +1 -1
  310. package/web-shell/assets/{architectureDiagram-3BPJPVTR-3QBZDeqg.js → architectureDiagram-3BPJPVTR-BR0Qv-1Y.js} +1 -1
  311. package/web-shell/assets/{blockDiagram-GPEHLZMM-CbJI0j0o.js → blockDiagram-GPEHLZMM-DIoaceaI.js} +1 -1
  312. package/web-shell/assets/{c4Diagram-AAUBKEIU-pita1IYy.js → c4Diagram-AAUBKEIU-Bc5k6BbI.js} +1 -1
  313. package/web-shell/assets/channel-D2b9IYpS.js +1 -0
  314. package/web-shell/assets/{chunk-2J33WTMH-WzTFww1i.js → chunk-2J33WTMH-DtPEz2WX.js} +1 -1
  315. package/web-shell/assets/{chunk-4BX2VUAB-8TIRo9bL.js → chunk-4BX2VUAB-Dydo6ydE.js} +1 -1
  316. package/web-shell/assets/{chunk-55IACEB6-CuCr34qf.js → chunk-55IACEB6-DD9_VWXm.js} +1 -1
  317. package/web-shell/assets/{chunk-727SXJPM-Bb_xWEAx.js → chunk-727SXJPM-DVI2m59k.js} +1 -1
  318. package/web-shell/assets/{chunk-AQP2D5EJ-C8T1b2Qw.js → chunk-AQP2D5EJ-luatmaTN.js} +1 -1
  319. package/web-shell/assets/{chunk-FMBD7UC4-kjpyMkNM.js → chunk-FMBD7UC4-Duy8NTIi.js} +1 -1
  320. package/web-shell/assets/{chunk-ND2GUHAM-Dm35jDmi.js → chunk-ND2GUHAM-CrL1yhms.js} +1 -1
  321. package/web-shell/assets/{chunk-QZHKN3VN-BPVKwuby.js → chunk-QZHKN3VN-C7BX6bu1.js} +1 -1
  322. package/web-shell/assets/classDiagram-4FO5ZUOK-DHatTCmD.js +1 -0
  323. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-DHatTCmD.js +1 -0
  324. package/web-shell/assets/{cose-bilkent-S5V4N54A-M-7J9Xyz.js → cose-bilkent-S5V4N54A-BTzs7mIi.js} +1 -1
  325. package/web-shell/assets/{dagre-BM42HDAG-u6rmS689.js → dagre-BM42HDAG-3VTUmWts.js} +1 -1
  326. package/web-shell/assets/{diagram-2AECGRRQ-nAisfOUB.js → diagram-2AECGRRQ-Ehdp75GN.js} +1 -1
  327. package/web-shell/assets/{diagram-5GNKFQAL-CpobRd3l.js → diagram-5GNKFQAL-B3wu3teE.js} +1 -1
  328. package/web-shell/assets/{diagram-KO2AKTUF-B82W_wPq.js → diagram-KO2AKTUF-DjgTSf2S.js} +1 -1
  329. package/web-shell/assets/{diagram-LMA3HP47-ClTkmPW6.js → diagram-LMA3HP47-Br9mwjY3.js} +1 -1
  330. package/web-shell/assets/{diagram-OG6HWLK6-42fbxGPW.js → diagram-OG6HWLK6-D4xz5M-z.js} +1 -1
  331. package/web-shell/assets/{erDiagram-TEJ5UH35-8_zQfzlQ.js → erDiagram-TEJ5UH35-CXayWlG_.js} +1 -1
  332. package/web-shell/assets/{flowDiagram-I6XJVG4X-DQDoN_oV.js → flowDiagram-I6XJVG4X-CLonjQTi.js} +1 -1
  333. package/web-shell/assets/{ganttDiagram-6RSMTGT7-Cqd646fB.js → ganttDiagram-6RSMTGT7-BTySFT-1.js} +1 -1
  334. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-B6qWs_tS.js → gitGraphDiagram-PVQCEYII--2WcUjOe.js} +1 -1
  335. package/web-shell/assets/{index-eYjX7fQg.css → index-CIFO52Wx.css} +1 -1
  336. package/web-shell/assets/{index-BCeQB_tk.js → index-DPJHkFOG.js} +1 -1
  337. package/web-shell/assets/index-bhq3CUUF.js +1789 -0
  338. package/web-shell/assets/{infoDiagram-5YYISTIA-BVyDAHuu.js → infoDiagram-5YYISTIA-9vpgAf1m.js} +1 -1
  339. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BBHM904I.js → ishikawaDiagram-YF4QCWOH-DcRpHnAW.js} +1 -1
  340. package/web-shell/assets/{journeyDiagram-JHISSGLW-B5Bv5Z_0.js → journeyDiagram-JHISSGLW-C2TKorRm.js} +1 -1
  341. package/web-shell/assets/{kanban-definition-UN3LZRKU-BwSTb0YF.js → kanban-definition-UN3LZRKU-DdsFwB8b.js} +1 -1
  342. package/web-shell/assets/{linear-CHtTm36c.js → linear-7PjRvJrf.js} +1 -1
  343. package/web-shell/assets/{mermaid.core-vBCuAUkf.js → mermaid.core-raDXa11C.js} +5 -5
  344. package/web-shell/assets/{mindmap-definition-RKZ34NQL-CNfKHJrA.js → mindmap-definition-RKZ34NQL-DLHc-PRN.js} +1 -1
  345. package/web-shell/assets/{pieDiagram-4H26LBE5-DT6QMLhc.js → pieDiagram-4H26LBE5-BftYpeTW.js} +1 -1
  346. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Rb2Dar4i.js → quadrantDiagram-W4KKPZXB-O-6ygOYn.js} +1 -1
  347. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CA9YzPUY.js → requirementDiagram-4Y6WPE33-BmZWVufJ.js} +1 -1
  348. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CJ5SkhJw.js → sankeyDiagram-5OEKKPKP-2x5beiWt.js} +1 -1
  349. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-T31AiuVM.js → sequenceDiagram-3UESZ5HK-BH8uKokQ.js} +1 -1
  350. package/web-shell/assets/{stateDiagram-AJRCARHV-f7Xpd_Xh.js → stateDiagram-AJRCARHV-Dq1MFgX_.js} +1 -1
  351. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-spuAYji6.js +1 -0
  352. package/web-shell/assets/{timeline-definition-PNZ67QCA-dCwsTscr.js → timeline-definition-PNZ67QCA-Cl2WKbv9.js} +1 -1
  353. package/web-shell/assets/{vennDiagram-CIIHVFJN-SQtBFYkQ.js → vennDiagram-CIIHVFJN-BqoRo_Q-.js} +1 -1
  354. package/web-shell/assets/{wardley-L42UT6IY-Dfh4eW0B.js → wardley-L42UT6IY-BTxp-Yot.js} +1 -1
  355. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BWBKXBsC.js → wardleyDiagram-YWT4CUSO-DFXVCSH2.js} +1 -1
  356. package/web-shell/assets/{xychartDiagram-2RQKCTM6-DVqzcaxh.js → xychartDiagram-2RQKCTM6-qQhWx0aE.js} +1 -1
  357. package/web-shell/index.html +2 -2
  358. package/chunks/agent-headless-JOL3STCJ.js +0 -86
  359. package/chunks/channel-settings-store-CDUEUDYS.js +0 -101
  360. package/chunks/chunk-PDPFQ2FO.js +0 -156
  361. package/chunks/daemon-status-provider-67M3LFIJ.js +0 -102
  362. package/chunks/daemon-trust-policy-3XCIBLLT.js +0 -98
  363. package/chunks/exitPlanMode-2U23CG2U.js +0 -84
  364. package/chunks/handleAutoUpdate-2F3RWBIT.js +0 -93
  365. package/chunks/initializer-QRD7X25L.js +0 -99
  366. package/chunks/list-G6SHYRHQ.js +0 -102
  367. package/chunks/loadedSettingsAdapter-S4EPYP35.js +0 -96
  368. package/chunks/mcp-R2Z6IKPN.js +0 -96
  369. package/chunks/nonInteractiveCli-E6CEE6IG.js +0 -162
  370. package/chunks/read-file-S2BROE4F.js +0 -32
  371. package/chunks/ripGrep-V4EX6SLA.js +0 -84
  372. package/chunks/theme-manager-7WO6DXIT.js +0 -88
  373. package/chunks/workspace-providers-status-5C3HGWHF.js +0 -99
  374. package/chunks/workspace-skills-status-DX7CA34S.js +0 -99
  375. package/chunks/write-file-3N2WAE3F.js +0 -86
  376. package/web-shell/assets/channel-3vYOf77E.js +0 -1
  377. package/web-shell/assets/classDiagram-4FO5ZUOK-Dr2aqxvr.js +0 -1
  378. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Dr2aqxvr.js +0 -1
  379. package/web-shell/assets/index-Dv9zBWC9.js +0 -1775
  380. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-wucbNzkr.js +0 -1
  381. /package/chunks/{chunk-NWNEANAT.js → chunk-44CTCCLY.js} +0 -0
@@ -8,16 +8,15 @@ import {
8
8
  staleArgsWarning,
9
9
  validateAuthMethod,
10
10
  writeSkillArgs
11
- } from "./chunk-ZUIOLZ4V.js";
11
+ } from "./chunk-VUFEW3SF.js";
12
12
  import {
13
13
  calculateCost,
14
- computeSessionStats,
15
14
  diffCommand,
16
15
  filterCommandsForMode,
17
16
  findInlineMathExpressions,
18
17
  getSystemInfoFields,
19
18
  levelLabel
20
- } from "./chunk-HDHLWOG5.js";
19
+ } from "./chunk-JRRZFO4A.js";
21
20
  import {
22
21
  isKittyProtocolEnabled
23
22
  } from "./chunk-NYX53SV4.js";
@@ -25,33 +24,32 @@ import {
25
24
  VSCODE_SHIFT_ENTER_SEQUENCE,
26
25
  isWaylandSession,
27
26
  writeOsc52
28
- } from "./chunk-NV3F44FL.js";
27
+ } from "./chunk-AMXMM7DH.js";
29
28
  import {
30
29
  contextCommand
31
- } from "./chunk-A6PSUNCY.js";
30
+ } from "./chunk-DEVFUPC5.js";
32
31
  import {
33
32
  themeManager
34
- } from "./chunk-CTJLZLB5.js";
35
- import {
36
- rollbackStandaloneUpdate
37
- } from "./chunk-SKSOLRPK.js";
33
+ } from "./chunk-EN2J77G7.js";
38
34
  import {
39
35
  getErrorMessage as getErrorMessage2
40
- } from "./chunk-FTO3P6PZ.js";
36
+ } from "./chunk-T2VEHZH3.js";
37
+ import {
38
+ rollbackStandaloneUpdate
39
+ } from "./chunk-VO52SIZW.js";
41
40
  import {
42
41
  GITHUB_WORKFLOW_PATHS,
43
42
  INSIGHT_CSS,
44
43
  INSIGHT_JS,
45
44
  collectSessionData,
46
45
  generateExportFilename,
47
- installGoalTerminalObserver,
48
46
  normalizeSessionData,
49
47
  setupGithub,
50
48
  toHtml,
51
49
  toJson,
52
50
  toJsonl,
53
51
  toMarkdown
54
- } from "./chunk-5C7FDVHB.js";
52
+ } from "./chunk-7L64FSYQ.js";
55
53
  import {
56
54
  stripUnsafeCharacters,
57
55
  toCodePoints,
@@ -67,12 +65,12 @@ import {
67
65
  isVoiceEnabled,
68
66
  readVoiceMode,
69
67
  readVoiceModel
70
- } from "./chunk-UXV3DYVT.js";
68
+ } from "./chunk-SZ36WFVK.js";
71
69
  import {
72
70
  getExtendedSystemInfo,
73
71
  getGitVersion,
74
72
  getNpmVersion
75
- } from "./chunk-B7SQOICP.js";
73
+ } from "./chunk-ZIS5I56G.js";
76
74
  import {
77
75
  formatDuration,
78
76
  formatTokenCount
@@ -80,7 +78,10 @@ import {
80
78
  import {
81
79
  isInlineModelOverrideAllowed,
82
80
  parseAcpModelOption
83
- } from "./chunk-I7XTOGIS.js";
81
+ } from "./chunk-5DDUYIY6.js";
82
+ import {
83
+ getInstallationInfo
84
+ } from "./chunk-L2O7DJIE.js";
84
85
  import {
85
86
  OUTPUT_LANGUAGE_AUTO,
86
87
  getAllSettingKeys,
@@ -92,24 +93,21 @@ import {
92
93
  resolveOutputLanguageOrPreserveAuto,
93
94
  validateSettingValue,
94
95
  writeOutputLanguageAndRegisterPath
95
- } from "./chunk-SVY7G3WS.js";
96
+ } from "./chunk-3ZLUA4GV.js";
96
97
  import {
97
98
  getCurrentLanguage,
98
99
  setLanguageAsync,
99
100
  t
100
- } from "./chunk-KHLBIO6M.js";
101
+ } from "./chunk-6LK2QPIA.js";
101
102
  import {
102
103
  SUPPORTED_LANGUAGES,
103
104
  getSupportedLanguageIds,
104
105
  resolveSupportedLanguage
105
106
  } from "./chunk-5EJZE3FP.js";
106
- import {
107
- getInstallationInfo
108
- } from "./chunk-X7XXP7CN.js";
109
107
  import {
110
108
  isFolderTrustEnabled,
111
109
  loadTrustedFolders
112
- } from "./chunk-P6RBCBBE.js";
110
+ } from "./chunk-M2S67TPJ.js";
113
111
  import {
114
112
  require_strip_json_comments
115
113
  } from "./chunk-NPQ5ZKRP.js";
@@ -120,11 +118,11 @@ import {
120
118
  EXTENSIONS_CONFIG_FILENAME,
121
119
  ExtensionManager,
122
120
  IdeClient,
123
- Logger,
124
121
  QWEN_CODE_COMPANION_EXTENSION_NAME,
125
122
  SESSION_TITLE_MAX_LENGTH,
126
123
  SessionService,
127
124
  ShellExecutionService,
125
+ analyzeToolResultRetention,
128
126
  appendToLastTextPart,
129
127
  buildBackgroundEntryLabel,
130
128
  buildBareRememberPrompt,
@@ -145,15 +143,11 @@ import {
145
143
  flatMapTextParts,
146
144
  formatMemoryUsage,
147
145
  generateSessionRecap,
148
- getActiveGoal,
149
- getArenaSystemReminder,
150
146
  getExtensionDescription,
151
147
  getExtensionDisplayName,
152
148
  getIdeInstaller,
153
149
  getInsightPrompt,
154
- getLastGoalTerminal,
155
150
  getMCPServerPrompts,
156
- getPlanModeSystemReminder,
157
151
  getProjectSummaryPrompt,
158
152
  getShellConfiguration,
159
153
  glob,
@@ -178,18 +172,20 @@ import {
178
172
  persistSessionUsage,
179
173
  readPathFromWorkspace,
180
174
  redactUrlCredentials,
181
- registerGoalHook,
182
175
  require_toml,
176
+ resolveSlimmingConfig,
183
177
  runForkedAgent,
184
- tryGenerateSessionTitle,
185
- unregisterGoalHook
186
- } from "./chunk-O3VWAZLP.js";
178
+ tryGenerateSessionTitle
179
+ } from "./chunk-INQN4KIA.js";
187
180
  import {
188
181
  external_exports
189
- } from "./chunk-H6XPXXMH.js";
182
+ } from "./chunk-CQ35AJ4Z.js";
190
183
  import {
191
184
  resolveModelId
192
- } from "./chunk-TCRQD7F6.js";
185
+ } from "./chunk-U6LT3QBF.js";
186
+ import {
187
+ APPROVAL_MODES
188
+ } from "./chunk-6LYDH7VT.js";
193
189
  import {
194
190
  getAutoSkillCuratorStatus,
195
191
  parse,
@@ -197,37 +193,21 @@ import {
197
193
  restoreArchivedAutoSkill,
198
194
  runAutoSkillCurator,
199
195
  setAutoSkillPinned
200
- } from "./chunk-J6SZID63.js";
196
+ } from "./chunk-2AZMF6G5.js";
201
197
  import {
202
198
  HookEventName,
203
199
  sanitizeUserPromptExpansionAdditionalContext
204
- } from "./chunk-GM463R2B.js";
200
+ } from "./chunk-GZGDJ4E6.js";
205
201
  import {
202
+ GoalPersistenceUnavailableError,
203
+ emptyGoalSnapshot,
206
204
  projectUserTranscriptForDisplay
207
- } from "./chunk-QUI267ZP.js";
208
- import {
209
- APPROVAL_MODES
210
- } from "./chunk-WAUGQKUU.js";
205
+ } from "./chunk-SAQHDAUJ.js";
211
206
  import {
212
207
  resolveOpenAILogDir
213
- } from "./chunk-DZUO626D.js";
214
- import {
215
- FORK_SUBAGENT_TYPE,
216
- stripStartupContext
217
- } from "./chunk-IA7TGCN2.js";
218
- import {
219
- applySkillAllowedTools,
220
- buildSkillLlmContent
221
- } from "./chunk-K623ENWT.js";
222
- import {
223
- openBrowserSecurely
224
- } from "./chunk-NAVJD2PQ.js";
225
- import {
226
- REASONING_EFFORT_TIERS,
227
- applyReasoningEffort,
228
- normalizeReasoningEffort
229
- } from "./chunk-KM73TBQ4.js";
208
+ } from "./chunk-6XZERB6P.js";
230
209
  import {
210
+ COMBINED_PASS_TOLERANCE_FACTOR,
231
211
  IdeConnectionEvent,
232
212
  formatTokenUsageSummaryAsCsv,
233
213
  formatTokenUsageSummaryAsJson,
@@ -237,19 +217,35 @@ import {
237
217
  logIdeConnection,
238
218
  queryTokenUsage,
239
219
  read,
240
- recordSkillInvocation,
241
220
  uiTelemetryService
242
- } from "./chunk-YGT2AUJ7.js";
221
+ } from "./chunk-HB6QW4LM.js";
243
222
  import {
244
223
  getAutoMemoryRoot
245
- } from "./chunk-FVKHVJZQ.js";
224
+ } from "./chunk-732MOPEM.js";
246
225
  import {
247
226
  runSideQuery
248
- } from "./chunk-COBO5EBO.js";
227
+ } from "./chunk-CTQE2NB2.js";
228
+ import {
229
+ FORK_SUBAGENT_TYPE,
230
+ stripStartupContext
231
+ } from "./chunk-ZV4XVYL3.js";
249
232
  import {
233
+ applySkillAllowedTools,
234
+ buildSkillLlmContent
235
+ } from "./chunk-K623ENWT.js";
236
+ import {
237
+ ToolDisplayNamesMigration,
250
238
  ToolNames,
251
- isShellProgressData
252
- } from "./chunk-PYQADEFD.js";
239
+ canonicalToolName
240
+ } from "./chunk-XTH2OMDS.js";
241
+ import {
242
+ openBrowserSecurely
243
+ } from "./chunk-NAVJD2PQ.js";
244
+ import {
245
+ REASONING_EFFORT_TIERS,
246
+ applyReasoningEffort,
247
+ normalizeReasoningEffort
248
+ } from "./chunk-KM73TBQ4.js";
253
249
  import {
254
250
  Storage,
255
251
  createDebugLogger,
@@ -258,12 +254,12 @@ import {
258
254
  isSubpath,
259
255
  resolvePath,
260
256
  updateSymlink
261
- } from "./chunk-OIVKILPI.js";
257
+ } from "./chunk-MPBRV3UU.js";
262
258
  import {
263
259
  isCpuProfileRecording,
264
260
  startCpuProfile,
265
261
  stopCpuProfile
266
- } from "./chunk-AJ6LQ5A6.js";
262
+ } from "./chunk-M3QYOPGN.js";
267
263
  import {
268
264
  init_esbuild_shims
269
265
  } from "./chunk-5O2XNYP6.js";
@@ -592,9 +588,6 @@ function findSlashCommandTokens(text, commands) {
592
588
  }
593
589
  __name(findSlashCommandTokens, "findSlashCommandTokens");
594
590
 
595
- // packages/cli/src/nonInteractiveCliCommands.ts
596
- init_esbuild_shims();
597
-
598
591
  // packages/cli/src/services/CommandService.ts
599
592
  init_esbuild_shims();
600
593
  var debugLogger2 = createDebugLogger("CLI_COMMANDS");
@@ -2053,7 +2046,7 @@ var approvalModeCommand = {
2053
2046
  };
2054
2047
  }
2055
2048
  }
2056
- const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-VVQUPTM5.js") : void 0;
2049
+ const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-3QJ7QV5R.js") : void 0;
2057
2050
  if (config) {
2058
2051
  try {
2059
2052
  config.setApprovalMode(mode);
@@ -5090,6 +5083,7 @@ function formatMemoryDiagnostics(diagnostics) {
5090
5083
  __name(formatMemoryDiagnostics, "formatMemoryDiagnostics");
5091
5084
 
5092
5085
  // packages/cli/src/ui/commands/doctorCommand.ts
5086
+ var debugLogger6 = createDebugLogger("DOCTOR_MEMORY");
5093
5087
  var MEMORY_SUBCOMMAND = "memory";
5094
5088
  var CPU_PROFILE_SUBCOMMAND = "cpu-profile";
5095
5089
  var ROLLBACK_SUBCOMMAND = "rollback";
@@ -5162,6 +5156,12 @@ var doctorCommand = {
5162
5156
  return;
5163
5157
  }
5164
5158
  let report = formatMemoryDiagnostics(diagnostics);
5159
+ const toolResultRetention = collectToolResultRetention(context);
5160
+ if (toolResultRetention) {
5161
+ report = `${report}
5162
+
5163
+ ${formatToolResultRetention(toolResultRetention)}`;
5164
+ }
5165
5165
  let messageType = "info";
5166
5166
  let heapSnapshotWritten = false;
5167
5167
  if (abortSignal?.aborted) {
@@ -5354,10 +5354,20 @@ async function memoryDoctorAction(context, args = "") {
5354
5354
  if (context.abortSignal?.aborted) {
5355
5355
  return;
5356
5356
  }
5357
+ const toolResultRetention = collectToolResultRetention(context);
5357
5358
  return {
5358
5359
  type: "message",
5359
5360
  messageType: diagnostics.analysis.risks.length > 0 ? "warning" : "info",
5360
- content: tokens.includes("--json") ? JSON.stringify(diagnostics, null, 2) : formatCoreDiagnostics(diagnostics)
5361
+ content: tokens.includes("--json") ? JSON.stringify(
5362
+ {
5363
+ ...diagnostics,
5364
+ ...toolResultRetention ? { toolResultRetention } : {}
5365
+ },
5366
+ null,
5367
+ 2
5368
+ ) : formatCoreDiagnostics(diagnostics) + (toolResultRetention ? `
5369
+
5370
+ ${formatToolResultRetention(toolResultRetention)}` : "")
5361
5371
  };
5362
5372
  } catch (error) {
5363
5373
  if (context.abortSignal?.aborted) {
@@ -5437,6 +5447,81 @@ function formatCoreDiagnostics(diagnostics) {
5437
5447
  return lines.join("\n");
5438
5448
  }
5439
5449
  __name(formatCoreDiagnostics, "formatCoreDiagnostics");
5450
+ function collectToolResultRetention(context) {
5451
+ try {
5452
+ const config = context.services.config;
5453
+ const history = config?.getGeminiClient()?.getHistoryShallow();
5454
+ if (!history) {
5455
+ return null;
5456
+ }
5457
+ const resolveToolBudgetChars = /* @__PURE__ */ __name((name) => config?.getToolRegistry?.()?.getTool(canonicalToolName(name))?.maxOutputChars, "resolveToolBudgetChars");
5458
+ const displayNameBudgets = /* @__PURE__ */ new Map();
5459
+ for (const tool of config?.getToolRegistry?.()?.getAllTools() ?? []) {
5460
+ if (tool.displayName) {
5461
+ displayNameBudgets.set(tool.displayName, tool.maxOutputChars);
5462
+ }
5463
+ }
5464
+ const stats = analyzeToolResultRetention(history, {
5465
+ // Compare each result against its own tool's declared budget (mirroring
5466
+ // the scheduler), so compliant high-budget results (e.g. MCP) are not
5467
+ // flagged; tools declaring none fall back to the configured global
5468
+ // threshold — the bound the scheduler applies to them.
5469
+ resolveToolBudgetChars,
5470
+ thresholdChars: config?.getTruncateToolOutputThreshold?.(),
5471
+ imageTokenEstimate: resolveSlimmingConfig(config?.getChatCompression?.()).imageTokenEstimate
5472
+ });
5473
+ const threshold = config?.getTruncateToolOutputThreshold?.() ?? stats.oversizedThresholdChars;
5474
+ let largeOutputsInUIHistory = 0;
5475
+ for (const item of context.ui.history ?? []) {
5476
+ if (item.type !== "tool_group") {
5477
+ continue;
5478
+ }
5479
+ for (const tool of item.tools) {
5480
+ if (typeof tool.resultDisplay !== "string") {
5481
+ continue;
5482
+ }
5483
+ const migratedName = ToolDisplayNamesMigration[tool.name] ?? tool.name;
5484
+ const budget = displayNameBudgets.get(tool.name) ?? displayNameBudgets.get(migratedName) ?? resolveToolBudgetChars(tool.name) ?? threshold;
5485
+ if (Number.isFinite(budget) && tool.resultDisplay.length > budget * COMBINED_PASS_TOLERANCE_FACTOR) {
5486
+ largeOutputsInUIHistory += 1;
5487
+ }
5488
+ }
5489
+ }
5490
+ return {
5491
+ ...stats,
5492
+ largeOutputsInUIHistory,
5493
+ // Derived assumption: compression reads the live history by reference
5494
+ // (getHistoryShallow; see chatCompressionService). If compression input
5495
+ // assembly ever changes to copy or filter history, this derivation must
5496
+ // be revisited.
5497
+ presentInCompressionInput: stats.oversizedResultCount > 0
5498
+ };
5499
+ } catch (error) {
5500
+ debugLogger6.warn(
5501
+ `Tool result retention diagnostics unavailable: ${formatErrorMessage2(error)}`
5502
+ );
5503
+ return null;
5504
+ }
5505
+ }
5506
+ __name(collectToolResultRetention, "collectToolResultRetention");
5507
+ function formatToolResultRetention(stats) {
5508
+ const lines = [
5509
+ "Tool result retention",
5510
+ ` Tool results in history: ${stats.toolResultCount}`,
5511
+ ` Total retained: ${stats.totalChars} chars`,
5512
+ ` Largest result: ${stats.largestResultChars} chars`,
5513
+ ` Oversized results (above tool budget): ${stats.oversizedResultCount}`,
5514
+ ` Oversized also rendered in UI history: ${stats.largeOutputsInUIHistory} item(s)`,
5515
+ ` Oversized also in compression input: ${stats.presentInCompressionInput ? "yes (shared by reference, no extra copy)" : "no"}`
5516
+ ];
5517
+ if (stats.oversizedResultCount > 0) {
5518
+ lines.push(
5519
+ " Hint: oversized tool results stay in context and tax every later turn; /compress can reclaim space."
5520
+ );
5521
+ }
5522
+ return lines.join("\n");
5523
+ }
5524
+ __name(formatToolResultRetention, "formatToolResultRetention");
5440
5525
  var CPU_PROFILE_USAGE_HINT = "/doctor cpu-profile [--duration <seconds>]";
5441
5526
  var DEFAULT_CPU_PROFILE_DURATION_SEC = 30;
5442
5527
  var MAX_CPU_PROFILE_DURATION_SEC = 300;
@@ -5646,6 +5731,38 @@ var editorCommand = {
5646
5731
 
5647
5732
  // packages/cli/src/ui/commands/effort-command.ts
5648
5733
  init_esbuild_shims();
5734
+
5735
+ // packages/cli/src/ui/commands/effort-utils.ts
5736
+ init_esbuild_shims();
5737
+ function formatEffortChangeMessage(config, tier) {
5738
+ if (config.getReasoningEffort() !== tier) {
5739
+ const override2 = config.getReasoningEffortOverride?.();
5740
+ if (override2) {
5741
+ return t(
5742
+ "Reasoning effort set to {{tier}}, but thinking is currently disabled; after thinking is re-enabled, {{source}}.{{field}} will still have higher priority.",
5743
+ { tier, source: override2.source, field: override2.field }
5744
+ );
5745
+ }
5746
+ return t(
5747
+ "Reasoning effort set to {{tier}}, but thinking is currently disabled \u2014 it will take effect when thinking is re-enabled.",
5748
+ { tier }
5749
+ );
5750
+ }
5751
+ const override = config.getReasoningEffortOverride?.();
5752
+ if (override) {
5753
+ return t(
5754
+ "Reasoning effort: {{tier}} requested, but {{source}}.{{field}} has higher priority for the active DashScope Qwen model; that configured value will remain effective.",
5755
+ { tier, source: override.source, field: override.field }
5756
+ );
5757
+ }
5758
+ return t(
5759
+ "Reasoning effort: {{tier}} (requested; the effective tier depends on the active provider/model).",
5760
+ { tier }
5761
+ );
5762
+ }
5763
+ __name(formatEffortChangeMessage, "formatEffortChangeMessage");
5764
+
5765
+ // packages/cli/src/ui/commands/effort-command.ts
5649
5766
  var TIER_LIST = REASONING_EFFORT_TIERS.join(", ");
5650
5767
  var effortCommand = {
5651
5768
  name: "effort",
@@ -5709,29 +5826,16 @@ var effortCommand = {
5709
5826
  content: t("Settings service not available.")
5710
5827
  };
5711
5828
  }
5712
- const applied = applyReasoningEffort(config, tier);
5829
+ applyReasoningEffort(config, tier);
5713
5830
  settings.setValue(
5714
5831
  getPersistScopeForModelSelection(settings),
5715
5832
  "model.reasoningEffort",
5716
5833
  tier
5717
5834
  );
5718
- if (!applied) {
5719
- return {
5720
- type: "message",
5721
- messageType: "info",
5722
- content: t(
5723
- "Reasoning effort set to {{tier}}, but thinking is currently disabled \u2014 it will take effect when thinking is re-enabled.",
5724
- { tier }
5725
- )
5726
- };
5727
- }
5728
5835
  return {
5729
5836
  type: "message",
5730
5837
  messageType: "info",
5731
- content: t(
5732
- "Reasoning effort: {{tier}} (requested; the effective tier depends on the active provider/model).",
5733
- { tier }
5734
- )
5838
+ content: formatEffortChangeMessage(config, tier)
5735
5839
  };
5736
5840
  }, "action")
5737
5841
  };
@@ -5741,7 +5845,7 @@ init_esbuild_shims();
5741
5845
  import * as fs5 from "node:fs/promises";
5742
5846
  import path5 from "node:path";
5743
5847
  var EXPORT_DIR_OUT_OF_CWD = "Export directory must be within the project working directory.";
5744
- var debugLogger6 = createDebugLogger("EXPORT_COMMAND");
5848
+ var debugLogger7 = createDebugLogger("EXPORT_COMMAND");
5745
5849
  function formatExportTargetContext(target) {
5746
5850
  return `target: "${target.outputDir}", cwd: "${target.resolvedCwd}"`;
5747
5851
  }
@@ -5770,7 +5874,7 @@ function resolveExportTarget(cwd, args, extension) {
5770
5874
  }
5771
5875
  __name(resolveExportTarget, "resolveExportTarget");
5772
5876
  async function validateExportTargetWithinCwd(target) {
5773
- debugLogger6.debug(
5877
+ debugLogger7.debug(
5774
5878
  "Validating export target realpath:",
5775
5879
  formatExportTargetContext(target)
5776
5880
  );
@@ -5783,7 +5887,7 @@ async function validateExportTargetWithinCwd(target) {
5783
5887
  ]);
5784
5888
  } catch (error) {
5785
5889
  if (error.code === "ENOENT") {
5786
- debugLogger6.debug(
5890
+ debugLogger7.debug(
5787
5891
  "Export target realpath validation failed: missing path",
5788
5892
  formatExportTargetContext(target)
5789
5893
  );
@@ -5798,7 +5902,7 @@ async function validateExportTargetWithinCwd(target) {
5798
5902
  throw error;
5799
5903
  }
5800
5904
  if (!isSubpath(realCwd, realOutputDir)) {
5801
- debugLogger6.debug("Export target realpath escaped cwd:", {
5905
+ debugLogger7.debug("Export target realpath escaped cwd:", {
5802
5906
  realCwd,
5803
5907
  realOutputDir,
5804
5908
  target
@@ -5816,21 +5920,21 @@ async function validateExportTargetWithinCwd(target) {
5816
5920
  __name(validateExportTargetWithinCwd, "validateExportTargetWithinCwd");
5817
5921
  async function realpathNearestExisting(outputDir, resolvedCwd) {
5818
5922
  let currentPath = outputDir;
5819
- debugLogger6.debug("Resolving nearest existing export parent:", {
5923
+ debugLogger7.debug("Resolving nearest existing export parent:", {
5820
5924
  outputDir,
5821
5925
  resolvedCwd
5822
5926
  });
5823
5927
  while (isSubpath(resolvedCwd, currentPath)) {
5824
5928
  try {
5825
5929
  const realCurrentPath = await fs5.realpath(currentPath);
5826
- debugLogger6.debug("Resolved nearest existing export parent:", {
5930
+ debugLogger7.debug("Resolved nearest existing export parent:", {
5827
5931
  currentPath,
5828
5932
  realCurrentPath
5829
5933
  });
5830
5934
  return realCurrentPath;
5831
5935
  } catch (error) {
5832
5936
  if (error.code !== "ENOENT") {
5833
- debugLogger6.debug("Failed to resolve existing export parent:", error);
5937
+ debugLogger7.debug("Failed to resolve existing export parent:", error);
5834
5938
  throw error;
5835
5939
  }
5836
5940
  const parentPath = path5.dirname(currentPath);
@@ -5844,7 +5948,7 @@ async function realpathNearestExisting(outputDir, resolvedCwd) {
5844
5948
  }
5845
5949
  __name(realpathNearestExisting, "realpathNearestExisting");
5846
5950
  async function validateExistingExportParentWithinCwd(target) {
5847
- debugLogger6.debug(
5951
+ debugLogger7.debug(
5848
5952
  "Validating existing export parent realpath:",
5849
5953
  formatExportTargetContext(target)
5850
5954
  );
@@ -5862,7 +5966,7 @@ async function validateExistingExportParentWithinCwd(target) {
5862
5966
  target.resolvedCwd
5863
5967
  );
5864
5968
  if (!isSubpath(realCwd, realExistingParent)) {
5865
- debugLogger6.debug("Existing export parent escaped cwd:", {
5969
+ debugLogger7.debug("Existing export parent escaped cwd:", {
5866
5970
  realCwd,
5867
5971
  realExistingParent,
5868
5972
  target
@@ -5898,7 +6002,7 @@ async function exportSessionAction(context, args, exportFormat) {
5898
6002
  }
5899
6003
  const target = resolveExportTarget(cwd, args, exportFormat.extension);
5900
6004
  const targetFilepath = target.filepath;
5901
- debugLogger6.debug("Resolved export target:", {
6005
+ debugLogger7.debug("Resolved export target:", {
5902
6006
  format: exportFormat.displayName,
5903
6007
  cwd,
5904
6008
  outputDirArg: args.trim(),
@@ -5907,7 +6011,7 @@ async function exportSessionAction(context, args, exportFormat) {
5907
6011
  filepath: target.filepath
5908
6012
  });
5909
6013
  if (!target.isInsideCwd) {
5910
- debugLogger6.debug(
6014
+ debugLogger7.debug(
5911
6015
  "Export target rejected before realpath validation:",
5912
6016
  formatExportTargetContext(target)
5913
6017
  );
@@ -5924,17 +6028,17 @@ async function exportSessionAction(context, args, exportFormat) {
5924
6028
  if (initialValidationError) {
5925
6029
  return initialValidationError;
5926
6030
  }
5927
- debugLogger6.debug("Export target validation passed:", {
6031
+ debugLogger7.debug("Export target validation passed:", {
5928
6032
  format: exportFormat.displayName,
5929
6033
  outputDir: target.outputDir,
5930
6034
  outputDirKind: target.outputDirKind
5931
6035
  });
5932
6036
  const sessionService = new SessionService(cwd);
5933
6037
  const sessionId = config.getSessionId();
5934
- debugLogger6.debug("Loading session for export:", { sessionId, cwd });
6038
+ debugLogger7.debug("Loading session for export:", { sessionId, cwd });
5935
6039
  const sessionData = await sessionService.loadSession(sessionId);
5936
6040
  if (!sessionData) {
5937
- debugLogger6.debug("No active session found for export:", {
6041
+ debugLogger7.debug("No active session found for export:", {
5938
6042
  sessionId,
5939
6043
  cwd
5940
6044
  });
@@ -5954,12 +6058,12 @@ async function exportSessionAction(context, args, exportFormat) {
5954
6058
  const content = exportFormat.format(normalizedData);
5955
6059
  if (target.outputDirKind === "custom") {
5956
6060
  try {
5957
- debugLogger6.debug("Creating export directory:", {
6061
+ debugLogger7.debug("Creating export directory:", {
5958
6062
  outputDir: target.outputDir
5959
6063
  });
5960
6064
  await fs5.mkdir(target.outputDir, { recursive: true, mode: 448 });
5961
6065
  } catch (error) {
5962
- debugLogger6.debug("Failed to create export directory:", error);
6066
+ debugLogger7.debug("Failed to create export directory:", error);
5963
6067
  return {
5964
6068
  type: "message",
5965
6069
  messageType: "error",
@@ -5973,7 +6077,7 @@ async function exportSessionAction(context, args, exportFormat) {
5973
6077
  return writeValidationError;
5974
6078
  }
5975
6079
  } catch (error) {
5976
- debugLogger6.debug("Export path validation failed before write:", error);
6080
+ debugLogger7.debug("Export path validation failed before write:", error);
5977
6081
  return {
5978
6082
  type: "message",
5979
6083
  messageType: "error",
@@ -5981,7 +6085,7 @@ async function exportSessionAction(context, args, exportFormat) {
5981
6085
  };
5982
6086
  }
5983
6087
  try {
5984
- debugLogger6.debug("Writing export file:", {
6088
+ debugLogger7.debug("Writing export file:", {
5985
6089
  format: exportFormat.displayName,
5986
6090
  filepath: target.filepath
5987
6091
  });
@@ -5990,17 +6094,17 @@ async function exportSessionAction(context, args, exportFormat) {
5990
6094
  mode: 384
5991
6095
  });
5992
6096
  await fs5.chmod(target.filepath, 384).catch((error) => {
5993
- debugLogger6.debug("Failed to tighten export file permissions:", error);
6097
+ debugLogger7.debug("Failed to tighten export file permissions:", error);
5994
6098
  });
5995
6099
  } catch (error) {
5996
- debugLogger6.debug("Failed to write export file:", error);
6100
+ debugLogger7.debug("Failed to write export file:", error);
5997
6101
  return {
5998
6102
  type: "message",
5999
6103
  messageType: "error",
6000
6104
  content: `Failed to export session: ${error instanceof Error ? error.message : String(error)} (${exportFormat.displayName} target: "${targetFilepath}")`
6001
6105
  };
6002
6106
  }
6003
- debugLogger6.debug("Session export completed:", {
6107
+ debugLogger7.debug("Session export completed:", {
6004
6108
  format: exportFormat.displayName,
6005
6109
  filepath: target.filepath
6006
6110
  });
@@ -6010,7 +6114,7 @@ async function exportSessionAction(context, args, exportFormat) {
6010
6114
  content: `Session exported to ${exportFormat.displayName}: ${target.displayPath}`
6011
6115
  };
6012
6116
  } catch (error) {
6013
- debugLogger6.debug("Session export failed:", {
6117
+ debugLogger7.debug("Session export failed:", {
6014
6118
  format: exportFormat.displayName,
6015
6119
  target,
6016
6120
  error
@@ -6106,7 +6210,7 @@ var exportCommand = {
6106
6210
 
6107
6211
  // packages/cli/src/ui/commands/forkCommand.ts
6108
6212
  init_esbuild_shims();
6109
- var debugLogger7 = createDebugLogger("FORK_COMMAND");
6213
+ var debugLogger8 = createDebugLogger("FORK_COMMAND");
6110
6214
  function deriveForkDescription(directive) {
6111
6215
  const oneLine = directive.replace(/\s+/g, " ").trim();
6112
6216
  return oneLine.length > 60 ? `${oneLine.slice(0, 57)}\u2026` : oneLine;
@@ -6162,7 +6266,7 @@ var forkCommand = {
6162
6266
  try {
6163
6267
  hasHistory = (config.getGeminiClient().getHistoryShallow() ?? []).length > 0;
6164
6268
  } catch (error) {
6165
- debugLogger7.debug("Failed to read history before /fork:", error);
6269
+ debugLogger8.debug("Failed to read history before /fork:", error);
6166
6270
  hasHistory = false;
6167
6271
  }
6168
6272
  if (!hasHistory) {
@@ -6222,7 +6326,7 @@ var forkCommand = {
6222
6326
  ]
6223
6327
  });
6224
6328
  } catch (error) {
6225
- debugLogger7.debug("Failed to record fork event in history:", error);
6329
+ debugLogger8.debug("Failed to record fork event in history:", error);
6226
6330
  }
6227
6331
  return {
6228
6332
  type: "message",
@@ -6236,7 +6340,7 @@ var forkCommand = {
6236
6340
 
6237
6341
  // packages/cli/src/ui/commands/extensionsCommand.ts
6238
6342
  init_esbuild_shims();
6239
- var debugLogger8 = createDebugLogger("EXTENSIONS_COMMAND");
6343
+ var debugLogger9 = createDebugLogger("EXTENSIONS_COMMAND");
6240
6344
  var EXTENSION_EXPLORE_URL = {
6241
6345
  Gemini: "https://geminicli.com/extensions/",
6242
6346
  ClaudeCode: "https://claudemarketplaces.com/"
@@ -6399,7 +6503,7 @@ async function installAction(context, args) {
6399
6503
  }
6400
6504
  const extensionManager = context.services.config?.getExtensionManager();
6401
6505
  if (!(extensionManager instanceof ExtensionManager)) {
6402
- debugLogger8.error(
6506
+ debugLogger9.error(
6403
6507
  `Cannot ${context.invocation?.name} extensions in this environment`
6404
6508
  );
6405
6509
  return;
@@ -6544,140 +6648,6 @@ var CLEAR_KEYWORDS = /* @__PURE__ */ new Set([
6544
6648
  "none",
6545
6649
  "cancel"
6546
6650
  ]);
6547
- function formatLegacyTurns(count) {
6548
- return `${count} ${count === 1 ? "turn" : "turns"}`;
6549
- }
6550
- __name(formatLegacyTurns, "formatLegacyTurns");
6551
- function assertNeverTerminalKind(kind) {
6552
- throw new Error(`Unexpected GoalTerminalKind: ${kind}`);
6553
- }
6554
- __name(assertNeverTerminalKind, "assertNeverTerminalKind");
6555
- function formatLegacyTerminalSummary(event) {
6556
- let title;
6557
- switch (event.kind) {
6558
- case "achieved":
6559
- title = "Goal achieved";
6560
- break;
6561
- case "failed":
6562
- title = "Goal could not be achieved";
6563
- break;
6564
- case "aborted":
6565
- title = "Goal aborted";
6566
- break;
6567
- default:
6568
- title = assertNeverTerminalKind(event.kind);
6569
- }
6570
- const stats = [];
6571
- if (event.iterations > 0) stats.push(formatLegacyTurns(event.iterations));
6572
- if (typeof event.durationMs === "number") {
6573
- stats.push(formatDuration(event.durationMs, { hideTrailingZeros: true }));
6574
- }
6575
- const subtitle = stats.length > 0 ? ` \xB7 ${stats.join(" \xB7 ")}` : "";
6576
- const reason = event.lastReason?.trim();
6577
- return `${title}${subtitle}
6578
- Goal: ${event.condition}${reason ? `
6579
- Last check: ${reason}` : ""}`;
6580
- }
6581
- __name(formatLegacyTerminalSummary, "formatLegacyTerminalSummary");
6582
- async function runLegacyGoalCommand(context, args, explicitSet = false) {
6583
- const { config } = context.services;
6584
- if (!config) return errorMessage("Configuration is not available.");
6585
- const sessionId = config.getSessionId();
6586
- const objective = args.trim();
6587
- if (!objective) {
6588
- const active = getActiveGoal(sessionId);
6589
- if (active) {
6590
- const turns = active.iterations === 0 ? "not yet evaluated" : formatLegacyTurns(active.iterations);
6591
- return {
6592
- type: "message",
6593
- messageType: "info",
6594
- content: `Goal active: ${active.condition} (${turns})${active.lastReason ? `
6595
- Last check: ${active.lastReason}` : ""}`
6596
- };
6597
- }
6598
- const terminal = getLastGoalTerminal(sessionId);
6599
- return {
6600
- type: "message",
6601
- messageType: "info",
6602
- content: terminal ? formatLegacyTerminalSummary(terminal) : "No goal set. Usage: `/goal <condition>` (or `/goal clear`)."
6603
- };
6604
- }
6605
- if (!explicitSet && CLEAR_KEYWORDS.has(objective.toLowerCase())) {
6606
- const cleared = unregisterGoalHook(config, sessionId);
6607
- if (!cleared) {
6608
- return {
6609
- type: "message",
6610
- messageType: "info",
6611
- content: "No goal set."
6612
- };
6613
- }
6614
- const item = {
6615
- type: "goal_status" /* GOAL_STATUS */,
6616
- kind: "cleared",
6617
- condition: cleared.condition,
6618
- iterations: cleared.iterations,
6619
- durationMs: Date.now() - cleared.setAt
6620
- };
6621
- context.ui.addItem(item, Date.now());
6622
- return {
6623
- type: "message",
6624
- messageType: "info",
6625
- content: `Goal cleared: ${cleared.condition}`
6626
- };
6627
- }
6628
- if (!config.isTrustedFolder()) {
6629
- return errorMessage(
6630
- "/goal is only available in trusted workspaces. Trust this folder via `/trust` and try again."
6631
- );
6632
- }
6633
- if (config.getDisableAllHooks()) {
6634
- return errorMessage(
6635
- "/goal is disabled because hooks are turned off in this session (`disableAllHooks` or bare mode)."
6636
- );
6637
- }
6638
- if (!config.getHookSystem()) {
6639
- return errorMessage(
6640
- "Hook system is not initialized; cannot set a /goal in this session."
6641
- );
6642
- }
6643
- let registered;
6644
- try {
6645
- registered = registerGoalHook({
6646
- config,
6647
- sessionId,
6648
- condition: objective,
6649
- tokensAtStart: 0
6650
- });
6651
- } catch (error) {
6652
- return errorMessage(
6653
- `Failed to set goal: ${error instanceof Error ? error.message : String(error)}`
6654
- );
6655
- }
6656
- context.ui.addItem(
6657
- {
6658
- type: "goal_status" /* GOAL_STATUS */,
6659
- kind: "set",
6660
- condition: registered.condition,
6661
- setAt: registered.setAt
6662
- },
6663
- Date.now()
6664
- );
6665
- installGoalTerminalObserver({
6666
- sessionId,
6667
- config,
6668
- addItem: context.ui.addItem
6669
- });
6670
- const result = {
6671
- type: "submit_prompt",
6672
- content: [
6673
- {
6674
- text: `A session-scoped Stop hook is now active with condition: "${objective.replace(/[\r\n]+/g, " ").replace(/"/g, "'")}". Briefly acknowledge the goal, then immediately start (or continue) working toward it \u2014 treat the condition itself as your directive and do not pause to ask the user what to do. The hook will block stopping until the condition holds. It auto-clears once the condition is met \u2014 do not tell the user to run \`/goal clear\` after success; that is only for clearing a goal early.`
6675
- }
6676
- ]
6677
- };
6678
- return result;
6679
- }
6680
- __name(runLegacyGoalCommand, "runLegacyGoalCommand");
6681
6651
  function parseGoalCommand(args) {
6682
6652
  let input = args.trim();
6683
6653
  if (/^\/goal(?:\s|$)/i.test(input)) {
@@ -6723,22 +6693,6 @@ var goalCommand = {
6723
6693
  kind: "built-in" /* BUILT_IN */,
6724
6694
  supportedModes: ["interactive", "non_interactive", "acp"],
6725
6695
  action: /* @__PURE__ */ __name(async (context, args) => {
6726
- if (context.executionMode === "acp") {
6727
- const operation2 = parseGoalCommand(args);
6728
- if (operation2.kind === "error") return errorMessage(operation2.message);
6729
- if (operation2.kind !== "status" && operation2.kind !== "clear" && operation2.kind !== "set") {
6730
- return errorMessage(
6731
- `'/goal ${operation2.kind}' is not available in ACP mode.`
6732
- );
6733
- }
6734
- const explicitSet = operation2.kind === "set";
6735
- const legacyArgs = explicitSet ? operation2.objective : args;
6736
- return await runLegacyGoalCommand(context, legacyArgs, explicitSet) ?? {
6737
- type: "message",
6738
- messageType: "info",
6739
- content: "Command executed successfully."
6740
- };
6741
- }
6742
6696
  const { config } = context.services;
6743
6697
  if (!config) return errorMessage("Configuration is not available.");
6744
6698
  const operation = parseGoalCommand(args);
@@ -6749,8 +6703,18 @@ var goalCommand = {
6749
6703
  "/goal is only available in trusted workspaces. Trust this folder via `/trust` and try again."
6750
6704
  );
6751
6705
  }
6706
+ let runtime;
6707
+ try {
6708
+ runtime = await config.getGoalRuntimeReady();
6709
+ } catch (error) {
6710
+ if (error instanceof GoalPersistenceUnavailableError && (operation.kind === "status" || operation.kind === "clear") && config.getChatRecordingService() === void 0) {
6711
+ return goalControl(operation, { snapshot: emptyGoalSnapshot() });
6712
+ }
6713
+ return errorMessage(
6714
+ error instanceof Error ? error.message : String(error)
6715
+ );
6716
+ }
6752
6717
  try {
6753
- const runtime = await config.getGoalRuntimeReady();
6754
6718
  const snapshot = runtime.getSnapshot();
6755
6719
  if (operation.kind === "status") {
6756
6720
  return goalControl(operation, { snapshot });
@@ -6873,7 +6837,7 @@ var expandNowCommand = {
6873
6837
  content: t("History is already expanded in this session.")
6874
6838
  };
6875
6839
  }
6876
- const { expandCollapsedHistory } = await import("./resumeHistoryUtils-VUY4B6BO.js");
6840
+ const { expandCollapsedHistory } = await import("./resumeHistoryUtils-UMC4Y3E2.js");
6877
6841
  const updated = expandCollapsedHistory(history);
6878
6842
  loadHistory(updated);
6879
6843
  refreshStatic();
@@ -8323,7 +8287,7 @@ var initCommand = {
8323
8287
  if (existing && existing.trim().length > 0) {
8324
8288
  if (!context.overwriteConfirmed) {
8325
8289
  const [{ Text }, { default: React }] = await Promise.all([
8326
- import("./build-GDBLPA24.js"),
8290
+ import("./build-RZS65IIX.js"),
8327
8291
  import("./react-SG7JAQSZ.js")
8328
8292
  ]);
8329
8293
  return {
@@ -8406,7 +8370,7 @@ Write the complete content to the \`${contextFileName}\` file. The output must b
8406
8370
 
8407
8371
  // packages/cli/src/ui/commands/languageCommand.ts
8408
8372
  init_esbuild_shims();
8409
- var debugLogger9 = createDebugLogger("LANGUAGE_COMMAND");
8373
+ var debugLogger10 = createDebugLogger("LANGUAGE_COMMAND");
8410
8374
  function getCurrentOutputLanguage(context) {
8411
8375
  const settingValue = context?.services?.settings?.merged?.general?.outputLanguage || OUTPUT_LANGUAGE_AUTO;
8412
8376
  const resolved = resolveOutputLanguageOrPreserveAuto(settingValue);
@@ -8474,7 +8438,7 @@ async function setUiLanguage(context, lang, scope = "User" /* User */) {
8474
8438
  throwOnWriteFailure: true
8475
8439
  });
8476
8440
  } catch (error) {
8477
- debugLogger9.warn("Failed to save language setting:", error);
8441
+ debugLogger10.warn("Failed to save language setting:", error);
8478
8442
  return {
8479
8443
  type: "message",
8480
8444
  messageType: "error",
@@ -8510,7 +8474,7 @@ async function setOutputLanguage(context, language) {
8510
8474
  settingValue
8511
8475
  );
8512
8476
  } catch (error) {
8513
- debugLogger9.warn("Failed to save output language setting:", error);
8477
+ debugLogger10.warn("Failed to save output language setting:", error);
8514
8478
  }
8515
8479
  }
8516
8480
  const config = context.services.config;
@@ -8519,7 +8483,7 @@ async function setOutputLanguage(context, language) {
8519
8483
  await config.refreshHierarchicalMemory();
8520
8484
  await config.getGeminiClient().refreshSystemInstruction();
8521
8485
  } catch (error) {
8522
- debugLogger9.warn(
8486
+ debugLogger10.warn(
8523
8487
  "Failed to apply output language to running session:",
8524
8488
  error
8525
8489
  );
@@ -8875,6 +8839,23 @@ var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders
8875
8839
  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.";
8876
8840
  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.";
8877
8841
  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.";
8842
+ var MODEL_PICKER_FLAGS = [
8843
+ "fast",
8844
+ "voice",
8845
+ "vision",
8846
+ "compaction",
8847
+ "image",
8848
+ "project",
8849
+ "global"
8850
+ ];
8851
+ var MODEL_PICKER_FLAG_PATTERN = `(?:${MODEL_PICKER_FLAGS.join("|")})`;
8852
+ var MODEL_PICKER_ONLY_PATTERN = new RegExp(
8853
+ `^(?:\\s*--${MODEL_PICKER_FLAG_PATTERN})*\\s*$`
8854
+ );
8855
+ function isPickerOnlyModelInvocation(args) {
8856
+ return MODEL_PICKER_ONLY_PATTERN.test(args);
8857
+ }
8858
+ __name(isPickerOnlyModelInvocation, "isPickerOnlyModelInvocation");
8878
8859
  function parseScopeFlags(args) {
8879
8860
  let scopeOverride;
8880
8861
  let remaining = args;
@@ -9921,7 +9902,7 @@ init_esbuild_shims();
9921
9902
 
9922
9903
  // packages/cli/src/config/extension-runtime-reload.ts
9923
9904
  init_esbuild_shims();
9924
- var debugLogger10 = createDebugLogger("EXTENSION_RUNTIME_RELOAD");
9905
+ var debugLogger11 = createDebugLogger("EXTENSION_RUNTIME_RELOAD");
9925
9906
  async function reloadPluginsRuntime(options) {
9926
9907
  if (options.config.isSafeMode()) {
9927
9908
  throw new Error("Extension reload is disabled in safe mode.");
@@ -9941,7 +9922,7 @@ async function refreshExtensionContentRuntime(options) {
9941
9922
  await manager.refreshCache();
9942
9923
  } catch (error) {
9943
9924
  errors.push(error);
9944
- debugLogger10.warn(
9925
+ debugLogger11.warn(
9945
9926
  "refreshExtensionContentRuntime: refreshCache failed:",
9946
9927
  error
9947
9928
  );
@@ -9954,7 +9935,7 @@ async function refreshExtensionContentRuntime(options) {
9954
9935
  for (const result of settled) {
9955
9936
  if (result.status === "rejected") {
9956
9937
  errors.push(result.reason);
9957
- debugLogger10.warn(
9938
+ debugLogger11.warn(
9958
9939
  "refreshExtensionContentRuntime: a refresh leg failed:",
9959
9940
  result.reason
9960
9941
  );
@@ -10216,9 +10197,15 @@ var renameCommand = {
10216
10197
  }, 500);
10217
10198
  let outcome;
10218
10199
  try {
10200
+ const userDisplayTexts = config.getChatRecordingService()?.getUserDisplayTextsForTitle?.() ?? [];
10201
+ const lastDisplayText = userDisplayTexts.at(-1)?.trim();
10202
+ const titleDisplayTexts = lastDisplayText?.match(
10203
+ /^\/(?:rename|tag)(?:\s+--auto)?$/i
10204
+ ) ? userDisplayTexts.slice(0, -1) : userDisplayTexts;
10219
10205
  outcome = await tryGenerateSessionTitle(
10220
10206
  config,
10221
- context.abortSignal ?? new AbortController().signal
10207
+ context.abortSignal ?? new AbortController().signal,
10208
+ titleDisplayTexts
10222
10209
  );
10223
10210
  } finally {
10224
10211
  clearInterval(timer);
@@ -11757,7 +11744,7 @@ import * as os4 from "node:os";
11757
11744
  import * as path13 from "node:path";
11758
11745
  import { exec } from "node:child_process";
11759
11746
  import { promisify } from "node:util";
11760
- var debugLogger11 = createDebugLogger("TERMINAL_SETUP");
11747
+ var debugLogger12 = createDebugLogger("TERMINAL_SETUP");
11761
11748
  var execAsync = promisify(exec);
11762
11749
  function stripJsonComments2(content) {
11763
11750
  return content.replace(/^\s*\/\/.*$/gm, "");
@@ -11790,7 +11777,7 @@ async function detectTerminal() {
11790
11777
  if (parentName.includes("trae") || parentName.includes("Trae"))
11791
11778
  return "trae";
11792
11779
  } catch (error) {
11793
- debugLogger11.debug("Parent process detection failed:", error);
11780
+ debugLogger12.debug("Parent process detection failed:", error);
11794
11781
  }
11795
11782
  }
11796
11783
  return null;
@@ -11802,7 +11789,7 @@ async function backupFile(filePath) {
11802
11789
  const backupPath = `${filePath}.backup.${timestamp}`;
11803
11790
  await fs10.copyFile(filePath, backupPath);
11804
11791
  } catch (error) {
11805
- debugLogger11.warn(`Failed to create backup of ${filePath}:`, error);
11792
+ debugLogger12.warn(`Failed to create backup of ${filePath}:`, error);
11806
11793
  }
11807
11794
  }
11808
11795
  __name(backupFile, "backupFile");
@@ -12033,6 +12020,7 @@ var terminalSetupCommand = {
12033
12020
 
12034
12021
  // packages/cli/src/ui/commands/themeCommand.ts
12035
12022
  init_esbuild_shims();
12023
+ import process5 from "node:process";
12036
12024
  var themeCommand = {
12037
12025
  name: "theme",
12038
12026
  get description() {
@@ -12040,10 +12028,21 @@ var themeCommand = {
12040
12028
  },
12041
12029
  kind: "built-in" /* BUILT_IN */,
12042
12030
  supportedModes: ["interactive"],
12043
- action: /* @__PURE__ */ __name((_context, _args) => ({
12044
- type: "dialog",
12045
- dialog: "theme"
12046
- }), "action")
12031
+ action: /* @__PURE__ */ __name((_context, _args) => {
12032
+ if (process5.env["NO_COLOR"]) {
12033
+ return {
12034
+ type: "message",
12035
+ messageType: "info",
12036
+ content: t(
12037
+ "Theme configuration unavailable due to NO_COLOR env variable."
12038
+ )
12039
+ };
12040
+ }
12041
+ return {
12042
+ type: "dialog",
12043
+ dialog: "theme"
12044
+ };
12045
+ }, "action")
12047
12046
  };
12048
12047
 
12049
12048
  // packages/cli/src/ui/commands/toolsCommand.ts
@@ -12112,7 +12111,7 @@ init_esbuild_shims();
12112
12111
  // packages/cli/src/ui/voice/voice-availability.ts
12113
12112
  init_esbuild_shims();
12114
12113
  import { existsSync as existsSync2 } from "node:fs";
12115
- import process5 from "node:process";
12114
+ import process6 from "node:process";
12116
12115
  var SUPPORTED_PLATFORMS = [
12117
12116
  "darwin",
12118
12117
  "linux",
@@ -12123,8 +12122,8 @@ function isWsl(env) {
12123
12122
  }
12124
12123
  __name(isWsl, "isWsl");
12125
12124
  function getVoiceUnavailableReason(environment = {
12126
- platform: process5.platform,
12127
- env: process5.env
12125
+ platform: process6.platform,
12126
+ env: process6.env
12128
12127
  }) {
12129
12128
  const { platform: platform2, env } = environment;
12130
12129
  const fileExists = environment.fileExists ?? existsSync2;
@@ -14109,10 +14108,10 @@ var updateCommand = {
14109
14108
  { performStandaloneUpdate },
14110
14109
  installationInfo
14111
14110
  ] = await Promise.all([
14112
- import("./updateCheck-4QDI7CUZ.js"),
14113
- import("./processUtils-GZOVMFK4.js"),
14114
- import("./standalone-update-OC5IKJGY.js"),
14115
- import("./installationInfo-JCUKPGDB.js")
14111
+ import("./updateCheck-3BQA7KNI.js"),
14112
+ import("./processUtils-ILOXESNR.js"),
14113
+ import("./standalone-update-G4BETY4B.js"),
14114
+ import("./installationInfo-GY2OCLIS.js")
14116
14115
  ]);
14117
14116
  const { formatUpdateInstructions, getInstallationInfo: getInstallationInfo2 } = installationInfo;
14118
14117
  const settings = context.services.settings;
@@ -14344,7 +14343,7 @@ var BuiltinCommandLoader = class {
14344
14343
  // packages/cli/src/services/BundledSkillLoader.ts
14345
14344
  init_esbuild_shims();
14346
14345
  import { dirname as dirname2 } from "node:path";
14347
- var debugLogger12 = createDebugLogger("BUNDLED_SKILL_LOADER");
14346
+ var debugLogger13 = createDebugLogger("BUNDLED_SKILL_LOADER");
14348
14347
  var BundledSkillLoader = class {
14349
14348
  constructor(config) {
14350
14349
  this.config = config;
@@ -14354,12 +14353,12 @@ var BundledSkillLoader = class {
14354
14353
  }
14355
14354
  async loadCommands(_signal) {
14356
14355
  if (this.config?.getBareMode?.()) {
14357
- debugLogger12.debug("Bare mode enabled, skipping bundled skills");
14356
+ debugLogger13.debug("Bare mode enabled, skipping bundled skills");
14358
14357
  return [];
14359
14358
  }
14360
14359
  const skillManager = this.config?.getSkillManager();
14361
14360
  if (!skillManager) {
14362
- debugLogger12.debug("SkillManager not available, skipping bundled skills");
14361
+ debugLogger13.debug("SkillManager not available, skipping bundled skills");
14363
14362
  return [];
14364
14363
  }
14365
14364
  try {
@@ -14367,7 +14366,7 @@ var BundledSkillLoader = class {
14367
14366
  const cronEnabled = this.config?.isCronEnabled() ?? false;
14368
14367
  const cronVisible = allSkills.filter((skill) => {
14369
14368
  if (!cronEnabled && skill.allowedTools?.some((t2) => t2.startsWith("cron_"))) {
14370
- debugLogger12.debug(
14369
+ debugLogger13.debug(
14371
14370
  `Hiding skill "${skill.name}" because cron is not enabled`
14372
14371
  );
14373
14372
  return false;
@@ -14378,7 +14377,7 @@ var BundledSkillLoader = class {
14378
14377
  const skills = cronVisible.filter(
14379
14378
  (skill) => !disabled.has(skill.name.toLowerCase())
14380
14379
  );
14381
- debugLogger12.debug(
14380
+ debugLogger13.debug(
14382
14381
  `Loaded ${skills.length} bundled skill(s) as slash commands; ${cronVisible.length - skills.length} hidden by skills.disabled`
14383
14382
  );
14384
14383
  return skills.map((skill) => ({
@@ -14440,7 +14439,7 @@ ${body}`;
14440
14439
  }, "action")
14441
14440
  }));
14442
14441
  } catch (error) {
14443
- debugLogger12.error("Failed to load bundled skills:", error);
14442
+ debugLogger13.error("Failed to load bundled skills:", error);
14444
14443
  return [];
14445
14444
  }
14446
14445
  }
@@ -14720,7 +14719,7 @@ var ShellProcessor = class {
14720
14719
 
14721
14720
  // packages/cli/src/services/prompt-processors/atFileProcessor.ts
14722
14721
  init_esbuild_shims();
14723
- var debugLogger13 = createDebugLogger("AT_FILE_PROCESSOR");
14722
+ var debugLogger14 = createDebugLogger("AT_FILE_PROCESSOR");
14724
14723
  var AtFileProcessor = class {
14725
14724
  constructor(commandName) {
14726
14725
  this.commandName = commandName;
@@ -14766,7 +14765,7 @@ var AtFileProcessor = class {
14766
14765
  } catch (error) {
14767
14766
  const message2 = error instanceof Error ? error.message : String(error);
14768
14767
  const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message2}`;
14769
- debugLogger13.error(
14768
+ debugLogger14.error(
14770
14769
  `[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
14771
14770
  );
14772
14771
  context.ui.addItem(
@@ -14791,7 +14790,7 @@ var AtFileProcessor = class {
14791
14790
  };
14792
14791
 
14793
14792
  // packages/cli/src/services/command-factory.ts
14794
- var debugLogger14 = createDebugLogger("COMMAND_FACTORY");
14793
+ var debugLogger15 = createDebugLogger("COMMAND_FACTORY");
14795
14794
  function createSlashCommandFromDefinition(filePath, baseDir, definition, extensionName, fileExtension) {
14796
14795
  const relativePathWithExt = path16.relative(baseDir, filePath);
14797
14796
  const relativePath = relativePathWithExt.substring(
@@ -14835,7 +14834,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
14835
14834
  whenToUse: definition.whenToUse,
14836
14835
  action: /* @__PURE__ */ __name(async (context, _args) => {
14837
14836
  if (!context.invocation) {
14838
- debugLogger14.error(
14837
+ debugLogger15.error(
14839
14838
  `[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
14840
14839
  );
14841
14840
  return {
@@ -14873,7 +14872,7 @@ function createSlashCommandFromDefinition(filePath, baseDir, definition, extensi
14873
14872
  __name(createSlashCommandFromDefinition, "createSlashCommandFromDefinition");
14874
14873
 
14875
14874
  // packages/cli/src/services/FileCommandLoader.ts
14876
- var debugLogger15 = createDebugLogger("FILE_COMMAND_LOADER");
14875
+ var debugLogger16 = createDebugLogger("FILE_COMMAND_LOADER");
14877
14876
  var TomlCommandDefSchema = external_exports.object({
14878
14877
  prompt: external_exports.string({
14879
14878
  required_error: "The 'prompt' field is required.",
@@ -14907,7 +14906,7 @@ var FileCommandLoader = class {
14907
14906
  */
14908
14907
  async loadCommands(signal) {
14909
14908
  if (this.config?.getBareMode?.()) {
14910
- debugLogger15.debug("Bare mode enabled, skipping auto-discovered commands");
14909
+ debugLogger16.debug("Bare mode enabled, skipping auto-discovered commands");
14911
14910
  return [];
14912
14911
  }
14913
14912
  const allCommands = [];
@@ -14951,7 +14950,7 @@ var FileCommandLoader = class {
14951
14950
  const isEnoent = error.code === "ENOENT";
14952
14951
  const isAbortError = error instanceof Error && error.name === "AbortError";
14953
14952
  if (!isEnoent && !isAbortError) {
14954
- debugLogger15.error(
14953
+ debugLogger16.error(
14955
14954
  `[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
14956
14955
  error
14957
14956
  );
@@ -15010,7 +15009,7 @@ var FileCommandLoader = class {
15010
15009
  }
15011
15010
  }
15012
15011
  } catch (error) {
15013
- debugLogger15.warn(
15012
+ debugLogger16.warn(
15014
15013
  `Failed to read extension config for ${ext.name}:`,
15015
15014
  error
15016
15015
  );
@@ -15036,7 +15035,7 @@ var FileCommandLoader = class {
15036
15035
  try {
15037
15036
  fileContent = await fs13.readFile(filePath, "utf-8");
15038
15037
  } catch (error) {
15039
- debugLogger15.error(
15038
+ debugLogger16.error(
15040
15039
  `[FileCommandLoader] Failed to read file ${filePath}:`,
15041
15040
  error instanceof Error ? error.message : String(error)
15042
15041
  );
@@ -15046,7 +15045,7 @@ var FileCommandLoader = class {
15046
15045
  try {
15047
15046
  parsed = import_toml.default.parse(fileContent);
15048
15047
  } catch (error) {
15049
- debugLogger15.error(
15048
+ debugLogger16.error(
15050
15049
  `[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
15051
15050
  error instanceof Error ? error.message : String(error)
15052
15051
  );
@@ -15054,7 +15053,7 @@ var FileCommandLoader = class {
15054
15053
  }
15055
15054
  const validationResult = TomlCommandDefSchema.safeParse(parsed);
15056
15055
  if (!validationResult.success) {
15057
- debugLogger15.error(
15056
+ debugLogger16.error(
15058
15057
  `[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
15059
15058
  validationResult.error.flatten()
15060
15059
  );
@@ -15081,7 +15080,7 @@ var FileCommandLoader = class {
15081
15080
  try {
15082
15081
  fileContent = await fs13.readFile(filePath, "utf-8");
15083
15082
  } catch (error) {
15084
- debugLogger15.error(
15083
+ debugLogger16.error(
15085
15084
  `[FileCommandLoader] Failed to read file ${filePath}:`,
15086
15085
  error instanceof Error ? error.message : String(error)
15087
15086
  );
@@ -15091,7 +15090,7 @@ var FileCommandLoader = class {
15091
15090
  try {
15092
15091
  parsed = parseMarkdownCommand(fileContent);
15093
15092
  } catch (error) {
15094
- debugLogger15.error(
15093
+ debugLogger16.error(
15095
15094
  `[FileCommandLoader] Failed to parse Markdown file ${filePath}:`,
15096
15095
  error instanceof Error ? error.message : String(error)
15097
15096
  );
@@ -15099,7 +15098,7 @@ var FileCommandLoader = class {
15099
15098
  }
15100
15099
  const validationResult = MarkdownCommandDefSchema.safeParse(parsed);
15101
15100
  if (!validationResult.success) {
15102
- debugLogger15.error(
15101
+ debugLogger16.error(
15103
15102
  `[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
15104
15103
  validationResult.error.flatten()
15105
15104
  );
@@ -15125,7 +15124,7 @@ var FileCommandLoader = class {
15125
15124
 
15126
15125
  // packages/cli/src/services/saved-workflow-loader.ts
15127
15126
  init_esbuild_shims();
15128
- var debugLogger16 = createDebugLogger("SavedWorkflowLoader");
15127
+ var debugLogger17 = createDebugLogger("SavedWorkflowLoader");
15129
15128
  var SavedWorkflowLoader = class {
15130
15129
  constructor(config) {
15131
15130
  this.config = config;
@@ -15144,7 +15143,7 @@ var SavedWorkflowLoader = class {
15144
15143
  try {
15145
15144
  entries = await listSavedWorkflows(this.config);
15146
15145
  } catch (e) {
15147
- debugLogger16.debug(`listSavedWorkflows failed: ${e}`);
15146
+ debugLogger17.debug(`listSavedWorkflows failed: ${e}`);
15148
15147
  return [];
15149
15148
  }
15150
15149
  if (signal.aborted) return [];
@@ -15460,7 +15459,7 @@ var McpPromptLoader = class {
15460
15459
  // packages/cli/src/services/SkillCommandLoader.ts
15461
15460
  init_esbuild_shims();
15462
15461
  import { dirname as dirname3 } from "node:path";
15463
- var debugLogger17 = createDebugLogger("SKILL_COMMAND_LOADER");
15462
+ var debugLogger18 = createDebugLogger("SKILL_COMMAND_LOADER");
15464
15463
  async function recordAutoSkillCommandUsage(config, command) {
15465
15464
  const detail = command.skillDetail;
15466
15465
  if (!config || detail?.level !== "project" || !detail.filePath) {
@@ -15473,7 +15472,7 @@ async function recordAutoSkillCommandUsage(config, command) {
15473
15472
  filePath: detail.filePath
15474
15473
  });
15475
15474
  } catch (error) {
15476
- debugLogger17.warn(
15475
+ debugLogger18.warn(
15477
15476
  `Failed to record auto-skill command usage: ${error instanceof Error ? error.message : String(error)}`
15478
15477
  );
15479
15478
  }
@@ -15488,12 +15487,12 @@ var SkillCommandLoader = class {
15488
15487
  }
15489
15488
  async loadCommands(_signal) {
15490
15489
  if (this.config?.getBareMode?.()) {
15491
- debugLogger17.debug("Bare mode enabled, skipping skill commands");
15490
+ debugLogger18.debug("Bare mode enabled, skipping skill commands");
15492
15491
  return [];
15493
15492
  }
15494
15493
  const skillManager = this.config?.getSkillManager();
15495
15494
  if (!skillManager) {
15496
- debugLogger17.debug("SkillManager not available, skipping skill commands");
15495
+ debugLogger18.debug("SkillManager not available, skipping skill commands");
15497
15496
  return [];
15498
15497
  }
15499
15498
  try {
@@ -15510,7 +15509,7 @@ var SkillCommandLoader = class {
15510
15509
  const nonUserInvocableCount = visibleSkills.filter(
15511
15510
  (skill) => skill.userInvocable === false
15512
15511
  ).length;
15513
- debugLogger17.debug(
15512
+ debugLogger18.debug(
15514
15513
  `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`
15515
15514
  );
15516
15515
  return visibleSkills.map((skill) => {
@@ -15567,52 +15566,12 @@ var SkillCommandLoader = class {
15567
15566
  };
15568
15567
  });
15569
15568
  } catch (error) {
15570
- debugLogger17.error("Failed to load skill commands:", error);
15569
+ debugLogger18.error("Failed to load skill commands:", error);
15571
15570
  return [];
15572
15571
  }
15573
15572
  }
15574
15573
  };
15575
15574
 
15576
- // packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
15577
- init_esbuild_shims();
15578
- function createNonInteractiveUI() {
15579
- return {
15580
- history: [],
15581
- addItem: /* @__PURE__ */ __name((_item, _timestamp) => 0, "addItem"),
15582
- clear: /* @__PURE__ */ __name(() => {
15583
- }, "clear"),
15584
- setDebugMessage: /* @__PURE__ */ __name((_message) => {
15585
- }, "setDebugMessage"),
15586
- loadHistory: /* @__PURE__ */ __name((_newHistory) => {
15587
- }, "loadHistory"),
15588
- refreshStatic: /* @__PURE__ */ __name(() => {
15589
- }, "refreshStatic"),
15590
- pendingItem: null,
15591
- setPendingItem: /* @__PURE__ */ __name((_item) => {
15592
- }, "setPendingItem"),
15593
- btwItem: null,
15594
- setBtwItem: /* @__PURE__ */ __name((_item) => {
15595
- }, "setBtwItem"),
15596
- cancelBtw: /* @__PURE__ */ __name(() => {
15597
- }, "cancelBtw"),
15598
- btwAbortControllerRef: { current: null },
15599
- isIdleRef: { current: true },
15600
- toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
15601
- setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
15602
- }, "setGeminiMdFileCount"),
15603
- reloadCommands: /* @__PURE__ */ __name(() => {
15604
- }, "reloadCommands"),
15605
- setSessionName: /* @__PURE__ */ __name(() => {
15606
- }, "setSessionName"),
15607
- extensionsUpdateState: /* @__PURE__ */ new Map(),
15608
- dispatchExtensionStateUpdate: /* @__PURE__ */ __name((_action) => {
15609
- }, "dispatchExtensionStateUpdate"),
15610
- addConfirmUpdateExtensionRequest: /* @__PURE__ */ __name((_request) => {
15611
- }, "addConfirmUpdateExtensionRequest")
15612
- };
15613
- }
15614
- __name(createNonInteractiveUI, "createNonInteractiveUI");
15615
-
15616
15575
  // packages/cli/src/utils/userPromptExpansionHook.ts
15617
15576
  init_esbuild_shims();
15618
15577
  function appendUserPromptExpansionAdditionalContext(content, additionalContext) {
@@ -15641,722 +15600,6 @@ function formatUserPromptExpansionBlockedMessage(reason) {
15641
15600
  }
15642
15601
  __name(formatUserPromptExpansionBlockedMessage, "formatUserPromptExpansionBlockedMessage");
15643
15602
 
15644
- // packages/cli/src/nonInteractiveCliCommands.ts
15645
- var debugLogger18 = createDebugLogger("NON_INTERACTIVE_COMMANDS");
15646
- function getSkillCommandName(command) {
15647
- return command.skillDetail?.name ?? command.name;
15648
- }
15649
- __name(getSkillCommandName, "getSkillCommandName");
15650
- function handleCommandResult(result, outputHistoryItems) {
15651
- switch (result.type) {
15652
- case "submit_prompt":
15653
- return {
15654
- type: "submit_prompt",
15655
- content: result.content,
15656
- ...result.modelOverride ? { modelOverride: result.modelOverride } : {},
15657
- ...result.refreshContextFilesOnWrite ? { refreshContextFilesOnWrite: true } : {},
15658
- ...outputHistoryItems?.length ? { outputHistoryItems } : {}
15659
- };
15660
- case "message":
15661
- return {
15662
- type: "message",
15663
- messageType: result.messageType,
15664
- content: result.content,
15665
- ...outputHistoryItems?.length ? { outputHistoryItems } : {}
15666
- };
15667
- case "stream_messages":
15668
- return {
15669
- type: "stream_messages",
15670
- messages: result.messages
15671
- };
15672
- case "goal_control":
15673
- return {
15674
- type: "goal_control",
15675
- operation: result.operation,
15676
- response: result.response
15677
- };
15678
- /**
15679
- * Currently return types below are never generated due to the
15680
- * whitelist of allowed slash commands in ACP and non-interactive mode.
15681
- * We'll try to add more supported return types in the future.
15682
- */
15683
- case "tool":
15684
- return {
15685
- type: "unsupported",
15686
- reason: "Tool execution from slash commands is not supported in non-interactive mode.",
15687
- originalType: "tool"
15688
- };
15689
- case "quit":
15690
- return {
15691
- type: "unsupported",
15692
- reason: "Quit command is not supported in non-interactive mode. The process will exit naturally after completion.",
15693
- originalType: "quit"
15694
- };
15695
- case "dialog":
15696
- return {
15697
- type: "unsupported",
15698
- reason: `Dialog '${result.dialog}' cannot be opened in non-interactive mode.`,
15699
- originalType: "dialog"
15700
- };
15701
- case "load_history":
15702
- return {
15703
- type: "unsupported",
15704
- reason: "Loading history is not supported in non-interactive mode. Each invocation starts with a fresh context.",
15705
- originalType: "load_history"
15706
- };
15707
- case "confirm_shell_commands":
15708
- return {
15709
- type: "unsupported",
15710
- reason: "Shell command confirmation is not supported in non-interactive mode. Use YOLO mode or pre-approve commands.",
15711
- originalType: "confirm_shell_commands"
15712
- };
15713
- case "confirm_action":
15714
- return {
15715
- type: "unsupported",
15716
- reason: "Action confirmation is not supported in non-interactive mode. Commands requiring confirmation cannot be executed.",
15717
- originalType: "confirm_action"
15718
- };
15719
- default: {
15720
- const _exhaustive = result;
15721
- return {
15722
- type: "unsupported",
15723
- reason: `Unknown command result type: ${_exhaustive.type}`,
15724
- originalType: "unknown"
15725
- };
15726
- }
15727
- }
15728
- }
15729
- __name(handleCommandResult, "handleCommandResult");
15730
- async function fireUserPromptExpansionHook(config, commandName, commandArgs, content, signal) {
15731
- if (config.getDisableAllHooks?.() || !(config.hasHooksForEvent?.("UserPromptExpansion") ?? false)) {
15732
- return { content };
15733
- }
15734
- const hookSystem = config.getHookSystem();
15735
- if (!hookSystem) {
15736
- return { content };
15737
- }
15738
- const output = await hookSystem.fireUserPromptExpansionEvent(
15739
- commandName,
15740
- commandArgs,
15741
- serializeUserPromptExpansionPrompt(content),
15742
- signal
15743
- );
15744
- if (!output) {
15745
- return { content };
15746
- }
15747
- const blockingError = output.getBlockingError();
15748
- if (blockingError.blocked || output.shouldStopExecution()) {
15749
- return {
15750
- blockedResult: {
15751
- type: "message",
15752
- messageType: "error",
15753
- content: formatUserPromptExpansionBlockedMessage(
15754
- blockingError.reason || output.getEffectiveReason()
15755
- )
15756
- },
15757
- content
15758
- };
15759
- }
15760
- return {
15761
- content: appendUserPromptExpansionAdditionalContext(
15762
- content,
15763
- output.getAdditionalContext()
15764
- )
15765
- };
15766
- }
15767
- __name(fireUserPromptExpansionHook, "fireUserPromptExpansionHook");
15768
- async function registerModelInvocableCommands(commandService, config, executionMode, settings) {
15769
- if (!settings) {
15770
- return;
15771
- }
15772
- config.setModelInvocableCommandsProvider(
15773
- () => commandService.getModelInvocableCommands().map((cmd) => ({
15774
- name: cmd.name,
15775
- description: cmd.modelDescription ?? cmd.description
15776
- }))
15777
- );
15778
- config.setModelInvocableCommandsExecutor(
15779
- async (name, args = "") => {
15780
- const commands = commandService.getModelInvocableCommands();
15781
- const cmd = commands.find((c) => c.name === name);
15782
- if (!cmd?.action) return null;
15783
- const minimalContext = {
15784
- executionMode,
15785
- invocation: {
15786
- raw: args ? `/${name} ${args}` : `/${name}`,
15787
- name,
15788
- args
15789
- },
15790
- services: { config, settings, logger: null }
15791
- };
15792
- const result = await cmd.action(minimalContext, args);
15793
- if (!result || result.type !== "submit_prompt") return null;
15794
- const hookSignal = new AbortController().signal;
15795
- const hookResult = await fireUserPromptExpansionHook(
15796
- config,
15797
- name,
15798
- args,
15799
- result.content,
15800
- hookSignal
15801
- );
15802
- if (hookResult.blockedResult) {
15803
- return hookResult.blockedResult.type === "message" ? { error: hookResult.blockedResult.content } : null;
15804
- }
15805
- const content = hookResult.content;
15806
- if (typeof content === "string") return content;
15807
- if (Array.isArray(content)) {
15808
- return content.map(
15809
- (p) => typeof p === "string" ? p : p.text ?? ""
15810
- ).join("");
15811
- }
15812
- return null;
15813
- }
15814
- );
15815
- const skillManager = typeof config.getSkillManager === "function" ? config.getSkillManager() : null;
15816
- await skillManager?.notifyConfigChanged();
15817
- }
15818
- __name(registerModelInvocableCommands, "registerModelInvocableCommands");
15819
- var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config, settings) => {
15820
- const trimmed = rawQuery.trim();
15821
- if (!trimmed.startsWith("/")) {
15822
- return { type: "no_command" };
15823
- }
15824
- const isAcpMode = config.getExperimentalZedIntegration();
15825
- const isInteractive = config.isInteractive();
15826
- const executionMode = isAcpMode ? "acp" : isInteractive ? "interactive" : "non_interactive";
15827
- const allLoaders = [
15828
- new McpPromptLoader(config),
15829
- new BuiltinCommandLoader(config),
15830
- new BundledSkillLoader(config),
15831
- new SkillCommandLoader(config),
15832
- new SavedWorkflowLoader(config),
15833
- new FileCommandLoader(config)
15834
- ];
15835
- const disabledSlashCommandsRaw = config.getDisabledSlashCommands();
15836
- const disabledNameSet = /* @__PURE__ */ new Set();
15837
- for (const name of disabledSlashCommandsRaw) {
15838
- const trimmed2 = name.trim();
15839
- if (trimmed2) disabledNameSet.add(trimmed2.toLowerCase());
15840
- }
15841
- const isDisabled = /* @__PURE__ */ __name((cmd) => disabledNameSet.has(cmd.name.toLowerCase()) || (cmd.altNames ?? []).some((a) => disabledNameSet.has(a.toLowerCase())), "isDisabled");
15842
- const allCommandService = await CommandService.create(
15843
- allLoaders,
15844
- abortController.signal
15845
- );
15846
- const commandService = disabledNameSet.size > 0 ? await CommandService.create(
15847
- allLoaders,
15848
- abortController.signal,
15849
- disabledNameSet
15850
- ) : allCommandService;
15851
- await registerModelInvocableCommands(
15852
- commandService,
15853
- config,
15854
- executionMode,
15855
- settings
15856
- );
15857
- const allCommands = allCommandService.getCommands();
15858
- const filteredCommands = commandService.getCommandsForMode(executionMode).filter((cmd) => !isDisabled(cmd));
15859
- const { commandToExecute, args } = parseSlashCommand(
15860
- rawQuery,
15861
- filteredCommands
15862
- );
15863
- const stackedResult = parseStackedSlashCommands(rawQuery, filteredCommands);
15864
- if (stackedResult.skills.length >= 2) {
15865
- const combinedContent = [];
15866
- let firstModelOverride;
15867
- let refreshContextFilesOnWrite = false;
15868
- const onCompleteCallbacks = [];
15869
- const successfulSkillCommands = [];
15870
- for (const skill of stackedResult.skills) {
15871
- if (!skill.action) continue;
15872
- const skillContext = {
15873
- executionMode,
15874
- invocation: {
15875
- raw: `/${skill.name}`,
15876
- name: skill.name,
15877
- args: ""
15878
- },
15879
- services: { config, settings, logger: null }
15880
- };
15881
- const skillResult = await skill.action(skillContext, "");
15882
- if (skillResult?.type === "submit_prompt") {
15883
- combinedContent.push(skillResult.content);
15884
- firstModelOverride ??= skillResult.modelOverride;
15885
- refreshContextFilesOnWrite ||= Boolean(
15886
- skillResult.refreshContextFilesOnWrite
15887
- );
15888
- if (skillResult.onComplete) {
15889
- onCompleteCallbacks.push(skillResult.onComplete);
15890
- }
15891
- }
15892
- const succeeded = skillResult?.type === "submit_prompt";
15893
- recordSkillInvocation(config, {
15894
- skillName: getSkillCommandName(skill),
15895
- success: succeeded
15896
- });
15897
- if (succeeded) {
15898
- successfulSkillCommands.push(skill);
15899
- }
15900
- }
15901
- if (stackedResult.remainingText) {
15902
- combinedContent.push([{ text: stackedResult.remainingText }]);
15903
- }
15904
- const mergedContent = combinedContent.flat();
15905
- const hookResult = await fireUserPromptExpansionHook(
15906
- config,
15907
- stackedResult.skills.map((s) => s.name).join(" "),
15908
- stackedResult.remainingText,
15909
- mergedContent,
15910
- abortController.signal
15911
- );
15912
- if (hookResult.blockedResult) {
15913
- return hookResult.blockedResult;
15914
- }
15915
- for (const skill of successfulSkillCommands) {
15916
- void recordAutoSkillCommandUsage(config, skill);
15917
- }
15918
- return {
15919
- type: "submit_prompt",
15920
- content: hookResult.content,
15921
- ...firstModelOverride ? { modelOverride: firstModelOverride } : {},
15922
- ...refreshContextFilesOnWrite ? { refreshContextFilesOnWrite: true } : {},
15923
- ...onCompleteCallbacks.length ? {
15924
- onComplete: /* @__PURE__ */ __name(async () => {
15925
- for (const cb of onCompleteCallbacks) await cb();
15926
- }, "onComplete")
15927
- } : {}
15928
- };
15929
- }
15930
- if (!commandToExecute) {
15931
- const { commandToExecute: knownCommand } = parseSlashCommand(
15932
- rawQuery,
15933
- allCommands
15934
- );
15935
- if (knownCommand) {
15936
- const typedToken = rawQuery.trim().substring(1).trim().split(/\s+/)[0] ?? knownCommand.name;
15937
- if (isDisabled(knownCommand)) {
15938
- return {
15939
- type: "unsupported",
15940
- reason: t(
15941
- 'The command "/{{command}}" is disabled by the current configuration.',
15942
- { command: typedToken }
15943
- ),
15944
- originalType: "filtered_command"
15945
- };
15946
- }
15947
- return {
15948
- type: "unsupported",
15949
- reason: t('The command "/{{command}}" is not supported in this mode.', {
15950
- command: typedToken
15951
- }),
15952
- originalType: "filtered_command"
15953
- };
15954
- }
15955
- return { type: "no_command" };
15956
- }
15957
- if (!commandToExecute.action) {
15958
- return { type: "no_command" };
15959
- }
15960
- const sessionStats = {
15961
- sessionId: config?.getSessionId(),
15962
- sessionStartTime: /* @__PURE__ */ new Date(),
15963
- metrics: config ? uiTelemetryService.getMetricsForSession(config.getSessionId()) : uiTelemetryService.getMetrics(),
15964
- lastPromptTokenCount: 0,
15965
- promptCount: 1
15966
- };
15967
- const logger3 = new Logger(config?.getSessionId() || "", config?.storage);
15968
- const outputHistoryItems = [];
15969
- const ui = createNonInteractiveUI();
15970
- ui.addItem = (item) => {
15971
- outputHistoryItems.push(item);
15972
- return 0;
15973
- };
15974
- const context = {
15975
- executionMode,
15976
- services: {
15977
- config,
15978
- settings,
15979
- logger: logger3
15980
- },
15981
- ui,
15982
- session: {
15983
- stats: sessionStats,
15984
- sessionShellAllowlist: /* @__PURE__ */ new Set()
15985
- },
15986
- invocation: {
15987
- raw: trimmed,
15988
- name: commandToExecute.name,
15989
- args
15990
- }
15991
- };
15992
- const isSkillCommand = commandToExecute.kind === "skill" /* SKILL */;
15993
- let skillInvocationRecorded = false;
15994
- const recordSkillCommandInvocation = /* @__PURE__ */ __name((success) => {
15995
- if (!isSkillCommand || skillInvocationRecorded) {
15996
- return;
15997
- }
15998
- recordSkillInvocation(config, {
15999
- skillName: getSkillCommandName(commandToExecute),
16000
- success
16001
- });
16002
- skillInvocationRecorded = true;
16003
- }, "recordSkillCommandInvocation");
16004
- let result;
16005
- try {
16006
- result = await commandToExecute.action(context, args);
16007
- } catch (error) {
16008
- recordSkillCommandInvocation(false);
16009
- throw error;
16010
- }
16011
- if (!result) {
16012
- return {
16013
- type: "message",
16014
- messageType: "info",
16015
- content: "Command executed successfully."
16016
- };
16017
- }
16018
- if (result.type === "submit_prompt") {
16019
- let hookResult;
16020
- try {
16021
- hookResult = await fireUserPromptExpansionHook(
16022
- config,
16023
- commandToExecute.name,
16024
- args,
16025
- result.content,
16026
- abortController.signal
16027
- );
16028
- } catch (error) {
16029
- recordSkillCommandInvocation(false);
16030
- throw error;
16031
- }
16032
- if (hookResult.blockedResult) {
16033
- recordSkillCommandInvocation(false);
16034
- return hookResult.blockedResult;
16035
- }
16036
- recordSkillCommandInvocation(true);
16037
- void recordAutoSkillCommandUsage(config, commandToExecute);
16038
- return handleCommandResult(
16039
- { ...result, content: hookResult.content },
16040
- outputHistoryItems
16041
- );
16042
- }
16043
- return handleCommandResult(result, outputHistoryItems);
16044
- }, "handleSlashCommand");
16045
- var getAvailableCommands = /* @__PURE__ */ __name(async (config, abortSignal, mode = "acp", settings) => {
16046
- try {
16047
- const loaders = [
16048
- new McpPromptLoader(config),
16049
- new BuiltinCommandLoader(config),
16050
- new BundledSkillLoader(config),
16051
- new SkillCommandLoader(config),
16052
- new SavedWorkflowLoader(config),
16053
- new FileCommandLoader(config)
16054
- ];
16055
- const disabledSlashCommands = config.getDisabledSlashCommands();
16056
- const commandService = await CommandService.create(
16057
- loaders,
16058
- abortSignal,
16059
- disabledSlashCommands.length > 0 ? new Set(disabledSlashCommands) : void 0
16060
- );
16061
- await registerModelInvocableCommands(
16062
- commandService,
16063
- config,
16064
- mode,
16065
- settings
16066
- );
16067
- return commandService.getCommandsForMode(mode);
16068
- } catch (error) {
16069
- debugLogger18.error("Error loading available commands:", error);
16070
- return [];
16071
- }
16072
- }, "getAvailableCommands");
16073
-
16074
- // packages/cli/src/utils/nonInteractiveHelpers.ts
16075
- init_esbuild_shims();
16076
- var debugLogger19 = createDebugLogger("NON_INTERACTIVE");
16077
- function normalizePartList(parts) {
16078
- if (!parts) {
16079
- return [];
16080
- }
16081
- if (typeof parts === "string") {
16082
- return [{ text: parts }];
16083
- }
16084
- if (Array.isArray(parts)) {
16085
- return parts.map(
16086
- (part) => typeof part === "string" ? { text: part } : part
16087
- );
16088
- }
16089
- return [parts];
16090
- }
16091
- __name(normalizePartList, "normalizePartList");
16092
- function extractPartsFromUserMessage(message2) {
16093
- if (!message2) {
16094
- return null;
16095
- }
16096
- const content = message2.message?.content;
16097
- if (typeof content === "string") {
16098
- return content;
16099
- }
16100
- if (Array.isArray(content)) {
16101
- const parts = [];
16102
- for (const block of content) {
16103
- if (!block || typeof block !== "object" || !("type" in block)) {
16104
- continue;
16105
- }
16106
- if (block.type === "text" && "text" in block && block.text) {
16107
- parts.push({ text: block.text });
16108
- } else {
16109
- parts.push({ text: JSON.stringify(block) });
16110
- }
16111
- }
16112
- return parts.length > 0 ? parts : null;
16113
- }
16114
- return null;
16115
- }
16116
- __name(extractPartsFromUserMessage, "extractPartsFromUserMessage");
16117
- function computeUsageFromMetrics(metrics) {
16118
- const stats = computeSessionStats(metrics);
16119
- const { models } = metrics;
16120
- const totalOutputTokens = Object.values(models).reduce(
16121
- (acc, model) => acc + model.tokens.candidates,
16122
- 0
16123
- );
16124
- const totalTokens = Object.values(models).reduce(
16125
- (acc, model) => acc + model.tokens.total,
16126
- 0
16127
- );
16128
- const usage2 = {
16129
- input_tokens: stats.totalPromptTokens,
16130
- output_tokens: totalOutputTokens,
16131
- cache_read_input_tokens: stats.totalCachedTokens
16132
- };
16133
- if (totalTokens > 0) {
16134
- usage2.total_tokens = totalTokens;
16135
- }
16136
- return usage2;
16137
- }
16138
- __name(computeUsageFromMetrics, "computeUsageFromMetrics");
16139
- function buildInitialSystemReminders(config) {
16140
- const reminders = [];
16141
- if (config.getApprovalMode() === "plan" /* PLAN */) {
16142
- reminders.push({ text: getPlanModeSystemReminder(config.getSdkMode?.()) });
16143
- }
16144
- const arenaManager = config.getArenaManager?.();
16145
- if (arenaManager) {
16146
- try {
16147
- const sessionDir = arenaManager.getArenaSessionDir();
16148
- const configPath = `${sessionDir}/config.json`;
16149
- reminders.push({ text: getArenaSystemReminder(configPath) });
16150
- } catch {
16151
- }
16152
- }
16153
- return reminders;
16154
- }
16155
- __name(buildInitialSystemReminders, "buildInitialSystemReminders");
16156
- function insertAfterFunctionResponses(parts, additions) {
16157
- const firstNonFunctionResponse = parts.findIndex(
16158
- (part) => !part.functionResponse
16159
- );
16160
- const insertAt = firstNonFunctionResponse === -1 ? parts.length : firstNonFunctionResponse;
16161
- return [...parts.slice(0, insertAt), ...additions, ...parts.slice(insertAt)];
16162
- }
16163
- __name(insertAfterFunctionResponses, "insertAfterFunctionResponses");
16164
- async function loadSlashCommandNames(config) {
16165
- const controller = new AbortController();
16166
- try {
16167
- const commands = await getAvailableCommands(
16168
- config,
16169
- controller.signal,
16170
- "non_interactive"
16171
- );
16172
- return commands.map((cmd) => cmd.name).sort();
16173
- } catch (error) {
16174
- debugLogger19.error(
16175
- "[buildSystemMessage] Failed to load slash commands:",
16176
- error
16177
- );
16178
- return [];
16179
- } finally {
16180
- controller.abort();
16181
- }
16182
- }
16183
- __name(loadSlashCommandNames, "loadSlashCommandNames");
16184
- async function buildSystemMessage(config, sessionId, permissionMode) {
16185
- const toolRegistry = config.getToolRegistry();
16186
- const tools = toolRegistry ? toolRegistry.getAllToolNames() : [];
16187
- const mcpServers = config.getMcpServers();
16188
- const mcpServerList = mcpServers ? Object.keys(mcpServers).map((name) => ({
16189
- name,
16190
- status: getMCPServerStatus(name)
16191
- })) : [];
16192
- const slashCommands = await loadSlashCommandNames(config);
16193
- let agentNames = [];
16194
- try {
16195
- const subagentManager = config.getSubagentManager();
16196
- const subagents = await subagentManager.listSubagents();
16197
- agentNames = subagents.map((subagent) => subagent.name);
16198
- } catch (error) {
16199
- debugLogger19.error("[buildSystemMessage] Failed to load subagents:", error);
16200
- }
16201
- const systemMessage = {
16202
- type: "system",
16203
- subtype: "init",
16204
- uuid: sessionId,
16205
- session_id: sessionId,
16206
- cwd: config.getTargetDir(),
16207
- tools,
16208
- mcp_servers: mcpServerList,
16209
- model: config.getModel(),
16210
- permission_mode: permissionMode,
16211
- slash_commands: slashCommands,
16212
- qwen_code_version: config.getCliVersion() || "unknown",
16213
- agents: agentNames
16214
- };
16215
- return systemMessage;
16216
- }
16217
- __name(buildSystemMessage, "buildSystemMessage");
16218
- function isMcpToolProgressData(output) {
16219
- return typeof output === "object" && output !== null && "type" in output && output.type === "mcp_tool_progress";
16220
- }
16221
- __name(isMcpToolProgressData, "isMcpToolProgressData");
16222
- function createToolProgressHandler(request, adapter) {
16223
- const handler = /* @__PURE__ */ __name((_callId, output) => {
16224
- if (isMcpToolProgressData(output) || isShellProgressData(output)) {
16225
- adapter.emitToolProgress(request, output);
16226
- }
16227
- }, "handler");
16228
- return { handler };
16229
- }
16230
- __name(createToolProgressHandler, "createToolProgressHandler");
16231
- function createAgentToolProgressHandler(config, agentToolCallId, adapter) {
16232
- const previousTaskStates = /* @__PURE__ */ new Map();
16233
- const emittedToolUseIds = /* @__PURE__ */ new Set();
16234
- const emittedToolResultIds = /* @__PURE__ */ new Set();
16235
- const buildRequest = /* @__PURE__ */ __name((toolCall) => ({
16236
- callId: toolCall.callId,
16237
- name: toolCall.name,
16238
- args: toolCall.args || {},
16239
- isClientInitiated: true,
16240
- prompt_id: "",
16241
- response_id: void 0
16242
- }), "buildRequest");
16243
- const buildResponse = /* @__PURE__ */ __name((toolCall) => ({
16244
- callId: toolCall.callId,
16245
- error: toolCall.status === "failed" ? new Error(toolCall.error || "Tool execution failed") : void 0,
16246
- errorType: toolCall.status === "failed" ? "execution_failed" /* EXECUTION_FAILED */ : void 0,
16247
- resultDisplay: toolCall.resultDisplay,
16248
- responseParts: toolCall.responseParts || []
16249
- }), "buildResponse");
16250
- const hasResultContent = /* @__PURE__ */ __name((toolCall) => {
16251
- if (typeof toolCall.resultDisplay === "string" && toolCall.resultDisplay.trim().length > 0) {
16252
- return true;
16253
- }
16254
- if (toolCall.responseParts && toolCall.responseParts.length > 0) {
16255
- return true;
16256
- }
16257
- return toolCall.status === "failed";
16258
- }, "hasResultContent");
16259
- const emitToolUseIfNeeded = /* @__PURE__ */ __name((toolCall, fallbackStatus) => {
16260
- if (emittedToolUseIds.has(toolCall.callId)) {
16261
- return;
16262
- }
16263
- const toolCallToEmit = fallbackStatus ? {
16264
- ...toolCall,
16265
- status: fallbackStatus
16266
- } : toolCall;
16267
- if (toolCallToEmit.status === "executing" || toolCallToEmit.status === "awaiting_approval") {
16268
- if (adapter.processSubagentToolCall) {
16269
- adapter.processSubagentToolCall(toolCallToEmit, agentToolCallId);
16270
- emittedToolUseIds.add(toolCall.callId);
16271
- }
16272
- }
16273
- }, "emitToolUseIfNeeded");
16274
- const emitToolResultIfNeeded = /* @__PURE__ */ __name((toolCall) => {
16275
- if (emittedToolResultIds.has(toolCall.callId)) {
16276
- return;
16277
- }
16278
- if (!hasResultContent(toolCall)) {
16279
- return;
16280
- }
16281
- emittedToolResultIds.add(toolCall.callId);
16282
- const request = buildRequest(toolCall);
16283
- const response = buildResponse(toolCall);
16284
- if ("emitToolResult" in adapter && typeof adapter.emitToolResult === "function") {
16285
- adapter.emitToolResult(request, response, agentToolCallId);
16286
- } else {
16287
- adapter.emitToolResult(request, response);
16288
- }
16289
- }, "emitToolResultIfNeeded");
16290
- const processToolCall = /* @__PURE__ */ __name((toolCall, previousCall) => {
16291
- const isCompleted = toolCall.status === "success" || toolCall.status === "failed";
16292
- const isExecuting = toolCall.status === "executing" || toolCall.status === "awaiting_approval";
16293
- const wasExecuting = previousCall && (previousCall.status === "executing" || previousCall.status === "awaiting_approval");
16294
- if (isExecuting) {
16295
- emitToolUseIfNeeded(toolCall);
16296
- } else if (isCompleted && !emittedToolUseIds.has(toolCall.callId)) {
16297
- emitToolUseIfNeeded(toolCall, "executing");
16298
- } else if (wasExecuting && isCompleted) {
16299
- emitToolUseIfNeeded(toolCall, "executing");
16300
- }
16301
- if (isCompleted) {
16302
- emitToolResultIfNeeded(toolCall);
16303
- }
16304
- }, "processToolCall");
16305
- const outputUpdateHandler = /* @__PURE__ */ __name((callId, outputChunk) => {
16306
- if (typeof outputChunk === "object" && outputChunk !== null && "type" in outputChunk && outputChunk.type === "task_execution") {
16307
- const taskDisplay = outputChunk;
16308
- const previous = previousTaskStates.get(callId);
16309
- if (!adapter.processSubagentToolCall || !adapter.emitSubagentErrorResult) {
16310
- previousTaskStates.set(callId, taskDisplay);
16311
- return;
16312
- }
16313
- if (taskDisplay.toolCalls) {
16314
- if (!previous || !previous.toolCalls) {
16315
- for (const toolCall of taskDisplay.toolCalls) {
16316
- processToolCall(toolCall);
16317
- }
16318
- } else {
16319
- for (const toolCall of taskDisplay.toolCalls) {
16320
- const previousCall = previous.toolCalls.find(
16321
- (tc) => tc.callId === toolCall.callId
16322
- );
16323
- processToolCall(toolCall, previousCall);
16324
- }
16325
- }
16326
- }
16327
- if (taskDisplay.status === "failed" || taskDisplay.status === "cancelled") {
16328
- const previousStatus = previous?.status;
16329
- if (previousStatus !== "failed" && previousStatus !== "cancelled" && previousStatus !== void 0) {
16330
- const errorMessage2 = taskDisplay.terminateReason || (taskDisplay.status === "cancelled" ? "Task was cancelled" : "Task execution failed");
16331
- adapter.emitSubagentErrorResult(errorMessage2, 0, agentToolCallId);
16332
- }
16333
- }
16334
- if (!previous && taskDisplay.taskPrompt && !config.isInteractive() && (config.getOutputFormat() === "json" /* JSON */ || config.getOutputFormat() === "stream-json" /* STREAM_JSON */)) {
16335
- adapter.emitUserMessage(
16336
- [{ text: taskDisplay.taskPrompt }],
16337
- agentToolCallId
16338
- );
16339
- }
16340
- previousTaskStates.set(callId, taskDisplay);
16341
- }
16342
- }, "outputUpdateHandler");
16343
- return {
16344
- handler: outputUpdateHandler
16345
- };
16346
- }
16347
- __name(createAgentToolProgressHandler, "createAgentToolProgressHandler");
16348
- function functionResponsePartsToString(parts) {
16349
- return parts.map((part) => {
16350
- if ("functionResponse" in part) {
16351
- const response = part.functionResponse?.response;
16352
- const content = response?.["output"] ?? response?.["error"] ?? "";
16353
- return content;
16354
- }
16355
- return JSON.stringify(part);
16356
- }).join("");
16357
- }
16358
- __name(functionResponsePartsToString, "functionResponsePartsToString");
16359
-
16360
15603
  export {
16361
15604
  MAX_STACKED_SKILLS,
16362
15605
  isStackedSkillCompletableCommand,
@@ -16378,12 +15621,14 @@ export {
16378
15621
  findMidInputSlashCommand,
16379
15622
  getBestSlashCommandMatch,
16380
15623
  findSlashCommandTokens,
15624
+ formatEffortChangeMessage,
16381
15625
  getTranslatedSourceDisplayMap,
16382
15626
  DISPLAY_HOOK_EVENTS,
16383
15627
  supportsMatchers,
16384
15628
  createEmptyHookEventInfo,
16385
15629
  addConfigToMatcherGroup,
16386
15630
  getAllConfigs,
15631
+ isPickerOnlyModelInvocation,
16387
15632
  refreshExtensionContentRuntime,
16388
15633
  dayKey,
16389
15634
  parseDayKey,
@@ -16396,18 +15641,7 @@ export {
16396
15641
  SkillCommandLoader,
16397
15642
  appendUserPromptExpansionAdditionalContext,
16398
15643
  serializeUserPromptExpansionPrompt,
16399
- formatUserPromptExpansionBlockedMessage,
16400
- handleSlashCommand,
16401
- getAvailableCommands,
16402
- normalizePartList,
16403
- extractPartsFromUserMessage,
16404
- computeUsageFromMetrics,
16405
- buildInitialSystemReminders,
16406
- insertAfterFunctionResponses,
16407
- buildSystemMessage,
16408
- createToolProgressHandler,
16409
- createAgentToolProgressHandler,
16410
- functionResponsePartsToString
15644
+ formatUserPromptExpansionBlockedMessage
16411
15645
  };
16412
15646
  /**
16413
15647
  * @license