@qwen-code/qwen-code 0.19.3 → 0.19.4

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 (305) hide show
  1. package/bundled/loop/SKILL.md +22 -3
  2. package/bundled/loop/SKILL.test.ts +20 -0
  3. package/bundled/loop/autonomous-loop.test.ts +59 -0
  4. package/bundled/loop/autonomous-loop.ts +102 -0
  5. package/bundled/loop/loop-task-file.test.ts +1064 -0
  6. package/bundled/loop/loop-task-file.ts +404 -0
  7. package/bundled/loop/loop-tick-resolver.test.ts +906 -0
  8. package/bundled/loop/loop-tick-resolver.ts +416 -0
  9. package/bundled/qc-helper/SKILL.md +12 -5
  10. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  11. package/bundled/qc-helper/docs/configuration/settings.md +40 -26
  12. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  13. package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
  14. package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
  15. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -1
  16. package/bundled/qc-helper/docs/features/code-review.md +17 -61
  17. package/bundled/qc-helper/docs/features/commands.md +6 -6
  18. package/bundled/qc-helper/docs/features/hooks.md +6 -1
  19. package/bundled/qc-helper/docs/features/mcp.md +3 -1
  20. package/bundled/qc-helper/docs/features/memory.md +1 -1
  21. package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
  22. package/bundled/qc-helper/docs/features/status-line.md +3 -3
  23. package/bundled/qc-helper/docs/ide-integration/ide-integration.md +4 -4
  24. package/bundled/qc-helper/docs/qwen-serve.md +19 -0
  25. package/bundled/qc-helper/docs/support/troubleshooting.md +6 -0
  26. package/bundled/review/DESIGN.md +21 -26
  27. package/bundled/review/SKILL.md +45 -129
  28. package/chunks/MaxSizedBox-ERTNFI22.js +68 -0
  29. package/chunks/{StandaloneSessionPicker-Z52JTYST.js → StandaloneSessionPicker-Y5NGRLRY.js} +48 -42
  30. package/chunks/{acpAgent-7RZUOWOM.js → acpAgent-UMN6OYTR.js} +1319 -361
  31. package/chunks/{agent-4FG7WTHJ.js → agent-56DZU4ZU.js} +30 -25
  32. package/chunks/agent-headless-SR7N2IJG.js +61 -0
  33. package/chunks/{anthropicContentGenerator-PFITVL7Y.js → anthropicContentGenerator-5OZFO6WQ.js} +11 -8
  34. package/chunks/{artifact-tool-D2X7G3C3.js → artifact-tool-JVZMHA4B.js} +3 -3
  35. package/chunks/{askUserQuestion-UGETICJQ.js → askUserQuestion-CMJZ2F3D.js} +2 -2
  36. package/chunks/bridge-AUHNFOUS.js +72 -0
  37. package/chunks/{ca-IUFWESZL.js → ca-RYOETBUW.js} +9 -9
  38. package/chunks/channel-worker-supervisor-A74FV522.js +308 -0
  39. package/chunks/{chunk-T4T2FNV4.js → chunk-2X2JUE47.js} +2 -2
  40. package/chunks/{chunk-BX5YO7UW.js → chunk-4VZH35PN.js} +540 -370
  41. package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
  42. package/chunks/chunk-5P5XGNYH.js +93 -0
  43. package/chunks/{chunk-QWFNTRH4.js → chunk-6AQR7732.js} +1 -1
  44. package/chunks/{chunk-HZT4UCFB.js → chunk-6CIIP6OE.js} +4 -4
  45. package/chunks/{chunk-ADCIHOQZ.js → chunk-6TLY5W3B.js} +16 -8
  46. package/chunks/{chunk-BXSHL2SF.js → chunk-73H73ASU.js} +1 -1
  47. package/chunks/{chunk-3TV3HUWZ.js → chunk-75X2VLSH.js} +60 -30
  48. package/chunks/{chunk-6V4NZFUS.js → chunk-7KPI4LAI.js} +5 -5
  49. package/chunks/{chunk-PDE7CSDS.js → chunk-7VPC7D7O.js} +2 -2
  50. package/chunks/chunk-AHNXYU4O.js +24 -0
  51. package/chunks/{chunk-UX4SGCGN.js → chunk-AVQDCKNF.js} +96 -22
  52. package/chunks/{chunk-HYCC3XM3.js → chunk-B236XPGF.js} +1 -1
  53. package/chunks/{chunk-N4EJFBN5.js → chunk-B7KGXIPZ.js} +419 -262
  54. package/chunks/{chunk-YAINVQ3Q.js → chunk-BFG6OZN7.js} +17392 -16335
  55. package/chunks/{chunk-5DWXLGOM.js → chunk-BJBWRCSK.js} +1 -1
  56. package/chunks/{chunk-BTLJ2MF5.js → chunk-BNJLLAQ7.js} +3 -3
  57. package/chunks/{chunk-UYT3MWEB.js → chunk-BQNJBEUA.js} +16 -2
  58. package/chunks/{chunk-SKQZZVAV.js → chunk-BZHLWC6T.js} +2 -2
  59. package/chunks/{chunk-HPZTOP4I.js → chunk-C2IHHGBZ.js} +131 -21
  60. package/chunks/chunk-CG7SVARK.js +367 -0
  61. package/chunks/{chunk-CNLEDYE3.js → chunk-CS5XYDBO.js} +5 -5
  62. package/chunks/{chunk-O75BHFQW.js → chunk-CUGEBAKG.js} +2 -2
  63. package/chunks/{chunk-U3KSMM7G.js → chunk-D5KISTLW.js} +339 -383
  64. package/chunks/{chunk-STUWFKGD.js → chunk-DQ74W65K.js} +431 -535
  65. package/chunks/{chunk-VVLOGDB6.js → chunk-DX3TKXNT.js} +2 -2
  66. package/chunks/chunk-E5A7LHNN.js +51 -0
  67. package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
  68. package/chunks/chunk-EDAGQADF.js +21 -0
  69. package/chunks/{chunk-QBZ22PQX.js → chunk-EWALXUAD.js} +3 -1
  70. package/chunks/{chunk-4QK3O43S.js → chunk-FNLXLI4I.js} +4 -4
  71. package/chunks/{chunk-I2LYBGNI.js → chunk-FYKX6XOT.js} +1 -1
  72. package/chunks/{chunk-QLDPRILK.js → chunk-G7OQ3RFJ.js} +3 -3
  73. package/chunks/{chunk-R2BXK7SX.js → chunk-GHOTR7HL.js} +6 -1
  74. package/chunks/{chunk-L7OKCI7T.js → chunk-GICCHL2Q.js} +15 -1
  75. package/chunks/{chunk-KMGMKW5Q.js → chunk-GLPV75ES.js} +9 -3
  76. package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
  77. package/chunks/chunk-HI55Z6PR.js +3523 -0
  78. package/chunks/{chunk-QNKBEJO2.js → chunk-HJDF3ZVU.js} +2776 -1289
  79. package/chunks/{chunk-JJXWTVSK.js → chunk-HRZB5CSC.js} +34 -1
  80. package/chunks/{chunk-I4H7PRWQ.js → chunk-HTWHAN44.js} +1 -1
  81. package/chunks/{chunk-EJYJYJZ2.js → chunk-IRJWHZWU.js} +3 -70
  82. package/chunks/{chunk-CKQA6AWF.js → chunk-J3F7X3LW.js} +1 -1
  83. package/chunks/{chunk-QI7GOGJR.js → chunk-KKQWC6WS.js} +1 -1
  84. package/chunks/{chunk-VBZ452JT.js → chunk-KVPFPC4J.js} +494 -114
  85. package/chunks/{chunk-NDOC6M5S.js → chunk-L7QPM2YD.js} +2 -2
  86. package/chunks/{chunk-SLNKLLEO.js → chunk-L7VH7HQA.js} +12 -8
  87. package/chunks/{chunk-BVSVIN45.js → chunk-LKWAVAB5.js} +3 -3
  88. package/chunks/{chunk-ZP6UKOPB.js → chunk-LWGLBVWA.js} +1 -1
  89. package/chunks/{chunk-SBBN4BWR.js → chunk-MEQWZGK5.js} +1 -1
  90. package/chunks/{chunk-FKAVULLM.js → chunk-MKHC4BYZ.js} +58 -10
  91. package/chunks/{chunk-UFLGERMB.js → chunk-MNDTD5E5.js} +178 -124
  92. package/chunks/{chunk-RD6YJJJ6.js → chunk-MOUXUCXQ.js} +1 -1
  93. package/chunks/{chunk-EDMZZFDU.js → chunk-MVZXZWGT.js} +905 -795
  94. package/chunks/chunk-MX2YXRER.js +44 -0
  95. package/chunks/{chunk-JVHEVCAU.js → chunk-ND25GXEU.js} +23 -6
  96. package/chunks/chunk-NIOPRZNN.js +27 -0
  97. package/chunks/{chunk-DDMOU62Q.js → chunk-NPQWQYU6.js} +1 -1
  98. package/chunks/{chunk-PR32FRT6.js → chunk-OAFUMTWW.js} +3 -3
  99. package/chunks/chunk-OJCECIJA.js +238 -0
  100. package/chunks/{chunk-GGBIN5K7.js → chunk-PIYV6COW.js} +1 -1
  101. package/chunks/{chunk-CF6BB3LT.js → chunk-PPFWEV7G.js} +10 -1
  102. package/chunks/{chunk-4LUZAKMK.js → chunk-Q7VHIRDD.js} +1 -1
  103. package/chunks/{chunk-ODLIHNOY.js → chunk-QAFQLTXG.js} +1 -1
  104. package/chunks/{chunk-Y6YMRS3U.js → chunk-QMIND2AS.js} +3 -3
  105. package/chunks/{chunk-XJYUPHRC.js → chunk-QOMAHFYI.js} +3 -3
  106. package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
  107. package/chunks/chunk-RM3PGSGL.js +66 -0
  108. package/chunks/chunk-RNBYOUGV.js +42 -0
  109. package/chunks/chunk-S5EQPDTM.js +91 -0
  110. package/chunks/chunk-SEZC2725.js +36 -0
  111. package/chunks/{chunk-FNJ7BDPH.js → chunk-SFN4TEHY.js} +10 -7
  112. package/chunks/{chunk-O2VBQ3Y2.js → chunk-SJBIFVD2.js} +2 -2
  113. package/chunks/chunk-SYCJMSIJ.js +82 -0
  114. package/chunks/{chunk-JE5FVRPC.js → chunk-T22H4V4R.js} +48 -23
  115. package/chunks/{chunk-3227DZO4.js → chunk-T42ACHFI.js} +1 -1
  116. package/chunks/{chunk-UO5GVXQE.js → chunk-TENOUWY2.js} +3 -3
  117. package/chunks/{chunk-JOLIREYR.js → chunk-TOAUDIS7.js} +1 -1
  118. package/chunks/{chunk-J7FA27RO.js → chunk-TTFNVEO5.js} +3 -3
  119. package/chunks/{chunk-S7AKE7HL.js → chunk-UANCYOOQ.js} +63 -9
  120. package/chunks/{chunk-BUUQ5HPX.js → chunk-UQFP2FEF.js} +1 -1
  121. package/chunks/{chunk-R5OP2ATH.js → chunk-UQYOMM6J.js} +11 -11
  122. package/chunks/{chunk-J33ZR6OJ.js → chunk-UT5JU5DJ.js} +16 -16
  123. package/chunks/{chunk-QE6KJYLT.js → chunk-VKGG724L.js} +122 -25
  124. package/chunks/{chunk-SMXULRAN.js → chunk-VXGPYF7U.js} +1 -1
  125. package/chunks/{chunk-MNF6S5PR.js → chunk-W2ZOAX7F.js} +4 -4
  126. package/chunks/{chunk-GT2FGICD.js → chunk-W6X4FGWX.js} +1 -1
  127. package/chunks/{chunk-SMYQZVZ3.js → chunk-XCUFHOAD.js} +1 -1
  128. package/chunks/{chunk-K5XU6E4T.js → chunk-XKSCTXPK.js} +2 -2
  129. package/chunks/{chunk-FXKVLFFY.js → chunk-YBDZ63KI.js} +3 -3
  130. package/chunks/{chunk-BKXBARJZ.js → chunk-YPCPZSZB.js} +1 -1
  131. package/chunks/chunk-YTFBURQD.js +313 -0
  132. package/chunks/{chunk-NL4C3H6C.js → chunk-YXK4GPYO.js} +1 -1
  133. package/chunks/{chunk-F3ZYSEY6.js → chunk-ZJP5T7IA.js} +3 -3
  134. package/chunks/{chunk-RYLJU2DY.js → chunk-ZN5T4BHI.js} +1 -1
  135. package/chunks/{chunk-RRFZXMYP.js → chunk-ZXCVPMIK.js} +553 -138
  136. package/chunks/{computer-use-JGB36FDW.js → computer-use-VWN5HH6A.js} +33 -28
  137. package/chunks/contextCommand-DFFG5KDJ.js +66 -0
  138. package/chunks/{cron-create-SKEY55RG.js → cron-create-CSSWJ67I.js} +4 -4
  139. package/chunks/{cron-delete-I3NAT32Z.js → cron-delete-E56CFQ7A.js} +4 -4
  140. package/chunks/{cron-list-6XRRL6TH.js → cron-list-BKSINY6Y.js} +4 -4
  141. package/chunks/daemon-5T6IHWJV.js +8430 -0
  142. package/chunks/daemon-status-provider-V5UY7O7J.js +70 -0
  143. package/chunks/{de-EOW5PVHF.js → de-HB5NJXGB.js} +9 -9
  144. package/chunks/{dist-NHEYYB2B.js → dist-2HDL5SHQ.js} +2 -2
  145. package/chunks/{dist-663NZ6MI.js → dist-B7SSDVWT.js} +116 -11
  146. package/chunks/{dist-PQPZ5Q4N.js → dist-BL3SL665.js} +20 -9
  147. package/chunks/{dist-J37VXPLD.js → dist-TAVAGZU6.js} +40 -15
  148. package/chunks/{dist-LB6OGPVM.js → dist-XBOVZ3R5.js} +26 -5
  149. package/chunks/{earlyInputCapture-44RISVVJ.js → earlyInputCapture-VVYU4FDO.js} +31 -26
  150. package/chunks/{edit-NN6GM5DT.js → edit-F35PTMBA.js} +35 -29
  151. package/chunks/{en-HPWEJBTR.js → en-FZREZFPO.js} +30 -10
  152. package/chunks/{enter-worktree-PB3O2C7D.js → enter-worktree-3DIW7EGJ.js} +30 -25
  153. package/chunks/{enterPlanMode-YQFNNSUA.js → enterPlanMode-QNXT77KP.js} +40 -25
  154. package/chunks/{errors-LS7XU5DZ.js → errors-M53YG76R.js} +32 -27
  155. package/chunks/{exit-worktree-E2FTNSBK.js → exit-worktree-BSDWNWHZ.js} +30 -25
  156. package/chunks/{exitPlanMode-GLYK2BUB.js → exitPlanMode-EL7AY327.js} +54 -33
  157. package/chunks/{fast-path-WQ6M7LI7.js → fast-path-DUCSMUFW.js} +30 -13
  158. package/chunks/{fast-path-settings-OAGU3X5H.js → fast-path-settings-UQLRFDQP.js} +2 -2
  159. package/chunks/{fr-BN5NKSAC.js → fr-XY3NQFCM.js} +9 -9
  160. package/chunks/{gemini-2YFLVA2M.js → gemini-F3IERB37.js} +80 -67
  161. package/chunks/{geminiContentGenerator-XV6SV6CD.js → geminiContentGenerator-6OULAKFQ.js} +4 -4
  162. package/chunks/{glob-2H6CDDMK.js → glob-ZMLFTD4T.js} +30 -25
  163. package/chunks/{grep-VXIUXM3C.js → grep-H5X66EI7.js} +30 -25
  164. package/chunks/initializer-LEOT2OLH.js +66 -0
  165. package/chunks/{ja-7DEUB2TS.js → ja-J7YAG7SA.js} +9 -9
  166. package/chunks/{keychain-token-storage-YLMDLKXT.js → keychain-token-storage-GPAKRDKQ.js} +2 -2
  167. package/chunks/list-M3DKXML6.js +70 -0
  168. package/chunks/loadedSettingsAdapter-OKMQFGGG.js +65 -0
  169. package/chunks/{loop-wakeup-CITGGQHA.js → loop-wakeup-FPBAVVPR.js} +5 -5
  170. package/chunks/{ls-R5WP4BGZ.js → ls-UGWQXPTY.js} +4 -4
  171. package/chunks/{lsp-GSICJMMW.js → lsp-24WV7NXB.js} +2 -2
  172. package/chunks/{monitor-HKLRS2HQ.js → monitor-ARL5P45R.js} +32 -26
  173. package/chunks/nonInteractiveCli-NUVLF3YR.js +108 -0
  174. package/chunks/{notebook-edit-Y6SKSGTT.js → notebook-edit-ANTZ2DDY.js} +31 -26
  175. package/chunks/{openaiContentGenerator-J7G2FYJT.js → openaiContentGenerator-TFGMKGHN.js} +15 -13
  176. package/chunks/pidfile-AWTL4C63.js +72 -0
  177. package/chunks/{pt-TNZRNLQB.js → pt-6RTAA6SS.js} +9 -9
  178. package/chunks/{qwenContentGenerator-5XIEM5GV.js → qwenContentGenerator-6QWAYTWS.js} +32 -27
  179. package/chunks/{qwenOAuth2-AG3PFFLZ.js → qwenOAuth2-LWLA6MQG.js} +5 -4
  180. package/chunks/{read-file-J7D552ZJ.js → read-file-EJY73XQ3.js} +11 -10
  181. package/chunks/{read-mcp-resource-DQQW7H7T.js → read-mcp-resource-NCBTPP7X.js} +2 -2
  182. package/chunks/ripGrep-HC4SA6CQ.js +59 -0
  183. package/chunks/{ru-NIAUBKCN.js → ru-AUBGJ2C4.js} +9 -9
  184. package/chunks/{run-qwen-serve-SGEEVMXD.js → run-qwen-serve-AGLZ642J.js} +454 -94
  185. package/chunks/{scheduler-7CQI3S4Q.js → scheduler-TURO7NGY.js} +30 -25
  186. package/chunks/{send-message-EE4TWKVU.js → send-message-3S2NYS3O.js} +6 -4
  187. package/chunks/serve-5DAMOIDW.js +70 -0
  188. package/chunks/{server-4QMUWXPW.js → server-4AGEK2HC.js} +4098 -1173
  189. package/chunks/{session-NRO7UFOY.js → session-7ZOQUC4Y.js} +204 -64
  190. package/chunks/{settings-SGWRDQSC.js → settings-DR4V6L5Y.js} +34 -29
  191. package/chunks/{shell-62ANGIHL.js → shell-H5WFKUXH.js} +30 -25
  192. package/chunks/{skill-VWAQAWW6.js → skill-ANHU5ZCR.js} +13 -12
  193. package/chunks/spawnChannel-VN5LJV7Z.js +68 -0
  194. package/chunks/{src-KUV5J5Q2.js → src-OVZLTVVM.js} +114 -30
  195. package/chunks/{startInteractiveUI-6EYJN3JV.js → startInteractiveUI-OA22V32P.js} +15970 -15430
  196. package/chunks/{syntheticOutput-T5YHQ6S2.js → syntheticOutput-SV7GBHZ5.js} +3 -3
  197. package/chunks/{task-create-BLY7RHXX.js → task-create-W2H2UJCH.js} +8 -7
  198. package/chunks/{task-list-3QUYNVYR.js → task-list-THBOPV4G.js} +7 -6
  199. package/chunks/{task-stop-U4RATK2V.js → task-stop-33FVCNCJ.js} +2 -2
  200. package/chunks/{task-update-U54O7KJX.js → task-update-LVFQLXEI.js} +8 -7
  201. package/chunks/{team-create-LPOGCPM7.js → team-create-OYL5CAQO.js} +30 -25
  202. package/chunks/{team-delete-LKBYPASD.js → team-delete-NTUQ25UY.js} +7 -6
  203. package/chunks/theme-manager-XCMPF2SI.js +63 -0
  204. package/chunks/{todoWrite-OYXKTVYN.js → todoWrite-SEPO2RI3.js} +4 -4
  205. package/chunks/{tool-search-YPUFJ3ZQ.js → tool-search-YXW55X6Z.js} +36 -11
  206. package/chunks/{trustedFolders-5B24TMEA.js → trustedFolders-TEPGM5YL.js} +31 -26
  207. package/chunks/{validateNonInterActiveAuth-BTDTYOVT.js → validateNonInterActiveAuth-OQIS7WUE.js} +65 -55
  208. package/chunks/{web-fetch-EEB5LZYU.js → web-fetch-OE7LHURA.js} +5 -4
  209. package/chunks/{workflow-LAWIW5LI.js → workflow-RTUWORAP.js} +67 -39
  210. package/chunks/workspace-providers-status-DM2XANVB.js +67 -0
  211. package/chunks/workspace-service-VKBI2KZD.js +77 -0
  212. package/chunks/{write-file-PCV226DJ.js → write-file-WGALQ53L.js} +35 -30
  213. package/chunks/{zh-TW-TR3XYGE5.js → zh-TW-6GIKXEAN.js} +30 -10
  214. package/chunks/{zh-5EUYXASN.js → zh-V3B4TFWL.js} +30 -10
  215. package/cli.js +6 -6
  216. package/locales/ca.js +13 -13
  217. package/locales/de.js +13 -13
  218. package/locales/en.js +49 -15
  219. package/locales/fr.js +13 -14
  220. package/locales/ja.js +13 -14
  221. package/locales/pt.js +13 -13
  222. package/locales/ru.js +13 -13
  223. package/locales/zh-TW.js +47 -14
  224. package/locales/zh.js +47 -14
  225. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  226. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  227. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  228. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  229. package/package.json +15 -6
  230. package/patches/chrome-devtools-mcp+1.4.0.patch +31 -0
  231. package/postinstall.js +50 -0
  232. package/web-shell/assets/{arc-DA7r8Ueo.js → arc-Det5Ccum.js} +1 -1
  233. package/web-shell/assets/{architectureDiagram-3BPJPVTR-ZDUxPtZ2.js → architectureDiagram-3BPJPVTR-DqNWVFpl.js} +1 -1
  234. package/web-shell/assets/{blockDiagram-GPEHLZMM-vrtOf1kJ.js → blockDiagram-GPEHLZMM-CYl7tYBi.js} +1 -1
  235. package/web-shell/assets/{c4Diagram-AAUBKEIU-BHFjzIi4.js → c4Diagram-AAUBKEIU-DaAEi0NQ.js} +1 -1
  236. package/web-shell/assets/channel-Bm0bFauD.js +1 -0
  237. package/web-shell/assets/{chunk-2J33WTMH-mdeQVz59.js → chunk-2J33WTMH-Df2CDEE2.js} +1 -1
  238. package/web-shell/assets/{chunk-4BX2VUAB-BkKMlwBX.js → chunk-4BX2VUAB-DNBFcyL2.js} +1 -1
  239. package/web-shell/assets/{chunk-55IACEB6-B7bnXNfu.js → chunk-55IACEB6-BKjF-0HI.js} +1 -1
  240. package/web-shell/assets/{chunk-727SXJPM-DGz8Mm6i.js → chunk-727SXJPM-DYwAwfIM.js} +1 -1
  241. package/web-shell/assets/{chunk-AQP2D5EJ-BQAydUNk.js → chunk-AQP2D5EJ-C6FswLqy.js} +1 -1
  242. package/web-shell/assets/{chunk-FMBD7UC4-GHr2LN_p.js → chunk-FMBD7UC4-DRWAcZSY.js} +1 -1
  243. package/web-shell/assets/{chunk-ND2GUHAM-7R91lnUx.js → chunk-ND2GUHAM-AoL16mNR.js} +1 -1
  244. package/web-shell/assets/{chunk-QZHKN3VN-aTJD3lSQ.js → chunk-QZHKN3VN-a8PtLMck.js} +1 -1
  245. package/web-shell/assets/classDiagram-4FO5ZUOK--NgUfb55.js +1 -0
  246. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--NgUfb55.js +1 -0
  247. package/web-shell/assets/{cose-bilkent-S5V4N54A-BTf8t1RL.js → cose-bilkent-S5V4N54A-C4Aeu5qf.js} +1 -1
  248. package/web-shell/assets/{dagre-BM42HDAG-_sgp3WuA.js → dagre-BM42HDAG-BOulamjo.js} +1 -1
  249. package/web-shell/assets/{diagram-2AECGRRQ-CROtRy1w.js → diagram-2AECGRRQ-D1wt2ykO.js} +1 -1
  250. package/web-shell/assets/{diagram-5GNKFQAL-BqGRzwSc.js → diagram-5GNKFQAL-BRseus-O.js} +1 -1
  251. package/web-shell/assets/{diagram-KO2AKTUF-CMrcEtA7.js → diagram-KO2AKTUF-XSMkNzpZ.js} +1 -1
  252. package/web-shell/assets/{diagram-LMA3HP47-BRydGNW5.js → diagram-LMA3HP47-21KNLqoi.js} +1 -1
  253. package/web-shell/assets/{diagram-OG6HWLK6-D0ilgNjV.js → diagram-OG6HWLK6-DnUI8F5G.js} +1 -1
  254. package/web-shell/assets/{erDiagram-TEJ5UH35-2lnQeJUM.js → erDiagram-TEJ5UH35-BVSOMuM2.js} +1 -1
  255. package/web-shell/assets/{flowDiagram-I6XJVG4X-C_ZMdQiC.js → flowDiagram-I6XJVG4X-fYtDPJsW.js} +1 -1
  256. package/web-shell/assets/{ganttDiagram-6RSMTGT7-Dw9V_Ny0.js → ganttDiagram-6RSMTGT7-CmRXosW_.js} +1 -1
  257. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-HDXI-F1B.js → gitGraphDiagram-PVQCEYII-DPrmySxO.js} +1 -1
  258. package/web-shell/assets/index-BpKnmyFV.js +717 -0
  259. package/web-shell/assets/index-fLrtxpOG.css +5 -0
  260. package/web-shell/assets/{infoDiagram-5YYISTIA-CuB8Ebua.js → infoDiagram-5YYISTIA-x3VbEuCV.js} +1 -1
  261. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D_tyhVwh.js → ishikawaDiagram-YF4QCWOH-SmitHRMC.js} +1 -1
  262. package/web-shell/assets/{journeyDiagram-JHISSGLW-CgCwJQNU.js → journeyDiagram-JHISSGLW-BxvA551S.js} +1 -1
  263. package/web-shell/assets/{kanban-definition-UN3LZRKU-PZUtcbPx.js → kanban-definition-UN3LZRKU-DNHC16jY.js} +1 -1
  264. package/web-shell/assets/{linear-CZqRdJIU.js → linear-CQ6irBL9.js} +1 -1
  265. package/web-shell/assets/{mermaid.core-CPW_4UEF.js → mermaid.core-DtB6NO1e.js} +72 -72
  266. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D_Y75ID7.js → mindmap-definition-RKZ34NQL-QKMAgV2v.js} +1 -1
  267. package/web-shell/assets/{pieDiagram-4H26LBE5-Q4dTyLeF.js → pieDiagram-4H26LBE5-bvb6dGn6.js} +1 -1
  268. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-ckw329Ft.js → quadrantDiagram-W4KKPZXB-DLgdlG4D.js} +1 -1
  269. package/web-shell/assets/{requirementDiagram-4Y6WPE33-DbVDm4It.js → requirementDiagram-4Y6WPE33-2M9YH4GF.js} +1 -1
  270. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CHuZ_ecH.js → sankeyDiagram-5OEKKPKP-DzwfclTH.js} +1 -1
  271. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DU2YSpq-.js → sequenceDiagram-3UESZ5HK-BvPmTuy2.js} +1 -1
  272. package/web-shell/assets/{stateDiagram-AJRCARHV-CA9PEBUo.js → stateDiagram-AJRCARHV-BjwUmrJF.js} +1 -1
  273. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C4L8zXeL.js +1 -0
  274. package/web-shell/assets/{timeline-definition-PNZ67QCA-Bhlo4WVc.js → timeline-definition-PNZ67QCA-CXzS6qqz.js} +1 -1
  275. package/web-shell/assets/{vennDiagram-CIIHVFJN-6xtPLsyl.js → vennDiagram-CIIHVFJN-yRSolF5B.js} +1 -1
  276. package/web-shell/assets/{wardley-L42UT6IY-3eozmXPf.js → wardley-L42UT6IY-ClLJjHPG.js} +1 -1
  277. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BOn6hKss.js → wardleyDiagram-YWT4CUSO-VIa6t2p2.js} +1 -1
  278. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BsP4-I_y.js → xychartDiagram-2RQKCTM6-CtmrkezW.js} +1 -1
  279. package/web-shell/index.html +18 -2
  280. package/chunks/MaxSizedBox-QNF3EIGU.js +0 -63
  281. package/chunks/agent-headless-RQ5BTX3G.js +0 -56
  282. package/chunks/bridge-JL2PMCIW.js +0 -66
  283. package/chunks/chunk-5GOVVXEV.js +0 -73
  284. package/chunks/chunk-BC3C4F3Q.js +0 -40
  285. package/chunks/chunk-BW4KCQFD.js +0 -1103
  286. package/chunks/chunk-RKIZXJMB.js +0 -13
  287. package/chunks/contextCommand-WYU6OQ2F.js +0 -61
  288. package/chunks/daemon-status-provider-HH2EC5FI.js +0 -65
  289. package/chunks/headlessSafetyWarnings-TBE35GJ4.js +0 -55
  290. package/chunks/initializer-2Y7SLOKV.js +0 -61
  291. package/chunks/list-ZAFHZ7OS.js +0 -65
  292. package/chunks/loadedSettingsAdapter-6KJXD6M3.js +0 -60
  293. package/chunks/nonInteractiveCli-5W4GIZQM.js +0 -96
  294. package/chunks/ripGrep-IEIFIWP4.js +0 -54
  295. package/chunks/serve-V6GVZR6U.js +0 -65
  296. package/chunks/spawnChannel-3VHW5EPY.js +0 -63
  297. package/chunks/theme-manager-LYLGAERF.js +0 -58
  298. package/chunks/workspace-providers-status-PIAFVYHA.js +0 -62
  299. package/chunks/workspace-service-YAIOD4HG.js +0 -71
  300. package/web-shell/assets/channel-iRo68q4Q.js +0 -1
  301. package/web-shell/assets/classDiagram-4FO5ZUOK-iHF24a8X.js +0 -1
  302. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-iHF24a8X.js +0 -1
  303. package/web-shell/assets/index-CHmzAWys.css +0 -5
  304. package/web-shell/assets/index-w6GTOHh1.js +0 -713
  305. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-t1LRI0oY.js +0 -1
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  relaunchApp
5
- } from "./chunk-QWFNTRH4.js";
5
+ } from "./chunk-6AQR7732.js";
6
6
  import {
7
7
  SHELL_COMMAND_NAME,
8
8
  SHELL_NAME,
@@ -13,10 +13,16 @@ import {
13
13
  getCommandSourceGroup,
14
14
  getCommandSubcommandNames,
15
15
  useSessionStats
16
- } from "./chunk-J7FA27RO.js";
16
+ } from "./chunk-TTFNVEO5.js";
17
17
  import {
18
- Colors
19
- } from "./chunk-5GOVVXEV.js";
18
+ Colors,
19
+ RowMouseController,
20
+ SettingsContext,
21
+ measureElementPosition,
22
+ useMouseEvents,
23
+ useSettings,
24
+ useTerminalSize
25
+ } from "./chunk-CG7SVARK.js";
20
26
  import {
21
27
  buildResumedHistoryItems,
22
28
  calculateAverageLatency,
@@ -25,23 +31,20 @@ import {
25
31
  calculateErrorRate,
26
32
  computeDiffColumnWidths,
27
33
  computeSessionStats,
28
- disableMouseEvents,
29
- enableMouseEvents,
30
34
  getSystemInfoFields,
31
35
  useKeypress,
32
- useKeypressContext,
33
36
  wrapForMultiplexer
34
- } from "./chunk-3TV3HUWZ.js";
37
+ } from "./chunk-75X2VLSH.js";
35
38
  import {
36
39
  isTerminalGoalStatusKind
37
40
  } from "./chunk-KSPVDFE4.js";
