@qwen-code/qwen-code 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +38 -28
  3. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/channels/github.md +107 -0
  5. package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
  6. package/bundled/qc-helper/docs/features/code-review.md +1 -1
  7. package/bundled/qc-helper/docs/features/hooks.md +52 -15
  8. package/bundled/qc-helper/docs/features/mcp.md +9 -1
  9. package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
  10. package/bundled/qc-helper/docs/features/sub-agents.md +20 -0
  11. package/bundled/qc-helper/docs/qwen-serve.md +4 -2
  12. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  13. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  14. package/bundled/review/DESIGN.md +19 -0
  15. package/bundled/review/SKILL.md +120 -61
  16. package/chunks/MaxSizedBox-VI3ROJJA.js +84 -0
  17. package/chunks/{StandaloneSessionPicker-BIRMPLRD.js → StandaloneSessionPicker-LYXKD2EV.js} +67 -68
  18. package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
  19. package/chunks/{acpAgent-6J2U72PQ.js → acpAgent-WN5SRDQO.js} +1373 -553
  20. package/chunks/agent-K6ECSM64.js +80 -0
  21. package/chunks/agent-headless-NO4Y2HOE.js +74 -0
  22. package/chunks/{anthropicContentGenerator-75BKLTSP.js → anthropicContentGenerator-V2QOGVYD.js} +79 -27
  23. package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-6K6U7XYJ.js} +4 -4
  24. package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-GD2IJJ7I.js} +4 -4
  25. package/chunks/bridge-3KJEWDNE.js +90 -0
  26. package/chunks/{build-RV63TIRH.js → build-S6DO7LMM.js} +1 -1
  27. package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
  28. package/chunks/channel-management-service-XR7GZSWF.js +403 -0
  29. package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
  30. package/chunks/{channel-worker-group-2ZD7TVAT.js → channel-worker-group-XDPTDWTX.js} +11 -6
  31. package/chunks/{channel-worker-manager-4OA4BCGB.js → channel-worker-manager-YYEHVRRE.js} +11 -6
  32. package/chunks/{channel-worker-supervisor-V7KCFJTS.js → channel-worker-supervisor-74HTWA2G.js} +7 -5
  33. package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
  34. package/chunks/{chunk-ETSW4KLJ.js → chunk-2FAK6PNM.js} +2 -2
  35. package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
  36. package/chunks/{chunk-EPDRMGT4.js → chunk-2LKVPASC.js} +4 -28
  37. package/chunks/{chunk-PWTZEM3C.js → chunk-2LQTH543.js} +3 -37
  38. package/chunks/{chunk-LH2BYDQ5.js → chunk-2N7CODY5.js} +18 -12
  39. package/chunks/{chunk-4WIZGAH3.js → chunk-2XSLTRFZ.js} +6 -58
  40. package/chunks/{chunk-FSITMZJH.js → chunk-3EFXSQCM.js} +18 -9
  41. package/chunks/{chunk-HIJQF5B5.js → chunk-3L2SPEBH.js} +1 -1
  42. package/chunks/{chunk-BIQWWWJN.js → chunk-4G2BISNC.js} +1 -1
  43. package/chunks/{chunk-PWVFN2LF.js → chunk-52ZSWYEG.js} +1 -1
  44. package/chunks/{chunk-ZJHVAS7M.js → chunk-5KTQXHPY.js} +4 -5
  45. package/chunks/{chunk-PC6JANNU.js → chunk-5MKRTI4T.js} +4 -4
  46. package/chunks/{chunk-DHHOYAPR.js → chunk-5TBMQLGG.js} +7 -7
  47. package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
  48. package/chunks/chunk-5YKDXHUY.js +463 -0
  49. package/chunks/chunk-5ZF5XXTS.js +363 -0
  50. package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
  51. package/chunks/{chunk-YPE6A4GC.js → chunk-657BH7VM.js} +2 -2
  52. package/chunks/{chunk-R5AFZNQW.js → chunk-65PQENQP.js} +14 -7
  53. package/chunks/{chunk-RIBKPMRP.js → chunk-6PE7N3A4.js} +18 -7
  54. package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
  55. package/chunks/{chunk-JVPM2ULZ.js → chunk-6RPMI2AB.js} +6 -6
  56. package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
  57. package/chunks/{chunk-NIBLUX3Y.js → chunk-75MIQ3LV.js} +148 -21
  58. package/chunks/{chunk-U7M2DMGW.js → chunk-7AEJDLRA.js} +130 -5
  59. package/chunks/{chunk-TPRQ7RZH.js → chunk-7BAU433D.js} +2293 -945
  60. package/chunks/{chunk-M4FMGVY4.js → chunk-7DXQIJID.js} +3 -3
  61. package/chunks/{chunk-RWTEFFPU.js → chunk-7I5GTCT4.js} +620 -383
  62. package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
  63. package/chunks/{chunk-Y34KJKDC.js → chunk-A2D5BAVP.js} +1 -1
  64. package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
  65. package/chunks/{chunk-OFDOK3VM.js → chunk-A4COXFB3.js} +8 -13
  66. package/chunks/{chunk-JLU636DO.js → chunk-ALMR3E6Q.js} +1 -0
  67. package/chunks/{chunk-Q4M4MDQ4.js → chunk-AQIDMUGU.js} +1 -1
  68. package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
  69. package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
  70. package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
  71. package/chunks/{chunk-MB4MZHMJ.js → chunk-BGTQCTQW.js} +211 -522
  72. package/chunks/{chunk-MZAXJAUM.js → chunk-BMFALVGQ.js} +1 -1
  73. package/chunks/{chunk-PSOO6YXD.js → chunk-BNWB5CYE.js} +9 -7
  74. package/chunks/{chunk-BKHWX6I2.js → chunk-BPZKP57P.js} +11 -3
  75. package/chunks/{chunk-H4SBPHSA.js → chunk-CAPPWD3X.js} +3 -3
  76. package/chunks/{chunk-LQIW3YFY.js → chunk-CQL64ESB.js} +7 -7
  77. package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
  78. package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
  79. package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
  80. package/chunks/chunk-DZLYR4U3.js +1252 -0
  81. package/chunks/{chunk-TEHGS6UP.js → chunk-EIF3FXTB.js} +117 -24
  82. package/chunks/{chunk-2SCDWPXI.js → chunk-EJGJIBRS.js} +5 -5
  83. package/chunks/{chunk-7MVVZO4N.js → chunk-EVKE2FZL.js} +4 -4
  84. package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
  85. package/chunks/{chunk-VIA5XA4U.js → chunk-FTD6DP4T.js} +3 -1
  86. package/chunks/chunk-FYJ7W2PI.js +194 -0
  87. package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
  88. package/chunks/{chunk-X5XDDSSH.js → chunk-GEBV2JGB.js} +28 -5
  89. package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
  90. package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
  91. package/chunks/{chunk-5NBDS5S6.js → chunk-GNR2RNMP.js} +162 -7
  92. package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
  93. package/chunks/chunk-GZ3RCT54.js +76 -0
  94. package/chunks/{chunk-2X55UKQE.js → chunk-HMRM2A3U.js} +3 -3
  95. package/chunks/chunk-HV26XH34.js +319 -0
  96. package/chunks/{chunk-LB6DUZ26.js → chunk-J7OACQDE.js} +229 -172
  97. package/chunks/{chunk-K36B6G2O.js → chunk-JFMA7Y5M.js} +5 -5
  98. package/chunks/{chunk-55DJUCI2.js → chunk-JHNRZMHI.js} +53 -43
  99. package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
  100. package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
  101. package/chunks/{chunk-YBL3QUDD.js → chunk-JTV5K7NH.js} +1 -1
  102. package/chunks/{chunk-RZIX2G32.js → chunk-JX27F6QS.js} +1 -1
  103. package/chunks/chunk-JYBU6YUE.js +378 -0
  104. package/chunks/{chunk-7JURR4JT.js → chunk-KAMYKP7E.js} +167 -81
  105. package/chunks/{chunk-KMQ33DO4.js → chunk-KCO4FLFJ.js} +4 -4
  106. package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
  107. package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
  108. package/chunks/{chunk-EBJQ6AXW.js → chunk-LO4ROVP4.js} +262 -16
  109. package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
  110. package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
  111. package/chunks/{chunk-2NH6DYI4.js → chunk-MHAIJPTD.js} +12 -12
  112. package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
  113. package/chunks/{chunk-VRYUBFMC.js → chunk-MR5EAQ5M.js} +1 -1
  114. package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
  115. package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
  116. package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
  117. package/chunks/{chunk-SQCQ4KO2.js → chunk-OCESJA77.js} +393 -330
  118. package/chunks/chunk-OCPBI7J5.js +18 -0
  119. package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
  120. package/chunks/{chunk-TGILQ3YH.js → chunk-P4WOAOJW.js} +141 -64
  121. package/chunks/{chunk-ZFDTEDCF.js → chunk-PB3MBFKG.js} +6 -6
  122. package/chunks/{chunk-3RN6GBKS.js → chunk-PLDQBIO6.js} +1 -1
  123. package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
  124. package/chunks/{chunk-CIKQ7KKO.js → chunk-PT722TDT.js} +271 -376
  125. package/chunks/chunk-Q43KPN7X.js +2196 -0
  126. package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
  127. package/chunks/{chunk-MVSUYZDT.js → chunk-QIZKCVM3.js} +4 -4
  128. package/chunks/{chunk-QAF7NMK7.js → chunk-RCUQIPTN.js} +1 -1
  129. package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
  130. package/chunks/{chunk-GSN55ZRI.js → chunk-S4WJVPZW.js} +19 -7
  131. package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
  132. package/chunks/{chunk-BULDBTYC.js → chunk-S7W2GKIO.js} +1 -28
  133. package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
  134. package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
  135. package/chunks/chunk-T26EAKDL.js +13 -0
  136. package/chunks/{chunk-UDX5OBWR.js → chunk-T2QMKU3R.js} +80 -2
  137. package/chunks/{chunk-IKYJHJNF.js → chunk-T3O2B4XO.js} +3 -3
  138. package/chunks/{chunk-RF3EXIHJ.js → chunk-T4TXDL7G.js} +32 -21
  139. package/chunks/{chunk-J24WCGIN.js → chunk-TBBV36Y4.js} +4 -4
  140. package/chunks/{chunk-LKEJ26GS.js → chunk-TCIFAA7K.js} +16 -11
  141. package/chunks/{chunk-JXJFVC6E.js → chunk-TDL6LB4K.js} +46 -11
  142. package/chunks/{chunk-7ZCNENPP.js → chunk-TFRMVU6R.js} +1 -1
  143. package/chunks/{chunk-VULLI6WQ.js → chunk-TV64SXKD.js} +6 -6
  144. package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
  145. package/chunks/{chunk-LK7CHLVP.js → chunk-U4VTUMMK.js} +0 -60
  146. package/chunks/{chunk-ACY3A37B.js → chunk-UBEPNVDI.js} +23 -18
  147. package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
  148. package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
  149. package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
  150. package/chunks/{chunk-IKCX4CCL.js → chunk-VCPIZRYH.js} +118 -95
  151. package/chunks/{chunk-ZNAUOR2I.js → chunk-VWOOBLTY.js} +2 -2
  152. package/chunks/{chunk-YX324OPW.js → chunk-VYOXCEPJ.js} +1 -1
  153. package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
  154. package/chunks/{chunk-HTR4WV6U.js → chunk-W4RQUHY3.js} +31 -1
  155. package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
  156. package/chunks/{chunk-IO3IX5Q4.js → chunk-WUZ7H6DP.js} +1 -1
  157. package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
  158. package/chunks/{chunk-PHOF65IG.js → chunk-X5WNMMIA.js} +23553 -34321
  159. package/chunks/chunk-XBYYDKAZ.js +80 -0
  160. package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
  161. package/chunks/{chunk-WCXCRJYB.js → chunk-XFZYFU3I.js} +1 -1
  162. package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
  163. package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
  164. package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
  165. package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
  166. package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
  167. package/chunks/{chunk-IJTOWOD7.js → chunk-YGF33UXG.js} +82 -8
  168. package/chunks/chunk-Z4X5MTRT.js +133 -0
  169. package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
  170. package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
  171. package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
  172. package/chunks/{chunk-KIM5GUMA.js → chunk-ZURDMIDR.js} +368 -156
  173. package/chunks/{computer-use-SOQ4E3VX.js → computer-use-ZTIDHMMA.js} +49 -50
  174. package/chunks/{config-utils-7V7GGIW6.js → config-utils-NYSXDMEQ.js} +4 -3
  175. package/chunks/contextCommand-2PIEU37Z.js +79 -0
  176. package/chunks/core-runtime-3XEYLQFK.js +133 -0
  177. package/chunks/{create-sub-session-QRJLW5BV.js → create-sub-session-R76FVXCI.js} +46 -47
  178. package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
  179. package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
  180. package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
  181. package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
  182. package/chunks/{daemon-YO6433NF.js → daemon-Q2AB5Z23.js} +356 -15
  183. package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
  184. package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
  185. package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
  186. package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
  187. package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
  188. package/chunks/dist-BSTVRPMT.js +4227 -0
  189. package/chunks/{dist-46NQKLTW.js → dist-DOLYHMXE.js} +2 -2
  190. package/chunks/{dist-AIKFMUKK.js → dist-HVRQ2CFL.js} +271 -11
  191. package/chunks/{dist-WEAHOXDM.js → dist-IXQEQWRG.js} +2 -1
  192. package/chunks/{dist-BBLXMS3N.js → dist-SSU66DM4.js} +3 -3
  193. package/chunks/{dist-F6IBUDR4.js → dist-SV7Q3AWJ.js} +1 -1
  194. package/chunks/{dist-YFNEUWSE.js → dist-YGBBMK3Z.js} +1 -1
  195. package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
  196. package/chunks/{edit-OBDSQURM.js → edit-HHGIOTQ2.js} +47 -48
  197. package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
  198. package/chunks/{enter-worktree-U6MRPQ2P.js → enter-worktree-ZN7PUQ46.js} +47 -48
  199. package/chunks/{enterPlanMode-BC5QUZZ2.js → enterPlanMode-EIFIDSIV.js} +47 -48
  200. package/chunks/{environment-W5UFC2CH.js → environment-XXQ75D2Q.js} +48 -49
  201. package/chunks/errors-4GMVU7CK.js +87 -0
  202. package/chunks/esm-K5FARBNI.js +5548 -0
  203. package/chunks/{exit-worktree-DGNYMECB.js → exit-worktree-GXMI4ATY.js} +47 -48
  204. package/chunks/exitPlanMode-34UVY7M6.js +72 -0
  205. package/chunks/{fast-path-JJZFJANL.js → fast-path-VPIVA7L6.js} +16 -6
  206. package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
  207. package/chunks/{gemini-QS36EBZV.js → gemini-4BWIK4WD.js} +102 -99
  208. package/chunks/{geminiContentGenerator-AG4KB6CV.js → geminiContentGenerator-3XVV5MSS.js} +40 -11
  209. package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
  210. package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
  211. package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
  212. package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
  213. package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
  214. package/chunks/{glob-V7R3PSK3.js → glob-TZ2ABCJG.js} +47 -48
  215. package/chunks/{grep-QYPSK7OP.js → grep-BEF463NA.js} +49 -49
  216. package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
  217. package/chunks/i18n-FMM5FDXR.js +96 -0
  218. package/chunks/{image-gen-Z3VPGKRC.js → image-gen-HHVLF7HS.js} +12 -12
  219. package/chunks/initializer-625TIAIO.js +85 -0
  220. package/chunks/installationInfo-6AM4I2Y3.js +79 -0
  221. package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
  222. package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
  223. package/chunks/lib-RUF3WZA6.js +9 -0
  224. package/chunks/list-L2GA674Y.js +88 -0
  225. package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
  226. package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
  227. package/chunks/{loggingContentGenerator-HS3S5H3Q.js → loggingContentGenerator-LKOF7XI7.js} +78 -113
  228. package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
  229. package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
  230. package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
  231. package/chunks/{managed-npm-update-JYEMMXA3.js → managed-npm-update-ACQGGIN5.js} +47 -48
  232. package/chunks/mcp-SZLHKFJW.js +82 -0
  233. package/chunks/{monitor-R3ODH5U6.js → monitor-DF52UVHI.js} +47 -48
  234. package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
  235. package/chunks/{notebook-edit-BNOK452R.js → notebook-edit-FCWS4XVN.js} +47 -48
  236. package/chunks/{openaiContentGenerator-WMCU3O2H.js → openaiContentGenerator-7LDK3DCJ.js} +26 -27
  237. package/chunks/pidfile-6ERW3DF4.js +85 -0
  238. package/chunks/process-registry-2CHQBXH5.js +157 -0
  239. package/chunks/{processUtils-RT7UNCC2.js → processUtils-COKZAMUP.js} +2 -2
  240. package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
  241. package/chunks/{qwenContentGenerator-HHCRK4SX.js → qwenContentGenerator-TKWUMR7N.js} +52 -53
  242. package/chunks/{qwenOAuth2-OWLB5AKH.js → qwenOAuth2-7HMU47SF.js} +10 -10
  243. package/chunks/read-file-X6DRC574.js +29 -0
  244. package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
  245. package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
  246. package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
  247. package/chunks/ripGrep-OWV2IVJC.js +72 -0
  248. package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
  249. package/chunks/{run-qwen-serve-FU6HEM4J.js → run-qwen-serve-TSTCO4XE.js} +953 -249
  250. package/chunks/{runtime-XXRRTNP6.js → runtime-DAUPSUKI.js} +56 -56
  251. package/chunks/{scheduler-G2ZS2Z7E.js → scheduler-KMADMT26.js} +46 -47
  252. package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
  253. package/chunks/{sdk-exporters-http-FYBSUCPD.js → sdk-exporters-http-WO556XNU.js} +7 -7
  254. package/chunks/{sdk-impl-GMVPB7NB.js → sdk-impl-LPAVACSF.js} +14 -14
  255. package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
  256. package/chunks/serve-NNRWS6F4.js +88 -0
  257. package/chunks/{server-4UMH7OIZ.js → server-WEH7DVCH.js} +3691 -823
  258. package/chunks/{session-K3O3Q2SV.js → session-WXC56V2I.js} +98 -95
  259. package/chunks/{settings-CR2EWTBA.js → settings-DJDXFDZ3.js} +55 -56
  260. package/chunks/shell-JN5VRQXD.js +82 -0
  261. package/chunks/{skill-I3SDA4MB.js → skill-SGXPKJCS.js} +20 -21
  262. package/chunks/skill-settings-VJ5PDMZI.js +90 -0
  263. package/chunks/spawnChannel-ETMJW7YX.js +81 -0
  264. package/chunks/standalone-update-MK3Z7KBI.js +91 -0
  265. package/chunks/{startInteractiveUI-SLZGHRPH.js → startInteractiveUI-ZCGIXPGT.js} +724 -383
  266. package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
  267. package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
  268. package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
  269. package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
  270. package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
  271. package/chunks/{team-create-YJALH5D2.js → team-create-QQGAJG7P.js} +49 -50
  272. package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
  273. package/chunks/{team-plan-approval-34QFYKGN.js → team-plan-approval-RT7Q5R6O.js} +47 -48
  274. package/chunks/theme-manager-EEWIQJ7J.js +76 -0
  275. package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
  276. package/chunks/{tool-search-NF7GB6LE.js → tool-search-Z3Z4AYKP.js} +19 -21
  277. package/chunks/total-session-admission-44JKRWQD.js +84 -0
  278. package/chunks/trustedFolders-X2JEIO57.js +94 -0
  279. package/chunks/{update-relaunch-WBUZJC5O.js → update-relaunch-VWNPYDIP.js} +5 -5
  280. package/chunks/updateCheck-KAQH67DV.js +91 -0
  281. package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
  282. package/chunks/{validateNonInterActiveAuth-3R223G3R.js → validateNonInterActiveAuth-GIUJ2UFS.js} +93 -90
  283. package/chunks/{version-HS7YSFHV.js → version-BGLYIJUY.js} +1 -1
  284. package/chunks/{web-fetch-NKCSG7ZE.js → web-fetch-OTDU4VQF.js} +19 -21
  285. package/chunks/{web-search-S62WAP4S.js → web-search-FP6SIHPR.js} +13 -13
  286. package/chunks/{workflow-QAGU5RU4.js → workflow-YCIVBYSB.js} +48 -49
  287. package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
  288. package/chunks/{workspace-registration-store-24JMHDGF.js → workspace-registration-store-OTMS3H4C.js} +1 -1
  289. package/chunks/workspace-registry-O63R6IZ4.js +92 -0
  290. package/chunks/workspace-service-M6LLHKJ5.js +99 -0
  291. package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
  292. package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
  293. package/chunks/write-file-3BZC3EAE.js +72 -0
  294. package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
  295. package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
  296. package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
  297. package/chunks/zoom-image-TZ6S2O57.js +351 -0
  298. package/cli.js +13 -13
  299. package/locales/ca.js +7 -2
  300. package/locales/de.js +7 -2
  301. package/locales/en.js +10 -2
  302. package/locales/fr.js +7 -2
  303. package/locales/ja.js +7 -2
  304. package/locales/pt.js +7 -2
  305. package/locales/ru.js +7 -2
  306. package/locales/zh-TW.js +10 -2
  307. package/locales/zh.js +10 -2
  308. package/package.json +5 -4
  309. package/web-shell/assets/{arc-DcbWnB9T.js → arc-75-Wdeo3.js} +1 -1
  310. package/web-shell/assets/{architectureDiagram-3BPJPVTR-kMMF5sud.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
  311. package/web-shell/assets/{blockDiagram-GPEHLZMM-Htl9vTJS.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
  312. package/web-shell/assets/{c4Diagram-AAUBKEIU-BnZnm0mQ.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
  313. package/web-shell/assets/channel-DPYMT76A.js +1 -0
  314. package/web-shell/assets/{chunk-2J33WTMH-DziB7kDG.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
  315. package/web-shell/assets/{chunk-4BX2VUAB-CmkD8daw.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
  316. package/web-shell/assets/{chunk-55IACEB6-CHAd9A_U.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
  317. package/web-shell/assets/{chunk-727SXJPM-Dqaam3fE.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
  318. package/web-shell/assets/{chunk-AQP2D5EJ-D_-saBYM.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
  319. package/web-shell/assets/{chunk-FMBD7UC4-B9r_veWD.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
  320. package/web-shell/assets/{chunk-ND2GUHAM-B3EaCSpL.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
  321. package/web-shell/assets/{chunk-QZHKN3VN-CYq8x9mn.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
  322. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
  323. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
  324. package/web-shell/assets/{cose-bilkent-S5V4N54A-D0ng4uiB.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
  325. package/web-shell/assets/{dagre-BM42HDAG-DCZollQv.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
  326. package/web-shell/assets/{diagram-2AECGRRQ-Dfk2pWS0.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
  327. package/web-shell/assets/{diagram-5GNKFQAL-kX38ltWR.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
  328. package/web-shell/assets/{diagram-KO2AKTUF-CJz2vsXh.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
  329. package/web-shell/assets/{diagram-LMA3HP47-BvMLZm_7.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
  330. package/web-shell/assets/{diagram-OG6HWLK6-l7kfStkO.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
  331. package/web-shell/assets/{erDiagram-TEJ5UH35-BSVa8GGT.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
  332. package/web-shell/assets/{flowDiagram-I6XJVG4X-CoawKIXH.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
  333. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFUDH0zF.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
  334. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Y2pvpT4e.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
  335. package/web-shell/assets/{index-D0GX0zZf.js → index-CKIadvET.js} +1 -1
  336. package/web-shell/assets/index-D1eXNRHe.js +1389 -0
  337. package/web-shell/assets/index-DVLD4CQq.css +5 -0
  338. package/web-shell/assets/{infoDiagram-5YYISTIA-CU8_zLiX.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
  339. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AVQiV0DU.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
  340. package/web-shell/assets/{journeyDiagram-JHISSGLW-DQ0VSKa3.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
  341. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqnWqsE_.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
  342. package/web-shell/assets/{linear-BkoihsaA.js → linear-Dpigcc62.js} +1 -1
  343. package/web-shell/assets/{mermaid.core-5RJs-31j.js → mermaid.core-Ct97pqgW.js} +5 -5
  344. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D33Bxnpd.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
  345. package/web-shell/assets/{pieDiagram-4H26LBE5-BuEAw3BH.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
  346. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Kox_usEq.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
  347. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CNjeUif0.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
  348. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BCd2OL_U.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
  349. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CF2ZTsz0.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
  350. package/web-shell/assets/{stateDiagram-AJRCARHV-qenSzHtm.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
  351. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
  352. package/web-shell/assets/{timeline-definition-PNZ67QCA-B5DyWdgs.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
  353. package/web-shell/assets/{vennDiagram-CIIHVFJN-DqP4I_o_.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
  354. package/web-shell/assets/{wardley-L42UT6IY-CJe2e4mg.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
  355. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BMDSw-Rr.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
  356. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BTVZYkxD.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
  357. package/web-shell/index.html +2 -2
  358. package/chunks/MaxSizedBox-5DPPWPGT.js +0 -85
  359. package/chunks/agent-6ODUANDO.js +0 -81
  360. package/chunks/agent-headless-7BYQTMHW.js +0 -75
  361. package/chunks/bridge-ZUB64FAE.js +0 -90
  362. package/chunks/chunk-LEH5C7FV.js +0 -232
  363. package/chunks/chunk-SZRN75WQ.js +0 -29
  364. package/chunks/chunk-UGYMA4EI.js +0 -219
  365. package/chunks/chunk-Z2BC6UJ5.js +0 -8575
  366. package/chunks/contextCommand-JLHYA34Z.js +0 -80
  367. package/chunks/daemon-status-provider-2233Q37D.js +0 -89
  368. package/chunks/earlyInputCapture-A7NDU3PF.js +0 -82
  369. package/chunks/errors-M7CLORXH.js +0 -88
  370. package/chunks/exitPlanMode-GXTBWQAR.js +0 -403
  371. package/chunks/handleAutoUpdate-6DBEZYPV.js +0 -81
  372. package/chunks/i18n-VUJJZIMU.js +0 -97
  373. package/chunks/initializer-UWAK5U5O.js +0 -86
  374. package/chunks/installationInfo-6O2YAA52.js +0 -80
  375. package/chunks/list-GB4ESM3T.js +0 -89
  376. package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +0 -83
  377. package/chunks/mcp-6DBDJPFU.js +0 -83
  378. package/chunks/nonInteractiveCli-MOYCYBBU.js +0 -141
  379. package/chunks/pidfile-TFRZZZIO.js +0 -86
  380. package/chunks/read-file-APMO3PSX.js +0 -31
  381. package/chunks/resumeHistoryUtils-6KRYEAWZ.js +0 -91
  382. package/chunks/ripGrep-BEJDEDXW.js +0 -73
  383. package/chunks/serve-7BSTXJ4T.js +0 -89
  384. package/chunks/shell-HH3PF3A2.js +0 -83
  385. package/chunks/spawnChannel-RWNDBXGA.js +0 -82
  386. package/chunks/src-GE4TTTML.js +0 -3147
  387. package/chunks/standalone-update-Q6WFRZZQ.js +0 -92
  388. package/chunks/theme-manager-SWRILQHI.js +0 -77
  389. package/chunks/total-session-admission-DLHHHLD3.js +0 -84
  390. package/chunks/trustedFolders-KHXHY6PY.js +0 -93
  391. package/chunks/updateCheck-RKL6M5XN.js +0 -92
  392. package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +0 -93
  393. package/chunks/workspace-providers-status-QSVZUETE.js +0 -86
  394. package/chunks/workspace-registry-UT4RBNBM.js +0 -88
  395. package/chunks/workspace-service-JFWRUS4V.js +0 -98
  396. package/chunks/workspace-skills-status-ZBBKJOI2.js +0 -85
  397. package/chunks/write-file-VHIXW5M7.js +0 -73
  398. package/web-shell/assets/channel-Cq7YKtfC.js +0 -1
  399. package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +0 -1
  400. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +0 -1
  401. package/web-shell/assets/index-D9haPt0X.css +0 -5
  402. package/web-shell/assets/index-ckX9Pq5k.js +0 -1230
  403. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +0 -1
  404. package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
  405. package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
  406. /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
@@ -1,80 +1,18 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import {
4
- useAutoAcceptIndicator
5
- } from "./chunk-2X55UKQE.js";
6
- import {
7
- classifyApiError
8
- } from "./chunk-V7RNNPGC.js";
9
3
  import {
10
4
  buildPermissionSuggestions
11
5
  } from "./chunk-43T5WDQ7.js";
12
6
  import {
13
7
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
14
8
  reportChatRecordingFailureToAdapter
15
- } from "./chunk-YPE6A4GC.js";
16
- import {
17
- MAX_SUGGESTIONS_TO_SHOW,
18
- SESSION_MENTION_PREFIX,
19
- buildMcpResourceRef,
20
- buildMcpServerRef,
21
- buildSessionRef,
22
- getExtensionSuggestions,
23
- handleAtCommand,
24
- matchMcpServerPrefix,
25
- resolveAtCommandQuery,
26
- sanitizeDisplayText
27
- } from "./chunk-VULLI6WQ.js";
9
+ } from "./chunk-657BH7VM.js";
28
10
  import {
29
11
  StreamJsonOutputAdapter
30
- } from "./chunk-BKHWX6I2.js";
31
- import {
32
- BuiltinCommandLoader,
33
- BundledSkillLoader,
34
- CommandService,
35
- DISPLAY_HOOK_EVENTS,
36
- FileCommandLoader,
37
- MAX_STACKED_SKILLS,
38
- McpPromptLoader,
39
- SavedWorkflowLoader,
40
- SkillCommandLoader,
41
- addConfigToMatcherGroup,
42
- appendUserPromptExpansionAdditionalContext,
43
- copyToClipboard,
44
- createEmptyHookEventInfo,
45
- findMidInputSlashCommand,
46
- findSlashCommandTokens,
47
- formatApprovalModeDescription,
48
- formatApprovalModeName,
49
- formatUserPromptExpansionBlockedMessage,
50
- getAllConfigs,
51
- getBestSlashCommandMatch,
52
- getTranslatedSourceDisplayMap,
53
- hasBlockingBackgroundWork,
54
- hasSlashCommandPathSeparator,
55
- isAtCommand,
56
- isBtwCommand,
57
- isMidInputCompletableCommand,
58
- isSlashCommand,
59
- normalizePartList,
60
- parseSlashCommand,
61
- parseStackedSlashCommands,
62
- refreshExtensionContentRuntime,
63
- resetBackgroundStateForSessionSwitch,
64
- serializeUserPromptExpansionPrompt,
65
- supportsMatchers
66
- } from "./chunk-LB6DUZ26.js";
67
- import "./chunk-R5AFZNQW.js";
12
+ } from "./chunk-BPZKP57P.js";
68
13
  import {
69
14
  startPostRenderPrefetches
70
- } from "./chunk-2NH6DYI4.js";
71
- import {
72
- EXTENSION_RELOAD_FAILED_REASON,
73
- ExtensionRefreshState,
74
- appEvents,
75
- cleanupReviewWorktreeLeases,
76
- loadHierarchicalGeminiMemory
77
- } from "./chunk-TPRQ7RZH.js";
15
+ } from "./chunk-MHAIJPTD.js";
78
16
  import {
79
17
  AboutBox,
80
18
  BaseSelectionList,
@@ -106,6 +44,7 @@ import {
106
44
  UIStateContext,
107
45
  USER_AGREEMENT_RATE_HIGH,
108
46
  USER_AGREEMENT_RATE_MEDIUM,
47
+ VirtualViewportContext,
109
48
  checkExhaustive,
110
49
  colorizeCode,
111
50
  countMarkdownSourceBlocks,
@@ -146,22 +85,111 @@ import {
146
85
  useTerminalSize,
147
86
  useTextBuffer,
148
87
  useUIActions,
149
- useUIState
150
- } from "./chunk-SQCQ4KO2.js";
88
+ useUIState,
89
+ useVirtualViewport
90
+ } from "./chunk-OCESJA77.js";
91
+ import {
92
+ GeminiRespondingSpinner,
93
+ GeminiSpinner,
94
+ ICON,
95
+ SCREEN_READER_USER_PREFIX,
96
+ SHELL_COMMAND_NAME,
97
+ StreamingContext,
98
+ applyCollapsePolicyAndSummary,
99
+ buildResumedHistoryItems,
100
+ build_default,
101
+ expandCollapsedHistory,
102
+ isCollapsibleTool,
103
+ useStreamingContext
104
+ } from "./chunk-TDL6LB4K.js";
105
+ import {
106
+ stopAndGetCapturedInput
107
+ } from "./chunk-JMONIXMJ.js";
108
+ import {
109
+ useAutoAcceptIndicator
110
+ } from "./chunk-HMRM2A3U.js";
151
111
  import {
152
112
  KeypressProvider,
153
113
  useFocus,
154
114
  useKeypress,
155
115
  useKeypressContext
156
- } from "./chunk-LQIW3YFY.js";
116
+ } from "./chunk-CQL64ESB.js";
117
+ import {
118
+ classifyApiError
119
+ } from "./chunk-V7RNNPGC.js";
120
+ import {
121
+ MAX_SUGGESTIONS_TO_SHOW,
122
+ SESSION_MENTION_PREFIX,
123
+ buildMcpResourceRef,
124
+ buildMcpServerRef,
125
+ buildSessionRef,
126
+ getExtensionSuggestions,
127
+ handleAtCommand,
128
+ matchMcpServerPrefix,
129
+ resolveAtCommandQuery,
130
+ sanitizeDisplayText
131
+ } from "./chunk-TV64SXKD.js";
132
+ import {
133
+ BuiltinCommandLoader,
134
+ BundledSkillLoader,
135
+ CommandService,
136
+ DISPLAY_HOOK_EVENTS,
137
+ FileCommandLoader,
138
+ MAX_STACKED_SKILLS,
139
+ McpPromptLoader,
140
+ SavedWorkflowLoader,
141
+ SkillCommandLoader,
142
+ addConfigToMatcherGroup,
143
+ appendUserPromptExpansionAdditionalContext,
144
+ copyToClipboard,
145
+ createEmptyHookEventInfo,
146
+ dayKey,
147
+ findMidInputSlashCommand,
148
+ findSlashCommandTokens,
149
+ formatApprovalModeDescription,
150
+ formatApprovalModeName,
151
+ formatUserPromptExpansionBlockedMessage,
152
+ getAllConfigs,
153
+ getBestSlashCommandMatch,
154
+ getTranslatedSourceDisplayMap,
155
+ hasBlockingBackgroundWork,
156
+ hasSlashCommandPathSeparator,
157
+ isAtCommand,
158
+ isBtwCommand,
159
+ isMidInputCompletableCommand,
160
+ isSlashCommand,
161
+ isStackedSkillCompletableCommand,
162
+ isValidStackedSkillPrefix,
163
+ normalizePartList,
164
+ parseDayKey,
165
+ parseSlashCommand,
166
+ parseStackedSlashCommands,
167
+ refreshExtensionContentRuntime,
168
+ resetBackgroundStateForSessionSwitch,
169
+ serializeUserPromptExpansionPrompt,
170
+ supportsMatchers
171
+ } from "./chunk-J7OACQDE.js";
172
+ import {
173
+ EXTENSION_RELOAD_FAILED_REASON,
174
+ ExtensionRefreshState,
175
+ appEvents,
176
+ cleanupReviewWorktreeLeases,
177
+ loadHierarchicalGeminiMemory
178
+ } from "./chunk-7BAU433D.js";
157
179
  import {
158
180
  getCommandDisplayName,
159
181
  getCommandSourceBadge
160
- } from "./chunk-RZIX2G32.js";
182
+ } from "./chunk-JX27F6QS.js";
161
183
  import {
162
184
  computeSessionStats,
163
185
  levelLabel
164
- } from "./chunk-U7M2DMGW.js";
186
+ } from "./chunk-7AEJDLRA.js";
187
+ import {
188
+ disableKittyProtocol,
189
+ isKittyProtocolEnabled,
190
+ isKittyProtocolSupported,
191
+ pushKittyProtocolFlags
192
+ } from "./chunk-PQNHRFJC.js";
165
193
  import {
166
194
  BEL,
167
195
  OSC_PREFIX,
@@ -174,33 +202,27 @@ import {
174
202
  oscKittyNotify,
175
203
  saveClipboardImage,
176
204
  writeOsc52
177
- } from "./chunk-J56UI34H.js";
205
+ } from "./chunk-M7OONWYU.js";
206
+ import "./chunk-65PQENQP.js";
178
207
  import "./chunk-4WGODMVR.js";
208
+ import "./chunk-JFMA7Y5M.js";
209
+ import "./chunk-KW7NOTN6.js";
179
210
  import {
180
211
  MaxSizedBox,
181
212
  OverflowProvider,
182
213
  useOverflowState
183
- } from "./chunk-FQK6JAFG.js";
184
- import {
185
- GeminiRespondingSpinner,
186
- GeminiSpinner,
187
- ICON,
188
- SCREEN_READER_USER_PREFIX,
189
- SHELL_COMMAND_NAME,
190
- StreamingContext,
191
- applyCollapsePolicyAndSummary,
192
- buildResumedHistoryItems,
193
- build_default,
194
- expandCollapsedHistory,
195
- isCollapsibleTool,
196
- useStreamingContext
197
- } from "./chunk-JXJFVC6E.js";
214
+ } from "./chunk-U3E3UQAA.js";
198
215
  import {
199
216
  theme
200
- } from "./chunk-VAK25FTU.js";
217
+ } from "./chunk-GKX7E4CO.js";
201
218
  import {
202
219
  require_jsx_runtime
203
220
  } from "./chunk-SV5PQVQE.js";
221
+ import {
222
+ AUTO_THEME_NAME,
223
+ DEFAULT_THEME,
224
+ themeManager
225
+ } from "./chunk-GATT5TKW.js";
204
226
  import {
205
227
  Box_default,
206
228
  Static,
@@ -214,51 +236,36 @@ import {
214
236
  use_is_screen_reader_enabled_default,
215
237
  use_stdin_default,
216
238
  use_stdout_default
217
- } from "./chunk-6GMVPFB2.js";
239
+ } from "./chunk-UWMLWVCA.js";
218
240
  import {
219
- stopAndGetCapturedInput
220
- } from "./chunk-63P4EL5V.js";
241
+ require_react
242
+ } from "./chunk-5QWWOFGG.js";
243
+ import "./chunk-EVKE2FZL.js";
221
244
  import {
222
- disableKittyProtocol,
223
- isKittyProtocolEnabled,
224
- isKittyProtocolSupported,
225
- pushKittyProtocolFlags
226
- } from "./chunk-PQNHRFJC.js";
245
+ getErrorMessage as getErrorMessage2
246
+ } from "./chunk-T3O2B4XO.js";
247
+ import "./chunk-EJGJIBRS.js";
227
248
  import {
228
249
  relaunchApp
229
- } from "./chunk-Y34KJKDC.js";
250
+ } from "./chunk-A2D5BAVP.js";
230
251
  import {
231
252
  setUpdateHandler
232
- } from "./chunk-ZFDTEDCF.js";
233
- import "./chunk-M4FMGVY4.js";
234
- import "./chunk-K36B6G2O.js";
235
- import {
236
- AUTO_THEME_NAME,
237
- DEFAULT_THEME,
238
- themeManager
239
- } from "./chunk-L5UHQJTJ.js";
240
- import "./chunk-KW7NOTN6.js";
241
- import {
242
- require_react
243
- } from "./chunk-5QWWOFGG.js";
244
- import "./chunk-GSN55ZRI.js";
245
- import "./chunk-6H67XLET.js";
246
- import "./chunk-7MVVZO4N.js";
247
- import {
248
- getErrorMessage as getErrorMessage2
249
- } from "./chunk-IKYJHJNF.js";
250
- import "./chunk-2SCDWPXI.js";
253
+ } from "./chunk-PB3MBFKG.js";
254
+ import "./chunk-7DXQIJID.js";
251
255
  import "./chunk-YAF2MQZ6.js";
256
+ import "./chunk-S4WJVPZW.js";
257
+ import "./chunk-6H67XLET.js";
252
258
  import {
253
259
  openQwenAsrRealtimeStream,
254
260
  openVoiceStream,
255
261
  openVoiceStreamWithRetry
256
- } from "./chunk-BJX6ZSUK.js";
262
+ } from "./chunk-BCZFQXWK.js";
257
263
  import {
258
264
  recordGoalStatusItem,
259
265
  restoreGoalFromHistory
260
- } from "./chunk-EBJQ6AXW.js";
261
- import "./chunk-RHLZR4E5.js";
266
+ } from "./chunk-LO4ROVP4.js";
267
+ import "./chunk-LGAOC3ZS.js";
268
+ import "./chunk-XFZYFU3I.js";
262
269
  import {
263
270
  cpLen,
264
271
  cpSlice,
@@ -270,8 +277,7 @@ import {
270
277
  sanitizeTerminalText,
271
278
  stripUnsafeCharacters,
272
279
  toCodePoints
273
- } from "./chunk-IPUUTYMV.js";
274
- import "./chunk-WCXCRJYB.js";
280
+ } from "./chunk-YDLJGZHL.js";
275
281
  import {
276
282
  stringWidth
277
283
  } from "./chunk-2MIN6GRR.js";
@@ -280,31 +286,25 @@ import {
280
286
  isHistoryItemVisibleAfterRestore
281
287
  } from "./chunk-QTERJVPZ.js";
282
288
  import "./chunk-3Z43GZUQ.js";
289
+ import "./chunk-RXFQM6FQ.js";
283
290
  import {
284
291
  assertVoiceBaseUrlNetworkAllowed,
285
292
  isKeytermEcho,
286
293
  isStreamingVoiceModel,
287
294
  resolveVoiceStreamConfig,
288
295
  transcribeVoiceAudio
289
- } from "./chunk-H4SBPHSA.js";
296
+ } from "./chunk-CAPPWD3X.js";
290
297
  import {
291
298
  formatUnsupportedVoiceModelMessage,
292
299
  isSelectableVoiceModel
293
- } from "./chunk-YBL3QUDD.js";
294
- import "./chunk-ZD6UTE4A.js";
295
- import "./chunk-RXFQM6FQ.js";
296
- import "./chunk-PSOO6YXD.js";
297
- import {
298
- requestConsentInteractive,
299
- requestConsentOrFail
300
- } from "./chunk-PC6JANNU.js";
301
- import "./chunk-57OAHC2Y.js";
300
+ } from "./chunk-JTV5K7NH.js";
301
+ import "./chunk-ZHBO7WVX.js";
302
302
  import {
303
303
  createLoadedSettingsAdapter
304
- } from "./chunk-IO3IX5Q4.js";
304
+ } from "./chunk-WUZ7H6DP.js";
305
305
  import {
306
306
  getExtendedSystemInfo
307
- } from "./chunk-MVSUYZDT.js";
307
+ } from "./chunk-QIZKCVM3.js";
308
308
  import {
309
309
  formatDuration,
310
310
  formatMemoryUsage,
@@ -312,27 +312,39 @@ import {
312
312
  formatTokenCount
313
313
  } from "./chunk-E5Z2AVNV.js";
314
314
  import "./chunk-GLWP3FDB.js";
315
- import "./chunk-COH43MRJ.js";
315
+ import "./chunk-XCGIMOLN.js";
316
316
  import {
317
317
  isInlineModelOverrideAllowed
318
- } from "./chunk-KMQ33DO4.js";
319
- import "./chunk-X5XDDSSH.js";
320
- import "./chunk-4WIZGAH3.js";
321
- import "./chunk-7ZCNENPP.js";
322
- import "./chunk-V6WHFGST.js";
318
+ } from "./chunk-KCO4FLFJ.js";
323
319
  import {
324
- loadMcpApprovals
325
- } from "./chunk-JVPM2ULZ.js";
326
- import "./chunk-DP3IHZGG.js";
327
- import "./chunk-ZNAUOR2I.js";
320
+ computeWorkspaceSkillListUpdates,
321
+ resolveSkillSettings,
322
+ skillSettingStrings
323
+ } from "./chunk-Z4X5MTRT.js";
324
+ import "./chunk-BNWB5CYE.js";
325
+ import {
326
+ requestConsentInteractive,
327
+ requestConsentOrFail
328
+ } from "./chunk-5MKRTI4T.js";
329
+ import "./chunk-57OAHC2Y.js";
330
+ import "./chunk-2XSLTRFZ.js";
331
+ import "./chunk-TFRMVU6R.js";
332
+ import "./chunk-XBYYDKAZ.js";
333
+ import "./chunk-V6WHFGST.js";
328
334
  import "./chunk-2RFKHEXL.js";
329
- import "./chunk-LK7CHLVP.js";
330
- import "./chunk-JLU636DO.js";
335
+ import "./chunk-FYJ7W2PI.js";
336
+ import "./chunk-U4VTUMMK.js";
337
+ import "./chunk-GZ3RCT54.js";
338
+ import "./chunk-ALMR3E6Q.js";
331
339
  import "./chunk-BK2UNYWD.js";
332
340
  import "./chunk-M5GB774H.js";
333
- import "./chunk-RWTEFFPU.js";
341
+ import "./chunk-4G2BISNC.js";
342
+ import "./chunk-GEBV2JGB.js";
343
+ import "./chunk-7I5GTCT4.js";
334
344
  import "./chunk-UDXSXLER.js";
335
- import "./chunk-BIQWWWJN.js";
345
+ import {
346
+ loadMcpApprovals
347
+ } from "./chunk-6RPMI2AB.js";
336
348
  import {
337
349
  CORRUPTED_SUFFIX,
338
350
  SettingScope,
@@ -355,36 +367,39 @@ import {
355
367
  settingExistsInScope,
356
368
  validateSettingValue,
357
369
  writeOutputLanguageAndRegisterPath
358
- } from "./chunk-TEHGS6UP.js";
370
+ } from "./chunk-EIF3FXTB.js";
359
371
  import "./chunk-RKUWKYED.js";
360
- import "./chunk-GOXKNSDZ.js";
361
- import "./chunk-IDS7MSUP.js";
362
372
  import {
363
373
  getCurrentLanguage,
364
374
  localizeToolDisplayName,
365
375
  t,
366
376
  ta
367
- } from "./chunk-LKEJ26GS.js";
368
- import "./chunk-LH2BYDQ5.js";
377
+ } from "./chunk-TCIFAA7K.js";
378
+ import "./chunk-2N7CODY5.js";
379
+ import "./chunk-DP3IHZGG.js";
380
+ import "./chunk-VWOOBLTY.js";
381
+ import "./chunk-GOXKNSDZ.js";
382
+ import "./chunk-IDS7MSUP.js";
369
383
  import "./chunk-6PEXNQTX.js";
384
+ import "./chunk-XFSFZCM5.js";
370
385
  import "./chunk-URK542T4.js";
371
386
  import {
372
387
  getCliVersion
373
- } from "./chunk-YX324OPW.js";
388
+ } from "./chunk-VYOXCEPJ.js";
374
389
  import "./chunk-VJNBRRZG.js";
375
390
  import {
376
391
  isWorkspaceTrusted,
377
392
  loadTrustedFolders
378
- } from "./chunk-Z2BC6UJ5.js";
393
+ } from "./chunk-Q43KPN7X.js";
379
394
  import {
380
395
  require_strip_json_comments
381
396
  } from "./chunk-ALGGS7UH.js";
382
397
  import "./chunk-MR3PXB6E.js";
383
398
  import {
384
399
  clearScreen,
385
- writeStderrLine
400
+ writeStderrLine,
401
+ writeStderrLineSafe
386
402
  } from "./chunk-OWAK7LMW.js";
387
- import "./chunk-XFSFZCM5.js";
388
403
  import {
389
404
  ALIBABA_PROVIDERS,
390
405
  AsyncFzf,
@@ -491,67 +506,68 @@ import {
491
506
  validateWorkflowName,
492
507
  watchRepoBranch,
493
508
  writeRuntimeStatus
494
- } from "./chunk-PHOF65IG.js";
495
- import "./chunk-5M6IDOMF.js";
509
+ } from "./chunk-X5WNMMIA.js";
496
510
  import "./chunk-TWPJO254.js";
497
511
  import "./chunk-H6XPXXMH.js";
498
- import "./chunk-K4XWPEWB.js";
499
- import "./chunk-TOFQCPDC.js";
500
- import "./chunk-IRH27ZC2.js";
501
- import "./chunk-VDDGDZMA.js";
502
- import "./chunk-FNQ6T3CV.js";
503
- import "./chunk-ZOIFNCKL.js";
504
- import "./chunk-PWTZEM3C.js";
512
+ import "./chunk-5M6IDOMF.js";
513
+ import "./chunk-UPUG4GXM.js";
514
+ import "./chunk-64LQLPL7.js";
515
+ import "./chunk-2LQTH543.js";
505
516
  import "./chunk-KRXPRVGL.js";
506
- import "./chunk-6PVPNMXU.js";
507
517
  import {
508
518
  resolveModelId
509
- } from "./chunk-MZAXJAUM.js";
510
- import "./chunk-SZRN75WQ.js";
511
- import "./chunk-HTO4JFDZ.js";
519
+ } from "./chunk-BMFALVGQ.js";
520
+ import "./chunk-CVHIL5IG.js";
521
+ import "./chunk-IRH27ZC2.js";
522
+ import "./chunk-QHWCP53L.js";
523
+ import "./chunk-PONHVBRT.js";
524
+ import "./chunk-T26EAKDL.js";
525
+ import "./chunk-6PVPNMXU.js";
512
526
  import "./chunk-CPBF7KYF.js";
527
+ import "./chunk-6QIGFD5W.js";
528
+ import {
529
+ HOOKS_CONFIG_FIELDS
530
+ } from "./chunk-XWWKIXVD.js";
531
+ import "./chunk-75GFAX4R.js";
532
+ import "./chunk-OKF7JF3R.js";
513
533
  import {
514
534
  APPROVAL_MODES,
515
535
  getStartupContextLength,
516
536
  isSystemReminderContent,
517
537
  runOutsideAgentContext
518
- } from "./chunk-L26JL52R.js";
519
- import "./chunk-6AM5D4ME.js";
520
- import "./chunk-JZA3JUDJ.js";
521
- import {
522
- HOOKS_CONFIG_FIELDS
523
- } from "./chunk-3QMGYBFN.js";
538
+ } from "./chunk-JSD33JG6.js";
539
+ import "./chunk-S6LOFUVP.js";
524
540
  import "./chunk-JCW2R7WC.js";
525
541
  import {
526
542
  isPathWithinRoot
527
- } from "./chunk-M5JM7OSF.js";
528
- import "./chunk-OHNBB4XR.js";
529
- import "./chunk-E5TUC6CA.js";
543
+ } from "./chunk-2DN4J57Y.js";
544
+ import "./chunk-ZPJWUGCS.js";
530
545
  import {
531
546
  osc8Hyperlink,
532
547
  qwenOAuth2Events,
533
548
  sanitizeForOsc,
534
549
  supportsHyperlinks,
535
550
  wrapForMultiplexer
536
- } from "./chunk-EPDRMGT4.js";
537
- import "./chunk-JESCGQM3.js";
538
- import "./chunk-NH6KE4JX.js";
539
- import "./chunk-USTWD7QV.js";
551
+ } from "./chunk-2LKVPASC.js";
552
+ import "./chunk-NAVJD2PQ.js";
553
+ import "./chunk-LW3RFMG7.js";
554
+ import "./chunk-W4MIWP6M.js";
540
555
  import {
541
556
  REASONING_EFFORT_TIERS
542
- } from "./chunk-XVNQMZ2I.js";
557
+ } from "./chunk-DGEIYUC3.js";
543
558
  import {
544
559
  getUnsupportedImageFormatWarning,
545
560
  isSupportedImageMimeType
546
- } from "./chunk-FODK6UMO.js";
561
+ } from "./chunk-MPHPFVKK.js";
547
562
  import "./chunk-GLNBDYUX.js";
