@qwen-code/qwen-code 0.21.10 → 0.21.11-nightly.20260815.c396fe3d12

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 (386) 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/configuration/settings.md +10 -0
  4. package/bundled/qc-helper/docs/extension/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/extension/agent-plugins.md +50 -0
  6. package/bundled/qc-helper/docs/extension/extension-releasing.md +3 -3
  7. package/bundled/qc-helper/docs/extension/introduction.md +17 -3
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  9. package/bundled/qc-helper/docs/features/arena.md +4 -3
  10. package/bundled/qc-helper/docs/features/channels/overview.md +1 -1
  11. package/bundled/qc-helper/docs/features/channels/plugins.md +11 -11
  12. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  13. package/bundled/qc-helper/docs/features/commands.md +7 -6
  14. package/bundled/qc-helper/docs/features/dual-output.md +5 -0
  15. package/bundled/qc-helper/docs/features/headless.md +8 -0
  16. package/bundled/qc-helper/docs/features/multi-agent-coordination.md +30 -0
  17. package/bundled/qc-helper/docs/qwen-serve.md +105 -40
  18. package/bundled/review/SKILL.md +72 -43
  19. package/chunks/{MaxSizedBox-FKXYULMW.js → MaxSizedBox-RRYY7LE5.js} +45 -44
  20. package/chunks/{StandaloneSessionPicker-OQS3M7AY.js → StandaloneSessionPicker-CK3O3N7F.js} +68 -67
  21. package/chunks/{acp-startup-profiler-VNTFWYAC.js → acp-startup-profiler-SVPUHLXV.js} +2 -2
  22. package/chunks/{acpAgent-AGS6HLQQ.js → acpAgent-DXUWYWDM.js} +1889 -640
  23. package/chunks/{agent-4NCVO27U.js → agent-DEPG4BP7.js} +42 -41
  24. package/chunks/agent-headless-VLBUWGPP.js +87 -0
  25. package/chunks/{anthropicContentGenerator-D3Y4RFT4.js → anthropicContentGenerator-YDT4EOKO.js} +8 -8
  26. package/chunks/{artifact-tool-N652YE4L.js → artifact-tool-4GCQQDZI.js} +2 -2
  27. package/chunks/{askUserQuestion-ONW74PKJ.js → askUserQuestion-HZJJLR3Z.js} +2 -2
  28. package/chunks/bridge-U7LETTTF.js +104 -0
  29. package/chunks/{ca-ZLKAB4K3.js → ca-4CQ6MYNQ.js} +2 -1
  30. package/chunks/{channel-management-service-PHELKOW2.js → channel-management-service-OADNGQM3.js} +6 -6
  31. package/chunks/channel-settings-store-B2GRIZ2D.js +102 -0
  32. package/chunks/{channel-worker-group-WQP4RCDO.js → channel-worker-group-IHBIHQ45.js} +9 -8
  33. package/chunks/{channel-worker-manager-MRDFAKIM.js → channel-worker-manager-GEHYJ5AE.js} +9 -8
  34. package/chunks/{channel-worker-supervisor-IVSDIMI4.js → channel-worker-supervisor-ZJIIWM4I.js} +7 -6
  35. package/chunks/{chunk-26CXSA6V.js → chunk-25VWCPYE.js} +2 -2
  36. package/chunks/{chunk-DP3IHZGG.js → chunk-2AUM35J5.js} +59 -7
  37. package/chunks/{chunk-URKIBIFC.js → chunk-2QHWLRQ2.js} +3 -3
  38. package/chunks/{chunk-4PYCZH2V.js → chunk-2ZWH53I4.js} +3 -3
  39. package/chunks/{chunk-UVX4Y6IN.js → chunk-3AEKDXKT.js} +1 -1
  40. package/chunks/{chunk-ABVRJU3D.js → chunk-3ER3FWZM.js} +9 -9
  41. package/chunks/{chunk-DZUO626D.js → chunk-3GM5DLBI.js} +3 -3
  42. package/chunks/{chunk-VSFKIRRW.js → chunk-3NBTNFNC.js} +4 -4
  43. package/chunks/{chunk-NEOXOWYH.js → chunk-3QZY3JSR.js} +7 -7
  44. package/chunks/{chunk-BKHCW2BI.js → chunk-3VUENPWF.js} +10 -0
  45. package/chunks/{chunk-67EWJE77.js → chunk-45NQKMYB.js} +1 -1
  46. package/chunks/{chunk-KKBPOU75.js → chunk-4AOVQPJU.js} +1 -1
  47. package/chunks/{chunk-OONWZLFK.js → chunk-4EB5GRRC.js} +4 -4
  48. package/chunks/{chunk-YGT2AUJ7.js → chunk-4KM2SYK5.js} +39 -19
  49. package/chunks/{chunk-Y3OVRWRY.js → chunk-4N4JVRZA.js} +1 -1
  50. package/chunks/{chunk-VNNWAZSI.js → chunk-56HVDG3M.js} +6 -6
  51. package/chunks/{chunk-TRRF5BSP.js → chunk-5C42HXEX.js} +1 -1
  52. package/chunks/{chunk-J6SZID63.js → chunk-5RUCD4ED.js} +2 -2
  53. package/chunks/{chunk-WAUGQKUU.js → chunk-63FNZTWG.js} +9 -5
  54. package/chunks/{chunk-F6WDTQ3M.js → chunk-655DWW7X.js} +5 -5
  55. package/chunks/{chunk-AAE6SR4Q.js → chunk-7P5NK5EI.js} +1 -1
  56. package/chunks/{chunk-MZSJ43WV.js → chunk-7U5G6JXI.js} +24 -2
  57. package/chunks/{chunk-GWVUR3QZ.js → chunk-7WROZ3E6.js} +3 -3
  58. package/chunks/{chunk-PBRVUF5B.js → chunk-A6NRNRKE.js} +1 -1
  59. package/chunks/{chunk-IBUGFUXC.js → chunk-A6TJ7QUA.js} +13 -13
  60. package/chunks/{chunk-DCZEPFB4.js → chunk-ADM4C4TX.js} +3 -3
  61. package/chunks/{chunk-UBX6NL47.js → chunk-AGWK35OJ.js} +47 -3
  62. package/chunks/{chunk-4MKXUHXY.js → chunk-AGWZRQJJ.js} +5 -5
  63. package/chunks/{chunk-GNPNYXJB.js → chunk-AKBFSOC5.js} +2 -2
  64. package/chunks/{chunk-YWPSGJFI.js → chunk-ARSQPRYL.js} +2 -2
  65. package/chunks/{chunk-IWTMYQ32.js → chunk-AVKPDOQZ.js} +12 -11
  66. package/chunks/{chunk-DX3RGJMS.js → chunk-AW27A43Y.js} +76 -19
  67. package/chunks/{chunk-MIKXJYZB.js → chunk-AZPFLLFR.js} +315 -299
  68. package/chunks/{chunk-2PLNY5TN.js → chunk-BBCGHZ4S.js} +4 -4
  69. package/chunks/{chunk-KID7K6H2.js → chunk-BP5VZBVK.js} +6 -6
  70. package/chunks/{chunk-LLCWZQCU.js → chunk-BRQR2FJ5.js} +3 -3
  71. package/chunks/{chunk-LHEC5V6G.js → chunk-BSR5AXZR.js} +4 -3
  72. package/chunks/{chunk-ONSZH6VM.js → chunk-CGM3E75C.js} +2 -2
  73. package/chunks/{chunk-SEZ556DZ.js → chunk-CPFFU46D.js} +1 -1
  74. package/chunks/{chunk-H6XPXXMH.js → chunk-CQ35AJ4Z.js} +252 -254
  75. package/chunks/{chunk-7MH4J33A.js → chunk-D2RNVVH6.js} +2 -2
  76. package/chunks/{chunk-M6HMMKVG.js → chunk-D7QGE3RT.js} +1 -1
  77. package/chunks/{chunk-UMD7WQTR.js → chunk-D7VALEOK.js} +13 -9
  78. package/chunks/chunk-DAV4QFD5.js +1280 -0
  79. package/chunks/{chunk-B2GJNDTV.js → chunk-DD6O3ZRD.js} +1 -1
  80. package/chunks/{chunk-HUWENAHO.js → chunk-DEDESZDL.js} +1 -1
  81. package/chunks/{chunk-3P2LV43B.js → chunk-DG4IQ6JG.js} +3 -3
  82. package/chunks/{chunk-QUI267ZP.js → chunk-DPTMKFIH.js} +492 -63
  83. package/chunks/{chunk-Q3JQ7OSU.js → chunk-EJOGLSNJ.js} +1 -1
  84. package/chunks/{chunk-NRLFZWCT.js → chunk-EQHCHTHC.js} +48 -5
  85. package/chunks/{chunk-P3BJLFSZ.js → chunk-EQR7YDXY.js} +3 -3
  86. package/chunks/{chunk-4WL6SY4F.js → chunk-EQUXHAFW.js} +1 -1
  87. package/chunks/{chunk-Q3AL4JQ3.js → chunk-F5BD3RNA.js} +2 -2
  88. package/chunks/{chunk-A7XMDZRI.js → chunk-FJYUSD2N.js} +5 -5
  89. package/chunks/{chunk-JT7XS4YW.js → chunk-FMIH5KMQ.js} +1 -1
  90. package/chunks/{chunk-ZBVS26BY.js → chunk-FPGTNKCP.js} +7 -5
  91. package/chunks/{chunk-W5UC37EE.js → chunk-FQDCO3CJ.js} +12 -1
  92. package/chunks/{chunk-EQL65XGA.js → chunk-FRHQQC2Z.js} +47 -21
  93. package/chunks/{chunk-FVKHVJZQ.js → chunk-G6MUFRNI.js} +1 -1
  94. package/chunks/{chunk-D27I6YJT.js → chunk-GB245X4Z.js} +129 -26
  95. package/chunks/{chunk-WCG5O7IP.js → chunk-GZDWTBT3.js} +2 -2
  96. package/chunks/{chunk-AOHJKPKL.js → chunk-H7TMVHKE.js} +1 -1
  97. package/chunks/{chunk-ZJ4W6SUY.js → chunk-HDRTQ5DH.js} +3 -3
  98. package/chunks/{chunk-ZZCWJWTF.js → chunk-HG3UBTJ4.js} +31 -11
  99. package/chunks/chunk-HHJLM3WQ.js +41 -0
  100. package/chunks/{chunk-6LP743KE.js → chunk-HHZU6ZZM.js} +79 -113
  101. package/chunks/{chunk-OIVKILPI.js → chunk-HOSVOUDK.js} +74 -0
  102. package/chunks/{chunk-DA4HRSBW.js → chunk-HTYND72J.js} +1 -1
  103. package/chunks/{chunk-ZRBMO3C7.js → chunk-IKFHTAQW.js} +1 -1
  104. package/chunks/{chunk-KZ22NXBY.js → chunk-IVROQYG5.js} +4 -4
  105. package/chunks/{chunk-UDXSXLER.js → chunk-IW6RQPQB.js} +14 -4
  106. package/chunks/{chunk-F24A2JBM.js → chunk-J6JVP7ZZ.js} +1180 -254
  107. package/chunks/{chunk-ECWR5LQR.js → chunk-JB6IM2TJ.js} +3 -3
  108. package/chunks/{chunk-MVUQRLOH.js → chunk-JRIVMPD2.js} +3 -3
  109. package/chunks/{chunk-Q7YDKOGY.js → chunk-JVEGA3MM.js} +1 -1
  110. package/chunks/{chunk-4TRQPFDP.js → chunk-K34GJQOZ.js} +140 -20
  111. package/chunks/{chunk-W4RQUHY3.js → chunk-K5IDV3PC.js} +184 -22
  112. package/chunks/{chunk-NDU63YLI.js → chunk-KD6FGI2Q.js} +4 -4
  113. package/chunks/{chunk-HV76SFIA.js → chunk-KEC5FHLM.js} +3 -3
  114. package/chunks/{chunk-IIJEYBNH.js → chunk-KLOMACIR.js} +197 -60
  115. package/chunks/{chunk-Z4JX4NSH.js → chunk-KSPRBJJ3.js} +50 -50
  116. package/chunks/{chunk-KONVMRK7.js → chunk-KX5TNFCJ.js} +1 -1
  117. package/chunks/{chunk-QGNOFE5E.js → chunk-KX7PC5QG.js} +1 -1
  118. package/chunks/{chunk-OJUQF2PL.js → chunk-LEKKQEQW.js} +5 -5
  119. package/chunks/{chunk-COBO5EBO.js → chunk-LSRI3ND3.js} +1 -1
  120. package/chunks/{chunk-BSI645OU.js → chunk-LUISTZXI.js} +3 -3
  121. package/chunks/{chunk-YTFDX4PR.js → chunk-M6NDLY2T.js} +1 -1
  122. package/chunks/{chunk-EBZ6BJTF.js → chunk-MNUKNVYQ.js} +1 -1
  123. package/chunks/{chunk-VFMASYQA.js → chunk-MS7GNABG.js} +3 -0
  124. package/chunks/{chunk-EI3NWELG.js → chunk-MSSNVG2G.js} +6430 -4463
  125. package/chunks/{chunk-L2AFWWJE.js → chunk-N4SVADAV.js} +351 -144
  126. package/chunks/{chunk-URK542T4.js → chunk-NF5J2WFA.js} +15 -2
  127. package/chunks/{chunk-EI3HZX6C.js → chunk-NLFLYSS4.js} +1 -1
  128. package/chunks/{chunk-NV3F44FL.js → chunk-NW2GIPG3.js} +2 -2
  129. package/chunks/{chunk-OQTXYMKW.js → chunk-NX4A23LY.js} +3 -3
  130. package/chunks/{chunk-E2FPSSKP.js → chunk-OK47XBYH.js} +97 -10
  131. package/chunks/{chunk-EKPKKXY2.js → chunk-OWGRUU7F.js} +1 -1
  132. package/chunks/{chunk-CTJLZLB5.js → chunk-OYWVIXHT.js} +1 -1
  133. package/chunks/{chunk-47PEPJO7.js → chunk-P7PSGVWP.js} +3 -3
  134. package/chunks/{chunk-6Q5ABMTU.js → chunk-PTSEETCO.js} +23 -19
  135. package/chunks/{chunk-6ZRFAKXK.js → chunk-PVXEJB66.js} +1 -1
  136. package/chunks/{chunk-EUNWC2VS.js → chunk-PZW46OTB.js} +2 -2
  137. package/chunks/{chunk-QSWDGAIC.js → chunk-QILD6R27.js} +1 -1
  138. package/chunks/{chunk-CKASRHZI.js → chunk-QLTATTPS.js} +1 -1
  139. package/chunks/{chunk-2UUMVNYT.js → chunk-QPBFRWCP.js} +3 -3
  140. package/chunks/{chunk-QJMOAMXT.js → chunk-QQSXM3FE.js} +8 -8
  141. package/chunks/{chunk-AEL7KN2O.js → chunk-RN7GFREP.js} +2 -2
  142. package/chunks/{chunk-AQAJJMRR.js → chunk-RYSBWLLV.js} +1 -1
  143. package/chunks/{chunk-MFDYOYZZ.js → chunk-SYHXR6WM.js} +26 -3
  144. package/chunks/{chunk-SR7RZ4MS.js → chunk-TB4YFWXG.js} +2 -2
  145. package/chunks/{chunk-IRZ2ZH72.js → chunk-TCMU4ZUE.js} +4 -4
  146. package/chunks/{chunk-OWMAZHIX.js → chunk-TMFWI4RC.js} +1 -1
  147. package/chunks/{chunk-TZEZYNYD.js → chunk-TQDFSQQF.js} +1 -1
  148. package/chunks/{chunk-IA7TGCN2.js → chunk-TTRH3RTQ.js} +4 -4
  149. package/chunks/{chunk-PJRW65JO.js → chunk-TXP5NGG3.js} +1 -1
  150. package/chunks/{chunk-VWKER4ZH.js → chunk-ULJGMSG5.js} +3 -3
  151. package/chunks/{chunk-2FRY5CRX.js → chunk-ULNWG62W.js} +3 -3
  152. package/chunks/{chunk-XVHYA33G.js → chunk-URYJYT5W.js} +4 -4
  153. package/chunks/{chunk-7GTMV7UE.js → chunk-US7J7LJT.js} +10786 -4462
  154. package/chunks/{chunk-HGCQ5SE7.js → chunk-UXEO7E3V.js} +21 -0
  155. package/chunks/{chunk-NV65ZUVM.js → chunk-VKT2R3NB.js} +1 -1
  156. package/chunks/{chunk-CPG6P4GG.js → chunk-VPV7WBVT.js} +1 -1
  157. package/chunks/{chunk-QG3FFJYU.js → chunk-VXSD4AGT.js} +1 -1
  158. package/chunks/{chunk-XCGIMOLN.js → chunk-WCCLLK7X.js} +14 -1
  159. package/chunks/{chunk-VJNBRRZG.js → chunk-WZMH7II3.js} +1 -1
  160. package/chunks/{chunk-5MZCSWI4.js → chunk-WZRLXVLJ.js} +1185 -1451
  161. package/chunks/{chunk-YF5MALI4.js → chunk-X5QJFMLY.js} +21 -17
  162. package/chunks/{chunk-DREZZAZM.js → chunk-XDRXOSAD.js} +13 -5
  163. package/chunks/{chunk-FOGU3LJX.js → chunk-YBHUXEC6.js} +1 -1
  164. package/chunks/{chunk-GM463R2B.js → chunk-YBVVOSOH.js} +1 -1
  165. package/chunks/{chunk-PYQADEFD.js → chunk-YIGGWOJE.js} +1 -1
  166. package/chunks/{chunk-XCWO3SMQ.js → chunk-YILJKX2T.js} +3 -3
  167. package/chunks/{chunk-Y4R47ZUH.js → chunk-YM3I6VW5.js} +7 -7
  168. package/chunks/{chunk-OCSFNUU4.js → chunk-YMALTWIZ.js} +13 -11
  169. package/chunks/{chunk-WOJZWRAZ.js → chunk-YRLW2MSX.js} +1 -1
  170. package/chunks/{chunk-UEOKWYGY.js → chunk-YYIOFWVH.js} +11 -11
  171. package/chunks/chunk-Z7B6SRPM.js +32 -0
  172. package/chunks/{chunk-S6HYI3MF.js → chunk-ZBB5EZZV.js} +2 -2
  173. package/chunks/{chunk-VKJ4KTPJ.js → chunk-ZLCT4C5A.js} +1 -1
  174. package/chunks/{chunk-O3EU6GMH.js → chunk-ZO37CAQH.js} +27 -4
  175. package/chunks/{computer-use-WQFK33Z3.js → computer-use-TMDO6TEC.js} +42 -41
  176. package/chunks/{config-utils-ULCSRMWD.js → config-utils-Z3OW3IQG.js} +6 -6
  177. package/chunks/{contextCommand-7EOZND7C.js → contextCommand-IUQ6G5ES.js} +44 -43
  178. package/chunks/{core-runtime-FGMQRM6E.js → core-runtime-HAZLPQXI.js} +42 -41
  179. package/chunks/{create-sub-session-QM2K5HLZ.js → create-sub-session-GREIOIZU.js} +42 -41
  180. package/chunks/{create-sub-session-QIDZUOPU.js → create-sub-session-XT6DLYOE.js} +2 -2
  181. package/chunks/{cron-create-VONA5JYY.js → cron-create-2JZ2TWTF.js} +4 -4
  182. package/chunks/{cron-delete-5JXSP2MI.js → cron-delete-CTPD2P26.js} +4 -4
  183. package/chunks/{cron-list-KE4F2CIR.js → cron-list-V44KHAF6.js} +4 -4
  184. package/chunks/{daemon-GWD7BT6E.js → daemon-GED37WOX.js} +216 -9
  185. package/chunks/daemon-git-worktree-guard-BSKVBYPM.js +2062 -0
  186. package/chunks/daemon-status-provider-7UK2DVVN.js +102 -0
  187. package/chunks/daemon-trust-policy-BZEALQSM.js +99 -0
  188. package/chunks/{daemon-trust-policy-monitor-6UKEABN5.js → daemon-trust-policy-monitor-P7OM342T.js} +49 -48
  189. package/chunks/{de-LIW4XVLN.js → de-UBEBKG6V.js} +2 -1
  190. package/chunks/{deferred-core-runtime-67GJXHXS.js → deferred-core-runtime-MTDXZT6B.js} +42 -41
  191. package/chunks/{display-image-NQRSIBXM.js → display-image-M2ELAVN4.js} +4 -4
  192. package/chunks/{dist-OTUO3AS2.js → dist-4ZPG4BY6.js} +13 -5
  193. package/chunks/{dist-B2CGTW6T.js → dist-BROOP2EG.js} +3 -3
  194. package/chunks/{dist-EZE3V3Q7.js → dist-IYYN3RUT.js} +3 -3
  195. package/chunks/{dist-3NTTUAHT.js → dist-JWMKPWT5.js} +5 -3
  196. package/chunks/{dist-Z3CS4OVP.js → dist-K7IQB53U.js} +11 -5
  197. package/chunks/{dist-J47AXBZC.js → dist-MAQXAQ2Y.js} +3 -3
  198. package/chunks/{dist-6BMOAE3Z.js → dist-WJ4BHIEW.js} +4 -4
  199. package/chunks/{dist-EWW3J4HQ.js → dist-YEPL4RAW.js} +3 -3
  200. package/chunks/{earlyInputCapture-IWMYR6OB.js → earlyInputCapture-BGZYFN2F.js} +43 -42
  201. package/chunks/{edit-ZFGROCAF.js → edit-ASQVJARF.js} +45 -43
  202. package/chunks/{en-SY5GTIGX.js → en-X6YV7GME.js} +2 -1
  203. package/chunks/{enter-worktree-TZZZCDM5.js → enter-worktree-WIUNMC64.js} +42 -41
  204. package/chunks/{enterPlanMode-U77BI3R6.js → enterPlanMode-TUBB2L7O.js} +42 -41
  205. package/chunks/{environment-HC37DS2I.js → environment-RWSNEY4T.js} +45 -44
  206. package/chunks/{errors-6AG54JPD.js → errors-44QVVNGT.js} +44 -43
  207. package/chunks/{exit-worktree-UYYWFPNK.js → exit-worktree-WPBRPIRR.js} +42 -41
  208. package/chunks/exitPlanMode-AP7J626M.js +85 -0
  209. package/chunks/{external-tool-guard-provider-5HTGOPGU.js → external-tool-guard-provider-TE4DRY36.js} +1 -1
  210. package/chunks/{fast-path-F5FSZ3O7.js → fast-path-XG5KXXLS.js} +6 -6
  211. package/chunks/{fast-path-settings-RPAVBD7P.js → fast-path-settings-LNOFM2YP.js} +2 -2
  212. package/chunks/{fr-RQFO7U4P.js → fr-VENTC2BS.js} +2 -1
  213. package/chunks/{gemini-NKQHYM36.js → gemini-PGXORAFF.js} +112 -103
  214. package/chunks/{geminiContentGenerator-HCWZOUX3.js → geminiContentGenerator-ZQVVD4J4.js} +6 -6
  215. package/chunks/{glob-3PDXKBAO.js → glob-Q6LWKMBU.js} +42 -41
  216. package/chunks/{goal-tools-SWNB6GP4.js → goal-tools-M4UDAZXP.js} +4 -4
  217. package/chunks/{grep-5HZKZYVD.js → grep-C67Z35I4.js} +42 -41
  218. package/chunks/handleAutoUpdate-75L74MB4.js +94 -0
  219. package/chunks/{i18n-Q27KKNDL.js → i18n-GYUC23UJ.js} +43 -42
  220. package/chunks/{image-gen-2Z2RJ6W7.js → image-gen-XE56S4MG.js} +10 -10
  221. package/chunks/initializer-V7XZVY35.js +100 -0
  222. package/chunks/{installationInfo-XXB75T7O.js → installationInfo-S5PPSD7T.js} +43 -42
  223. package/chunks/{ja-KOZKHJHZ.js → ja-QHT4EQTO.js} +2 -1
  224. package/chunks/{keychain-token-storage-TVAMTNP7.js → keychain-token-storage-NKKCUHI2.js} +2 -2
  225. package/chunks/list-JJ2FB7SP.js +103 -0
  226. package/chunks/{list-agents-Z4WABFDZ.js → list-agents-O6WSY4CT.js} +2 -2
  227. package/chunks/loadedSettingsAdapter-LNUDRGW5.js +97 -0
  228. package/chunks/{loggingContentGenerator-6NTFBM7Q.js → loggingContentGenerator-HCJ2DX2S.js} +162 -112
  229. package/chunks/{loop-wakeup-UZ5RL5Y2.js → loop-wakeup-GVQRMUKS.js} +5 -5
  230. package/chunks/{ls-TVHDGIES.js → ls-6W2D7TKU.js} +4 -4
  231. package/chunks/{lsp-CVN6OQPI.js → lsp-NJ4KFBI2.js} +2 -2
  232. package/chunks/{managed-npm-update-SPHYQUWZ.js → managed-npm-update-MDF2JDTH.js} +45 -44
  233. package/chunks/mcp-M5OML5FI.js +97 -0
  234. package/chunks/{monitor-ZBBPAA54.js → monitor-U5NM5ONC.js} +42 -41
  235. package/chunks/nonInteractiveCli-TX3QP7JT.js +163 -0
  236. package/chunks/{notebook-edit-5W3FW7Z2.js → notebook-edit-Q7SUR44R.js} +42 -41
  237. package/chunks/{openaiContentGenerator-TQANPEVZ.js → openaiContentGenerator-2H5CYLXP.js} +29 -29
  238. package/chunks/{pidfile-EQOBLH4E.js → pidfile-SHSMSAZR.js} +43 -42
  239. package/chunks/{processUtils-7XQG7EHS.js → processUtils-GZAP6EYW.js} +2 -2
  240. package/chunks/{pt-U6AOCTMF.js → pt-VL3I5RNY.js} +2 -1
  241. package/chunks/{qwenContentGenerator-BKCPHHXU.js → qwenContentGenerator-2624VVZH.js} +48 -48
  242. package/chunks/{qwenOAuth2-BJ6PQKE6.js → qwenOAuth2-AAWH3C7N.js} +9 -9
  243. package/chunks/read-file-ZWGQE2TE.js +32 -0
  244. package/chunks/{read-mcp-resource-PZ4ZF6YL.js → read-mcp-resource-GWCP23WG.js} +2 -2
  245. package/chunks/{read-package-up-TCM6I7S2.js → read-package-up-K6RKTL5D.js} +1 -1
  246. package/chunks/{record-artifact-P4HFMS7X.js → record-artifact-IYQDEYMV.js} +3 -3
  247. package/chunks/{resumeHistoryUtils-6N6XGJJW.js → resumeHistoryUtils-7N2H4QCU.js} +50 -49
  248. package/chunks/ripGrep-6JGJDWYB.js +85 -0
  249. package/chunks/{ru-CMX4UMYP.js → ru-4RCKL4PY.js} +2 -1
  250. package/chunks/{run-qwen-serve-BCKBCAMX.js → run-qwen-serve-2A6RHHI7.js} +197 -90
  251. package/chunks/{runtime-E2437YKL.js → runtime-NPYVZVRI.js} +55 -54
  252. package/chunks/{scheduler-K3D5Z655.js → scheduler-UMKTEQAM.js} +44 -43
  253. package/chunks/{sdk-exporters-http-XVTZQRCE.js → sdk-exporters-http-NHBYB5FZ.js} +11 -7
  254. package/chunks/{sdk-impl-7W7AKCS4.js → sdk-impl-SK4P5WON.js} +13 -10
  255. package/chunks/{send-message-CAMSLG2L.js → send-message-O7FO63UK.js} +6 -6
  256. package/chunks/serve-LYADPWRV.js +107 -0
  257. package/chunks/{server-UD6INW7J.js → server-WMVPH4G4.js} +1137 -382
  258. package/chunks/{session-GR4ZEVW4.js → session-LE6O62ZE.js} +122 -102
  259. package/chunks/{settings-5O24D3OJ.js → settings-2IPZYYGS.js} +48 -47
  260. package/chunks/{shell-UTLWLG5G.js → shell-VOBAZFFI.js} +42 -41
  261. package/chunks/{skill-QQAZL4VO.js → skill-6LKOWJV4.js} +19 -19
  262. package/chunks/{skill-settings-P3YHJVBZ.js → skill-settings-J5IHQA7L.js} +48 -47
  263. package/chunks/spawnChannel-TLW7N3SM.js +98 -0
  264. package/chunks/{standalone-update-QP742MGP.js → standalone-update-6OFPUBEM.js} +44 -43
  265. package/chunks/{startInteractiveUI-YCS6AEPN.js → startInteractiveUI-KVHNCR2L.js} +836 -444
  266. package/chunks/{syntheticOutput-PEBJQYJV.js → syntheticOutput-DVHJMUGV.js} +3 -3
  267. package/chunks/{task-create-5NWCQSJF.js → task-create-4NC7PDI4.js} +10 -10
  268. package/chunks/{task-list-53265TRZ.js → task-list-LBSRMOC7.js} +5 -5
  269. package/chunks/{task-stop-FPCOIRYX.js → task-stop-YFNATTIM.js} +2 -2
  270. package/chunks/{task-update-5HN577LS.js → task-update-BPLM52GD.js} +10 -10
  271. package/chunks/{team-create-WFH7OCDQ.js → team-create-INCC7G74.js} +44 -43
  272. package/chunks/{team-delete-MMQB4OSC.js → team-delete-MKYMYBFM.js} +5 -5
  273. package/chunks/{team-plan-approval-EGTT53MV.js → team-plan-approval-6DCWGZQ4.js} +42 -41
  274. package/chunks/{terminal-image-renderer-BWRESAQ7.js → terminal-image-renderer-O5EDW64G.js} +44 -43
  275. package/chunks/theme-manager-NZZO4SWE.js +89 -0
  276. package/chunks/{todoWrite-JGV6VLOX.js → todoWrite-K5K7NRE5.js} +4 -4
  277. package/chunks/{tool-search-TI5PTIBF.js → tool-search-JB2PXD5P.js} +19 -19
  278. package/chunks/total-session-admission-NWNMU6AW.js +99 -0
  279. package/chunks/{trustedFolders-4KYHA4IG.js → trustedFolders-A5ZWRRSP.js} +43 -42
  280. package/chunks/{update-relaunch-WB6LGIF2.js → update-relaunch-GG7EDBEA.js} +5 -5
  281. package/chunks/{updateCheck-LOS5GYFC.js → updateCheck-P6JJ4MBU.js} +48 -47
  282. package/chunks/{useAutoAcceptIndicator-MHAPY52L.js → useAutoAcceptIndicator-KV2AANVG.js} +53 -52
  283. package/chunks/{validateNonInterActiveAuth-QV22HNQU.js → validateNonInterActiveAuth-HXRCYXY7.js} +89 -88
  284. package/chunks/{version-DALWZHKQ.js → version-HH5V762G.js} +2 -2
  285. package/chunks/{web-fetch-JMJVMYFE.js → web-fetch-LVXPFB5O.js} +19 -19
  286. package/chunks/{web-search-DNDUIPU5.js → web-search-4E234FSM.js} +11 -11
  287. package/chunks/{workflow-JGNN64PM.js → workflow-GUE6WIMP.js} +117 -50
  288. package/chunks/workspace-providers-status-TUWLGJOF.js +100 -0
  289. package/chunks/{workspace-registration-store-LRJG7QA4.js → workspace-registration-store-22XXHPKR.js} +1 -1
  290. package/chunks/{workspace-registry-KVXIFM36.js → workspace-registry-HUFJF5W5.js} +50 -49
  291. package/chunks/{workspace-service-PO4AAKKT.js → workspace-service-NAGTBJXJ.js} +54 -53
  292. package/chunks/workspace-skills-status-LWDBXAQI.js +100 -0
  293. package/chunks/{workspace-trust-reconciler-DOZPCVHG.js → workspace-trust-reconciler-DLWV2ZO6.js} +57 -56
  294. package/chunks/write-file-QVHVOKKR.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-CNC77ZMA.js → zoom-image-CJDXYWJH.js} +15 -15
  298. package/cli.js +18 -17
  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 +4 -4
  309. package/web-shell/assets/{arc-CDk0d60K.js → arc-DagtOPoO.js} +1 -1
  310. package/web-shell/assets/{architectureDiagram-3BPJPVTR-h-W3I2lP.js → architectureDiagram-3BPJPVTR-Dc3kGCBm.js} +1 -1
  311. package/web-shell/assets/{blockDiagram-GPEHLZMM-D1pvSmZg.js → blockDiagram-GPEHLZMM-BUZvQLL_.js} +1 -1
  312. package/web-shell/assets/{c4Diagram-AAUBKEIU-ByAm5ZNf.js → c4Diagram-AAUBKEIU-BbBgCu9K.js} +1 -1
  313. package/web-shell/assets/channel-aMHKHCQ2.js +1 -0
  314. package/web-shell/assets/{chunk-2J33WTMH-VrGPPOGV.js → chunk-2J33WTMH-CZ4miMNB.js} +1 -1
  315. package/web-shell/assets/{chunk-4BX2VUAB-B7hTowgG.js → chunk-4BX2VUAB-B2_qQSGx.js} +1 -1
  316. package/web-shell/assets/{chunk-55IACEB6-j1Fq8DpE.js → chunk-55IACEB6-EdmTwZW7.js} +1 -1
  317. package/web-shell/assets/{chunk-727SXJPM-UjABYpF2.js → chunk-727SXJPM-l2EpyrLV.js} +1 -1
  318. package/web-shell/assets/{chunk-AQP2D5EJ-D4uBItrs.js → chunk-AQP2D5EJ-0q9sx5lV.js} +1 -1
  319. package/web-shell/assets/{chunk-FMBD7UC4-DeFbKlb8.js → chunk-FMBD7UC4-CbGnA4Dp.js} +1 -1
  320. package/web-shell/assets/{chunk-ND2GUHAM-rQJ8TIgT.js → chunk-ND2GUHAM-D8JBELgZ.js} +1 -1
  321. package/web-shell/assets/{chunk-QZHKN3VN-DAGcRxvq.js → chunk-QZHKN3VN-DQMpGGOO.js} +1 -1
  322. package/web-shell/assets/classDiagram-4FO5ZUOK-zASpLzDx.js +1 -0
  323. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-zASpLzDx.js +1 -0
  324. package/web-shell/assets/{cose-bilkent-S5V4N54A-MaE7MJSt.js → cose-bilkent-S5V4N54A-DzM-ZRsM.js} +1 -1
  325. package/web-shell/assets/{dagre-BM42HDAG-DzijYGSb.js → dagre-BM42HDAG-uxLS-TtN.js} +1 -1
  326. package/web-shell/assets/{diagram-2AECGRRQ-WdbG7WnX.js → diagram-2AECGRRQ-DH7Gnqzr.js} +1 -1
  327. package/web-shell/assets/{diagram-5GNKFQAL-NYutsBnw.js → diagram-5GNKFQAL-B2TngKRK.js} +1 -1
  328. package/web-shell/assets/{diagram-KO2AKTUF-Dqg0eBY0.js → diagram-KO2AKTUF-DQ61-HiV.js} +1 -1
  329. package/web-shell/assets/{diagram-LMA3HP47-C7vRP2Lb.js → diagram-LMA3HP47-By6qvgAT.js} +1 -1
  330. package/web-shell/assets/{diagram-OG6HWLK6-B2sEPpPt.js → diagram-OG6HWLK6-ClVSEz-3.js} +1 -1
  331. package/web-shell/assets/{erDiagram-TEJ5UH35-a4zIbzm8.js → erDiagram-TEJ5UH35-C9gFc5Fg.js} +1 -1
  332. package/web-shell/assets/{flowDiagram-I6XJVG4X-BK9y89ya.js → flowDiagram-I6XJVG4X-BWPLLJ5-.js} +1 -1
  333. package/web-shell/assets/{ganttDiagram-6RSMTGT7-wUQTSNvV.js → ganttDiagram-6RSMTGT7-C6RMacQQ.js} +1 -1
  334. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Dnzt4SAi.js → gitGraphDiagram-PVQCEYII-LnqiWuka.js} +1 -1
  335. package/web-shell/assets/index---fOcMdS.js +1789 -0
  336. package/web-shell/assets/{index-BA3wUcKL.js → index-B9iqcrv0.js} +1 -1
  337. package/web-shell/assets/index-BIGQygTL.css +5 -0
  338. package/web-shell/assets/{infoDiagram-5YYISTIA-DcaoToij.js → infoDiagram-5YYISTIA-Bc4iS8YB.js} +1 -1
  339. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DzduqhP2.js → ishikawaDiagram-YF4QCWOH-9pH4Dpnd.js} +1 -1
  340. package/web-shell/assets/{journeyDiagram-JHISSGLW-BvviZR_O.js → journeyDiagram-JHISSGLW-C-YMnw2W.js} +1 -1
  341. package/web-shell/assets/{kanban-definition-UN3LZRKU-Efm2JxY3.js → kanban-definition-UN3LZRKU-D-PaAIp-.js} +1 -1
  342. package/web-shell/assets/{linear-DtY3IbOs.js → linear-DpLgI2kt.js} +1 -1
  343. package/web-shell/assets/{mermaid.core-PzpFqoMe.js → mermaid.core-nZbOHGxx.js} +5 -5
  344. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BLlTkHS0.js → mindmap-definition-RKZ34NQL-Dq0xxnET.js} +1 -1
  345. package/web-shell/assets/{pieDiagram-4H26LBE5-D-mKF-jE.js → pieDiagram-4H26LBE5-ctqG2eeF.js} +1 -1
  346. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DYCzslGm.js → quadrantDiagram-W4KKPZXB-MivToddn.js} +1 -1
  347. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Dfpxlk7R.js → requirementDiagram-4Y6WPE33-DrLLnkpQ.js} +1 -1
  348. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D5cRaaxh.js → sankeyDiagram-5OEKKPKP-sYdYhdpV.js} +1 -1
  349. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-s04DReiS.js → sequenceDiagram-3UESZ5HK-CuvhxDOs.js} +1 -1
  350. package/web-shell/assets/{stateDiagram-AJRCARHV-01UNFgnb.js → stateDiagram-AJRCARHV-BLZgbV7Q.js} +1 -1
  351. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DR_gXrIC.js +1 -0
  352. package/web-shell/assets/{timeline-definition-PNZ67QCA-DX8_wZBC.js → timeline-definition-PNZ67QCA-lNr2Uz_Q.js} +1 -1
  353. package/web-shell/assets/{vennDiagram-CIIHVFJN-BK0FlBme.js → vennDiagram-CIIHVFJN-CoaexGVO.js} +1 -1
  354. package/web-shell/assets/{wardley-L42UT6IY-DkPc9UlD.js → wardley-L42UT6IY-DG1vhGKA.js} +1 -1
  355. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DNKkpDAo.js → wardleyDiagram-YWT4CUSO-CqNjF5xC.js} +1 -1
  356. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CiPwg8QG.js → xychartDiagram-2RQKCTM6-BXg1gx3C.js} +1 -1
  357. package/web-shell/index.html +2 -2
  358. package/chunks/agent-headless-HYEHZFH6.js +0 -86
  359. package/chunks/bridge-FHINXZMN.js +0 -103
  360. package/chunks/channel-settings-store-OXYG5S5X.js +0 -101
  361. package/chunks/chunk-I5VM3SKY.js +0 -451
  362. package/chunks/chunk-PDPFQ2FO.js +0 -156
  363. package/chunks/daemon-status-provider-L3J6GKCT.js +0 -102
  364. package/chunks/daemon-trust-policy-4PHPY23S.js +0 -98
  365. package/chunks/exitPlanMode-RWJR2KGB.js +0 -84
  366. package/chunks/handleAutoUpdate-NHFSGYTF.js +0 -93
  367. package/chunks/initializer-Y5DJLT43.js +0 -99
  368. package/chunks/list-YHNQ32CS.js +0 -102
  369. package/chunks/loadedSettingsAdapter-GHUQK7H4.js +0 -96
  370. package/chunks/mcp-EA3KO6FS.js +0 -96
  371. package/chunks/nonInteractiveCli-NNOR56HU.js +0 -162
  372. package/chunks/read-file-KKTXGIZD.js +0 -32
  373. package/chunks/ripGrep-SJVAAYDV.js +0 -84
  374. package/chunks/serve-IH4XR5IL.js +0 -106
  375. package/chunks/spawnChannel-UAQMH6Y6.js +0 -94
  376. package/chunks/theme-manager-ZNDGAHJN.js +0 -88
  377. package/chunks/total-session-admission-66UDSOHO.js +0 -98
  378. package/chunks/workspace-providers-status-K22B3Z6B.js +0 -99
  379. package/chunks/workspace-skills-status-DDYCBVSH.js +0 -99
  380. package/chunks/write-file-TT6MWIKC.js +0 -86
  381. package/web-shell/assets/channel-DPFUV4oi.js +0 -1
  382. package/web-shell/assets/classDiagram-4FO5ZUOK-CLm0hVvw.js +0 -1
  383. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CLm0hVvw.js +0 -1
  384. package/web-shell/assets/index-BjC3yjjL.css +0 -5
  385. package/web-shell/assets/index-QzFq6w7o.js +0 -1775
  386. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DXb5olqv.js +0 -1