38
41
  import {
39
42
  MINIMUM_MAX_HEIGHT,
40
43
  MaxSizedBox
41
- } from "./chunk-4QK3O43S.js";
44
+ } from "./chunk-FNLXLI4I.js";
42
45
  import {
43
46
  theme
44
- } from "./chunk-SMXULRAN.js";
47
+ } from "./chunk-VXGPYF7U.js";
45
48
  import {
46
49
  Box_default,
47
50
  Static,
@@ -49,23 +52,22 @@ import {
49
52
  Transform,
50
53
  require_jsx_runtime,
51
54
  use_is_screen_reader_enabled_default,
52
- use_stdin_default,
53
- use_stdout_default
54
- } from "./chunk-T4T2FNV4.js";
55
+ use_stdin_default
56
+ } from "./chunk-2X2JUE47.js";
55
57
  import {
56
58
  require_react
57
59
  } from "./chunk-KYMBIKIW.js";
58
60
  import {
59
61
  resolveColor,
60
62
  themeManager
61
- } from "./chunk-I4H7PRWQ.js";
63
+ } from "./chunk-HTWHAN44.js";
62
64
  import {
63
65
  require_has_flag,
64
66
  require_source
65
67
  } from "./chunk-3GONHQOA.js";
66
68
  import {
67
69
  createLoadedSettingsAdapter
68
- } from "./chunk-BXSHL2SF.js";
70
+ } from "./chunk-73H73ASU.js";
69
71
  import {
70
72
  cpLen,
71
73
  cpSlice,
@@ -75,8 +77,9 @@ import {
75
77
  sanitizeSensitiveText,
76
78
  stringWidth,
77
79
  stripUnsafeCharacters,
78
- toCodePoints
79
- } from "./chunk-JJXWTVSK.js";
80
+ toCodePoints,
81
+ wrapToVisualLines
82
+ } from "./chunk-HRZB5CSC.js";
80
83
  import {
81
84
  formatDuration,
82
85
  formatMemoryUsage,
@@ -85,15 +88,15 @@ import {
85
88
  } from "./chunk-KHDZHZMH.js";
86
89
  import {
87
90
  getPersistScopeForModelSelection
88
- } from "./chunk-FKAVULLM.js";
91
+ } from "./chunk-MKHC4BYZ.js";
89
92
  import {
90
93
  getCurrentLanguage,
91
94
  localizeToolDisplayName,
92
95
  t
93
- } from "./chunk-R5OP2ATH.js";
96
+ } from "./chunk-UQYOMM6J.js";
94
97
  import {
95
98
  isWorkspaceTrusted
96
- } from "./chunk-F3ZYSEY6.js";
99
+ } from "./chunk-ZJP5T7IA.js";
97
100
  import {
98
101
  ALL_PROVIDERS,
99
102
  IdeClient,
@@ -114,20 +117,20 @@ import {
114
117
  resolveMetadataKey,
115
118
  resolveOwnsModel,
116
119
  stripAnsi
117
- } from "./chunk-YAINVQ3Q.js";
120
+ } from "./chunk-BFG6OZN7.js";
118
121
  import {
119
122
  MAIN_SOURCE,
120
123
  getMCPServerStatus
121
- } from "./chunk-QNKBEJO2.js";
124
+ } from "./chunk-HJDF3ZVU.js";
122
125
  import {
123
126
  ToolDisplayNames,
124
127
  ToolNames
125
- } from "./chunk-BX5YO7UW.js";
128
+ } from "./chunk-4VZH35PN.js";
126
129
  import {
127
130
  createDebugLogger,
128
131
  escapePath,
129
132
  unescapePath
130
- } from "./chunk-UX4SGCGN.js";
133
+ } from "./chunk-AVQDCKNF.js";
131
134
  import {
132
135
  init_esbuild_shims
133
136
  } from "./chunk-A4BMJM77.js";
@@ -3477,26 +3480,12 @@ var useConfig = /* @__PURE__ */ __name(() => {
3477
3480
  return context;
3478
3481
  }, "useConfig");
3479
3482
 
3480
- // packages/cli/src/ui/contexts/SettingsContext.tsx
3481
- init_esbuild_shims();
3482
- var import_react2 = __toESM(require_react(), 1);
3483
- var SettingsContext = import_react2.default.createContext(
3484
- void 0
3485
- );
3486
- var useSettings = /* @__PURE__ */ __name(() => {
3487
- const context = (0, import_react2.useContext)(SettingsContext);
3488
- if (context === void 0) {
3489
- throw new Error("useSettings must be used within a SettingsProvider");
3490
- }
3491
- return context;
3492
- }, "useSettings");
3493
-
3494
3483
  // packages/cli/src/ui/components/SessionPicker.tsx
3495
3484
  init_esbuild_shims();
3496
3485
 
3497
3486
  // packages/cli/src/ui/hooks/useSessionPicker.ts
3498
3487
  init_esbuild_shims();
3499
- var import_react4 = __toESM(require_react(), 1);
3488
+ var import_react3 = __toESM(require_react(), 1);
3500
3489
 
3501
3490
  // packages/cli/src/ui/utils/sessionPickerUtils.ts
3502
3491
  init_esbuild_shims();
@@ -3563,7 +3552,7 @@ __name(formatMessageCount, "formatMessageCount");
3563
3552
 
3564
3553
  // packages/cli/src/ui/hooks/useSessionSearchInput.ts
3565
3554
  init_esbuild_shims();
3566
- var import_react3 = __toESM(require_react(), 1);
3555
+ var import_react2 = __toESM(require_react(), 1);
3567
3556
  var DELETION_KEY_NAMES = /* @__PURE__ */ new Set(["backspace", "delete"]);
