@qwen-code/qwen-code 0.21.1-simplify-system-prompt.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 (405) 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-O6RKBPU4.js → StandaloneSessionPicker-LYXKD2EV.js} +66 -68
  18. package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-DFVPFQ6C.js} +2 -2
  19. package/chunks/{acpAgent-HYFVXVDR.js → acpAgent-WN5SRDQO.js} +1317 -542
  20. package/chunks/agent-K6ECSM64.js +80 -0
  21. package/chunks/agent-headless-NO4Y2HOE.js +74 -0
  22. package/chunks/{anthropicContentGenerator-LXUXMOE7.js → anthropicContentGenerator-V2QOGVYD.js} +61 -20
  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-G74LFADV.js → channel-management-service-XR7GZSWF.js} +4 -4
  29. package/chunks/channel-settings-store-HW4FXXUA.js +87 -0
  30. package/chunks/{channel-worker-group-PTJIJSKC.js → channel-worker-group-XDPTDWTX.js} +9 -5
  31. package/chunks/{channel-worker-manager-WIMGM2FD.js → channel-worker-manager-YYEHVRRE.js} +9 -5
  32. package/chunks/{channel-worker-supervisor-KUFTR6P5.js → channel-worker-supervisor-74HTWA2G.js} +5 -4
  33. package/chunks/{chunk-M5JM7OSF.js → chunk-2DN4J57Y.js} +2 -3
  34. package/chunks/{chunk-WDSWXQU3.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-PANH4R3B.js → chunk-2N7CODY5.js} +18 -12
  39. package/chunks/{chunk-ER5LWJR6.js → chunk-2XSLTRFZ.js} +3 -3
  40. package/chunks/{chunk-6PSLCFQ2.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-B4UMZKMU.js → chunk-52ZSWYEG.js} +1 -1
  44. package/chunks/{chunk-YAF5VNU7.js → chunk-5KTQXHPY.js} +4 -5
  45. package/chunks/{chunk-2YZJCM5T.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-FY3M44RD.js → chunk-5YKDXHUY.js} +3 -3
  49. package/chunks/{chunk-TF2X2WCT.js → chunk-5ZF5XXTS.js} +2 -2
  50. package/chunks/{chunk-K4XWPEWB.js → chunk-64LQLPL7.js} +4 -33
  51. package/chunks/{chunk-B7QDM6Z7.js → chunk-657BH7VM.js} +2 -2
  52. package/chunks/{chunk-5THCYPLO.js → chunk-65PQENQP.js} +14 -7
  53. package/chunks/{chunk-J6D3VXCC.js → chunk-6PE7N3A4.js} +17 -6
  54. package/chunks/{chunk-JZA3JUDJ.js → chunk-6QIGFD5W.js} +1 -1
  55. package/chunks/{chunk-Z5BLYMZM.js → chunk-6RPMI2AB.js} +6 -6
  56. package/chunks/{chunk-OHNBB4XR.js → chunk-75GFAX4R.js} +1 -1
  57. package/chunks/{chunk-BO4XCS7P.js → chunk-75MIQ3LV.js} +20 -85
  58. package/chunks/{chunk-52O2CIUL.js → chunk-7AEJDLRA.js} +130 -5
  59. package/chunks/{chunk-BYFNTGKI.js → chunk-7BAU433D.js} +2287 -941
  60. package/chunks/{chunk-ZE5WPL4I.js → chunk-7DXQIJID.js} +3 -3
  61. package/chunks/{chunk-ML52PL6O.js → chunk-7I5GTCT4.js} +483 -248
  62. package/chunks/{chunk-A5L3JMUA.js → chunk-7XATOOE7.js} +18 -4
  63. package/chunks/{chunk-C3NS4F2Q.js → chunk-A2D5BAVP.js} +1 -1
  64. package/chunks/{chunk-5I2IWRSH.js → chunk-A3NDJ5SB.js} +2 -2
  65. package/chunks/{chunk-2JM6GZ5D.js → chunk-A4COXFB3.js} +8 -13
  66. package/chunks/{chunk-CC4N4M36.js → chunk-AQIDMUGU.js} +1 -1
  67. package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
  68. package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
  69. package/chunks/{chunk-BJX6ZSUK.js → chunk-BCZFQXWK.js} +2 -2
  70. package/chunks/{chunk-SRZ6DXVG.js → chunk-BGTQCTQW.js} +44 -136
  71. package/chunks/{chunk-PSWQZHEA.js → chunk-BMFALVGQ.js} +1 -1
  72. package/chunks/{chunk-XHRTVPG2.js → chunk-BNWB5CYE.js} +7 -7
  73. package/chunks/{chunk-P5V4T7NK.js → chunk-BPZKP57P.js} +11 -3
  74. package/chunks/{chunk-2OM7GEXO.js → chunk-CAPPWD3X.js} +3 -3
  75. package/chunks/{chunk-LNURQEMZ.js → chunk-CQL64ESB.js} +7 -7
  76. package/chunks/{chunk-TOFQCPDC.js → chunk-CVHIL5IG.js} +4 -5
  77. package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
  78. package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
  79. package/chunks/{chunk-SQBYH7PX.js → chunk-DZLYR4U3.js} +1 -1
  80. package/chunks/{chunk-JALU3ZDU.js → chunk-EIF3FXTB.js} +117 -24
  81. package/chunks/{chunk-TQCBGUHN.js → chunk-EJGJIBRS.js} +5 -5
  82. package/chunks/{chunk-5U4IPFBR.js → chunk-EVKE2FZL.js} +4 -4
  83. package/chunks/{chunk-OKY7HXPG.js → chunk-FNMZK765.js} +2 -2
  84. package/chunks/{chunk-KU5XMLDK.js → chunk-FTD6DP4T.js} +3 -1
  85. package/chunks/chunk-FYJ7W2PI.js +194 -0
  86. package/chunks/{chunk-L5UHQJTJ.js → chunk-GATT5TKW.js} +1 -1
  87. package/chunks/{chunk-MVS3NS2N.js → chunk-GEBV2JGB.js} +28 -5
  88. package/chunks/{chunk-VAK25FTU.js → chunk-GKX7E4CO.js} +1 -1
  89. package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
  90. package/chunks/{chunk-N3FAY5CM.js → chunk-GNR2RNMP.js} +157 -4
  91. package/chunks/{chunk-YH6G52F2.js → chunk-GXIJHV66.js} +4 -4
  92. package/chunks/{chunk-HV3G62R6.js → chunk-GZ3RCT54.js} +1 -1
  93. package/chunks/{chunk-QY5MMZ6O.js → chunk-HMRM2A3U.js} +3 -3
  94. package/chunks/chunk-HV26XH34.js +319 -0
  95. package/chunks/{chunk-M4UKFCZ2.js → chunk-J7OACQDE.js} +193 -155
  96. package/chunks/{chunk-3HBZKBMQ.js → chunk-JFMA7Y5M.js} +5 -5
  97. package/chunks/{chunk-OJGCZBB7.js → chunk-JHNRZMHI.js} +41 -36
  98. package/chunks/{chunk-63P4EL5V.js → chunk-JMONIXMJ.js} +1 -1
  99. package/chunks/{chunk-L26JL52R.js → chunk-JSD33JG6.js} +47 -64
  100. package/chunks/{chunk-KIUFNBHR.js → chunk-JTV5K7NH.js} +1 -1
  101. package/chunks/{chunk-PHVR5UUY.js → chunk-JX27F6QS.js} +1 -1
  102. package/chunks/chunk-JYBU6YUE.js +378 -0
  103. package/chunks/{chunk-A6UO2C7C.js → chunk-KAMYKP7E.js} +167 -81
  104. package/chunks/{chunk-LG4GZIVV.js → chunk-KCO4FLFJ.js} +4 -4
  105. package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
  106. package/chunks/{chunk-RHLZR4E5.js → chunk-LGAOC3ZS.js} +1 -1
  107. package/chunks/{chunk-DM22XS4K.js → chunk-LO4ROVP4.js} +261 -15
  108. package/chunks/{chunk-NH6KE4JX.js → chunk-LW3RFMG7.js} +3 -3
  109. package/chunks/{chunk-J56UI34H.js → chunk-M7OONWYU.js} +2 -2
  110. package/chunks/{chunk-V6VRAM7B.js → chunk-MHAIJPTD.js} +12 -12
  111. package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
  112. package/chunks/{chunk-LZEMEFKY.js → chunk-MR5EAQ5M.js} +1 -1
  113. package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
  114. package/chunks/{chunk-H5FFA6TH.js → chunk-NOKIVHOL.js} +16 -3
  115. package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
  116. package/chunks/{chunk-B6ZJ7SI6.js → chunk-OCESJA77.js} +391 -328
  117. package/chunks/chunk-OCPBI7J5.js +18 -0
  118. package/chunks/{chunk-E5TUC6CA.js → chunk-OKF7JF3R.js} +3 -3
  119. package/chunks/{chunk-2Q3OT4OV.js → chunk-P4WOAOJW.js} +141 -64
  120. package/chunks/{chunk-4M377AZG.js → chunk-PB3MBFKG.js} +6 -6
  121. package/chunks/{chunk-QPDRAXDJ.js → chunk-PLDQBIO6.js} +1 -1
  122. package/chunks/{chunk-FNQ6T3CV.js → chunk-PONHVBRT.js} +10 -7
  123. package/chunks/{chunk-RWS5VYWC.js → chunk-PT722TDT.js} +267 -378
  124. package/chunks/chunk-Q43KPN7X.js +2196 -0
  125. package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
  126. package/chunks/{chunk-SASBXAQL.js → chunk-QIZKCVM3.js} +4 -4
  127. package/chunks/{chunk-32MVHM4T.js → chunk-RCUQIPTN.js} +1 -1
  128. package/chunks/{chunk-6FGBXPWM.js → chunk-RPLGZJV2.js} +38 -44
  129. package/chunks/{chunk-3IXOIAKE.js → chunk-S4WJVPZW.js} +18 -6
  130. package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
  131. package/chunks/{chunk-INADJJGW.js → chunk-S7W2GKIO.js} +0 -2
  132. package/chunks/{chunk-MUP3T3AD.js → chunk-SGFT55XI.js} +1 -35
  133. package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
  134. package/chunks/chunk-T26EAKDL.js +13 -0
  135. package/chunks/{chunk-3MSHSCSN.js → chunk-T2QMKU3R.js} +79 -1
  136. package/chunks/{chunk-VFSJ5VRH.js → chunk-T3O2B4XO.js} +3 -3
  137. package/chunks/{chunk-MSLKI6C2.js → chunk-T4TXDL7G.js} +32 -21
  138. package/chunks/{chunk-E5WH5O3C.js → chunk-TBBV36Y4.js} +4 -4
  139. package/chunks/{chunk-VV6XU5L7.js → chunk-TCIFAA7K.js} +16 -11
  140. package/chunks/{chunk-DN6ZX5AY.js → chunk-TDL6LB4K.js} +46 -11
  141. package/chunks/{chunk-W4CQXHT6.js → chunk-TFRMVU6R.js} +1 -1
  142. package/chunks/{chunk-GDIPH4JY.js → chunk-TV64SXKD.js} +6 -6
  143. package/chunks/{chunk-FQK6JAFG.js → chunk-U3E3UQAA.js} +4 -4
  144. package/chunks/{chunk-7FZEBPKS.js → chunk-UBEPNVDI.js} +23 -18
  145. package/chunks/{chunk-NL7LTRLR.js → chunk-UHUSJ6X7.js} +29 -68
  146. package/chunks/{chunk-ZOIFNCKL.js → chunk-UPUG4GXM.js} +3 -23
  147. package/chunks/{chunk-6GMVPFB2.js → chunk-UWMLWVCA.js} +19 -6
  148. package/chunks/{chunk-U7TXFVUN.js → chunk-VCPIZRYH.js} +118 -95
  149. package/chunks/{chunk-LNARWLZQ.js → chunk-VWOOBLTY.js} +2 -2
  150. package/chunks/{chunk-I7XZ3RY5.js → chunk-VYOXCEPJ.js} +1 -1
  151. package/chunks/{chunk-USTWD7QV.js → chunk-W4MIWP6M.js} +26 -16
  152. package/chunks/{chunk-DLWL3Z7A.js → chunk-WBSMNTSV.js} +3 -3
  153. package/chunks/{chunk-G4WFQUYQ.js → chunk-WUZ7H6DP.js} +1 -1
  154. package/chunks/{chunk-2JZBVYTU.js → chunk-WZRWHXFE.js} +1 -8
  155. package/chunks/{chunk-DM4Q4JJH.js → chunk-X5WNMMIA.js} +22506 -33611
  156. package/chunks/{chunk-MK7VQDN3.js → chunk-XBYYDKAZ.js} +7 -6
  157. package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
  158. package/chunks/{chunk-BRRAJXPA.js → chunk-XFZYFU3I.js} +1 -1
  159. package/chunks/{chunk-3QMGYBFN.js → chunk-XWWKIXVD.js} +1 -80
  160. package/chunks/{chunk-3SJ43L4W.js → chunk-XZC5VLBZ.js} +2 -0
  161. package/chunks/{chunk-UUUTRMI2.js → chunk-Y4IHBGBP.js} +1 -1
  162. package/chunks/{chunk-PR75REBZ.js → chunk-Y6AXW2OG.js} +12 -82
  163. package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
  164. package/chunks/{chunk-3JAQDSXN.js → chunk-YGF33UXG.js} +70 -8
  165. package/chunks/chunk-Z4X5MTRT.js +133 -0
  166. package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
  167. package/chunks/{chunk-ZD6UTE4A.js → chunk-ZHBO7WVX.js} +1 -1
  168. package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
  169. package/chunks/{chunk-66RMLJHC.js → chunk-ZURDMIDR.js} +355 -143
  170. package/chunks/{computer-use-DOFAHZAB.js → computer-use-ZTIDHMMA.js} +48 -50
  171. package/chunks/{config-utils-VFQXVGNR.js → config-utils-NYSXDMEQ.js} +4 -4
  172. package/chunks/contextCommand-2PIEU37Z.js +79 -0
  173. package/chunks/core-runtime-3XEYLQFK.js +133 -0
  174. package/chunks/{create-sub-session-7543K2QA.js → create-sub-session-R76FVXCI.js} +45 -47
  175. package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-SBYUMSSS.js} +3 -3
  176. package/chunks/{cron-create-YIID5XAW.js → cron-create-2QK6TCEC.js} +6 -6
  177. package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-FDCDFYMG.js} +5 -5
  178. package/chunks/{cron-list-XEGS463Q.js → cron-list-XN3WVBTP.js} +6 -6
  179. package/chunks/{daemon-VOMQW7KZ.js → daemon-Q2AB5Z23.js} +167 -15
  180. package/chunks/daemon-status-provider-3XJI6CAL.js +89 -0
  181. package/chunks/daemon-trust-policy-ILUDTLHD.js +84 -0
  182. package/chunks/daemon-trust-policy-monitor-HS3PKKRO.js +171 -0
  183. package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
  184. package/chunks/deferred-core-runtime-X4QV662U.js +88 -0
  185. package/chunks/dist-BSTVRPMT.js +4227 -0
  186. package/chunks/{dist-NNVBBOGU.js → dist-DOLYHMXE.js} +2 -2
  187. package/chunks/{dist-RTJFMNEZ.js → dist-HVRQ2CFL.js} +271 -11
  188. package/chunks/{dist-ANLAT3GS.js → dist-IXQEQWRG.js} +2 -1
  189. package/chunks/{dist-BRB6EXK4.js → dist-SSU66DM4.js} +3 -3
  190. package/chunks/{dist-KTYYJ2C5.js → dist-SV7Q3AWJ.js} +1 -1
  191. package/chunks/{dist-K6Y4E7FX.js → dist-YGBBMK3Z.js} +1 -1
  192. package/chunks/earlyInputCapture-XKLZT7ZD.js +81 -0
  193. package/chunks/{edit-RIEOJWKB.js → edit-HHGIOTQ2.js} +47 -49
  194. package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
  195. package/chunks/{enter-worktree-OGK5FQ3R.js → enter-worktree-ZN7PUQ46.js} +47 -49
  196. package/chunks/{enterPlanMode-IWZYALIB.js → enterPlanMode-EIFIDSIV.js} +47 -49
  197. package/chunks/{environment-VZ7BRI4Q.js → environment-XXQ75D2Q.js} +47 -49
  198. package/chunks/errors-4GMVU7CK.js +87 -0
  199. package/chunks/esm-K5FARBNI.js +5548 -0
  200. package/chunks/{exit-worktree-4TEYVIVP.js → exit-worktree-GXMI4ATY.js} +47 -49
  201. package/chunks/exitPlanMode-34UVY7M6.js +72 -0
  202. package/chunks/{fast-path-HYE7IFEV.js → fast-path-VPIVA7L6.js} +13 -3
  203. package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
  204. package/chunks/{gemini-NGRQX3YJ.js → gemini-4BWIK4WD.js} +103 -103
  205. package/chunks/{geminiContentGenerator-FQHPFZSR.js → geminiContentGenerator-3XVV5MSS.js} +7 -7
  206. package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
  207. package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
  208. package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
  209. package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
  210. package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
  211. package/chunks/{glob-FRTM3X2E.js → glob-TZ2ABCJG.js} +47 -49
  212. package/chunks/{grep-RKWVROCW.js → grep-BEF463NA.js} +49 -50
  213. package/chunks/handleAutoUpdate-L6ERF36Y.js +80 -0
  214. package/chunks/i18n-FMM5FDXR.js +96 -0
  215. package/chunks/{image-gen-WIEM7KZA.js → image-gen-HHVLF7HS.js} +12 -12
  216. package/chunks/initializer-625TIAIO.js +85 -0
  217. package/chunks/installationInfo-6AM4I2Y3.js +79 -0
  218. package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
  219. package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-72IYCAZV.js} +3 -3
  220. package/chunks/lib-RUF3WZA6.js +9 -0
  221. package/chunks/list-L2GA674Y.js +88 -0
  222. package/chunks/{list-agents-5KJJHR6I.js → list-agents-R6KDXQR3.js} +3 -3
  223. package/chunks/loadedSettingsAdapter-SPUTNKAV.js +82 -0
  224. package/chunks/{loggingContentGenerator-WGM27QAW.js → loggingContentGenerator-LKOF7XI7.js} +31 -30
  225. package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-3IQKCYAH.js} +7 -7
  226. package/chunks/{ls-NTK6VOQJ.js → ls-DKZ37A7N.js} +5 -5
  227. package/chunks/{lsp-2JI24STP.js → lsp-QNWN7KN3.js} +3 -3
  228. package/chunks/{managed-npm-update-JQ2CG3RH.js → managed-npm-update-ACQGGIN5.js} +46 -48
  229. package/chunks/mcp-SZLHKFJW.js +82 -0
  230. package/chunks/{monitor-7FEWXX5F.js → monitor-DF52UVHI.js} +47 -49
  231. package/chunks/nonInteractiveCli-5T7KYKLK.js +144 -0
  232. package/chunks/{notebook-edit-JGJV2K6J.js → notebook-edit-FCWS4XVN.js} +47 -49
  233. package/chunks/{openaiContentGenerator-JPVXDTAO.js → openaiContentGenerator-7LDK3DCJ.js} +25 -27
  234. package/chunks/pidfile-6ERW3DF4.js +85 -0
  235. package/chunks/process-registry-2CHQBXH5.js +157 -0
  236. package/chunks/{processUtils-V2LCK6T6.js → processUtils-COKZAMUP.js} +2 -2
  237. package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
  238. package/chunks/{qwenContentGenerator-TICV2W2Z.js → qwenContentGenerator-TKWUMR7N.js} +51 -53
  239. package/chunks/{qwenOAuth2-XGFI5XJG.js → qwenOAuth2-7HMU47SF.js} +10 -10
  240. package/chunks/read-file-X6DRC574.js +29 -0
  241. package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-GFTWYXMK.js} +4 -4
  242. package/chunks/{record-artifact-RQKFYO5B.js → record-artifact-XAMSFSW4.js} +3 -3
  243. package/chunks/resumeHistoryUtils-PFPM2GWM.js +90 -0
  244. package/chunks/ripGrep-OWV2IVJC.js +72 -0
  245. package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
  246. package/chunks/{run-qwen-serve-3VCV4I7E.js → run-qwen-serve-TSTCO4XE.js} +917 -249
  247. package/chunks/{runtime-AXJWIEDU.js → runtime-DAUPSUKI.js} +55 -57
  248. package/chunks/{scheduler-RS2I6RU5.js → scheduler-KMADMT26.js} +45 -47
  249. package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
  250. package/chunks/{sdk-exporters-http-FS6ZV7MF.js → sdk-exporters-http-WO556XNU.js} +7 -7
  251. package/chunks/{sdk-impl-7FZSCSXB.js → sdk-impl-LPAVACSF.js} +10 -10
  252. package/chunks/{send-message-Q6OOR6BR.js → send-message-SAWK4DZX.js} +6 -6
  253. package/chunks/serve-NNRWS6F4.js +88 -0
  254. package/chunks/{server-HRZ23U7M.js → server-WEH7DVCH.js} +3304 -842
  255. package/chunks/{session-7XHZKTVV.js → session-WXC56V2I.js} +94 -94
  256. package/chunks/{settings-7ZGZDXAS.js → settings-DJDXFDZ3.js} +54 -56
  257. package/chunks/shell-JN5VRQXD.js +82 -0
  258. package/chunks/{skill-LIWXNLDW.js → skill-SGXPKJCS.js} +20 -22
  259. package/chunks/skill-settings-VJ5PDMZI.js +90 -0
  260. package/chunks/spawnChannel-ETMJW7YX.js +81 -0
  261. package/chunks/standalone-update-MK3Z7KBI.js +91 -0
  262. package/chunks/{startInteractiveUI-IW3CSKHA.js → startInteractiveUI-ZCGIXPGT.js} +715 -373
  263. package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-355CB6CJ.js} +4 -4
  264. package/chunks/{task-create-N7WQSGYA.js → task-create-INGWNUG4.js} +10 -10
  265. package/chunks/{task-list-FOPULZEP.js → task-list-5XNNGTF4.js} +7 -7
  266. package/chunks/{task-stop-H6RHXFVQ.js → task-stop-4ROAOBXH.js} +3 -3
  267. package/chunks/{task-update-M57TFZJT.js → task-update-CRK5VWWZ.js} +10 -10
  268. package/chunks/{team-create-O2FROQ4R.js → team-create-QQGAJG7P.js} +49 -51
  269. package/chunks/{team-delete-QE2UXJL7.js → team-delete-S2RCXA4P.js} +7 -7
  270. package/chunks/{team-plan-approval-Q6WDBXTQ.js → team-plan-approval-RT7Q5R6O.js} +47 -49
  271. package/chunks/theme-manager-EEWIQJ7J.js +76 -0
  272. package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-7WM3VDMY.js} +7 -7
  273. package/chunks/{tool-search-APECNQ3Z.js → tool-search-Z3Z4AYKP.js} +19 -21
  274. package/chunks/total-session-admission-44JKRWQD.js +84 -0
  275. package/chunks/{tree-sitter-FS4VPMZA.js → tree-sitter-4D7QS7F6.js} +1 -1
  276. package/chunks/{tree-sitter-bash-6B46JJCV.js → tree-sitter-bash-VEJGF5XF.js} +1 -1
  277. package/chunks/trustedFolders-X2JEIO57.js +94 -0
  278. package/chunks/{update-relaunch-ON5MDJQG.js → update-relaunch-VWNPYDIP.js} +5 -5
  279. package/chunks/updateCheck-KAQH67DV.js +91 -0
  280. package/chunks/useAutoAcceptIndicator-JH6BCF7S.js +92 -0
  281. package/chunks/{validateNonInterActiveAuth-JBLKBKRD.js → validateNonInterActiveAuth-GIUJ2UFS.js} +88 -88
  282. package/chunks/{version-LTNUBQJY.js → version-BGLYIJUY.js} +1 -1
  283. package/chunks/{web-fetch-L5UTI53V.js → web-fetch-OTDU4VQF.js} +19 -21
  284. package/chunks/{web-search-KM33JOS3.js → web-search-FP6SIHPR.js} +13 -13
  285. package/chunks/{workflow-K7FAWV77.js → workflow-YCIVBYSB.js} +48 -50
  286. package/chunks/workspace-providers-status-S35YAIUS.js +85 -0
  287. package/chunks/{workspace-registration-store-6TGVDJV5.js → workspace-registration-store-OTMS3H4C.js} +1 -1
  288. package/chunks/workspace-registry-O63R6IZ4.js +92 -0
  289. package/chunks/workspace-service-M6LLHKJ5.js +99 -0
  290. package/chunks/workspace-skills-status-C2V7BAIS.js +85 -0
  291. package/chunks/workspace-trust-reconciler-IBUPOUJN.js +345 -0
  292. package/chunks/write-file-3BZC3EAE.js +72 -0
  293. package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
  294. package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
  295. package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
  296. package/chunks/zoom-image-TZ6S2O57.js +351 -0
  297. package/cli.js +13 -13
  298. package/locales/ca.js +7 -2
  299. package/locales/de.js +7 -2
  300. package/locales/en.js +10 -2
  301. package/locales/fr.js +7 -2
  302. package/locales/ja.js +7 -2
  303. package/locales/pt.js +7 -2
  304. package/locales/ru.js +7 -2
  305. package/locales/zh-TW.js +10 -2
  306. package/locales/zh.js +10 -2
  307. package/package.json +5 -4
  308. package/web-shell/assets/{arc-BbHijhiN.js → arc-75-Wdeo3.js} +1 -1
  309. package/web-shell/assets/{architectureDiagram-3BPJPVTR-Cb4B_JD0.js → architectureDiagram-3BPJPVTR-FKeXQbyP.js} +1 -1
  310. package/web-shell/assets/{blockDiagram-GPEHLZMM-Dsjlh3H-.js → blockDiagram-GPEHLZMM-CY0vc-A3.js} +1 -1
  311. package/web-shell/assets/{c4Diagram-AAUBKEIU-Cp5AeR4U.js → c4Diagram-AAUBKEIU-CNP-A-8u.js} +1 -1
  312. package/web-shell/assets/channel-DPYMT76A.js +1 -0
  313. package/web-shell/assets/{chunk-2J33WTMH-CLcY7W2e.js → chunk-2J33WTMH-GybS4Gii.js} +1 -1
  314. package/web-shell/assets/{chunk-4BX2VUAB-BUhvY2LR.js → chunk-4BX2VUAB-02H91V8v.js} +1 -1
  315. package/web-shell/assets/{chunk-55IACEB6-kDIFC_71.js → chunk-55IACEB6-D3M-2VT6.js} +1 -1
  316. package/web-shell/assets/{chunk-727SXJPM-CIBO15f2.js → chunk-727SXJPM-CCu29u4H.js} +1 -1
  317. package/web-shell/assets/{chunk-AQP2D5EJ-BJ_T_slV.js → chunk-AQP2D5EJ-CaFKWgrn.js} +1 -1
  318. package/web-shell/assets/{chunk-FMBD7UC4-BEkW35J8.js → chunk-FMBD7UC4-ZZpPqIwQ.js} +1 -1
  319. package/web-shell/assets/{chunk-ND2GUHAM-GGPxofay.js → chunk-ND2GUHAM-D22DqGs8.js} +1 -1
  320. package/web-shell/assets/{chunk-QZHKN3VN-Bifllrb6.js → chunk-QZHKN3VN-Bu85S0fw.js} +1 -1
  321. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +1 -0
  322. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +1 -0
  323. package/web-shell/assets/{cose-bilkent-S5V4N54A-C-Add_Dp.js → cose-bilkent-S5V4N54A-f1CK1Gwe.js} +1 -1
  324. package/web-shell/assets/{dagre-BM42HDAG-B7MfwNq2.js → dagre-BM42HDAG-D0Ow8F_n.js} +1 -1
  325. package/web-shell/assets/{diagram-2AECGRRQ-CY_0zuDz.js → diagram-2AECGRRQ-BPrmTWp8.js} +1 -1
  326. package/web-shell/assets/{diagram-5GNKFQAL-VyYSbCgA.js → diagram-5GNKFQAL-HccuFAzy.js} +1 -1
  327. package/web-shell/assets/{diagram-KO2AKTUF-CBiIZ2PL.js → diagram-KO2AKTUF-BrS76mbA.js} +1 -1
  328. package/web-shell/assets/{diagram-LMA3HP47-BL3CrVOx.js → diagram-LMA3HP47-V7T9lU-5.js} +1 -1
  329. package/web-shell/assets/{diagram-OG6HWLK6-CZUPx96P.js → diagram-OG6HWLK6-DKidyJMR.js} +1 -1
  330. package/web-shell/assets/{erDiagram-TEJ5UH35-B81xHr1-.js → erDiagram-TEJ5UH35-DBadZIkp.js} +1 -1
  331. package/web-shell/assets/{flowDiagram-I6XJVG4X-EZWhir-J.js → flowDiagram-I6XJVG4X-BymfqdNJ.js} +1 -1
  332. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CVFSuIAg.js → ganttDiagram-6RSMTGT7-DOw340jf.js} +1 -1
  333. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-C1H2uQDv.js → gitGraphDiagram-PVQCEYII-_8EiD8sl.js} +1 -1
  334. package/web-shell/assets/{index-BYo99NBH.js → index-CKIadvET.js} +1 -1
  335. package/web-shell/assets/index-D1eXNRHe.js +1389 -0
  336. package/web-shell/assets/index-DVLD4CQq.css +5 -0
  337. package/web-shell/assets/{infoDiagram-5YYISTIA-BwyFMlF8.js → infoDiagram-5YYISTIA-D61KYQBu.js} +1 -1
  338. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CQ7Yhn2Y.js → ishikawaDiagram-YF4QCWOH-CsiXSpNx.js} +1 -1
  339. package/web-shell/assets/{journeyDiagram-JHISSGLW-CJn2sf0l.js → journeyDiagram-JHISSGLW-Sdfionyh.js} +1 -1
  340. package/web-shell/assets/{kanban-definition-UN3LZRKU-DaNRqwVN.js → kanban-definition-UN3LZRKU-C3WI3Cnl.js} +1 -1
  341. package/web-shell/assets/{linear-DCKODZe2.js → linear-Dpigcc62.js} +1 -1
  342. package/web-shell/assets/{mermaid.core-CTGJOk27.js → mermaid.core-Ct97pqgW.js} +5 -5
  343. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BKU3_3rg.js → mindmap-definition-RKZ34NQL-BzeaN0rB.js} +1 -1
  344. package/web-shell/assets/{pieDiagram-4H26LBE5-COcwBJ82.js → pieDiagram-4H26LBE5-CvjgcbVD.js} +1 -1
  345. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-CQnQ443x.js → quadrantDiagram-W4KKPZXB-BUzgTNdH.js} +1 -1
  346. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CZ2oj5cD.js → requirementDiagram-4Y6WPE33-B7zKlgUQ.js} +1 -1
  347. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BxAv5mNu.js → sankeyDiagram-5OEKKPKP-Bb9CQgrT.js} +1 -1
  348. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CztaySPs.js → sequenceDiagram-3UESZ5HK-DJ6V7itG.js} +1 -1
  349. package/web-shell/assets/{stateDiagram-AJRCARHV-CTQT1oGD.js → stateDiagram-AJRCARHV-IImflERY.js} +1 -1
  350. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +1 -0
  351. package/web-shell/assets/{timeline-definition-PNZ67QCA-K9Mkex5A.js → timeline-definition-PNZ67QCA-6Q_uWHKh.js} +1 -1
  352. package/web-shell/assets/{vennDiagram-CIIHVFJN-B2rVIw76.js → vennDiagram-CIIHVFJN-TmyKyjwv.js} +1 -1
  353. package/web-shell/assets/{wardley-L42UT6IY-Z1w2JR4M.js → wardley-L42UT6IY-CRh9uiPv.js} +1 -1
  354. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-CIX9aKXf.js → wardleyDiagram-YWT4CUSO-59TKAW8w.js} +1 -1
  355. package/web-shell/assets/{xychartDiagram-2RQKCTM6-CI9DLIKB.js → xychartDiagram-2RQKCTM6-GCSUIK2L.js} +1 -1
  356. package/web-shell/index.html +2 -2
  357. package/chunks/MaxSizedBox-INHRH72H.js +0 -86
  358. package/chunks/agent-VXDAN5JK.js +0 -82
  359. package/chunks/agent-headless-K4ZMMNBD.js +0 -76
  360. package/chunks/bridge-LGPZCFHO.js +0 -91
  361. package/chunks/channel-settings-store-CHCDRTPY.js +0 -89
  362. package/chunks/chunk-SZRN75WQ.js +0 -29
  363. package/chunks/chunk-UGYMA4EI.js +0 -219
  364. package/chunks/chunk-VCBZUOSI.js +0 -8575
  365. package/chunks/contextCommand-QIZYHDR5.js +0 -81
  366. package/chunks/daemon-status-provider-OS5UWBHV.js +0 -90
  367. package/chunks/earlyInputCapture-WQT24RWD.js +0 -83
  368. package/chunks/errors-PCX25DVP.js +0 -89
  369. package/chunks/exitPlanMode-GHPUHBZJ.js +0 -423
  370. package/chunks/handleAutoUpdate-2CZQRJ66.js +0 -82
  371. package/chunks/i18n-XEQVMRKN.js +0 -98
  372. package/chunks/initializer-OVGZ4FLY.js +0 -87
  373. package/chunks/installationInfo-5UUQJI6Y.js +0 -81
  374. package/chunks/list-HODU6RXD.js +0 -90
  375. package/chunks/loadedSettingsAdapter-TYNLBALY.js +0 -84
  376. package/chunks/mcp-J3DFWX4A.js +0 -84
  377. package/chunks/nonInteractiveCli-F4GYSMHT.js +0 -144
  378. package/chunks/pidfile-4VNAR3EP.js +0 -87
  379. package/chunks/read-file-LZXUR4TO.js +0 -31
  380. package/chunks/resumeHistoryUtils-65OX3SGJ.js +0 -92
  381. package/chunks/ripGrep-2U2FRGMV.js +0 -74
  382. package/chunks/serve-W2GC47CM.js +0 -90
  383. package/chunks/shell-45IPBDP5.js +0 -84
  384. package/chunks/spawnChannel-PVXQ5AGV.js +0 -83
  385. package/chunks/src-AY65BYR7.js +0 -3166
  386. package/chunks/standalone-update-ZMFNKAEY.js +0 -93
  387. package/chunks/theme-manager-YYPZFBAH.js +0 -78
  388. package/chunks/total-session-admission-JXES723M.js +0 -85
  389. package/chunks/trustedFolders-HVI7IXUH.js +0 -94
  390. package/chunks/updateCheck-WUJGHWZZ.js +0 -93
  391. package/chunks/useAutoAcceptIndicator-CHSTZLZD.js +0 -94
  392. package/chunks/workspace-providers-status-GAKSF4LL.js +0 -87
  393. package/chunks/workspace-registry-A7NQUONG.js +0 -89
  394. package/chunks/workspace-service-STGVSO4N.js +0 -99
  395. package/chunks/workspace-skills-status-66AK3DUA.js +0 -86
  396. package/chunks/write-file-HUUCEG4P.js +0 -74
  397. package/web-shell/assets/channel-Bzdx6E8P.js +0 -1
  398. package/web-shell/assets/classDiagram-4FO5ZUOK-Cd6wbiuK.js +0 -1
  399. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cd6wbiuK.js +0 -1
  400. package/web-shell/assets/index-B2bXx96W.js +0 -1249
  401. package/web-shell/assets/index-_8mKjx8q.css +0 -5
  402. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BjMdT6E_.js +0 -1
  403. package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
  404. package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
  405. /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