@@ -1,18 +1,85 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ classifyApiError,
5
+ fireSessionDeleteHook
6
+ } from "./chunk-P5Y23G2L.js";
3
7
  import {
4
8
  buildPermissionSuggestions
5
9
  } from "./chunk-43T5WDQ7.js";
6
10
  import {
7
11
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
8
12
  reportChatRecordingFailureToAdapter
9
- } from "./chunk-26CXSA6V.js";
13
+ } from "./chunk-25VWCPYE.js";
14
+ import {
15
+ MAX_SUGGESTIONS_TO_SHOW,
16
+ SESSION_MENTION_PREFIX,
17
+ buildMcpResourceRef,
18
+ buildMcpServerRef,
19
+ buildSessionRef,
20
+ getExtensionSuggestions,
21
+ handleAtCommand,
22
+ matchMcpServerPrefix,
23
+ resolveAtCommandQuery,
24
+ sanitizeDisplayText
25
+ } from "./chunk-KD6FGI2Q.js";
10
26
  import {
11
27
  StreamJsonOutputAdapter
12
- } from "./chunk-O3EU6GMH.js";
28
+ } from "./chunk-ZO37CAQH.js";
29
+ import {
30
+ BuiltinCommandLoader,
31
+ BundledSkillLoader,
32
+ CommandService,
33
+ DISPLAY_HOOK_EVENTS,
34
+ FileCommandLoader,
35
+ MAX_STACKED_SKILLS,
36
+ McpPromptLoader,
37
+ SavedWorkflowLoader,
38
+ SkillCommandLoader,
39
+ addConfigToMatcherGroup,
40
+ appendUserPromptExpansionAdditionalContext,
41
+ buildBackgroundWorkBlockedMessage,
42
+ copyToClipboard,
43
+ createEmptyHookEventInfo,
44
+ dayKey,
45
+ findMidInputSlashCommand,
46
+ findSlashCommandTokens,
47
+ formatApprovalModeDescription,
48
+ formatApprovalModeName,
49
+ formatEffortChangeMessage,
50
+ formatUserPromptExpansionBlockedMessage,
51
+ getAllConfigs,
52
+ getBestSlashCommandMatch,
53
+ getTranslatedSourceDisplayMap,
54
+ hasBlockingBackgroundWork,
55
+ hasSlashCommandPathSeparator,
56
+ isAtCommand,
57
+ isBtwCommand,
58
+ isMidInputCompletableCommand,
59
+ isPickerOnlyModelInvocation,
60
+ isSlashCommand,
61
+ isStackedSkillCompletableCommand,
62
+ isValidStackedSkillPrefix,
63
+ normalizePartList,
64
+ parseDayKey,
65
+ parseSlashCommand,
66
+ parseStackedSlashCommands,
67
+ recordAutoSkillCommandUsage,
68
+ refreshExtensionContentRuntime,
69
+ resetBackgroundStateForSessionSwitch,
70
+ serializeUserPromptExpansionPrompt,
71
+ supportsMatchers
72
+ } from "./chunk-AZPFLLFR.js";
13
73
  import {
14
74
  startPostRenderPrefetches
15
- } from "./chunk-IBUGFUXC.js";
75
+ } from "./chunk-A6TJ7QUA.js";
76
+ import {
77
+ EXTENSION_RELOAD_FAILED_REASON,
78
+ ExtensionRefreshState,
79
+ appEvents,
80
+ cleanupReviewWorktreeLeases,
81
+ loadHierarchicalGeminiMemory
82
+ } from "./chunk-US7J7LJT.js";
16
83
  import {
17
84
  AboutBox,
18
85
  BaseSelectionList,
@@ -90,7 +157,20 @@ import {
90
157
  useUIActions,
91
158
  useUIState,
92
159
  useVirtualViewport
93
- } from "./chunk-Z4JX4NSH.js";
160
+ } from "./chunk-KSPRBJJ3.js";
161
+ import {
162
+ getCommandDisplayName,
163
+ getCommandSourceBadge
164
+ } from "./chunk-VXSD4AGT.js";
165
+ import {
166
+ computeSessionStats,
167
+ levelLabel
168
+ } from "./chunk-ARSQPRYL.js";
169
+ import {
170
+ MaxSizedBox,
171
+ OverflowProvider,
172
+ useOverflowState
173
+ } from "./chunk-CGM3E75C.js";
94
174
  import {
95
175
  GeminiRespondingSpinner,
96
176
  GeminiSpinner,
@@ -107,98 +187,33 @@ import {
107
187
  useStreamingContext,
108
188
  waitForGoalRuntime,
109
189
  wrapAnsi
110
- } from "./chunk-IWTMYQ32.js";
111
- import {
112
- stopAndGetCapturedInput
113
- } from "./chunk-TZEZYNYD.js";
114
- import {
115
- useAutoAcceptIndicator
116
- } from "./chunk-ECWR5LQR.js";
117
- import {
118
- KeypressProvider,
119
- useFocus,
120
- useKeypress,
121
- useKeypressContext
122
- } from "./chunk-VNNWAZSI.js";
123
- import {
124
- classifyApiError,
125
- fireSessionDeleteHook
126
- } from "./chunk-P5Y23G2L.js";
127
- import {
128
- MAX_SUGGESTIONS_TO_SHOW,
129
- SESSION_MENTION_PREFIX,
130
- buildMcpResourceRef,
131
- buildMcpServerRef,
132
- buildSessionRef,
133
- getExtensionSuggestions,
134
- handleAtCommand,
135
- matchMcpServerPrefix,
136
- resolveAtCommandQuery,
137
- sanitizeDisplayText
138
- } from "./chunk-NDU63YLI.js";
190
+ } from "./chunk-AVKPDOQZ.js";
139
191
  import {
140
- BuiltinCommandLoader,
141
- BundledSkillLoader,
142
- CommandService,
143
- DISPLAY_HOOK_EVENTS,
144
- FileCommandLoader,
145
- MAX_STACKED_SKILLS,
146
- McpPromptLoader,
147
- SavedWorkflowLoader,
148
- SkillCommandLoader,
149
- addConfigToMatcherGroup,
150
- appendUserPromptExpansionAdditionalContext,
151
- buildBackgroundWorkBlockedMessage,
152
- copyToClipboard,
153
- createEmptyHookEventInfo,
154
- dayKey,
155
- findMidInputSlashCommand,
156
- findSlashCommandTokens,
157
- formatApprovalModeDescription,
158
- formatApprovalModeName,
159
- formatUserPromptExpansionBlockedMessage,
160
- getAllConfigs,
161
- getBestSlashCommandMatch,
162
- getTranslatedSourceDisplayMap,
163
- hasBlockingBackgroundWork,
164
- hasSlashCommandPathSeparator,
165
- isAtCommand,
166
- isBtwCommand,
167
- isMidInputCompletableCommand,
168
- isSlashCommand,
169
- isStackedSkillCompletableCommand,
170
- isValidStackedSkillPrefix,
171
- normalizePartList,
172
- parseDayKey,
173
- parseSlashCommand,
174
- parseStackedSlashCommands,
175
- recordAutoSkillCommandUsage,
176
- refreshExtensionContentRuntime,
177
- resetBackgroundStateForSessionSwitch,
178
- serializeUserPromptExpansionPrompt,
179
- supportsMatchers
180
- } from "./chunk-MIKXJYZB.js";
181
- import {
182
- EXTENSION_RELOAD_FAILED_REASON,
183
- ExtensionRefreshState,
184
- appEvents,
185
- cleanupReviewWorktreeLeases,
186
- loadHierarchicalGeminiMemory
187
- } from "./chunk-7GTMV7UE.js";
192
+ formatDuration,
193
+ formatRelativeTime,
194
+ formatTokenCount
195
+ } from "./chunk-3SH53ANB.js";
188
196
  import {
189
- getCommandDisplayName,
190
- getCommandSourceBadge
191
- } from "./chunk-QG3FFJYU.js";
197
+ theme
198
+ } from "./chunk-OWGRUU7F.js";
192
199
  import {
193
- computeSessionStats,
194
- levelLabel
195
- } from "./chunk-YWPSGJFI.js";
200
+ stopAndGetCapturedInput
201
+ } from "./chunk-TQDFSQQF.js";
196
202
  import {
197
203
  disableKittyProtocol,
198
204
  isKittyProtocolEnabled,
199
205
  isKittyProtocolSupported,
200
206
  pushKittyProtocolFlags
201
207
  } from "./chunk-NYX53SV4.js";