548
563
  import "./chunk-DJ2GSRLV.js";
549
- import "./chunk-ZJHVAS7M.js";
550
- import "./chunk-NIBLUX3Y.js";
551
- import "./chunk-BPJSQIJX.js";
564
+ import "./chunk-5KTQXHPY.js";
565
+ import "./chunk-75MIQ3LV.js";
566
+ import "./chunk-2J3OJGTL.js";
552
567
  import "./chunk-P3QQPMQA.js";
553
- import "./chunk-6FGBXPWM.js";
554
- import "./chunk-LS77BEZP.js";
568
+ import "./chunk-RPLGZJV2.js";
569
+ import "./chunk-GLCZKT5V.js";
570
+ import "./chunk-DZLYR4U3.js";
555
571
  import {
556
572
  ApiCancelEvent,
557
573
  AuthEvent,
@@ -592,7 +608,7 @@ import {
592
608
  runVisionBridge,
593
609
  shouldRunVisionBridge,
594
610
  splitImageParts
595
- } from "./chunk-CIKQ7KKO.js";
611
+ } from "./chunk-PT722TDT.js";
596
612
  import "./chunk-VGC4I5JJ.js";
597
613
  import {
598
614
  AUTO_MEMORY_INDEX_FILENAME,
@@ -600,30 +616,27 @@ import {
600
616
  getAutoMemoryRoot,
601
617
  getUserAutoMemoryRoot,
602
618
  isAnyAutoMemPath
603
- } from "./chunk-MUP3T3AD.js";
619
+ } from "./chunk-SGFT55XI.js";
620
+ import "./chunk-Y4IHBGBP.js";
621
+ import {
622
+ ToolNames,
623
+ isShellProgressData
624
+ } from "./chunk-Y6AXW2OG.js";
604
625
  import {
605
626
  MAINLINE_CODER_MODEL
606
- } from "./chunk-IKCX4CCL.js";
627
+ } from "./chunk-VCPIZRYH.js";
607
628
  import "./chunk-46UV252V.js";