@@ -1,19 +1,36 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ CompactToolGroupDisplay,
5
+ ICON,
6
+ SCREEN_READER_MODEL_PREFIX,
7
+ SCREEN_READER_USER_PREFIX,
8
+ SHELL_COMMAND_NAME,
9
+ SHELL_NAME,
10
+ STATUS_INDICATOR_WIDTH,
11
+ ToolElapsedTime,
12
+ ToolStatusIndicator,
13
+ buildResumedHistoryItems,
14
+ build_default,
15
+ estimateCompactToolGroupHeight,
16
+ isCollapsibleTool,
17
+ wrapAnsi
18
+ } from "./chunk-TDL6LB4K.js";
3
19
  import {
4
20
  disableMouseEvents,
5
21
  enableMouseEvents,
6
22
  useKeypress,
7
23
  useKeypressContext
8
- } from "./chunk-LNURQEMZ.js";
24
+ } from "./chunk-CQL64ESB.js";
9
25
  import {
10
26
  formatSupportedModes,
11
27
  getCommandDisplayName,
12
28
  getCommandSourceBadge,
13
29
  getCommandSourceGroup,
14
30
  getCommandSubcommandNames
15
- } from "./chunk-PHVR5UUY.js";
31
+ } from "./chunk-JX27F6QS.js";
16
32
  import {
33
+ INLINE_CODE_SPAN_PATTERN_SOURCE,
17
34
  calculateAverageLatency,
18
35
  calculateCacheHitRate,
19
36
  calculateCost,
@@ -21,34 +38,26 @@ import {
21
38
  computeDiffColumnWidths,
22
39
  computeSessionStats,
23
40
  getSystemInfoFields,
24
- levelLabel
25
- } from "./chunk-52O2CIUL.js";
41
+ levelLabel,
42
+ mergeInlineMathMatches,
43
+ readInlineMathSpanAt,
44
+ unescapeMarkdownBeforeMath,
45
+ unescapeMarkdownDollars
46
+ } from "./chunk-7AEJDLRA.js";
26
47
  import {
27
48
  MINIMUM_MAX_HEIGHT,
28
49
  MaxSizedBox
29
- } from "./chunk-FQK6JAFG.js";
30
- import {
31
- CompactToolGroupDisplay,
32
- ICON,
33
- SCREEN_READER_MODEL_PREFIX,
34
- SCREEN_READER_USER_PREFIX,
35
- SHELL_COMMAND_NAME,
36
- SHELL_NAME,
37
- STATUS_INDICATOR_WIDTH,
38
- ToolElapsedTime,
39
- ToolStatusIndicator,
40
- buildResumedHistoryItems,
41
- build_default,
42
- estimateCompactToolGroupHeight,
43
- isCollapsibleTool,
44
- wrapAnsi
45
- } from "./chunk-DN6ZX5AY.js";
50
+ } from "./chunk-U3E3UQAA.js";
46
51
  import {
47
52
  theme
48
- } from "./chunk-VAK25FTU.js";
53
+ } from "./chunk-GKX7E4CO.js";
49
54
  import {
50
55
  require_jsx_runtime
51
56
  } from "./chunk-SV5PQVQE.js";