208
+ import {
209
+ useAutoAcceptIndicator
210
+ } from "./chunk-JB6IM2TJ.js";
211
+ import {
212
+ KeypressProvider,
213
+ useFocus,
214
+ useKeypress,
215
+ useKeypressContext
216
+ } from "./chunk-56HVDG3M.js";
202
217
  import {
203
218
  BEL,
204
219
  OSC_PREFIX,
@@ -211,27 +226,25 @@ import {
211
226
  oscKittyNotify,
212
227
  saveClipboardImage,
213
228
  writeOsc52
214
- } from "./chunk-NV3F44FL.js";
215
- import "./chunk-F6WDTQ3M.js";
216
- import "./chunk-4WGODMVR.js";
217
- import "./chunk-A7XMDZRI.js";
218
- import "./chunk-KW7NOTN6.js";
219
- import {
220
- MaxSizedBox,
221
- OverflowProvider,
222
- useOverflowState
223
- } from "./chunk-ONSZH6VM.js";
224
- import {
225
- theme
226
- } from "./chunk-EKPKKXY2.js";
229
+ } from "./chunk-NW2GIPG3.js";
227
230
  import {
228
231
  require_jsx_runtime
229
232
  } from "./chunk-SV5PQVQE.js";
233
+ import "./chunk-655DWW7X.js";
234
+ import "./chunk-4WGODMVR.js";
235
+ import {
236
+ setUpdateHandler
237
+ } from "./chunk-URYJYT5W.js";
238
+ import {
239
+ isHistoryItemVisibleAfterRestore
240
+ } from "./chunk-EKTCKZV5.js";
241
+ import "./chunk-FJYUSD2N.js";
230
242
  import {
231
243
  AUTO_THEME_NAME,
232
244
  DEFAULT_THEME,
233
245
  themeManager
234
- } from "./chunk-CTJLZLB5.js";
246
+ } from "./chunk-OYWVIXHT.js";
247
+ import "./chunk-KW7NOTN6.js";
235
248
  import {
236
249
  Box_default,
237
250
  Static,
@@ -249,35 +262,31 @@ import {
249
262
  import {
250
263
  require_react
251
264
  } from "./chunk-5QWWOFGG.js";
252
- import "./chunk-IRZ2ZH72.js";
253
- import "./chunk-OJUQF2PL.js";
254
- import "./chunk-S6HYI3MF.js";
265
+ import "./chunk-TCMU4ZUE.js";
266
+ import {
267
+ getErrorMessage as getErrorMessage2
268
+ } from "./chunk-ADM4C4TX.js";
269
+ import "./chunk-LEKKQEQW.js";
270
+ import "./chunk-2QHWLRQ2.js";
271
+ import "./chunk-YAF2MQZ6.js";
272
+ import "./chunk-ZBB5EZZV.js";
255
273
  import {
256
274
  MAX_INLINE_IMAGES_PER_ITEM,
257
275
  collectInlineImages,
258
276
  getInlineImageData
259
- } from "./chunk-PJRW65JO.js";
277
+ } from "./chunk-TXP5NGG3.js";
260
278
  import {
261
279
  relaunchApp
262
- } from "./chunk-KONVMRK7.js";
263
- import {
264
- setUpdateHandler
265
- } from "./chunk-XVHYA33G.js";
266
- import "./chunk-URKIBIFC.js";
267
- import "./chunk-YAF2MQZ6.js";
268
- import "./chunk-YF5MALI4.js";
280
+ } from "./chunk-KX5TNFCJ.js";
281
+ import "./chunk-X5QJFMLY.js";
269
282
  import "./chunk-6H67XLET.js";
270
- import {
271
- getErrorMessage as getErrorMessage2
272
- } from "./chunk-DCZEPFB4.js";
273
283
  import {
274
284
  openQwenAsrRealtimeStream,
275
285
  openVoiceStream,
276
286
  openVoiceStreamWithRetry
277
- } from "./chunk-Q3JQ7OSU.js";
278
- import "./chunk-5MZCSWI4.js";
279
- import "./chunk-OWMAZHIX.js";
280
- import "./chunk-ZRBMO3C7.js";
287
+ } from "./chunk-EJOGLSNJ.js";
288
+ import "./chunk-WZRLXVLJ.js";
289
+ import "./chunk-TMFWI4RC.js";
281
290
  import {
282
291
  cpLen,
283
292
  cpSlice,
@@ -290,77 +299,70 @@ import {
290
299
  stripUnsafeCharacters,
291
300
  toCodePoints
292
301
  } from "./chunk-4NFY2S7N.js";
302
+ import "./chunk-IKFHTAQW.js";
293
303
  import {
294
304
  stringWidth
295
305
  } from "./chunk-2MIN6GRR.js";
296
306
  import "./chunk-QHTIBUWB.js";
297
- import {
298
- isHistoryItemVisibleAfterRestore
299
- } from "./chunk-EKTCKZV5.js";
300
307
  import "./chunk-3Z43GZUQ.js";
301
308
  import {
302
309
  isValidSessionId
303
310
  } from "./chunk-TQOF5KBL.js";
304
- import "./chunk-HGCQ5SE7.js";
311
+ import "./chunk-UXEO7E3V.js";
305
312
  import {
306
313
  assertVoiceBaseUrlNetworkAllowed,
307
314
  isKeytermEcho,
308
315
  isStreamingVoiceModel,
309
316
  resolveVoiceStreamConfig,
310
317
  transcribeVoiceAudio
311
- } from "./chunk-LLCWZQCU.js";
318
+ } from "./chunk-BRQR2FJ5.js";
312
319
  import {
313
320
  formatUnsupportedVoiceModelMessage,
314
321
  isSelectableVoiceModel
315
- } from "./chunk-EBZ6BJTF.js";
316
- import "./chunk-AOHJKPKL.js";
322
+ } from "./chunk-MNUKNVYQ.js";
323
+ import "./chunk-H7TMVHKE.js";
317
324
  import {
318
325
  getExtendedSystemInfo
319
- } from "./chunk-VSFKIRRW.js";
320
- import {
321
- formatDuration,
322
- formatRelativeTime,
323
- formatTokenCount
324
- } from "./chunk-3SH53ANB.js";
326
+ } from "./chunk-3NBTNFNC.js";
325
327
  import {
326
328
  isInlineModelOverrideAllowed
327
- } from "./chunk-2PLNY5TN.js";
329
+ } from "./chunk-BBCGHZ4S.js";
328
330
  import {
329
331
  computeWorkspaceSkillListUpdates,
330
332
  resolveSkillSettings,
331
333
  skillSettingStrings
332
334
  } from "./chunk-Z4X5MTRT.js";