608
- import "./chunk-A4UCTEB5.js";
609
- import "./chunk-XWRJCPHC.js";
610
629
  import {
611
630
  DEFAULT_TOKEN_LIMIT
612
- } from "./chunk-UW5EOVUN.js";
613
- import "./chunk-2JZBVYTU.js";
614
- import "./chunk-5I2IWRSH.js";
631
+ } from "./chunk-ZBVS26BY.js";
632
+ import "./chunk-WZRWHXFE.js";
633
+ import "./chunk-A3NDJ5SB.js";
615
634
  import {
616
635
  atomicWriteFileSync
617
- } from "./chunk-A5L3JMUA.js";
618
- import "./chunk-MB4MZHMJ.js";
619
- import "./chunk-HTR4WV6U.js";
620
- import "./chunk-BULDBTYC.js";
621
- import "./chunk-U7ZFW55U.js";
622
- import "./chunk-UUUTRMI2.js";
623
- import {
624
- ToolNames,
625
- isShellProgressData
626
- } from "./chunk-PR75REBZ.js";
636
+ } from "./chunk-7XATOOE7.js";
637
+ import "./chunk-BGTQCTQW.js";
638
+ import "./chunk-W4RQUHY3.js";
639
+ import "./chunk-S7W2GKIO.js";
627
640
  import {
628
641
  Storage,
629
642
  UnauthorizedError,
@@ -635,12 +648,13 @@ import {
635
648
  isNodeError,
636
649
  shortenPath,
637
650
  tildeifyPath
638
- } from "./chunk-NL7LTRLR.js";
639
- import "./chunk-QAF7NMK7.js";
651
+ } from "./chunk-UHUSJ6X7.js";
652
+ import "./chunk-VOQXFAY5.js";
653
+ import "./chunk-RCUQIPTN.js";
640
654
  import {
641
655
  registerCleanup,
642
656
  runExitCleanup
643
- } from "./chunk-PWVFN2LF.js";
657
+ } from "./chunk-52ZSWYEG.js";
644
658
  import {
645
659
  finalizeStartupProfile,
646
660
  profileCheckpoint
@@ -655,7 +669,7 @@ import {
655
669
  import "./chunk-TYAMGABM.js";
656
670
  import "./chunk-FCMNKVXT.js";
657
671
  import "./chunk-AMDSOFFV.js";
658
- import "./chunk-TARRHLLG.js";
672
+ import "./chunk-QUGAUQGJ.js";
659
673
  import {
660
674
  init_esbuild_shims
661
675
  } from "./chunk-5O2XNYP6.js";
@@ -5231,6 +5245,11 @@ var SessionTab = /* @__PURE__ */ __name(() => {
5231
5245
  totalCached += m.tokens.cached;
5232
5246
  }
5233
5247
  const cacheRate = totalInput > 0 ? totalCached / totalInput * 100 : 0;
5248
+ const generation = metrics.generation;
5249
+ const lastGeneration = generation?.last;
5250
+ const lastTps = lastGeneration && lastGeneration.generationDurationMs > 0 ? lastGeneration.outputTokens / (lastGeneration.generationDurationMs / 1e3) : void 0;
5251
+ const averageTtft = generation && generation.timedRequests > 0 ? generation.totalTtftMs / generation.timedRequests : void 0;
5252
+ const sessionTps = generation && generation.totalGenerationDurationMs > 0 ? generation.totalThroughputOutputTokens / (generation.totalGenerationDurationMs / 1e3) : void 0;
5234
5253
  const successColor = getStatusColor(computed.successRate, {
5235
5254
  green: TOOL_SUCCESS_RATE_HIGH,
5236
5255
  yellow: TOOL_SUCCESS_RATE_MEDIUM
@@ -5342,6 +5361,67 @@ var SessionTab = /* @__PURE__ */ __name(() => {
5342
5361
  ] })
5343
5362
  ] })
5344
5363
  ] }),