57
+ import {
58
+ resolveColor,
59
+ themeManager
60
+ } from "./chunk-GATT5TKW.js";
52
61
  import {
53
62
  Box_default,
54
63
  Static,
@@ -57,17 +66,13 @@ import {
57
66
  use_is_screen_reader_enabled_default,
58
67
  use_stdin_default,
59
68
  use_stdout_default
60
- } from "./chunk-6GMVPFB2.js";
69
+ } from "./chunk-UWMLWVCA.js";
61
70
  import {
62
71
  require_react
63
72
  } from "./chunk-5QWWOFGG.js";
64
73
  import {
65
74
  relaunchApp
66
- } from "./chunk-C3NS4F2Q.js";
67
- import {
68
- resolveColor,
69
- themeManager
70
- } from "./chunk-L5UHQJTJ.js";
75
+ } from "./chunk-A2D5BAVP.js";
71
76
  import {
72
77
  cpLen,
73
78
  cpSlice,
@@ -81,37 +86,37 @@ import {
81
86
  toCodePoints,
82
87
  truncateToWidth,
83
88
  wrapToVisualLines
84
- } from "./chunk-IPUUTYMV.js";
89
+ } from "./chunk-YDLJGZHL.js";
85
90
  import {
86
91
  stringWidth
87
92
  } from "./chunk-2MIN6GRR.js";
88
93
  import {
89
94
  isTerminalGoalStatusKind
90
95
  } from "./chunk-QTERJVPZ.js";
91
- import {
92
- require_has_flag,
93
- require_source
94
- } from "./chunk-57OAHC2Y.js";
95
96
  import {
96
97
  createLoadedSettingsAdapter
97
- } from "./chunk-G4WFQUYQ.js";
98
+ } from "./chunk-WUZ7H6DP.js";
98
99
  import {
99
100
  formatDuration,
100
101
  formatMemoryUsage,
101
102
  formatRelativeTime,
102
103
  formatTokenCount
103
104
  } from "./chunk-E5Z2AVNV.js";
105
+ import {
106
+ require_has_flag,
107
+ require_source
108
+ } from "./chunk-57OAHC2Y.js";
104
109
  import {
105
110
  getPersistScopeForModelSelection
106
- } from "./chunk-JALU3ZDU.js";
111
+ } from "./chunk-EIF3FXTB.js";
107
112
  import {
108
113
  getCurrentLanguage,
109
114
  localizeToolDisplayName,
110
115
  t
111
- } from "./chunk-VV6XU5L7.js";
116
+ } from "./chunk-TCIFAA7K.js";
112
117
  import {
113
118
  isWorkspaceTrusted
114
- } from "./chunk-VCBZUOSI.js";
119
+ } from "./chunk-Q43KPN7X.js";
115
120
  import {
116
121
  ALL_PROVIDERS,
117
122
  IdeClient,
@@ -133,7 +138,7 @@ import {
133
138
  resolveBaseUrl,
134
139
  resolveMetadataKey,
135
140
  resolveOwnsModel
136
- } from "./chunk-DM4Q4JJH.js";
141
+ } from "./chunk-X5WNMMIA.js";
137
142
  import {
138
143
  stripAnsi
139
144
  } from "./chunk-TWPJO254.js";
@@ -141,24 +146,24 @@ import {
141
146
  sanitizeForOsc,
142
147
  supportsHyperlinks,
143
148
  wrapForMultiplexer
144
- } from "./chunk-EPDRMGT4.js";
149
+ } from "./chunk-2LKVPASC.js";
145
150
  import {
146
151
  MAIN_SOURCE,
147
152
  formatVisionBridgeNoticeDisplay,
148
153
  getMCPServerStatus,
149
154
  isVisionBridgeNoticeDisplay,
150
155
  uiTelemetryService
151
- } from "./chunk-RWS5VYWC.js";
156
+ } from "./chunk-PT722TDT.js";
152
157
  import {
153
158
  ToolDisplayNames,
154
159
  ToolNames,
155
160
  ToolNamesMigration
156
- } from "./chunk-PR75REBZ.js";
161
+ } from "./chunk-Y6AXW2OG.js";
157
162
  import {
158
163
  createDebugLogger,
159
164
  escapePath,
160
165
  unescapePath
161
- } from "./chunk-NL7LTRLR.js";
166
+ } from "./chunk-UHUSJ6X7.js";
162
167
  import {
163
168
  init_esbuild_shims
164
169
  } from "./chunk-5O2XNYP6.js";
@@ -1942,9 +1947,23 @@ function areSkillMetricsEqual(a, b) {
1942
1947
  return true;
1943
1948
  }
1944
1949
  __name(areSkillMetricsEqual, "areSkillMetricsEqual");
1950
+ function areGenerationMetricsEqual(a, b) {
1951
+ if (a === b) return true;
1952
+ if (!a || !b) return false;
1953
+ if (a.timedRequests !== b.timedRequests || a.totalTtftMs !== b.totalTtftMs || a.totalGenerationDurationMs !== b.totalGenerationDurationMs || a.totalThroughputOutputTokens !== b.totalThroughputOutputTokens) {
1954
+ return false;
1955
+ }
1956
+ if (a.last === b.last) return true;
1957
+ if (!a.last || !b.last) return false;
1958
+ return a.last.model === b.last.model && a.last.ttftMs === b.last.ttftMs && a.last.generationDurationMs === b.last.generationDurationMs && a.last.outputTokens === b.last.outputTokens;
1959
+ }
1960
+ __name(areGenerationMetricsEqual, "areGenerationMetricsEqual");
1945
1961
  function areMetricsEqual(a, b) {
1946
1962
  if (a === b) return true;
1947
1963
  if (!a || !b) return false;
1964
+ if (!areGenerationMetricsEqual(a.generation, b.generation)) {
1965
+ return false;
1966
+ }
1948
1967
  if (a.files.totalLinesAdded !== b.files.totalLinesAdded || a.files.totalLinesRemoved !== b.files.totalLinesRemoved) {
1949
1968
  return false;
1950
1969
  }
@@ -2003,6 +2022,15 @@ function cloneSessionMetrics(metrics) {
2003
2022
  }
2004
2023
  ])
2005
2024
  ),
2025
+ ...metrics.generation ? {
2026
+ generation: {
2027
+ timedRequests: metrics.generation.timedRequests,
2028
+ totalTtftMs: metrics.generation.totalTtftMs,
2029
+ totalGenerationDurationMs: metrics.generation.totalGenerationDurationMs,
2030
+ totalThroughputOutputTokens: metrics.generation.totalThroughputOutputTokens,
2031
+ ...metrics.generation.last ? { last: { ...metrics.generation.last } } : {}
2032
+ }
2033
+ } : {},
2006
2034
  tools: {
2007
2035
  totalCalls: metrics.tools.totalCalls,
2008
2036
  totalSuccess: metrics.tools.totalSuccess,
@@ -2649,11 +2677,11 @@ __name(useTerminalSize, "useTerminalSize");
2649
2677
 
2650
2678
  // packages/cli/src/ui/components/SessionPreview.tsx
2651
2679
  init_esbuild_shims();
2652
- var import_react42 = __toESM(require_react(), 1);
2680
+ var import_react43 = __toESM(require_react(), 1);
2653
2681
 
2654
2682
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
2655
2683
  init_esbuild_shims();
2656
- var import_react41 = __toESM(require_react(), 1);
2684
+ var import_react42 = __toESM(require_react(), 1);
2657
2685
 
2658
2686
  // packages/cli/src/ui/components/messages/ConversationMessages.tsx
2659
2687
  init_esbuild_shims();
@@ -2872,14 +2900,8 @@ var TABLE_MAX_ROW_LINES = 4;
2872
2900
  var TABLE_ROW_RE = /^\s*\|(.+)\|\s*$/;
2873
2901
  var TABLE_SEPARATOR_RE = /^(?=.*\|)\s*\|?\s*(:?-+:?)\s*(\|\s*(:?-+:?)\s*)*\|?\s*$/;
2874
2902
  var CODE_FENCE_RE = /^ *(`{3,}|~{3,}) *([^`]*)$/;
2875
- var INLINE_MATH_MAX_CHARS = 1024;
2876
- var TABLE_INLINE_MATH_SPAN_RE = new RegExp(
2877
- String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS}}\$(?![\w$])`,
2878
- "y"
2879
- );
2880
2903
  function readTableInlineMathSpan(row, index) {
2881
- TABLE_INLINE_MATH_SPAN_RE.lastIndex = index;
2882
- return TABLE_INLINE_MATH_SPAN_RE.exec(row)?.[0] ?? null;
2904
+ return readInlineMathSpanAt(row, index);
2883
2905
  }
2884
2906
  __name(readTableInlineMathSpan, "readTableInlineMathSpan");
2885
2907
  function splitMarkdownTableRow(row) {
@@ -3363,14 +3385,8 @@ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
3363
3385
  var MIN_COLUMN_WIDTH = 3;
3364
3386
  var ABSOLUTE_MIN_HORIZONTAL_TABLE_WIDTH = 24;
3365
3387
  var SAFETY_MARGIN = 4;
3366
- var INLINE_MATH_MAX_CHARS2 = 1024;
3367
- var INLINE_MATH_PATTERN = String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS2}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS2}}\$(?![\w$])`;
3368
3388
  var INLINE_MARKDOWN_REGEX = new RegExp(
3369
- String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|<u>.*?<\/u>|https?:\/\/\S+)`,
3370
- "g"
3371
- );
3372
- var INLINE_MARKDOWN_WITH_MATH_REGEX = new RegExp(
3373
- String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|${INLINE_MATH_PATTERN}|<u>.*?<\/u>|https?:\/\/\S+)`,
3389
+ String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`${INLINE_CODE_SPAN_PATTERN_SOURCE}|<u>.*?<\/u>|https?:\/\/\S+)`,
3374
3390
  "g"
3375
3391
  );