333
- import "./chunk-NEOXOWYH.js";
335
+ import "./chunk-3QZY3JSR.js";
334
336
  import {
335
337
  requestConsentInteractive,
336
338
  requestConsentOrFail
337
- } from "./chunk-UMD7WQTR.js";
339
+ } from "./chunk-D7VALEOK.js";
338
340
  import "./chunk-57OAHC2Y.js";
339
- import "./chunk-LHEC5V6G.js";
340
- import "./chunk-67EWJE77.js";
341
- import "./chunk-E2FPSSKP.js";
341
+ import "./chunk-BSR5AXZR.js";
342
+ import "./chunk-45NQKMYB.js";
343
+ import "./chunk-OK47XBYH.js";
342
344
  import {
343
345
  createLoadedSettingsAdapter
344
- } from "./chunk-4WL6SY4F.js";
345
- import "./chunk-MZSJ43WV.js";
346
- import "./chunk-XCGIMOLN.js";
347
- import "./chunk-VKJ4KTPJ.js";
346
+ } from "./chunk-EQUXHAFW.js";
347
+ import "./chunk-7U5G6JXI.js";
348
+ import "./chunk-WCCLLK7X.js";
349
+ import "./chunk-ZLCT4C5A.js";
348
350
  import "./chunk-V6WHFGST.js";
349
- import "./chunk-DP3IHZGG.js";
351
+ import "./chunk-2AUM35J5.js";
350
352
  import "./chunk-6PLDPT2C.js";
351
353
  import "./chunk-FYJ7W2PI.js";
352
354
  import "./chunk-YP5KH5Y7.js";
353
- import "./chunk-PBRVUF5B.js";
355
+ import "./chunk-A6NRNRKE.js";
354
356
  import "./chunk-ALMR3E6Q.js";
355
357
  import "./chunk-HIBNSEJE.js";
356
358
  import "./chunk-M5GB774H.js";
357
- import "./chunk-BKHCW2BI.js";
358
- import "./chunk-UVX4Y6IN.js";
359
- import "./chunk-DX3RGJMS.js";
360
- import "./chunk-UDXSXLER.js";
359
+ import "./chunk-3VUENPWF.js";
360
+ import "./chunk-3AEKDXKT.js";
361
+ import "./chunk-AW27A43Y.js";
362
+ import "./chunk-IW6RQPQB.js";
361
363
  import {
362
364
  loadMcpApprovals
363
- } from "./chunk-KID7K6H2.js";
365
+ } from "./chunk-BP5VZBVK.js";
364
366
  import {
365
367
  CORRUPTED_SUFFIX,
366
368
  SettingScope,
@@ -382,11 +384,11 @@ import {
382
384
  settingExistsInScope,
383
385
  validateSettingValue,
384
386
  writeOutputLanguageAndRegisterPath
385
- } from "./chunk-ABVRJU3D.js";
387
+ } from "./chunk-3ER3FWZM.js";
388
+ import "./chunk-RKUWKYED.js";
386
389
  import {
387
390
  TOGGLE_TYPES
388
- } from "./chunk-UBX6NL47.js";
389
- import "./chunk-RKUWKYED.js";
391
+ } from "./chunk-AGWK35OJ.js";
390
392
  import "./chunk-GOXKNSDZ.js";
391
393
  import "./chunk-IDS7MSUP.js";
392
394
  import {
@@ -394,25 +396,25 @@ import {
394
396
  localizeToolDisplayName,
395
397
  t,
396
398
  ta
397
- } from "./chunk-UEOKWYGY.js";
399
+ } from "./chunk-YYIOFWVH.js";
398
400
  import "./chunk-5EJZE3FP.js";
399
- import "./chunk-ZJ4W6SUY.js";
400
- import "./chunk-VFMASYQA.js";
401
- import "./chunk-Q3AL4JQ3.js";
401
+ import "./chunk-HDRTQ5DH.js";
402
+ import "./chunk-MS7GNABG.js";
403
+ import "./chunk-F5BD3RNA.js";
402
404
  import {
403
405
  getCliVersion
404
- } from "./chunk-AEL7KN2O.js";
405
- import "./chunk-VJNBRRZG.js";
406
+ } from "./chunk-RN7GFREP.js";
407
+ import "./chunk-WZMH7II3.js";
406
408
  import {
407
409
  isWorkspaceTrusted,
408
410
  loadTrustedFolders
409
- } from "./chunk-GWVUR3QZ.js";
411
+ } from "./chunk-7WROZ3E6.js";
410
412
  import {
411
413
  require_strip_json_comments
412
414
  } from "./chunk-NPQ5ZKRP.js";
413
415
  import "./chunk-MR3PXB6E.js";
414
416
  import "./chunk-XFSFZCM5.js";
415
- import "./chunk-URK542T4.js";
417
+ import "./chunk-NF5J2WFA.js";
416
418
  import {
417
419
  ALIBABA_PROVIDERS,
418
420
  AsyncFzf,
@@ -483,7 +485,6 @@ import {
483
485
  glob,
484
486
  ideContextStore,
485
487
  isActiveWorkflowStatus,
486
- isBinary,
487
488
  isEditorAvailable,
488
489
  isExtensionCommittedWithWarningsError,
489
490
  isGatedMcpScope,
@@ -504,7 +505,6 @@ import {
504
505
  parseVisionModelSetting,
505
506
  readWorktreeSession,
506
507
  readWorktreeSessionMarker,
507
- redactUrlCredentials,
508
508
  refreshMemoryAfterManagedWrite,
509
509
  refreshMemoryInstruction,
510
510
  resolveBaseUrl,
@@ -520,75 +520,76 @@ import {
520
520
  validateWorkflowName,
521
521
  watchRepoBranch,
522
522
  writeRuntimeStatus
523
- } from "./chunk-EI3NWELG.js";
523
+ } from "./chunk-MSSNVG2G.js";
524
524
  import "./chunk-GOFAQQZA.js";
525
525
  import "./chunk-5M6IDOMF.js";
526
526
  import {
527
527
  stripAnsi
528
528
  } from "./chunk-TWPJO254.js";
529
- import "./chunk-H6XPXXMH.js";
530
- import "./chunk-2UUMVNYT.js";
531
- import "./chunk-MVUQRLOH.js";
532
- import "./chunk-XCWO3SMQ.js";
533
- import "./chunk-7MH4J33A.js";
529
+ import "./chunk-CQ35AJ4Z.js";
530
+ import "./chunk-QPBFRWCP.js";
531
+ import "./chunk-JRIVMPD2.js";
532
+ import "./chunk-YILJKX2T.js";
533
+ import "./chunk-D2RNVVH6.js";
534
534
  import "./chunk-6PVPNMXU.js";
535
535
  import {
536
536
  resolveModelId
537
- } from "./chunk-TRRF5BSP.js";
537
+ } from "./chunk-5C42HXEX.js";
538
538
  import "./chunk-IRH27ZC2.js";
539
539
  import "./chunk-QHWCP53L.js";
540
- import "./chunk-GNPNYXJB.js";
541
- import "./chunk-HUWENAHO.js";
540
+ import "./chunk-AKBFSOC5.js";
541
+ import "./chunk-DEDESZDL.js";
542
542
  import {
543
543
  promptIdContext
544
544
  } from "./chunk-O6GEWCJA.js";
545
545
  import "./chunk-T26EAKDL.js";
546
546
  import "./chunk-ZPJWUGCS.js";
547
547
  import "./chunk-CPBF7KYF.js";
548
- import "./chunk-J6SZID63.js";
548
+ import "./chunk-5RUCD4ED.js";
549
549
  import "./chunk-KRXPRVGL.js";
550
550
  import {
551
551
  HOOKS_CONFIG_FIELDS
552
- } from "./chunk-GM463R2B.js";
553
- import "./chunk-SEZ556DZ.js";
554
- import "./chunk-2FRY5CRX.js";
552
+ } from "./chunk-YBVVOSOH.js";
553
+ import "./chunk-CPFFU46D.js";
554
+ import "./chunk-ULNWG62W.js";
555
555
  import {
556
556
  elapsedActiveTime,
557
557
  goalRequiresExactPermit
558
- } from "./chunk-QUI267ZP.js";
558
+ } from "./chunk-DPTMKFIH.js";
559
559
  import {
560
560
  APPROVAL_MODES
561
- } from "./chunk-WAUGQKUU.js";
562
- import "./chunk-DZUO626D.js";
563
- import "./chunk-4TRQPFDP.js";
561
+ } from "./chunk-63FNZTWG.js";
562
+ import "./chunk-3GM5DLBI.js";
563
+ import "./chunk-K34GJQOZ.js";
564
564
  import "./chunk-SAH4BD2J.js";
565
+ import "./chunk-KLOMACIR.js";
565
566
  import {
566
567
  runOutsideAgentContext
567
- } from "./chunk-CPG6P4GG.js";
568
+ } from "./chunk-VPV7WBVT.js";
568
569
  import "./chunk-S6LOFUVP.js";
569
570
  import "./chunk-2J3OJGTL.js";
570
571
  import {
571
572
  getStartupContextLength,
572
573
  isSystemReminderContent
573
- } from "./chunk-IA7TGCN2.js";
574
+ } from "./chunk-TTRH3RTQ.js";
574
575
  import "./chunk-K623ENWT.js";
575
576
  import "./chunk-AQ37AY7B.js";
576
577
  import {
577
578
  isPathWithinRoot
578
- } from "./chunk-EQL65XGA.js";
579
+ } from "./chunk-FRHQQC2Z.js";
579
580
  import {
580
581
  osc8Hyperlink,
581
582
  qwenOAuth2Events,
582
583
  sanitizeForOsc,
583
584
  supportsHyperlinks,
584
585
  wrapForMultiplexer
585
- } from "./chunk-3P2LV43B.js";
586
+ } from "./chunk-DG4IQ6JG.js";
586
587
  import "./chunk-NAVJD2PQ.js";
587
- import "./chunk-HV76SFIA.js";
588
- import "./chunk-4PYCZH2V.js";
588
+ import "./chunk-KEC5FHLM.js";
589
+ import "./chunk-2ZWH53I4.js";
589
590
  import "./chunk-P3QQPMQA.js";
590
- import "./chunk-SR7RZ4MS.js";
591
- import "./chunk-M6HMMKVG.js";
591
+ import "./chunk-TB4YFWXG.js";
592
+ import "./chunk-D7QGE3RT.js";
592
593
  import {
593
594
  REASONING_EFFORT_TIERS,
594
595
  applyReasoningEffort
@@ -600,7 +601,7 @@ import {
600
601
  import "./chunk-AXMWHKXA.js";
601
602
  import "./chunk-GLCZKT5V.js";
602
603
  import "./chunk-DJ2GSRLV.js";
603
- import "./chunk-EI3HZX6C.js";
604
+ import "./chunk-NLFLYSS4.js";
604
605
  import {
605
606
  ApiCancelEvent,
606
607
  AuthEvent,
@@ -640,8 +641,8 @@ import {
640
641
  runVisionBridge,
641
642
  shouldRunVisionBridge,
642
643
  splitImageParts
643
- } from "./chunk-YGT2AUJ7.js";
644
- import "./chunk-WOJZWRAZ.js";
644
+ } from "./chunk-4KM2SYK5.js";
645
+ import "./chunk-YRLW2MSX.js";
645
646
  import "./chunk-VGC4I5JJ.js";
646
647
  import {
647
648
  AUTO_MEMORY_INDEX_FILENAME,
@@ -649,31 +650,36 @@ import {
649
650
  getAutoMemoryRoot,
650
651
  getUserAutoMemoryRoot,
651
652
  isAnyAutoMemPath
652
- } from "./chunk-FVKHVJZQ.js";
653
+ } from "./chunk-G6MUFRNI.js";
653
654
  import {
654
655
  runSideQuery
655
- } from "./chunk-COBO5EBO.js";
656
- import "./chunk-6ZRFAKXK.js";
656
+ } from "./chunk-LSRI3ND3.js";
657
+ import "./chunk-PVXEJB66.js";
657
658
  import {
658
659
  ToolNames,
659
660
  isShellProgressData
660
- } from "./chunk-PYQADEFD.js";
661
- import "./chunk-Y4R47ZUH.js";
661
+ } from "./chunk-YIGGWOJE.js";
662
+ import "./chunk-YM3I6VW5.js";
662
663
  import {
663
664
  MAINLINE_CODER_MODEL
664
665
  } from "./chunk-F6WFNA7U.js";
665
666
  import "./chunk-46UV252V.js";
666
667
  import {
667
668
  DEFAULT_TOKEN_LIMIT
668
- } from "./chunk-ZBVS26BY.js";
669
- import "./chunk-KKBPOU75.js";
670
- import "./chunk-EUNWC2VS.js";
669
+ } from "./chunk-FPGTNKCP.js";
670
+ import "./chunk-4AOVQPJU.js";
671
+ import "./chunk-PZW46OTB.js";
671
672
  import {
672
673
  atomicWriteFileSync
673
- } from "./chunk-FOGU3LJX.js";
674
- import "./chunk-L2AFWWJE.js";
675
- import "./chunk-W4RQUHY3.js";
676
- import "./chunk-PDPFQ2FO.js";
674
+ } from "./chunk-YBHUXEC6.js";
675
+ import {
676
+ endInteractionSpan,
677
+ getActiveInteractionSpan,
678
+ isBinary,
679
+ redactUrlCredentials
680
+ } from "./chunk-N4SVADAV.js";
681
+ import "./chunk-HHJLM3WQ.js";
682
+ import "./chunk-K5IDV3PC.js";
677
683
  import {
678
684
  Storage,
679
685
  UnauthorizedError,
@@ -685,18 +691,18 @@ import {
685
691
  isNodeError,
686
692
  shortenPath,
687
693
  tildeifyPath
688
- } from "./chunk-OIVKILPI.js";
694
+ } from "./chunk-HOSVOUDK.js";
689
695
  import "./chunk-VOQXFAY5.js";