5364
+ lastGeneration && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
5365
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { bold: true, color: theme.text.primary, children: [
5366
+ t("Generation Metrics"),
5367
+ " (",
5368
+ t("Latest Request"),
5369
+ ")"
5370
+ ] }),
5371
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
5372
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: labelWidth, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5373
+ t("Model"),
5374
+ ":"
5375
+ ] }) }),
5376
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: lastGeneration.model })
5377
+ ] }),
5378
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
5379
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: labelWidth, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.secondary, children: "TTFT:" }) }),
5380
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: formatDuration(lastGeneration.ttftMs) })
5381
+ ] }),
5382
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
5383
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: labelWidth, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5384
+ t("Generation Time"),
5385
+ ":"
5386
+ ] }) }),
5387
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: formatDuration(lastGeneration.generationDurationMs) })
5388
+ ] }),
5389
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
5390
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: labelWidth, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5391
+ t("Output Tokens"),
5392
+ ":"
5393
+ ] }) }),
5394
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: lastGeneration.outputTokens.toLocaleString() })
5395
+ ] }),
5396
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
5397
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: labelWidth, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.secondary, children: "TPS:" }) }),
5398
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: lastTps === void 0 ? "\u2014" : `${lastTps.toFixed(1)} tok/s` })
5399
+ ] }),
5400
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingLeft: 2, children: [
5401
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5402
+ "\xBB ",
5403
+ t("Requests"),
5404
+ ":"
5405
+ ] }) }),
5406
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: generation.timedRequests })
5407
+ ] }),
5408
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingLeft: 2, children: [
5409
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5410
+ "\xBB ",
5411
+ t("Average TTFT"),
5412
+ ":"
5413
+ ] }) }),
5414
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: averageTtft === void 0 ? "\u2014" : formatDuration(averageTtft) })
5415
+ ] }),
5416
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { paddingLeft: 2, children: [
5417
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { width: 26, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { color: theme.text.secondary, children: [
5418
+ "\xBB ",
5419
+ t("Session TPS"),
5420
+ ":"
5421
+ ] }) }),
5422
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.primary, children: sessionTps === void 0 ? "\u2014" : `${sessionTps.toFixed(1)} tok/s` })
5423
+ ] })
5424
+ ] }),
5345
5425
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
5346
5426
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { bold: true, color: theme.text.primary, children: t("Tokens") }),
5347
5427
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { children: [
@@ -5437,21 +5517,13 @@ function computeThresholds2(data) {
5437
5517
  return [p(0.25), p(0.5), p(0.75), p(0.9)];
5438
5518
  }
5439
5519
  __name(computeThresholds2, "computeThresholds");
5440
- function formatDateKey(d) {
5441
- const y = d.getFullYear();
5442
- const m = String(d.getMonth() + 1).padStart(2, "0");
5443
- const day = String(d.getDate()).padStart(2, "0");
5444
- return `${y}-${m}-${day}`;
5445
- }
5446
- __name(formatDateKey, "formatDateKey");
5447
5520
  function buildHeatmapData(data, weeks = 52, monthOffset = 0) {
5448
5521
  const now = /* @__PURE__ */ new Date();
5449
5522
  now.setHours(0, 0, 0, 0);
5450
5523
  const dataKeys = Object.keys(data).filter((k) => data[k] > 0).sort();
5451
5524
  let endDate = new Date(now);
5452
5525
  if (dataKeys.length > 0) {
5453
- const latest = new Date(dataKeys[dataKeys.length - 1]);
5454
- latest.setHours(0, 0, 0, 0);
5526
+ const latest = parseDayKey(dataKeys[dataKeys.length - 1]);
5455
5527
  if (latest.getTime() > endDate.getTime()) endDate = latest;
5456
5528
  }
5457
5529
  if (monthOffset > 0) {
@@ -5474,12 +5546,12 @@ function buildHeatmapData(data, weeks = 52, monthOffset = 0) {
5474
5546
  }
5475
5547
  let col = 0;
5476
5548
  const colMondays = [];
5477
- const todayKey = formatDateKey(/* @__PURE__ */ new Date());
5549
+ const todayKey = dayKey(/* @__PURE__ */ new Date());
5478
5550
  const cursor = new Date(startDate);
5479
5551
  while (cursor <= endDate) {
5480
5552
  const dayOfWeek = cursor.getDay();
5481
5553
  const row = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
5482
- const key = formatDateKey(cursor);
5554
+ const key = dayKey(cursor);
5483
5555
  const count = data[key] || 0;
5484
5556
  const level = intensityLevel(count, thresholds);
5485
5557
  const isToday = key === todayKey;
@@ -5543,8 +5615,8 @@ function buildHeatmapData(data, weeks = 52, monthOffset = 0) {
5543
5615
  return {
5544
5616
  colLabels,
5545
5617
  totalCols: maxCells,
5546
- startDate: formatDateKey(startDate),
5547
- endDate: formatDateKey(endDate),
5618
+ startDate: dayKey(startDate),
5619
+ endDate: dayKey(endDate),
5548
5620
  rows
5549
5621
  };
5550
5622
  }
@@ -9927,19 +9999,43 @@ var useTrustModify = /* @__PURE__ */ __name((onExit, addItem) => {
9927
9999
  setPendingTrustLevel(trustLevel);
9928
10000
  setNeedsRestart(true);
9929
10001
  } else {
10002
+ setPendingTrustLevel(void 0);
10003
+ setNeedsRestart(false);
9930
10004
  const folders = loadTrustedFolders();
9931
- folders.setValue(cwd3, trustLevel);
10005
+ try {
10006
+ folders.setValue(cwd3, trustLevel);
10007
+ } catch (error) {
10008
+ addItem(
10009
+ {
10010
+ type: "error" /* ERROR */,
10011
+ text: `Could not update workspace trust: ${error instanceof Error ? error.message : String(error)}`
10012
+ },
10013
+ Date.now()
10014
+ );
10015
+ return;
10016
+ }
9932
10017
  onExit();
9933
10018
  }
9934
10019
  },
9935
10020
  [cwd3, settings.merged, onExit, addItem]
9936
10021
  );
9937
10022
  const commitTrustLevelChange = (0, import_react32.useCallback)(() => {
9938
- if (pendingTrustLevel) {
9939
- const folders = loadTrustedFolders();
10023
+ if (!pendingTrustLevel) return false;
10024
+ const folders = loadTrustedFolders();
10025
+ try {
9940
10026
  folders.setValue(cwd3, pendingTrustLevel);
10027
+ return true;
10028
+ } catch (error) {
10029
+ addItem(
10030
+ {
10031
+ type: "error" /* ERROR */,
10032
+ text: `Could not update workspace trust: ${error instanceof Error ? error.message : String(error)}`
10033
+ },
10034
+ Date.now()
10035
+ );
10036
+ return false;
9941
10037
  }
9942
- }, [cwd3, pendingTrustLevel]);
10038
+ }, [addItem, cwd3, pendingTrustLevel]);
9943
10039
  return {
9944
10040
  cwd: cwd3,
9945
10041
  currentTrustLevel,
@@ -9990,9 +10086,10 @@ function TrustDialog({
9990
10086
  onExit();
9991
10087
  }
9992
10088
  if (needsRestart && key.name === "r") {
9993
- commitTrustLevelChange();
9994
- relaunchApp();
9995
- onExit();
10089
+ if (commitTrustLevelChange()) {
10090
+ relaunchApp();
10091
+ onExit();
10092
+ }
9996
10093
  }
9997
10094
  },
9998
10095
  { isActive: true }
@@ -14666,8 +14763,8 @@ function SkillsManagerDialog({
14666
14763
  const [loadError, setLoadError] = (0, import_react52.useState)(null);
14667
14764
  const [query, setQuery] = (0, import_react52.useState)("");
14668
14765
  const [activeValue, setActiveValue] = (0, import_react52.useState)(null);
14669
- const initialWorkspaceDisabled = (0, import_react52.useMemo)(
14670
- () => new Set(normalizeNames(namesFromScope(settings, "Workspace" /* Workspace */))),
14766
+ const initialResolved = (0, import_react52.useMemo)(
14767
+ () => resolveSkillSettings(settings),
14671
14768
  [settings]
14672
14769
  );
14673
14770
  const higher = (0, import_react52.useMemo)(() => buildHigherDisabled(settings), [settings]);
@@ -14704,12 +14801,19 @@ function SkillsManagerDialog({
14704
14801
  () => allSkills.filter((s) => !higher.set.has(lower(s.name))),
14705
14802
  [allSkills, higher.set]
14706
14803
  );
14804
+ const initialSelectedKeys = (0, import_react52.useMemo)(
14805
+ () => new Set(
14806
+ unlockedSkills.filter(
14807
+ (skill) => !initialResolved.disabledNames.has(lower(skill.name))
14808
+ ).map((skill) => skill.name)
14809
+ ),
14810
+ [initialResolved, unlockedSkills]
14811
+ );
14707
14812
  const [selectedKeys, setSelectedKeys] = (0, import_react52.useState)(null);
14708
14813
  (0, import_react52.useEffect)(() => {
14709
14814
  if (selectedKeys !== null || unlockedSkills.length === 0) return;
14710
- const initial = unlockedSkills.filter((s) => !initialWorkspaceDisabled.has(lower(s.name))).map((s) => s.name);
14711
- setSelectedKeys(initial);
14712
- }, [unlockedSkills, initialWorkspaceDisabled, selectedKeys]);
14815
+ setSelectedKeys([...initialSelectedKeys]);
14816
+ }, [unlockedSkills, initialSelectedKeys, selectedKeys]);
14713
14817
  const filteredUnlocked = (0, import_react52.useMemo)(() => {
14714
14818
  const normalizedQuery = query.trim().toLowerCase();
14715
14819
  if (!normalizedQuery) return unlockedSkills;
@@ -14764,33 +14868,40 @@ function SkillsManagerDialog({
14764
14868
  return "untrusted";
14765
14869
  }
14766
14870
  const selected = new Set(selectedKeys ?? []);
14767
- const previousWorkspace = namesFromScope(settings, "Workspace" /* Workspace */);
14768
- const previousStrings = previousWorkspace.filter(
14769
- (n) => typeof n === "string"
14871
+ const workspaceDisabled = namesFromScope(
14872
+ settings,
14873
+ "Workspace" /* Workspace */
14874
+ ).filter((name) => typeof name === "string");
14875
+ const lockedNames = new Set(lockedSkills.map((skill) => lower(skill.name)));
14876
+ const { disabled, enabled, disabledChanged, enabledChanged } = computeWorkspaceSkillListUpdates(
14877
+ workspaceDisabled,
14878
+ lockedNames,
14879
+ skillSettingStrings(settings, "Workspace" /* Workspace */, "enabled"),
14880
+ unlockedSkills.map((skill) => ({
14881
+ name: skill.name,
14882
+ wasEnabled: initialSelectedKeys.has(skill.name),
14883
+ isEnabled: selected.has(skill.name),
14884
+ defaultDisabled: initialResolved.defaultDisabledNames.has(lower(skill.name)) && !initialResolved.enabledNames.has(lower(skill.name))
14885
+ }))
14770
14886
  );
14771
- const previousMap = new Map(previousStrings.map((n) => [lower(n), n]));
14772
- const nextDisabled = [];
14773
- const allKnownLower = new Set(allSkills.map((s) => lower(s.name)));
14774
- for (const prev of previousStrings) {
14775
- if (!allKnownLower.has(lower(prev))) {
14776
- nextDisabled.push(prev);
14777
- }
14778
- }
14779
- for (const s of unlockedSkills) {
14780
- if (selected.has(s.name)) continue;
14781
- const existing = previousMap.get(lower(s.name));
14782
- nextDisabled.push(existing ?? s.name);
14783
- }
14784
- const prevNormalized = normalizeNames(previousWorkspace).sort();
14785
- const nextNormalized = normalizeNames(nextDisabled).sort();
14786
- const unchanged = prevNormalized.length === nextNormalized.length && prevNormalized.every((n, i) => n === nextNormalized[i]);
14787
- if (unchanged) return "ok";
14887
+ if (!disabledChanged && !enabledChanged) return "ok";
14788
14888
  try {
14789
- settings.setValue(
14790
- "Workspace" /* Workspace */,
14791
- "skills.disabled",
14792
- nextDisabled.length > 0 ? nextDisabled : void 0
14793
- );
14889
+ settings.setValues([
14890
+ ...disabledChanged ? [
14891
+ {
14892
+ scope: "Workspace" /* Workspace */,
14893
+ key: "skills.disabled",
14894
+ value: disabled.length > 0 ? disabled : void 0
14895
+ }
14896
+ ] : [],
14897
+ ...enabledChanged ? [
14898
+ {
14899
+ scope: "Workspace" /* Workspace */,
14900
+ key: "skills.enabled",
14901
+ value: enabled.length > 0 ? enabled : void 0
14902
+ }
14903
+ ] : []
14904
+ ]);
14794
14905
  } catch (e) {
14795
14906
  addItem(
14796
14907
  {
@@ -14825,7 +14936,9 @@ function SkillsManagerDialog({
14825
14936
  return "ok";
14826
14937
  }, [
14827
14938
  addItem,
14828
- allSkills,
14939
+ initialResolved,
14940
+ initialSelectedKeys,
14941
+ lockedSkills,
14829
14942
  reloadCommands,
14830
14943
  selectedKeys,
14831
14944
  settings,
@@ -26376,7 +26489,7 @@ function useCommandCompletion(buffer, cwd3, slashCommands, commandContext, rever
26376
26489
  query,
26377
26490
  completionStart,
26378
26491
  completionEnd,
26379
- isMidInputSlashCompletion
26492
+ slashCompletionContext
26380
26493
  } = (0, import_react88.useMemo)(() => {
26381
26494
  const currentLine = buffer.lines[cursorRow] || "";
26382
26495
  const codePoints = toCodePoints(currentLine);
@@ -26411,49 +26524,61 @@ function useCommandCompletion(buffer, cwd3, slashCommands, commandContext, rever
26411
26524
  query: partialPath,
26412
26525
  completionStart: pathStart,
26413
26526
  completionEnd: end,
26414
- isMidInputSlashCompletion: false
26527
+ slashCompletionContext: null
26415
26528
  };
26416
26529
  }
26417
26530
  }
26418
- if (cursorRow === 0 && isSlashCommand(currentLine.trim())) {
26419
- return {
26420
- completionMode: "SLASH" /* SLASH */,
26421
- query: currentLine,
26422
- completionStart: 0,
26423
- completionEnd: currentLine.length,
26424
- isMidInputSlashCompletion: false
26425
- };
26426
- }
26427
26531
  const cursorOffset = logicalPosToOffset(buffer.lines, cursorRow, cursorCol);
26428
26532
  const midCmd = findMidInputSlashCommand(buffer.text, cursorOffset);
26429
- if (midCmd && !isExactMidInputModelInvocableCommand(
26430
- midCmd.partialCommand,
26431
- slashCommands
26432
- )) {
26533
+ if (midCmd) {
26433
26534
  const lineStartOffset = logicalPosToOffset(buffer.lines, cursorRow, 0);
26434
26535
  const startOnLine = midCmd.startPos - lineStartOffset;
26435
- if (startOnLine >= 0) {
26536
+ const isInitialCommandOnFirstLine = cursorRow === 0 && isSlashCommand(currentLine.trim()) && startOnLine >= 0 && codePoints.slice(0, startOnLine).join("").trim().length === 0;
26537
+ const inputCodePoints = toCodePoints(buffer.text);
26538
+ const prefix = inputCodePoints.slice(0, midCmd.startPos).join("");
26539
+ const isStackedSkill = !isInitialCommandOnFirstLine && isValidStackedSkillPrefix(prefix, slashCommands);
26540
+ const isSlashLedInput = isSlashCommand(prefix.trimStart());
26541
+ const isRegularMidInput = !isInitialCommandOnFirstLine && !isSlashLedInput;
26542
+ if (startOnLine >= 0 && (isStackedSkill || isRegularMidInput && !isExactMidInputModelInvocableCommand(
26543
+ midCmd.partialCommand,
26544
+ slashCommands
26545
+ ))) {
26436
26546
  return {
26437
26547
  completionMode: "SLASH" /* SLASH */,
26438
26548
  query: midCmd.token,
26439
26549
  completionStart: startOnLine,
26440
26550
  completionEnd: startOnLine + midCmd.token.length,
26441
- isMidInputSlashCompletion: true
26551
+ slashCompletionContext: isStackedSkill ? "stacked-skill" /* STACKED_SKILL */ : "mid-input" /* MID_INPUT */
26442
26552
  };
26443
26553
  }
26444
26554
  }
26555
+ if (cursorRow === 0 && isSlashCommand(currentLine.trim())) {
26556
+ return {
26557
+ completionMode: "SLASH" /* SLASH */,
26558
+ query: currentLine,
26559
+ completionStart: 0,
26560
+ completionEnd: currentLine.length,
26561
+ slashCompletionContext: "line-start" /* LINE_START */
26562
+ };
26563
+ }
26445
26564
  return {
26446
26565
  completionMode: "IDLE" /* IDLE */,
26447
26566
  query: null,
26448
26567
  completionStart: -1,
26449
26568
  completionEnd: -1,
26450
- isMidInputSlashCompletion: false
26569
+ slashCompletionContext: null
26451
26570
  };
26452
26571
  }, [cursorRow, cursorCol, buffer.lines, buffer.text, slashCommands]);
26453
- const slashCommandsForCompletion = (0, import_react88.useMemo)(
26454
- () => isMidInputSlashCompletion ? slashCommands.filter(isMidInputCompletableCommand) : slashCommands,
26455
- [isMidInputSlashCompletion, slashCommands]
26456
- );
26572
+ const isMidInputSlashCompletion = slashCompletionContext === "mid-input" /* MID_INPUT */ || slashCompletionContext === "stacked-skill" /* STACKED_SKILL */;
26573
+ const slashCommandsForCompletion = (0, import_react88.useMemo)(() => {
26574
+ if (slashCompletionContext === "stacked-skill" /* STACKED_SKILL */) {
26575
+ return slashCommands.filter(isStackedSkillCompletableCommand);
26576
+ }
26577
+ if (slashCompletionContext === "mid-input" /* MID_INPUT */) {
26578
+ return slashCommands.filter(isMidInputCompletableCommand);
26579
+ }
26580
+ return slashCommands;
26581
+ }, [slashCompletionContext, slashCommands]);
26457
26582
  const {
26458
26583
  suggestions,
26459
26584
  activeSuggestionIndex,
@@ -26567,6 +26692,8 @@ function useCommandCompletion(buffer, cwd3, slashCommands, commandContext, rever
26567
26692
  const midCmd = findMidInputSlashCommand(buffer.text, cursorOffset);
26568
26693
  if (midCmd) {
26569
26694
  if (isMidInputSlashCompletion) return null;
26695
+ const prefix = toCodePoints(buffer.text).slice(0, midCmd.startPos).join("");
26696
+ if (isSlashCommand(prefix.trimStart())) return null;
26570
26697
  const match = getBestSlashCommandMatch(
26571
26698
  midCmd.partialCommand,
26572
26699
  slashCommands,
@@ -27740,10 +27867,7 @@ var BaseTextInput = /* @__PURE__ */ __name(({
27740
27867
  linesToRender,
27741
27868
  prefixWidth
27742
27869
  });
27743
- (0, import_react96.useInsertionEffect)(() => {
27744
- setCursorPosition(cursorPosition);
27745
- return () => setCursorPosition(void 0);
27746
- }, [setCursorPosition, cursorPosition]);
27870
+ setCursorPosition(cursorPosition);
27747
27871
  const resolvedBorderColor = borderColor ?? theme.border.focused;
27748
27872
  const resolvedPrefix = prefix ?? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { color: theme.text.accent, children: "> " });
27749
27873
  const columns = process.stdout.columns || 80;
@@ -29029,7 +29153,9 @@ var InputPrompt = /* @__PURE__ */ __name(({
29029
29153
  const uiState = useUIState();
29030
29154
  const uiActions = useUIActions();
29031
29155
  const settings = useSettings();
29032
- const mouseInteractionsEnabled = !!settings.merged.ui?.useTerminalBuffer;
29156
+ const mouseInteractionsEnabled = useVirtualViewport(
29157
+ settings.merged.ui?.useTerminalBuffer
29158
+ );
29033
29159
  const { pasteWorkaround } = useKeypressContext();
29034
29160
  const { agents, agentTabBarFocused } = useAgentViewState();
29035
29161
  const { setAgentTabBarFocused } = useAgentViewActions();
@@ -29048,7 +29174,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
29048
29174
  setPillFocused: setBgPillFocused
29049
29175
  } = useBackgroundTaskViewActions();
29050
29176
  const hasAgents = agents.size > 0;
29051
- const liveAgentPanelMaxRows = settings.merged.ui?.useTerminalBuffer ? getLiveAgentPanelVpMaxRows(uiState.terminalHeight) : LIVE_AGENT_PANEL_MAX_ROWS;
29177
+ const liveAgentPanelMaxRows = uiState.useTerminalBuffer ? getLiveAgentPanelVpMaxRows(uiState.terminalHeight) : LIVE_AGENT_PANEL_MAX_ROWS;
29052
29178
  const getVisibleBgAgents = (0, import_react98.useCallback)(
29053
29179
  () => panelDisplayOrder(
29054
29180
  bgEntries.filter((e) => isLiveAgentPanelVisibleEntry(e, Date.now()))
@@ -29286,6 +29412,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
29286
29412
  const handleSubmitAndClear = (0, import_react98.useCallback)(
29287
29413
  (submittedValue, deferUntilIdle = false) => {
29288
29414
  exportCompletion.reset();
29415
+ const submittedPrompt = submittedValue;
29289
29416
  let finalValue = submittedValue;
29290
29417
  if (pendingPastes.size > 0) {
29291
29418
  finalValue = expandPendingPastePlaceholders(finalValue, pendingPastes);
@@ -29303,11 +29430,7 @@ ${finalValue.trim()}`;
29303
29430
  }
29304
29431
  buffer.setText("");
29305
29432
  clearPromptStash(targetDir);
29306
- if (deferUntilIdle) {
29307
- onSubmit(finalValue, { deferUntilIdle: true });
29308
- } else {
29309
- onSubmit(finalValue);
29310
- }
29433
+ onSubmit(finalValue, { deferUntilIdle, submittedPrompt });
29311
29434
  resetHistoryNavRef.current();
29312
29435
  followup.dismiss();
29313
29436
  onPromptSuggestionDismiss?.();
@@ -29336,10 +29459,11 @@ ${finalValue.trim()}`;
29336
29459
  voiceSubmitRef.current = (text) => handleSubmitAndClear(text);
29337
29460
  const customSetTextAndResetCompletionSignal = (0, import_react98.useCallback)(
29338
29461
  (newText) => {
29462
+ uiActions.invalidateSubmittedPromptProvenance();
29339
29463
  buffer.setText(newText);
29340
29464
  setHistoryRestoredText(newText);
29341
29465
  },
29342
- [buffer]
29466
+ [buffer, uiActions]
29343
29467
  );
29344
29468
  const inputHistory = useInputHistory({
29345
29469
  userMessages,
@@ -29770,6 +29894,7 @@ ${currentText}`);
29770
29894
  }
29771
29895
  }
29772
29896
  if (keyMatchers["acceptSuggestionReverseSearch" /* ACCEPT_SUGGESTION_REVERSE_SEARCH */](key)) {
29897
+ uiActions.invalidateSubmittedPromptProvenance();
29773
29898
  sc.handleAutocomplete(activeSuggestionIndex);
29774
29899
  resetState();
29775
29900
  setActive(false);
@@ -29778,6 +29903,9 @@ ${currentText}`);
29778
29903
  }
29779
29904
  if (keyMatchers["submitReverseSearch" /* SUBMIT_REVERSE_SEARCH */](key)) {
29780
29905
  const textToSubmit = showSuggestions && activeSuggestionIndex > -1 ? suggestions[activeSuggestionIndex].value : buffer.text;
29906
+ if (showSuggestions && activeSuggestionIndex > -1) {
29907
+ uiActions.invalidateSubmittedPromptProvenance();
29908
+ }
29781
29909
  handleSubmitAndClear(textToSubmit);
29782
29910
  resetState();
29783
29911
  setActive(false);
@@ -29973,12 +30101,18 @@ ${currentText}`);
29973
30101
  } else {
29974
30102
  if (keyMatchers["navigationUp" /* NAVIGATION_UP */](key)) {
29975
30103
  const prevCommand = shellHistory.getPreviousCommand();
29976
- if (prevCommand !== null) buffer.setText(prevCommand);
30104
+ if (prevCommand !== null) {
30105
+ uiActions.invalidateSubmittedPromptProvenance();
30106
+ buffer.setText(prevCommand);
30107
+ }
29977
30108
  return true;
29978
30109
  }
29979
30110
  if (keyMatchers["navigationDown" /* NAVIGATION_DOWN */](key)) {
29980
30111
  const nextCommand = shellHistory.getNextCommand();
29981
- if (nextCommand !== null) buffer.setText(nextCommand);
30112
+ if (nextCommand !== null) {
30113
+ uiActions.invalidateSubmittedPromptProvenance();
30114
+ buffer.setText(nextCommand);
30115
+ }
29982
30116
  return true;
29983
30117
  }
29984
30118
  }
@@ -30245,6 +30379,7 @@ ${currentText}`);
30245
30379
  if (commandSearchActive || reverseSearchActive) {
30246
30380
  const isCommandSearch = commandSearchActive;
30247
30381
  const sc = isCommandSearch ? commandSearchCompletion : reverseSearchCompletion;
30382
+ uiActions.invalidateSubmittedPromptProvenance();
30248
30383
  sc.handleAutocomplete(index);
30249
30384
  sc.resetCompletionState();
30250
30385
  (isCommandSearch ? setCommandSearchActive : setReverseSearchActive)(
@@ -30274,7 +30409,8 @@ ${currentText}`);
30274
30409
  handleSubmitAndClear,
30275
30410
  setExpandedSuggestionIndex,
30276
30411
  setCommandSearchActive,
30277
- setReverseSearchActive
30412
+ setReverseSearchActive,
30413
+ uiActions
30278
30414
  ]
30279
30415
  );
30280
30416
  const hasTabConsumer = shouldShowSuggestions || buffer.text.length === 0 && Boolean(availableSuggestion) || Boolean(completion.midInputGhostText?.acceptText);
@@ -31633,6 +31769,15 @@ function isRecentHistoryTodoSnapshot(snapshotItemIndex, historyLength) {
31633
31769
  return historyItemsAfterSnapshot < MIN_HISTORY_ITEMS_AFTER_TODO_BEFORE_STICKY;
31634
31770
  }
31635
31771
  __name(isRecentHistoryTodoSnapshot, "isRecentHistoryTodoSnapshot");
31772
+ function hasUserMessageAfter(items, afterIndex) {
31773
+ for (let i = afterIndex + 1; i < items.length; i++) {
31774
+ if (items[i].type === "user") {
31775
+ return true;
31776
+ }
31777
+ }
31778
+ return false;
31779
+ }
31780
+ __name(hasUserMessageAfter, "hasUserMessageAfter");
31636
31781
  function getStickyTodos(history, pendingHistoryItems) {
31637
31782
  const pendingSnapshot = findLatestTodoSnapshot(pendingHistoryItems);
31638
31783
  if (pendingSnapshot !== void 0) {
@@ -31645,6 +31790,9 @@ function getStickyTodos(history, pendingHistoryItems) {
31645
31790
  if (isRecentHistoryTodoSnapshot(historySnapshot.itemIndex, history.length)) {
31646
31791
  return null;
31647
31792
  }
31793
+ if (hasUserMessageAfter(history, historySnapshot.itemIndex)) {
31794
+ return null;
31795
+ }
31648
31796
  if (areAllTodosCompleted(historySnapshot.todos)) {
31649
31797
  return null;
31650
31798
  }
@@ -33016,7 +33164,7 @@ var App = /* @__PURE__ */ __name(() => {
33016
33164
  }, "App");
33017
33165
 
33018
33166
  // packages/cli/src/ui/AppContainer.tsx
33019
- import process16 from "node:process";
33167
+ import process17 from "node:process";
33020
33168
 
33021
33169
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
33022
33170
  init_esbuild_shims();
@@ -33408,6 +33556,33 @@ function useSettingsCommand() {
33408
33556
  }
33409
33557
  __name(useSettingsCommand, "useSettingsCommand");
33410
33558
 
33559
+ // packages/cli/src/ui/utils/terminal-buffer.ts
33560
+ init_esbuild_shims();
33561
+ import process14 from "node:process";
33562
+ function isCiEnvKey(key) {
33563
+ return key === "CI" || key === "CONTINUOUS_INTEGRATION" || key.startsWith("CI_");
33564
+ }
33565
+ __name(isCiEnvKey, "isCiEnvKey");
33566
+ function isActiveCiValue(value) {
33567
+ const normalizedValue = value?.toLowerCase();
33568
+ return value !== void 0 && value !== "" && normalizedValue !== "0" && normalizedValue !== "false";
33569
+ }
33570
+ __name(isActiveCiValue, "isActiveCiValue");
33571
+ function isCiEnvironment(env) {
33572
+ return Object.keys(env).some(
33573
+ (key) => isCiEnvKey(key) && isActiveCiValue(env[key])
33574
+ );
33575
+ }
33576
+ __name(isCiEnvironment, "isCiEnvironment");
33577
+ function isInteractiveTerminal(stdoutIsTTY = process14.stdout.isTTY, env = process14.env) {
33578
+ return Boolean(stdoutIsTTY) && !isCiEnvironment(env) && env["TERM"]?.toLowerCase() !== "dumb";
33579
+ }
33580
+ __name(isInteractiveTerminal, "isInteractiveTerminal");
33581
+ function shouldUseVirtualViewport(useTerminalBuffer, screenReader, terminalInteractive) {
33582
+ return terminalInteractive && (useTerminalBuffer ?? true) && !screenReader;
33583
+ }
33584
+ __name(shouldUseVirtualViewport, "shouldUseVirtualViewport");
33585
+
33411
33586
  // packages/cli/src/ui/hooks/useModelCommand.ts
33412
33587
  init_esbuild_shims();
33413
33588
  var import_react123 = __toESM(require_react(), 1);
@@ -35608,7 +35783,7 @@ init_esbuild_shims();
35608
35783
  var import_react134 = __toESM(require_react(), 1);
35609
35784
  import * as path11 from "node:path";
35610
35785
  var debugLogger35 = createDebugLogger("REACT_TOOL_SCHEDULER");
35611
- function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose) {
35786
+ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
35612
35787
  const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react134.useState)([]);
35613
35788
  const outputUpdateHandler = (0, import_react134.useCallback)(
35614
35789
  (toolCallId, outputChunk) => {
@@ -35668,7 +35843,8 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35668
35843
  onAllToolCallsComplete: allToolCallsCompleteHandler,
35669
35844
  onToolCallsUpdate: toolCallsUpdateHandler,
35670
35845
  getPreferredEditor,
35671
- onEditorClose
35846
+ onEditorClose,
35847
+ onToolResultFullTurnModel
35672
35848
  }),
35673
35849
  [
35674
35850
  config,
@@ -35676,7 +35852,8 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35676
35852
  allToolCallsCompleteHandler,
35677
35853
  toolCallsUpdateHandler,
35678
35854
  getPreferredEditor,
35679
- onEditorClose
35855
+ onEditorClose,
35856
+ onToolResultFullTurnModel
35680
35857
  ]
35681
35858
  );
35682
35859
  const schedule = (0, import_react134.useCallback)(
@@ -35811,6 +35988,9 @@ function mapToDisplay(toolOrTools, projectRoot) {
35811
35988
  resultDisplay: compactToolResultDisplayForHistory(
35812
35989
  trackedCall.response.resultDisplay
35813
35990
  ),
35991
+ ...trackedCall.response.visionBridgeNotice !== void 0 ? {
35992
+ visionBridgeNotice: trackedCall.response.visionBridgeNotice
35993
+ } : {},
35814
35994
  // Full detail for the Ctrl+O transcript (§4.9): derived from the
35815
35995
  // already-persisted functionResponse parts; NOT char-capped (the
35816
35996
  // bound is whatever core already applied). Consumed ONLY by the
@@ -35830,6 +36010,9 @@ function mapToDisplay(toolOrTools, projectRoot) {
35830
36010
  resultDisplay: compactToolResultDisplayForHistory(
35831
36011
  trackedCall.response.resultDisplay
35832
36012
  ),
36013
+ ...trackedCall.response.visionBridgeNotice !== void 0 ? {
36014
+ visionBridgeNotice: trackedCall.response.visionBridgeNotice
36015
+ } : {},
35833
36016
  confirmationDetails: void 0
35834
36017
  };
35835
36018
  case "cancelled":
@@ -35839,6 +36022,9 @@ function mapToDisplay(toolOrTools, projectRoot) {
35839
36022
  resultDisplay: compactToolResultDisplayForHistory(
35840
36023
  trackedCall.response.resultDisplay
35841
36024
  ),
36025
+ ...trackedCall.response.visionBridgeNotice !== void 0 ? {
36026
+ visionBridgeNotice: trackedCall.response.visionBridgeNotice
36027
+ } : {},
35842
36028
  confirmationDetails: void 0
35843
36029
  };
35844
36030
  case "awaiting_approval":
@@ -35893,42 +36079,53 @@ __name(mapToDisplay, "mapToDisplay");
35893
36079
  // packages/cli/src/ui/hooks/useGeminiStream.ts
35894
36080
  import { promises as fs17 } from "node:fs";
35895
36081
  import path12 from "node:path";
35896
- import process14 from "node:process";
36082
+ import process15 from "node:process";
35897
36083
 
35898
36084
  // packages/cli/src/ui/hooks/useMessageQueue.ts
35899
36085
  init_esbuild_shims();
35900
36086
  var import_react135 = __toESM(require_react(), 1);
35901
36087
  var GOAL_COMMAND_RE = /^\/goal(?:\s|$)/;
36088
+ function aggregateMessages(messages) {
36089
+ const modelText = messages.map((message) => message.modelText).join("\n\n");
36090
+ const submittedPrompts = messages.map((message) => message.submittedPrompt);
36091
+ return submittedPrompts.every(
36092
+ (submittedPrompt) => submittedPrompt !== void 0
36093
+ ) ? { modelText, submittedPrompt: submittedPrompts.join("\n\n") } : { modelText };
36094
+ }
36095
+ __name(aggregateMessages, "aggregateMessages");
35902
36096
  function useMessageQueue() {
35903
36097
  const [queuedMessages, setQueuedMessages] = (0, import_react135.useState)([]);
35904
36098
  const queueRef = (0, import_react135.useRef)([]);
35905
- const addMessage = (0, import_react135.useCallback)((message, deferUntilIdle = false) => {
35906
- const trimmedMessage = message.trim();
35907
- if (trimmedMessage.length > 0) {
35908
- queueRef.current = [
35909
- ...queueRef.current,
35910
- { text: trimmedMessage, deferUntilIdle }
35911
- ];
35912
- setQueuedMessages(queueRef.current);
35913
- }
35914
- }, []);
36099
+ const addMessage = (0, import_react135.useCallback)(
36100
+ (message, deferUntilIdle = false, submittedPrompt) => {
36101
+ const modelText = message.trim();
36102
+ if (modelText.length > 0) {
36103
+ queueRef.current = [
36104
+ ...queueRef.current,
36105
+ { modelText, deferUntilIdle, submittedPrompt }
36106
+ ];
36107
+ setQueuedMessages(queueRef.current);
36108
+ }
36109
+ },
36110
+ []
36111
+ );
35915
36112
  const clearQueue = (0, import_react135.useCallback)(() => {
35916
36113
  queueRef.current = [];
35917
36114
  setQueuedMessages([]);
35918
36115
  }, []);
35919
36116
  const getQueuedMessagesText = (0, import_react135.useCallback)(() => {
35920
36117
  if (queuedMessages.length === 0) return "";
35921
- return queuedMessages.map(({ text }) => text).join("\n\n");
36118
+ return queuedMessages.map(({ modelText }) => modelText).join("\n\n");
35922
36119
  }, [queuedMessages]);
35923
36120
  const popAllMessages = (0, import_react135.useCallback)(() => {
35924
36121
  const current = queueRef.current;
35925
36122
  if (current.length === 0) return null;
35926
36123
  queueRef.current = [];
35927
36124
  setQueuedMessages([]);
35928
- return current.map(({ text }) => text).join("\n\n");
36125
+ return aggregateMessages(current);
35929
36126
  }, []);
35930
36127
  const restoreMessages = (0, import_react135.useCallback)((messages) => {
35931
- const restored = messages.map((text) => text.trim()).filter(Boolean).map((text) => ({ text, deferUntilIdle: false }));
36128
+ const restored = messages.map((text) => text.trim()).filter(Boolean).map((modelText) => ({ modelText, deferUntilIdle: false }));
35932
36129
  if (restored.length === 0) return;
35933
36130
  queueRef.current = [...restored, ...queueRef.current];
35934
36131
  setQueuedMessages(queueRef.current);
@@ -35936,31 +36133,36 @@ function useMessageQueue() {
35936
36133
  const drainQueue = (0, import_react135.useCallback)((includeDeferred = false) => {
35937
36134
  const current = queueRef.current;
35938
36135
  if (current.length === 0) return [];
35939
- const shouldDrain = /* @__PURE__ */ __name((message) => (!isSlashCommand(message.text) || !includeDeferred && GOAL_COMMAND_RE.test(message.text)) && (includeDeferred || !message.deferUntilIdle), "shouldDrain");
36136
+ const shouldDrain = /* @__PURE__ */ __name((message) => (!isSlashCommand(message.modelText) || !includeDeferred && GOAL_COMMAND_RE.test(message.modelText)) && (includeDeferred || !message.deferUntilIdle), "shouldDrain");
35940
36137
  const drained = current.filter(shouldDrain);
35941
36138
  if (drained.length === 0) return [];
35942
36139
  const rest = current.filter((message) => !shouldDrain(message));
35943
36140
  queueRef.current = rest;
35944
36141
  setQueuedMessages(rest);
35945
- return drained.map(({ text }) => text);
36142
+ return drained.map(({ modelText }) => modelText);
35946
36143
  }, []);
35947
- const popNextSegment = (0, import_react135.useCallback)(() => {
36144
+ const popNextTurn = (0, import_react135.useCallback)(() => {
35948
36145
  const current = queueRef.current;
35949
36146
  if (current.length === 0) return null;
35950
- const [head, ...rest] = current;
36147
+ const plainMessages = current.filter(
36148
+ (message) => !isSlashCommand(message.modelText)
36149
+ );
36150
+ const messages = plainMessages.length > 0 ? plainMessages : [current[0]];
36151
+ const selected = new Set(messages);
36152
+ const rest = current.filter((message) => !selected.has(message));
35951
36153
  queueRef.current = rest;
35952
36154
  setQueuedMessages(rest);
35953
- return head.text;
36155
+ return aggregateMessages(messages);
35954
36156
  }, []);
35955
36157
  return {
35956
- messageQueue: queuedMessages.map(({ text }) => text),
36158
+ messageQueue: queuedMessages.map(({ modelText }) => modelText),
35957
36159
  addMessage,
35958
36160
  clearQueue,
35959
36161
  getQueuedMessagesText,
35960
36162
  popAllMessages,
35961
36163
  restoreMessages,
35962
36164
  drainQueue,
35963
- popNextSegment
36165
+ popNextTurn
35964
36166
  };
35965
36167
  }
35966
36168
  __name(useMessageQueue, "useMessageQueue");
@@ -36115,6 +36317,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36115
36317
  const isSubmittingQueryRef = (0, import_react136.useRef)(false);
36116
36318
  const lastPromptRef = (0, import_react136.useRef)(null);
36117
36319
  const lastTurnUserItemRef = (0, import_react136.useRef)(null);
36320
+ const canUndoLastLoggedUserMessageRef = (0, import_react136.useRef)(false);
36118
36321
  const turnSawContentEventRef = (0, import_react136.useRef)(false);
36119
36322
  const lastPromptErroredRef = (0, import_react136.useRef)(false);
36120
36323
  const commitItem = (0, import_react136.useCallback)(
@@ -36155,6 +36358,10 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36155
36358
  const submitPromptOnCompleteRef = (0, import_react136.useRef)(null);
36156
36359
  const modelOverrideRef = (0, import_react136.useRef)(void 0);
36157
36360
  const inlineModelOverrideActiveRef = (0, import_react136.useRef)(false);
36361
+ const canUseToolResultFullTurnModel = (0, import_react136.useCallback)((model) => {
36362
+ const current = modelOverrideRef.current;
36363
+ return !inlineModelOverrideActiveRef.current && (!current?.endsWith("\0") || current === model);
36364
+ }, []);
36158
36365
  const handledProviderToolCallIdsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Set());
36159
36366
  const duplicateProviderToolCallResponseIdsRef = (0, import_react136.useRef)(
36160
36367
  /* @__PURE__ */ new Set()
@@ -36185,7 +36392,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36185
36392
  },
36186
36393
  config,
36187
36394
  getPreferredEditor,
36188
- onEditorClose
36395
+ onEditorClose,
36396
+ canUseToolResultFullTurnModel
36189
36397
  );
36190
36398
  const pendingToolCallGroupDisplay = (0, import_react136.useMemo)(
36191
36399
  () => toolCalls.length ? mapToDisplay(toolCalls, config.getProjectRoot()) : void 0,
@@ -36369,6 +36577,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36369
36577
  onCancelSubmit({
36370
36578
  pendingItem: pendingItemAtCancel,
36371
36579
  lastTurnUserItem: lastTurnUserItemRef.current,
36580
+ canUndoLastLoggedUserMessage: canUndoLastLoggedUserMessageRef.current,
36372
36581
  turnProducedMeaningfulContent: turnSawContentEventRef.current
36373
36582
  });
36374
36583
  } finally {
@@ -36453,14 +36662,16 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36453
36662
  [addItem, config]
36454
36663
  );
36455
36664
  const prepareQueryForGemini = (0, import_react136.useCallback)(
36456
- async (query, userMessageTimestamp, abortSignal, prompt_id, submitType) => {
36665
+ async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
36457
36666
  if (turnCancelledRef.current) {
36458
36667
  return { queryToSend: null, shouldProceed: false };
36459
36668
  }
36460
36669
  if (typeof query === "string" && query.trim().length === 0) {
36461
36670
  return { queryToSend: null, shouldProceed: false };
36462
36671
  }
36463
- lastTurnUserItemRef.current = null;
36672
+ if (!preserveTurnOwnership) {
36673
+ lastTurnUserItemRef.current = null;
36674
+ }
36464
36675
  let localQueryToSendToGemini = null;
36465
36676
  if (typeof query === "string") {
36466
36677
  const trimmedQuery = query.trim();
@@ -36478,6 +36689,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36478
36689
  }
36479
36690
  onDebugMessage(`Received user query (${trimmedQuery.length} chars)`);
36480
36691
  await logger?.logMessage("user" /* USER */, trimmedQuery);
36692
+ canUndoLastLoggedUserMessageRef.current = !preserveTurnOwnership && logger != null;
36481
36693
  const slashCommandResult = isSlashCommand(trimmedQuery) ? await handleSlashCommand(trimmedQuery) : false;
36482
36694
  if (slashCommandResult) {
36483
36695
  switch (slashCommandResult.type) {
@@ -36551,10 +36763,13 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36551
36763
  },
36552
36764
  userMessageTimestamp
36553
36765
  );
36554
- lastTurnUserItemRef.current = {
36555
- id: insertedId,
36556
- text: trimmedQuery
36557
- };
36766
+ if (!preserveTurnOwnership) {
36767
+ lastTurnUserItemRef.current = {
36768
+ id: insertedId,
36769
+ text: trimmedQuery,
36770
+ ...submittedPrompt === void 0 ? {} : { submittedPrompt }
36771
+ };
36772
+ }
36558
36773
  await new Promise((r) => setImmediate(r));
36559
36774
  }
36560
36775
  if (isAtCommand(trimmedQuery)) {
@@ -37677,6 +37892,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37677
37892
  async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
37678
37893
  const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
37679
37894
  const isTurnContinuation = submitType === "toolResult" /* ToolResult */ || submitType === "steer" /* Steer */;
37895
+ const submittedPrompt = submitType === "userQuery" /* UserQuery */ ? metadata?.submittedPrompt : void 0;
37680
37896
  if (isSubmittingQueryRef.current && !isTurnContinuation && !allowConcurrentBtwDuringResponse) {
37681
37897
  metadata?.onDeliveryFailed?.();
37682
37898
  return;
@@ -37689,6 +37905,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37689
37905
  loopDetectedRef.current = false;
37690
37906
  if (!isTurnContinuation && !allowConcurrentBtwDuringResponse) {
37691
37907
  lastTurnUserItemRef.current = null;
37908
+ canUndoLastLoggedUserMessageRef.current = false;
37692
37909
  turnSawContentEventRef.current = false;
37693
37910
  handledProviderToolCallIdsRef.current.clear();
37694
37911
  duplicateProviderToolCallResponseIdsRef.current.clear();
@@ -37735,7 +37952,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37735
37952
  userMessageTimestamp,
37736
37953
  abortSignal,
37737
37954
  prompt_id,
37738
- submitType
37955
+ submitType,
37956
+ submittedPrompt,
37957
+ allowConcurrentBtwDuringResponse
37739
37958
  );
37740
37959
  if (!shouldProceed || queryToSend === null) {
37741
37960
  isSubmittingQueryRef.current = false;
@@ -37793,17 +38012,19 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37793
38012
  );
37794
38013
  dualOutput.emitUserMessage(userParts);
37795
38014
  }
38015
+ const sendOptions = {
38016
+ type: submitType,
38017
+ notificationDisplayText: metadata?.notificationDisplayText,
38018
+ modelOverride: modelOverrideRef.current,
38019
+ steerInput: metadata?.steerInput,
38020
+ ...submittedPrompt !== void 0 ? { submittedPrompt } : {},
38021
+ ...!allowConcurrentBtwDuringResponse && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
38022
+ };
37796
38023
  const stream = geminiClient.sendMessageStream(
37797
38024
  finalQueryToSend,
37798
38025
  abortSignal,
37799
38026
  prompt_id,
37800
- {
37801
- type: submitType,
37802
- notificationDisplayText: metadata?.notificationDisplayText,
37803
- modelOverride: modelOverrideRef.current,
37804
- steerInput: metadata?.steerInput,
37805
- ...!allowConcurrentBtwDuringResponse && midTurnDrainRef ? { getSteerInput: drainSteerAtBoundary } : {}
37806
- }
38027
+ sendOptions
37807
38028
  );
37808
38029
  const processingStatus = await processGeminiStreamEvents(
37809
38030
  stream,
@@ -37857,6 +38078,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37857
38078
  }
37858
38079
  if (retryCountdownTimerRef.current) {
37859
38080
  clearRetryCountdown();
38081
+ } else if (pendingRetryErrorItemRef.current && !lastPromptErroredRef.current) {
38082
+ clearRetryCountdown();
37860
38083
  }
37861
38084
  const loopDetected = loopDetectedRef.current;
37862
38085
  if (loopDetected) {
@@ -38480,7 +38703,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38480
38703
  const summary = scheduler.getExitSummary();
38481
38704
  scheduler.stop();
38482
38705
  if (summary) {
38483
- process14.stderr.write(summary + "\n");
38706
+ process15.stderr.write(summary + "\n");
38484
38707
  }
38485
38708
  };
38486
38709
  }, [config, getAutonomousLoopTickResolver, isConfigInitialized]);
@@ -40611,7 +40834,7 @@ __name(useTerminalProgress, "useTerminalProgress");
40611
40834
  // packages/cli/src/ui/hooks/useFolderTrust.ts
40612
40835
  init_esbuild_shims();
40613
40836
  var import_react143 = __toESM(require_react(), 1);
40614
- import * as process15 from "node:process";
40837
+ import * as process16 from "node:process";
40615
40838
  var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
40616
40839
  const [isTrusted, setIsTrusted] = (0, import_react143.useState)(void 0);
40617
40840
  const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react143.useState)(false);
@@ -40626,7 +40849,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
40626
40849
  const handleFolderTrustSelect = (0, import_react143.useCallback)(
40627
40850
  (choice) => {
40628
40851
  const trustedFolders = loadTrustedFolders();
40629
- const cwd3 = process15.cwd();
40852
+ const cwd3 = process16.cwd();
40630
40853
  let trustLevel;
40631
40854
  const wasTrusted = isTrusted ?? true;
40632
40855
  switch (choice) {
@@ -40642,7 +40865,15 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
40642
40865
  default:
40643
40866
  return;
40644
40867
  }
40645
- trustedFolders.setValue(cwd3, trustLevel);
40868
+ try {
40869
+ trustedFolders.setValue(cwd3, trustLevel);
40870
+ } catch (error) {
40871
+ writeStderrLineSafe("Error saving trusted folders file.");
40872
+ writeStderrLineSafe(
40873
+ error instanceof Error ? error.message : String(error)
40874
+ );
40875
+ return;
40876
+ }
40646
40877
  const currentIsTrusted = trustLevel === "TRUST_FOLDER" /* TRUST_FOLDER */ || trustLevel === "TRUST_PARENT" /* TRUST_PARENT */;
40647
40878
  setIsTrusted(currentIsTrusted);
40648
40879
  onTrustChange(currentIsTrusted);
@@ -40933,14 +41164,22 @@ __name(sendNotification, "sendNotification");
40933
41164
  // packages/cli/src/ui/hooks/useGitBranchName.ts
40934
41165
  init_esbuild_shims();
40935
41166
  var import_react146 = __toESM(require_react(), 1);
41167
+ var BRANCH_POLL_INTERVAL_MS = 5e3;
40936
41168
  function useGitBranchName(cwd3) {
40937
41169
  const [branchName, setBranchName] = (0, import_react146.useState)(void 0);
41170
+ const branchNameRef = (0, import_react146.useRef)(branchName);
41171
+ branchNameRef.current = branchName;
40938
41172
  (0, import_react146.useEffect)(() => {
40939
41173
  let cancelled = false;
40940
41174
  let dispose;
41175
+ let pollTimer;
41176
+ let refreshGeneration = 0;
40941
41177
  const refresh = /* @__PURE__ */ __name(async () => {
41178
+ const generation = ++refreshGeneration;
40942
41179
  const name = await resolveBranchName(cwd3);
40943
- if (!cancelled) setBranchName(name);
41180
+ if (!cancelled && generation === refreshGeneration && name !== branchNameRef.current) {
41181
+ setBranchName(name);
41182
+ }
40944
41183
  }, "refresh");
40945
41184
  const init = /* @__PURE__ */ __name(async () => {
40946
41185
  await refresh();
@@ -40954,12 +41193,20 @@ function useGitBranchName(cwd3) {
40954
41193
  } else {
40955
41194
  dispose = disposer;
40956
41195
  }
41196
+ if (!cancelled) {
41197
+ pollTimer = setInterval(() => {
41198
+ void refresh().catch(() => {
41199
+ });
41200
+ }, BRANCH_POLL_INTERVAL_MS);
41201
+ pollTimer.unref?.();
41202
+ }
40957
41203
  }, "init");
40958
41204
  void init().catch(() => {
40959
41205
  });
40960
41206
  return () => {
40961
41207
  cancelled = true;
40962
41208
  dispose?.();
41209
+ if (pollTimer) clearInterval(pollTimer);
40963
41210
  };
40964
41211
  }, [cwd3]);
40965
41212
  return branchName;
@@ -42150,7 +42397,7 @@ __name(shouldAutoOpenSkillReview, "shouldAutoOpenSkillReview");
42150
42397
  var SHELL_WIDTH_FRACTION = 0.89;
42151
42398
  var SHELL_HEIGHT_PADDING = 10;
42152
42399
  var AppContainer = /* @__PURE__ */ __name((props) => {
42153
- const { settings, config, initializationResult } = props;
42400
+ const { settings, config, initializationResult, initialUseVirtualViewport } = props;
42154
42401
  const extensionRefreshState = (0, import_react165.useMemo)(
42155
42402
  () => props.extensionRefreshState ?? new ExtensionRefreshState(),
42156
42403
  [props.extensionRefreshState]
@@ -42271,7 +42518,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42271
42518
  const { stdin, setRawMode } = use_stdin_default();
42272
42519
  const { stdout } = use_stdout_default();
42273
42520
  const writeRaw = (0, import_react165.useCallback)((data) => {
42274
- process16.stdout.write(data);
42521
+ process17.stdout.write(data);
42275
42522
  }, []);
42276
42523
  const terminal = (0, import_react165.useMemo)(
42277
42524
  () => buildTerminalNotification(writeRaw),
@@ -42495,6 +42742,27 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42495
42742
  }
42496
42743
  }, []);
42497
42744
  const preferredEditor = usePreferredEditor();
42745
+ const restoredSubmissionRef = (0, import_react165.useRef)(null);
42746
+ const submittedPromptProvenanceUnavailableRef = (0, import_react165.useRef)(false);
42747
+ const setBufferTextRef = (0, import_react165.useRef)(null);
42748
+ const invalidateSubmittedPromptProvenance = (0, import_react165.useCallback)(() => {
42749
+ restoredSubmissionRef.current = null;
42750
+ submittedPromptProvenanceUnavailableRef.current = true;
42751
+ }, []);
42752
+ const handleBufferChange = (0, import_react165.useCallback)((text) => {
42753
+ if (text.length === 0) {
42754
+ if (restoredSubmissionRef.current !== null || submittedPromptProvenanceUnavailableRef.current) {
42755
+ setBufferTextRef.current?.("", { clearUndoHistory: true });
42756
+ }
42757
+ restoredSubmissionRef.current = null;
42758
+ submittedPromptProvenanceUnavailableRef.current = false;
42759
+ return;
42760
+ }
42761
+ if (restoredSubmissionRef.current !== null && restoredSubmissionRef.current.modelText !== text) {
42762
+ restoredSubmissionRef.current = null;
42763
+ submittedPromptProvenanceUnavailableRef.current = true;
42764
+ }
42765
+ }, []);
42498
42766
  const buffer = useTextBuffer({
42499
42767
  initialText: "",
42500
42768
  viewport: { height: 10, width: inputWidth },
@@ -42502,8 +42770,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42502
42770
  setRawMode,
42503
42771
  isValidPath,
42504
42772
  shellModeActive,
42505
- preferredEditor
42773
+ preferredEditor,
42774
+ onChange: handleBufferChange
42506
42775
  });
42776
+ const setBufferText = buffer.setText;
42777
+ setBufferTextRef.current = setBufferText;
42507
42778
  const restoredPromptStashTargetsRef = (0, import_react165.useRef)(/* @__PURE__ */ new Set());
42508
42779
  const promptStashTargetDir = config.getTargetDir();
42509
42780
  (0, import_react165.useEffect)(() => {
@@ -42511,11 +42782,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42511
42782
  return;
42512
42783
  }
42513
42784
  restoredPromptStashTargetsRef.current.add(promptStashTargetDir);
42514
- restorePromptStash(
42515
- promptStashTargetDir,
42516
- buffer.text,
42517
- (text) => buffer.setText(text)
42518
- );
42785
+ restorePromptStash(promptStashTargetDir, buffer.text, (text) => {
42786
+ restoredSubmissionRef.current = null;
42787
+ submittedPromptProvenanceUnavailableRef.current = true;
42788
+ buffer.setText(text);
42789
+ });
42519
42790
  }, [buffer, promptStashTargetDir]);
42520
42791
  (0, import_react165.useEffect)(() => {
42521
42792
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
@@ -42534,7 +42805,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42534
42805
  const remountStaticHistory = (0, import_react165.useCallback)(() => {
42535
42806
  setHistoryRemountKey((prev) => prev + 1);
42536
42807
  }, []);
42537
- const useTerminalBuffer = settings.merged.ui?.useTerminalBuffer ?? false;
42808
+ const [useTerminalBuffer] = (0, import_react165.useState)(
42809
+ () => initialUseVirtualViewport ?? shouldUseVirtualViewport(
42810
+ settings.merged.ui?.useTerminalBuffer,
42811
+ config.getScreenReader(),
42812
+ isInteractiveTerminal()
42813
+ )
42814
+ );
42538
42815
  const showScrollbar = settings.merged.ui?.showScrollbar ?? true;
42539
42816
  const refreshStatic = (0, import_react165.useCallback)(() => {
42540
42817
  if (isTranscriptOpenRef.current) {
@@ -42725,6 +43002,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42725
43002
  const closeHelpDialog = (0, import_react165.useCallback)(() => setHelpDialogOpen(false), []);
42726
43003
  const { vimEnabled, vimMode } = useVimModeState();
42727
43004
  const { toggleVimEnabled } = useVimModeActions();
43005
+ (0, import_react165.useLayoutEffect)(() => {
43006
+ if (vimEnabled && buffer.text.length > 0) {
43007
+ invalidateSubmittedPromptProvenance();
43008
+ }
43009
+ }, [buffer.text, invalidateSubmittedPromptProvenance, vimEnabled]);
42728
43010
  const {
42729
43011
  isSubagentCreateDialogOpen,
42730
43012
  openSubagentCreateDialog,
@@ -42846,7 +43128,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42846
43128
  config.getGeminiClient()?.requestShutdown();
42847
43129
  setTimeout(async () => {
42848
43130
  await runExitCleanup();
42849
- process16.exit(0);
43131
+ process17.exit(0);
42850
43132
  }, 100);
42851
43133
  }, "quit"),
42852
43134
  setDebugMessage,
@@ -43029,7 +43311,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43029
43311
  );
43030
43312
  try {
43031
43313
  const { memoryContent, fileCount, conditionalRules, projectRoot } = await loadHierarchicalGeminiMemory(
43032
- process16.cwd(),
43314
+ process17.cwd(),
43033
43315
  settings.merged.context?.loadFromIncludeDirectories ? config.getWorkspaceContext().getDirectories() : [],
43034
43316
  config.getFileService(),
43035
43317
  config.getExtensionContextFilePaths(),
@@ -43188,8 +43470,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43188
43470
  popAllMessages,
43189
43471
  restoreMessages,
43190
43472
  drainQueue,
43191
- popNextSegment
43473
+ popNextTurn
43192
43474
  } = useMessageQueue();
43475
+ const submitUserQuery = (0, import_react165.useCallback)(
43476
+ (submission) => submitQuery(
43477
+ submission.modelText,
43478
+ "userQuery" /* UserQuery */,
43479
+ void 0,
43480
+ submission.submittedPrompt === void 0 ? void 0 : { submittedPrompt: submission.submittedPrompt }
43481
+ ),
43482
+ [submitQuery]
43483
+ );
43484
+ const popAllQueuedMessages = (0, import_react165.useCallback)(() => {
43485
+ const submission = popAllMessages();
43486
+ if (submission === null) return null;
43487
+ restoredSubmissionRef.current = submission;
43488
+ submittedPromptProvenanceUnavailableRef.current = false;
43489
+ return submission.modelText;
43490
+ }, [popAllMessages]);
43193
43491
  midTurnDrainRef.current = drainQueue;
43194
43492
  midTurnRestoreRef.current = restoreMessages;
43195
43493
  const remoteInput = useRemoteInput();
@@ -43282,6 +43580,20 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43282
43580
  }, [remoteInput]);
43283
43581
  const handleFinalSubmit = (0, import_react165.useCallback)(
43284
43582
  (submittedValue, options) => {
43583
+ const consumesComposerState = options !== void 0;
43584
+ const restoredSubmission = consumesComposerState ? restoredSubmissionRef.current : null;
43585
+ const submittedPromptProvenanceUnavailable = consumesComposerState && submittedPromptProvenanceUnavailableRef.current;
43586
+ if (consumesComposerState) {
43587
+ restoredSubmissionRef.current = null;
43588
+ submittedPromptProvenanceUnavailableRef.current = false;
43589
+ }
43590
+ const submittedPromptCandidate = options?.submittedPrompt;
43591
+ const provenanceEnabled = !vimEnabled && submittedPromptCandidate !== void 0;
43592
+ const trimmedSubmittedPrompt = submittedPromptCandidate?.trim();
43593
+ const submittedPrompt = submittedPromptProvenanceUnavailable || !provenanceEnabled ? void 0 : restoredSubmission === null ? trimmedSubmittedPrompt || void 0 : restoredSubmission.modelText === submittedValue ? restoredSubmission.submittedPrompt : void 0;
43594
+ if (restoredSubmission !== null || submittedPromptProvenanceUnavailable) {
43595
+ setBufferText("", { clearUndoHistory: true });
43596
+ }
43285
43597
  if (agentViewState.activeView !== "main") {
43286
43598
  const agent = agentViewState.agents.get(agentViewState.activeView);
43287
43599
  if (agent) {
@@ -43327,11 +43639,14 @@ ${buildWorkflowSteeringNotice()}
43327
43639
  ` + submittedValue;
43328
43640
  }
43329
43641
  if (options?.deferUntilIdle) {
43330
- addMessage(submittedValue, true);
43642
+ addMessage(submittedValue, true, submittedPrompt);
43331
43643
  return;
43332
43644
  }
43333
43645
  if (streamingState === "responding" /* Responding */ && isBtwCommand(submittedValue)) {
43334
- void submitQuery(submittedValue);
43646
+ void submitUserQuery({
43647
+ modelText: submittedValue,
43648
+ submittedPrompt
43649
+ });
43335
43650
  return;
43336
43651
  }
43337
43652
  const spec = speculationRef.current;
@@ -43405,7 +43720,7 @@ ${buildWorkflowSteeringNotice()}
43405
43720
  setPromptSuggestion(result.nextSuggestion);
43406
43721
  }
43407
43722
  }).catch(() => {
43408
- addMessage(submittedValue);
43723
+ addMessage(submittedValue, false, submittedPrompt);
43409
43724
  });
43410
43725
  speculationRef.current = IDLE_SPECULATION;
43411
43726
  return;
@@ -43416,22 +43731,27 @@ ${buildWorkflowSteeringNotice()}
43416
43731
  speculationRef.current = IDLE_SPECULATION;
43417
43732
  }
43418
43733
  if (streamingState === "idle" /* Idle */ && !isProcessing && isSlashCommand(submittedValue)) {
43419
- void submitQuery(submittedValue);
43734
+ void submitUserQuery({
43735
+ modelText: submittedValue,
43736
+ submittedPrompt
43737
+ });
43420
43738
  return;
43421
43739
  }
43422
- addMessage(submittedValue);
43740
+ addMessage(submittedValue, false, submittedPrompt);
43423
43741
  },
43424
43742
  [
43425
43743
  addMessage,
43426
43744
  agentViewState,
43427
43745
  streamingState,
43428
43746
  isProcessing,
43429
- submitQuery,
43747
+ submitUserQuery,
43430
43748
  handleSlashCommand,
43431
43749
  config,
43432
43750
  geminiClient,
43433
43751
  historyManager,
43434
- settings.merged.ui?.disableWorkflowKeywordTrigger
43752
+ settings.merged.ui?.disableWorkflowKeywordTrigger,
43753
+ setBufferText,
43754
+ vimEnabled
43435
43755
  ]
43436
43756
  );
43437
43757
  const handleArenaModelsSelected = (0, import_react165.useCallback)(
@@ -43501,9 +43821,13 @@ ${buildWorkflowSteeringNotice()}
43501
43821
  const draftWasEmpty = buffer.text.length === 0;
43502
43822
  const popped = popAllMessages();
43503
43823
  if (popped) {
43824
+ restoredSubmissionRef.current = popped;
43825
+ submittedPromptProvenanceUnavailableRef.current = false;
43504
43826
  const currentText = buffer.text;
43505
- buffer.setText(currentText ? `${popped}
43506
- ${currentText}` : popped);
43827
+ buffer.setText(
43828
+ currentText ? `${popped.modelText}
43829
+ ${currentText}` : popped.modelText
43830
+ );
43507
43831
  }
43508
43832
  if (!draftWasEmpty) {
43509
43833
  debugLogger40.debug("auto-restore bail: buffer was non-empty");
@@ -43522,6 +43846,14 @@ ${currentText}` : popped);
43522
43846
  );
43523
43847
  return;
43524
43848
  }
43849
+ const restoreCancelledPrompt = /* @__PURE__ */ __name(() => {
43850
+ restoredSubmissionRef.current = {
43851
+ modelText: cancelledTurnUserItem.text,
43852
+ ...cancelledTurnUserItem.submittedPrompt === void 0 ? {} : { submittedPrompt: cancelledTurnUserItem.submittedPrompt }
43853
+ };
43854
+ submittedPromptProvenanceUnavailableRef.current = false;
43855
+ buffer.setText(cancelledTurnUserItem.text);
43856
+ }, "restoreCancelledPrompt");
43525
43857
  if (pendingHistoryItems2.some((item) => item.type === "tool_group")) {
43526
43858
  debugLogger40.debug(
43527
43859
  "auto-restore bail: tool execution is pending or committed"
@@ -43532,7 +43864,7 @@ ${currentText}` : popped);
43532
43864
  debugLogger40.debug(
43533
43865
  "auto-restore: preserving streamed output and restoring prompt text"
43534
43866
  );
43535
- buffer.setText(cancelledTurnUserItem.text);
43867
+ restoreCancelledPrompt();
43536
43868
  return;
43537
43869
  }
43538
43870
  if (pendingHistoryItems2.some((item) => !isSyntheticHistoryItem(item))) {
@@ -43551,7 +43883,7 @@ ${currentText}` : popped);
43551
43883
  debugLogger40.debug(
43552
43884
  "auto-restore: preserving committed output and restoring prompt text"
43553
43885
  );
43554
- buffer.setText(cancelledTurnUserItem.text);
43886
+ restoreCancelledPrompt();
43555
43887
  return;
43556
43888
  }
43557
43889
  const lastUserItem = history[lastUserIdx];
@@ -43572,11 +43904,13 @@ ${currentText}` : popped);
43572
43904
  );
43573
43905
  historyManager.truncateToItem(lastUserItem.id);
43574
43906
  refreshStatic();
43575
- buffer.setText(lastUserItem.text);
43907
+ restoreCancelledPrompt();
43576
43908
  geminiClient?.stripOrphanedUserEntriesFromHistory?.();
43577
- void logger?.removeLastUserMessage().catch((err) => {
43578
- debugLogger40.debug("Failed to undo cancelled prompt from log:", err);
43579
- });
43909
+ if (info?.canUndoLastLoggedUserMessage) {
43910
+ void logger?.removeLastUserMessage().catch((err) => {
43911
+ debugLogger40.debug("Failed to undo cancelled prompt from log:", err);
43912
+ });
43913
+ }
43580
43914
  },
43581
43915
  [
43582
43916
  buffer,
@@ -44017,6 +44351,8 @@ ${currentText}` : popped);
44017
44351
  historyManager.loadHistory(truncatedUi);
44018
44352
  refreshStatic();
44019
44353
  if (userItem.type === "user" && userItem.text) {
44354
+ restoredSubmissionRef.current = null;
44355
+ submittedPromptProvenanceUnavailableRef.current = true;
44020
44356
  buffer.setText(userItem.text);
44021
44357
  }
44022
44358
  historyManager.addItem(
@@ -44487,7 +44823,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44487
44823
  lastTitleRef.current = null;
44488
44824
  const folderName2 = basename3(config.getTargetDir());
44489
44825
  writeTerminalTitle(
44490
- (value) => process16.stdout.write(value),
44826
+ (value) => process17.stdout.write(value),
44491
44827
  formatSessionWindowTitle(null, folderName2)
44492
44828
  );
44493
44829
  }
@@ -44497,7 +44833,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44497
44833
  const title = formatSessionWindowTitle(sessionName, folderName);
44498
44834
  if (lastTitleRef.current !== title) {
44499
44835
  lastTitleRef.current = title;
44500
- writeTerminalTitle((value) => process16.stdout.write(value), title);
44836
+ writeTerminalTitle((value) => process17.stdout.write(value), title);
44501
44837
  }
44502
44838
  }, [
44503
44839
  sessionName,
@@ -44519,11 +44855,10 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44519
44855
  return;
44520
44856
  }
44521
44857
  if (isTranscriptOpenRef.current) return;
44522
- const plainPrompts = drainQueue(true);
44523
- const submission = plainPrompts.length > 0 ? plainPrompts.join("\n\n") : popNextSegment();
44858
+ const submission = popNextTurn();
44524
44859
  if (submission === null) return;
44525
44860
  queueDrainingRef.current = true;
44526
- Promise.resolve(submitQuery(submission)).finally(() => {
44861
+ Promise.resolve(submitUserQuery(submission)).finally(() => {
44527
44862
  queueDrainingRef.current = false;
44528
44863
  setQueueDrainNonce((n) => n + 1);
44529
44864
  });
@@ -44535,9 +44870,8 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44535
44870
  // Re-run the drain when the transcript closes so queued messages resume.
44536
44871
  isTranscriptOpen,
44537
44872
  messageQueue,
44538
- drainQueue,
44539
- popNextSegment,
44540
- submitQuery,
44873
+ popNextTurn,
44874
+ submitUserQuery,
44541
44875
  queueDrainNonce
44542
44876
  ]);
44543
44877
  const nightly = props.version.includes("nightly");
@@ -44875,7 +45209,8 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44875
45209
  handleFinalSubmit,
44876
45210
  handleRetryLastPrompt: retryLastPrompt,
44877
45211
  handleClearScreen,
44878
- popAllQueuedMessages: popAllMessages,
45212
+ popAllQueuedMessages,
45213
+ invalidateSubmittedPromptProvenance,
44879
45214
  // Welcome back dialog
44880
45215
  handleWelcomeBackSelection,
44881
45216
  handleWelcomeBackClose,
@@ -44965,7 +45300,8 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44965
45300
  handleFinalSubmit,
44966
45301
  retryLastPrompt,
44967
45302
  handleClearScreen,
44968
- popAllMessages,
45303
+ popAllQueuedMessages,
45304
+ invalidateSubmittedPromptProvenance,
44969
45305
  handleWelcomeBackSelection,
44970
45306
  handleWelcomeBackClose,
44971
45307
  handleWorktreeExit,
@@ -45027,7 +45363,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
45027
45363
  }),
45028
45364
  [thoughtExpanded, expandedThoughtHeadIds, toggleThoughtExpanded]
45029
45365
  );
45030
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
45366
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(VirtualViewportContext.Provider, { value: useTerminalBuffer, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
45031
45367
  AppContext.Provider,
45032
45368
  {
45033
45369
  value: {
@@ -45051,7 +45387,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
45051
45387
  ) })
45052
45388
  ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(App, {}) }) }) }) })
45053
45389
  }
45054
- ) }) }) });
45390
+ ) }) }) }) });
45055
45391
  }, "AppContainer");
45056
45392
 
45057
45393
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
@@ -45312,6 +45648,11 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45312
45648
  }
45313
45649
  }
45314
45650
  const initialCapturedInput = stopAndGetCapturedInput();
45651
+ const useVP = shouldUseVirtualViewport(
45652
+ settings.merged.ui?.useTerminalBuffer,
45653
+ config.getScreenReader(),
45654
+ isInteractiveTerminal()
45655
+ );
45315
45656
  const AppWrapper = /* @__PURE__ */ __name(() => {
45316
45657
  const kittyProtocolStatus = useKittyKeyboardProtocol();
45317
45658
  const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
@@ -45331,13 +45672,13 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45331
45672
  startupWarnings,
45332
45673
  version,
45333
45674
  initializationResult,
45675
+ initialUseVirtualViewport: useVP,
45334
45676
  extensionRefreshState: options.extensionRefreshState
45335
45677
  }
45336
45678
  ) }) }) }) })
45337
45679
  }
45338
45680
  ) }) }) });
45339
45681
  }, "AppWrapper");
45340
- const useVP = settings.merged.ui?.useTerminalBuffer ?? false;
45341
45682
  const stdoutMaxListeners = process.stdout.getMaxListeners();
45342
45683
  if (useVP) {
45343
45684
  process.stdout.setMaxListeners(0);