3376
3392
  var INK_COLOR_TO_ANSI = {
@@ -3499,26 +3515,42 @@ var ansiFmt = {
3499
3515
  strikethrough: /* @__PURE__ */ __name((t2) => `\x1B[9m${t2}\x1B[29m`, "strikethrough")
3500
3516
  };
3501
3517
  function renderMarkdownToAnsi(text, enableInlineMath = false) {
3502
- const inlineRegex = enableInlineMath ? INLINE_MARKDOWN_WITH_MATH_REGEX : INLINE_MARKDOWN_REGEX;
3503
- inlineRegex.lastIndex = 0;
3504
3518
  const canHyperlink = supportsHyperlinks();
3505
3519
  let result = "";
3506
3520
  let lastIndex = 0;
3507
- let match;
3508
- while ((match = inlineRegex.exec(text)) !== null) {
3509
- result += text.slice(lastIndex, match.index);
3521
+ for (const token of mergeInlineMathMatches(
3522
+ text,
3523
+ INLINE_MARKDOWN_REGEX,
3524
+ enableInlineMath
3525
+ )) {
3526
+ const index = token.kind === "math" ? token.span.index : token.match.index ?? 0;
3527
+ const prose = text.slice(lastIndex, index);
3528
+ result += token.kind === "math" ? unescapeMarkdownBeforeMath(prose) : unescapeMarkdownDollars(prose);
3529
+ if (token.kind === "math") {
3530
+ result += applyColor(
3531
+ renderInlineLatex(unescapeMarkdownDollars(token.span.content)),
3532
+ theme.text.accent
3533
+ );
3534
+ lastIndex = index + token.span.raw.length;
3535
+ continue;
3536
+ }
3537
+ const match = token.match;
3510
3538
  const fullMatch = match[0];
3511
3539
  let rendered = null;
3512
3540
  if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > 4) {
3513
- rendered = ansiFmt.bold(fullMatch.slice(2, -2));
3514
- } else if (fullMatch.length > 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(match.index - 1, match.index)) && !/\w/.test(
3515
- text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)
3516
- ) && !/\S[./\\]/.test(text.substring(match.index - 2, match.index)) && !/[./\\]\S/.test(
3517
- text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2)
3541
+ rendered = ansiFmt.bold(unescapeMarkdownDollars(fullMatch.slice(2, -2)));
3542
+ } else if (fullMatch.length > 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(index - 1, index)) && !/\w/.test(
3543
+ text.substring(index + fullMatch.length, index + fullMatch.length + 1)
3544
+ ) && !/\S[./\\]/.test(text.substring(index - 2, index)) && !/[./\\]\S/.test(
3545
+ text.substring(index + fullMatch.length, index + fullMatch.length + 2)
3518
3546
  )) {
3519
- rendered = ansiFmt.italic(fullMatch.slice(1, -1));
3547
+ rendered = ansiFmt.italic(
3548
+ unescapeMarkdownDollars(fullMatch.slice(1, -1))
3549
+ );
3520
3550
  } else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > 4) {
3521
- rendered = ansiFmt.strikethrough(fullMatch.slice(2, -2));
3551
+ rendered = ansiFmt.strikethrough(
3552
+ unescapeMarkdownDollars(fullMatch.slice(2, -2))
3553
+ );
3522
3554
  } else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > 1) {
3523
3555
  const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
3524
3556
  if (codeMatch?.[2]) {
@@ -3527,7 +3559,7 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
3527
3559
  } else if (fullMatch.startsWith("[") && fullMatch.includes("](") && fullMatch.endsWith(")")) {
3528
3560
  const linkMatch = fullMatch.match(MD_LINK_CAPTURE);
3529
3561
  if (linkMatch) {
3530
- const labelText = linkMatch[1] ?? "";
3562
+ const labelText = unescapeMarkdownDollars(linkMatch[1] ?? "");
3531
3563
  const url = linkMatch[2] ?? "";
3532
3564
  if (shouldWrapMarkdownLink(url, canHyperlink)) {
3533
3565
  const safeLabel = sanitizeForOsc(labelText);
@@ -3542,13 +3574,10 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
3542
3574
  rendered = `${labelText} ${applyColor(`(${url})`, theme.text.link)}`;
3543
3575
  }
3544
3576
  }
3545
- } else if (enableInlineMath && fullMatch.startsWith("$") && fullMatch.endsWith("$") && fullMatch.length > 2) {
3546
- rendered = applyColor(
3547
- renderInlineLatex(fullMatch.slice(1, -1)),
3548
- theme.text.accent
3549
- );
3550
3577
  } else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > 7) {
3551
- rendered = ansiFmt.underline(fullMatch.slice(3, -4));
3578
+ rendered = ansiFmt.underline(
3579
+ unescapeMarkdownDollars(fullMatch.slice(3, -4))
3580
+ );
3552
3581
  } else if (/^https?:\/\//.test(fullMatch)) {
3553
3582
  const visible = applyColor(fullMatch, theme.text.link);
3554
3583
  if (canHyperlink) {
@@ -3558,10 +3587,10 @@ function renderMarkdownToAnsi(text, enableInlineMath = false) {
3558
3587
  rendered = visible;
3559
3588
  }
3560
3589
  }
3561
- result += rendered ?? fullMatch;
3562
- lastIndex = inlineRegex.lastIndex;
3590
+ result += rendered ?? unescapeMarkdownDollars(fullMatch);
3591
+ lastIndex = index + fullMatch.length;
3563
3592
  }
3564
- result += text.slice(lastIndex);
3593
+ result += unescapeMarkdownDollars(text.slice(lastIndex));
3565
3594
  return result;
3566
3595
  }
3567
3596
  __name(renderMarkdownToAnsi, "renderMarkdownToAnsi");
@@ -3837,18 +3866,8 @@ var STRIKETHROUGH_MARKER_LENGTH = 2;
3837
3866
  var INLINE_CODE_MARKER_LENGTH = 1;
3838
3867
  var UNDERLINE_TAG_START_LENGTH = 3;
3839
3868
  var UNDERLINE_TAG_END_LENGTH = 4;
3840
- var INLINE_MATH_MARKER_LENGTH = 1;
3841
- var INLINE_MATH_MAX_CHARS3 = 1024;
3842
- var INLINE_MATH_PATTERN2 = new RegExp(
3843
- String.raw`(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\$(?![\w$])`,
3844
- "g"
3845
- );
3846
3869
  var INLINE_MARKDOWN_REGEX2 = new RegExp(
3847
- String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|<u>.*?<\/u>|https?:\/\/\S+)`,
3848
- "g"
3849
- );
3850
- var INLINE_MARKDOWN_WITH_MATH_REGEX2 = new RegExp(
3851
- String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`\`+.+?\`+|(?<![\w$])\$(?![\s\d$])(?=[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\S\$)[^$\n]{1,${INLINE_MATH_MAX_CHARS3}}\$(?![\w$])|<u>.*?<\/u>|https?:\/\/\S+)`,
3870
+ String.raw`(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|${MD_LINK_PATTERN}|` + String.raw`${INLINE_CODE_SPAN_PATTERN_SOURCE}|<u>.*?<\/u>|https?:\/\/\S+)`,
3852
3871
  "g"
3853
3872
  );
3854
3873
  var debugLogger2 = createDebugLogger("INLINE_MARKDOWN");
@@ -3857,37 +3876,60 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
3857
3876
  textColor = theme.text.primary,
3858
3877
  enableInlineMath = false
3859
3878
  }) => {
3860
- if (!/[*_~`<[]|https?:/.test(text) && !(enableInlineMath && text.includes("$"))) {
3879
+ if (!/[*_~`<[]|https?:/.test(text) && !(enableInlineMath && text.includes("$")) && !text.includes("\\$")) {
3861
3880
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: textColor, children: text });
3862
3881
  }
3863
3882
  const nodes = [];
3864
3883
  let lastIndex = 0;
3865
3884
  const canHyperlink = supportsHyperlinks();
3866
- const inlineRegex = enableInlineMath ? INLINE_MARKDOWN_WITH_MATH_REGEX2 : INLINE_MARKDOWN_REGEX2;
3867
- inlineRegex.lastIndex = 0;
3868
- let match;
3869
- while ((match = inlineRegex.exec(text)) !== null) {
3870
- if (match.index > lastIndex) {
3885
+ for (const token of mergeInlineMathMatches(
3886
+ text,
3887
+ INLINE_MARKDOWN_REGEX2,
3888
+ enableInlineMath
3889
+ )) {
3890
+ const index = token.kind === "math" ? token.span.index : token.match.index ?? 0;
3891
+ if (index > lastIndex) {
3892
+ const prose = text.slice(lastIndex, index);
3871
3893
  nodes.push(
3872
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: text.slice(lastIndex, match.index) }, `t-${lastIndex}`)
3894
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: token.kind === "math" ? unescapeMarkdownBeforeMath(prose) : unescapeMarkdownDollars(prose) }, `t-${lastIndex}`)
3873
3895
  );
3874
3896
  }
3897
+ if (token.kind === "math") {
3898
+ nodes.push(
3899
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: theme.text.accent, children: renderInlineLatex(unescapeMarkdownDollars(token.span.content)) }, `m-${index}`)
3900
+ );
3901
+ lastIndex = index + token.span.raw.length;
3902
+ continue;
3903
+ }
3904
+ const match = token.match;
3875
3905
  const fullMatch = match[0];
3876
3906
  let renderedNode = null;
3877
- const key = `m-${match.index}`;
3907
+ const key = `m-${index}`;
3878
3908
  try {
3879
3909
  if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > BOLD_MARKER_LENGTH * 2) {
3880
- renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
3881
- } else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(match.index - 1, match.index)) && !/\w/.test(
3882
- text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)
3883
- ) && !/\S[./\\]/.test(text.substring(match.index - 2, match.index)) && !/[./\\]\S/.test(
3884
- text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2)
3910
+ renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, children: unescapeMarkdownDollars(
3911
+ fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH)
3912
+ ) }, key);
3913
+ } else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(index - 1, index)) && !/\w/.test(
3914
+ text.substring(
3915
+ index + fullMatch.length,
3916
+ index + fullMatch.length + 1
3917
+ )
3918
+ ) && !/\S[./\\]/.test(text.substring(index - 2, index)) && !/[./\\]\S/.test(
3919
+ text.substring(
3920
+ index + fullMatch.length,
3921
+ index + fullMatch.length + 2
3922
+ )
3885
3923
  )) {
3886
- renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
3924
+ renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { italic: true, children: unescapeMarkdownDollars(
3925
+ fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH)
3926
+ ) }, key);
3887
3927
  } else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
3888
- renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { strikethrough: true, children: fullMatch.slice(
3889
- STRIKETHROUGH_MARKER_LENGTH,
3890
- -STRIKETHROUGH_MARKER_LENGTH
3928
+ renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { strikethrough: true, children: unescapeMarkdownDollars(
3929
+ fullMatch.slice(
3930
+ STRIKETHROUGH_MARKER_LENGTH,
3931
+ -STRIKETHROUGH_MARKER_LENGTH
3932
+ )
3891
3933
  ) }, key);
3892
3934
  } else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
3893
3935
  const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
@@ -3900,7 +3942,8 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
3900
3942
  const linkText = linkMatch[1] ?? "";
3901
3943
  const url = linkMatch[2] ?? "";
3902
3944
  const wrapOsc8 = shouldWrapMarkdownLink(url, canHyperlink);
3903
- const safeLabel = wrapOsc8 ? sanitizeForOsc(linkText) : linkText;
3945
+ const renderedLinkText = unescapeMarkdownDollars(linkText);
3946
+ const safeLabel = wrapOsc8 ? sanitizeForOsc(renderedLinkText) : renderedLinkText;
3904
3947
  const safeUrl = wrapOsc8 ? sanitizeForOsc(url) : url;
3905
3948
  const showUrlSuffix = wrapOsc8 && labelMayDeceive(safeLabel, safeUrl);
3906
3949
  renderedNode = wrapOsc8 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
@@ -3915,7 +3958,7 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
3915
3958
  ")"
3916
3959
  ] }) : null
3917
3960
  ] }, key) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
3918
- linkText,
3961
+ renderedLinkText,
3919
3962
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: theme.text.link, children: [
3920
3963
  " (",
3921
3964
  url,
@@ -3924,15 +3967,10 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
3924
3967
  ] }, key);
3925
3968
  }
3926
3969
  } else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1) {
3927
- renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { underline: true, children: fullMatch.slice(
3928
- UNDERLINE_TAG_START_LENGTH,
3929
- -UNDERLINE_TAG_END_LENGTH
3930
- ) }, key);
3931
- } else if (enableInlineMath && fullMatch.startsWith("$") && fullMatch.endsWith("$") && fullMatch.length > INLINE_MATH_MARKER_LENGTH * 2) {
3932
- renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: theme.text.accent, children: renderInlineLatex(
3970
+ renderedNode = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { underline: true, children: unescapeMarkdownDollars(
3933
3971
  fullMatch.slice(
3934
- INLINE_MATH_MARKER_LENGTH,
3935
- -INLINE_MATH_MARKER_LENGTH
3972
+ UNDERLINE_TAG_START_LENGTH,
3973
+ -UNDERLINE_TAG_END_LENGTH
3936
3974
  )
3937
3975
  ) }, key);
3938
3976
  } else if (fullMatch.match(/^https?:\/\//)) {
@@ -3948,11 +3986,15 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
3948
3986
  debugLogger2.error("Error parsing inline markdown part:", fullMatch, e);
3949
3987
  renderedNode = null;
3950
3988
  }
3951
- nodes.push(renderedNode ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: fullMatch }, key));
3952
- lastIndex = inlineRegex.lastIndex;
3989
+ nodes.push(
3990
+ renderedNode ?? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: unescapeMarkdownDollars(fullMatch) }, key)
3991
+ );
3992
+ lastIndex = index + fullMatch.length;
3953
3993
  }
3954
3994
  if (lastIndex < text.length) {
3955
- nodes.push(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
3995
+ nodes.push(
3996
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: unescapeMarkdownDollars(text.slice(lastIndex)) }, `t-${lastIndex}`)
3997
+ );
3956
3998
  }
3957
3999
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: nodes.filter((node) => node !== null) });
3958
4000
  }, "RenderInlineInternal");