3568
3557
  var graphemeSegmenter2 = new Intl.Segmenter(void 0, {
3569
3558
  granularity: "grapheme"
@@ -3590,11 +3579,11 @@ function isPrintableSearchChar(key) {
3590
3579
  __name(isPrintableSearchChar, "isPrintableSearchChar");
3591
3580
  function useSessionSearchInput(options) {
3592
3581
  const { onExitToList } = options;
3593
- const [searchQuery, rawSetSearchQuery] = (0, import_react3.useState)("");
3594
- const searchQueryRef = (0, import_react3.useRef)("");
3595
- const onExitToListRef = (0, import_react3.useRef)(onExitToList);
3582
+ const [searchQuery, rawSetSearchQuery] = (0, import_react2.useState)("");
3583
+ const searchQueryRef = (0, import_react2.useRef)("");
3584
+ const onExitToListRef = (0, import_react2.useRef)(onExitToList);
3596
3585
  onExitToListRef.current = onExitToList;
3597
- const setSearchQuery = (0, import_react3.useCallback)(
3586
+ const setSearchQuery = (0, import_react2.useCallback)(
3598
3587
  (nextValue) => {
3599
3588
  const prev = searchQueryRef.current;
3600
3589
  const next = typeof nextValue === "function" ? nextValue(prev) : nextValue;
@@ -3606,7 +3595,7 @@ function useSessionSearchInput(options) {
3606
3595
  },
3607
3596
  []
3608
3597
  );
3609
- const handleSearchKey = (0, import_react3.useCallback)(
3598
+ const handleSearchKey = (0, import_react2.useCallback)(
3610
3599
  (key) => {
3611
3600
  const { name, sequence, ctrl } = key;
3612
3601
  if (name === "escape") {
@@ -3658,25 +3647,25 @@ function useSessionPicker({
3658
3647
  );
3659
3648
  }
3660
3649
  const hasInitialSessions = initialSessions !== void 0;
3661
- const [selectedIndex, setSelectedIndex] = (0, import_react4.useState)(0);
3662
- const [sessionState, setSessionState] = (0, import_react4.useState)(
3650
+ const [selectedIndex, setSelectedIndex] = (0, import_react3.useState)(0);
3651
+ const [sessionState, setSessionState] = (0, import_react3.useState)(
3663
3652
  hasInitialSessions ? { sessions: initialSessions, hasMore: false, nextCursor: void 0 } : { sessions: [], hasMore: true, nextCursor: void 0 }
3664
3653
  );
3665
- const [filterByBranch, setFilterByBranch] = (0, import_react4.useState)(false);
3666
- const [isLoading, setIsLoading] = (0, import_react4.useState)(!hasInitialSessions);
3667
- const [followScrollOffset, setFollowScrollOffset] = (0, import_react4.useState)(0);
3668
- const [viewMode, setViewMode] = (0, import_react4.useState)(
3654
+ const [filterByBranch, setFilterByBranch] = (0, import_react3.useState)(false);
3655
+ const [isLoading, setIsLoading] = (0, import_react3.useState)(!hasInitialSessions);
3656
+ const [followScrollOffset, setFollowScrollOffset] = (0, import_react3.useState)(0);
3657
+ const [viewMode, setViewMode] = (0, import_react3.useState)(
3669
3658
  "list"
3670
3659
  );
3671
- const [previewSessionId, setPreviewSessionId] = (0, import_react4.useState)(null);
3672
- const [checkedIds, setCheckedIds] = (0, import_react4.useState)(
3660
+ const [previewSessionId, setPreviewSessionId] = (0, import_react3.useState)(null);
3661
+ const [checkedIds, setCheckedIds] = (0, import_react3.useState)(
3673
3662
  () => /* @__PURE__ */ new Set()
3674
3663
  );
3675
- const disabledIdSet = (0, import_react4.useMemo)(
3664
+ const disabledIdSet = (0, import_react3.useMemo)(
3676
3665
  () => new Set(disabledIds ?? []),
3677
3666
  [disabledIds]
3678
3667
  );
3679
- const toggleChecked = (0, import_react4.useCallback)(
3668
+ const toggleChecked = (0, import_react3.useCallback)(
3680
3669
  (sessionId) => {
3681
3670
  if (disabledIdSet.has(sessionId)) return;
3682
3671
  setCheckedIds((prev) => {
@@ -3691,16 +3680,16 @@ function useSessionPicker({
3691
3680
  },
3692
3681
  [disabledIdSet]
3693
3682
  );
3694
- const exitPreview = (0, import_react4.useCallback)(() => {
3683
+ const exitPreview = (0, import_react3.useCallback)(() => {
3695
3684
  setViewMode("list");
3696
3685
  setPreviewSessionId(null);
3697
3686
  }, []);
3698
- const onExitToList = (0, import_react4.useCallback)(() => {
3687
+ const onExitToList = (0, import_react3.useCallback)(() => {
3699
3688
  setViewMode("list");
3700
3689
  }, []);
3701
3690
  const { searchQuery, setSearchQuery, handleSearchKey } = useSessionSearchInput({ onExitToList });
3702
- const isLoadingMoreRef = (0, import_react4.useRef)(false);
3703
- const filteredSessions = (0, import_react4.useMemo)(
3691
+ const isLoadingMoreRef = (0, import_react3.useRef)(false);
3692
+ const filteredSessions = (0, import_react3.useMemo)(
3704
3693
  () => filterSessions(
3705
3694
  sessionState.sessions,
3706
3695
  filterByBranch,
@@ -3709,7 +3698,7 @@ function useSessionPicker({
3709
3698
  ),
3710
3699
  [sessionState.sessions, filterByBranch, currentBranch, searchQuery]
3711
3700
  );
3712
- const scrollOffset = (0, import_react4.useMemo)(() => {
3701
+ const scrollOffset = (0, import_react3.useMemo)(() => {
3713
3702
  if (centerSelection) {
3714
3703
  if (filteredSessions.length <= maxVisibleItems) {
3715
3704
  return 0;
@@ -3728,13 +3717,13 @@ function useSessionPicker({
3728
3717
  maxVisibleItems,
3729
3718
  selectedIndex
3730
3719
  ]);
3731
- const visibleSessions = (0, import_react4.useMemo)(
3720
+ const visibleSessions = (0, import_react3.useMemo)(
3732
3721
  () => filteredSessions.slice(scrollOffset, scrollOffset + maxVisibleItems),
3733
3722
  [filteredSessions, maxVisibleItems, scrollOffset]
3734
3723
  );
3735
3724
  const showScrollUp = scrollOffset > 0;
3736
3725
  const showScrollDown = scrollOffset + maxVisibleItems < filteredSessions.length;
3737
- (0, import_react4.useEffect)(() => {
3726
+ (0, import_react3.useEffect)(() => {
3738
3727
  if (!sessionService || hasInitialSessions) {
3739
3728
  return;
3740
3729
  }
@@ -3754,7 +3743,7 @@ function useSessionPicker({
3754
3743
  }, "loadInitialSessions");
3755
3744
  void loadInitialSessions();
3756
3745
  }, [sessionService, hasInitialSessions]);
3757
- const loadMoreSessions = (0, import_react4.useCallback)(async () => {
3746
+ const loadMoreSessions = (0, import_react3.useCallback)(async () => {
3758
3747
  if (!sessionService || !sessionState.hasMore || isLoadingMoreRef.current) {
3759
3748
  return;
3760
3749
  }
@@ -3773,16 +3762,16 @@ function useSessionPicker({
3773
3762
  isLoadingMoreRef.current = false;
3774
3763
  }
3775
3764
  }, [sessionService, sessionState.hasMore, sessionState.nextCursor]);
3776
- (0, import_react4.useEffect)(() => {
3765
+ (0, import_react3.useEffect)(() => {
3777
3766
  setSelectedIndex(0);
3778
3767
  setFollowScrollOffset(0);
3779
3768
  }, [filterByBranch, searchQuery]);
3780
- (0, import_react4.useEffect)(() => {
3769
+ (0, import_react3.useEffect)(() => {
3781
3770
  if (selectedIndex >= filteredSessions.length && filteredSessions.length > 0) {
3782
3771
  setSelectedIndex(filteredSessions.length - 1);
3783
3772
  }
3784
3773
  }, [filteredSessions.length, selectedIndex]);
3785
- (0, import_react4.useEffect)(() => {
3774
+ (0, import_react3.useEffect)(() => {
3786
3775
  if (isLoading || !sessionState.hasMore || isLoadingMoreRef.current || !centerSelection) {
3787
3776
  return;
3788
3777
  }
@@ -3800,7 +3789,7 @@ function useSessionPicker({
3800
3789
  scrollOffset,
3801
3790
  sessionState.hasMore
3802
3791
  ]);
3803
- const moveSelection = (0, import_react4.useCallback)(
3792
+ const moveSelection = (0, import_react3.useCallback)(
3804
3793
  (delta) => {
3805
3794
  if (filteredSessions.length === 0) return;
3806
3795
  if (delta === -1) {
@@ -3958,49 +3947,24 @@ function useSessionPicker({
3958
3947
  }
3959
3948
  __name(useSessionPicker, "useSessionPicker");
3960
3949
 
3961
- // packages/cli/src/ui/hooks/useTerminalSize.ts
3962
- init_esbuild_shims();
3963
- var import_react5 = __toESM(require_react(), 1);
3964
- function useTerminalSize() {
3965
- const [size, setSize] = (0, import_react5.useState)({
3966
- columns: process.stdout.columns || 80,
3967
- rows: process.stdout.rows || 24
3968
- });
3969
- (0, import_react5.useEffect)(() => {
3970
- function updateSize() {
3971
- setSize({
3972
- columns: process.stdout.columns || 80,
3973
- rows: process.stdout.rows || 24
3974
- });
3975
- }
3976
- __name(updateSize, "updateSize");
3977
- process.stdout.on("resize", updateSize);
3978
- return () => {
3979
- process.stdout.off("resize", updateSize);
3980
- };
3981
- }, []);
3982
- return size;
3983
- }
3984
- __name(useTerminalSize, "useTerminalSize");
3985
-
3986
3950
  // packages/cli/src/ui/components/SessionPreview.tsx
3987
3951
  init_esbuild_shims();
3988
- var import_react43 = __toESM(require_react(), 1);
3952
+ var import_react40 = __toESM(require_react(), 1);
3989
3953
 
3990
3954
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
3991
3955
  init_esbuild_shims();
3992
- var import_react42 = __toESM(require_react(), 1);
3956
+ var import_react39 = __toESM(require_react(), 1);
3993
3957
 
3994
3958
  // packages/cli/src/ui/components/messages/ConversationMessages.tsx
3995
3959
  init_esbuild_shims();
3996
3960
 
3997
3961
  // packages/cli/src/ui/utils/MarkdownDisplay.tsx
3998
3962
  init_esbuild_shims();
3999
- var import_react11 = __toESM(require_react(), 1);
3963
+ var import_react9 = __toESM(require_react(), 1);
4000
3964
 
4001
3965
  // packages/cli/src/ui/utils/CodeColorizer.tsx
4002
3966
  init_esbuild_shims();
4003
- var import_react6 = __toESM(require_react(), 1);
3967
+ var import_react4 = __toESM(require_react(), 1);
4004
3968
 
4005
3969
  // packages/cli/src/ui/utils/lowlightLoader.ts
4006
3970
  init_esbuild_shims();
@@ -4082,15 +4046,15 @@ function renderHastNode(node, theme2, inheritedColor) {
4082
4046
  }
4083
4047
  const colorToPassDown = elementColor || inheritedColor;
4084
4048
  const children = node.children?.map(
4085
- (child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react6.default.Fragment, { children: renderHastNode(child, theme2, colorToPassDown) }, index)
4049
+ (child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children: renderHastNode(child, theme2, colorToPassDown) }, index)
4086
4050
  );
4087
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react6.default.Fragment, { children });
4051
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children });
4088
4052
  }
4089
4053
  if (node.type === "root") {
4090
4054
  if (!node.children || node.children.length === 0) {
4091
4055
  return null;
4092
4056
  }
4093
- return node.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react6.default.Fragment, { children: renderHastNode(child, theme2, inheritedColor) }, index));
4057
+ return node.children?.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react4.default.Fragment, { children: renderHastNode(child, theme2, inheritedColor) }, index));
4094
4058
  }
4095
4059
  return null;
4096
4060
  }
@@ -5739,7 +5703,7 @@ var TableRenderer = /* @__PURE__ */ __name(({
5739
5703
 
5740
5704
  // packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
5741
5705
  init_esbuild_shims();
5742
- var import_react7 = __toESM(require_react(), 1);
5706
+ var import_react5 = __toESM(require_react(), 1);
5743
5707
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
5744
5708
  var BOLD_MARKER_LENGTH = 2;
5745
5709
  var ITALIC_MARKER_LENGTH = 1;
@@ -5866,11 +5830,11 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
5866
5830
  }
5867
5831
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: nodes.filter((node) => node !== null) });
5868
5832
  }, "RenderInlineInternal");
5869
- var RenderInline = import_react7.default.memo(RenderInlineInternal);
5833
+ var RenderInline = import_react5.default.memo(RenderInlineInternal);
5870
5834
 
5871
5835
  // packages/cli/src/ui/utils/MermaidDiagram.tsx
5872
5836
  init_esbuild_shims();
5873
- var import_react9 = __toESM(require_react(), 1);
5837
+ var import_react7 = __toESM(require_react(), 1);
5874
5838
 
5875
5839
  // packages/cli/src/ui/utils/mermaidVisualRenderer.ts
5876
5840
  init_esbuild_shims();
@@ -7899,15 +7863,15 @@ __name(fitImageToTerminal, "fitImageToTerminal");
7899
7863
 
7900
7864
  // packages/cli/src/ui/contexts/TerminalOutputContext.tsx
7901
7865
  init_esbuild_shims();
7902
- var import_react8 = __toESM(require_react(), 1);
7866
+ var import_react6 = __toESM(require_react(), 1);
7903
7867
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
7904
7868
  var defaultWriteRaw = /* @__PURE__ */ __name((data) => {
7905
7869
  process.stdout.write(data);
7906
7870
  }, "defaultWriteRaw");
7907
- var TerminalOutputContext = (0, import_react8.createContext)(defaultWriteRaw);
7871
+ var TerminalOutputContext = (0, import_react6.createContext)(defaultWriteRaw);
7908
7872
  var TerminalOutputProvider = /* @__PURE__ */ __name(({ value, children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TerminalOutputContext.Provider, { value, children }), "TerminalOutputProvider");
7909
7873
  function useTerminalOutput() {
7910
- return (0, import_react8.useContext)(TerminalOutputContext);
7874
+ return (0, import_react6.useContext)(TerminalOutputContext);
7911
7875
  }
7912
7876
  __name(useTerminalOutput, "useTerminalOutput");
7913
7877
 
@@ -7926,18 +7890,18 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
7926
7890
  availableTerminalHeight
7927
7891
  }) => {
7928
7892
  const writeRaw = useTerminalOutput();
7929
- const preparedTerminalImageSequence = import_react9.default.useRef(null);
7930
- const [imageState, setImageState] = import_react9.default.useState(
7893
+ const preparedTerminalImageSequence = import_react7.default.useRef(null);
7894
+ const [imageState, setImageState] = import_react7.default.useState(
7931
7895
  null
7932
7896
  );
7933
7897
  const innerWidth = Math.max(8, contentWidth - MERMAID_PADDING);
7934
7898
  const imageKey = `${source}\0${innerWidth}\0${availableTerminalHeight ?? "auto"}`;
7935
7899
  const image = imageState?.key === imageKey && !isPending ? imageState.result : null;
7936
- const visual = import_react9.default.useMemo(
7900
+ const visual = import_react7.default.useMemo(
7937
7901
  () => renderMermaidVisual(source, innerWidth),
7938
7902
  [source, innerWidth]
7939
7903
  );
7940
- import_react9.default.useEffect(() => {
7904
+ import_react7.default.useEffect(() => {
7941
7905
  if (isPending) {
7942
7906
  setImageState(null);
7943
7907
  return;
@@ -7973,10 +7937,10 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
7973
7937
  };
7974
7938
  }, [availableTerminalHeight, imageKey, innerWidth, isPending, source]);
7975
7939
  const kittySequence = image?.kind === "terminal-image" && image.protocol === "kitty" && image.placeholder ? image.sequence : null;
7976
- import_react9.default.useEffect(() => {
7940
+ import_react7.default.useEffect(() => {
7977
7941
  preparedTerminalImageSequence.current = null;
7978
7942
  }, [imageKey]);
7979
- import_react9.default.useEffect(() => {
7943
+ import_react7.default.useEffect(() => {
7980
7944
  if (!kittySequence || preparedTerminalImageSequence.current === kittySequence) {
7981
7945
  return;
7982
7946
  }
@@ -8057,18 +8021,18 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
8057
8021
  }
8058
8022
  );
8059
8023
  }, "MermaidDiagramInternal");
8060
- var MermaidDiagram = import_react9.default.memo(MermaidDiagramInternal);
8024
+ var MermaidDiagram = import_react7.default.memo(MermaidDiagramInternal);
8061
8025
 
8062
8026
  // packages/cli/src/ui/contexts/RenderModeContext.tsx
8063
8027
  init_esbuild_shims();
8064
- var import_react10 = __toESM(require_react(), 1);
8065
- var RenderModeContext = import_react10.default.createContext({
8028
+ var import_react8 = __toESM(require_react(), 1);
8029
+ var RenderModeContext = import_react8.default.createContext({
8066
8030
  renderMode: "render",
8067
8031
  setRenderMode: /* @__PURE__ */ __name(() => void 0, "setRenderMode")
8068
8032
  });
8069
8033
  var RenderModeProvider = RenderModeContext.Provider;
8070
8034
  function useRenderMode() {
8071
- return import_react10.default.useContext(RenderModeContext);
8035
+ return import_react8.default.useContext(RenderModeContext);
8072
8036
  }
8073
8037
  __name(useRenderMode, "useRenderMode");
8074
8038
 
@@ -8641,7 +8605,7 @@ var RenderCodeBlockInternal = /* @__PURE__ */ __name(({
8641
8605
  }
8642
8606
  );
8643
8607
  }, "RenderCodeBlockInternal");
8644
- var RenderCodeBlock = import_react11.default.memo(RenderCodeBlockInternal);
8608
+ var RenderCodeBlock = import_react9.default.memo(RenderCodeBlockInternal);
8645
8609
  var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, availableTerminalHeight, contentWidth }) => {
8646
8610
  const maxPreviewLines = availableTerminalHeight === void 0 ? 6 : Math.max(0, availableTerminalHeight - 2);
8647
8611
  const previewLines = content.slice(0, maxPreviewLines);
@@ -8660,7 +8624,7 @@ var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, avail
8660
8624
  }
8661
8625
  );
8662
8626
  }, "RenderPendingMermaidBlockInternal");
8663
- var RenderPendingMermaidBlock = import_react11.default.memo(RenderPendingMermaidBlockInternal);
8627
+ var RenderPendingMermaidBlock = import_react9.default.memo(RenderPendingMermaidBlockInternal);
8664
8628
  var RenderMathBlockInternal = /* @__PURE__ */ __name(({
8665
8629
  content,
8666
8630
  sourceCopyCommand,
@@ -8713,7 +8677,7 @@ var RenderMathBlockInternal = /* @__PURE__ */ __name(({
8713
8677
  }
8714
8678
  );
8715
8679
  }, "RenderMathBlockInternal");
8716
- var RenderMathBlock = import_react11.default.memo(RenderMathBlockInternal);
8680
+ var RenderMathBlock = import_react9.default.memo(RenderMathBlockInternal);
8717
8681
  var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
8718
8682
  quoteText,
8719
8683
  textColor = theme.text.primary,
@@ -8729,7 +8693,7 @@ var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
8729
8693
  }
8730
8694
  ) }) })
8731
8695
  ] }), "RenderBlockquoteInternal");
8732
- var RenderBlockquote = import_react11.default.memo(RenderBlockquoteInternal);
8696
+ var RenderBlockquote = import_react9.default.memo(RenderBlockquoteInternal);
8733
8697
  var RenderListItemInternal = /* @__PURE__ */ __name(({
8734
8698
  itemText,
8735
8699
  type,
@@ -8764,7 +8728,7 @@ var RenderListItemInternal = /* @__PURE__ */ __name(({
8764
8728
  }
8765
8729
  );
8766
8730
  }, "RenderListItemInternal");
8767
- var RenderListItem = import_react11.default.memo(RenderListItemInternal);
8731
+ var RenderListItem = import_react9.default.memo(RenderListItemInternal);
8768
8732
  var RenderTableInternal = /* @__PURE__ */ __name(({
8769
8733
  headers,
8770
8734
  rows,
@@ -8781,8 +8745,8 @@ var RenderTableInternal = /* @__PURE__ */ __name(({
8781
8745
  enableInlineMath
8782
8746
  }
8783
8747
  ), "RenderTableInternal");
8784
- var RenderTable = import_react11.default.memo(RenderTableInternal);
8785
- var MarkdownDisplay = import_react11.default.memo(MarkdownDisplayInternal);
8748
+ var RenderTable = import_react9.default.memo(RenderTableInternal);
8749
+ var MarkdownDisplay = import_react9.default.memo(MarkdownDisplayInternal);
8786
8750
 
8787
8751
  // packages/cli/src/ui/textConstants.ts
8788
8752
  init_esbuild_shims();
@@ -8842,6 +8806,7 @@ __name(formatDuration2, "formatDuration");
8842
8806
  // packages/cli/src/ui/components/messages/ConversationMessages.tsx
8843
8807
  var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
8844
8808
  var THINKING_ICON = "\u2234 ";
8809
+ var THINKING_ICON_PENDING = "\u2235 ";
8845
8810
  var toggleKeyHint = process.platform === "darwin" ? "option+t" : "alt+t";
8846
8811
  function getPrefixWidth(prefix) {
8847
8812
  return stringWidth(prefix) + 1;
@@ -8958,7 +8923,7 @@ var AssistantMessage = /* @__PURE__ */ __name(({
8958
8923
  PrefixedMarkdownMessage,
8959
8924
  {
8960
8925
  text,
8961
- prefix: "\u2726",
8926
+ prefix: "\u25C6",
8962
8927
  prefixColor: theme.text.accent,
8963
8928
  ariaLabel: SCREEN_READER_MODEL_PREFIX,
8964
8929
  isPending,
@@ -8980,43 +8945,11 @@ var AssistantMessageContent = /* @__PURE__ */ __name(({
8980
8945
  isPending,
8981
8946
  availableTerminalHeight,
8982
8947
  contentWidth,
8983
- basePrefix: "\u2726",
8948
+ basePrefix: "\u25C6",
8984
8949
  sourceCopyIndexOffsets
8985
8950
  }
8986
8951
  ), "AssistantMessageContent");
8987
8952
  var MAX_STREAMING_THINKING_VISUAL_LINES = 4;
8988
- function wrapToVisualLines(text, width) {
8989
- if (width <= 0) {
8990
- return [""];
8991
- }
8992
- const visualLines = [];
8993
- for (const logicalLine of text.split("\n")) {
8994
- if (logicalLine === "") {
8995
- visualLines.push("");
8996
- continue;
8997
- }
8998
- let currentLine = "";
8999
- let currentWidth = 0;
9000
- for (const char of logicalLine) {
9001
- const charWidth = getCachedStringWidth(char);
9002
- if (currentWidth + charWidth > width && currentWidth > 0) {
9003
- visualLines.push(currentLine);
9004
- currentLine = "";
9005
- currentWidth = 0;
9006
- }
9007
- currentLine += char;
9008
- currentWidth += charWidth;
9009
- }
9010
- if (currentLine) {
9011
- visualLines.push(currentLine);
9012
- }
9013
- }
9014
- if (visualLines.length === 0) {
9015
- visualLines.push("");
9016
- }
9017
- return visualLines;
9018
- }
9019
- __name(wrapToVisualLines, "wrapToVisualLines");
9020
8953
  function tailVisualLines(text, width, maxLines) {
9021
8954
  const charBudget = maxLines * width * 2;
9022
8955
  let sliceStart = Math.max(0, text.length - charBudget);
@@ -9060,7 +8993,7 @@ var ThinkMessage = /* @__PURE__ */ __name(({
9060
8993
  const display = tailVisualLines(text, innerWidth, maxLines);
9061
8994
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Box_default, { flexDirection: "column", children: [
9062
8995
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { dimColor: true, italic: true, children: [
9063
- THINKING_ICON,
8996
+ THINKING_ICON_PENDING,
9064
8997
  t("Thinking"),
9065
8998
  "\u2026",
9066
8999
  durationSuffix
@@ -9124,11 +9057,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
9124
9057
 
9125
9058
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
9126
9059
  init_esbuild_shims();
9127
- var import_react26 = __toESM(require_react(), 1);
9060
+ var import_react24 = __toESM(require_react(), 1);
9128
9061
 
9129
9062
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
9130
9063
  init_esbuild_shims();
9131
- var import_react24 = __toESM(require_react(), 1);
9064
+ var import_react22 = __toESM(require_react(), 1);
9132
9065
 
9133
9066
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
9134
9067
  init_esbuild_shims();
@@ -9469,18 +9402,18 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
9469
9402
 
9470
9403
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
9471
9404
  init_esbuild_shims();
9472
- var import_react18 = __toESM(require_react(), 1);
9405
+ var import_react16 = __toESM(require_react(), 1);
9473
9406
 
9474
9407
  // packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
9475
9408
  init_esbuild_shims();
9476
9409
 
9477
9410
  // packages/cli/src/ui/components/shared/BaseSelectionList.tsx
9478
9411
  init_esbuild_shims();
9479
- var import_react13 = __toESM(require_react(), 1);
9412
+ var import_react11 = __toESM(require_react(), 1);
9480
9413
 
9481
9414
  // packages/cli/src/ui/hooks/useSelectionList.ts
9482
9415
  init_esbuild_shims();
9483
- var import_react12 = __toESM(require_react(), 1);
9416
+ var import_react10 = __toESM(require_react(), 1);
9484
9417
 
9485
9418
  // packages/cli/src/ui/keyMatchers.ts
9486
9419
  init_esbuild_shims();
@@ -9824,19 +9757,19 @@ function useSelectionList({
9824
9757
  showNumbers = false,
9825
9758
  disableVimNav = false
9826
9759
  }) {
9827
- const [state, dispatch] = (0, import_react12.useReducer)(selectionListReducer, {
9760
+ const [state, dispatch] = (0, import_react10.useReducer)(selectionListReducer, {
9828
9761
  activeIndex: computeInitialIndex(initialIndex, items),
9829
9762
  initialIndex,
9830
9763
  pendingHighlight: false,
9831
9764
  pendingSelect: false,
9832
9765
  items
9833
9766
  });
9834
- const numberInputRef = (0, import_react12.useRef)("");
9835
- const numberInputTimer = (0, import_react12.useRef)(null);
9836
- (0, import_react12.useEffect)(() => {
9767
+ const numberInputRef = (0, import_react10.useRef)("");
9768
+ const numberInputTimer = (0, import_react10.useRef)(null);
9769
+ (0, import_react10.useEffect)(() => {
9837
9770
  dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
9838
9771
  }, [initialIndex, items]);
9839
- (0, import_react12.useEffect)(() => {
9772
+ (0, import_react10.useEffect)(() => {
9840
9773
  let needsClear = false;
9841
9774
  if (state.pendingHighlight && items[state.activeIndex]) {
9842
9775
  onHighlight?.(items[state.activeIndex].value);
@@ -9860,7 +9793,7 @@ function useSelectionList({
9860
9793
  onHighlight,
9861
9794
  onSelect
9862
9795
  ]);
9863
- (0, import_react12.useEffect)(
9796
+ (0, import_react10.useEffect)(
9864
9797
  () => () => {
9865
9798
  if (numberInputTimer.current) {
9866
9799
  clearTimeout(numberInputTimer.current);
@@ -9941,9 +9874,15 @@ function useSelectionList({
9941
9874
  payload: { index, items }
9942
9875
  });
9943
9876
  }, "setActiveIndex");
9877
+ const selectIndex = /* @__PURE__ */ __name((index) => {
9878
+ if (items[index]?.disabled) return;
9879
+ dispatch({ type: "SET_ACTIVE_INDEX", payload: { index, items } });
9880
+ dispatch({ type: "SELECT_CURRENT", payload: { items } });
9881
+ }, "selectIndex");
9944
9882
  return {
9945
9883
  activeIndex: state.activeIndex,
9946
- setActiveIndex
9884
+ setActiveIndex,
9885
+ selectIndex
9947
9886
  };
9948
9887
  }
9949
9888
  __name(useSelectionList, "useSelectionList");
@@ -9969,7 +9908,7 @@ function BaseSelectionList({
9969
9908
  itemGap = 0,
9970
9909
  renderItem
9971
9910
  }) {
9972
- const { activeIndex } = useSelectionList({
9911
+ const { activeIndex, setActiveIndex, selectIndex } = useSelectionList({
9973
9912
  items,
9974
9913
  initialIndex,
9975
9914
  onSelect,
@@ -9977,10 +9916,10 @@ function BaseSelectionList({
9977
9916
  isFocused,
9978
9917
  showNumbers
9979
9918
  });
9980
- const [scrollOffset, setScrollOffset] = (0, import_react13.useState)(
9919
+ const [scrollOffset, setScrollOffset] = (0, import_react11.useState)(
9981
9920
  () => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
9982
9921
  );
9983
- (0, import_react13.useEffect)(() => {
9922
+ (0, import_react11.useEffect)(() => {
9984
9923
  const newScrollOffset = getScrollOffsetForIndex(
9985
9924
  activeIndex,
9986
9925
  items.length,
@@ -9992,9 +9931,24 @@ function BaseSelectionList({
9992
9931
  setScrollOffset(newScrollOffset);
9993
9932
  }
9994
9933
  }, [activeIndex, items.length, scrollOffset, maxItemsToShow]);
9934
+ const settings = (0, import_react11.useContext)(SettingsContext);
9935
+ const mouseEnabled = !!settings?.merged.ui?.useTerminalBuffer;
9936
+ const containerRef = (0, import_react11.useRef)(null);
9937
+ const itemRefs = (0, import_react11.useRef)([]);
9995
9938
  const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
9996
9939
  const numberColumnWidth = String(items.length).length;
9997
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { flexDirection: "column", gap: itemGap, children: [
9940
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { ref: containerRef, flexDirection: "column", gap: itemGap, children: [
9941
+ mouseEnabled && isFocused && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9942
+ RowMouseController,
9943
+ {
9944
+ containerRef,
9945
+ itemRefs,
9946
+ scrollOffset,
9947
+ isDisabled: (index) => !!items[index]?.disabled,
9948
+ onHoverIndex: setActiveIndex,
9949
+ onSelectIndex: selectIndex
9950
+ }
9951
+ ),
9998
9952
  showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9999
9953
  Text,
10000
9954
  {
@@ -10023,31 +9977,41 @@ function BaseSelectionList({
10023
9977
  const itemNumberText = `${String(itemIndex + 1).padStart(
10024
9978
  numberColumnWidth
10025
9979
  )}.`;
10026
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { alignItems: "flex-start", children: [
10027
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10028
- Text,
10029
- {
10030
- color: isSelected ? theme.status.success : theme.text.primary,
10031
- "aria-hidden": true,
10032
- children: isSelected ? "\u203A" : " "
10033
- }
10034
- ) }),
10035
- showNumbers && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10036
- Box_default,
10037
- {
10038
- marginRight: 1,
10039
- flexShrink: 0,
10040
- minWidth: itemNumberText.length,
10041
- "aria-state": { checked: isSelected },
10042
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: numberColor, children: itemNumberText })
10043
- }
10044
- ),
10045
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
10046
- isSelected,
10047
- titleColor,
10048
- numberColor
10049
- }) })
10050
- ] }, item.key);
9980
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
9981
+ Box_default,
9982
+ {
9983
+ alignItems: "flex-start",
9984
+ ref: (node) => {
9985
+ itemRefs.current[index] = node;
9986
+ },
9987
+ children: [
9988
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9989
+ Text,
9990
+ {
9991
+ color: isSelected ? theme.status.success : theme.text.primary,
9992
+ "aria-hidden": true,
9993
+ children: isSelected ? "\u203A" : " "
9994
+ }
9995
+ ) }),
9996
+ showNumbers && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9997
+ Box_default,
9998
+ {
9999
+ marginRight: 1,
10000
+ flexShrink: 0,
10001
+ minWidth: itemNumberText.length,
10002
+ "aria-state": { checked: isSelected },
10003
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: numberColor, children: itemNumberText })
10004
+ }
10005
+ ),
10006
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
10007
+ isSelected,
10008
+ titleColor,
10009
+ numberColor
10010
+ }) })
10011
+ ]
10012
+ },
10013
+ item.key
10014
+ );
10051
10015
  }),
10052
10016
  showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10053
10017
  Text,
@@ -10100,14 +10064,14 @@ __name(RadioButtonSelect, "RadioButtonSelect");
10100
10064
 
10101
10065
  // packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
10102
10066
  init_esbuild_shims();
10103
- var import_react17 = __toESM(require_react(), 1);
10067
+ var import_react15 = __toESM(require_react(), 1);
10104
10068
 
10105
10069
  // packages/cli/src/ui/components/shared/TextInput.tsx
10106
10070
  init_esbuild_shims();
10107
10071
 
10108
10072
  // packages/cli/src/ui/components/shared/text-buffer.ts
10109
10073
  init_esbuild_shims();
10110
- var import_react14 = __toESM(require_react(), 1);
10074
+ var import_react12 = __toESM(require_react(), 1);
10111
10075
  import { spawnSync as spawnSync2 } from "node:child_process";
10112
10076
  import fs2 from "node:fs";
10113
10077
  import os2 from "node:os";
@@ -12165,7 +12129,7 @@ function useTextBuffer({
12165
12129
  shellModeActive = false,
12166
12130
  preferredEditor
12167
12131
  }) {
12168
- const initialState = (0, import_react14.useMemo)(() => {
12132
+ const initialState = (0, import_react12.useMemo)(() => {
12169
12133
  const lines2 = initialText.split("\n");
12170
12134
  const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
12171
12135
  lines2.length === 0 ? [""] : lines2,
@@ -12189,9 +12153,9 @@ function useTextBuffer({
12189
12153
  visualLayout: visualLayout2
12190
12154
  };
12191
12155
  }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
12192
- const stateRef = (0, import_react14.useRef)(initialState);
12193
- const [state, setState] = (0, import_react14.useState)(initialState);
12194
- const dispatch = (0, import_react14.useCallback)((action) => {
12156
+ const stateRef = (0, import_react12.useRef)(initialState);
12157
+ const [state, setState] = (0, import_react12.useState)(initialState);
12158
+ const dispatch = (0, import_react12.useCallback)((action) => {
12195
12159
  stateRef.current = textBufferReducer(stateRef.current, action);
12196
12160
  setState(stateRef.current);
12197
12161
  }, []);
@@ -12203,25 +12167,25 @@ function useTextBuffer({
12203
12167
  selectionAnchor,
12204
12168
  visualLayout
12205
12169
  } = state;
12206
- const text = (0, import_react14.useMemo)(() => lines.join("\n"), [lines]);
12207
- const visualCursor = (0, import_react14.useMemo)(
12170
+ const text = (0, import_react12.useMemo)(() => lines.join("\n"), [lines]);
12171
+ const visualCursor = (0, import_react12.useMemo)(
12208
12172
  () => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
12209
12173
  [visualLayout, cursorRow, cursorCol]
12210
12174
  );
12211
12175
  const { visualLines, visualToLogicalMap } = visualLayout;
12212
- const [visualScrollRow, setVisualScrollRow] = (0, import_react14.useState)(0);
12213
- (0, import_react14.useEffect)(() => {
12176
+ const [visualScrollRow, setVisualScrollRow] = (0, import_react12.useState)(0);
12177
+ (0, import_react12.useEffect)(() => {
12214
12178
  if (onChange) {
12215
12179
  onChange(text);
12216
12180
  }
12217
12181
  }, [text, onChange]);
12218
- (0, import_react14.useEffect)(() => {
12182
+ (0, import_react12.useEffect)(() => {
12219
12183
  dispatch({
12220
12184
  type: "set_viewport",
12221
12185
  payload: { width: viewport.width, height: viewport.height }
12222
12186
  });
12223
12187
  }, [dispatch, viewport.width, viewport.height]);
12224
- (0, import_react14.useEffect)(() => {
12188
+ (0, import_react12.useEffect)(() => {
12225
12189
  const { height } = viewport;
12226
12190
  const totalVisualLines = visualLines.length;
12227
12191
  const maxScrollStart = Math.max(0, totalVisualLines - height);
@@ -12236,7 +12200,7 @@ function useTextBuffer({
12236
12200
  setVisualScrollRow(newVisualScrollRow);
12237
12201
  }
12238
12202
  }, [visualCursor, visualScrollRow, viewport, visualLines.length]);
12239
- const insert = (0, import_react14.useCallback)(
12203
+ const insert = (0, import_react12.useCallback)(
12240
12204
  (ch, { paste = false } = {}) => {
12241
12205
  if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
12242
12206
  const validPaths = tryExtractFilePaths(ch, isValidPath);
@@ -12275,202 +12239,202 @@ function useTextBuffer({
12275
12239
  },
12276
12240
  [dispatch, isValidPath, shellModeActive]
12277
12241
  );
12278
- const newline = (0, import_react14.useCallback)(() => {
12242
+ const newline = (0, import_react12.useCallback)(() => {
12279
12243
  dispatch({ type: "insert", payload: "\n" });
12280
12244
  }, [dispatch]);
12281
- const backspace = (0, import_react14.useCallback)(() => {
12245
+ const backspace = (0, import_react12.useCallback)(() => {
12282
12246
  dispatch({ type: "backspace" });
12283
12247
  }, [dispatch]);
12284
- const del = (0, import_react14.useCallback)(() => {
12248
+ const del = (0, import_react12.useCallback)(() => {
12285
12249
  dispatch({ type: "delete" });
12286
12250
  }, [dispatch]);
12287
- const move = (0, import_react14.useCallback)(
12251
+ const move = (0, import_react12.useCallback)(
12288
12252
  (dir) => {
12289
12253
  dispatch({ type: "move", payload: { dir } });
12290
12254
  },
12291
12255
  [dispatch]
12292
12256
  );
12293
- const undo = (0, import_react14.useCallback)(() => {
12257
+ const undo = (0, import_react12.useCallback)(() => {
12294
12258
  dispatch({ type: "undo" });
12295
12259
  }, [dispatch]);
12296
- const redo = (0, import_react14.useCallback)(() => {
12260
+ const redo = (0, import_react12.useCallback)(() => {
12297
12261
  dispatch({ type: "redo" });
12298
12262
  }, [dispatch]);
12299
- const setText = (0, import_react14.useCallback)(
12263
+ const setText = (0, import_react12.useCallback)(
12300
12264
  (newText) => {
12301
12265
  dispatch({ type: "set_text", payload: newText });
12302
12266
  },
12303
12267
  [dispatch]
12304
12268
  );
12305
- const deleteWordLeft = (0, import_react14.useCallback)(() => {
12269
+ const deleteWordLeft = (0, import_react12.useCallback)(() => {
12306
12270
  dispatch({ type: "delete_word_left" });
12307
12271
  }, [dispatch]);
12308
- const deleteWordRight = (0, import_react14.useCallback)(() => {
12272
+ const deleteWordRight = (0, import_react12.useCallback)(() => {
12309
12273
  dispatch({ type: "delete_word_right" });
12310
12274
  }, [dispatch]);
12311
- const killLineRight = (0, import_react14.useCallback)(() => {
12275
+ const killLineRight = (0, import_react12.useCallback)(() => {
12312
12276
  dispatch({ type: "kill_line_right" });
12313
12277
  }, [dispatch]);
12314
- const killLineLeft = (0, import_react14.useCallback)(() => {
12278
+ const killLineLeft = (0, import_react12.useCallback)(() => {
12315
12279
  dispatch({ type: "kill_line_left" });
12316
12280
  }, [dispatch]);
12317
- const vimDeleteWordForward = (0, import_react14.useCallback)(
12281
+ const vimDeleteWordForward = (0, import_react12.useCallback)(
12318
12282
  (count) => {
12319
12283
  dispatch({ type: "vim_delete_word_forward", payload: { count } });
12320
12284
  },
12321
12285
  [dispatch]
12322
12286
  );
12323
- const vimDeleteWordBackward = (0, import_react14.useCallback)(
12287
+ const vimDeleteWordBackward = (0, import_react12.useCallback)(
12324
12288
  (count) => {
12325
12289
  dispatch({ type: "vim_delete_word_backward", payload: { count } });
12326
12290
  },
12327
12291
  [dispatch]
12328
12292
  );
12329
- const vimDeleteWordEnd = (0, import_react14.useCallback)(
12293
+ const vimDeleteWordEnd = (0, import_react12.useCallback)(
12330
12294
  (count) => {
12331
12295
  dispatch({ type: "vim_delete_word_end", payload: { count } });
12332
12296
  },
12333
12297
  [dispatch]
12334
12298
  );
12335
- const vimChangeWordForward = (0, import_react14.useCallback)(
12299
+ const vimChangeWordForward = (0, import_react12.useCallback)(
12336
12300
  (count) => {
12337
12301
  dispatch({ type: "vim_change_word_forward", payload: { count } });
12338
12302
  },
12339
12303
  [dispatch]
12340
12304
  );
12341
- const vimChangeWordBackward = (0, import_react14.useCallback)(
12305
+ const vimChangeWordBackward = (0, import_react12.useCallback)(
12342
12306
  (count) => {
12343
12307
  dispatch({ type: "vim_change_word_backward", payload: { count } });
12344
12308
  },
12345
12309
  [dispatch]
12346
12310
  );
12347
- const vimChangeWordEnd = (0, import_react14.useCallback)(
12311
+ const vimChangeWordEnd = (0, import_react12.useCallback)(
12348
12312
  (count) => {
12349
12313
  dispatch({ type: "vim_change_word_end", payload: { count } });
12350
12314
  },
12351
12315
  [dispatch]
12352
12316
  );
12353
- const vimDeleteLine = (0, import_react14.useCallback)(
12317
+ const vimDeleteLine = (0, import_react12.useCallback)(
12354
12318
  (count) => {
12355
12319
  dispatch({ type: "vim_delete_line", payload: { count } });
12356
12320
  },
12357
12321
  [dispatch]
12358
12322
  );
12359
- const vimChangeLine = (0, import_react14.useCallback)(
12323
+ const vimChangeLine = (0, import_react12.useCallback)(
12360
12324
  (count) => {
12361
12325
  dispatch({ type: "vim_change_line", payload: { count } });
12362
12326
  },
12363
12327
  [dispatch]
12364
12328
  );
12365
- const vimDeleteToEndOfLine = (0, import_react14.useCallback)(() => {
12329
+ const vimDeleteToEndOfLine = (0, import_react12.useCallback)(() => {
12366
12330
  dispatch({ type: "vim_delete_to_end_of_line" });
12367
12331
  }, [dispatch]);
12368
- const vimChangeToEndOfLine = (0, import_react14.useCallback)(() => {
12332
+ const vimChangeToEndOfLine = (0, import_react12.useCallback)(() => {
12369
12333
  dispatch({ type: "vim_change_to_end_of_line" });
12370
12334
  }, [dispatch]);
12371
- const vimChangeMovement = (0, import_react14.useCallback)(
12335
+ const vimChangeMovement = (0, import_react12.useCallback)(
12372
12336
  (movement, count) => {
12373
12337
  dispatch({ type: "vim_change_movement", payload: { movement, count } });
12374
12338
  },
12375
12339
  [dispatch]
12376
12340
  );
12377
- const vimDeleteMovement = (0, import_react14.useCallback)(
12341
+ const vimDeleteMovement = (0, import_react12.useCallback)(
12378
12342
  (movement, count) => {
12379
12343
  dispatch({ type: "vim_delete_movement", payload: { movement, count } });
12380
12344
  },
12381
12345
  [dispatch]
12382
12346
  );
12383
- const vimMoveLeft = (0, import_react14.useCallback)(
12347
+ const vimMoveLeft = (0, import_react12.useCallback)(
12384
12348
  (count) => {
12385
12349
  dispatch({ type: "vim_move_left", payload: { count } });
12386
12350
  },
12387
12351
  [dispatch]
12388
12352
  );
12389
- const vimMoveRight = (0, import_react14.useCallback)(
12353
+ const vimMoveRight = (0, import_react12.useCallback)(
12390
12354
  (count) => {
12391
12355
  dispatch({ type: "vim_move_right", payload: { count } });
12392
12356
  },
12393
12357
  [dispatch]
12394
12358
  );
12395
- const vimMoveUp = (0, import_react14.useCallback)(
12359
+ const vimMoveUp = (0, import_react12.useCallback)(
12396
12360
  (count) => {
12397
12361
  dispatch({ type: "vim_move_up", payload: { count } });
12398
12362
  },
12399
12363
  [dispatch]
12400
12364
  );
12401
- const vimMoveDown = (0, import_react14.useCallback)(
12365
+ const vimMoveDown = (0, import_react12.useCallback)(
12402
12366
  (count) => {
12403
12367
  dispatch({ type: "vim_move_down", payload: { count } });
12404
12368
  },
12405
12369
  [dispatch]
12406
12370
  );
12407
- const vimMoveWordForward = (0, import_react14.useCallback)(
12371
+ const vimMoveWordForward = (0, import_react12.useCallback)(
12408
12372
  (count) => {
12409
12373
  dispatch({ type: "vim_move_word_forward", payload: { count } });
12410
12374
  },
12411
12375
  [dispatch]
12412
12376
  );
12413
- const vimMoveWordBackward = (0, import_react14.useCallback)(
12377
+ const vimMoveWordBackward = (0, import_react12.useCallback)(
12414
12378
  (count) => {
12415
12379
  dispatch({ type: "vim_move_word_backward", payload: { count } });
12416
12380
  },
12417
12381
  [dispatch]
12418
12382
  );
12419
- const vimMoveWordEnd = (0, import_react14.useCallback)(
12383
+ const vimMoveWordEnd = (0, import_react12.useCallback)(
12420
12384
  (count) => {
12421
12385
  dispatch({ type: "vim_move_word_end", payload: { count } });
12422
12386
  },
12423
12387
  [dispatch]
12424
12388
  );
12425
- const vimDeleteChar = (0, import_react14.useCallback)(
12389
+ const vimDeleteChar = (0, import_react12.useCallback)(
12426
12390
  (count) => {
12427
12391
  dispatch({ type: "vim_delete_char", payload: { count } });
12428
12392
  },
12429
12393
  [dispatch]
12430
12394
  );
12431
- const vimInsertAtCursor = (0, import_react14.useCallback)(() => {
12395
+ const vimInsertAtCursor = (0, import_react12.useCallback)(() => {
12432
12396
  dispatch({ type: "vim_insert_at_cursor" });
12433
12397
  }, [dispatch]);
12434
- const vimAppendAtCursor = (0, import_react14.useCallback)(() => {
12398
+ const vimAppendAtCursor = (0, import_react12.useCallback)(() => {
12435
12399
  dispatch({ type: "vim_append_at_cursor" });
12436
12400
  }, [dispatch]);
12437
- const vimOpenLineBelow = (0, import_react14.useCallback)(() => {
12401
+ const vimOpenLineBelow = (0, import_react12.useCallback)(() => {
12438
12402
  dispatch({ type: "vim_open_line_below" });
12439
12403
  }, [dispatch]);
12440
- const vimOpenLineAbove = (0, import_react14.useCallback)(() => {
12404
+ const vimOpenLineAbove = (0, import_react12.useCallback)(() => {
12441
12405
  dispatch({ type: "vim_open_line_above" });
12442
12406
  }, [dispatch]);
12443
- const vimAppendAtLineEnd = (0, import_react14.useCallback)(() => {
12407
+ const vimAppendAtLineEnd = (0, import_react12.useCallback)(() => {
12444
12408
  dispatch({ type: "vim_append_at_line_end" });
12445
12409
  }, [dispatch]);
12446
- const vimInsertAtLineStart = (0, import_react14.useCallback)(() => {
12410
+ const vimInsertAtLineStart = (0, import_react12.useCallback)(() => {
12447
12411
  dispatch({ type: "vim_insert_at_line_start" });
12448
12412
  }, [dispatch]);
12449
- const vimMoveToLineStart = (0, import_react14.useCallback)(() => {
12413
+ const vimMoveToLineStart = (0, import_react12.useCallback)(() => {
12450
12414
  dispatch({ type: "vim_move_to_line_start" });
12451
12415
  }, [dispatch]);
12452
- const vimMoveToLineEnd = (0, import_react14.useCallback)(() => {
12416
+ const vimMoveToLineEnd = (0, import_react12.useCallback)(() => {
12453
12417
  dispatch({ type: "vim_move_to_line_end" });
12454
12418
  }, [dispatch]);
12455
- const vimMoveToFirstNonWhitespace = (0, import_react14.useCallback)(() => {
12419
+ const vimMoveToFirstNonWhitespace = (0, import_react12.useCallback)(() => {
12456
12420
  dispatch({ type: "vim_move_to_first_nonwhitespace" });
12457
12421
  }, [dispatch]);
12458
- const vimMoveToFirstLine = (0, import_react14.useCallback)(() => {
12422
+ const vimMoveToFirstLine = (0, import_react12.useCallback)(() => {
12459
12423
  dispatch({ type: "vim_move_to_first_line" });
12460
12424
  }, [dispatch]);
12461
- const vimMoveToLastLine = (0, import_react14.useCallback)(() => {
12425
+ const vimMoveToLastLine = (0, import_react12.useCallback)(() => {
12462
12426
  dispatch({ type: "vim_move_to_last_line" });
12463
12427
  }, [dispatch]);
12464
- const vimMoveToLine = (0, import_react14.useCallback)(
12428
+ const vimMoveToLine = (0, import_react12.useCallback)(
12465
12429
  (lineNumber) => {
12466
12430
  dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
12467
12431
  },
12468
12432
  [dispatch]
12469
12433
  );
12470
- const vimEscapeInsertMode = (0, import_react14.useCallback)(() => {
12434
+ const vimEscapeInsertMode = (0, import_react12.useCallback)(() => {
12471
12435
  dispatch({ type: "vim_escape_insert_mode" });
12472
12436
  }, [dispatch]);
12473
- const openInExternalEditor = (0, import_react14.useCallback)(
12437
+ const openInExternalEditor = (0, import_react12.useCallback)(
12474
12438
  async (opts = {}) => {
12475
12439
  let tmpDir;
12476
12440
  let filePath;
@@ -12588,7 +12552,7 @@ function useTextBuffer({
12588
12552
  },
12589
12553
  [dispatch, stdin, setRawMode, preferredEditor]
12590
12554
  );
12591
- const handleInput = (0, import_react14.useCallback)(
12555
+ const handleInput = (0, import_react12.useCallback)(
12592
12556
  (key) => {
12593
12557
  const { sequence: input } = key;
12594
12558
  if (key.paste) {
@@ -12639,11 +12603,11 @@ function useTextBuffer({
12639
12603
  redo
12640
12604
  ]
12641
12605
  );
12642
- const renderedVisualLines = (0, import_react14.useMemo)(
12606
+ const renderedVisualLines = (0, import_react12.useMemo)(
12643
12607
  () => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
12644
12608
  [visualLines, visualScrollRow, viewport.height]
12645
12609
  );
12646
- const replaceRange = (0, import_react14.useCallback)(
12610
+ const replaceRange = (0, import_react12.useCallback)(
12647
12611
  (startRow, startCol, endRow, endCol, text2) => {
12648
12612
  dispatch({
12649
12613
  type: "replace_range",
@@ -12652,7 +12616,7 @@ function useTextBuffer({
12652
12616
  },
12653
12617
  [dispatch]
12654
12618
  );
12655
- const replaceRangeByOffset = (0, import_react14.useCallback)(
12619
+ const replaceRangeByOffset = (0, import_react12.useCallback)(
12656
12620
  (startOffset, endOffset, replacementText) => {
12657
12621
  const currentText = stateRef.current.lines.join("\n");
12658
12622
  const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
@@ -12661,13 +12625,13 @@ function useTextBuffer({
12661
12625
  },
12662
12626
  [replaceRange]
12663
12627
  );
12664
- const moveToOffset = (0, import_react14.useCallback)(
12628
+ const moveToOffset = (0, import_react12.useCallback)(
12665
12629
  (offset) => {
12666
12630
  dispatch({ type: "move_to_offset", payload: { offset } });
12667
12631
  },
12668
12632
  [dispatch]
12669
12633
  );
12670
- const returnValue = (0, import_react14.useMemo)(
12634
+ const returnValue = (0, import_react12.useMemo)(
12671
12635
  () => ({
12672
12636
  get lines() {
12673
12637
  return stateRef.current.lines;
@@ -12803,11 +12767,11 @@ __name(useTextBuffer, "useTextBuffer");
12803
12767
 
12804
12768
  // packages/cli/src/ui/hooks/usePreferredEditor.ts
12805
12769
  init_esbuild_shims();
12806
- var import_react15 = __toESM(require_react(), 1);
12770
+ var import_react13 = __toESM(require_react(), 1);
12807
12771
  var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
12808
12772
  function usePreferredEditor() {
12809
12773
  const settings = useSettings();
12810
- return (0, import_react15.useMemo)(() => {
12774
+ return (0, import_react13.useMemo)(() => {
12811
12775
  const raw = settings.merged.general?.preferredEditor ?? "";
12812
12776
  if (raw && !isValidEditorType(raw)) {
12813
12777
  debugLogger5.warn(
@@ -12827,7 +12791,7 @@ function usePreferredEditor() {
12827
12791
  __name(usePreferredEditor, "usePreferredEditor");
12828
12792
 
12829
12793
  // packages/cli/src/ui/components/shared/TextInput.tsx
12830
- var import_react16 = __toESM(require_react(), 1);
12794
+ var import_react14 = __toESM(require_react(), 1);
12831
12795
 
12832
12796
  // packages/cli/src/ui/utils/software-cursor.ts
12833
12797
  init_esbuild_shims();
@@ -12925,12 +12889,12 @@ function TextInput({
12925
12889
  ellipsizeOverflow = false
12926
12890
  }) {
12927
12891
  const allowMultiline = height > 1;
12928
- const [cursorVisible, setCursorVisible] = (0, import_react16.useState)(isActive);
12929
- const onChangeRef = (0, import_react16.useRef)(onChange);
12930
- (0, import_react16.useEffect)(() => {
12892
+ const [cursorVisible, setCursorVisible] = (0, import_react14.useState)(isActive);
12893
+ const onChangeRef = (0, import_react14.useRef)(onChange);
12894
+ (0, import_react14.useEffect)(() => {
12931
12895
  onChangeRef.current = onChange;
12932
12896
  }, [onChange]);
12933
- const stableOnChange = (0, import_react16.useCallback)((text) => {
12897
+ const stableOnChange = (0, import_react14.useCallback)((text) => {
12934
12898
  onChangeRef.current?.(text);
12935
12899
  }, []);
12936
12900
  const preferredEditor = usePreferredEditor();
@@ -12945,7 +12909,7 @@ function TextInput({
12945
12909
  onChange: stableOnChange,
12946
12910
  preferredEditor
12947
12911
  });
12948
- (0, import_react16.useEffect)(() => {
12912
+ (0, import_react14.useEffect)(() => {
12949
12913
  if (!isActive) {
12950
12914
  setCursorVisible(false);
12951
12915
  return;
@@ -12958,7 +12922,7 @@ function TextInput({
12958
12922
  }, [isActive]);
12959
12923
  const handleSubmit = /* @__PURE__ */ __name(() => {
12960
12924
  if (!onSubmit) return;
12961
- onSubmit();
12925
+ onSubmit(buffer.text);
12962
12926
  }, "handleSubmit");
12963
12927
  useKeypress(
12964
12928
  (key) => {
@@ -13064,12 +13028,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13064
13028
  isFocused = true,
13065
13029
  onConfirm
13066
13030
  }) => {
13067
- const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react17.useState)(0);
13068
- const [selectedOptions, setSelectedOptions] = (0, import_react17.useState)({});
13069
- const [customInputValues, setCustomInputValues] = (0, import_react17.useState)({});
13070
- const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
13071
- const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react17.useState)({});
13072
- const [customInputChecked, setCustomInputChecked] = (0, import_react17.useState)({});
13031
+ const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react15.useState)(0);
13032
+ const [selectedOptions, setSelectedOptions] = (0, import_react15.useState)({});
13033
+ const [customInputValues, setCustomInputValues] = (0, import_react15.useState)({});
13034
+ const customInputValuesRef = (0, import_react15.useRef)({});
13035
+ const [selectedIndex, setSelectedIndex] = (0, import_react15.useState)(0);
13036
+ const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react15.useState)({});
13037
+ const [customInputChecked, setCustomInputChecked] = (0, import_react15.useState)({});
13073
13038
  const hasMultipleQuestions = confirmationDetails.questions.length > 1;
13074
13039
  const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
13075
13040
  const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
@@ -13077,7 +13042,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13077
13042
  const isMultiSelect = currentQuestion?.multiSelect ?? false;
13078
13043
  const totalOptions = currentQuestion ? currentQuestion.options.length + 1 : 2;
13079
13044
  const isCustomInputSelected = !isSubmitTab && currentQuestion && selectedIndex === currentQuestion.options.length;
13080
- const currentCustomInputValue = customInputValues[currentQuestionIndex] ?? "";
13045
+ const getCustomInputValue = /* @__PURE__ */ __name((idx) => customInputValuesRef.current[idx] ?? customInputValues[idx] ?? "", "getCustomInputValue");
13046
+ const currentCustomInputValue = getCustomInputValue(currentQuestionIndex);
13081
13047
  const isCustomInputAnswer = !isSubmitTab && currentQuestion && !isMultiSelect && selectedOptions[currentQuestionIndex] !== void 0 && !currentQuestion.options.some(
13082
13048
  (opt) => opt.label === selectedOptions[currentQuestionIndex]
13083
13049
  );
@@ -13085,7 +13051,7 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13085
13051
  const q = confirmationDetails.questions[idx];
13086
13052
  if (q?.multiSelect) {
13087
13053
  const selections = [...multiSelectedOptions[idx] ?? []];
13088
- const customValue = (customInputValues[idx] ?? "").trim();
13054
+ const customValue = getCustomInputValue(idx).trim();
13089
13055
  if (customInputChecked[idx] && customValue) {
13090
13056
  selections.push(customValue);
13091
13057
  }
@@ -13116,24 +13082,30 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13116
13082
  }, 150);
13117
13083
  }
13118
13084
  }, "selectAndAdvance");
13119
- const handleMultiSelectSubmit = /* @__PURE__ */ __name(() => {
13085
+ const getCurrentMultiSelectAnswer = /* @__PURE__ */ __name((includeCustomInput = customInputChecked[currentQuestionIndex], inputValue = currentCustomInputValue) => {
13120
13086
  if (!currentQuestion) return;
13121
13087
  const selections = [...multiSelectedOptions[currentQuestionIndex] ?? []];
13122
- const customValue = currentCustomInputValue.trim();
13123
- if (customInputChecked[currentQuestionIndex] && customValue) {
13088
+ const customValue = inputValue.trim();
13089
+ if (includeCustomInput && customValue) {
13124
13090
  selections.push(customValue);
13125
13091
  }
13126
- if (selections.length === 0) return;
13127
- selectAndAdvance(selections.join(", "));
13092
+ return selections.length > 0 ? selections.join(", ") : void 0;
13093
+ }, "getCurrentMultiSelectAnswer");
13094
+ const handleMultiSelectSubmit = /* @__PURE__ */ __name(() => {
13095
+ const answer = getCurrentMultiSelectAnswer();
13096
+ if (!answer) return;
13097
+ selectAndAdvance(answer);
13128
13098
  }, "handleMultiSelectSubmit");
13129
- const handleCustomInputSubmit = /* @__PURE__ */ __name(() => {
13130
- const trimmedValue = currentCustomInputValue.trim();
13099
+ const handleCustomInputSubmit = /* @__PURE__ */ __name((inputValue = currentCustomInputValue) => {
13100
+ const trimmedValue = inputValue.trim();
13131
13101
  if (isMultiSelect) {
13132
- if (!trimmedValue) return;
13133
13102
  setCustomInputChecked((prev) => ({
13134
13103
  ...prev,
13135
- [currentQuestionIndex]: !prev[currentQuestionIndex]
13104
+ [currentQuestionIndex]: trimmedValue.length > 0
13136
13105
  }));
13106
+ if (trimmedValue) {
13107
+ selectAndAdvance(getCurrentMultiSelectAnswer(true, inputValue));
13108
+ }
13137
13109
  return;
13138
13110
  }
13139
13111
  if (!trimmedValue) return;
@@ -13156,6 +13128,10 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13156
13128
  void onConfirm("cancel" /* Cancel */);
13157
13129
  return;
13158
13130
  }
13131
+ if (key.name === "return") {
13132
+ handleCustomInputSubmit();
13133
+ return;
13134
+ }
13159
13135
  return;
13160
13136
  }
13161
13137
  const input = key.sequence;
@@ -13181,8 +13157,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13181
13157
  setSelectedIndex(Math.min(totalOptions - 1, selectedIndex + 1));
13182
13158
  return;
13183
13159
  }
13184
- const numKey = parseInt(input || "", 10);
13185
- if (!isNaN(numKey) && numKey >= 1 && numKey <= totalOptions) {
13160
+ const numKey = input && /^[1-9]\d*$/.test(input) ? Number(input) : NaN;
13161
+ if (Number.isSafeInteger(numKey) && numKey <= totalOptions) {
13186
13162
  const targetIndex = numKey - 1;
13187
13163
  setSelectedIndex(targetIndex);
13188
13164
  if (!isMultiSelect && !isSubmitTab && currentQuestion && targetIndex < currentQuestion.options.length) {
@@ -13369,7 +13345,11 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13369
13345
  value: currentCustomInputValue,
13370
13346
  initialCursorOffset: currentCustomInputValue.length,
13371
13347
  onChange: (value) => {
13372
- const oldValue = customInputValues[currentQuestionIndex] ?? "";
13348
+ const oldValue = customInputValuesRef.current[currentQuestionIndex] ?? customInputValues[currentQuestionIndex] ?? "";
13349
+ customInputValuesRef.current = {
13350
+ ...customInputValuesRef.current,
13351
+ [currentQuestionIndex]: value
13352
+ };
13373
13353
  if (isMultiSelect && value !== oldValue) {
13374
13354
  setCustomInputChecked((prevChecked) => ({
13375
13355
  ...prevChecked,
@@ -13433,9 +13413,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
13433
13413
  const { onConfirm } = confirmationDetails;
13434
13414
  const settings = useSettings();
13435
13415
  const preferredEditor = settings.merged.general?.preferredEditor;
13436
- const [ideClient, setIdeClient] = (0, import_react18.useState)(null);
13437
- const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react18.useState)(false);
13438
- (0, import_react18.useEffect)(() => {
13416
+ const [ideClient, setIdeClient] = (0, import_react16.useState)(null);
13417
+ const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react16.useState)(false);
13418
+ (0, import_react16.useEffect)(() => {
13439
13419
  let isMounted = true;
13440
13420
  if (config.getIdeMode()) {
13441
13421
  const getIdeClient = /* @__PURE__ */ __name(async () => {
@@ -13820,7 +13800,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
13820
13800
 
13821
13801
  // packages/cli/src/ui/components/ShellInputPrompt.tsx
13822
13802
  init_esbuild_shims();
13823
- var import_react19 = __toESM(require_react(), 1);
13803
+ var import_react17 = __toESM(require_react(), 1);
13824
13804
 
13825
13805
  // packages/cli/src/ui/hooks/keyToAnsi.ts
13826
13806
  init_esbuild_shims();
@@ -13883,7 +13863,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13883
13863
  activeShellPtyId,
13884
13864
  focus = true
13885
13865
  }) => {
13886
- const handleShellInputSubmit = (0, import_react19.useCallback)(
13866
+ const handleShellInputSubmit = (0, import_react17.useCallback)(
13887
13867
  (input) => {
13888
13868
  if (activeShellPtyId) {
13889
13869
  ShellExecutionService.writeToPty(activeShellPtyId, input);
@@ -13891,7 +13871,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13891
13871
  },
13892
13872
  [activeShellPtyId]
13893
13873
  );
13894
- const handleInput = (0, import_react19.useCallback)(
13874
+ const handleInput = (0, import_react17.useCallback)(
13895
13875
  (key) => {
13896
13876
  if (!focus || !activeShellPtyId) {
13897
13877
  return;
@@ -13926,16 +13906,16 @@ init_esbuild_shims();
13926
13906
 
13927
13907
  // packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
13928
13908
  init_esbuild_shims();
13929
- var import_react22 = __toESM(require_react(), 1);
13909
+ var import_react20 = __toESM(require_react(), 1);
13930
13910
 
13931
13911
  // node_modules/ink-spinner/build/index.js
13932
13912
  init_esbuild_shims();
13933
- var import_react20 = __toESM(require_react(), 1);
13913
+ var import_react18 = __toESM(require_react(), 1);
13934
13914
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
13935
13915
  function Spinner({ type = "dots" }) {
13936
- const [frame, setFrame] = (0, import_react20.useState)(0);
13916
+ const [frame, setFrame] = (0, import_react18.useState)(0);
13937
13917
  const spinner = import_cli_spinners.default[type];
13938
- (0, import_react20.useEffect)(() => {
13918
+ (0, import_react18.useEffect)(() => {
13939
13919
  const timer = setInterval(() => {
13940
13920
  setFrame((previousFrame) => {
13941
13921
  const isLastFrame = previousFrame === spinner.frames.length - 1;
@@ -13946,19 +13926,19 @@ function Spinner({ type = "dots" }) {
13946
13926
  clearInterval(timer);
13947
13927
  };
13948
13928
  }, [spinner]);
13949
- return import_react20.default.createElement(Text, null, spinner.frames[frame]);
13929
+ return import_react18.default.createElement(Text, null, spinner.frames[frame]);
13950
13930
  }
13951
13931
  __name(Spinner, "Spinner");
13952
13932
  var build_default = Spinner;
13953
13933
 
13954
13934
  // packages/cli/src/ui/contexts/StreamingContext.tsx
13955
13935
  init_esbuild_shims();
13956
- var import_react21 = __toESM(require_react(), 1);
13957
- var StreamingContext = (0, import_react21.createContext)(
13936
+ var import_react19 = __toESM(require_react(), 1);
13937
+ var StreamingContext = (0, import_react19.createContext)(
13958
13938
  void 0
13959
13939
  );
13960
13940
  var useStreamingContext = /* @__PURE__ */ __name(() => {
13961
- const context = import_react21.default.useContext(StreamingContext);
13941
+ const context = import_react19.default.useContext(StreamingContext);
13962
13942
  if (context === void 0) {
13963
13943
  throw new Error(
13964
13944
  "useStreamingContext must be used within a StreamingContextProvider"
@@ -13993,8 +13973,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
13993
13973
  }) => {
13994
13974
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
13995
13975
  const isTmux = Boolean(process.env["TMUX"]);
13996
- const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react22.useState)(0);
13997
- (0, import_react22.useEffect)(() => {
13976
+ const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react20.useState)(0);
13977
+ (0, import_react20.useEffect)(() => {
13998
13978
  if (isScreenReaderEnabled || !isTmux) {
13999
13979
  return;
14000
13980
  }
@@ -14014,7 +13994,7 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
14014
13994
 
14015
13995
  // packages/cli/src/ui/components/shared/ToolStatusIndicator.tsx
14016
13996
  var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
14017
- var STATUS_INDICATOR_WIDTH = 3;
13997
+ var STATUS_INDICATOR_WIDTH = 2;
14018
13998
  var ToolStatusIndicator = /* @__PURE__ */ __name(({
14019
13999
  status,
14020
14000
  name
@@ -14039,15 +14019,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
14039
14019
 
14040
14020
  // packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
14041
14021
  init_esbuild_shims();
14042
- var import_react23 = __toESM(require_react(), 1);
14022
+ var import_react21 = __toESM(require_react(), 1);
14043
14023
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
14044
14024
  var ToolElapsedTime = /* @__PURE__ */ __name(({
14045
14025
  status,
14046
14026
  executionStartTime,
14047
14027
  timeoutMs
14048
14028
  }) => {
14049
- const [elapsedSeconds, setElapsedSeconds] = (0, import_react23.useState)(0);
14050
- (0, import_react23.useEffect)(() => {
14029
+ const [elapsedSeconds, setElapsedSeconds] = (0, import_react21.useState)(0);
14030
+ (0, import_react21.useEffect)(() => {
14051
14031
  if (status !== "Executing" /* Executing */ || !executionStartTime) {
14052
14032
  setElapsedSeconds(0);
14053
14033
  return;
@@ -14291,7 +14271,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
14291
14271
  };
14292
14272
  }
14293
14273
  __name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
14294
- var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react24.default.useMemo(() => {
14274
+ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react22.default.useMemo(() => {
14295
14275
  if (!resultDisplay) {
14296
14276
  return { type: "none" };
14297
14277
  }
@@ -14325,7 +14305,7 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
14325
14305
  const totalStr = progress.total != null ? `/${progress.total}` : "";
14326
14306
  return {
14327
14307
  type: "string",
14328
- data: `\u23F3 [${progress.progress}${totalStr}] ${msg}`
14308
+ data: `\u25CC [${progress.progress}${totalStr}] ${msg}`
14329
14309
  };
14330
14310
  }
14331
14311
  if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
@@ -14384,7 +14364,7 @@ var SubagentExecutionRenderer = /* @__PURE__ */ __name(({ data, availableHeight,
14384
14364
  const agentLabel = escapeAnsiCtrlCodes(data.subagentName || "agent");
14385
14365
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Box_default, { paddingLeft: 1, children: [
14386
14366
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Text, { color: theme.text.secondary, dimColor: true, children: [
14387
- "\u23F3 Queued approval:",
14367
+ "\u25CC Queued approval:",
14388
14368
  " "
14389
14369
  ] }),
14390
14370
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { dimColor: true, children: agentLabel })
@@ -14420,8 +14400,8 @@ var SubagentScrollbackSummary = /* @__PURE__ */ __name(({ data }) => {
14420
14400
  formatDuration(stats.totalDurationMs, { hideTrailingZeros: true })
14421
14401
  );
14422
14402
  }
14423
- if (stats?.totalTokens && stats.totalTokens > 0) {
14424
- parts.push(`${formatTokenCount(stats.totalTokens)} tokens`);
14403
+ if (stats?.outputTokens && stats.outputTokens > 0) {
14404
+ parts.push(`${formatTokenCount(stats.outputTokens)} tokens`);
14425
14405
  }
14426
14406
  const tail = parts.length > 0 ? ` \xB7 ${parts.join(" \xB7 ")}` : "";
14427
14407
  const typePrefix = data.subagentName ? `${escapeAnsiCtrlCodes(data.subagentName)}: ` : "";
@@ -14505,21 +14485,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
14505
14485
  }) => {
14506
14486
  const settings = useSettings();
14507
14487
  const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
14508
- const [lastUpdateTime, setLastUpdateTime] = import_react24.default.useState(null);
14509
- const [userHasFocused, setUserHasFocused] = import_react24.default.useState(false);
14510
- const [showFocusHint, setShowFocusHint] = import_react24.default.useState(false);
14511
- import_react24.default.useEffect(() => {
14488
+ const [lastUpdateTime, setLastUpdateTime] = import_react22.default.useState(null);
14489
+ const [userHasFocused, setUserHasFocused] = import_react22.default.useState(false);
14490
+ const [showFocusHint, setShowFocusHint] = import_react22.default.useState(false);
14491
+ import_react22.default.useEffect(() => {
14512
14492
  if (resultDisplay) {
14513
14493
  setLastUpdateTime(/* @__PURE__ */ new Date());
14514
14494
  }
14515
14495
  }, [resultDisplay]);
14516
- const shellTimeoutMs = import_react24.default.useMemo(() => {
14496
+ const shellTimeoutMs = import_react22.default.useMemo(() => {
14517
14497
  if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
14518
14498
  return resultDisplay.timeoutMs;
14519
14499
  }
14520
14500
  return void 0;
14521
14501
  }, [resultDisplay]);
14522
- import_react24.default.useEffect(() => {
14502
+ import_react22.default.useEffect(() => {
14523
14503
  if (!lastUpdateTime) {
14524
14504
  return;
14525
14505
  }
@@ -14528,7 +14508,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
14528
14508
  }, 5e3);
14529
14509
  return () => clearTimeout(timer);
14530
14510
  }, [lastUpdateTime]);
14531
- import_react24.default.useEffect(() => {
14511
+ import_react22.default.useEffect(() => {
14532
14512
  if (isThisShellFocused) {
14533
14513
  setUserHasFocused(true);
14534
14514
  }
@@ -14647,7 +14627,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
14647
14627
  status,
14648
14628
  emphasis
14649
14629
  }) => {
14650
- const nameColor = import_react24.default.useMemo(() => {
14630
+ const nameColor = import_react22.default.useMemo(() => {
14651
14631
  switch (emphasis) {
14652
14632
  case "high":
14653
14633
  return theme.text.primary;
@@ -14674,7 +14654,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
14674
14654
 
14675
14655
  // packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
14676
14656
  init_esbuild_shims();
14677
- var import_react25 = __toESM(require_react(), 1);
14657
+ var import_react23 = __toESM(require_react(), 1);
14678
14658
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
14679
14659
  function deriveAgentId(toolCall, resultDisplay) {
14680
14660
  return `${resultDisplay.subagentName}-${toolCall.callId}`;
@@ -14740,9 +14720,9 @@ function truncateMiddle(input, max) {
14740
14720
  return `${input.slice(0, head)}\u2026${input.slice(input.length - tail)}`;
14741
14721
  }
14742
14722
  __name(truncateMiddle, "truncateMiddle");
14743
- var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount }) => {
14744
- const config = (0, import_react25.useContext)(ConfigContext);
14745
- const agentEntries = (0, import_react25.useMemo)(() => {
14723
+ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
14724
+ const config = (0, import_react23.useContext)(ConfigContext);
14725
+ const agentEntries = (0, import_react23.useMemo)(() => {
14746
14726
  const out = [];
14747
14727
  for (const tc of toolCalls) {
14748
14728
  if (isAgentResult(tc.resultDisplay)) {
@@ -14751,19 +14731,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
14751
14731
  }
14752
14732
  return out;
14753
14733
  }, [toolCalls]);
14754
- const [now, setNow] = (0, import_react25.useState)(() => Date.now());
14755
- const hasLiveAgent = (0, import_react25.useMemo)(
14734
+ const [now, setNow] = (0, import_react23.useState)(() => Date.now());
14735
+ const hasLiveAgent = (0, import_react23.useMemo)(
14756
14736
  () => agentEntries.some(
14757
14737
  (e) => e.result.status === "running" || e.result.status === "background"
14758
14738
  ),
14759
14739
  [agentEntries]
14760
14740
  );
14761
- (0, import_react25.useEffect)(() => {
14741
+ (0, import_react23.useEffect)(() => {
14762
14742
  if (!hasLiveAgent) return;
14763
14743
  const id = setInterval(() => setNow(Date.now()), 1e3);
14764
14744
  return () => clearInterval(id);
14765
14745
  }, [hasLiveAgent]);
14766
- const rows = (0, import_react25.useMemo)(() => {
14746
+ const rows = (0, import_react23.useMemo)(() => {
14767
14747
  const registry = config?.getBackgroundTaskRegistry();
14768
14748
  void now;
14769
14749
  return agentEntries.map(({ toolCall, result }) => {
@@ -14779,7 +14759,7 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
14779
14759
  endTime: live?.endTime,
14780
14760
  fallbackElapsedMs: result.executionSummary?.totalDurationMs,
14781
14761
  recentActivity: recent ? { name: recent.name, description: recent.description } : void 0,
14782
- tokenCount: result.tokenCount ?? live?.stats?.totalTokens ?? result.executionSummary?.totalTokens
14762
+ tokenCount: result.tokenCount ?? live?.stats?.outputTokens ?? result.executionSummary?.outputTokens
14783
14763
  };
14784
14764
  });
14785
14765
  }, [agentEntries, config, now]);
@@ -14789,9 +14769,27 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
14789
14769
  ).length;
14790
14770
  const total = totalAgentCount ?? rows.length;
14791
14771
  const headerLabel = `Parallel agents \xB7 ${total} \xB7 ${doneCount}/${total} done`;
14772
+ const hasBudget = availableTerminalHeight != null && availableTerminalHeight > 0;
14773
+ let overflowCount = 0;
14774
+ let visibleRows = rows;
14775
+ if (hasBudget && rows.length + 1 > availableTerminalHeight) {
14776
+ if (availableTerminalHeight >= 2) {
14777
+ const rowsFit = availableTerminalHeight - 2;
14778
+ overflowCount = rows.length - rowsFit;
14779
+ visibleRows = rowsFit > 0 ? rows.slice(rows.length - rowsFit) : [];
14780
+ } else {
14781
+ visibleRows = [];
14782
+ }
14783
+ }
14792
14784
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "column", width: contentWidth, paddingX: 1, children: [
14793
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, children: headerLabel }) }),
14794
- rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AgentRow, { row, now }, row.agentId))
14785
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { bold: true, color: theme.text.accent, wrap: "truncate-end", children: headerLabel }) }),
14786
+ overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: [
14787
+ "\u2026 +",
14788
+ overflowCount,
14789
+ " more ",
14790
+ overflowCount === 1 ? "agent" : "agents"
14791
+ ] }) }),
14792
+ visibleRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AgentRow, { row, now }, row.agentId))
14795
14793
  ] });
14796
14794
  }, "InlineParallelAgentsDisplay");
14797
14795
  var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
@@ -14806,10 +14804,10 @@ var AgentRow = /* @__PURE__ */ __name(({ row, now }) => {
14806
14804
  if (tokens) trailingParts.push(`${tokens} tok`);
14807
14805
  const trailing = trailingParts.join(" \xB7 ");
14808
14806
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Box_default, { flexDirection: "row", children: [
14809
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, children: glyph }) }),
14807
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color, wrap: "truncate-end", children: glyph }) }),
14810
14808
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, marginRight: 1, width: NAME_COL_WIDTH, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { wrap: "truncate-end", children: displayName }) }),
14811
14809
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 1, flexGrow: 1, marginRight: 1, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: activity }) }),
14812
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, children: trailing }) })
14810
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box_default, { flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: trailing }) })
14813
14811
  ] });
14814
14812
  }, "AgentRow");
14815
14813
 
@@ -14864,27 +14862,27 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
14864
14862
  const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
14865
14863
  (t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
14866
14864
  );
14867
- const toolAwaitingApproval = (0, import_react26.useMemo)(
14865
+ const toolAwaitingApproval = (0, import_react24.useMemo)(
14868
14866
  () => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
14869
14867
  [toolCalls]
14870
14868
  );
14871
- const isMemoryOnlyGroup = (0, import_react26.useMemo)(
14869
+ const isMemoryOnlyGroup = (0, import_react24.useMemo)(
14872
14870
  () => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
14873
14871
  [toolCalls]
14874
14872
  );
14875
- const inlineToolCalls = (0, import_react26.useMemo)(
14873
+ const inlineToolCalls = (0, import_react24.useMemo)(
14876
14874
  () => isPending ? toolCalls.filter(
14877
14875
  (tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
14878
14876
  ) : toolCalls,
14879
14877
  [isPending, toolCalls]
14880
14878
  );
14881
- const subagentsAwaitingApproval = (0, import_react26.useMemo)(
14879
+ const subagentsAwaitingApproval = (0, import_react24.useMemo)(
14882
14880
  () => toolCalls.filter(
14883
14881
  (tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
14884
14882
  ),
14885
14883
  [toolCalls]
14886
14884
  );
14887
- const focusedSubagentRef = (0, import_react26.useRef)(null);
14885
+ const focusedSubagentRef = (0, import_react24.useRef)(null);
14888
14886
  const stillPending = subagentsAwaitingApproval.some(
14889
14887
  (tc) => tc.callId === focusedSubagentRef.current
14890
14888
  );
@@ -14892,18 +14890,23 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
14892
14890
  focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
14893
14891
  }
14894
14892
  const focusedSubagentCallId = focusedSubagentRef.current;
14895
- const runningSubagentCallId = (0, import_react26.useMemo)(
14893
+ const runningSubagentCallId = (0, import_react24.useMemo)(
14896
14894
  () => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
14897
14895
  [toolCalls]
14898
14896
  );
14899
14897
  const keyboardFocusedSubagentCallId = focusedSubagentCallId ?? runningSubagentCallId;
14900
14898
  const hasSubagentPendingConfirmation = subagentsAwaitingApproval.length > 0;
14901
14899
  if (isPureParallelAgentGroup(toolCalls) && !hasSubagentPendingConfirmation) {
14900
+ if (inlineToolCalls.length === 0) {
14901
+ return null;
14902
+ }
14902
14903
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
14903
14904
  InlineParallelAgentsDisplay,
14904
14905
  {
14905
- toolCalls,
14906
- contentWidth
14906
+ toolCalls: inlineToolCalls,
14907
+ contentWidth,
14908
+ totalAgentCount: toolCalls.length,
14909
+ availableTerminalHeight: isPending ? availableTerminalHeight : void 0
14907
14910
  }
14908
14911
  );
14909
14912
  }
@@ -15063,7 +15066,7 @@ function CompressionMessage({
15063
15066
  }, "getCompressionText");
15064
15067
  const text = getCompressionText();
15065
15068
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Box_default, { flexDirection: "row", children: [
15066
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\u2726" }) }),
15069
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { marginRight: 1, children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(build_default, { type: "dots" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { color: theme.text.accent, children: "\u25C6" }) }),
15067
15070
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
15068
15071
  Text,
15069
15072
  {
@@ -15122,7 +15125,7 @@ init_esbuild_shims();
15122
15125
 
15123
15126
  // node_modules/ink-link/dist/index.js
15124
15127
  init_esbuild_shims();
15125
- var import_react27 = __toESM(require_react(), 1);
15128
+ var import_react25 = __toESM(require_react(), 1);
15126
15129
  var import_prop_types = __toESM(require_prop_types(), 1);
15127
15130
 
15128
15131
  // node_modules/ink-link/node_modules/terminal-link/index.js
@@ -15270,10 +15273,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
15270
15273
  // node_modules/ink-link/dist/index.js
15271
15274
  var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
15272
15275
  // eslint-disable-line react/function-component-definition
15273
- import_react27.default.createElement(
15276
+ import_react25.default.createElement(
15274
15277
  Transform,
15275
15278
  { transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
15276
- import_react27.default.createElement(Text, null, children)
15279
+ import_react25.default.createElement(Text, null, children)
15277
15280
  )
15278
15281
  ), "Link");
15279
15282
  Link.propTypes = {
@@ -15374,7 +15377,7 @@ var VisionNoticeMessage = /* @__PURE__ */ __name(({ text }) => /* @__PURE__ */ (
15374
15377
  StatusMessage,
15375
15378
  {
15376
15379
  text,
15377
- prefix: "\u{1F50E}",
15380
+ prefix: "\u25CE",
15378
15381
  prefixColor: theme.text.secondary,
15379
15382
  textColor: theme.text.secondary
15380
15383
  }
@@ -15427,7 +15430,7 @@ init_esbuild_shims();
15427
15430
 
15428
15431
  // node_modules/ink-gradient/dist/index.js
15429
15432
  init_esbuild_shims();
15430
- var import_react28 = __toESM(require_react(), 1);
15433
+ var import_react26 = __toESM(require_react(), 1);
15431
15434
  var import_prop_types2 = __toESM(require_prop_types(), 1);
15432
15435
  var import_gradient_string = __toESM(require_gradient_string(), 1);
15433
15436
  var Gradient = /* @__PURE__ */ __name((props) => {
@@ -15443,7 +15446,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
15443
15446
  throw new Error("Either `name` or `colors` prop must be provided");
15444
15447
  }
15445
15448
  const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
15446
- return import_react28.default.createElement(Transform, { transform: applyGradient }, props.children);
15449
+ return import_react26.default.createElement(Transform, { transform: applyGradient }, props.children);
15447
15450
  }, "Gradient");
15448
15451
  Gradient.propTypes = {
15449
15452
  children: import_prop_types2.default.oneOfType([
@@ -16243,7 +16246,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
16243
16246
 
16244
16247
  // packages/cli/src/ui/components/Help.tsx
16245
16248
  init_esbuild_shims();
16246
- var import_react29 = __toESM(require_react(), 1);
16249
+ var import_react27 = __toESM(require_react(), 1);
16247
16250
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
16248
16251
  var DEFAULT_WIDTH = 100;
16249
16252
  var KEY_COL_WIDTH = 20;
@@ -16264,7 +16267,7 @@ var Help = /* @__PURE__ */ __name(({
16264
16267
  }) => {
16265
16268
  const safeWidth = Math.max(72, width);
16266
16269
  const bodyWidth = safeWidth - 6;
16267
- const handleTabChange = (0, import_react29.useCallback)(
16270
+ const handleTabChange = (0, import_react27.useCallback)(
16268
16271
  (direction) => {
16269
16272
  const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
16270
16273
  const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
@@ -16401,20 +16404,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
16401
16404
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
16402
16405
  ] }), "ShortcutRow");
16403
16406
  var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
16404
- const groups = (0, import_react29.useMemo)(
16407
+ const groups = (0, import_react27.useMemo)(
16405
16408
  () => groupCommands(commands, customOnly),
16406
16409
  [commands, customOnly]
16407
16410
  );
16408
- const lines = (0, import_react29.useMemo)(
16411
+ const lines = (0, import_react27.useMemo)(
16409
16412
  () => renderCommandLines(groups, width),
16410
16413
  [groups, width]
16411
16414
  );
16412
16415
  const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
16413
- const [scrollOffset, setScrollOffset] = (0, import_react29.useState)(0);
16414
- (0, import_react29.useEffect)(() => {
16416
+ const [scrollOffset, setScrollOffset] = (0, import_react27.useState)(0);
16417
+ (0, import_react27.useEffect)(() => {
16415
16418
  setScrollOffset(0);
16416
16419
  }, [customOnly, commands]);
16417
- (0, import_react29.useEffect)(() => {
16420
+ (0, import_react27.useEffect)(() => {
16418
16421
  setScrollOffset((offset) => Math.min(offset, maxScroll));
16419
16422
  }, [maxScroll]);
16420
16423
  useKeypress(
@@ -16602,26 +16605,26 @@ init_esbuild_shims();
16602
16605
 
16603
16606
  // packages/cli/src/ui/contexts/UIStateContext.tsx
16604
16607
  init_esbuild_shims();
16605
- var import_react36 = __toESM(require_react(), 1);
16608
+ var import_react34 = __toESM(require_react(), 1);
16606
16609
 
16607
16610
  // packages/cli/src/ui/hooks/useHistoryManager.ts
16608
16611
  init_esbuild_shims();
16609
- var import_react30 = __toESM(require_react(), 1);
16612
+ var import_react28 = __toESM(require_react(), 1);
16610
16613
  import process2 from "node:process";
16611
16614
  var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
16612
16615
  var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
16613
16616
  var UI_COMPACT_KEEP_RECENT = 20;
16614
16617
  function useHistory() {
16615
- const [history, setHistory] = (0, import_react30.useState)([]);
16616
- const messageIdCounterRef = (0, import_react30.useRef)(0);
16617
- const getNextMessageId = (0, import_react30.useCallback)((baseTimestamp) => {
16618
+ const [history, setHistory] = (0, import_react28.useState)([]);
16619
+ const messageIdCounterRef = (0, import_react28.useRef)(0);
16620
+ const getNextMessageId = (0, import_react28.useCallback)((baseTimestamp) => {
16618
16621
  messageIdCounterRef.current += 1;
16619
16622
  return baseTimestamp + messageIdCounterRef.current;
16620
16623
  }, []);
16621
- const loadHistory = (0, import_react30.useCallback)((newHistory) => {
16624
+ const loadHistory = (0, import_react28.useCallback)((newHistory) => {
16622
16625
  setHistory(newHistory);
16623
16626
  }, []);
16624
- const addItem = (0, import_react30.useCallback)(
16627
+ const addItem = (0, import_react28.useCallback)(
16625
16628
  (itemData, baseTimestamp) => {
16626
16629
  const id = getNextMessageId(baseTimestamp);
16627
16630
  const newItem = { ...itemData, id };
@@ -16645,7 +16648,7 @@ function useHistory() {
16645
16648
  },
16646
16649
  [getNextMessageId]
16647
16650
  );
16648
- const updateItem = (0, import_react30.useCallback)(
16651
+ const updateItem = (0, import_react28.useCallback)(
16649
16652
  (id, updates) => {
16650
16653
  setHistory((prevHistory) => {
16651
16654
  let updated = false;
@@ -16668,7 +16671,7 @@ function useHistory() {
16668
16671
  },
16669
16672
  []
16670
16673
  );
16671
- const clearItems = (0, import_react30.useCallback)(() => {
16674
+ const clearItems = (0, import_react28.useCallback)(() => {
16672
16675
  if (debugLogger6.isEnabled()) {
16673
16676
  debugLogger6.debug(
16674
16677
  `[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
@@ -16677,13 +16680,13 @@ function useHistory() {
16677
16680
  setHistory([]);
16678
16681
  messageIdCounterRef.current = 0;
16679
16682
  }, []);
16680
- const truncateToItem = (0, import_react30.useCallback)((itemId) => {
16683
+ const truncateToItem = (0, import_react28.useCallback)((itemId) => {
16681
16684
  setHistory((prev) => {
16682
16685
  const index = prev.findIndex((h) => h.id === itemId);
16683
16686
  return index === -1 ? prev : prev.slice(0, index);
16684
16687
  });
16685
16688
  }, []);
16686
- const compactOldItems = (0, import_react30.useCallback)(() => {
16689
+ const compactOldItems = (0, import_react28.useCallback)(() => {
16687
16690
  setHistory((prev) => {
16688
16691
  if (prev.length === 0) return prev;
16689
16692
  let thoughtRemoved = 0;
@@ -16747,7 +16750,7 @@ function useHistory() {
16747
16750
  return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
16748
16751
  });
16749
16752
  }, []);
16750
- return (0, import_react30.useMemo)(
16753
+ return (0, import_react28.useMemo)(
16751
16754
  () => ({
16752
16755
  history,
16753
16756
  addItem,
@@ -16772,7 +16775,7 @@ __name(useHistory, "useHistory");
16772
16775
 
16773
16776
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
16774
16777
  init_esbuild_shims();
16775
- var import_react33 = __toESM(require_react(), 1);
16778
+ var import_react31 = __toESM(require_react(), 1);
16776
16779
 
16777
16780
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
16778
16781
  init_esbuild_shims();
@@ -16894,7 +16897,7 @@ function CommandFormatMigrationNudge({
16894
16897
  children: [
16895
16898
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Box_default, { marginBottom: 1, flexDirection: "column", children: [
16896
16899
  /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Text, { children: [
16897
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0\uFE0F " }),
16900
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.status.warning, children: "\u26A0 " }),
16898
16901
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { bold: true, children: t("Command Format Migration") })
16899
16902
  ] }),
16900
16903
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Text, { color: theme.text.secondary, children: count > 1 ? t("Found {{count}} TOML command files:", { count: String(count) }) : t("Found {{count}} TOML command file:", { count: String(count) }) }),
@@ -16914,7 +16917,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
16914
16917
 
16915
16918
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
16916
16919
  init_esbuild_shims();
16917
- var import_react31 = __toESM(require_react(), 1);
16920
+ var import_react29 = __toESM(require_react(), 1);
16918
16921
  import * as process3 from "node:process";
16919
16922
  import * as path2 from "node:path";
16920
16923
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
@@ -16922,7 +16925,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
16922
16925
  onSelect,
16923
16926
  isRestarting
16924
16927
  }) => {
16925
- (0, import_react31.useEffect)(() => {
16928
+ (0, import_react29.useEffect)(() => {
16926
16929
  const doRelaunch = /* @__PURE__ */ __name(async () => {
16927
16930
  if (isRestarting) {
16928
16931
  setTimeout(async () => {
@@ -17050,16 +17053,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
17050
17053
 
17051
17054
  // packages/cli/src/ui/hooks/useArenaCommand.ts
17052
17055
  init_esbuild_shims();
17053
- var import_react32 = __toESM(require_react(), 1);
17056
+ var import_react30 = __toESM(require_react(), 1);
17054
17057
  function useArenaCommand() {
17055
- const [activeArenaDialog, setActiveArenaDialog] = (0, import_react32.useState)(null);
17056
- const openArenaDialog = (0, import_react32.useCallback)(
17058
+ const [activeArenaDialog, setActiveArenaDialog] = (0, import_react30.useState)(null);
17059
+ const openArenaDialog = (0, import_react30.useCallback)(
17057
17060
  (type) => {
17058
17061
  setActiveArenaDialog(type);
17059
17062
  },
17060
17063
  []
17061
17064
  );
17062
- const closeArenaDialog = (0, import_react32.useCallback)(() => {
17065
+ const closeArenaDialog = (0, import_react30.useCallback)(() => {
17063
17066
  setActiveArenaDialog(null);
17064
17067
  }, []);
17065
17068
  return {
@@ -17071,9 +17074,9 @@ function useArenaCommand() {
17071
17074
  __name(useArenaCommand, "useArenaCommand");
17072
17075
 
17073
17076
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
17074
- var UIActionsContext = (0, import_react33.createContext)(null);
17077
+ var UIActionsContext = (0, import_react31.createContext)(null);
17075
17078
  var useUIActions = /* @__PURE__ */ __name(() => {
17076
- const context = (0, import_react33.useContext)(UIActionsContext);
17079
+ const context = (0, import_react31.useContext)(UIActionsContext);
17077
17080
  if (!context) {
17078
17081
  throw new Error("useUIActions must be used within a UIActionsProvider");
17079
17082
  }
@@ -17082,16 +17085,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
17082
17085
 
17083
17086
  // packages/cli/src/ui/hooks/useIdeTrustListener.ts
17084
17087
  init_esbuild_shims();
17085
- var import_react34 = __toESM(require_react(), 1);
17088
+ var import_react32 = __toESM(require_react(), 1);
17086
17089
  function useIdeTrustListener() {
17087
17090
  const settings = useSettings();
17088
- const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
17091
+ const [connectionStatus, setConnectionStatus] = (0, import_react32.useState)(
17089
17092
  "disconnected" /* Disconnected */
17090
17093
  );
17091
- const previousTrust = (0, import_react34.useRef)(void 0);
17092
- const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
17093
- const [needsRestart, setNeedsRestart] = (0, import_react34.useState)(false);
17094
- const subscribe = (0, import_react34.useCallback)((onStoreChange) => {
17094
+ const previousTrust = (0, import_react32.useRef)(void 0);
17095
+ const [restartReason, setRestartReason] = (0, import_react32.useState)("NONE");
17096
+ const [needsRestart, setNeedsRestart] = (0, import_react32.useState)(false);
17097
+ const subscribe = (0, import_react32.useCallback)((onStoreChange) => {
17095
17098
  const handleStatusChange = /* @__PURE__ */ __name((state) => {
17096
17099
  setConnectionStatus(state.status);
17097
17100
  setRestartReason("CONNECTION_CHANGE");
@@ -17121,8 +17124,8 @@ function useIdeTrustListener() {
17121
17124
  }
17122
17125
  return ideContextStore.get()?.workspaceState?.isTrusted;
17123
17126
  }, "getSnapshot");
17124
- const isIdeTrusted = (0, import_react34.useSyncExternalStore)(subscribe, getSnapshot);
17125
- (0, import_react34.useEffect)(() => {
17127
+ const isIdeTrusted = (0, import_react32.useSyncExternalStore)(subscribe, getSnapshot);
17128
+ (0, import_react32.useEffect)(() => {
17126
17129
  const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
17127
17130
  if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
17128
17131
  setNeedsRestart(true);
@@ -17135,7 +17138,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
17135
17138
 
17136
17139
  // packages/cli/src/ui/hooks/useProviderUpdates.ts
17137
17140
  init_esbuild_shims();
17138
- var import_react35 = __toESM(require_react(), 1);
17141
+ var import_react33 = __toESM(require_react(), 1);
17139
17142
  function getProviderMetadata(settings, metadataKey) {
17140
17143
  const mergedSettings = settings.merged;
17141
17144
  const ns = mergedSettings[PROVIDER_METADATA_NS];
@@ -17234,9 +17237,9 @@ function findAllPendingUpdates(settings, currentModel) {
17234
17237
  }
17235
17238
  __name(findAllPendingUpdates, "findAllPendingUpdates");
17236
17239
  function useProviderUpdates(settings, config, addItem) {
17237
- const [updateRequest, setUpdateRequest] = (0, import_react35.useState)();
17238
- const migrated = (0, import_react35.useRef)(false);
17239
- const executeUpdate = (0, import_react35.useCallback)(
17240
+ const [updateRequest, setUpdateRequest] = (0, import_react33.useState)();
17241
+ const migrated = (0, import_react33.useRef)(false);
17242
+ const executeUpdate = (0, import_react33.useCallback)(
17240
17243
  async (providerCfg, baseUrl) => {
17241
17244
  try {
17242
17245
  const resolved = resolveBaseUrl(providerCfg, baseUrl);
@@ -17316,7 +17319,7 @@ function useProviderUpdates(settings, config, addItem) {
17316
17319
  },
17317
17320
  [settings, config, addItem]
17318
17321
  );
17319
- const checkForUpdates = (0, import_react35.useCallback)(() => {
17322
+ const checkForUpdates = (0, import_react33.useCallback)(() => {
17320
17323
  if (!migrated.current) {
17321
17324
  migrated.current = true;
17322
17325
  migrateProviderMetadata(settings);
@@ -17349,10 +17352,10 @@ function useProviderUpdates(settings, config, addItem) {
17349
17352
  }, "onConfirm")
17350
17353
  });
17351
17354
  }, [settings, config, executeUpdate]);
17352
- (0, import_react35.useEffect)(() => {
17355
+ (0, import_react33.useEffect)(() => {
17353
17356
  checkForUpdates();
17354
17357
  }, [checkForUpdates]);
17355
- const dismissProviderUpdate = (0, import_react35.useCallback)(() => {
17358
+ const dismissProviderUpdate = (0, import_react33.useCallback)(() => {
17356
17359
  setUpdateRequest(void 0);
17357
17360
  }, []);
17358
17361
  return {
@@ -17363,9 +17366,9 @@ function useProviderUpdates(settings, config, addItem) {
17363
17366
  __name(useProviderUpdates, "useProviderUpdates");
17364
17367
 
17365
17368
  // packages/cli/src/ui/contexts/UIStateContext.tsx
17366
- var UIStateContext = (0, import_react36.createContext)(null);
17369
+ var UIStateContext = (0, import_react34.createContext)(null);
17367
17370
  var useUIState = /* @__PURE__ */ __name(() => {
17368
- const context = (0, import_react36.useContext)(UIStateContext);
17371
+ const context = (0, import_react34.useContext)(UIStateContext);
17369
17372
  if (!context) {
17370
17373
  throw new Error("useUIState must be used within a UIStateProvider");
17371
17374
  }
@@ -17554,7 +17557,7 @@ var McpStatus = /* @__PURE__ */ __name(({
17554
17557
  }
17555
17558
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", children: [
17556
17559
  discoveryInProgress && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
17557
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u23F3 MCP servers are starting up ({{count}} initializing)...", {
17560
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.warning, children: t("\u25CC MCP servers are starting up ({{count}} initializing)...", {
17558
17561
  count: String(connectingServers.length)
17559
17562
  }) }),
17560
17563
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.primary, children: t(
@@ -17579,18 +17582,18 @@ var McpStatus = /* @__PURE__ */ __name(({
17579
17582
  let statusColor = theme.text.primary;
17580
17583
  switch (status) {
17581
17584
  case "connected" /* CONNECTED */:
17582
- statusIndicator = "\u{1F7E2}";
17585
+ statusIndicator = "\u25CF";
17583
17586
  statusText = t("Ready");
17584
17587
  statusColor = theme.status.success;
17585
17588
  break;
17586
17589
  case "connecting" /* CONNECTING */:
17587
- statusIndicator = "\u{1F504}";
17590
+ statusIndicator = "\u25D0";
17588
17591
  statusText = t("Starting... (first startup may take longer)");
17589
17592
  statusColor = theme.status.warning;
17590
17593
  break;
17591
17594
  case "disconnected" /* DISCONNECTED */:
17592
17595
  default:
17593
- statusIndicator = "\u{1F534}";
17596
+ statusIndicator = "\u25CF";
17594
17597
  statusText = t("Disconnected");
17595
17598
  statusColor = theme.status.error;
17596
17599
  break;
@@ -17695,7 +17698,7 @@ var McpStatus = /* @__PURE__ */ __name(({
17695
17698
  ] }, serverName);
17696
17699
  }),
17697
17700
  blockedServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { marginBottom: 1, children: [
17698
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u{1F534} " }),
17701
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.status.error, children: "\u25CF " }),
17699
17702
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { bold: true, children: [
17700
17703
  server.name,
17701
17704
  server.extensionName ? ` ${t("(from {{extensionName}})", {
@@ -17708,7 +17711,7 @@ var McpStatus = /* @__PURE__ */ __name(({
17708
17711
  ] })
17709
17712
  ] }, server.name)),
17710
17713
  showTips && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
17711
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u{1F4A1} Tips:") }),
17714
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text, { color: theme.text.accent, children: t("\u2605 Tips:") }),
17712
17715
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Text, { children: [
17713
17716
  " ",
17714
17717
  "- ",
@@ -18474,7 +18477,7 @@ var ArenaSessionCard = /* @__PURE__ */ __name(({
18474
18477
  " "
18475
18478
  ] }),
18476
18479
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { color: theme.text.primary, children: [
18477
- agent.totalTokens.toLocaleString(),
18480
+ agent.outputTokens.toLocaleString(),
18478
18481
  " tokens \xB7 runtime",
18479
18482
  " ",
18480
18483
  formatDuration(agent.durationMs)
@@ -18540,7 +18543,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
18540
18543
 
18541
18544
  // packages/cli/src/ui/components/messages/BtwMessage.tsx
18542
18545
  init_esbuild_shims();
18543
- var import_react37 = __toESM(require_react(), 1);
18546
+ var import_react35 = __toESM(require_react(), 1);
18544
18547
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
18545
18548
  var BTW_SELF_CHROME = 4;
18546
18549
  function normalizeCodeFences(text) {
@@ -18588,7 +18591,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
18588
18591
  }
18589
18592
  );
18590
18593
  }, "BtwMessageInternal");
18591
- var BtwMessage = import_react37.default.memo(BtwMessageInternal);
18594
+ var BtwMessage = import_react35.default.memo(BtwMessageInternal);
18592
18595
 
18593
18596
  // packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
18594
18597
  init_esbuild_shims();
@@ -18707,7 +18710,7 @@ __name(padRight, "padRight");
18707
18710
 
18708
18711
  // packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
18709
18712
  init_esbuild_shims();
18710
- var import_react38 = __toESM(require_react(), 1);
18713
+ var import_react36 = __toESM(require_react(), 1);
18711
18714
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
18712
18715
  var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
18713
18716
  function assertNeverGoalStatusKind(kind) {
@@ -18808,112 +18811,25 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
18808
18811
  ] })
18809
18812
  ] });
18810
18813
  }, "GoalStatusMessageInternal");
18811
- var GoalStatusMessage = import_react38.default.memo(GoalStatusMessageInternal);
18814
+ var GoalStatusMessage = import_react36.default.memo(GoalStatusMessageInternal);
18812
18815
 
18813
18816
  // packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
18814
18817
  init_esbuild_shims();
18815
- var import_react39 = __toESM(require_react(), 1);
18816
- var ThoughtExpandedContext = (0, import_react39.createContext)(false);
18817
- var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react39.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
18818
+ var import_react37 = __toESM(require_react(), 1);
18819
+ var ThoughtExpandedContext = (0, import_react37.createContext)(false);
18820
+ var useThoughtExpanded = /* @__PURE__ */ __name(() => (0, import_react37.useContext)(ThoughtExpandedContext), "useThoughtExpanded");
18818
18821
  var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
18819
18822
 
18820
18823
  // packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
18821
18824
  init_esbuild_shims();
18822
- var import_react40 = __toESM(require_react(), 1);
18823
- var ThinkingViewerContext = (0, import_react40.createContext)({
18825
+ var import_react38 = __toESM(require_react(), 1);
18826
+ var ThinkingViewerContext = (0, import_react38.createContext)({
18824
18827
  openThinkingViewer: /* @__PURE__ */ __name(() => {
18825
18828
  }, "openThinkingViewer")
18826
18829
  });
18827
- var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThinkingViewerContext), "useThinkingViewer");
18830
+ var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react38.useContext)(ThinkingViewerContext), "useThinkingViewer");
18828
18831
  var ThinkingViewerProvider = ThinkingViewerContext.Provider;
18829
18832
 
18830
- // packages/cli/src/ui/hooks/useMouseEvents.ts
18831
- init_esbuild_shims();
18832
- var import_react41 = __toESM(require_react(), 1);
18833
- var mouseModeRefs = /* @__PURE__ */ new Map();
18834
- var disableAllMouseModes = /* @__PURE__ */ __name(() => {
18835
- for (const stdout of mouseModeRefs.keys()) {
18836
- disableMouseEvents(stdout);
18837
- }
18838
- mouseModeRefs.clear();
18839
- }, "disableAllMouseModes");
18840
- function acquireMouseMode(stdout) {
18841
- const entry = mouseModeRefs.get(stdout);
18842
- if (entry) {
18843
- entry.refs += 1;
18844
- return;
18845
- }
18846
- enableMouseEvents(stdout);
18847
- if (mouseModeRefs.size === 0) {
18848
- process.on("exit", disableAllMouseModes);
18849
- }
18850
- mouseModeRefs.set(stdout, { refs: 1 });
18851
- }
18852
- __name(acquireMouseMode, "acquireMouseMode");
18853
- function releaseMouseMode(stdout) {
18854
- const entry = mouseModeRefs.get(stdout);
18855
- if (!entry) return;
18856
- entry.refs -= 1;
18857
- if (entry.refs <= 0) {
18858
- mouseModeRefs.delete(stdout);
18859
- disableMouseEvents(stdout);
18860
- if (mouseModeRefs.size === 0) {
18861
- process.removeListener("exit", disableAllMouseModes);
18862
- }
18863
- }
18864
- }
18865
- __name(releaseMouseMode, "releaseMouseMode");
18866
- function useMouseEvents(handler, { isActive }) {
18867
- const { isRawModeSupported } = use_stdin_default();
18868
- const { stdout } = use_stdout_default();
18869
- const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
18870
- const handlerRef = (0, import_react41.useRef)(handler);
18871
- handlerRef.current = handler;
18872
- const enabled = isActive && isRawModeSupported;
18873
- (0, import_react41.useEffect)(() => {
18874
- if (!enabled) return;
18875
- acquireMouseMode(stdout);
18876
- return () => {
18877
- releaseMouseMode(stdout);
18878
- };
18879
- }, [enabled, stdout]);
18880
- const mouseCallback = (0, import_react41.useCallback)((event) => {
18881
- handlerRef.current(event);
18882
- }, []);
18883
- (0, import_react41.useEffect)(() => {
18884
- if (!enabled) return;
18885
- subscribeMouse(mouseCallback);
18886
- return () => unsubscribeMouse(mouseCallback);
18887
- }, [enabled, subscribeMouse, unsubscribeMouse, mouseCallback]);
18888
- }
18889
- __name(useMouseEvents, "useMouseEvents");
18890
-
18891
- // packages/cli/src/ui/utils/measure-element-position.ts
18892
- init_esbuild_shims();
18893
- function measureElementPosition(node) {
18894
- const { yogaNode } = node;
18895
- if (!yogaNode) {
18896
- return { x: 0, y: 0, width: 0, height: 0 };
18897
- }
18898
- let x = yogaNode.getComputedLeft();
18899
- let y = yogaNode.getComputedTop();
18900
- let current = node.parentNode;
18901
- while (current) {
18902
- if (current.yogaNode) {
18903
- x += current.yogaNode.getComputedLeft();
18904
- y += current.yogaNode.getComputedTop();
18905
- }
18906
- current = current.parentNode;
18907
- }
18908
- return {
18909
- x,
18910
- y,
18911
- width: yogaNode.getComputedWidth(),
18912
- height: yogaNode.getComputedHeight()
18913
- };
18914
- }
18915
- __name(measureElementPosition, "measureElementPosition");
18916
-
18917
18833
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
18918
18834
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
18919
18835
  var ClickableThinkMessage = /* @__PURE__ */ __name(({
@@ -18925,15 +18841,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
18925
18841
  contentWidth,
18926
18842
  durationMs
18927
18843
  }) => {
18928
- const ref = (0, import_react42.useRef)(null);
18844
+ const ref = (0, import_react39.useRef)(null);
18929
18845
  const { openThinkingViewer } = useThinkingViewer();
18930
18846
  const isActive = !isPending && !expanded;
18931
- const sanitizedViewerText = (0, import_react42.useMemo)(
18847
+ const sanitizedViewerText = (0, import_react39.useMemo)(
18932
18848
  () => escapeAnsiCtrlCodes(viewerText),
18933
18849
  [viewerText]
18934
18850
  );
18935
18851
  useMouseEvents(
18936
- (0, import_react42.useCallback)(
18852
+ (0, import_react39.useCallback)(
18937
18853
  (event) => {
18938
18854
  if (event.name !== "left-press" || !ref.current) return;
18939
18855
  const metrics = measureElementPosition(ref.current);
@@ -19012,7 +18928,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
19012
18928
  const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
19013
18929
  const settings = useSettings();
19014
18930
  const showTimestamps = settings.merged.output?.showTimestamps === true;
19015
- const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
18931
+ const itemForDisplay = (0, import_react39.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
19016
18932
  const contentWidth = terminalWidth - 4;
19017
18933
  const boxWidth = mainAreaWidth || contentWidth;
19018
18934
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
@@ -19230,9 +19146,9 @@ function SessionPreview(props) {
19230
19146
  onResume
19231
19147
  } = props;
19232
19148
  const { columns } = useTerminalSize();
19233
- const [data, setData] = (0, import_react43.useState)(null);
19234
- const [error, setError] = (0, import_react43.useState)(null);
19235
- (0, import_react43.useEffect)(() => {
19149
+ const [data, setData] = (0, import_react40.useState)(null);
19150
+ const [error, setError] = (0, import_react40.useState)(null);
19151
+ (0, import_react40.useEffect)(() => {
19236
19152
  let cancelled = false;
19237
19153
  setData(null);
19238
19154
  setError(null);
@@ -19251,11 +19167,11 @@ function SessionPreview(props) {
19251
19167
  cancelled = true;
19252
19168
  };
19253
19169
  }, [sessionService, sessionId]);
19254
- const items = (0, import_react43.useMemo)(() => {
19170
+ const items = (0, import_react40.useMemo)(() => {
19255
19171
  if (!data) return [];
19256
19172
  return buildResumedHistoryItems(data, null);
19257
19173
  }, [data]);
19258
- const computedMessageCount = (0, import_react43.useMemo)(() => {
19174
+ const computedMessageCount = (0, import_react40.useMemo)(() => {
19259
19175
  if (!data) return void 0;
19260
19176
  const seen = /* @__PURE__ */ new Set();
19261
19177
  for (const msg of data.conversation.messages) {
@@ -19563,10 +19479,10 @@ __name(SessionPicker, "SessionPicker");
19563
19479
  export {
19564
19480
  ConfigContext,
19565
19481
  useConfig,
19566
- SettingsContext,
19567
- useSettings,
19568
19482
  truncateText,
19569
- useTerminalSize,
19483
+ removeLastGrapheme,
19484
+ isDeletionKey,
19485
+ isPrintableSearchChar,
19570
19486
  loadLowlight,
19571
19487
  colorizeCode,
19572
19488
  sanitizeForOsc,
@@ -19604,6 +19520,7 @@ export {
19604
19520
  GeminiRespondingSpinner,
19605
19521
  GeminiSpinner,
19606
19522
  dist_default,
19523
+ AboutBox,
19607
19524
  dist_default2,
19608
19525
  getRenderableGradientColors,
19609
19526
  Help,
@@ -19624,8 +19541,6 @@ export {
19624
19541
  BtwMessage,
19625
19542
  ThoughtExpandedProvider,
19626
19543
  ThinkingViewerProvider,
19627
- useMouseEvents,
19628
- measureElementPosition,
19629
19544
  HistoryItemDisplayComponent,
19630
19545
  SessionPicker
19631
19546
  };
@@ -19654,22 +19569,3 @@ export {
19654
19569
  * Copyright 2025 Qwen Team
19655
19570
  * SPDX-License-Identifier: Apache-2.0
19656
19571
  */
19657
- /**
19658
- * @license
19659
- * Copyright 2025 Qwen
19660
- * SPDX-License-Identifier: Apache-2.0
19661
- *
19662
- * Inspired by gemini-cli's MouseContext (Google LLC, Apache-2.0): enable SGR
19663
- * mouse mode while at least one subscriber is active, parse mouse sequences
19664
- * out of the KeypressContext pipeline, call each handler, restore on cleanup.
19665
- */
19666
- /**
19667
- * @license
19668
- * Copyright 2025 Qwen Team
19669
- * SPDX-License-Identifier: Apache-2.0
19670
- *
19671
- * Shim for ink PR #968 (vadimdemedes/ink#968): extends measureElement()
19672
- * to return {x, y, width, height}. Once the upstream PR is merged and
19673
- * ink is upgraded, replace usages with `measureElement` from 'ink'
19674
- * and delete this file.
19675
- */