690
- import "./chunk-AQAJJMRR.js";
691
- import {
692
- finalizeStartupProfile,
693
- profileCheckpoint
694
- } from "./chunk-QSWDGAIC.js";
695
- import "./chunk-Q7YDKOGY.js";
696
+ import "./chunk-RYSBWLLV.js";
696
697
  import {
697
698
  registerCleanup,
698
699
  runExitCleanup
699
- } from "./chunk-AAE6SR4Q.js";
700
+ } from "./chunk-7P5NK5EI.js";
701
+ import {
702
+ finalizeStartupProfile,
703
+ profileCheckpoint
704
+ } from "./chunk-QILD6R27.js";
705
+ import "./chunk-JVEGA3MM.js";
700
706
  import {
701
707
  clearScreen,
702
708
  writeStderrLine,
@@ -750,7 +756,7 @@ var SUPPORTED_EVENTS = [
750
756
  "control_request",
751
757
  "control_response"
752
758
  ];
753
- var DUAL_OUTPUT_PROTOCOL_VERSION = 1;
759
+ var DUAL_OUTPUT_PROTOCOL_VERSION = 2;
754
760
  var MAX_BUFFERED_BYTES = 1024 * 1024;
755
761
  var DualOutputBridge = class {
756
762
  static {
@@ -3366,13 +3372,6 @@ var SelectionState = class {
3366
3372
  this.focus = point;
3367
3373
  }
3368
3374
  }
3369
- /** Select a resolved word/line span from a multi-click (not a drag). */
3370
- selectSpan(span, mode) {
3371
- this.anchor = { x: span.sx, y: span.sy };
3372
- this.focus = { x: span.ex, y: span.ey };
3373
- this.dragging = false;
3374
- this.mode = mode;
3375
- }
3376
3375
  finish() {
3377
3376
  this.dragging = false;
3378
3377
  }
@@ -3389,6 +3388,13 @@ var SelectionState = class {
3389
3388
  get isCollapsed() {
3390
3389
  return !this.isEmpty && this.anchor.x === this.focus.x && this.anchor.y === this.focus.y;
3391
3390
  }
3391
+ /**
3392
+ * A collapsed range is a real single-cell span in word/line mode, but only a
3393
+ * bare click in char mode.
3394
+ */
3395
+ get isBareClick() {
3396
+ return this.isCollapsed && this.mode === "char";
3397
+ }
3392
3398
  /** Anchor/focus ordered into reading order, or null when empty. */
3393
3399
  normalized() {
3394
3400
  if (!this.anchor || !this.focus) {
@@ -3420,11 +3426,21 @@ function getSelectedText(frame, selection) {
3420
3426
  }
3421
3427
  const startX = y === sy ? sx : 0;
3422
3428
  const endX = y === ey ? ex : row.length - 1;
3429
+ let rowText = "";
3430
+ let skippedLayoutGap = false;
3423
3431
  for (let x = Math.max(0, startX); x <= endX && x < row.length; x++) {
3424
- if (row[x].selectable) {
3425
- text += row[x].value;
3432
+ const cell = row[x];
3433
+ if (cell.selectable) {
3434
+ if (skippedLayoutGap && rowText.length > 0 && cell.value !== "" && !/\s$/u.test(rowText) && !/^\s/u.test(cell.value)) {
3435
+ rowText += " ";
3436
+ }
3437
+ rowText += cell.value;
3438
+ skippedLayoutGap = false;
3439
+ } else if (rowText.length > 0) {
3440
+ skippedLayoutGap = true;
3426
3441
  }
3427
3442
  }
3443
+ text += rowText;
3428
3444
  if (y < ey) {
3429
3445
  text += boundaryJoiner(frame, selection, y);
3430
3446
  }
@@ -3489,8 +3505,8 @@ function isWordCell(value) {
3489
3505
  return value !== "" && value !== " " && !/^\s$/u.test(value);
3490
3506
  }
3491
3507
  __name(isWordCell, "isWordCell");
3492
- function lastContentColumn(row) {
3493
- for (let x = row.length - 1; x >= 0; x--) {
3508
+ function lastContentColumn(row, start, end) {
3509
+ for (let x = end; x >= start; x--) {
3494
3510
  if (row[x].value !== "" && row[x].value !== " ") {
3495
3511
  return x;
3496
3512
  }
@@ -3518,18 +3534,46 @@ function wordSpanAt(frame, x, y) {
3518
3534
  return { sx, sy: y, ex, ey: y };
3519
3535
  }
3520
3536
  __name(wordSpanAt, "wordSpanAt");
3521
- function lineSpanAt(frame, y) {
3537
+ function selectableLineSpan(row, x, y) {
3538
+ let start = x;
3539
+ while (start > 0 && row[start - 1].selectable) {
3540
+ start--;
3541
+ }
3542
+ let runEnd = x;
3543
+ while (runEnd < row.length - 1 && row[runEnd + 1].selectable) {
3544
+ runEnd++;
3545
+ }
3546
+ const contentEnd = lastContentColumn(row, start, runEnd);
3547
+ return { sx: start, sy: y, ex: contentEnd, ey: y };
3548
+ }
3549
+ __name(selectableLineSpan, "selectableLineSpan");
3550
+ function isSelectableContent(cell) {
3551
+ return cell.selectable && cell.value !== "" && cell.value !== " ";
3552
+ }
3553
+ __name(isSelectableContent, "isSelectableContent");
3554
+ function lineSpanAt(frame, x, y) {
3522
3555
  const row = frame?.cells[y];
3523
- if (!row) {
3556
+ if (!row || row.length === 0) {
3524
3557
  return null;
3525
3558
  }
3526
- const end = lastContentColumn(row);
3527
- if (end < 0) {
3528
- return null;
3559
+ const origin = Math.max(0, Math.min(x, row.length - 1));
3560
+ for (let distance = 0; distance < row.length; distance++) {
3561
+ const left = origin - distance;
3562
+ if (left >= 0 && isSelectableContent(row[left])) {
3563
+ return selectableLineSpan(row, left, y);
3564
+ }
3565
+ const right = origin + distance;
3566
+ if (distance > 0 && right < row.length && isSelectableContent(row[right])) {
3567
+ return selectableLineSpan(row, right, y);
3568
+ }
3529
3569
  }
3530
- return { sx: 0, sy: y, ex: end, ey: y };
3570
+ return null;
3531
3571
  }
3532
3572
  __name(lineSpanAt, "lineSpanAt");
3573
+ function spanAtForMode(frame, mode, point) {
3574
+ return mode === "word" ? wordSpanAt(frame, point.x, point.y) : lineSpanAt(frame, point.x, point.y);
3575
+ }
3576
+ __name(spanAtForMode, "spanAtForMode");
3533
3577
 
3534
3578
  // packages/cli/src/ui/selection/selection-coords.ts
3535
3579
  init_esbuild_shims();
@@ -3576,8 +3620,12 @@ function TextSelectionController(props) {
3576
3620
  const baselineScrollTopRef = (0, import_react13.useRef)(0);
3577
3621
  const baselineScrollHeightRef = (0, import_react13.useRef)(0);
3578
3622
  const baselineFrameRef = (0, import_react13.useRef)(null);
3579
- const baselineViewportRectRef = (0, import_react13.useRef)(null);
3623
+ const baselineRectRef = (0, import_react13.useRef)(null);
3624
+ const activeRectIndexRef = (0, import_react13.useRef)(null);
3625
+ const selectionGenerationRef = (0, import_react13.useRef)(0);
3626
+ const pendingInvalidationGenRef = (0, import_react13.useRef)(null);
3580
3627
  const lastClickRef = (0, import_react13.useRef)(null);
3628
+ const anchorSpanRef = (0, import_react13.useRef)(null);
3581
3629
  const bufferRef = (0, import_react13.useRef)(void 0);
3582
3630
  const propsRef = (0, import_react13.useRef)(props);
3583
3631
  propsRef.current = props;
@@ -3588,7 +3636,10 @@ function TextSelectionController(props) {
3588
3636
  return bufferRef.current;
3589
3637
  }, [stdout]);
3590
3638
  const clearSelection = (0, import_react13.useCallback)(() => {
3639
+ selectionGenerationRef.current += 1;
3640
+ activeRectIndexRef.current = null;
3591
3641
  const selection = selectionRef.current;
3642
+ anchorSpanRef.current = null;
3592
3643
  if (selection.isEmpty) {
3593
3644
  return;
3594
3645
  }
@@ -3598,16 +3649,32 @@ function TextSelectionController(props) {
3598
3649
  const applyHighlight = (0, import_react13.useCallback)(() => {
3599
3650
  const selection = selectionRef.current;
3600
3651
  const normalized = selection.normalized();
3601
- const shouldHighlight = normalized && (!selection.isCollapsed || selection.mode !== "char");
3602
- getBuffer()?.setSelection(shouldHighlight ? normalized : null);
3603
- }, [getBuffer]);
3604
- const recordBaseline = (0, import_react13.useCallback)(() => {
3605
- const scrollState = propsRef.current.getScrollState();
3606
- baselineScrollTopRef.current = scrollState.scrollTop;
3607
- baselineScrollHeightRef.current = scrollState.scrollHeight;
3608
- baselineFrameRef.current = getBuffer()?.frame ?? null;
3609
- baselineViewportRectRef.current = propsRef.current.getViewportRect();
3652
+ getBuffer()?.setSelection(
3653
+ normalized && !selection.isBareClick ? normalized : null
3654
+ );
3610
3655
  }, [getBuffer]);
3656
+ const getSelectableRects = (0, import_react13.useCallback)(() => {
3657
+ const viewportRect = propsRef.current.getViewportRect();
3658
+ if (!viewportRect) {
3659
+ return [];
3660
+ }
3661
+ const additionalRects = propsRef.current.getAdditionalSelectableRects?.() ?? [];
3662
+ return [viewportRect, ...additionalRects];
3663
+ }, []);
3664
+ const getActiveRect = (0, import_react13.useCallback)(() => {
3665
+ const index = activeRectIndexRef.current;
3666
+ return index === null ? null : getSelectableRects()[index] ?? null;
3667
+ }, [getSelectableRects]);
3668
+ const recordBaseline = (0, import_react13.useCallback)(
3669
+ (rect) => {
3670
+ const scrollState = propsRef.current.getScrollState();
3671
+ baselineScrollTopRef.current = scrollState.scrollTop;
3672
+ baselineScrollHeightRef.current = scrollState.scrollHeight;
3673
+ baselineFrameRef.current = getBuffer()?.frame ?? null;
3674
+ baselineRectRef.current = rect;
3675
+ },
3676
+ [getBuffer]
3677
+ );
3611
3678
  const copySelection = (0, import_react13.useCallback)(() => {
3612
3679
  const normalized = selectionRef.current.normalized();
3613
3680
  const text = normalized ? getSelectedText(getBuffer()?.frame ?? null, normalized) : "";
@@ -3620,8 +3687,7 @@ function TextSelectionController(props) {
3620
3687
  const mapEvent = (0, import_react13.useCallback)(
3621
3688
  (event) => {
3622
3689
  const buffer = getBuffer();
3623
- const rect = propsRef.current.getViewportRect();
3624
- if (!buffer || !rect) {
3690
+ if (!buffer) {
3625
3691
  return null;
3626
3692
  }
3627
3693
  const frameHeight = buffer.dimensions.height;
@@ -3634,28 +3700,63 @@ function TextSelectionController(props) {
3634
3700
  );
3635
3701
  const row = buffer.frame?.cells[point.y];
3636
3702
  const snappedPoint = point.x > 0 && row?.[point.x]?.value === "" && row[point.x - 1]?.fullWidth ? { ...point, x: point.x - 1 } : point;
3637
- return { point: snappedPoint, rect };
3703
+ return snappedPoint;
3638
3704
  },
3639
3705
  [getBuffer, stdout]
3640
3706
  );
3707
+ const extendSpanDrag = (0, import_react13.useCallback)(
3708
+ (point) => {
3709
+ const anchor = anchorSpanRef.current;
3710
+ if (!anchor) return;
3711
+ const { span, mode } = anchor;
3712
+ const selection = selectionRef.current;
3713
+ const frame = getBuffer()?.frame ?? null;
3714
+ const current = spanAtForMode(frame, mode, point) ?? {
3715
+ sx: point.x,
3716
+ sy: point.y,
3717
+ ex: point.x,
3718
+ ey: point.y
3719
+ };
3720
+ const cursorAfter = point.y > span.ey || point.y === span.ey && point.x >= span.ex;
3721
+ selection.anchor = cursorAfter ? { x: span.sx, y: span.sy } : { x: span.ex, y: span.ey };
3722
+ selection.focus = cursorAfter ? { x: current.ex, y: current.ey } : { x: current.sx, y: current.sy };
3723
+ },
3724
+ [getBuffer]
3725
+ );
3726
+ const extendActiveDrag = (0, import_react13.useCallback)(
3727
+ (point) => {
3728
+ if (anchorSpanRef.current) {
3729
+ extendSpanDrag(point);
3730
+ } else {
3731
+ selectionRef.current.extend(point);
3732
+ }
3733
+ },
3734
+ [extendSpanDrag]
3735
+ );
3641
3736
  const handleMouse = (0, import_react13.useCallback)(
3642
3737
  (event) => {
3643
3738
  const selection = selectionRef.current;
3644
3739
  if (event.name.startsWith("scroll-")) {
3645
- clearSelection();
3740
+ if (activeRectIndexRef.current === 0) {
3741
+ clearSelection();
3742
+ }
3646
3743
  return;
3647
3744
  }
3648
3745
  if (event.name === "left-press") {
3746
+ selectionGenerationRef.current += 1;
3649
3747
  if (propsRef.current.hitTestScrollbar({ col: event.col, row: event.row })) {
3650
3748
  clearSelection();
3651
3749
  return;
3652
3750
  }
3653
- const mapped = mapEvent(event);
3654
- if (!mapped || !pointInViewport(mapped.point, mapped.rect)) {
3751
+ const point = mapEvent(event);
3752
+ const rects = getSelectableRects();
3753
+ const rectIndex = point ? rects.findIndex((rect2) => pointInViewport(point, rect2)) : -1;
3754
+ if (!point || rectIndex < 0) {
3655
3755
  clearSelection();
3656
3756
  return;
3657
3757
  }
3658
- const { point } = mapped;
3758
+ const rect = rects[rectIndex];
3759
+ activeRectIndexRef.current = rectIndex;
3659
3760
  const now = Date.now();
3660
3761
  const prev = lastClickRef.current;
3661
3762
  const near = prev != null && prev.y === point.y && Math.abs(prev.x - point.x) <= 1 && now - prev.time < MULTI_CLICK_MS;
@@ -3663,18 +3764,23 @@ function TextSelectionController(props) {
3663
3764
  lastClickRef.current = { x: point.x, y: point.y, time: now, count };
3664
3765
  if (count >= 2) {
3665
3766
  const frame = getBuffer()?.frame ?? null;
3666
- const span = count === 2 ? wordSpanAt(frame, point.x, point.y) : lineSpanAt(frame, point.y);
3767
+ const mode = count === 2 ? "word" : "line";
3768
+ const span = spanAtForMode(frame, mode, point);
3667
3769
  if (span) {
3668
- selection.selectSpan(span, count === 2 ? "word" : "line");
3669
- recordBaseline();
3770
+ selection.start({ x: span.sx, y: span.sy }, mode);
3771
+ selection.extend({ x: span.ex, y: span.ey });
3772
+ anchorSpanRef.current = { span, mode };
3773
+ dragScrollTopRef.current = propsRef.current.getScrollState().scrollTop;
3774
+ recordBaseline(rect);
3670
3775
  applyHighlight();
3671
3776
  copySelection();
3672
3777
  return;
3673
3778
  }
3674
3779
  }
3780
+ anchorSpanRef.current = null;
3675
3781
  selection.start(point);
3676
3782
  dragScrollTopRef.current = propsRef.current.getScrollState().scrollTop;
3677
- recordBaseline();
3783
+ recordBaseline(rect);
3678
3784
  applyHighlight();
3679
3785
  return;
3680
3786
  }
@@ -3682,16 +3788,20 @@ function TextSelectionController(props) {
3682
3788
  if (!selection.dragging) {
3683
3789
  return;
3684
3790
  }
3685
- lastClickRef.current = null;
3686
- if (propsRef.current.getScrollState().scrollTop !== dragScrollTopRef.current) {
3791
+ if (!anchorSpanRef.current) {
3792
+ lastClickRef.current = null;
3793
+ }
3794
+ if (activeRectIndexRef.current === 0 && propsRef.current.getScrollState().scrollTop !== dragScrollTopRef.current) {
3687
3795
  clearSelection();
3688
3796
  return;
3689
3797
  }
3690
- const mapped = mapEvent(event);
3691
- if (!mapped) {
3798
+ const point = mapEvent(event);
3799
+ const rect = getActiveRect();
3800
+ if (!point || !rect) {
3801
+ clearSelection();
3692
3802
  return;
3693
3803
  }
3694
- selection.extend(clampToViewport(mapped.point, mapped.rect));
3804
+ extendActiveDrag(clampToViewport(point, rect));
3695
3805
  applyHighlight();
3696
3806
  return;
3697
3807
  }
@@ -3699,12 +3809,18 @@ function TextSelectionController(props) {
3699
3809
  if (!selection.dragging) {
3700
3810
  return;
3701
3811
  }
3702
- const mapped = mapEvent(event);
3703
- if (mapped) {
3704
- selection.extend(clampToViewport(mapped.point, mapped.rect));
3812
+ if (pendingInvalidationGenRef.current === selectionGenerationRef.current) {
3813
+ clearSelection();
3814
+ return;
3815
+ }
3816
+ const point = mapEvent(event);
3817
+ const rect = getActiveRect();
3818
+ if (point && rect) {
3819
+ extendActiveDrag(clampToViewport(point, rect));
3705
3820
  }
3821
+ anchorSpanRef.current = null;
3706
3822
  selection.finish();
3707
- if (selection.isCollapsed || selection.isEmpty) {
3823
+ if (selection.isEmpty || selection.isBareClick) {
3708
3824
  clearSelection();
3709
3825
  return;
3710
3826
  }
@@ -3719,7 +3835,10 @@ function TextSelectionController(props) {
3719
3835
  copySelection,
3720
3836
  recordBaseline,
3721
3837
  mapEvent,
3722
- getBuffer
3838
+ getBuffer,
3839
+ getSelectableRects,
3840
+ getActiveRect,
3841
+ extendActiveDrag
3723
3842
  ]
3724
3843
  );
3725
3844
  useMouseEvents(handleMouse, {
@@ -3736,12 +3855,20 @@ function TextSelectionController(props) {
3736
3855
  return;
3737
3856
  }
3738
3857
  const { scrollTop, scrollHeight } = propsRef.current.getScrollState();
3739
- const viewportRect = propsRef.current.getViewportRect();
3740
- if (scrollTop !== baselineScrollTopRef.current || scrollHeight !== baselineScrollHeightRef.current || !sameViewportRect(baselineViewportRectRef.current, viewportRect) || !sameViewportContent(baselineFrameRef.current, frame, viewportRect)) {
3741
- clearSelection();
3858
+ const activeRect = getActiveRect();
3859
+ const isViewportSelection = activeRectIndexRef.current === 0;
3860
+ if (isViewportSelection && (scrollTop !== baselineScrollTopRef.current || scrollHeight !== baselineScrollHeightRef.current) || !sameViewportRect(baselineRectRef.current, activeRect) || !sameViewportContent(baselineFrameRef.current, frame, activeRect)) {
3861
+ const invalidatedGeneration = selectionGenerationRef.current;
3862
+ pendingInvalidationGenRef.current = invalidatedGeneration;
3863
+ queueMicrotask(() => {
3864
+ pendingInvalidationGenRef.current = null;
3865
+ if (selectionGenerationRef.current === invalidatedGeneration) {
3866
+ clearSelection();
3867
+ }
3868
+ });
3742
3869
  }
3743
3870
  });
3744
- }, [getBuffer, clearSelection]);
3871
+ }, [getBuffer, getActiveRect, clearSelection]);
3745
3872
  (0, import_react13.useEffect)(() => {
3746
3873
  if (!props.isActive) {
3747
3874
  clearSelection();
@@ -3789,7 +3916,7 @@ var VP_BANNER_ITEM = { type: "vp-banner", id: VP_BANNER_ID };
3789
3916
  var virtualEstimatedItemHeight = /* @__PURE__ */ __name((index) => index === 0 ? 10 : 3, "virtualEstimatedItemHeight");
3790
3917
  var virtualKeyExtractor = /* @__PURE__ */ __name((item) => item.type === "vp-banner" ? "vp-banner" : item.id >= 0 ? `h-${item.id}` : `p-${-item.id - 1}`, "virtualKeyExtractor");
3791
3918
  var virtualIsStaticItem = /* @__PURE__ */ __name((item) => item.type === "vp-banner" || item.id > 0, "virtualIsStaticItem");
3792
- var MainContent = /* @__PURE__ */ __name(() => {
3919
+ var MainContent = /* @__PURE__ */ __name(({ footerRef }) => {
3793
3920
  const { version } = useAppContext();
3794
3921
  const uiState = useUIState();
3795
3922
  const { allExpanded: fullDetail } = useThoughtExpanded();
@@ -4019,6 +4146,7 @@ var MainContent = /* @__PURE__ */ __name(() => {
4019
4146
  {
4020
4147
  isActive: !uiState.dialogsVisible,
4021
4148
  getViewportRect: () => scrollRef.current?.getViewportRect() ?? null,
4149
+ getAdditionalSelectableRects: () => footerRef?.current ? [measureElementPosition(footerRef.current)] : [],
4022
4150
  getScrollState: () => scrollRef.current?.getScrollState() ?? {
4023
4151
  scrollTop: 0,
4024
4152
  scrollHeight: 0,
@@ -8060,15 +8188,18 @@ function StatusLineDialog({
8060
8188
  };
8061
8189
  settings.setValue(effectiveScope, "ui.statusLine", savedConfig);
8062
8190
  onSaved?.(savedConfig);
8063
- addItem(
8064
- {
8065
- type: "info" /* INFO */,
8066
- text: `Status line preset saved to ${effectiveScope.toLowerCase()} settings.`
8067
- },
8068
- Date.now()
8069
- );
8191
+ const feedbackItem = {
8192
+ type: "info" /* INFO */,
8193
+ text: `Status line preset saved to ${effectiveScope.toLowerCase()} settings.`
8194
+ };
8195
+ addItem(feedbackItem, Date.now());
8196
+ config.getChatRecordingService?.()?.recordSlashCommand({
8197
+ phase: "result",
8198
+ rawCommand: "/statusline",
8199
+ outputHistoryItems: [feedbackItem]
8200
+ });
8070
8201
  onClose();
8071
- }, [addItem, onClose, onSaved, presetConfig, settings]);
8202
+ }, [addItem, config, onClose, onSaved, presetConfig, settings]);
8072
8203
  useKeypress(
8073
8204
  (key) => {
8074
8205
  if (key.name === "escape") {
@@ -8472,6 +8603,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem, onAuthCh
8472
8603
  pendingAuthType,
8473
8604
  isAuthenticating
8474
8605
  );
8606
+ const openedViaCommandRef = (0, import_react27.useRef)(false);
8475
8607
  const onAuthError = (0, import_react27.useCallback)(
8476
8608
  (error) => {
8477
8609
  setAuthError(error);
@@ -8523,16 +8655,22 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem, onAuthCh
8523
8655
  refreshAuth: /* @__PURE__ */ __name((authType) => config.refreshAuth(authType), "refreshAuth")
8524
8656
  });
8525
8657
  completeAuthentication();
8526
- addItem(
8527
- {
8528
- type: "info" /* INFO */,
8529
- text: t(
8530
- "Successfully configured {{provider}}. Use /model to switch models.",
8531
- { provider: providerConfig.label }
8532
- )
8533
- },
8534
- Date.now()
8535
- );
8658
+ const feedbackItem = {
8659
+ type: "info" /* INFO */,
8660
+ text: t(
8661
+ "Successfully configured {{provider}}. Use /model to switch models.",
8662
+ { provider: providerConfig.label }
8663
+ )
8664
+ };
8665
+ addItem(feedbackItem, Date.now());
8666
+ if (openedViaCommandRef.current) {
8667
+ openedViaCommandRef.current = false;
8668
+ config.getChatRecordingService?.()?.recordSlashCommand({
8669
+ phase: "result",
8670
+ rawCommand: "/auth",
8671
+ outputHistoryItems: [feedbackItem]
8672
+ });
8673
+ }
8536
8674
  logAuth(config, new AuthEvent(protocol, "manual", "success"));
8537
8675
  } catch (error) {
8538
8676
  handleAuthFailure(error, protocol);
@@ -8541,9 +8679,11 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem, onAuthCh
8541
8679
  [settings, config, completeAuthentication, addItem, handleAuthFailure]
8542
8680
  );
8543
8681
  const openAuthDialog = (0, import_react27.useCallback)(() => {
8682
+ openedViaCommandRef.current = true;
8544
8683
  setIsAuthDialogOpen(true);
8545
8684
  }, []);
8546
8685
  const closeAuthDialog = (0, import_react27.useCallback)(() => {
8686
+ openedViaCommandRef.current = false;
8547
8687
  setIsAuthDialogOpen(false);
8548
8688
  setAuthError(null);
8549
8689
  }, []);
@@ -11087,6 +11227,7 @@ function hydrateApiKeyEnvFromSettings(settings, envKey) {
11087
11227
  }
11088
11228
  __name(hydrateApiKeyEnvFromSettings, "hydrateApiKeyEnvFromSettings");
11089
11229
  function handleModelSwitchSuccess({
11230
+ config,
11090
11231
  settings,
11091
11232
  uiState,
11092
11233
  after,
@@ -11108,16 +11249,19 @@ function handleModelSwitchSuccess({
11108
11249
  const baseUrl = after?.baseUrl ?? t("(default)");
11109
11250
  const maskedKey = maskApiKey2(after?.apiKey);
11110
11251
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11111
- uiState?.historyManager.addItem(
11112
- {
11113
- type: "info",
11114
- text: `authType: ${effectiveAuthType ?? `(${t("none")})`}
11252
+ const feedbackItem = {
11253
+ type: "info",
11254
+ text: `authType: ${effectiveAuthType ?? `(${t("none")})`}
11115
11255
  Using ${isRuntime ? "runtime " : ""}model: ${effectiveModelId}${scopeSuffix}
11116
11256
  Base URL: ${baseUrl}
11117
11257
  API key: ${maskedKey}`
11118
- },
11119
- Date.now()
11120
- );
11258
+ };
11259
+ uiState?.historyManager.addItem(feedbackItem, Date.now());
11260
+ config.getChatRecordingService?.()?.recordSlashCommand({
11261
+ phase: "result",
11262
+ rawCommand: "/model",
11263
+ outputHistoryItems: [feedbackItem]
11264
+ });
11121
11265
  }
11122
11266
  __name(handleModelSwitchSuccess, "handleModelSwitchSuccess");
11123
11267
  function formatContextWindow(size) {
@@ -11299,7 +11443,8 @@ function ModelDialog({
11299
11443
  }
11300
11444
  }, [parsedImageModelValue?.selector, isImageModelMode]);
11301
11445
  const preferredModelId = isFastModelMode && parsedFastModelSetting ? parsedFastModelSetting.modelId : isVisionModelMode && parsedVisionModelSetting ? parsedVisionModelSetting.modelId : isImageModelMode && parsedImageModelSetting ? parsedImageModelSetting.modelId : config?.getModel() || MAINLINE_CODER_MODEL;
11302
- const activeRuntimeSnapshot = isFastModelMode || isVoiceModelMode || isVisionModelMode || isCompactionModelMode || isImageModelMode ? void 0 : config?.getActiveRuntimeModelSnapshot?.();
11446
+ const isAuxiliaryModelMode = isFastModelMode || isVoiceModelMode || isVisionModelMode || isCompactionModelMode || isImageModelMode;
11447
+ const activeRuntimeSnapshot = isAuxiliaryModelMode ? void 0 : config?.getActiveRuntimeModelSnapshot?.();
11303
11448
  const currentBaseUrl = config?.getModelsConfig().getGenerationConfig()?.baseUrl;
11304
11449
  const preferredFastModelEntry = isFastModelMode && parsedFastModelSetting ? parsedFastModelSetting.authType ? availableModelEntries.find(
11305
11450
  ({ authType: t2, model }) => t2 === parsedFastModelSetting.authType && model.id === parsedFastModelSetting.modelId
@@ -11360,10 +11505,50 @@ function ModelDialog({
11360
11505
  preferredModelId,
11361
11506
  currentBaseUrl
11362
11507
  ) : "";
11508
+ const closeLatchRef = (0, import_react34.useRef)(false);
11509
+ const selectionInFlightRef = (0, import_react34.useRef)(false);
11510
+ const selectionCommittedRef = (0, import_react34.useRef)(false);
11511
+ const reportAuxiliaryModelSelection = (0, import_react34.useCallback)(
11512
+ (feedbackItem) => {
11513
+ uiState?.historyManager.addItem(feedbackItem, Date.now());
11514
+ config?.getChatRecordingService?.()?.recordSlashCommand({
11515
+ phase: "result",
11516
+ rawCommand: "/model",
11517
+ outputHistoryItems: [feedbackItem]
11518
+ });
11519
+ },
11520
+ [config, uiState]
11521
+ );
11522
+ const closeWithoutSelection = (0, import_react34.useCallback)(() => {
11523
+ if (closeLatchRef.current || selectionInFlightRef.current) return;
11524
+ closeLatchRef.current = true;
11525
+ if (!isAuxiliaryModelMode && !selectionCommittedRef.current) {
11526
+ const feedbackItem = {
11527
+ type: "info",
11528
+ text: t("Kept model as {{model}}", {
11529
+ model: activeRuntimeSnapshot?.modelId ?? preferredModelId
11530
+ })
11531
+ };
11532
+ uiState?.historyManager.addItem(feedbackItem, Date.now());
11533
+ config?.getChatRecordingService?.()?.recordSlashCommand({
11534
+ phase: "result",
11535
+ rawCommand: "/model",
11536
+ outputHistoryItems: [feedbackItem]
11537
+ });
11538
+ }
11539
+ onClose();
11540
+ }, [
11541
+ activeRuntimeSnapshot,
11542
+ config,
11543
+ isAuxiliaryModelMode,
11544
+ onClose,
11545
+ preferredModelId,
11546
+ uiState
11547
+ ]);
11363
11548
  useKeypress(
11364
11549
  (key) => {
11365
- if (key.name === "escape" || key.name === "left" && (isFastModelMode || isVoiceModelMode || isVisionModelMode || isCompactionModelMode || isImageModelMode)) {
11366
- onClose();
11550
+ if (key.name === "escape" || key.name === "left" && isAuxiliaryModelMode) {
11551
+ closeWithoutSelection();
11367
11552
  }
11368
11553
  },
11369
11554
  { isActive: true }
@@ -11388,6 +11573,7 @@ function ModelDialog({
11388
11573
  }, [highlightedValue, preferredKey, availableModelEntries]);
11389
11574
  const handleSelect = (0, import_react34.useCallback)(
11390
11575
  async (selected) => {
11576
+ if (selectionInFlightRef.current || selectionCommittedRef.current) return;
11391
11577
  setErrorMessage(null);
11392
11578
  const selectedEntry = availableModelEntries.find(
11393
11579
  ({ authType: t2, model, isRuntime: isRuntime2, snapshotId }) => {
@@ -11420,13 +11606,10 @@ function ModelDialog({
11420
11606
  const scope = resolvePersistScope(settings, persistScope);
11421
11607
  settings.setValue(scope, "voiceModel", voiceModel);
11422
11608
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11423
- uiState?.historyManager.addItem(
11424
- {
11425
- type: "success",
11426
- text: `${t("Voice Model")}: ${voiceModel}${scopeSuffix}`
11427
- },
11428
- Date.now()
11429
- );
11609
+ reportAuxiliaryModelSelection({
11610
+ type: "success",
11611
+ text: `${t("Voice Model")}: ${voiceModel}${scopeSuffix}`
11612
+ });
11430
11613
  onClose();
11431
11614
  return;
11432
11615
  }
@@ -11437,13 +11620,10 @@ function ModelDialog({
11437
11620
  settings.setValue(scope, "fastModel", fastModel);
11438
11621
  config?.setFastModel(fastModel);
11439
11622
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11440
- uiState?.historyManager.addItem(
11441
- {
11442
- type: "success",
11443
- text: `${t("Fast Model")}: ${fastModel}${scopeSuffix}`
11444
- },
11445
- Date.now()
11446
- );
11623
+ reportAuxiliaryModelSelection({
11624
+ type: "success",
11625
+ text: `${t("Fast Model")}: ${fastModel}${scopeSuffix}`
11626
+ });
11447
11627
  onClose();
11448
11628
  return;
11449
11629
  }
@@ -11465,13 +11645,10 @@ function ModelDialog({
11465
11645
  const visionWarning = selectedEntry && !isImageCapable(selectedEntry.model) ? `
11466
11646
  ${t("\u26A0 '{{model}}' is not a known image-capable model; the vision bridge may fail on images.", { model: visionModelDisplay })}` : "";
11467
11647
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11468
- uiState?.historyManager.addItem(
11469
- {
11470
- type: "success",
11471
- text: `${t("Vision Model")}: ${visionModelDisplay}${scopeSuffix}${visionWarning}`
11472
- },
11473
- Date.now()
11474
- );
11648
+ reportAuxiliaryModelSelection({
11649
+ type: "success",
11650
+ text: `${t("Vision Model")}: ${visionModelDisplay}${scopeSuffix}${visionWarning}`
11651
+ });
11475
11652
  onClose();
11476
11653
  return;
11477
11654
  }
@@ -11485,13 +11662,10 @@ ${t("\u26A0 '{{model}}' is not a known image-capable model; the vision bridge ma
11485
11662
  settings.setValue(scope, "compactionModel", compactionModelId);
11486
11663
  config.setCompactionModel(compactionModelId);
11487
11664
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11488
- uiState?.historyManager.addItem(
11489
- {
11490
- type: "success",
11491
- text: `${t("Compaction Model")}: ${compactionModelId}${scopeSuffix}`
11492
- },
11493
- Date.now()
11494
- );
11665
+ reportAuxiliaryModelSelection({
11666
+ type: "success",
11667
+ text: `${t("Compaction Model")}: ${compactionModelId}${scopeSuffix}`
11668
+ });
11495
11669
  onClose();
11496
11670
  return;
11497
11671
  }
@@ -11513,15 +11687,17 @@ ${t("\u26A0 '{{model}}' is not a known image-capable model; the vision bridge ma
11513
11687
  }
11514
11688
  const scope = resolvePersistScope(settings, persistScope);
11515
11689
  settings.setValue(scope, "imageModel", imageModel);
11516
- await config.setImageModel(imageModel);
11690
+ selectionInFlightRef.current = true;
11691
+ try {
11692
+ await config.setImageModel(imageModel);
11693
+ } finally {
11694
+ selectionInFlightRef.current = false;
11695
+ }
11517
11696
  const scopeSuffix = persistScope === "workspace" ? t(" (this project)") : persistScope === "user" ? t(" (global)") : "";
11518
- uiState?.historyManager.addItem(
11519
- {
11520
- type: "success",
11521
- text: `${t("Image Model")}: ${imageModelDisplay}${scopeSuffix}`
11522
- },
11523
- Date.now()
11524
- );
11697
+ reportAuxiliaryModelSelection({
11698
+ type: "success",
11699
+ text: `${t("Image Model")}: ${imageModelDisplay}${scopeSuffix}`
11700
+ });
11525
11701
  onClose();
11526
11702
  return;
11527
11703
  }
@@ -11564,10 +11740,16 @@ ${t("\u26A0 '{{model}}' is not a known image-capable model; the vision bridge ma
11564
11740
  modelId = parsed.modelId;
11565
11741
  selectedBaseUrl = parsed.baseUrl;
11566
11742
  }
11567
- await config.switchModel(selectedAuthType, modelId, {
11568
- ...selectedAuthType !== authType && selectedAuthType === "qwen-oauth" /* QWEN_OAUTH */ ? { requireCachedCredentials: true } : {},
11569
- baseUrl: selectedBaseUrl
11570
- });
11743
+ selectionInFlightRef.current = true;
11744
+ try {
11745
+ await config.switchModel(selectedAuthType, modelId, {
11746
+ ...selectedAuthType !== authType && selectedAuthType === "qwen-oauth" /* QWEN_OAUTH */ ? { requireCachedCredentials: true } : {},
11747
+ baseUrl: selectedBaseUrl
11748
+ });
11749
+ selectionCommittedRef.current = true;
11750
+ } finally {
11751
+ selectionInFlightRef.current = false;
11752
+ }
11571
11753
  if (!isRuntime) {
11572
11754
  const event = new ModelSlashCommandEvent(modelId);
11573
11755
  logModelSlashCommand(config, event);
@@ -11584,22 +11766,34 @@ ${t("\u26A0 '{{model}}' is not a known image-capable model; the vision bridge ma
11584
11766
  ${baseErrorMessage}`);
11585
11767
  return;
11586
11768
  }
11587
- handleModelSwitchSuccess({
11588
- settings,
11589
- uiState,
11590
- after,
11591
- effectiveAuthType,
11592
- effectiveModelId,
11593
- // Persist the selected provider's baseUrl so the right provider is
11594
- // restored next launch when several share the same id. Pair it with the
11595
- // same resolved config that effectiveModelId comes from (`after`) so the
11596
- // persisted (model.name, model.baseUrl) stays consistent even if
11597
- // switchModel transforms the id; fall back to the picker entry's
11598
- // baseUrl. Runtime models are keyed by snapshot id, so no disambiguator.
11599
- effectiveBaseUrl: isRuntime ? void 0 : after?.baseUrl ?? selectedEntry?.model.baseUrl,
11600
- isRuntime,
11601
- persistScope
11602
- });
11769
+ try {
11770
+ handleModelSwitchSuccess({
11771
+ config,
11772
+ settings,
11773
+ uiState,
11774
+ after,
11775
+ effectiveAuthType,
11776
+ effectiveModelId,
11777
+ // Persist the selected provider's baseUrl so the right provider is
11778
+ // restored next launch when several share the same id. Pair it with the
11779
+ // same resolved config that effectiveModelId comes from (`after`) so the
11780
+ // persisted (model.name, model.baseUrl) stays consistent even if
11781
+ // switchModel transforms the id; fall back to the picker entry's
11782
+ // baseUrl. Runtime models are keyed by snapshot id, so no disambiguator.
11783
+ effectiveBaseUrl: isRuntime ? void 0 : after?.baseUrl ?? selectedEntry?.model.baseUrl,
11784
+ isRuntime,
11785
+ persistScope
11786
+ });
11787
+ } catch (e) {
11788
+ const errorMessage2 = e instanceof Error ? e.message : String(e);
11789
+ setErrorMessage(
11790
+ `${t("Model switched, but the selection could not be saved.")}
11791
+
11792
+ ${errorMessage2}`
11793
+ );
11794
+ return;
11795
+ }
11796
+ closeLatchRef.current = true;
11603
11797
  onClose();
11604
11798
  },
11605
11799
  [
@@ -11615,7 +11809,8 @@ ${baseErrorMessage}`);
11615
11809
  isCompactionModelMode,
11616
11810
  isImageModelMode,
11617
11811
  availableModelEntries,
11618
- persistScope
11812
+ persistScope,
11813
+ reportAuxiliaryModelSelection
11619
11814
  ]
11620
11815
  );
11621
11816
  const hasModels = MODEL_OPTIONS.length > 0;
@@ -17537,6 +17732,7 @@ var PluginDetailView = /* @__PURE__ */ __name(({
17537
17732
  isFavorite ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Text, { color: theme.status.warning, children: " \u2605" }) : null
17538
17733
  ] }),
17539
17734
  ext.installMetadata && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(InfoRow, { label: t("Source:"), children: redactUrlCredentials(ext.installMetadata.source) }),
17735
+ ext.installMetadata?.originSource && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(InfoRow, { label: t("Origin:"), children: ext.installMetadata.originSource }),
17540
17736
  /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(InfoRow, { label: t("Components:"), children: componentSummary(ext) })
17541
17737
  ] }),
17542
17738
  /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Box_default, { flexDirection: "column", children: [
@@ -31701,7 +31897,7 @@ var PasteProgressBar = /* @__PURE__ */ __name(({
31701
31897
  label
31702
31898
  ] });
31703
31899
  }, "PasteProgressBar");
31704
- var Footer = /* @__PURE__ */ __name(() => {
31900
+ var Footer = /* @__PURE__ */ __name(({ containerRef }) => {
31705
31901
  const uiState = useUIState();
31706
31902
  const config = useConfig();
31707
31903
  const settings = useSettings();
@@ -31793,6 +31989,7 @@ var Footer = /* @__PURE__ */ __name(() => {
31793
31989
  return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
31794
31990
  Box_default,
31795
31991
  {
31992
+ ref: containerRef,
31796
31993
  flexDirection: isNarrow ? "column" : "row",
31797
31994
  justifyContent: isNarrow ? "flex-start" : "space-between",
31798
31995
  width: "100%",
@@ -31976,7 +32173,7 @@ var KeyboardShortcuts = /* @__PURE__ */ __name(() => {
31976
32173
 
31977
32174
  // packages/cli/src/ui/components/Composer.tsx
31978
32175
  var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1);
31979
- var Composer = /* @__PURE__ */ __name(() => {
32176
+ var Composer = /* @__PURE__ */ __name(({ footerRef }) => {
31980
32177
  const config = useConfig();
31981
32178
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
31982
32179
  const uiState = useUIState();
@@ -32056,7 +32253,7 @@ var Composer = /* @__PURE__ */ __name(() => {
32056
32253
  clipboardUnavailableShownRef
32057
32254
  }
32058
32255
  ),
32059
- uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Footer, {}))
32256
+ uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Footer, { containerRef: footerRef }))
32060
32257
  ] });
32061
32258
  }, "Composer");
32062
32259
 
@@ -33400,6 +33597,7 @@ var AgentRow = /* @__PURE__ */ __name(({ entry, now, selected = false, tree }) =
33400
33597
  var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1);
33401
33598
  var DefaultAppLayout = /* @__PURE__ */ __name(() => {
33402
33599
  const uiState = useUIState();
33600
+ const footerRef = (0, import_react115.useRef)(null);
33403
33601
  const { refreshStatic } = useUIActions();
33404
33602
  const { activeView, agents } = useAgentViewState();
33405
33603
  const { columns: terminalWidth } = useTerminalSize();
@@ -33432,7 +33630,7 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
33432
33630
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ExitWarning, {})
33433
33631
  ] })
33434
33632
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
33435
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MainContent, {}),
33633
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MainContent, { footerRef }),
33436
33634
  /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
33437
33635
  !uiState.dialogsVisible && uiState.updateInfo && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(UpdateNotification, { message: uiState.updateInfo.message }),
33438
33636
  uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
@@ -33467,7 +33665,7 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
33467
33665
  containerWidth: uiState.mainAreaWidth
33468
33666
  }
33469
33667
  ) }),
33470
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Composer, {})
33668
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Composer, { footerRef })
33471
33669
  ] }),
33472
33670
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ExitWarning, {}),
33473
33671
  !uiState.dialogsVisible && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
@@ -33844,7 +34042,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
33844
34042
  __name(installTerminalResizeReflow, "installTerminalResizeReflow");
33845
34043
 
33846
34044
  // packages/cli/src/ui/AppContainer.tsx
33847
- import process17 from "node:process";
34045
+ import process18 from "node:process";
33848
34046
 
33849
34047
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
33850
34048
  init_esbuild_shims();
@@ -33955,25 +34153,28 @@ __name(useWakeRepaint, "useWakeRepaint");
33955
34153
  init_esbuild_shims();
33956
34154
  var import_react119 = __toESM(require_react(), 1);
33957
34155
  import process13 from "node:process";
33958
- var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError) => {
34156
+ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError, config) => {
33959
34157
  const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react119.useState)(!!initialThemeError);
33960
34158
  const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react119.useState)(themeManager.getActiveTheme().name);
33961
34159
  const openThemeDialog = (0, import_react119.useCallback)(() => {
33962
34160
  if (process13.env["NO_COLOR"]) {
33963
- addItem(
33964
- {
33965
- type: "info" /* INFO */,
33966
- text: t(
33967
- "Theme configuration unavailable due to NO_COLOR env variable."
33968
- )
33969
- },
33970
- Date.now()
33971
- );
34161
+ const feedbackItem = {
34162
+ type: "info" /* INFO */,
34163
+ text: t(
34164
+ "Theme configuration unavailable due to NO_COLOR env variable."
34165
+ )
34166
+ };
34167
+ addItem(feedbackItem, Date.now());
34168
+ config?.getChatRecordingService?.()?.recordSlashCommand({
34169
+ phase: "result",
34170
+ rawCommand: "/theme",
34171
+ outputHistoryItems: [feedbackItem]
34172
+ });
33972
34173
  return;
33973
34174
  }
33974
34175
  setThemeBeforeDialogOpen(themeManager.getActiveTheme().name);
33975
34176
  setIsThemeDialogOpen(true);
33976
- }, [addItem]);
34177
+ }, [addItem, config]);
33977
34178
  const applyTheme = (0, import_react119.useCallback)(
33978
34179
  (themeName) => {
33979
34180
  if (!themeManager.setActiveTheme(themeName)) {
@@ -34160,7 +34361,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
34160
34361
  // packages/cli/src/ui/hooks/useEditorSettings.ts
34161
34362
  init_esbuild_shims();
34162
34363
  var import_react121 = __toESM(require_react(), 1);
34163
- var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem) => {
34364
+ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem, config) => {
34164
34365
  const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react121.useState)(false);
34165
34366
  const openEditorDialog = (0, import_react121.useCallback)(() => {
34166
34367
  setIsEditorDialogOpen(true);
@@ -34172,20 +34373,23 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
34172
34373
  }
34173
34374
  try {
34174
34375
  loadedSettings.setValue(scope, "general.preferredEditor", editorType);
34175
- addItem(
34176
- {
34177
- type: "info" /* INFO */,
34178
- text: `Editor preference ${editorType ? `set to "${editorType}"` : "cleared"} in ${scope} settings.`
34179
- },
34180
- Date.now()
34181
- );
34376
+ const feedbackItem = {
34377
+ type: "info" /* INFO */,
34378
+ text: `Editor preference ${editorType ? `set to "${editorType}"` : "cleared"} in ${scope} settings.`
34379
+ };
34380
+ addItem(feedbackItem, Date.now());
34381
+ config?.getChatRecordingService?.()?.recordSlashCommand({
34382
+ phase: "result",
34383
+ rawCommand: "/editor",
34384
+ outputHistoryItems: [feedbackItem]
34385
+ });
34182
34386
  setEditorError(null);
34183
34387
  setIsEditorDialogOpen(false);
34184
34388
  } catch (error) {
34185
34389
  setEditorError(`Failed to set editor preference: ${error}`);
34186
34390
  }
34187
34391
  },
34188
- [loadedSettings, setEditorError, addItem]
34392
+ [loadedSettings, setEditorError, addItem, config]
34189
34393
  );
34190
34394
  const exitEditorDialog = (0, import_react121.useCallback)(() => {
34191
34395
  setIsEditorDialogOpen(false);
@@ -34345,36 +34549,23 @@ var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem)
34345
34549
  if (!effort) {
34346
34550
  return;
34347
34551
  }
34348
- const applied = applyReasoningEffort(config, effort);
34552
+ applyReasoningEffort(config, effort);
34349
34553
  loadedSettings.setValue(
34350
34554
  getPersistScopeForModelSelection(loadedSettings),
34351
34555
  "model.reasoningEffort",
34352
34556
  effort
34353
34557
  );
34354
34558
  if (addItem) {
34355
- if (!applied) {
34356
- addItem(
34357
- {
34358
- type: "info" /* INFO */,
34359
- text: t(
34360
- "Reasoning effort set to {{tier}}, but thinking is currently disabled \u2014 it will take effect when thinking is re-enabled.",
34361
- { tier: effort }
34362
- )
34363
- },
34364
- Date.now()
34365
- );
34366
- } else {
34367
- addItem(
34368
- {
34369
- type: "info" /* INFO */,
34370
- text: t(
34371
- "Reasoning effort: {{tier}} (requested; the effective tier depends on the active provider/model).",
34372
- { tier: effort }
34373
- )
34374
- },
34375
- Date.now()
34376
- );
34377
- }
34559
+ const feedbackItem = {
34560
+ type: "info" /* INFO */,
34561
+ text: formatEffortChangeMessage(config, effort)
34562
+ };
34563
+ addItem(feedbackItem, Date.now());
34564
+ config.getChatRecordingService?.()?.recordSlashCommand({
34565
+ phase: "result",
34566
+ rawCommand: "/effort",
34567
+ outputHistoryItems: [feedbackItem]
34568
+ });
34378
34569
  }
34379
34570
  } finally {
34380
34571
  setIsEffortDialogOpen(false);
@@ -34919,6 +35110,7 @@ __name(useDeleteCommand, "useDeleteCommand");
34919
35110
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
34920
35111
  init_esbuild_shims();
34921
35112
  var import_react129 = __toESM(require_react(), 1);
35113
+ import process15 from "node:process";
34922
35114
  var debugLogger34 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
34923
35115
  function hasUserPromptExpansionHooks(config) {
34924
35116
  return !!config && !config.getDisableAllHooks?.() && (config.hasHooksForEvent?.("UserPromptExpansion") ?? false);
@@ -34944,7 +35136,42 @@ var SLASH_COMMANDS_SKIP_RECORDING = /* @__PURE__ */ new Set([
34944
35136
  "btw",
34945
35137
  "history"
34946
35138
  ]);
35139
+ var SLASH_COMMAND_ROOTS_HIDE_INVOCATION = /* @__PURE__ */ new Set([
35140
+ "auth",
35141
+ "diff",
35142
+ "editor",
35143
+ "help",
35144
+ "settings",
35145
+ "status",
35146
+ "stats",
35147
+ "theme"
35148
+ ]);
35149
+ var BARE_SLASH_COMMANDS_HIDE_INVOCATION = /* @__PURE__ */ new Set([
35150
+ "effort",
35151
+ "model",
35152
+ "statusline"
35153
+ ]);
34947
35154
  var MAX_EXTENSION_CONTENT_REFRESH_PASSES = 5;
35155
+ function shouldHideSlashCommandInvocation(command, canonicalPath, args) {
35156
+ if (command?.kind !== "built-in" /* BUILT_IN */) {
35157
+ return false;
35158
+ }
35159
+ if (canonicalPath.length === 1 && SLASH_COMMAND_ROOTS_HIDE_INVOCATION.has(canonicalPath[0] ?? "")) {
35160
+ if (canonicalPath[0] === "theme" && process15.env["NO_COLOR"]) {
35161
+ return false;
35162
+ }
35163
+ return true;
35164
+ }
35165
+ const path15 = canonicalPath.join(" ");
35166
+ if (BARE_SLASH_COMMANDS_HIDE_INVOCATION.has(path15)) {
35167
+ if (path15 === "model") {
35168
+ return isPickerOnlyModelInvocation(args);
35169
+ }
35170
+ return args.trim() === "";
35171
+ }
35172
+ return false;
35173
+ }
35174
+ __name(shouldHideSlashCommandInvocation, "shouldHideSlashCommandInvocation");
34948
35175
  function getSkillCommandName(command) {
34949
35176
  return command.skillDetail?.name ?? command.name;
34950
35177
  }
@@ -35497,6 +35724,11 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35497
35724
  if (trimmed.startsWith("/") && hasSlashCommandPathSeparator(trimmed)) {
35498
35725
  return false;
35499
35726
  }
35727
+ const {
35728
+ commandToExecute,
35729
+ args,
35730
+ canonicalPath: resolvedCommandPath
35731
+ } = parseSlashCommand(trimmed, commands);
35500
35732
  const recordedItems = [];
35501
35733
  const recordItem = /* @__PURE__ */ __name((item) => {
35502
35734
  recordedItems.push(item);
@@ -35511,19 +35743,29 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35511
35743
  const userMessageTimestamp = Date.now();
35512
35744
  let invocationItemId = existingInvocationItemId;
35513
35745
  let invocationSentToModel = false;
35514
- if (!isBtwCommand(trimmed) && invocationItemId === void 0) {
35746
+ let hideInvocation = isBtwCommand(trimmed) || shouldHideSlashCommandInvocation(
35747
+ commandToExecute,
35748
+ resolvedCommandPath,
35749
+ args
35750
+ );
35751
+ if (!hideInvocation && invocationItemId === void 0) {
35515
35752
  invocationItemId = addItemWithRecording(
35516
35753
  { type: "user" /* USER */, text: trimmed, sentToModel: false },
35517
35754
  userMessageTimestamp
35518
35755
  );
35519
35756
  }
35757
+ const revealHiddenInvocation = /* @__PURE__ */ __name(() => {
35758
+ if (resolvedCommandPath.join(" ") !== "model" || !hideInvocation || invocationItemId !== void 0) {
35759
+ return;
35760
+ }
35761
+ hideInvocation = false;
35762
+ invocationItemId = addItemWithRecording(
35763
+ { type: "user" /* USER */, text: trimmed, sentToModel: false },
35764
+ userMessageTimestamp
35765
+ );
35766
+ }, "revealHiddenInvocation");
35520
35767
  let hasError = false;
35521
35768
  let delegatedToRecursiveInvocation = false;
35522
- const {
35523
- commandToExecute,
35524
- args,
35525
- canonicalPath: resolvedCommandPath
35526
- } = parseSlashCommand(trimmed, commands);
35527
35769
  const subcommand = resolvedCommandPath.length > 1 ? resolvedCommandPath.slice(1).join(" ") : void 0;
35528
35770
  const isSkillCommand = commandToExecute?.kind === "skill" /* SKILL */;
35529
35771
  let skillInvocationRecorded = false;
@@ -35669,24 +35911,22 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35669
35911
  toolArgs: result.toolArgs
35670
35912
  };
35671
35913
  case "message":
35914
+ revealHiddenInvocation();
35672
35915
  if (result.messageType === "info") {
35673
- addMessage({
35674
- type: "info" /* INFO */,
35675
- content: result.content,
35676
- timestamp: /* @__PURE__ */ new Date()
35677
- });
35916
+ addItemWithRecording(
35917
+ { type: "info" /* INFO */, text: result.content },
35918
+ Date.now()
35919
+ );
35678
35920
  } else if (result.messageType === "warning") {
35679
- addMessage({
35680
- type: "warning" /* WARNING */,
35681
- content: result.content,
35682
- timestamp: /* @__PURE__ */ new Date()
35683
- });
35921
+ addItemWithRecording(
35922
+ { type: "warning" /* WARNING */, text: result.content },
35923
+ Date.now()
35924
+ );
35684
35925
  } else {
35685
- addMessage({
35686
- type: "error" /* ERROR */,
35687
- content: result.content,
35688
- timestamp: /* @__PURE__ */ new Date()
35689
- });
35926
+ addItemWithRecording(
35927
+ { type: "error" /* ERROR */, text: result.content },
35928
+ Date.now()
35929
+ );
35690
35930
  }
35691
35931
  return { type: "handled" };
35692
35932
  case "goal_control": {
@@ -35884,8 +36124,8 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35884
36124
  output.getAdditionalContext()
35885
36125
  );
35886
36126
  }
36127
+ invocationSentToModel = true;
35887
36128
  if (invocationItemId !== void 0) {
35888
- invocationSentToModel = true;
35889
36129
  debugLogger34.debug(
35890
36130
  `Marked slash command invocation as model-sent: /${resolvedCommandPath.join(
35891
36131
  " "
@@ -36024,7 +36264,8 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
36024
36264
  chatRecorder?.recordSlashCommand({
36025
36265
  phase: "invocation",
36026
36266
  rawCommand: trimmed,
36027
- sentToModel: invocationSentToModel
36267
+ sentToModel: invocationSentToModel,
36268
+ hiddenInvocation: hideInvocation
36028
36269
  });
36029
36270
  const outputItems = recordedItems.filter((item) => item.type !== "user").map(serializeHistoryItemForRecording);
36030
36271
  chatRecorder?.recordSlashCommand({
@@ -36121,7 +36362,7 @@ __name(useDoublePress, "useDoublePress");
36121
36362
  import * as fs20 from "node:fs";
36122
36363
  import { basename as basename3 } from "node:path";
36123
36364
 
36124
- // packages/cli/src/utils/windowTitle.ts
36365
+ // packages/cli/src/ui/utils/windowTitle.ts
36125
36366
  init_esbuild_shims();
36126
36367
  var DEFAULT_WINDOW_TITLE = "qwen";
36127
36368
  var MULTIPLEXER_ENV_KEYS = ["TMUX", "STY", "ZELLIJ", "DVTM"];
@@ -36157,10 +36398,22 @@ function writeTerminalTitle(write, title) {
36157
36398
  }
36158
36399
  }
36159
36400
  __name(writeTerminalTitle, "writeTerminalTitle");
36160
- function formatSessionWindowTitle(sessionName, folderName) {
36161
- return sessionName ? sanitizeWindowTitle(sessionName) : computeWindowTitle(folderName);
36401
+ function formatSessionWindowTitle(sessionName, folderName, statusPrefix = "") {
36402
+ const base = sessionName ? sanitizeWindowTitle(sessionName) : computeWindowTitle(folderName);
36403
+ return sanitizeWindowTitle(statusPrefix + base);
36162
36404
  }
36163
36405
  __name(formatSessionWindowTitle, "formatSessionWindowTitle");
36406
+ function titleStatusPrefix(streamingState) {
36407
+ switch (streamingState) {
36408
+ case "responding" /* Responding */:
36409
+ return `${ICON.CIRCLE_LEFT_HALF} `;
36410
+ case "waiting_for_confirmation" /* WaitingForConfirmation */:
36411
+ return `${ICON.SPARKLE} `;
36412
+ default:
36413
+ return "";
36414
+ }
36415
+ }
36416
+ __name(titleStatusPrefix, "titleStatusPrefix");
36164
36417
 
36165
36418
  // packages/cli/src/ui/hooks/useLogger.ts
36166
36419
  init_esbuild_shims();
@@ -36802,7 +37055,7 @@ __name(mapToDisplay, "mapToDisplay");
36802
37055
  // packages/cli/src/ui/hooks/useGeminiStream.ts
36803
37056
  import { promises as fs17 } from "node:fs";
36804
37057
  import path12 from "node:path";
36805
- import process15 from "node:process";
37058
+ import process16 from "node:process";
36806
37059
 
36807
37060
  // packages/cli/src/ui/hooks/useMessageQueue.ts
36808
37061
  init_esbuild_shims();
@@ -37164,6 +37417,8 @@ __name(charIndexAfterLine, "charIndexAfterLine");
37164
37417
  var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef, goalQueueRef) => {
37165
37418
  const [initError, setInitError] = (0, import_react136.useState)(null);
37166
37419
  const abortControllerRef = (0, import_react136.useRef)(null);
37420
+ const activeInteractionPromptIdRef = (0, import_react136.useRef)(void 0);
37421
+ const activeInteractionOwnerRef = (0, import_react136.useRef)(void 0);
37167
37422
  const activeGoalTurnRef = (0, import_react136.useRef)(null);
37168
37423
  const activeGoalAdmissionRef = (0, import_react136.useRef)(null);
37169
37424
  const goalTurnBindingsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Map());
@@ -37366,6 +37621,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37366
37621
  /* @__PURE__ */ new Set()
37367
37622
  );
37368
37623
  const pendingDuplicateToolResponsesRef = (0, import_react136.useRef)([]);
37624
+ const interactionOwnersByToolCallIdRef = (0, import_react136.useRef)(
37625
+ /* @__PURE__ */ new Map()
37626
+ );
37369
37627
  const immediateDuplicateToolResponsesRef = (0, import_react136.useRef)(null);
37370
37628
  const streamingResponseLengthRef = (0, import_react136.useRef)(0);
37371
37629
  const [isReceivingContent, setIsReceivingContent] = (0, import_react136.useState)(false);
@@ -37538,6 +37796,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37538
37796
  submissionLeaseGenerationRef.current += 1;
37539
37797
  setSubmissionInFlight(false);
37540
37798
  abortControllerRef.current?.abort();
37799
+ const activeInteractionPromptId = activeInteractionPromptIdRef.current;
37800
+ const activeInteractionOwner = activeInteractionOwnerRef.current;
37801
+ if (activeInteractionPromptId && activeInteractionOwner && getActiveInteractionSpan(activeInteractionPromptId) === activeInteractionOwner) {
37802
+ endInteractionSpan("cancelled", {
37803
+ promptId: activeInteractionPromptId
37804
+ });
37805
+ activeInteractionOwnerRef.current = void 0;
37806
+ }
37541
37807
  const loopWakeupsCancelled = config.getCronScheduler()?.cancelAllWakeups() ?? 0;
37542
37808
  for (const ac of auxiliaryAbortRefsRef.current) {
37543
37809
  ac.abort();
@@ -38330,7 +38596,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38330
38596
  [addItem, commitItemInOrder, pendingHistoryItemRef, setPendingHistoryItem]
38331
38597
  );
38332
38598
  const processGeminiStreamEvents = (0, import_react136.useCallback)(
38333
- async (stream, userMessageTimestamp, signal, submitType, turnAdmission) => {
38599
+ async (stream, userMessageTimestamp, signal, submitType, turnAdmission, promptId, trackInteractionOwner = true) => {
38334
38600
  let geminiMessageBuffer = "";
38335
38601
  let thoughtBuffer = "";
38336
38602
  let scheduledToolContinuation = false;
@@ -38466,6 +38732,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38466
38732
  dualOutput?.startAssistantMessage();
38467
38733
  try {
38468
38734
  for await (const event of stream) {
38735
+ if (trackInteractionOwner && promptId) {
38736
+ activeInteractionOwnerRef.current ??= getActiveInteractionSpan(promptId);
38737
+ }
38469
38738
  dualOutput?.processEvent(event);
38470
38739
  switch (event.type) {
38471
38740
  case "thought" /* Thought */:
@@ -38787,6 +39056,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38787
39056
  }
38788
39057
  }
38789
39058
  if (executableToolCallRequests.length > 0) {
39059
+ const interactionOwner = activeInteractionOwnerRef.current;
39060
+ if (trackInteractionOwner && interactionOwner) {
39061
+ for (const request of executableToolCallRequests) {
39062
+ interactionOwnersByToolCallIdRef.current.set(
39063
+ request.callId,
39064
+ interactionOwner
39065
+ );
39066
+ }
39067
+ }
38790
39068
  scheduledToolContinuation = true;
38791
39069
  scheduleToolCalls(
38792
39070
  executableToolCallRequests,
@@ -39136,6 +39414,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39136
39414
  if (!prompt_id) {
39137
39415
  prompt_id = config.getSessionId() + "########" + getPromptCount();
39138
39416
  }
39417
+ if (!allowConcurrentBtwDuringResponse) {
39418
+ activeInteractionPromptIdRef.current = prompt_id;
39419
+ if (submitType !== "toolResult" /* ToolResult */ && submitType !== "hook" /* Hook */ && submitType !== "steer" /* Steer */) {
39420
+ activeInteractionOwnerRef.current = void 0;
39421
+ }
39422
+ }
39139
39423
  return promptIdContext.run(prompt_id, async () => {
39140
39424
  let queuedGoal = metadata?.goal;
39141
39425
  let preparedQuery;
@@ -39307,7 +39591,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39307
39591
  userMessageTimestamp,
39308
39592
  processingSignal,
39309
39593
  submitType,
39310
- turnAdmission
39594
+ turnAdmission,
39595
+ prompt_id,
39596
+ !allowConcurrentBtwDuringResponse
39311
39597
  );
39312
39598
  if (!goalBinding && turnAdmission && activeGoalTurnRef.current?.controller === turnAdmission.controller && activeGoalTurnRef.current.turnKey === turnAdmission.turnKey) {
39313
39599
  goalBinding = activeGoalTurnRef.current;
@@ -39614,6 +39900,34 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39614
39900
  const geminiTools = completedAndReadyToSubmitTools.filter(
39615
39901
  (t2) => !t2.request.isClientInitiated && !historyCallIdsWithResponse.has(t2.request.callId)
39616
39902
  );
39903
+ const terminalPromptId = completedAndReadyToSubmitTools.find(
39904
+ (toolCall) => !toolCall.request.isClientInitiated
39905
+ )?.request.prompt_id;
39906
+ const ownerToolCall = geminiTools[0] ?? completedAndReadyToSubmitTools.find(
39907
+ (toolCall) => !toolCall.request.isClientInitiated
39908
+ );
39909
+ const interactionOwner = ownerToolCall ? interactionOwnersByToolCallIdRef.current.get(
39910
+ ownerToolCall.request.callId
39911
+ ) ?? (activeInteractionPromptIdRef.current === ownerToolCall.request.prompt_id ? activeInteractionOwnerRef.current : void 0) : void 0;
39912
+ for (const toolCall of completedAndReadyToSubmitTools) {
39913
+ interactionOwnersByToolCallIdRef.current.delete(
39914
+ toolCall.request.callId
39915
+ );
39916
+ }
39917
+ let promptId = geminiTools[0]?.request.prompt_id;
39918
+ const endToolInteraction = /* @__PURE__ */ __name((status, errorMessage, errorType) => {
39919
+ if (!promptId || !interactionOwner || getActiveInteractionSpan(promptId) !== interactionOwner) {
39920
+ return;
39921
+ }
39922
+ endInteractionSpan(status, {
39923
+ promptId,
39924
+ ...errorMessage ? { errorMessage } : {},
39925
+ ...errorType ? { errorType } : {}
39926
+ });
39927
+ if (activeInteractionOwnerRef.current === interactionOwner) {
39928
+ activeInteractionOwnerRef.current = void 0;
39929
+ }
39930
+ }, "endToolInteraction");
39617
39931
  let toolGoalPermit;
39618
39932
  const toolGoalContexts = geminiTools.map(
39619
39933
  (toolCall) => toolCall.request.goalContext
@@ -39650,6 +39964,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39650
39964
  },
39651
39965
  Date.now()
39652
39966
  );
39967
+ endToolInteraction(
39968
+ "error",
39969
+ "invalid Goal tool context",
39970
+ "continuation_goal_context_invalid"
39971
+ );
39653
39972
  return;
39654
39973
  }
39655
39974
  if (!toolGoalPermit && toolGoalContexts.length > 0) {
@@ -39676,6 +39995,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39676
39995
  },
39677
39996
  Date.now()
39678
39997
  );
39998
+ endToolInteraction(
39999
+ "error",
40000
+ "missing Goal tool context",
40001
+ "continuation_goal_context_missing"
40002
+ );
39679
40003
  return;
39680
40004
  }
39681
40005
  }
@@ -39695,6 +40019,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39695
40019
  },
39696
40020
  Date.now()
39697
40021
  );
40022
+ endToolInteraction(
40023
+ "error",
40024
+ "stale Goal tool context",
40025
+ "continuation_goal_context_stale"
40026
+ );
39698
40027
  return;
39699
40028
  }
39700
40029
  toolGoalBinding = existing ?? bindGoalTurn(
@@ -39761,6 +40090,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39761
40090
  (batch) => batch.duplicateResponses
39762
40091
  );
39763
40092
  const pendingDuplicatePromptId = readyDuplicateBatches[0]?.promptId;
40093
+ if (!promptId && pendingDuplicatePromptId) {
40094
+ promptId = pendingDuplicatePromptId;
40095
+ }
39764
40096
  for (const toolCall of geminiTools) {
39765
40097
  geminiClient?.recordCompletedToolCall(
39766
40098
  toolCall.request.name,
@@ -39768,12 +40100,30 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39768
40100
  );
39769
40101
  }
39770
40102
  if (geminiTools.length === 0 && pendingDuplicateResponses.length === 0) {
40103
+ if (!promptId && terminalPromptId) {
40104
+ promptId = terminalPromptId;
40105
+ }
39771
40106
  if (toolGoalBinding) {
39772
40107
  await failClosedGoalTurn(
39773
40108
  toolGoalBinding,
39774
40109
  "Goal tool continuation ended without a result"
39775
40110
  );
39776
40111
  }
40112
+ if (completedAndReadyToSubmitTools.length > 0 && completedAndReadyToSubmitTools.every(
40113
+ (toolCall) => toolCall.status === "cancelled"
40114
+ )) {
40115
+ endToolInteraction("cancelled");
40116
+ } else if (completedAndReadyToSubmitTools.some(
40117
+ (toolCall) => toolCall.status === "error"
40118
+ )) {
40119
+ endToolInteraction(
40120
+ "error",
40121
+ "tool continuation ended with an error",
40122
+ "continuation_tool_error"
40123
+ );
40124
+ } else {
40125
+ endToolInteraction("ok");
40126
+ }
39777
40127
  return;
39778
40128
  }
39779
40129
  const executableQueues = /* @__PURE__ */ new Map();
@@ -39853,6 +40203,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39853
40203
  "Goal tool continuation was cancelled"
39854
40204
  );
39855
40205
  }
40206
+ endToolInteraction("cancelled");
39856
40207
  return;
39857
40208
  }
39858
40209
  const allToolsCancelled = geminiTools.every(
@@ -39876,15 +40227,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39876
40227
  "Goal tool continuation was cancelled"
39877
40228
  );
39878
40229
  }
40230
+ endToolInteraction("cancelled");
39879
40231
  return;
39880
40232
  }
39881
40233
  const callIdsToMarkAsSubmitted = geminiTools.map(
39882
40234
  (toolCall) => toolCall.request.callId
39883
40235
  );
39884
- const prompt_ids = geminiTools.map(
39885
- (toolCall) => toolCall.request.prompt_id
39886
- );
39887
- const promptId = prompt_ids[0] ?? pendingDuplicatePromptId;
39888
40236
  for (const toolCall of geminiTools) {
39889
40237
  if ("modelOverride" in toolCall.response) {
39890
40238
  if (inlineModelOverrideActiveRef.current || modelOverrideRef.current?.endsWith("\0")) {
@@ -39914,6 +40262,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39914
40262
  );
39915
40263
  if (terminatesGoalTurn && toolGoalBinding) {
39916
40264
  geminiClient.addHistory({ role: "user", parts: responsesToSend });
40265
+ let goalFinishFailed = false;
39917
40266
  try {
39918
40267
  await config.getChatRecordingService()?.flush();
39919
40268
  const runtime = await config.getGoalRuntimeReady();
@@ -39934,6 +40283,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39934
40283
  }
39935
40284
  }
39936
40285
  } catch (error) {
40286
+ goalFinishFailed = true;
39937
40287
  await failClosedGoalTurn(
39938
40288
  toolGoalBinding,
39939
40289
  `Goal turn could not finish: ${getErrorMessage(error)}`
@@ -39941,6 +40291,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39941
40291
  } finally {
39942
40292
  releaseGoalTurn(toolGoalBinding);
39943
40293
  }
40294
+ if (goalFinishFailed) {
40295
+ endToolInteraction(
40296
+ "error",
40297
+ "Goal tool continuation could not finish",
40298
+ "continuation_goal_finish_failed"
40299
+ );
40300
+ } else {
40301
+ endToolInteraction("ok");
40302
+ }
39944
40303
  return;
39945
40304
  }
39946
40305
  if (config.getEmitToolUseSummaries()) {
@@ -39998,6 +40357,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
39998
40357
  "Goal tool continuation stopped after a model switch"
39999
40358
  );
40000
40359
  }
40360
+ endToolInteraction("cancelled");
40001
40361
  return;
40002
40362
  }
40003
40363
  const backgroundTaskRegistry = config.getBackgroundTaskRegistry();
@@ -40013,6 +40373,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40013
40373
  "Goal tool continuation stopped: background capacity exhausted"
40014
40374
  );
40015
40375
  }
40376
+ endToolInteraction(
40377
+ "error",
40378
+ "tool continuation capacity exhausted",
40379
+ "continuation_capacity_exhausted"
40380
+ );
40016
40381
  return;
40017
40382
  }
40018
40383
  const drained = turnCancelledRef.current || abortControllerRef.current?.signal.aborted ? [] : midTurnDrainRef?.current?.(
@@ -40049,6 +40414,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40049
40414
  "Goal tool continuation was cancelled"
40050
40415
  );
40051
40416
  }
40417
+ endToolInteraction("cancelled");
40052
40418
  return;
40053
40419
  }
40054
40420
  if (toolGoalBinding?.controller.signal.aborted) {
@@ -40057,12 +40423,27 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40057
40423
  toolGoalBinding,
40058
40424
  "Goal tool continuation was preempted"
40059
40425
  );
40426
+ endToolInteraction("cancelled");
40060
40427
  return;
40061
40428
  }
40062
40429
  void submitQuery(responsesToSend, "toolResult" /* ToolResult */, promptId, {
40063
40430
  steerInput: drainedSteer,
40064
40431
  onDelivered: drainedSteer?.accept,
40065
- onDeliveryFailed: drainedSteer?.restore,
40432
+ onAdmissionFailed: /* @__PURE__ */ __name(() => {
40433
+ endToolInteraction(
40434
+ "error",
40435
+ "tool continuation admission failed",
40436
+ "continuation_admission_failed"
40437
+ );
40438
+ }, "onAdmissionFailed"),
40439
+ onDeliveryFailed: /* @__PURE__ */ __name(() => {
40440
+ drainedSteer?.restore();
40441
+ endToolInteraction(
40442
+ "error",
40443
+ "tool continuation delivery failed",
40444
+ "continuation_delivery_failed"
40445
+ );
40446
+ }, "onDeliveryFailed"),
40066
40447
  goalBinding: toolGoalBinding
40067
40448
  });
40068
40449
  },
@@ -40265,7 +40646,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
40265
40646
  const summary = scheduler.getExitSummary();
40266
40647
  scheduler.stop();
40267
40648
  if (summary) {
40268
- process15.stderr.write(summary + "\n");
40649
+ process16.stderr.write(summary + "\n");
40269
40650
  }
40270
40651
  };
40271
40652
  }, [config, getAutonomousLoopTickResolver, isConfigInitialized]);
@@ -42476,7 +42857,7 @@ __name(useTerminalProgress, "useTerminalProgress");
42476
42857
  // packages/cli/src/ui/hooks/useFolderTrust.ts
42477
42858
  init_esbuild_shims();
42478
42859
  var import_react143 = __toESM(require_react(), 1);
42479
- import * as process16 from "node:process";
42860
+ import * as process17 from "node:process";
42480
42861
  var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
42481
42862
  const [isTrusted, setIsTrusted] = (0, import_react143.useState)(void 0);
42482
42863
  const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react143.useState)(false);
@@ -42491,7 +42872,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
42491
42872
  const handleFolderTrustSelect = (0, import_react143.useCallback)(
42492
42873
  (choice) => {
42493
42874
  const trustedFolders = loadTrustedFolders();
42494
- const cwd3 = process16.cwd();
42875
+ const cwd3 = process17.cwd();
42495
42876
  let trustLevel;
42496
42877
  const wasTrusted = isTrusted ?? true;
42497
42878
  switch (choice) {
@@ -44105,7 +44486,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44105
44486
  const { stdin, setRawMode } = use_stdin_default();
44106
44487
  const { stdout } = use_stdout_default();
44107
44488
  const writeRaw = (0, import_react162.useCallback)((data) => {
44108
- process17.stdout.write(data);
44489
+ process18.stdout.write(data);
44109
44490
  }, []);
44110
44491
  const terminal = (0, import_react162.useMemo)(
44111
44492
  () => buildTerminalNotification(writeRaw),
@@ -44456,7 +44837,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44456
44837
  settings,
44457
44838
  setThemeError,
44458
44839
  historyManager.addItem,
44459
- initializationResult.themeError
44840
+ initializationResult.themeError,
44841
+ config
44460
44842
  );
44461
44843
  const {
44462
44844
  isApprovalModeDialogOpen,
@@ -44494,7 +44876,12 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44494
44876
  openEditorDialog,
44495
44877
  handleEditorSelect,
44496
44878
  exitEditorDialog
44497
- } = useEditorSettings(settings, setEditorError, historyManager.addItem);
44879
+ } = useEditorSettings(
44880
+ settings,
44881
+ setEditorError,
44882
+ historyManager.addItem,
44883
+ config
44884
+ );
44498
44885
  const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
44499
44886
  const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0, import_react162.useState)(false);
44500
44887
  const openStatusLineDialog = (0, import_react162.useCallback)(
@@ -44729,7 +45116,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44729
45116
  config.getGeminiClient()?.requestShutdown();
44730
45117
  setTimeout(async () => {
44731
45118
  await runExitCleanup();
44732
- process17.exit(0);
45119
+ process18.exit(0);
44733
45120
  }, 100);
44734
45121
  }, "quit"),
44735
45122
  setDebugMessage,
@@ -44913,7 +45300,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
44913
45300
  );
44914
45301
  try {
44915
45302
  const { memoryContent, fileCount, conditionalRules, projectRoot } = await loadHierarchicalGeminiMemory(
44916
- process17.cwd(),
45303
+ process18.cwd(),
44917
45304
  settings.merged.context?.loadFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
44918
45305
  config.getFileService(),
44919
45306
  config.getExtensionContextFilePaths(),
@@ -46469,20 +46856,25 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
46469
46856
  lastTitleRef.current = null;
46470
46857
  const folderName2 = basename3(config.getTargetDir());
46471
46858
  writeTerminalTitle(
46472
- (value) => process17.stdout.write(value),
46859
+ (value) => process18.stdout.write(value),
46473
46860
  formatSessionWindowTitle(null, folderName2)
46474
46861
  );
46475
46862
  }
46476
46863
  return;
46477
46864
  }
46478
46865
  const folderName = basename3(config.getTargetDir());
46479
- const title = formatSessionWindowTitle(sessionName, folderName);
46866
+ const title = formatSessionWindowTitle(
46867
+ sessionName,
46868
+ folderName,
46869
+ titleStatusPrefix(streamingState)
46870
+ );
46480
46871
  if (lastTitleRef.current !== title) {
46481
46872
  lastTitleRef.current = title;
46482
- writeTerminalTitle((value) => process17.stdout.write(value), title);
46873
+ writeTerminalTitle((value) => process18.stdout.write(value), title);
46483
46874
  }
46484
46875
  }, [
46485
46876
  sessionName,
46877
+ streamingState,
46486
46878
  settings.merged.ui?.hideWindowTitle,
46487
46879
  settings.merged.ui?.showStatusInTitle,
46488
46880
  config