@@ -6258,7 +6300,7 @@ var parseCodeFenceInfo = /* @__PURE__ */ __name((info) => {
6258
6300
  var countHeadContentLines = /* @__PURE__ */ __name((content, fenceStartIndex, splitPoint) => {
6259
6301
  const headFromFence = content.slice(fenceStartIndex, splitPoint);
6260
6302
  const newlineCount = (headFromFence.match(/\n/g) || []).length;
6261
- return headFromFence.endsWith("\n") ? newlineCount - 1 : newlineCount;
6303
+ return Math.max(newlineCount - 1, 0);
6262
6304
  }, "countHeadContentLines");
6263
6305
  var splitFencedMarkdown = /* @__PURE__ */ __name((content, splitPoint) => {
6264
6306
  const before = content.slice(0, splitPoint);
@@ -7355,11 +7397,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
7355
7397
 
7356
7398
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
7357
7399
  init_esbuild_shims();
7358
- var import_react27 = __toESM(require_react(), 1);
7400
+ var import_react28 = __toESM(require_react(), 1);
7359
7401
 
7360
7402
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
7361
7403
  init_esbuild_shims();
7362
- var import_react25 = __toESM(require_react(), 1);
7404
+ var import_react26 = __toESM(require_react(), 1);
7363
7405
 
7364
7406
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
7365
7407
  init_esbuild_shims();
@@ -7757,7 +7799,7 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
7757
7799
 
7758
7800
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
7759
7801
  init_esbuild_shims();
7760
- var import_react23 = __toESM(require_react(), 1);
7802
+ var import_react24 = __toESM(require_react(), 1);
7761
7803
  import { promises as fs3 } from "node:fs";
7762
7804
  import * as os3 from "node:os";
7763
7805
  import * as path2 from "node:path";
@@ -7767,7 +7809,7 @@ init_esbuild_shims();
7767
7809
 
7768
7810
  // packages/cli/src/ui/components/shared/BaseSelectionList.tsx
7769
7811
  init_esbuild_shims();
7770
- var import_react17 = __toESM(require_react(), 1);
7812
+ var import_react18 = __toESM(require_react(), 1);
7771
7813
 
7772
7814
  // packages/cli/src/ui/hooks/useSelectionList.ts
7773
7815
  init_esbuild_shims();
@@ -8266,13 +8308,24 @@ function useSelectionList({
8266
8308
  }
8267
8309
  __name(useSelectionList, "useSelectionList");
8268
8310
 
8311
+ // packages/cli/src/ui/contexts/VirtualViewportContext.tsx
8312
+ init_esbuild_shims();
8313
+ var import_react15 = __toESM(require_react(), 1);
8314
+ var VirtualViewportContext = (0, import_react15.createContext)(
8315
+ void 0
8316
+ );
8317
+ function useVirtualViewport(fallback) {
8318
+ return (0, import_react15.useContext)(VirtualViewportContext) ?? fallback ?? false;
8319
+ }
8320
+ __name(useVirtualViewport, "useVirtualViewport");
8321
+
8269
8322
  // packages/cli/src/ui/components/shared/RowMouseController.tsx
8270
8323
  init_esbuild_shims();
8271
- var import_react16 = __toESM(require_react(), 1);
8324
+ var import_react17 = __toESM(require_react(), 1);
8272
8325
 
8273
8326
  // packages/cli/src/ui/hooks/useMouseEvents.ts
8274
8327
  init_esbuild_shims();
8275
- var import_react15 = __toESM(require_react(), 1);
8328
+ var import_react16 = __toESM(require_react(), 1);
8276
8329
  var mouseModeRefs = /* @__PURE__ */ new Map();
8277
8330
  function effectiveTracking(entry) {
8278
8331
  if (entry.any > 0) return "any";
@@ -8324,23 +8377,23 @@ function useMouseEvents(handler, { isActive, tracking = "button", bypassVpGate =
8324
8377
  const { isRawModeSupported } = use_stdin_default();
8325
8378
  const { stdout } = use_stdout_default();
8326
8379
  const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
8327
- const settings = (0, import_react15.useContext)(SettingsContext);
8328
- const isVpMode = settings?.merged.ui?.useTerminalBuffer ?? false;
8380
+ const settings = (0, import_react16.useContext)(SettingsContext);
8381
+ const isVpMode = useVirtualViewport(settings?.merged.ui?.useTerminalBuffer);
8329
8382
  const vpGateOpen = isVpMode || bypassVpGate;
8330
- const handlerRef = (0, import_react15.useRef)(handler);
8383
+ const handlerRef = (0, import_react16.useRef)(handler);
8331
8384
  handlerRef.current = handler;
8332
8385
  const enabled = isActive && isRawModeSupported && vpGateOpen && Boolean(stdout.isTTY);
8333
- (0, import_react15.useEffect)(() => {
8386
+ (0, import_react16.useEffect)(() => {
8334
8387
  if (!enabled) return;
8335
8388
  acquireMouseMode(stdout, tracking);
8336
8389
  return () => {
8337
8390
  releaseMouseMode(stdout, tracking);
8338
8391
  };
8339
8392
  }, [enabled, stdout, tracking]);
8340
- const mouseCallback = (0, import_react15.useCallback)((event) => {
8393
+ const mouseCallback = (0, import_react16.useCallback)((event) => {
8341
8394
  handlerRef.current(event);
8342
8395
  }, []);
8343
- (0, import_react15.useEffect)(() => {
8396
+ (0, import_react16.useEffect)(() => {
8344
8397
  if (!enabled) return;
8345
8398
  subscribeMouse(mouseCallback);
8346
8399
  return () => unsubscribeMouse(mouseCallback);
@@ -8421,7 +8474,7 @@ function RowMouseController({
8421
8474
  onSelectIndex
8422
8475
  }) {
8423
8476
  const { rows: terminalHeight } = useTerminalSize();
8424
- const resolveIndex = (0, import_react16.useCallback)(
8477
+ const resolveIndex = (0, import_react17.useCallback)(
8425
8478
  (event) => {
8426
8479
  const container = containerRef.current;
8427
8480
  if (!container) return null;
@@ -8448,7 +8501,7 @@ function RowMouseController({
8448
8501
  },
8449
8502
  [containerRef, itemRefs, scrollOffset, terminalHeight]
8450
8503
  );
8451
- const handleMouse = (0, import_react16.useCallback)(
8504
+ const handleMouse = (0, import_react17.useCallback)(
8452
8505
  (event) => {
8453
8506
  if (event.name !== "move" && event.name !== "left-press") return;
8454
8507
  const index = resolveIndex(event);
@@ -8495,10 +8548,10 @@ function BaseSelectionList({
8495
8548
  isFocused,
8496
8549
  showNumbers
8497
8550
  });
8498
- const [scrollOffset, setScrollOffset] = (0, import_react17.useState)(
8551
+ const [scrollOffset, setScrollOffset] = (0, import_react18.useState)(
8499
8552
  () => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
8500
8553
  );
8501
- (0, import_react17.useEffect)(() => {
8554
+ (0, import_react18.useEffect)(() => {
8502
8555
  const newScrollOffset = getScrollOffsetForIndex(
8503
8556
  activeIndex,
8504
8557
  items.length,
@@ -8510,10 +8563,12 @@ function BaseSelectionList({
8510
8563
  setScrollOffset(newScrollOffset);
8511
8564
  }
8512
8565
  }, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
8513
- const settings = (0, import_react17.useContext)(SettingsContext);
8514
- const mouseEnabled = !!settings?.merged.ui?.useTerminalBuffer;
8515
- const containerRef = (0, import_react17.useRef)(null);
8516
- const itemRefs = (0, import_react17.useRef)([]);
8566
+ const settings = (0, import_react18.useContext)(SettingsContext);
8567
+ const mouseEnabled = useVirtualViewport(
8568
+ settings?.merged.ui?.useTerminalBuffer
8569
+ );
8570
+ const containerRef = (0, import_react18.useRef)(null);
8571
+ const itemRefs = (0, import_react18.useRef)([]);
8517
8572
  const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
8518
8573
  const numberColumnWidth = String(items.length).length;
8519
8574
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
@@ -8643,7 +8698,7 @@ __name(RadioButtonSelect, "RadioButtonSelect");
8643
8698
 
8644
8699
  // packages/cli/src/ui/hooks/useLaunchEditor.ts
8645
8700
  init_esbuild_shims();
8646
- var import_react18 = __toESM(require_react(), 1);
8701
+ var import_react19 = __toESM(require_react(), 1);
8647
8702
  import { spawnSync as spawnSync2 } from "child_process";
8648
8703
  function getEditorCommand(preferredEditor) {
8649
8704
  if (preferredEditor) {
@@ -8669,7 +8724,7 @@ __name(getEditorCommand, "getEditorCommand");
8669
8724
  function useLaunchEditor() {
8670
8725
  const settings = useSettings();
8671
8726
  const { stdin, setRawMode } = use_stdin_default();
8672
- const launchEditor = (0, import_react18.useCallback)(
8727
+ const launchEditor = (0, import_react19.useCallback)(
8673
8728
  async (filePath) => {
8674
8729
  const preferredEditor = settings.merged.general?.preferredEditor;
8675
8730
  const editor = getEditorCommand(preferredEditor);
@@ -8706,14 +8761,14 @@ __name(useLaunchEditor, "useLaunchEditor");
8706
8761
 
8707
8762
  // packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
8708
8763
  init_esbuild_shims();
8709
- var import_react22 = __toESM(require_react(), 1);
8764
+ var import_react23 = __toESM(require_react(), 1);
8710
8765
 
8711
8766
  // packages/cli/src/ui/components/shared/TextInput.tsx
8712
8767
  init_esbuild_shims();
8713
8768
 
8714
8769
  // packages/cli/src/ui/components/shared/text-buffer.ts
8715
8770
  init_esbuild_shims();
8716
- var import_react19 = __toESM(require_react(), 1);
8771
+ var import_react20 = __toESM(require_react(), 1);
8717
8772
  import { spawnSync as spawnSync3 } from "node:child_process";
8718
8773
  import fs2 from "node:fs";
8719
8774
  import os2 from "node:os";
@@ -10102,8 +10157,8 @@ function textBufferReducerLogic(state, action) {
10102
10157
  const currentLineLen = /* @__PURE__ */ __name((r) => cpLen(currentLine(r)), "currentLineLen");
10103
10158
  switch (action.type) {
10104
10159
  case "set_text": {
10105
- let nextState = state;
10106
- if (action.pushToUndo !== false) {
10160
+ let nextState = action.clearUndoHistory ? { ...state, undoStack: [], redoStack: [] } : state;
10161
+ if (!action.clearUndoHistory && action.pushToUndo !== false) {
10107
10162
  nextState = pushUndoLocal(state);
10108
10163
  }
10109
10164
  const newContentLines = action.payload.replace(/\r\n?/g, "\n").split("\n");
@@ -10771,7 +10826,7 @@ function useTextBuffer({
10771
10826
  shellModeActive = false,
10772
10827
  preferredEditor
10773
10828
  }) {
10774
- const initialState = (0, import_react19.useMemo)(() => {
10829
+ const initialState = (0, import_react20.useMemo)(() => {
10775
10830
  const lines2 = initialText.split("\n");
10776
10831
  const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
10777
10832
  lines2.length === 0 ? [""] : lines2,
@@ -10795,9 +10850,9 @@ function useTextBuffer({
10795
10850
  visualLayout: visualLayout2
10796
10851
  };
10797
10852
  }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
10798
- const stateRef = (0, import_react19.useRef)(initialState);
10799
- const [state, setState] = (0, import_react19.useState)(initialState);
10800
- const dispatch = (0, import_react19.useCallback)((action) => {
10853
+ const stateRef = (0, import_react20.useRef)(initialState);
10854
+ const [state, setState] = (0, import_react20.useState)(initialState);
10855
+ const dispatch = (0, import_react20.useCallback)((action) => {
10801
10856
  stateRef.current = textBufferReducer(stateRef.current, action);
10802
10857
  setState(stateRef.current);
10803
10858
  }, []);
@@ -10809,25 +10864,25 @@ function useTextBuffer({
10809
10864
  selectionAnchor,
10810
10865
  visualLayout
10811
10866
  } = state;
10812
- const text = (0, import_react19.useMemo)(() => lines.join("\n"), [lines]);
10813
- const visualCursor = (0, import_react19.useMemo)(
10867
+ const text = (0, import_react20.useMemo)(() => lines.join("\n"), [lines]);
10868
+ const visualCursor = (0, import_react20.useMemo)(
10814
10869
  () => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
10815
10870
  [visualLayout, cursorRow, cursorCol]
10816
10871
  );
10817
10872
  const { visualLines, visualToLogicalMap } = visualLayout;
10818
- const [visualScrollRow, setVisualScrollRow] = (0, import_react19.useState)(0);
10819
- (0, import_react19.useEffect)(() => {
10873
+ const [visualScrollRow, setVisualScrollRow] = (0, import_react20.useState)(0);
10874
+ (0, import_react20.useEffect)(() => {
10820
10875
  if (onChange) {
10821
10876
  onChange(text);
10822
10877
  }
10823
10878
  }, [text, onChange]);
10824
- (0, import_react19.useEffect)(() => {
10879
+ (0, import_react20.useEffect)(() => {
10825
10880
  dispatch({
10826
10881
  type: "set_viewport",
10827
10882
  payload: { width: viewport.width, height: viewport.height }
10828
10883
  });
10829
10884
  }, [dispatch, viewport.width, viewport.height]);
10830
- (0, import_react19.useEffect)(() => {
10885
+ (0, import_react20.useEffect)(() => {
10831
10886
  const { height } = viewport;
10832
10887
  const totalVisualLines = visualLines.length;
10833
10888
  const maxScrollStart = Math.max(0, totalVisualLines - height);
@@ -10842,7 +10897,7 @@ function useTextBuffer({
10842
10897
  setVisualScrollRow(newVisualScrollRow);
10843
10898
  }
10844
10899
  }, [visualCursor, visualScrollRow, viewport, visualLines.length]);
10845
- const insert = (0, import_react19.useCallback)(
10900
+ const insert = (0, import_react20.useCallback)(
10846
10901
  (ch, { paste = false } = {}) => {
10847
10902
  if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
10848
10903
  const validPaths = tryExtractFilePaths(ch, isValidPath);
@@ -10881,202 +10936,206 @@ function useTextBuffer({
10881
10936
  },
10882
10937
  [dispatch, isValidPath, shellModeActive]
10883
10938
  );
10884
- const newline = (0, import_react19.useCallback)(() => {
10939
+ const newline = (0, import_react20.useCallback)(() => {
10885
10940
  dispatch({ type: "insert", payload: "\n" });
10886
10941
  }, [dispatch]);
10887
- const backspace = (0, import_react19.useCallback)(() => {
10942
+ const backspace = (0, import_react20.useCallback)(() => {
10888
10943
  dispatch({ type: "backspace" });
10889
10944
  }, [dispatch]);
10890
- const del = (0, import_react19.useCallback)(() => {
10945
+ const del = (0, import_react20.useCallback)(() => {
10891
10946
  dispatch({ type: "delete" });
10892
10947
  }, [dispatch]);
10893
- const move = (0, import_react19.useCallback)(
10948
+ const move = (0, import_react20.useCallback)(
10894
10949
  (dir) => {
10895
10950
  dispatch({ type: "move", payload: { dir } });
10896
10951
  },
10897
10952
  [dispatch]
10898
10953
  );
10899
- const undo = (0, import_react19.useCallback)(() => {
10954
+ const undo = (0, import_react20.useCallback)(() => {
10900
10955
  dispatch({ type: "undo" });
10901
10956
  }, [dispatch]);
10902
- const redo = (0, import_react19.useCallback)(() => {
10957
+ const redo = (0, import_react20.useCallback)(() => {
10903
10958
  dispatch({ type: "redo" });
10904
10959
  }, [dispatch]);
10905
- const setText = (0, import_react19.useCallback)(
10906
- (newText) => {
10907
- dispatch({ type: "set_text", payload: newText });
10960
+ const setText = (0, import_react20.useCallback)(
10961
+ (newText, options) => {
10962
+ dispatch({
10963
+ type: "set_text",
10964
+ payload: newText,
10965
+ clearUndoHistory: options?.clearUndoHistory
10966
+ });
10908
10967
  },
10909
10968
  [dispatch]
10910
10969
  );
10911
- const deleteWordLeft = (0, import_react19.useCallback)(() => {
10970
+ const deleteWordLeft = (0, import_react20.useCallback)(() => {
10912
10971
  dispatch({ type: "delete_word_left" });
10913
10972
  }, [dispatch]);
10914
- const deleteWordRight = (0, import_react19.useCallback)(() => {
10973
+ const deleteWordRight = (0, import_react20.useCallback)(() => {
10915
10974
  dispatch({ type: "delete_word_right" });
10916
10975
  }, [dispatch]);
10917
- const killLineRight = (0, import_react19.useCallback)(() => {
10976
+ const killLineRight = (0, import_react20.useCallback)(() => {
10918
10977
  dispatch({ type: "kill_line_right" });
10919
10978
  }, [dispatch]);
10920
- const killLineLeft = (0, import_react19.useCallback)(() => {
10979
+ const killLineLeft = (0, import_react20.useCallback)(() => {
10921
10980
  dispatch({ type: "kill_line_left" });
10922
10981
  }, [dispatch]);
10923
- const vimDeleteWordForward = (0, import_react19.useCallback)(
10982
+ const vimDeleteWordForward = (0, import_react20.useCallback)(
10924
10983
  (count) => {
10925
10984
  dispatch({ type: "vim_delete_word_forward", payload: { count } });
10926
10985
  },
10927
10986
  [dispatch]
10928
10987
  );
10929
- const vimDeleteWordBackward = (0, import_react19.useCallback)(
10988
+ const vimDeleteWordBackward = (0, import_react20.useCallback)(
10930
10989
  (count) => {
10931
10990
  dispatch({ type: "vim_delete_word_backward", payload: { count } });
10932
10991
  },
10933
10992
  [dispatch]
10934
10993
  );
10935
- const vimDeleteWordEnd = (0, import_react19.useCallback)(
10994
+ const vimDeleteWordEnd = (0, import_react20.useCallback)(
10936
10995
  (count) => {
10937
10996
  dispatch({ type: "vim_delete_word_end", payload: { count } });
10938
10997
  },
10939
10998
  [dispatch]
10940
10999
  );
10941
- const vimChangeWordForward = (0, import_react19.useCallback)(
11000
+ const vimChangeWordForward = (0, import_react20.useCallback)(
10942
11001
  (count) => {
10943
11002
  dispatch({ type: "vim_change_word_forward", payload: { count } });
10944
11003
  },
10945
11004
  [dispatch]
10946
11005
  );
10947
- const vimChangeWordBackward = (0, import_react19.useCallback)(
11006
+ const vimChangeWordBackward = (0, import_react20.useCallback)(
10948
11007
  (count) => {
10949
11008
  dispatch({ type: "vim_change_word_backward", payload: { count } });
10950
11009
  },
10951
11010
  [dispatch]
10952
11011
  );
10953
- const vimChangeWordEnd = (0, import_react19.useCallback)(
11012
+ const vimChangeWordEnd = (0, import_react20.useCallback)(
10954
11013
  (count) => {
10955
11014
  dispatch({ type: "vim_change_word_end", payload: { count } });
10956
11015
  },
10957
11016
  [dispatch]
10958
11017
  );
10959
- const vimDeleteLine = (0, import_react19.useCallback)(
11018
+ const vimDeleteLine = (0, import_react20.useCallback)(
10960
11019
  (count) => {
10961
11020
  dispatch({ type: "vim_delete_line", payload: { count } });
10962
11021
  },
10963
11022
  [dispatch]
10964
11023
  );
10965
- const vimChangeLine = (0, import_react19.useCallback)(
11024
+ const vimChangeLine = (0, import_react20.useCallback)(
10966
11025
  (count) => {
10967
11026
  dispatch({ type: "vim_change_line", payload: { count } });
10968
11027
  },
10969
11028
  [dispatch]
10970
11029
  );
10971
- const vimDeleteToEndOfLine = (0, import_react19.useCallback)(() => {
11030
+ const vimDeleteToEndOfLine = (0, import_react20.useCallback)(() => {
10972
11031
  dispatch({ type: "vim_delete_to_end_of_line" });
10973
11032
  }, [dispatch]);
10974
- const vimChangeToEndOfLine = (0, import_react19.useCallback)(() => {
11033
+ const vimChangeToEndOfLine = (0, import_react20.useCallback)(() => {
10975
11034
  dispatch({ type: "vim_change_to_end_of_line" });
10976
11035
  }, [dispatch]);
10977
- const vimChangeMovement = (0, import_react19.useCallback)(
11036
+ const vimChangeMovement = (0, import_react20.useCallback)(
10978
11037
  (movement, count) => {
10979
11038
  dispatch({ type: "vim_change_movement", payload: { movement, count } });
10980
11039
  },
10981
11040
  [dispatch]
10982
11041
  );
10983
- const vimDeleteMovement = (0, import_react19.useCallback)(
11042
+ const vimDeleteMovement = (0, import_react20.useCallback)(
10984
11043
  (movement, count) => {
10985
11044
  dispatch({ type: "vim_delete_movement", payload: { movement, count } });
10986
11045
  },
10987
11046
  [dispatch]
10988
11047
  );
10989
- const vimMoveLeft = (0, import_react19.useCallback)(
11048
+ const vimMoveLeft = (0, import_react20.useCallback)(
10990
11049
  (count) => {
10991
11050
  dispatch({ type: "vim_move_left", payload: { count } });
10992
11051
  },
10993
11052
  [dispatch]
10994
11053
  );
10995
- const vimMoveRight = (0, import_react19.useCallback)(
11054
+ const vimMoveRight = (0, import_react20.useCallback)(
10996
11055
  (count) => {
10997
11056
  dispatch({ type: "vim_move_right", payload: { count } });
10998
11057
  },
10999
11058
  [dispatch]
11000
11059
  );
11001
- const vimMoveUp = (0, import_react19.useCallback)(
11060
+ const vimMoveUp = (0, import_react20.useCallback)(
11002
11061
  (count) => {
11003
11062
  dispatch({ type: "vim_move_up", payload: { count } });
11004
11063
  },
11005
11064
  [dispatch]
11006
11065
  );
11007
- const vimMoveDown = (0, import_react19.useCallback)(
11066
+ const vimMoveDown = (0, import_react20.useCallback)(
11008
11067
  (count) => {
11009
11068
  dispatch({ type: "vim_move_down", payload: { count } });
11010
11069
  },
11011
11070
  [dispatch]
11012
11071
  );
11013
- const vimMoveWordForward = (0, import_react19.useCallback)(
11072
+ const vimMoveWordForward = (0, import_react20.useCallback)(
11014
11073
  (count) => {
11015
11074
  dispatch({ type: "vim_move_word_forward", payload: { count } });
11016
11075
  },
11017
11076
  [dispatch]
11018
11077
  );
11019
- const vimMoveWordBackward = (0, import_react19.useCallback)(
11078
+ const vimMoveWordBackward = (0, import_react20.useCallback)(
11020
11079
  (count) => {
11021
11080
  dispatch({ type: "vim_move_word_backward", payload: { count } });
11022
11081
  },
11023
11082
  [dispatch]
11024
11083
  );
11025
- const vimMoveWordEnd = (0, import_react19.useCallback)(
11084
+ const vimMoveWordEnd = (0, import_react20.useCallback)(
11026
11085
  (count) => {
11027
11086
  dispatch({ type: "vim_move_word_end", payload: { count } });
11028
11087
  },
11029
11088
  [dispatch]
11030
11089
  );
11031
- const vimDeleteChar = (0, import_react19.useCallback)(
11090
+ const vimDeleteChar = (0, import_react20.useCallback)(
11032
11091
  (count) => {
11033
11092
  dispatch({ type: "vim_delete_char", payload: { count } });
11034
11093
  },
11035
11094
  [dispatch]
11036
11095
  );
11037
- const vimInsertAtCursor = (0, import_react19.useCallback)(() => {
11096
+ const vimInsertAtCursor = (0, import_react20.useCallback)(() => {
11038
11097
  dispatch({ type: "vim_insert_at_cursor" });
11039
11098
  }, [dispatch]);
11040
- const vimAppendAtCursor = (0, import_react19.useCallback)(() => {
11099
+ const vimAppendAtCursor = (0, import_react20.useCallback)(() => {
11041
11100
  dispatch({ type: "vim_append_at_cursor" });
11042
11101
  }, [dispatch]);
11043
- const vimOpenLineBelow = (0, import_react19.useCallback)(() => {
11102
+ const vimOpenLineBelow = (0, import_react20.useCallback)(() => {
11044
11103
  dispatch({ type: "vim_open_line_below" });
11045
11104
  }, [dispatch]);
11046
- const vimOpenLineAbove = (0, import_react19.useCallback)(() => {
11105
+ const vimOpenLineAbove = (0, import_react20.useCallback)(() => {
11047
11106
  dispatch({ type: "vim_open_line_above" });
11048
11107
  }, [dispatch]);
11049
- const vimAppendAtLineEnd = (0, import_react19.useCallback)(() => {
11108
+ const vimAppendAtLineEnd = (0, import_react20.useCallback)(() => {
11050
11109
  dispatch({ type: "vim_append_at_line_end" });
11051
11110
  }, [dispatch]);
11052
- const vimInsertAtLineStart = (0, import_react19.useCallback)(() => {
11111
+ const vimInsertAtLineStart = (0, import_react20.useCallback)(() => {
11053
11112
  dispatch({ type: "vim_insert_at_line_start" });
11054
11113
  }, [dispatch]);
11055
- const vimMoveToLineStart = (0, import_react19.useCallback)(() => {
11114
+ const vimMoveToLineStart = (0, import_react20.useCallback)(() => {
11056
11115
  dispatch({ type: "vim_move_to_line_start" });
11057
11116
  }, [dispatch]);
11058
- const vimMoveToLineEnd = (0, import_react19.useCallback)(() => {
11117
+ const vimMoveToLineEnd = (0, import_react20.useCallback)(() => {
11059
11118
  dispatch({ type: "vim_move_to_line_end" });
11060
11119
  }, [dispatch]);
11061
- const vimMoveToFirstNonWhitespace = (0, import_react19.useCallback)(() => {
11120
+ const vimMoveToFirstNonWhitespace = (0, import_react20.useCallback)(() => {
11062
11121
  dispatch({ type: "vim_move_to_first_nonwhitespace" });
11063
11122
  }, [dispatch]);
11064
- const vimMoveToFirstLine = (0, import_react19.useCallback)(() => {
11123
+ const vimMoveToFirstLine = (0, import_react20.useCallback)(() => {
11065
11124
  dispatch({ type: "vim_move_to_first_line" });
11066
11125
  }, [dispatch]);
11067
- const vimMoveToLastLine = (0, import_react19.useCallback)(() => {
11126
+ const vimMoveToLastLine = (0, import_react20.useCallback)(() => {
11068
11127
  dispatch({ type: "vim_move_to_last_line" });
11069
11128
  }, [dispatch]);
11070
- const vimMoveToLine = (0, import_react19.useCallback)(
11129
+ const vimMoveToLine = (0, import_react20.useCallback)(
11071
11130
  (lineNumber) => {
11072
11131
  dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
11073
11132
  },
11074
11133
  [dispatch]
11075
11134
  );
11076
- const vimEscapeInsertMode = (0, import_react19.useCallback)(() => {
11135
+ const vimEscapeInsertMode = (0, import_react20.useCallback)(() => {
11077
11136
  dispatch({ type: "vim_escape_insert_mode" });
11078
11137
  }, [dispatch]);
11079
- const openInExternalEditor = (0, import_react19.useCallback)(
11138
+ const openInExternalEditor = (0, import_react20.useCallback)(
11080
11139
  async (opts = {}) => {
11081
11140
  let tmpDir;
11082
11141
  let filePath;
@@ -11194,7 +11253,7 @@ function useTextBuffer({
11194
11253
  },
11195
11254
  [dispatch, stdin, setRawMode, preferredEditor]
11196
11255
  );
11197
- const handleInput = (0, import_react19.useCallback)(
11256
+ const handleInput = (0, import_react20.useCallback)(
11198
11257
  (key) => {
11199
11258
  const { sequence: input } = key;
11200
11259
  if (key.paste) {
@@ -11245,11 +11304,11 @@ function useTextBuffer({
11245
11304
  redo
11246
11305
  ]
11247
11306
  );
11248
- const renderedVisualLines = (0, import_react19.useMemo)(
11307
+ const renderedVisualLines = (0, import_react20.useMemo)(
11249
11308
  () => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
11250
11309
  [visualLines, visualScrollRow, viewport.height]
11251
11310
  );
11252
- const replaceRange = (0, import_react19.useCallback)(
11311
+ const replaceRange = (0, import_react20.useCallback)(
11253
11312
  (startRow, startCol, endRow, endCol, text2) => {
11254
11313
  dispatch({
11255
11314
  type: "replace_range",
@@ -11258,7 +11317,7 @@ function useTextBuffer({
11258
11317
  },
11259
11318
  [dispatch]
11260
11319
  );
11261
- const replaceRangeByOffset = (0, import_react19.useCallback)(
11320
+ const replaceRangeByOffset = (0, import_react20.useCallback)(
11262
11321
  (startOffset, endOffset, replacementText) => {
11263
11322
  const currentText = stateRef.current.lines.join("\n");
11264
11323
  const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
@@ -11267,13 +11326,13 @@ function useTextBuffer({
11267
11326
  },
11268
11327
  [replaceRange]
11269
11328
  );
11270
- const moveToOffset = (0, import_react19.useCallback)(
11329
+ const moveToOffset = (0, import_react20.useCallback)(
11271
11330
  (offset) => {
11272
11331
  dispatch({ type: "move_to_offset", payload: { offset } });
11273
11332
  },
11274
11333
  [dispatch]
11275
11334
  );
11276
- const returnValue = (0, import_react19.useMemo)(
11335
+ const returnValue = (0, import_react20.useMemo)(
11277
11336
  () => ({
11278
11337
  get lines() {
11279
11338
  return stateRef.current.lines;
@@ -11409,11 +11468,11 @@ __name(useTextBuffer, "useTextBuffer");
11409
11468
 
11410
11469
  // packages/cli/src/ui/hooks/usePreferredEditor.ts
11411
11470
  init_esbuild_shims();
11412
- var import_react20 = __toESM(require_react(), 1);
11471
+ var import_react21 = __toESM(require_react(), 1);
11413
11472
  var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
11414
11473
  function usePreferredEditor() {
11415
11474
  const settings = useSettings();
11416
- return (0, import_react20.useMemo)(() => {
11475
+ return (0, import_react21.useMemo)(() => {
11417
11476
  const raw = settings.merged.general?.preferredEditor ?? "";
11418
11477
  if (raw && !isValidEditorType(raw)) {
11419
11478
  debugLogger5.warn(
@@ -11433,7 +11492,7 @@ function usePreferredEditor() {
11433
11492
  __name(usePreferredEditor, "usePreferredEditor");
11434
11493
 
11435
11494
  // packages/cli/src/ui/components/shared/TextInput.tsx
11436
- var import_react21 = __toESM(require_react(), 1);
11495
+ var import_react22 = __toESM(require_react(), 1);
11437
11496
 
11438
11497
  // packages/cli/src/ui/utils/software-cursor.ts
11439
11498
  init_esbuild_shims();
@@ -11531,12 +11590,12 @@ function TextInput({
11531
11590
  ellipsizeOverflow = false
11532
11591
  }) {
11533
11592
  const allowMultiline = height > 1;
11534
- const [cursorVisible, setCursorVisible] = (0, import_react21.useState)(isActive);
11535
- const onChangeRef = (0, import_react21.useRef)(onChange);
11536
- (0, import_react21.useEffect)(() => {
11593
+ const [cursorVisible, setCursorVisible] = (0, import_react22.useState)(isActive);
11594
+ const onChangeRef = (0, import_react22.useRef)(onChange);
11595
+ (0, import_react22.useEffect)(() => {
11537
11596
  onChangeRef.current = onChange;
11538
11597
  }, [onChange]);
11539
- const stableOnChange = (0, import_react21.useCallback)((text) => {
11598
+ const stableOnChange = (0, import_react22.useCallback)((text) => {
11540
11599
  onChangeRef.current?.(text);
11541
11600
  }, []);
11542
11601
  const preferredEditor = usePreferredEditor();
@@ -11551,7 +11610,7 @@ function TextInput({
11551
11610
  onChange: stableOnChange,
11552
11611
  preferredEditor
11553
11612
  });
11554
- (0, import_react21.useEffect)(() => {
11613
+ (0, import_react22.useEffect)(() => {
11555
11614
  if (!isActive) {
11556
11615
  setCursorVisible(false);
11557
11616
  return;
@@ -11684,13 +11743,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
11684
11743
  availableWidth,
11685
11744
  onConfirm
11686
11745
  }) => {
11687
- const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react22.useState)(0);
11688
- const [selectedOptions, setSelectedOptions] = (0, import_react22.useState)({});
11689
- const [customInputValues, setCustomInputValues] = (0, import_react22.useState)({});
11690
- const customInputValuesRef = (0, import_react22.useRef)({});
11691
- const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
11692
- const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react22.useState)({});
11693
- const [customInputChecked, setCustomInputChecked] = (0, import_react22.useState)({});
11746
+ const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react23.useState)(0);
11747
+ const [selectedOptions, setSelectedOptions] = (0, import_react23.useState)({});
11748
+ const [customInputValues, setCustomInputValues] = (0, import_react23.useState)({});
11749
+ const customInputValuesRef = (0, import_react23.useRef)({});
11750
+ const [selectedIndex, setSelectedIndex] = (0, import_react23.useState)(0);
11751
+ const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react23.useState)({});
11752
+ const [customInputChecked, setCustomInputChecked] = (0, import_react23.useState)({});
11694
11753
  const hasMultipleQuestions = confirmationDetails.questions.length > 1;
11695
11754
  const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
11696
11755
  const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
@@ -12084,9 +12143,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
12084
12143
  const autoModeFallback = confirmationDetails.autoModeFallback;
12085
12144
  const settings = useSettings();
12086
12145
  const preferredEditor = settings.merged.general?.preferredEditor;
12087
- const [ideClient, setIdeClient] = (0, import_react23.useState)(null);
12088
- const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react23.useState)(false);
12089
- (0, import_react23.useEffect)(() => {
12146
+ const [ideClient, setIdeClient] = (0, import_react24.useState)(null);
12147
+ const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react24.useState)(false);
12148
+ (0, import_react24.useEffect)(() => {
12090
12149
  let isMounted = true;
12091
12150
  if (config.getIdeMode()) {
12092
12151
  const getIdeClient = /* @__PURE__ */ __name(async () => {
@@ -12116,7 +12175,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
12116
12175
  }, "handleConfirm");
12117
12176
  const isTrustedFolder = config.isTrustedFolder();
12118
12177
  const launchEditor = useLaunchEditor();
12119
- const [planViewError, setPlanViewError] = (0, import_react23.useState)(null);
12178
+ const [planViewError, setPlanViewError] = (0, import_react24.useState)(null);
12120
12179
  const openFullPlanInEditor = /* @__PURE__ */ __name(() => {
12121
12180
  if (confirmationDetails.type !== "plan") return;
12122
12181
  setPlanViewError(null);
@@ -12604,7 +12663,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
12604
12663
 
12605
12664
  // packages/cli/src/ui/components/ShellInputPrompt.tsx
12606
12665
  init_esbuild_shims();
12607
- var import_react24 = __toESM(require_react(), 1);
12666
+ var import_react25 = __toESM(require_react(), 1);
12608
12667
 
12609
12668
  // packages/cli/src/ui/hooks/keyToAnsi.ts
12610
12669
  init_esbuild_shims();
@@ -12667,7 +12726,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
12667
12726
  activeShellPtyId,
12668
12727
  focus = true
12669
12728
  }) => {
12670
- const handleShellInputSubmit = (0, import_react24.useCallback)(
12729
+ const handleShellInputSubmit = (0, import_react25.useCallback)(
12671
12730
  (input) => {
12672
12731
  if (activeShellPtyId) {
12673
12732
  ShellExecutionService.writeToPty(activeShellPtyId, input);
@@ -12675,7 +12734,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
12675
12734
  },
12676
12735
  [activeShellPtyId]
12677
12736
  );
12678
- const handleInput = (0, import_react24.useCallback)(
12737
+ const handleInput = (0, import_react25.useCallback)(
12679
12738
  (key) => {
12680
12739
  if (!focus || !activeShellPtyId) {
12681
12740
  return;
@@ -12770,7 +12829,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
12770
12829
  };
12771
12830
  }
12772
12831
  __name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
12773
- var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react25.default.useMemo(() => {
12832
+ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react26.default.useMemo(() => {
12774
12833
  if (!resultDisplay) {
12775
12834
  return { type: "none" };
12776
12835
  }
@@ -12994,6 +13053,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
12994
13053
  name,
12995
13054
  description,
12996
13055
  resultDisplay,
13056
+ visionBridgeNotice,
12997
13057
  detailedDisplay,
12998
13058
  status,
12999
13059
  availableTerminalHeight,
@@ -13012,21 +13072,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
13012
13072
  }) => {
13013
13073
  const settings = useSettings();
13014
13074
  const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
13015
- const [lastUpdateTime, setLastUpdateTime] = import_react25.default.useState(null);
13016
- const [userHasFocused, setUserHasFocused] = import_react25.default.useState(false);
13017
- const [showFocusHint, setShowFocusHint] = import_react25.default.useState(false);
13018
- import_react25.default.useEffect(() => {
13075
+ const [lastUpdateTime, setLastUpdateTime] = import_react26.default.useState(null);
13076
+ const [userHasFocused, setUserHasFocused] = import_react26.default.useState(false);
13077
+ const [showFocusHint, setShowFocusHint] = import_react26.default.useState(false);
13078
+ import_react26.default.useEffect(() => {
13019
13079
  if (resultDisplay) {
13020
13080
  setLastUpdateTime(/* @__PURE__ */ new Date());
13021
13081
  }
13022
13082
  }, [resultDisplay]);
13023
- const shellTimeoutMs = import_react25.default.useMemo(() => {
13083
+ const shellTimeoutMs = import_react26.default.useMemo(() => {
13024
13084
  if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
13025
13085
  return resultDisplay.timeoutMs;
13026
13086
  }
13027
13087
  return void 0;
13028
13088
  }, [resultDisplay]);
13029
- import_react25.default.useEffect(() => {
13089
+ import_react26.default.useEffect(() => {
13030
13090
  if (!lastUpdateTime) {
13031
13091
  return;
13032
13092
  }
@@ -13035,7 +13095,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
13035
13095
  }, 5e3);
13036
13096
  return () => clearTimeout(timer);
13037
13097
  }, [lastUpdateTime]);
13038
- import_react25.default.useEffect(() => {
13098
+ import_react26.default.useEffect(() => {
13039
13099
  if (isThisShellFocused) {
13040
13100
  setUserHasFocused(true);
13041
13101
  }
@@ -13058,14 +13118,15 @@ var ToolMessage = /* @__PURE__ */ __name(({
13058
13118
  renderOutputAsMarkdown = false;
13059
13119
  }
13060
13120
  const usingDetailedDisplay = fullDetail && isCollapsibleTool(name) && typeof detailedDisplay === "string" && detailedDisplay.length > 0;
13061
- const sanitizedDetailedDisplay = import_react25.default.useMemo(
13121
+ const sanitizedDetailedDisplay = import_react26.default.useMemo(
13062
13122
  () => usingDetailedDisplay && typeof detailedDisplay === "string" ? sanitizeTerminalText(detailedDisplay) : detailedDisplay,
13063
13123
  [detailedDisplay, usingDetailedDisplay]
13064
13124
  );
13065
13125
  const visionBridgeNoticeDisplay = isVisionBridgeNoticeDisplay(resultDisplay) ? resultDisplay : void 0;
13066
- const visionBridgeNoticeText = visionBridgeNoticeDisplay ? sanitizeTerminalText(
13067
- formatVisionBridgeNoticeDisplay(visionBridgeNoticeDisplay)
13068
- ) : void 0;
13126
+ const visionBridgeNoticeText = [
13127
+ visionBridgeNoticeDisplay ? formatVisionBridgeNoticeDisplay(visionBridgeNoticeDisplay) : void 0,
13128
+ visionBridgeNotice
13129
+ ].filter((notice) => notice !== void 0).map((notice) => sanitizeTerminalText(notice)).join("\n");
13069
13130
  const effectiveResultDisplay = usingDetailedDisplay ? sanitizedDetailedDisplay : visionBridgeNoticeDisplay ? void 0 : resultDisplay;
13070
13131
  if (usingDetailedDisplay) {
13071
13132
  renderOutputAsMarkdown = false;
@@ -13177,7 +13238,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
13177
13238
  status,
13178
13239
  emphasis
13179
13240
  }) => {
13180
- const nameColor = import_react25.default.useMemo(() => {
13241
+ const nameColor = import_react26.default.useMemo(() => {
13181
13242
  switch (emphasis) {
13182
13243
  case "high":
13183
13244
  return theme.text.primary;
@@ -13204,7 +13265,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
13204
13265
 
13205
13266
  // packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
13206
13267
  init_esbuild_shims();
13207
- var import_react26 = __toESM(require_react(), 1);
13268
+ var import_react27 = __toESM(require_react(), 1);
13208
13269
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
13209
13270
  function deriveAgentId(toolCall, resultDisplay) {
13210
13271
  return `${resultDisplay.subagentName}-${toolCall.callId}`;
@@ -13265,8 +13326,8 @@ function truncateMiddle(input, max) {
13265
13326
  }
13266
13327
  __name(truncateMiddle, "truncateMiddle");
13267
13328
  var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
13268
- const config = (0, import_react26.useContext)(ConfigContext);
13269
- const agentEntries = (0, import_react26.useMemo)(() => {
13329
+ const config = (0, import_react27.useContext)(ConfigContext);
13330
+ const agentEntries = (0, import_react27.useMemo)(() => {
13270
13331
  const out = [];
13271
13332
  for (const tc of toolCalls) {
13272
13333
  if (isAgentResult(tc.resultDisplay)) {
@@ -13275,19 +13336,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
13275
13336
  }
13276
13337
  return out;
13277
13338
  }, [toolCalls]);
13278
- const [now, setNow] = (0, import_react26.useState)(() => Date.now());
13279
- const hasLiveAgent = (0, import_react26.useMemo)(
13339
+ const [now, setNow] = (0, import_react27.useState)(() => Date.now());
13340
+ const hasLiveAgent = (0, import_react27.useMemo)(
13280
13341
  () => agentEntries.some(
13281
13342
  (e) => e.result.status === "running" || e.result.status === "background"
13282
13343
  ),
13283
13344
  [agentEntries]
13284
13345
  );
13285
- (0, import_react26.useEffect)(() => {
13346
+ (0, import_react27.useEffect)(() => {
13286
13347
  if (!hasLiveAgent) return;
13287
13348
  const id = setInterval(() => setNow(Date.now()), 1e3);
13288
13349
  return () => clearInterval(id);
13289
13350
  }, [hasLiveAgent]);
13290
- const rows = (0, import_react26.useMemo)(() => {
13351
+ const rows = (0, import_react27.useMemo)(() => {
13291
13352
  const registry = config?.getBackgroundTaskRegistry();
13292
13353
  void now;
13293
13354
  return agentEntries.map(({ toolCall, result }) => {
@@ -13407,27 +13468,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
13407
13468
  const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
13408
13469
  (t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
13409
13470
  );
13410
- const toolAwaitingApproval = (0, import_react27.useMemo)(
13471
+ const toolAwaitingApproval = (0, import_react28.useMemo)(
13411
13472
  () => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
13412
13473
  [toolCalls]
13413
13474
  );
13414
- const isMemoryOnlyGroup = (0, import_react27.useMemo)(
13475
+ const isMemoryOnlyGroup = (0, import_react28.useMemo)(
13415
13476
  () => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
13416
13477
  [toolCalls]
13417
13478
  );
13418
- const inlineToolCalls = (0, import_react27.useMemo)(
13479
+ const inlineToolCalls = (0, import_react28.useMemo)(
13419
13480
  () => isPending ? toolCalls.filter(
13420
13481
  (tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
13421
13482
  ) : toolCalls,
13422
13483
  [isPending, toolCalls]
13423
13484
  );
13424
- const subagentsAwaitingApproval = (0, import_react27.useMemo)(
13485
+ const subagentsAwaitingApproval = (0, import_react28.useMemo)(
13425
13486
  () => toolCalls.filter(
13426
13487
  (tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
13427
13488
  ),
13428
13489
  [toolCalls]
13429
13490
  );
13430
- const focusedSubagentRef = (0, import_react27.useRef)(null);
13491
+ const focusedSubagentRef = (0, import_react28.useRef)(null);
13431
13492
  const stillPending = subagentsAwaitingApproval.some(
13432
13493
  (tc) => tc.callId === focusedSubagentRef.current
13433
13494
  );
@@ -13435,7 +13496,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
13435
13496
  focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
13436
13497
  }
13437
13498
  const focusedSubagentCallId = focusedSubagentRef.current;
13438
- const runningSubagentCallId = (0, import_react27.useMemo)(
13499
+ const runningSubagentCallId = (0, import_react28.useMemo)(
13439
13500
  () => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
13440
13501
  [toolCalls]
13441
13502
  );
@@ -13674,7 +13735,7 @@ init_esbuild_shims();
13674
13735
 
13675
13736
  // node_modules/ink-link/dist/index.js
13676
13737
  init_esbuild_shims();
13677
- var import_react28 = __toESM(require_react(), 1);
13738
+ var import_react29 = __toESM(require_react(), 1);
13678
13739
  var import_prop_types = __toESM(require_prop_types(), 1);
13679
13740
 
13680
13741
  // node_modules/ink-link/node_modules/terminal-link/index.js
@@ -13822,10 +13883,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
13822
13883
  // node_modules/ink-link/dist/index.js
13823
13884
  var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
13824
13885
  // eslint-disable-line react/function-component-definition
13825
- import_react28.default.createElement(
13886
+ import_react29.default.createElement(
13826
13887
  Transform,
13827
13888
  { transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
13828
- import_react28.default.createElement(Text, null, children)
13889
+ import_react29.default.createElement(Text, null, children)
13829
13890
  )
13830
13891
  ), "Link");
13831
13892
  Link.propTypes = {
@@ -13979,7 +14040,7 @@ init_esbuild_shims();
13979
14040
 
13980
14041
  // node_modules/ink-gradient/dist/index.js
13981
14042
  init_esbuild_shims();
13982
- var import_react29 = __toESM(require_react(), 1);
14043
+ var import_react30 = __toESM(require_react(), 1);
13983
14044
  var import_prop_types2 = __toESM(require_prop_types(), 1);
13984
14045
  var import_gradient_string = __toESM(require_gradient_string(), 1);
13985
14046
  var Gradient = /* @__PURE__ */ __name((props) => {
@@ -13995,7 +14056,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
13995
14056
  throw new Error("Either `name` or `colors` prop must be provided");
13996
14057
  }
13997
14058
  const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
13998
- return import_react29.default.createElement(Transform, { transform: applyGradient }, props.children);
14059
+ return import_react30.default.createElement(Transform, { transform: applyGradient }, props.children);
13999
14060
  }, "Gradient");
14000
14061
  Gradient.propTypes = {
14001
14062
  children: import_prop_types2.default.oneOfType([
@@ -14795,7 +14856,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
14795
14856
 
14796
14857
  // packages/cli/src/ui/components/Help.tsx
14797
14858
  init_esbuild_shims();
14798
- var import_react30 = __toESM(require_react(), 1);
14859
+ var import_react31 = __toESM(require_react(), 1);
14799
14860
  var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
14800
14861
  var DEFAULT_WIDTH = 100;
14801
14862
  var KEY_COL_WIDTH = 20;
@@ -14816,7 +14877,7 @@ var Help = /* @__PURE__ */ __name(({
14816
14877
  }) => {
14817
14878
  const safeWidth = Math.max(72, width);
14818
14879
  const bodyWidth = safeWidth - 6;
14819
- const handleTabChange = (0, import_react30.useCallback)(
14880
+ const handleTabChange = (0, import_react31.useCallback)(
14820
14881
  (direction) => {
14821
14882
  const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
14822
14883
  const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
@@ -14954,20 +15015,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
14954
15015
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
14955
15016
  ] }), "ShortcutRow");
14956
15017
  var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
14957
- const groups = (0, import_react30.useMemo)(
15018
+ const groups = (0, import_react31.useMemo)(
14958
15019
  () => groupCommands(commands, customOnly),
14959
15020
  [commands, customOnly]
14960
15021
  );
14961
- const lines = (0, import_react30.useMemo)(
15022
+ const lines = (0, import_react31.useMemo)(
14962
15023
  () => renderCommandLines(groups, width),
14963
15024
  [groups, width]
14964
15025
  );
14965
15026
  const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
14966
- const [scrollOffset, setScrollOffset] = (0, import_react30.useState)(0);
14967
- (0, import_react30.useEffect)(() => {
15027
+ const [scrollOffset, setScrollOffset] = (0, import_react31.useState)(0);
15028
+ (0, import_react31.useEffect)(() => {
14968
15029
  setScrollOffset(0);
14969
15030
  }, [customOnly, commands]);
14970
- (0, import_react30.useEffect)(() => {
15031
+ (0, import_react31.useEffect)(() => {
14971
15032
  setScrollOffset((offset) => Math.min(offset, maxScroll));
14972
15033
  }, [maxScroll]);
14973
15034
  useKeypress(
@@ -15155,26 +15216,26 @@ init_esbuild_shims();
15155
15216
 
15156
15217
  // packages/cli/src/ui/contexts/UIStateContext.tsx
15157
15218
  init_esbuild_shims();
15158
- var import_react37 = __toESM(require_react(), 1);
15219
+ var import_react38 = __toESM(require_react(), 1);
15159
15220
 
15160
15221
  // packages/cli/src/ui/hooks/useHistoryManager.ts
15161
15222
  init_esbuild_shims();
15162
- var import_react31 = __toESM(require_react(), 1);
15223
+ var import_react32 = __toESM(require_react(), 1);
15163
15224
  import process2 from "node:process";
15164
15225
  var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
15165
15226
  var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
15166
15227
  var UI_COMPACT_KEEP_RECENT = 20;
15167
15228
  function useHistory() {
15168
- const [history, setHistory] = (0, import_react31.useState)([]);
15169
- const messageIdCounterRef = (0, import_react31.useRef)(0);
15170
- const getNextMessageId = (0, import_react31.useCallback)((baseTimestamp) => {
15229
+ const [history, setHistory] = (0, import_react32.useState)([]);
15230
+ const messageIdCounterRef = (0, import_react32.useRef)(0);
15231
+ const getNextMessageId = (0, import_react32.useCallback)((baseTimestamp) => {
15171
15232
  messageIdCounterRef.current += 1;
15172
15233
  return baseTimestamp + messageIdCounterRef.current;
15173
15234
  }, []);
15174
- const loadHistory = (0, import_react31.useCallback)((newHistory) => {
15235
+ const loadHistory = (0, import_react32.useCallback)((newHistory) => {
15175
15236
  setHistory(newHistory);
15176
15237
  }, []);
15177
- const addItem = (0, import_react31.useCallback)(
15238
+ const addItem = (0, import_react32.useCallback)(
15178
15239
  (itemData, baseTimestamp) => {
15179
15240
  const id = getNextMessageId(baseTimestamp);
15180
15241
  const newItem = { ...itemData, id };
@@ -15198,7 +15259,7 @@ function useHistory() {
15198
15259
  },
15199
15260
  [getNextMessageId]
15200
15261
  );
15201
- const updateItem = (0, import_react31.useCallback)(
15262
+ const updateItem = (0, import_react32.useCallback)(
15202
15263
  (id, updates) => {
15203
15264
  setHistory((prevHistory) => {
15204
15265
  let updated = false;
@@ -15221,7 +15282,7 @@ function useHistory() {
15221
15282
  },
15222
15283
  []
15223
15284
  );
15224
- const clearItems = (0, import_react31.useCallback)(() => {
15285
+ const clearItems = (0, import_react32.useCallback)(() => {
15225
15286
  if (debugLogger6.isEnabled()) {
15226
15287
  debugLogger6.debug(
15227
15288
  `[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
@@ -15230,13 +15291,13 @@ function useHistory() {
15230
15291
  setHistory([]);
15231
15292
  messageIdCounterRef.current = 0;
15232
15293
  }, []);
15233
- const truncateToItem = (0, import_react31.useCallback)((itemId) => {
15294
+ const truncateToItem = (0, import_react32.useCallback)((itemId) => {
15234
15295
  setHistory((prev) => {
15235
15296
  const index = prev.findIndex((h) => h.id === itemId);
15236
15297
  return index === -1 ? prev : prev.slice(0, index);
15237
15298
  });
15238
15299
  }, []);
15239
- const compactOldItems = (0, import_react31.useCallback)(() => {
15300
+ const compactOldItems = (0, import_react32.useCallback)(() => {
15240
15301
  setHistory((prev) => {
15241
15302
  if (prev.length === 0) return prev;
15242
15303
  let thoughtRemoved = 0;
@@ -15304,7 +15365,7 @@ function useHistory() {
15304
15365
  return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
15305
15366
  });
15306
15367
  }, []);
15307
- return (0, import_react31.useMemo)(
15368
+ return (0, import_react32.useMemo)(
15308
15369
  () => ({
15309
15370
  history,
15310
15371
  addItem,
@@ -15329,7 +15390,7 @@ __name(useHistory, "useHistory");
15329
15390
 
15330
15391
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
15331
15392
  init_esbuild_shims();
15332
- var import_react34 = __toESM(require_react(), 1);
15393
+ var import_react35 = __toESM(require_react(), 1);
15333
15394
 
15334
15395
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
15335
15396
  init_esbuild_shims();
@@ -15471,7 +15532,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
15471
15532
 
15472
15533
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
15473
15534
  init_esbuild_shims();
15474
- var import_react32 = __toESM(require_react(), 1);
15535
+ var import_react33 = __toESM(require_react(), 1);
15475
15536
  import * as process3 from "node:process";
15476
15537
  import * as path3 from "node:path";
15477
15538
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
@@ -15479,7 +15540,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
15479
15540
  onSelect,
15480
15541
  isRestarting
15481
15542
  }) => {
15482
- (0, import_react32.useEffect)(() => {
15543
+ (0, import_react33.useEffect)(() => {
15483
15544
  const doRelaunch = /* @__PURE__ */ __name(async () => {
15484
15545
  if (isRestarting) {
15485
15546
  setTimeout(async () => {
@@ -15607,16 +15668,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
15607
15668
 
15608
15669
  // packages/cli/src/ui/hooks/useArenaCommand.ts
15609
15670
  init_esbuild_shims();
15610
- var import_react33 = __toESM(require_react(), 1);
15671
+ var import_react34 = __toESM(require_react(), 1);
15611
15672
  function useArenaCommand() {
15612
- const [activeArenaDialog, setActiveArenaDialog] = (0, import_react33.useState)(null);
15613
- const openArenaDialog = (0, import_react33.useCallback)(
15673
+ const [activeArenaDialog, setActiveArenaDialog] = (0, import_react34.useState)(null);
15674
+ const openArenaDialog = (0, import_react34.useCallback)(
15614
15675
  (type) => {
15615
15676
  setActiveArenaDialog(type);
15616
15677
  },
15617
15678
  []
15618
15679
  );
15619
- const closeArenaDialog = (0, import_react33.useCallback)(() => {
15680
+ const closeArenaDialog = (0, import_react34.useCallback)(() => {
15620
15681
  setActiveArenaDialog(null);
15621
15682
  }, []);
15622
15683
  return {
@@ -15628,9 +15689,9 @@ function useArenaCommand() {
15628
15689
  __name(useArenaCommand, "useArenaCommand");
15629
15690
 
15630
15691
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
15631
- var UIActionsContext = (0, import_react34.createContext)(null);
15692
+ var UIActionsContext = (0, import_react35.createContext)(null);
15632
15693
  var useUIActions = /* @__PURE__ */ __name(() => {
15633
- const context = (0, import_react34.useContext)(UIActionsContext);
15694
+ const context = (0, import_react35.useContext)(UIActionsContext);
15634
15695
  if (!context) {
15635
15696
  throw new Error("useUIActions must be used within a UIActionsProvider");
15636
15697
  }
@@ -15639,16 +15700,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
15639
15700
 
15640
15701
  // packages/cli/src/ui/hooks/useIdeTrustListener.ts
15641
15702
  init_esbuild_shims();
15642
- var import_react35 = __toESM(require_react(), 1);
15703
+ var import_react36 = __toESM(require_react(), 1);
15643
15704
  function useIdeTrustListener() {
15644
15705
  const settings = useSettings();
15645
- const [connectionStatus, setConnectionStatus] = (0, import_react35.useState)(
15706
+ const [connectionStatus, setConnectionStatus] = (0, import_react36.useState)(
15646
15707
  "disconnected" /* Disconnected */
15647
15708
  );
15648
- const previousTrust = (0, import_react35.useRef)(void 0);
15649
- const [restartReason, setRestartReason] = (0, import_react35.useState)("NONE");
15650
- const [needsRestart, setNeedsRestart] = (0, import_react35.useState)(false);
15651
- const subscribe2 = (0, import_react35.useCallback)((onStoreChange) => {
15709
+ const previousTrust = (0, import_react36.useRef)(void 0);
15710
+ const [restartReason, setRestartReason] = (0, import_react36.useState)("NONE");
15711
+ const [needsRestart, setNeedsRestart] = (0, import_react36.useState)(false);
15712
+ const subscribe2 = (0, import_react36.useCallback)((onStoreChange) => {
15652
15713
  const handleStatusChange = /* @__PURE__ */ __name((state) => {
15653
15714
  setConnectionStatus(state.status);
15654
15715
  setRestartReason("CONNECTION_CHANGE");
@@ -15678,8 +15739,8 @@ function useIdeTrustListener() {
15678
15739
  }
15679
15740
  return ideContextStore.get()?.workspaceState?.isTrusted;
15680
15741
  }, "getSnapshot");
15681
- const isIdeTrusted = (0, import_react35.useSyncExternalStore)(subscribe2, getSnapshot);
15682
- (0, import_react35.useEffect)(() => {
15742
+ const isIdeTrusted = (0, import_react36.useSyncExternalStore)(subscribe2, getSnapshot);
15743
+ (0, import_react36.useEffect)(() => {
15683
15744
  const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
15684
15745
  if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
15685
15746
  setNeedsRestart(true);
@@ -15692,7 +15753,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
15692
15753
 
15693
15754
  // packages/cli/src/ui/hooks/useProviderUpdates.ts
15694
15755
  init_esbuild_shims();
15695
- var import_react36 = __toESM(require_react(), 1);
15756
+ var import_react37 = __toESM(require_react(), 1);
15696
15757
  function getProviderMetadata(settings, metadataKey) {
15697
15758
  const mergedSettings = settings.merged;
15698
15759
  const ns = mergedSettings[PROVIDER_METADATA_NS];
@@ -15791,9 +15852,9 @@ function findAllPendingUpdates(settings, currentModel) {
15791
15852
  }
15792
15853
  __name(findAllPendingUpdates, "findAllPendingUpdates");
15793
15854
  function useProviderUpdates(settings, config, addItem) {
15794
- const [updateRequest, setUpdateRequest] = (0, import_react36.useState)();
15795
- const migrated = (0, import_react36.useRef)(false);
15796
- const executeUpdate = (0, import_react36.useCallback)(
15855
+ const [updateRequest, setUpdateRequest] = (0, import_react37.useState)();
15856
+ const migrated = (0, import_react37.useRef)(false);
15857
+ const executeUpdate = (0, import_react37.useCallback)(
15797
15858
  async (providerCfg, baseUrl) => {
15798
15859
  try {
15799
15860
  const resolved = resolveBaseUrl(providerCfg, baseUrl);
@@ -15880,7 +15941,7 @@ function useProviderUpdates(settings, config, addItem) {
15880
15941
  },
15881
15942
  [settings, config, addItem]
15882
15943
  );
15883
- const checkForUpdates = (0, import_react36.useCallback)(() => {
15944
+ const checkForUpdates = (0, import_react37.useCallback)(() => {
15884
15945
  if (!migrated.current) {
15885
15946
  migrated.current = true;
15886
15947
  migrateProviderMetadata(settings);
@@ -15913,10 +15974,10 @@ function useProviderUpdates(settings, config, addItem) {
15913
15974
  }, "onConfirm")
15914
15975
  });
15915
15976
  }, [settings, config, executeUpdate]);
15916
- (0, import_react36.useEffect)(() => {
15977
+ (0, import_react37.useEffect)(() => {
15917
15978
  checkForUpdates();
15918
15979
  }, [checkForUpdates]);
15919
- const dismissProviderUpdate = (0, import_react36.useCallback)(() => {
15980
+ const dismissProviderUpdate = (0, import_react37.useCallback)(() => {
15920
15981
  setUpdateRequest(void 0);
15921
15982
  }, []);
15922
15983
  return {
@@ -15927,9 +15988,9 @@ function useProviderUpdates(settings, config, addItem) {
15927
15988
  __name(useProviderUpdates, "useProviderUpdates");
15928
15989
 
15929
15990
  // packages/cli/src/ui/contexts/UIStateContext.tsx
15930
- var UIStateContext = (0, import_react37.createContext)(null);
15991
+ var UIStateContext = (0, import_react38.createContext)(null);
15931
15992
  var useUIState = /* @__PURE__ */ __name(() => {
15932
- const context = (0, import_react37.useContext)(UIStateContext);
15993
+ const context = (0, import_react38.useContext)(UIStateContext);
15933
15994
  if (!context) {
15934
15995
  throw new Error("useUIState must be used within a UIStateProvider");
15935
15996
  }
@@ -17121,7 +17182,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
17121
17182
 
17122
17183
  // packages/cli/src/ui/components/messages/BtwMessage.tsx
17123
17184
  init_esbuild_shims();
17124
- var import_react38 = __toESM(require_react(), 1);
17185
+ var import_react39 = __toESM(require_react(), 1);
17125
17186
  var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
17126
17187
  var BTW_SELF_CHROME = 4;
17127
17188
  function normalizeCodeFences(text) {
@@ -17169,7 +17230,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
17169
17230
  }
17170
17231
  );
17171
17232
  }, "BtwMessageInternal");
17172
- var BtwMessage = import_react38.default.memo(BtwMessageInternal);
17233
+ var BtwMessage = import_react39.default.memo(BtwMessageInternal);
17173
17234
 
17174
17235
  // packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
17175
17236
  init_esbuild_shims();
@@ -17298,7 +17359,7 @@ __name(padRight, "padRight");
17298
17359
 
17299
17360
  // packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
17300
17361
  init_esbuild_shims();
17301
- var import_react39 = __toESM(require_react(), 1);
17362
+ var import_react40 = __toESM(require_react(), 1);
17302
17363
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
17303
17364
  var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
17304
17365
  function assertNeverGoalStatusKind(kind) {
@@ -17399,19 +17460,19 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
17399
17460
  ] })
17400
17461
  ] });
17401
17462
  }, "GoalStatusMessageInternal");
17402
- var GoalStatusMessage = import_react39.default.memo(GoalStatusMessageInternal);
17463
+ var GoalStatusMessage = import_react40.default.memo(GoalStatusMessageInternal);
17403
17464
 
17404
17465
  // packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
17405
17466
  init_esbuild_shims();
17406
- var import_react40 = __toESM(require_react(), 1);
17467
+ var import_react41 = __toESM(require_react(), 1);
17407
17468
  var EMPTY_IDS = /* @__PURE__ */ new Set();
17408
- var ThoughtExpandedContext = (0, import_react40.createContext)({
17469
+ var ThoughtExpandedContext = (0, import_react41.createContext)({
17409
17470
  allExpanded: false,
17410
17471
  expandedHeadIds: EMPTY_IDS,
17411
17472
  toggle: /* @__PURE__ */ __name(() => {
17412
17473
  }, "toggle")
17413
17474
  });
17414
- var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
17475
+ var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react41.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
17415
17476
  var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
17416
17477
 
17417
17478
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
@@ -17425,14 +17486,14 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
17425
17486
  durationMs,
17426
17487
  onToggle
17427
17488
  }) => {
17428
- const ref = (0, import_react41.useRef)(null);
17429
- const pressRef = (0, import_react41.useRef)(null);
17489
+ const ref = (0, import_react42.useRef)(null);
17490
+ const pressRef = (0, import_react42.useRef)(null);
17430
17491
  const { rows: terminalHeight } = useTerminalSize();
17431
17492
  const settings = useSettings();
17432
- const clickable = !!settings.merged.ui?.useTerminalBuffer;
17493
+ const clickable = useVirtualViewport(settings.merged.ui?.useTerminalBuffer);
17433
17494
  const isActive = !isPending;
17434
17495
  useMouseEvents(
17435
- (0, import_react41.useCallback)(
17496
+ (0, import_react42.useCallback)(
17436
17497
  (event) => {
17437
17498
  if (!ref.current) return;
17438
17499
  if (event.name === "move") {
@@ -17535,7 +17596,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
17535
17596
  const resolvedThoughtExpanded = fullDetail || (thoughtExpanded ?? (allExpanded || expandedHeadIds.has(thoughtGroupHeadId)));
17536
17597
  const settings = useSettings();
17537
17598
  const showTimestamps = settings.merged.output?.showTimestamps === true;
17538
- const itemForDisplay = (0, import_react41.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
17599
+ const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
17539
17600
  const contentWidth = terminalWidth - 4;
17540
17601
  const boxWidth = mainAreaWidth || contentWidth;
17541
17602
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
@@ -17739,7 +17800,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
17739
17800
  itemForDisplay.id
17740
17801
  );
17741
17802
  }, "HistoryItemDisplayComponent");
17742
- var HistoryItemDisplay = (0, import_react41.memo)(HistoryItemDisplayComponent);
17803
+ var HistoryItemDisplay = (0, import_react42.memo)(HistoryItemDisplayComponent);
17743
17804
  HistoryItemDisplay.displayName = "HistoryItemDisplay";
17744
17805
 
17745
17806
  // packages/cli/src/ui/components/SessionPreview.tsx
@@ -17756,9 +17817,9 @@ function SessionPreview(props) {
17756
17817
  onResume
17757
17818
  } = props;
17758
17819
  const { columns } = useTerminalSize();
17759
- const [data, setData] = (0, import_react42.useState)(null);
17760
- const [error, setError] = (0, import_react42.useState)(null);
17761
- (0, import_react42.useEffect)(() => {
17820
+ const [data, setData] = (0, import_react43.useState)(null);
17821
+ const [error, setError] = (0, import_react43.useState)(null);
17822
+ (0, import_react43.useEffect)(() => {
17762
17823
  let cancelled = false;
17763
17824
  setData(null);
17764
17825
  setError(null);
@@ -17777,11 +17838,11 @@ function SessionPreview(props) {
17777
17838
  cancelled = true;
17778
17839
  };
17779
17840
  }, [sessionService, sessionId]);
17780
- const items = (0, import_react42.useMemo)(() => {
17841
+ const items = (0, import_react43.useMemo)(() => {
17781
17842
  if (!data) return [];
17782
17843
  return buildResumedHistoryItems(data, null);
17783
17844
  }, [data]);
17784
- const computedMessageCount = (0, import_react42.useMemo)(() => {
17845
+ const computedMessageCount = (0, import_react43.useMemo)(() => {
17785
17846
  if (!data) return void 0;
17786
17847
  const seen = /* @__PURE__ */ new Set();
17787
17848
  for (const msg of data.conversation.messages) {
@@ -18117,6 +18178,8 @@ export {
18117
18178
  Colors,
18118
18179
  keyMatchers,
18119
18180
  useSelectionList,
18181
+ VirtualViewportContext,
18182
+ useVirtualViewport,
18120
18183
  useMouseEvents,
18121
18184
  frameAnchor,
18122
18185
  measureElementPosition,