@qwen-code/qwen-code 0.19.3-nightly.20260701.a974594d7 → 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 (234) hide show
  1. package/bundled/loop/loop-tick-resolver.test.ts +42 -0
  2. package/bundled/loop/loop-tick-resolver.ts +1 -1
  3. package/bundled/qc-helper/docs/configuration/auth.md +1 -1
  4. package/bundled/qc-helper/docs/configuration/settings.md +23 -11
  5. package/bundled/qc-helper/docs/features/approval-mode.md +3 -0
  6. package/bundled/qc-helper/docs/features/auto-mode.md +40 -0
  7. package/bundled/qc-helper/docs/features/channels/overview.md +81 -18
  8. package/bundled/qc-helper/docs/features/code-review.md +17 -61
  9. package/bundled/qc-helper/docs/features/commands.md +6 -6
  10. package/bundled/qc-helper/docs/features/mcp.md +3 -1
  11. package/bundled/qc-helper/docs/features/scheduled-tasks.md +10 -0
  12. package/bundled/qc-helper/docs/qwen-serve.md +19 -0
  13. package/bundled/review/DESIGN.md +21 -26
  14. package/bundled/review/SKILL.md +45 -129
  15. package/chunks/{MaxSizedBox-UZHJ73JB.js → MaxSizedBox-ERTNFI22.js} +20 -18
  16. package/chunks/{StandaloneSessionPicker-GGUIZWCE.js → StandaloneSessionPicker-Y5NGRLRY.js} +32 -29
  17. package/chunks/{acpAgent-QYZFICEZ.js → acpAgent-UMN6OYTR.js} +473 -187
  18. package/chunks/{agent-2EN7YNSW.js → agent-56DZU4ZU.js} +17 -15
  19. package/chunks/{agent-headless-SLTEZ5LV.js → agent-headless-SR7N2IJG.js} +17 -15
  20. package/chunks/{anthropicContentGenerator-CA3JTAMO.js → anthropicContentGenerator-5OZFO6WQ.js} +1 -1
  21. package/chunks/{artifact-tool-RM7WINJO.js → artifact-tool-JVZMHA4B.js} +1 -1
  22. package/chunks/{askUserQuestion-J3P6QAJ7.js → askUserQuestion-CMJZ2F3D.js} +1 -1
  23. package/chunks/{bridge-HZVAUTMX.js → bridge-AUHNFOUS.js} +23 -21
  24. package/chunks/channel-worker-supervisor-A74FV522.js +308 -0
  25. package/chunks/{chunk-N4V4VBP6.js → chunk-2X2JUE47.js} +2 -2
  26. package/chunks/{chunk-JV7A66DR.js → chunk-4VZH35PN.js} +528 -358
  27. package/chunks/{chunk-M2U5NM24.js → chunk-54YZOP7P.js} +309 -72
  28. package/chunks/{chunk-WGY3GIPP.js → chunk-6AQR7732.js} +1 -1
  29. package/chunks/{chunk-FR3II765.js → chunk-6CIIP6OE.js} +4 -4
  30. package/chunks/{chunk-IKO44NAT.js → chunk-6TLY5W3B.js} +2 -2
  31. package/chunks/{chunk-VN4CKYUW.js → chunk-73H73ASU.js} +1 -1
  32. package/chunks/{chunk-IBEM64M4.js → chunk-75X2VLSH.js} +36 -25
  33. package/chunks/{chunk-PLQTLKMR.js → chunk-7KPI4LAI.js} +3 -3
  34. package/chunks/{chunk-NVTRORSK.js → chunk-7VPC7D7O.js} +2 -2
  35. package/chunks/chunk-AHNXYU4O.js +24 -0
  36. package/chunks/{chunk-MTJVHQDP.js → chunk-B7KGXIPZ.js} +302 -257
  37. package/chunks/{chunk-35FH347N.js → chunk-BFG6OZN7.js} +16097 -16236
  38. package/chunks/{chunk-T44AF4I6.js → chunk-BNJLLAQ7.js} +1 -1
  39. package/chunks/{chunk-OEY3YAL2.js → chunk-BQNJBEUA.js} +2 -2
  40. package/chunks/{chunk-Q7TDHJ2G.js → chunk-C2IHHGBZ.js} +10 -10
  41. package/chunks/chunk-CG7SVARK.js +367 -0
  42. package/chunks/{chunk-7SP275SH.js → chunk-CS5XYDBO.js} +5 -5
  43. package/chunks/{chunk-V5YJAUHW.js → chunk-CUGEBAKG.js} +1 -1
  44. package/chunks/{chunk-FQDMX5IL.js → chunk-D5KISTLW.js} +309 -72
  45. package/chunks/{chunk-I4MXURND.js → chunk-DQ74W65K.js} +356 -468
  46. package/chunks/chunk-E5A7LHNN.js +51 -0
  47. package/chunks/{chunk-3PJXIDKI.js → chunk-E6US47KI.js} +3 -27
  48. package/chunks/chunk-EDAGQADF.js +21 -0
  49. package/chunks/{chunk-HUGAEYZR.js → chunk-FNLXLI4I.js} +2 -2
  50. package/chunks/{chunk-WJAY4WXR.js → chunk-FYKX6XOT.js} +1 -1
  51. package/chunks/{chunk-CA4ML3VH.js → chunk-G7OQ3RFJ.js} +1 -1
  52. package/chunks/{chunk-VHRREANT.js → chunk-GICCHL2Q.js} +3 -1
  53. package/chunks/{chunk-QHHNFG22.js → chunk-GLPV75ES.js} +1 -1
  54. package/chunks/{chunk-LD2XBG6Z.js → chunk-GO6LNQXT.js} +1 -39
  55. package/chunks/chunk-HI55Z6PR.js +3523 -0
  56. package/chunks/{chunk-B5MPZI4K.js → chunk-HJDF3ZVU.js} +2670 -1233
  57. package/chunks/{chunk-GDIG7TMG.js → chunk-HRZB5CSC.js} +1 -1
  58. package/chunks/{chunk-LDWTYE33.js → chunk-J3F7X3LW.js} +1 -1
  59. package/chunks/{chunk-FV4SQ54H.js → chunk-KVPFPC4J.js} +227 -85
  60. package/chunks/{chunk-Q3JOGB4U.js → chunk-L7QPM2YD.js} +1 -1
  61. package/chunks/{chunk-4722VFFU.js → chunk-L7VH7HQA.js} +6 -6
  62. package/chunks/{chunk-HWG4XLD7.js → chunk-LKWAVAB5.js} +1 -1
  63. package/chunks/{chunk-YCRTJYSQ.js → chunk-MEQWZGK5.js} +1 -1
  64. package/chunks/{chunk-6FIWYVN4.js → chunk-MKHC4BYZ.js} +30 -5
  65. package/chunks/{chunk-YCEHOJZJ.js → chunk-MNDTD5E5.js} +65 -38
  66. package/chunks/{chunk-ZGSV5ORL.js → chunk-MVZXZWGT.js} +809 -759
  67. package/chunks/chunk-MX2YXRER.js +44 -0
  68. package/chunks/{chunk-TMILTLP3.js → chunk-ND25GXEU.js} +21 -4
  69. package/chunks/{chunk-AIBPG5MB.js → chunk-OAFUMTWW.js} +2 -2
  70. package/chunks/chunk-OJCECIJA.js +238 -0
  71. package/chunks/{chunk-EUURTJY7.js → chunk-PIYV6COW.js} +1 -1
  72. package/chunks/{chunk-LXEW6BHF.js → chunk-Q7VHIRDD.js} +1 -1
  73. package/chunks/{chunk-DBR7PF4B.js → chunk-QAFQLTXG.js} +1 -1
  74. package/chunks/{chunk-3TK7FSCP.js → chunk-QMIND2AS.js} +3 -3
  75. package/chunks/{chunk-ESVSWG6Z.js → chunk-QOMAHFYI.js} +1 -1
  76. package/chunks/{chunk-J37FGIOA.js → chunk-QXPI7FEC.js} +38 -4
  77. package/chunks/chunk-RM3PGSGL.js +66 -0
  78. package/chunks/chunk-RNBYOUGV.js +42 -0
  79. package/chunks/chunk-S5EQPDTM.js +91 -0
  80. package/chunks/{chunk-GZKQ36JS.js → chunk-SFN4TEHY.js} +4 -4
  81. package/chunks/{chunk-DHXWNSJA.js → chunk-T22H4V4R.js} +42 -0
  82. package/chunks/{chunk-LXGWLOCM.js → chunk-TENOUWY2.js} +1 -1
  83. package/chunks/{chunk-BLAE2TCO.js → chunk-TTFNVEO5.js} +3 -3
  84. package/chunks/{chunk-FZY7NH37.js → chunk-UANCYOOQ.js} +1 -1
  85. package/chunks/{chunk-E5I6YSNO.js → chunk-UQFP2FEF.js} +1 -1
  86. package/chunks/{chunk-3O2BJMFW.js → chunk-UQYOMM6J.js} +4 -4
  87. package/chunks/{chunk-JERW36RG.js → chunk-UT5JU5DJ.js} +15 -15
  88. package/chunks/{chunk-DJ25MIU2.js → chunk-VKGG724L.js} +8 -8
  89. package/chunks/{chunk-G525INVW.js → chunk-W2ZOAX7F.js} +3 -3
  90. package/chunks/{chunk-HIYUAXBG.js → chunk-W6X4FGWX.js} +1 -1
  91. package/chunks/{chunk-OE5J6UA7.js → chunk-XCUFHOAD.js} +1 -1
  92. package/chunks/{chunk-KXVVXAAC.js → chunk-YBDZ63KI.js} +3 -3
  93. package/chunks/{chunk-Z34RYLRO.js → chunk-ZJP5T7IA.js} +1 -1
  94. package/chunks/{chunk-NOYV2NXI.js → chunk-ZXCVPMIK.js} +411 -43
  95. package/chunks/{computer-use-FCNWHVPW.js → computer-use-VWN5HH6A.js} +20 -18
  96. package/chunks/{contextCommand-FVFMZZEU.js → contextCommand-DFFG5KDJ.js} +19 -17
  97. package/chunks/{cron-create-IY5NMIHQ.js → cron-create-CSSWJ67I.js} +1 -1
  98. package/chunks/{cron-delete-OLNEQWKO.js → cron-delete-E56CFQ7A.js} +1 -1
  99. package/chunks/{cron-list-YAUAUV24.js → cron-list-BKSINY6Y.js} +1 -1
  100. package/chunks/daemon-5T6IHWJV.js +8430 -0
  101. package/chunks/{daemon-status-provider-42JEXENZ.js → daemon-status-provider-V5UY7O7J.js} +26 -24
  102. package/chunks/{dist-4FCNM6KJ.js → dist-2HDL5SHQ.js} +2 -2
  103. package/chunks/{dist-SU6L7ZNJ.js → dist-B7SSDVWT.js} +3 -3
  104. package/chunks/{dist-VD7HXTML.js → dist-BL3SL665.js} +1 -1
  105. package/chunks/{dist-UKPWQJCL.js → dist-TAVAGZU6.js} +37 -13
  106. package/chunks/{dist-K4XZILIO.js → dist-XBOVZ3R5.js} +26 -5
  107. package/chunks/{earlyInputCapture-FFFEC6P4.js → earlyInputCapture-VVYU4FDO.js} +17 -15
  108. package/chunks/{edit-32ILSGZY.js → edit-F35PTMBA.js} +17 -15
  109. package/chunks/{en-U3LWGSFX.js → en-FZREZFPO.js} +18 -0
  110. package/chunks/{enter-worktree-XWZKIN6A.js → enter-worktree-3DIW7EGJ.js} +17 -15
  111. package/chunks/{enterPlanMode-LPFFY7BJ.js → enterPlanMode-QNXT77KP.js} +27 -15
  112. package/chunks/{errors-UXBPYPI2.js → errors-M53YG76R.js} +19 -17
  113. package/chunks/{exit-worktree-IBS4UIU7.js → exit-worktree-BSDWNWHZ.js} +17 -15
  114. package/chunks/{exitPlanMode-JA72YHII.js → exitPlanMode-EL7AY327.js} +41 -23
  115. package/chunks/{fast-path-7UU67Y2W.js → fast-path-DUCSMUFW.js} +2 -2
  116. package/chunks/{gemini-GMVKJNMX.js → gemini-F3IERB37.js} +59 -51
  117. package/chunks/{geminiContentGenerator-7NIFF2L4.js → geminiContentGenerator-6OULAKFQ.js} +1 -1
  118. package/chunks/{glob-4NJCW5HI.js → glob-ZMLFTD4T.js} +17 -15
  119. package/chunks/{grep-PAIMLQEL.js → grep-H5X66EI7.js} +17 -15
  120. package/chunks/{initializer-R6KU4VYM.js → initializer-LEOT2OLH.js} +21 -19
  121. package/chunks/{list-H7LXAO64.js → list-M3DKXML6.js} +23 -21
  122. package/chunks/{loadedSettingsAdapter-H27JMTLU.js → loadedSettingsAdapter-OKMQFGGG.js} +21 -19
  123. package/chunks/{loop-wakeup-Y3OIRQFM.js → loop-wakeup-FPBAVVPR.js} +2 -2
  124. package/chunks/{ls-TVJEYS7O.js → ls-UGWQXPTY.js} +1 -1
  125. package/chunks/{lsp-JZSDVR3F.js → lsp-24WV7NXB.js} +1 -1
  126. package/chunks/{monitor-JSIHDPXP.js → monitor-ARL5P45R.js} +19 -16
  127. package/chunks/{nonInteractiveCli-Y4CHOETG.js → nonInteractiveCli-NUVLF3YR.js} +53 -45
  128. package/chunks/{notebook-edit-SHRNL2UM.js → notebook-edit-ANTZ2DDY.js} +17 -15
  129. package/chunks/{openaiContentGenerator-ORZZ7VFO.js → openaiContentGenerator-TFGMKGHN.js} +6 -6
  130. package/chunks/pidfile-AWTL4C63.js +72 -0
  131. package/chunks/{qwenContentGenerator-H643PL2G.js → qwenContentGenerator-6QWAYTWS.js} +18 -16
  132. package/chunks/{qwenOAuth2-OI2B7PES.js → qwenOAuth2-LWLA6MQG.js} +3 -3
  133. package/chunks/{read-file-5PRNPTTY.js → read-file-EJY73XQ3.js} +4 -4
  134. package/chunks/{read-mcp-resource-QTXGKTEV.js → read-mcp-resource-NCBTPP7X.js} +1 -1
  135. package/chunks/{ripGrep-JIKZMABJ.js → ripGrep-HC4SA6CQ.js} +17 -15
  136. package/chunks/{run-qwen-serve-PQV7QOHZ.js → run-qwen-serve-AGLZ642J.js} +291 -55
  137. package/chunks/{scheduler-OS3R5MGU.js → scheduler-TURO7NGY.js} +17 -15
  138. package/chunks/{send-message-DKGHWSTF.js → send-message-3S2NYS3O.js} +5 -3
  139. package/chunks/{serve-LVYZDKCZ.js → serve-5DAMOIDW.js} +22 -19
  140. package/chunks/{server-P4YIH35I.js → server-4AGEK2HC.js} +2268 -1222
  141. package/chunks/{session-DE4TZBKH.js → session-7ZOQUC4Y.js} +54 -46
  142. package/chunks/{settings-DFTYMJYF.js → settings-DR4V6L5Y.js} +20 -18
  143. package/chunks/{shell-3GNQLNV7.js → shell-H5WFKUXH.js} +17 -15
  144. package/chunks/{skill-NCNG4KKZ.js → skill-ANHU5ZCR.js} +4 -4
  145. package/chunks/{spawnChannel-DHRIMDVL.js → spawnChannel-VN5LJV7Z.js} +19 -17
  146. package/chunks/{src-PNZYGM3R.js → src-OVZLTVVM.js} +49 -17
  147. package/chunks/{startInteractiveUI-P6GZBFQW.js → startInteractiveUI-OA22V32P.js} +11110 -10670
  148. package/chunks/{syntheticOutput-X7L5HWLN.js → syntheticOutput-SV7GBHZ5.js} +2 -2
  149. package/chunks/{task-create-AWEUI4GI.js → task-create-W2H2UJCH.js} +6 -5
  150. package/chunks/{task-list-KZ3VJLDU.js → task-list-THBOPV4G.js} +5 -4
  151. package/chunks/{task-stop-GUNOZKJ5.js → task-stop-33FVCNCJ.js} +1 -1
  152. package/chunks/{task-update-Y56GP6DU.js → task-update-LVFQLXEI.js} +6 -5
  153. package/chunks/{team-create-6JMW3KQK.js → team-create-OYL5CAQO.js} +17 -15
  154. package/chunks/{team-delete-6AFRGDJY.js → team-delete-NTUQ25UY.js} +5 -4
  155. package/chunks/{theme-manager-FEHQO22G.js → theme-manager-XCMPF2SI.js} +17 -15
  156. package/chunks/{todoWrite-JRS6NOEU.js → todoWrite-SEPO2RI3.js} +1 -1
  157. package/chunks/{tool-search-IXAEKS7J.js → tool-search-YXW55X6Z.js} +29 -5
  158. package/chunks/{trustedFolders-SJRXNHZE.js → trustedFolders-TEPGM5YL.js} +18 -16
  159. package/chunks/{validateNonInterActiveAuth-HCH7OBDH.js → validateNonInterActiveAuth-OQIS7WUE.js} +50 -42
  160. package/chunks/{web-fetch-RELNL37A.js → web-fetch-OE7LHURA.js} +4 -4
  161. package/chunks/{workflow-M2COBI7R.js → workflow-RTUWORAP.js} +48 -27
  162. package/chunks/{workspace-providers-status-GOCWYDMK.js → workspace-providers-status-DM2XANVB.js} +23 -21
  163. package/chunks/{workspace-service-34C7SUBU.js → workspace-service-VKBI2KZD.js} +27 -25
  164. package/chunks/{write-file-E52WRXZL.js → write-file-WGALQ53L.js} +17 -15
  165. package/chunks/{zh-TW-LKLBTZHE.js → zh-TW-6GIKXEAN.js} +18 -0
  166. package/chunks/{zh-F5T4WWZO.js → zh-V3B4TFWL.js} +18 -0
  167. package/cli.js +6 -6
  168. package/locales/en.js +30 -0
  169. package/locales/fr.js +1 -2
  170. package/locales/ja.js +1 -2
  171. package/locales/zh-TW.js +29 -0
  172. package/locales/zh.js +29 -0
  173. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  174. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  175. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  176. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  177. package/package.json +3 -3
  178. package/web-shell/assets/{arc-C2DILvUl.js → arc-Det5Ccum.js} +1 -1
  179. package/web-shell/assets/{architectureDiagram-3BPJPVTR-b8gZ2cNw.js → architectureDiagram-3BPJPVTR-DqNWVFpl.js} +1 -1
  180. package/web-shell/assets/{blockDiagram-GPEHLZMM-BuRpghMj.js → blockDiagram-GPEHLZMM-CYl7tYBi.js} +1 -1
  181. package/web-shell/assets/{c4Diagram-AAUBKEIU-2ItdhFmE.js → c4Diagram-AAUBKEIU-DaAEi0NQ.js} +1 -1
  182. package/web-shell/assets/channel-Bm0bFauD.js +1 -0
  183. package/web-shell/assets/{chunk-2J33WTMH-B1QXa0q3.js → chunk-2J33WTMH-Df2CDEE2.js} +1 -1
  184. package/web-shell/assets/{chunk-4BX2VUAB-DXfhKlNq.js → chunk-4BX2VUAB-DNBFcyL2.js} +1 -1
  185. package/web-shell/assets/{chunk-55IACEB6-ClSNjxLo.js → chunk-55IACEB6-BKjF-0HI.js} +1 -1
  186. package/web-shell/assets/{chunk-727SXJPM-Dsh2wisB.js → chunk-727SXJPM-DYwAwfIM.js} +1 -1
  187. package/web-shell/assets/{chunk-AQP2D5EJ-C1TkY5AR.js → chunk-AQP2D5EJ-C6FswLqy.js} +1 -1
  188. package/web-shell/assets/{chunk-FMBD7UC4-CGtN9XR6.js → chunk-FMBD7UC4-DRWAcZSY.js} +1 -1
  189. package/web-shell/assets/{chunk-ND2GUHAM-BHiPi1SS.js → chunk-ND2GUHAM-AoL16mNR.js} +1 -1
  190. package/web-shell/assets/{chunk-QZHKN3VN-CzG3I5o1.js → chunk-QZHKN3VN-a8PtLMck.js} +1 -1
  191. package/web-shell/assets/classDiagram-4FO5ZUOK--NgUfb55.js +1 -0
  192. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--NgUfb55.js +1 -0
  193. package/web-shell/assets/{cose-bilkent-S5V4N54A-EgrIoH_K.js → cose-bilkent-S5V4N54A-C4Aeu5qf.js} +1 -1
  194. package/web-shell/assets/{dagre-BM42HDAG-BUnpdX8S.js → dagre-BM42HDAG-BOulamjo.js} +1 -1
  195. package/web-shell/assets/{diagram-2AECGRRQ-BlLUCVYu.js → diagram-2AECGRRQ-D1wt2ykO.js} +1 -1
  196. package/web-shell/assets/{diagram-5GNKFQAL-FG-enmjQ.js → diagram-5GNKFQAL-BRseus-O.js} +1 -1
  197. package/web-shell/assets/{diagram-KO2AKTUF-BlzmTONk.js → diagram-KO2AKTUF-XSMkNzpZ.js} +1 -1
  198. package/web-shell/assets/{diagram-LMA3HP47-CoBQ8mIx.js → diagram-LMA3HP47-21KNLqoi.js} +1 -1
  199. package/web-shell/assets/{diagram-OG6HWLK6-DvxV6sX8.js → diagram-OG6HWLK6-DnUI8F5G.js} +1 -1
  200. package/web-shell/assets/{erDiagram-TEJ5UH35-Jq1tpAoj.js → erDiagram-TEJ5UH35-BVSOMuM2.js} +1 -1
  201. package/web-shell/assets/{flowDiagram-I6XJVG4X-CbtYOry5.js → flowDiagram-I6XJVG4X-fYtDPJsW.js} +1 -1
  202. package/web-shell/assets/{ganttDiagram-6RSMTGT7-ZEn2VEKR.js → ganttDiagram-6RSMTGT7-CmRXosW_.js} +1 -1
  203. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BZh-LkhJ.js → gitGraphDiagram-PVQCEYII-DPrmySxO.js} +1 -1
  204. package/web-shell/assets/index-BpKnmyFV.js +717 -0
  205. package/web-shell/assets/index-fLrtxpOG.css +5 -0
  206. package/web-shell/assets/{infoDiagram-5YYISTIA-B9HuZygK.js → infoDiagram-5YYISTIA-x3VbEuCV.js} +1 -1
  207. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D76cNpYG.js → ishikawaDiagram-YF4QCWOH-SmitHRMC.js} +1 -1
  208. package/web-shell/assets/{journeyDiagram-JHISSGLW-6bGo7P1t.js → journeyDiagram-JHISSGLW-BxvA551S.js} +1 -1
  209. package/web-shell/assets/{kanban-definition-UN3LZRKU-DuYyRBvB.js → kanban-definition-UN3LZRKU-DNHC16jY.js} +1 -1
  210. package/web-shell/assets/{linear-CpdSW1BC.js → linear-CQ6irBL9.js} +1 -1
  211. package/web-shell/assets/{mermaid.core-s5xbZMMj.js → mermaid.core-DtB6NO1e.js} +72 -72
  212. package/web-shell/assets/{mindmap-definition-RKZ34NQL-go01fZ2y.js → mindmap-definition-RKZ34NQL-QKMAgV2v.js} +1 -1
  213. package/web-shell/assets/{pieDiagram-4H26LBE5-BfuZiEHO.js → pieDiagram-4H26LBE5-bvb6dGn6.js} +1 -1
  214. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DsoINqV6.js → quadrantDiagram-W4KKPZXB-DLgdlG4D.js} +1 -1
  215. package/web-shell/assets/{requirementDiagram-4Y6WPE33-B7FU4LiU.js → requirementDiagram-4Y6WPE33-2M9YH4GF.js} +1 -1
  216. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BEDjFnGB.js → sankeyDiagram-5OEKKPKP-DzwfclTH.js} +1 -1
  217. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-gzmmL5tK.js → sequenceDiagram-3UESZ5HK-BvPmTuy2.js} +1 -1
  218. package/web-shell/assets/{stateDiagram-AJRCARHV-BtHD4IN_.js → stateDiagram-AJRCARHV-BjwUmrJF.js} +1 -1
  219. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C4L8zXeL.js +1 -0
  220. package/web-shell/assets/{timeline-definition-PNZ67QCA-T_8gmMCf.js → timeline-definition-PNZ67QCA-CXzS6qqz.js} +1 -1
  221. package/web-shell/assets/{vennDiagram-CIIHVFJN-DdjuqnjO.js → vennDiagram-CIIHVFJN-yRSolF5B.js} +1 -1
  222. package/web-shell/assets/{wardley-L42UT6IY-Cgtrvb37.js → wardley-L42UT6IY-ClLJjHPG.js} +1 -1
  223. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BW3f3-yW.js → wardleyDiagram-YWT4CUSO-VIa6t2p2.js} +1 -1
  224. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUS9IKkc.js → xychartDiagram-2RQKCTM6-CtmrkezW.js} +1 -1
  225. package/web-shell/index.html +18 -2
  226. package/chunks/chunk-2JKEQWDZ.js +0 -1596
  227. package/chunks/chunk-32MCHZQC.js +0 -73
  228. package/chunks/chunk-UAKXW3DN.js +0 -30
  229. package/web-shell/assets/channel-eRvn2UA3.js +0 -1
  230. package/web-shell/assets/classDiagram-4FO5ZUOK-YZNwy1rx.js +0 -1
  231. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-YZNwy1rx.js +0 -1
  232. package/web-shell/assets/index-5FhE0ORO.css +0 -5
  233. package/web-shell/assets/index-CDTGmqVm.js +0 -720
  234. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DFy6gLDd.js +0 -1
@@ -1,5 +1,8 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ relaunchApp
5
+ } from "./chunk-6AQR7732.js";
3
6
  import {
4
7
  SHELL_COMMAND_NAME,
5
8
  SHELL_NAME,
@@ -10,10 +13,16 @@ import {
10
13
  getCommandSourceGroup,
11
14
  getCommandSubcommandNames,
12
15
  useSessionStats
13
- } from "./chunk-BLAE2TCO.js";
16
+ } from "./chunk-TTFNVEO5.js";
14
17
  import {
15
- Colors
16
- } from "./chunk-32MCHZQC.js";
18
+ Colors,
19
+ RowMouseController,
20
+ SettingsContext,
21
+ measureElementPosition,
22
+ useMouseEvents,
23
+ useSettings,
24
+ useTerminalSize
25
+ } from "./chunk-CG7SVARK.js";
17
26
  import {
18
27
  buildResumedHistoryItems,
19
28
  calculateAverageLatency,
@@ -22,23 +31,17 @@ import {
22
31
  calculateErrorRate,
23
32
  computeDiffColumnWidths,
24
33
  computeSessionStats,
25
- disableMouseEvents,
26
- enableMouseEvents,
27
34
  getSystemInfoFields,
28
35
  useKeypress,
29
- useKeypressContext,
30
36
  wrapForMultiplexer
31
- } from "./chunk-IBEM64M4.js";
37
+ } from "./chunk-75X2VLSH.js";
32
38
  import {
33
39
  isTerminalGoalStatusKind
34
40
  } from "./chunk-KSPVDFE4.js";
35
- import {
36
- relaunchApp
37
- } from "./chunk-WGY3GIPP.js";
38
41
  import {
39
42
  MINIMUM_MAX_HEIGHT,
40
43
  MaxSizedBox
41
- } from "./chunk-HUGAEYZR.js";
44
+ } from "./chunk-FNLXLI4I.js";
42
45
  import {
43
46
  theme
44
47
  } from "./chunk-VXGPYF7U.js";
@@ -49,9 +52,8 @@ 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-N4V4VBP6.js";
55
+ use_stdin_default
56
+ } from "./chunk-2X2JUE47.js";
55
57
  import {
56
58
  require_react
57
59
  } from "./chunk-KYMBIKIW.js";
@@ -63,6 +65,9 @@ import {
63
65
  require_has_flag,
64
66
  require_source
65
67
  } from "./chunk-3GONHQOA.js";
68
+ import {
69
+ createLoadedSettingsAdapter
70
+ } from "./chunk-73H73ASU.js";
66
71
  import {
67
72
  cpLen,
68
73
  cpSlice,
@@ -74,27 +79,24 @@ import {
74
79
  stripUnsafeCharacters,
75
80
  toCodePoints,
76
81
  wrapToVisualLines
77
- } from "./chunk-GDIG7TMG.js";
82
+ } from "./chunk-HRZB5CSC.js";
78
83
  import {
79
84
  formatDuration,
80
85
  formatMemoryUsage,
81
86
  formatRelativeTime,
82
87
  formatTokenCount
83
88
  } from "./chunk-KHDZHZMH.js";
84
- import {
85
- createLoadedSettingsAdapter
86
- } from "./chunk-VN4CKYUW.js";
87
89
  import {
88
90
  getPersistScopeForModelSelection
89
- } from "./chunk-6FIWYVN4.js";
91
+ } from "./chunk-MKHC4BYZ.js";
90
92
  import {
91
93
  getCurrentLanguage,
92
94
  localizeToolDisplayName,
93
95
  t
94
- } from "./chunk-3O2BJMFW.js";
96
+ } from "./chunk-UQYOMM6J.js";
95
97
  import {
96
98
  isWorkspaceTrusted
97
- } from "./chunk-Z34RYLRO.js";
99
+ } from "./chunk-ZJP5T7IA.js";
98
100
  import {
99
101
  ALL_PROVIDERS,
100
102
  IdeClient,
@@ -115,15 +117,15 @@ import {
115
117
  resolveMetadataKey,
116
118
  resolveOwnsModel,
117
119
  stripAnsi
118
- } from "./chunk-35FH347N.js";
120
+ } from "./chunk-BFG6OZN7.js";
119
121
  import {
120
122
  MAIN_SOURCE,
121
123
  getMCPServerStatus
122
- } from "./chunk-B5MPZI4K.js";
124
+ } from "./chunk-HJDF3ZVU.js";
123
125
  import {
124
126
  ToolDisplayNames,
125
127
  ToolNames
126
- } from "./chunk-JV7A66DR.js";
128
+ } from "./chunk-4VZH35PN.js";
127
129
  import {
128
130
  createDebugLogger,
129
131
  escapePath,
@@ -3478,26 +3480,12 @@ var useConfig = /* @__PURE__ */ __name(() => {
3478
3480
  return context;
3479
3481
  }, "useConfig");
3480
3482
 
3481
- // packages/cli/src/ui/contexts/SettingsContext.tsx
3482
- init_esbuild_shims();
3483
- var import_react2 = __toESM(require_react(), 1);
3484
- var SettingsContext = import_react2.default.createContext(
3485
- void 0
3486
- );
3487
- var useSettings = /* @__PURE__ */ __name(() => {
3488
- const context = (0, import_react2.useContext)(SettingsContext);
3489
- if (context === void 0) {
3490
- throw new Error("useSettings must be used within a SettingsProvider");
3491
- }
3492
- return context;
3493
- }, "useSettings");
3494
-
3495
3483
  // packages/cli/src/ui/components/SessionPicker.tsx
3496
3484
  init_esbuild_shims();
3497
3485
 
3498
3486
  // packages/cli/src/ui/hooks/useSessionPicker.ts
3499
3487
  init_esbuild_shims();
3500
- var import_react4 = __toESM(require_react(), 1);
3488
+ var import_react3 = __toESM(require_react(), 1);
3501
3489
 
3502
3490
  // packages/cli/src/ui/utils/sessionPickerUtils.ts
3503
3491
  init_esbuild_shims();
@@ -3564,7 +3552,7 @@ __name(formatMessageCount, "formatMessageCount");
3564
3552
 
3565
3553
  // packages/cli/src/ui/hooks/useSessionSearchInput.ts
3566
3554
  init_esbuild_shims();
3567
- var import_react3 = __toESM(require_react(), 1);
3555
+ var import_react2 = __toESM(require_react(), 1);
3568
3556
  var DELETION_KEY_NAMES = /* @__PURE__ */ new Set(["backspace", "delete"]);
3569
3557
  var graphemeSegmenter2 = new Intl.Segmenter(void 0, {
3570
3558
  granularity: "grapheme"
@@ -3591,11 +3579,11 @@ function isPrintableSearchChar(key) {
3591
3579
  __name(isPrintableSearchChar, "isPrintableSearchChar");
3592
3580
  function useSessionSearchInput(options) {
3593
3581
  const { onExitToList } = options;
3594
- const [searchQuery, rawSetSearchQuery] = (0, import_react3.useState)("");
3595
- const searchQueryRef = (0, import_react3.useRef)("");
3596
- 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);
3597
3585
  onExitToListRef.current = onExitToList;
3598
- const setSearchQuery = (0, import_react3.useCallback)(
3586
+ const setSearchQuery = (0, import_react2.useCallback)(
3599
3587
  (nextValue) => {
3600
3588
  const prev = searchQueryRef.current;
3601
3589
  const next = typeof nextValue === "function" ? nextValue(prev) : nextValue;
@@ -3607,7 +3595,7 @@ function useSessionSearchInput(options) {
3607
3595
  },
3608
3596
  []
3609
3597
  );
3610
- const handleSearchKey = (0, import_react3.useCallback)(
3598
+ const handleSearchKey = (0, import_react2.useCallback)(
3611
3599
  (key) => {
3612
3600
  const { name, sequence, ctrl } = key;
3613
3601
  if (name === "escape") {
@@ -3659,25 +3647,25 @@ function useSessionPicker({
3659
3647
  );
3660
3648
  }
3661
3649
  const hasInitialSessions = initialSessions !== void 0;
3662
- const [selectedIndex, setSelectedIndex] = (0, import_react4.useState)(0);
3663
- const [sessionState, setSessionState] = (0, import_react4.useState)(
3650
+ const [selectedIndex, setSelectedIndex] = (0, import_react3.useState)(0);
3651
+ const [sessionState, setSessionState] = (0, import_react3.useState)(
3664
3652
  hasInitialSessions ? { sessions: initialSessions, hasMore: false, nextCursor: void 0 } : { sessions: [], hasMore: true, nextCursor: void 0 }
3665
3653
  );
3666
- const [filterByBranch, setFilterByBranch] = (0, import_react4.useState)(false);
3667
- const [isLoading, setIsLoading] = (0, import_react4.useState)(!hasInitialSessions);
3668
- const [followScrollOffset, setFollowScrollOffset] = (0, import_react4.useState)(0);
3669
- 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)(
3670
3658
  "list"
3671
3659
  );
3672
- const [previewSessionId, setPreviewSessionId] = (0, import_react4.useState)(null);
3673
- const [checkedIds, setCheckedIds] = (0, import_react4.useState)(
3660
+ const [previewSessionId, setPreviewSessionId] = (0, import_react3.useState)(null);
3661
+ const [checkedIds, setCheckedIds] = (0, import_react3.useState)(
3674
3662
  () => /* @__PURE__ */ new Set()
3675
3663
  );
3676
- const disabledIdSet = (0, import_react4.useMemo)(
3664
+ const disabledIdSet = (0, import_react3.useMemo)(
3677
3665
  () => new Set(disabledIds ?? []),
3678
3666
  [disabledIds]
3679
3667
  );
3680
- const toggleChecked = (0, import_react4.useCallback)(
3668
+ const toggleChecked = (0, import_react3.useCallback)(
3681
3669
  (sessionId) => {
3682
3670
  if (disabledIdSet.has(sessionId)) return;
3683
3671
  setCheckedIds((prev) => {
@@ -3692,16 +3680,16 @@ function useSessionPicker({
3692
3680
  },
3693
3681
  [disabledIdSet]
3694
3682
  );
3695
- const exitPreview = (0, import_react4.useCallback)(() => {
3683
+ const exitPreview = (0, import_react3.useCallback)(() => {
3696
3684
  setViewMode("list");
3697
3685
  setPreviewSessionId(null);
3698
3686
  }, []);
3699
- const onExitToList = (0, import_react4.useCallback)(() => {
3687
+ const onExitToList = (0, import_react3.useCallback)(() => {
3700
3688
  setViewMode("list");
3701
3689
  }, []);
3702
3690
  const { searchQuery, setSearchQuery, handleSearchKey } = useSessionSearchInput({ onExitToList });
3703
- const isLoadingMoreRef = (0, import_react4.useRef)(false);
3704
- const filteredSessions = (0, import_react4.useMemo)(
3691
+ const isLoadingMoreRef = (0, import_react3.useRef)(false);
3692
+ const filteredSessions = (0, import_react3.useMemo)(
3705
3693
  () => filterSessions(
3706
3694
  sessionState.sessions,
3707
3695
  filterByBranch,
@@ -3710,7 +3698,7 @@ function useSessionPicker({
3710
3698
  ),
3711
3699
  [sessionState.sessions, filterByBranch, currentBranch, searchQuery]
3712
3700
  );
3713
- const scrollOffset = (0, import_react4.useMemo)(() => {
3701
+ const scrollOffset = (0, import_react3.useMemo)(() => {
3714
3702
  if (centerSelection) {
3715
3703
  if (filteredSessions.length <= maxVisibleItems) {
3716
3704
  return 0;
@@ -3729,13 +3717,13 @@ function useSessionPicker({
3729
3717
  maxVisibleItems,
3730
3718
  selectedIndex
3731
3719
  ]);
3732
- const visibleSessions = (0, import_react4.useMemo)(
3720
+ const visibleSessions = (0, import_react3.useMemo)(
3733
3721
  () => filteredSessions.slice(scrollOffset, scrollOffset + maxVisibleItems),
3734
3722
  [filteredSessions, maxVisibleItems, scrollOffset]
3735
3723
  );
3736
3724
  const showScrollUp = scrollOffset > 0;
3737
3725
  const showScrollDown = scrollOffset + maxVisibleItems < filteredSessions.length;
3738
- (0, import_react4.useEffect)(() => {
3726
+ (0, import_react3.useEffect)(() => {
3739
3727
  if (!sessionService || hasInitialSessions) {
3740
3728
  return;
3741
3729
  }
@@ -3755,7 +3743,7 @@ function useSessionPicker({
3755
3743
  }, "loadInitialSessions");
3756
3744
  void loadInitialSessions();
3757
3745
  }, [sessionService, hasInitialSessions]);
3758
- const loadMoreSessions = (0, import_react4.useCallback)(async () => {
3746
+ const loadMoreSessions = (0, import_react3.useCallback)(async () => {
3759
3747
  if (!sessionService || !sessionState.hasMore || isLoadingMoreRef.current) {
3760
3748
  return;
3761
3749
  }
@@ -3774,16 +3762,16 @@ function useSessionPicker({
3774
3762
  isLoadingMoreRef.current = false;
3775
3763
  }
3776
3764
  }, [sessionService, sessionState.hasMore, sessionState.nextCursor]);
3777
- (0, import_react4.useEffect)(() => {
3765
+ (0, import_react3.useEffect)(() => {
3778
3766
  setSelectedIndex(0);
3779
3767
  setFollowScrollOffset(0);
3780
3768
  }, [filterByBranch, searchQuery]);
3781
- (0, import_react4.useEffect)(() => {
3769
+ (0, import_react3.useEffect)(() => {
3782
3770
  if (selectedIndex >= filteredSessions.length && filteredSessions.length > 0) {
3783
3771
  setSelectedIndex(filteredSessions.length - 1);
3784
3772
  }
3785
3773
  }, [filteredSessions.length, selectedIndex]);
3786
- (0, import_react4.useEffect)(() => {
3774
+ (0, import_react3.useEffect)(() => {
3787
3775
  if (isLoading || !sessionState.hasMore || isLoadingMoreRef.current || !centerSelection) {
3788
3776
  return;
3789
3777
  }
@@ -3801,7 +3789,7 @@ function useSessionPicker({
3801
3789
  scrollOffset,
3802
3790
  sessionState.hasMore
3803
3791
  ]);
3804
- const moveSelection = (0, import_react4.useCallback)(
3792
+ const moveSelection = (0, import_react3.useCallback)(
3805
3793
  (delta) => {
3806
3794
  if (filteredSessions.length === 0) return;
3807
3795
  if (delta === -1) {
@@ -3959,49 +3947,24 @@ function useSessionPicker({
3959
3947
  }
3960
3948
  __name(useSessionPicker, "useSessionPicker");
3961
3949
 
3962
- // packages/cli/src/ui/hooks/useTerminalSize.ts
3963
- init_esbuild_shims();
3964
- var import_react5 = __toESM(require_react(), 1);
3965
- function useTerminalSize() {
3966
- const [size, setSize] = (0, import_react5.useState)({
3967
- columns: process.stdout.columns || 80,
3968
- rows: process.stdout.rows || 24
3969
- });
3970
- (0, import_react5.useEffect)(() => {
3971
- function updateSize() {
3972
- setSize({
3973
- columns: process.stdout.columns || 80,
3974
- rows: process.stdout.rows || 24
3975
- });
3976
- }
3977
- __name(updateSize, "updateSize");
3978
- process.stdout.on("resize", updateSize);
3979
- return () => {
3980
- process.stdout.off("resize", updateSize);
3981
- };
3982
- }, []);
3983
- return size;
3984
- }
3985
- __name(useTerminalSize, "useTerminalSize");
3986
-
3987
3950
  // packages/cli/src/ui/components/SessionPreview.tsx
3988
3951
  init_esbuild_shims();
3989
- var import_react43 = __toESM(require_react(), 1);
3952
+ var import_react40 = __toESM(require_react(), 1);
3990
3953
 
3991
3954
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
3992
3955
  init_esbuild_shims();
3993
- var import_react42 = __toESM(require_react(), 1);
3956
+ var import_react39 = __toESM(require_react(), 1);
3994
3957
 
3995
3958
  // packages/cli/src/ui/components/messages/ConversationMessages.tsx
3996
3959
  init_esbuild_shims();
3997
3960
 
3998
3961
  // packages/cli/src/ui/utils/MarkdownDisplay.tsx
3999
3962
  init_esbuild_shims();
4000
- var import_react11 = __toESM(require_react(), 1);
3963
+ var import_react9 = __toESM(require_react(), 1);
4001
3964
 
4002
3965
  // packages/cli/src/ui/utils/CodeColorizer.tsx
4003
3966
  init_esbuild_shims();
4004
- var import_react6 = __toESM(require_react(), 1);
3967
+ var import_react4 = __toESM(require_react(), 1);
4005
3968
 
4006
3969
  // packages/cli/src/ui/utils/lowlightLoader.ts
4007
3970
  init_esbuild_shims();
@@ -4083,15 +4046,15 @@ function renderHastNode(node, theme2, inheritedColor) {
4083
4046
  }
4084
4047
  const colorToPassDown = elementColor || inheritedColor;
4085
4048
  const children = node.children?.map(
4086
- (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)
4087
4050
  );
4088
- 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 });
4089
4052
  }
4090
4053
  if (node.type === "root") {
4091
4054
  if (!node.children || node.children.length === 0) {
4092
4055
  return null;
4093
4056
  }
4094
- 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));
4095
4058
  }
4096
4059
  return null;
4097
4060
  }
@@ -5740,7 +5703,7 @@ var TableRenderer = /* @__PURE__ */ __name(({
5740
5703
 
5741
5704
  // packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
5742
5705
  init_esbuild_shims();
5743
- var import_react7 = __toESM(require_react(), 1);
5706
+ var import_react5 = __toESM(require_react(), 1);
5744
5707
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
5745
5708
  var BOLD_MARKER_LENGTH = 2;
5746
5709
  var ITALIC_MARKER_LENGTH = 1;
@@ -5867,11 +5830,11 @@ var RenderInlineInternal = /* @__PURE__ */ __name(({
5867
5830
  }
5868
5831
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: nodes.filter((node) => node !== null) });
5869
5832
  }, "RenderInlineInternal");
5870
- var RenderInline = import_react7.default.memo(RenderInlineInternal);
5833
+ var RenderInline = import_react5.default.memo(RenderInlineInternal);
5871
5834
 
5872
5835
  // packages/cli/src/ui/utils/MermaidDiagram.tsx
5873
5836
  init_esbuild_shims();
5874
- var import_react9 = __toESM(require_react(), 1);
5837
+ var import_react7 = __toESM(require_react(), 1);
5875
5838
 
5876
5839
  // packages/cli/src/ui/utils/mermaidVisualRenderer.ts
5877
5840
  init_esbuild_shims();
@@ -7900,15 +7863,15 @@ __name(fitImageToTerminal, "fitImageToTerminal");
7900
7863
 
7901
7864
  // packages/cli/src/ui/contexts/TerminalOutputContext.tsx
7902
7865
  init_esbuild_shims();
7903
- var import_react8 = __toESM(require_react(), 1);
7866
+ var import_react6 = __toESM(require_react(), 1);
7904
7867
  var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
7905
7868
  var defaultWriteRaw = /* @__PURE__ */ __name((data) => {
7906
7869
  process.stdout.write(data);
7907
7870
  }, "defaultWriteRaw");
7908
- var TerminalOutputContext = (0, import_react8.createContext)(defaultWriteRaw);
7871
+ var TerminalOutputContext = (0, import_react6.createContext)(defaultWriteRaw);
7909
7872
  var TerminalOutputProvider = /* @__PURE__ */ __name(({ value, children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TerminalOutputContext.Provider, { value, children }), "TerminalOutputProvider");
7910
7873
  function useTerminalOutput() {
7911
- return (0, import_react8.useContext)(TerminalOutputContext);
7874
+ return (0, import_react6.useContext)(TerminalOutputContext);
7912
7875
  }
7913
7876
  __name(useTerminalOutput, "useTerminalOutput");
7914
7877
 
@@ -7927,18 +7890,18 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
7927
7890
  availableTerminalHeight
7928
7891
  }) => {
7929
7892
  const writeRaw = useTerminalOutput();
7930
- const preparedTerminalImageSequence = import_react9.default.useRef(null);
7931
- const [imageState, setImageState] = import_react9.default.useState(
7893
+ const preparedTerminalImageSequence = import_react7.default.useRef(null);
7894
+ const [imageState, setImageState] = import_react7.default.useState(
7932
7895
  null
7933
7896
  );
7934
7897
  const innerWidth = Math.max(8, contentWidth - MERMAID_PADDING);
7935
7898
  const imageKey = `${source}\0${innerWidth}\0${availableTerminalHeight ?? "auto"}`;
7936
7899
  const image = imageState?.key === imageKey && !isPending ? imageState.result : null;
7937
- const visual = import_react9.default.useMemo(
7900
+ const visual = import_react7.default.useMemo(
7938
7901
  () => renderMermaidVisual(source, innerWidth),
7939
7902
  [source, innerWidth]
7940
7903
  );
7941
- import_react9.default.useEffect(() => {
7904
+ import_react7.default.useEffect(() => {
7942
7905
  if (isPending) {
7943
7906
  setImageState(null);
7944
7907
  return;
@@ -7974,10 +7937,10 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
7974
7937
  };
7975
7938
  }, [availableTerminalHeight, imageKey, innerWidth, isPending, source]);
7976
7939
  const kittySequence = image?.kind === "terminal-image" && image.protocol === "kitty" && image.placeholder ? image.sequence : null;
7977
- import_react9.default.useEffect(() => {
7940
+ import_react7.default.useEffect(() => {
7978
7941
  preparedTerminalImageSequence.current = null;
7979
7942
  }, [imageKey]);
7980
- import_react9.default.useEffect(() => {
7943
+ import_react7.default.useEffect(() => {
7981
7944
  if (!kittySequence || preparedTerminalImageSequence.current === kittySequence) {
7982
7945
  return;
7983
7946
  }
@@ -8058,18 +8021,18 @@ var MermaidDiagramInternal = /* @__PURE__ */ __name(({
8058
8021
  }
8059
8022
  );
8060
8023
  }, "MermaidDiagramInternal");
8061
- var MermaidDiagram = import_react9.default.memo(MermaidDiagramInternal);
8024
+ var MermaidDiagram = import_react7.default.memo(MermaidDiagramInternal);
8062
8025
 
8063
8026
  // packages/cli/src/ui/contexts/RenderModeContext.tsx
8064
8027
  init_esbuild_shims();
8065
- var import_react10 = __toESM(require_react(), 1);
8066
- var RenderModeContext = import_react10.default.createContext({
8028
+ var import_react8 = __toESM(require_react(), 1);
8029
+ var RenderModeContext = import_react8.default.createContext({
8067
8030
  renderMode: "render",
8068
8031
  setRenderMode: /* @__PURE__ */ __name(() => void 0, "setRenderMode")
8069
8032
  });
8070
8033
  var RenderModeProvider = RenderModeContext.Provider;
8071
8034
  function useRenderMode() {
8072
- return import_react10.default.useContext(RenderModeContext);
8035
+ return import_react8.default.useContext(RenderModeContext);
8073
8036
  }
8074
8037
  __name(useRenderMode, "useRenderMode");
8075
8038
 
@@ -8642,7 +8605,7 @@ var RenderCodeBlockInternal = /* @__PURE__ */ __name(({
8642
8605
  }
8643
8606
  );
8644
8607
  }, "RenderCodeBlockInternal");
8645
- var RenderCodeBlock = import_react11.default.memo(RenderCodeBlockInternal);
8608
+ var RenderCodeBlock = import_react9.default.memo(RenderCodeBlockInternal);
8646
8609
  var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, availableTerminalHeight, contentWidth }) => {
8647
8610
  const maxPreviewLines = availableTerminalHeight === void 0 ? 6 : Math.max(0, availableTerminalHeight - 2);
8648
8611
  const previewLines = content.slice(0, maxPreviewLines);
@@ -8661,7 +8624,7 @@ var RenderPendingMermaidBlockInternal = /* @__PURE__ */ __name(({ content, avail
8661
8624
  }
8662
8625
  );
8663
8626
  }, "RenderPendingMermaidBlockInternal");
8664
- var RenderPendingMermaidBlock = import_react11.default.memo(RenderPendingMermaidBlockInternal);
8627
+ var RenderPendingMermaidBlock = import_react9.default.memo(RenderPendingMermaidBlockInternal);
8665
8628
  var RenderMathBlockInternal = /* @__PURE__ */ __name(({
8666
8629
  content,
8667
8630
  sourceCopyCommand,
@@ -8714,7 +8677,7 @@ var RenderMathBlockInternal = /* @__PURE__ */ __name(({
8714
8677
  }
8715
8678
  );
8716
8679
  }, "RenderMathBlockInternal");
8717
- var RenderMathBlock = import_react11.default.memo(RenderMathBlockInternal);
8680
+ var RenderMathBlock = import_react9.default.memo(RenderMathBlockInternal);
8718
8681
  var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
8719
8682
  quoteText,
8720
8683
  textColor = theme.text.primary,
@@ -8730,7 +8693,7 @@ var RenderBlockquoteInternal = /* @__PURE__ */ __name(({
8730
8693
  }
8731
8694
  ) }) })
8732
8695
  ] }), "RenderBlockquoteInternal");
8733
- var RenderBlockquote = import_react11.default.memo(RenderBlockquoteInternal);
8696
+ var RenderBlockquote = import_react9.default.memo(RenderBlockquoteInternal);
8734
8697
  var RenderListItemInternal = /* @__PURE__ */ __name(({
8735
8698
  itemText,
8736
8699
  type,
@@ -8765,7 +8728,7 @@ var RenderListItemInternal = /* @__PURE__ */ __name(({
8765
8728
  }
8766
8729
  );
8767
8730
  }, "RenderListItemInternal");
8768
- var RenderListItem = import_react11.default.memo(RenderListItemInternal);
8731
+ var RenderListItem = import_react9.default.memo(RenderListItemInternal);
8769
8732
  var RenderTableInternal = /* @__PURE__ */ __name(({
8770
8733
  headers,
8771
8734
  rows,
@@ -8782,8 +8745,8 @@ var RenderTableInternal = /* @__PURE__ */ __name(({
8782
8745
  enableInlineMath
8783
8746
  }
8784
8747
  ), "RenderTableInternal");
8785
- var RenderTable = import_react11.default.memo(RenderTableInternal);
8786
- var MarkdownDisplay = import_react11.default.memo(MarkdownDisplayInternal);
8748
+ var RenderTable = import_react9.default.memo(RenderTableInternal);
8749
+ var MarkdownDisplay = import_react9.default.memo(MarkdownDisplayInternal);
8787
8750
 
8788
8751
  // packages/cli/src/ui/textConstants.ts
8789
8752
  init_esbuild_shims();
@@ -9094,11 +9057,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
9094
9057
 
9095
9058
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
9096
9059
  init_esbuild_shims();
9097
- var import_react26 = __toESM(require_react(), 1);
9060
+ var import_react24 = __toESM(require_react(), 1);
9098
9061
 
9099
9062
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
9100
9063
  init_esbuild_shims();
9101
- var import_react24 = __toESM(require_react(), 1);
9064
+ var import_react22 = __toESM(require_react(), 1);
9102
9065
 
9103
9066
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
9104
9067
  init_esbuild_shims();
@@ -9439,18 +9402,18 @@ var TodoItemRow = /* @__PURE__ */ __name(({ todo }) => {
9439
9402
 
9440
9403
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
9441
9404
  init_esbuild_shims();
9442
- var import_react18 = __toESM(require_react(), 1);
9405
+ var import_react16 = __toESM(require_react(), 1);
9443
9406
 
9444
9407
  // packages/cli/src/ui/components/shared/RadioButtonSelect.tsx
9445
9408
  init_esbuild_shims();
9446
9409
 
9447
9410
  // packages/cli/src/ui/components/shared/BaseSelectionList.tsx
9448
9411
  init_esbuild_shims();
9449
- var import_react13 = __toESM(require_react(), 1);
9412
+ var import_react11 = __toESM(require_react(), 1);
9450
9413
 
9451
9414
  // packages/cli/src/ui/hooks/useSelectionList.ts
9452
9415
  init_esbuild_shims();
9453
- var import_react12 = __toESM(require_react(), 1);
9416
+ var import_react10 = __toESM(require_react(), 1);
9454
9417
 
9455
9418
  // packages/cli/src/ui/keyMatchers.ts
9456
9419
  init_esbuild_shims();
@@ -9794,19 +9757,19 @@ function useSelectionList({
9794
9757
  showNumbers = false,
9795
9758
  disableVimNav = false
9796
9759
  }) {
9797
- const [state, dispatch] = (0, import_react12.useReducer)(selectionListReducer, {
9760
+ const [state, dispatch] = (0, import_react10.useReducer)(selectionListReducer, {
9798
9761
  activeIndex: computeInitialIndex(initialIndex, items),
9799
9762
  initialIndex,
9800
9763
  pendingHighlight: false,
9801
9764
  pendingSelect: false,
9802
9765
  items
9803
9766
  });
9804
- const numberInputRef = (0, import_react12.useRef)("");
9805
- const numberInputTimer = (0, import_react12.useRef)(null);
9806
- (0, import_react12.useEffect)(() => {
9767
+ const numberInputRef = (0, import_react10.useRef)("");
9768
+ const numberInputTimer = (0, import_react10.useRef)(null);
9769
+ (0, import_react10.useEffect)(() => {
9807
9770
  dispatch({ type: "INITIALIZE", payload: { initialIndex, items } });
9808
9771
  }, [initialIndex, items]);
9809
- (0, import_react12.useEffect)(() => {
9772
+ (0, import_react10.useEffect)(() => {
9810
9773
  let needsClear = false;
9811
9774
  if (state.pendingHighlight && items[state.activeIndex]) {
9812
9775
  onHighlight?.(items[state.activeIndex].value);
@@ -9830,7 +9793,7 @@ function useSelectionList({
9830
9793
  onHighlight,
9831
9794
  onSelect
9832
9795
  ]);
9833
- (0, import_react12.useEffect)(
9796
+ (0, import_react10.useEffect)(
9834
9797
  () => () => {
9835
9798
  if (numberInputTimer.current) {
9836
9799
  clearTimeout(numberInputTimer.current);
@@ -9911,9 +9874,15 @@ function useSelectionList({
9911
9874
  payload: { index, items }
9912
9875
  });
9913
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");
9914
9882
  return {
9915
9883
  activeIndex: state.activeIndex,
9916
- setActiveIndex
9884
+ setActiveIndex,
9885
+ selectIndex
9917
9886
  };
9918
9887
  }
9919
9888
  __name(useSelectionList, "useSelectionList");
@@ -9939,7 +9908,7 @@ function BaseSelectionList({
9939
9908
  itemGap = 0,
9940
9909
  renderItem
9941
9910
  }) {
9942
- const { activeIndex } = useSelectionList({
9911
+ const { activeIndex, setActiveIndex, selectIndex } = useSelectionList({
9943
9912
  items,
9944
9913
  initialIndex,
9945
9914
  onSelect,
@@ -9947,10 +9916,10 @@ function BaseSelectionList({
9947
9916
  isFocused,
9948
9917
  showNumbers
9949
9918
  });
9950
- const [scrollOffset, setScrollOffset] = (0, import_react13.useState)(
9919
+ const [scrollOffset, setScrollOffset] = (0, import_react11.useState)(
9951
9920
  () => getScrollOffsetForIndex(activeIndex, items.length, maxItemsToShow)
9952
9921
  );
9953
- (0, import_react13.useEffect)(() => {
9922
+ (0, import_react11.useEffect)(() => {
9954
9923
  const newScrollOffset = getScrollOffsetForIndex(
9955
9924
  activeIndex,
9956
9925
  items.length,
@@ -9962,9 +9931,24 @@ function BaseSelectionList({
9962
9931
  setScrollOffset(newScrollOffset);
9963
9932
  }
9964
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)([]);
9965
9938
  const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
9966
9939
  const numberColumnWidth = String(items.length).length;
9967
- 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
+ ),
9968
9952
  showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9969
9953
  Text,
9970
9954
  {
@@ -9993,31 +9977,41 @@ function BaseSelectionList({
9993
9977
  const itemNumberText = `${String(itemIndex + 1).padStart(
9994
9978
  numberColumnWidth
9995
9979
  )}.`;
9996
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Box_default, { alignItems: "flex-start", children: [
9997
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
9998
- Text,
9999
- {
10000
- color: isSelected ? theme.status.success : theme.text.primary,
10001
- "aria-hidden": true,
10002
- children: isSelected ? "\u203A" : " "
10003
- }
10004
- ) }),
10005
- showNumbers && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10006
- Box_default,
10007
- {
10008
- marginRight: 1,
10009
- flexShrink: 0,
10010
- minWidth: itemNumberText.length,
10011
- "aria-state": { checked: isSelected },
10012
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: numberColor, children: itemNumberText })
10013
- }
10014
- ),
10015
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexGrow: 1, children: renderItem(item, {
10016
- isSelected,
10017
- titleColor,
10018
- numberColor
10019
- }) })
10020
- ] }, 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
+ );
10021
10015
  }),
10022
10016
  showScrollArrows && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
10023
10017
  Text,
@@ -10070,14 +10064,14 @@ __name(RadioButtonSelect, "RadioButtonSelect");
10070
10064
 
10071
10065
  // packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
10072
10066
  init_esbuild_shims();
10073
- var import_react17 = __toESM(require_react(), 1);
10067
+ var import_react15 = __toESM(require_react(), 1);
10074
10068
 
10075
10069
  // packages/cli/src/ui/components/shared/TextInput.tsx
10076
10070
  init_esbuild_shims();
10077
10071
 
10078
10072
  // packages/cli/src/ui/components/shared/text-buffer.ts
10079
10073
  init_esbuild_shims();
10080
- var import_react14 = __toESM(require_react(), 1);
10074
+ var import_react12 = __toESM(require_react(), 1);
10081
10075
  import { spawnSync as spawnSync2 } from "node:child_process";
10082
10076
  import fs2 from "node:fs";
10083
10077
  import os2 from "node:os";
@@ -12135,7 +12129,7 @@ function useTextBuffer({
12135
12129
  shellModeActive = false,
12136
12130
  preferredEditor
12137
12131
  }) {
12138
- const initialState = (0, import_react14.useMemo)(() => {
12132
+ const initialState = (0, import_react12.useMemo)(() => {
12139
12133
  const lines2 = initialText.split("\n");
12140
12134
  const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(
12141
12135
  lines2.length === 0 ? [""] : lines2,
@@ -12159,9 +12153,9 @@ function useTextBuffer({
12159
12153
  visualLayout: visualLayout2
12160
12154
  };
12161
12155
  }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
12162
- const stateRef = (0, import_react14.useRef)(initialState);
12163
- const [state, setState] = (0, import_react14.useState)(initialState);
12164
- 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) => {
12165
12159
  stateRef.current = textBufferReducer(stateRef.current, action);
12166
12160
  setState(stateRef.current);
12167
12161
  }, []);
@@ -12173,25 +12167,25 @@ function useTextBuffer({
12173
12167
  selectionAnchor,
12174
12168
  visualLayout
12175
12169
  } = state;
12176
- const text = (0, import_react14.useMemo)(() => lines.join("\n"), [lines]);
12177
- const visualCursor = (0, import_react14.useMemo)(
12170
+ const text = (0, import_react12.useMemo)(() => lines.join("\n"), [lines]);
12171
+ const visualCursor = (0, import_react12.useMemo)(
12178
12172
  () => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]),
12179
12173
  [visualLayout, cursorRow, cursorCol]
12180
12174
  );
12181
12175
  const { visualLines, visualToLogicalMap } = visualLayout;
12182
- const [visualScrollRow, setVisualScrollRow] = (0, import_react14.useState)(0);
12183
- (0, import_react14.useEffect)(() => {
12176
+ const [visualScrollRow, setVisualScrollRow] = (0, import_react12.useState)(0);
12177
+ (0, import_react12.useEffect)(() => {
12184
12178
  if (onChange) {
12185
12179
  onChange(text);
12186
12180
  }
12187
12181
  }, [text, onChange]);
12188
- (0, import_react14.useEffect)(() => {
12182
+ (0, import_react12.useEffect)(() => {
12189
12183
  dispatch({
12190
12184
  type: "set_viewport",
12191
12185
  payload: { width: viewport.width, height: viewport.height }
12192
12186
  });
12193
12187
  }, [dispatch, viewport.width, viewport.height]);
12194
- (0, import_react14.useEffect)(() => {
12188
+ (0, import_react12.useEffect)(() => {
12195
12189
  const { height } = viewport;
12196
12190
  const totalVisualLines = visualLines.length;
12197
12191
  const maxScrollStart = Math.max(0, totalVisualLines - height);
@@ -12206,7 +12200,7 @@ function useTextBuffer({
12206
12200
  setVisualScrollRow(newVisualScrollRow);
12207
12201
  }
12208
12202
  }, [visualCursor, visualScrollRow, viewport, visualLines.length]);
12209
- const insert = (0, import_react14.useCallback)(
12203
+ const insert = (0, import_react12.useCallback)(
12210
12204
  (ch, { paste = false } = {}) => {
12211
12205
  if (paste && /[\n\r]/.test(ch) && !shellModeActive) {
12212
12206
  const validPaths = tryExtractFilePaths(ch, isValidPath);
@@ -12245,202 +12239,202 @@ function useTextBuffer({
12245
12239
  },
12246
12240
  [dispatch, isValidPath, shellModeActive]
12247
12241
  );
12248
- const newline = (0, import_react14.useCallback)(() => {
12242
+ const newline = (0, import_react12.useCallback)(() => {
12249
12243
  dispatch({ type: "insert", payload: "\n" });
12250
12244
  }, [dispatch]);
12251
- const backspace = (0, import_react14.useCallback)(() => {
12245
+ const backspace = (0, import_react12.useCallback)(() => {
12252
12246
  dispatch({ type: "backspace" });
12253
12247
  }, [dispatch]);
12254
- const del = (0, import_react14.useCallback)(() => {
12248
+ const del = (0, import_react12.useCallback)(() => {
12255
12249
  dispatch({ type: "delete" });
12256
12250
  }, [dispatch]);
12257
- const move = (0, import_react14.useCallback)(
12251
+ const move = (0, import_react12.useCallback)(
12258
12252
  (dir) => {
12259
12253
  dispatch({ type: "move", payload: { dir } });
12260
12254
  },
12261
12255
  [dispatch]
12262
12256
  );
12263
- const undo = (0, import_react14.useCallback)(() => {
12257
+ const undo = (0, import_react12.useCallback)(() => {
12264
12258
  dispatch({ type: "undo" });
12265
12259
  }, [dispatch]);
12266
- const redo = (0, import_react14.useCallback)(() => {
12260
+ const redo = (0, import_react12.useCallback)(() => {
12267
12261
  dispatch({ type: "redo" });
12268
12262
  }, [dispatch]);
12269
- const setText = (0, import_react14.useCallback)(
12263
+ const setText = (0, import_react12.useCallback)(
12270
12264
  (newText) => {
12271
12265
  dispatch({ type: "set_text", payload: newText });
12272
12266
  },
12273
12267
  [dispatch]
12274
12268
  );
12275
- const deleteWordLeft = (0, import_react14.useCallback)(() => {
12269
+ const deleteWordLeft = (0, import_react12.useCallback)(() => {
12276
12270
  dispatch({ type: "delete_word_left" });
12277
12271
  }, [dispatch]);
12278
- const deleteWordRight = (0, import_react14.useCallback)(() => {
12272
+ const deleteWordRight = (0, import_react12.useCallback)(() => {
12279
12273
  dispatch({ type: "delete_word_right" });
12280
12274
  }, [dispatch]);
12281
- const killLineRight = (0, import_react14.useCallback)(() => {
12275
+ const killLineRight = (0, import_react12.useCallback)(() => {
12282
12276
  dispatch({ type: "kill_line_right" });
12283
12277
  }, [dispatch]);
12284
- const killLineLeft = (0, import_react14.useCallback)(() => {
12278
+ const killLineLeft = (0, import_react12.useCallback)(() => {
12285
12279
  dispatch({ type: "kill_line_left" });
12286
12280
  }, [dispatch]);
12287
- const vimDeleteWordForward = (0, import_react14.useCallback)(
12281
+ const vimDeleteWordForward = (0, import_react12.useCallback)(
12288
12282
  (count) => {
12289
12283
  dispatch({ type: "vim_delete_word_forward", payload: { count } });
12290
12284
  },
12291
12285
  [dispatch]
12292
12286
  );
12293
- const vimDeleteWordBackward = (0, import_react14.useCallback)(
12287
+ const vimDeleteWordBackward = (0, import_react12.useCallback)(
12294
12288
  (count) => {
12295
12289
  dispatch({ type: "vim_delete_word_backward", payload: { count } });
12296
12290
  },
12297
12291
  [dispatch]
12298
12292
  );
12299
- const vimDeleteWordEnd = (0, import_react14.useCallback)(
12293
+ const vimDeleteWordEnd = (0, import_react12.useCallback)(
12300
12294
  (count) => {
12301
12295
  dispatch({ type: "vim_delete_word_end", payload: { count } });
12302
12296
  },
12303
12297
  [dispatch]
12304
12298
  );
12305
- const vimChangeWordForward = (0, import_react14.useCallback)(
12299
+ const vimChangeWordForward = (0, import_react12.useCallback)(
12306
12300
  (count) => {
12307
12301
  dispatch({ type: "vim_change_word_forward", payload: { count } });
12308
12302
  },
12309
12303
  [dispatch]
12310
12304
  );
12311
- const vimChangeWordBackward = (0, import_react14.useCallback)(
12305
+ const vimChangeWordBackward = (0, import_react12.useCallback)(
12312
12306
  (count) => {
12313
12307
  dispatch({ type: "vim_change_word_backward", payload: { count } });
12314
12308
  },
12315
12309
  [dispatch]
12316
12310
  );
12317
- const vimChangeWordEnd = (0, import_react14.useCallback)(
12311
+ const vimChangeWordEnd = (0, import_react12.useCallback)(
12318
12312
  (count) => {
12319
12313
  dispatch({ type: "vim_change_word_end", payload: { count } });
12320
12314
  },
12321
12315
  [dispatch]
12322
12316
  );
12323
- const vimDeleteLine = (0, import_react14.useCallback)(
12317
+ const vimDeleteLine = (0, import_react12.useCallback)(
12324
12318
  (count) => {
12325
12319
  dispatch({ type: "vim_delete_line", payload: { count } });
12326
12320
  },
12327
12321
  [dispatch]
12328
12322
  );
12329
- const vimChangeLine = (0, import_react14.useCallback)(
12323
+ const vimChangeLine = (0, import_react12.useCallback)(
12330
12324
  (count) => {
12331
12325
  dispatch({ type: "vim_change_line", payload: { count } });
12332
12326
  },
12333
12327
  [dispatch]
12334
12328
  );
12335
- const vimDeleteToEndOfLine = (0, import_react14.useCallback)(() => {
12329
+ const vimDeleteToEndOfLine = (0, import_react12.useCallback)(() => {
12336
12330
  dispatch({ type: "vim_delete_to_end_of_line" });
12337
12331
  }, [dispatch]);
12338
- const vimChangeToEndOfLine = (0, import_react14.useCallback)(() => {
12332
+ const vimChangeToEndOfLine = (0, import_react12.useCallback)(() => {
12339
12333
  dispatch({ type: "vim_change_to_end_of_line" });
12340
12334
  }, [dispatch]);
12341
- const vimChangeMovement = (0, import_react14.useCallback)(
12335
+ const vimChangeMovement = (0, import_react12.useCallback)(
12342
12336
  (movement, count) => {
12343
12337
  dispatch({ type: "vim_change_movement", payload: { movement, count } });
12344
12338
  },
12345
12339
  [dispatch]
12346
12340
  );
12347
- const vimDeleteMovement = (0, import_react14.useCallback)(
12341
+ const vimDeleteMovement = (0, import_react12.useCallback)(
12348
12342
  (movement, count) => {
12349
12343
  dispatch({ type: "vim_delete_movement", payload: { movement, count } });
12350
12344
  },
12351
12345
  [dispatch]
12352
12346
  );
12353
- const vimMoveLeft = (0, import_react14.useCallback)(
12347
+ const vimMoveLeft = (0, import_react12.useCallback)(
12354
12348
  (count) => {
12355
12349
  dispatch({ type: "vim_move_left", payload: { count } });
12356
12350
  },
12357
12351
  [dispatch]
12358
12352
  );
12359
- const vimMoveRight = (0, import_react14.useCallback)(
12353
+ const vimMoveRight = (0, import_react12.useCallback)(
12360
12354
  (count) => {
12361
12355
  dispatch({ type: "vim_move_right", payload: { count } });
12362
12356
  },
12363
12357
  [dispatch]
12364
12358
  );
12365
- const vimMoveUp = (0, import_react14.useCallback)(
12359
+ const vimMoveUp = (0, import_react12.useCallback)(
12366
12360
  (count) => {
12367
12361
  dispatch({ type: "vim_move_up", payload: { count } });
12368
12362
  },
12369
12363
  [dispatch]
12370
12364
  );
12371
- const vimMoveDown = (0, import_react14.useCallback)(
12365
+ const vimMoveDown = (0, import_react12.useCallback)(
12372
12366
  (count) => {
12373
12367
  dispatch({ type: "vim_move_down", payload: { count } });
12374
12368
  },
12375
12369
  [dispatch]
12376
12370
  );
12377
- const vimMoveWordForward = (0, import_react14.useCallback)(
12371
+ const vimMoveWordForward = (0, import_react12.useCallback)(
12378
12372
  (count) => {
12379
12373
  dispatch({ type: "vim_move_word_forward", payload: { count } });
12380
12374
  },
12381
12375
  [dispatch]
12382
12376
  );
12383
- const vimMoveWordBackward = (0, import_react14.useCallback)(
12377
+ const vimMoveWordBackward = (0, import_react12.useCallback)(
12384
12378
  (count) => {
12385
12379
  dispatch({ type: "vim_move_word_backward", payload: { count } });
12386
12380
  },
12387
12381
  [dispatch]
12388
12382
  );
12389
- const vimMoveWordEnd = (0, import_react14.useCallback)(
12383
+ const vimMoveWordEnd = (0, import_react12.useCallback)(
12390
12384
  (count) => {
12391
12385
  dispatch({ type: "vim_move_word_end", payload: { count } });
12392
12386
  },
12393
12387
  [dispatch]
12394
12388
  );
12395
- const vimDeleteChar = (0, import_react14.useCallback)(
12389
+ const vimDeleteChar = (0, import_react12.useCallback)(
12396
12390
  (count) => {
12397
12391
  dispatch({ type: "vim_delete_char", payload: { count } });
12398
12392
  },
12399
12393
  [dispatch]
12400
12394
  );
12401
- const vimInsertAtCursor = (0, import_react14.useCallback)(() => {
12395
+ const vimInsertAtCursor = (0, import_react12.useCallback)(() => {
12402
12396
  dispatch({ type: "vim_insert_at_cursor" });
12403
12397
  }, [dispatch]);
12404
- const vimAppendAtCursor = (0, import_react14.useCallback)(() => {
12398
+ const vimAppendAtCursor = (0, import_react12.useCallback)(() => {
12405
12399
  dispatch({ type: "vim_append_at_cursor" });
12406
12400
  }, [dispatch]);
12407
- const vimOpenLineBelow = (0, import_react14.useCallback)(() => {
12401
+ const vimOpenLineBelow = (0, import_react12.useCallback)(() => {
12408
12402
  dispatch({ type: "vim_open_line_below" });
12409
12403
  }, [dispatch]);
12410
- const vimOpenLineAbove = (0, import_react14.useCallback)(() => {
12404
+ const vimOpenLineAbove = (0, import_react12.useCallback)(() => {
12411
12405
  dispatch({ type: "vim_open_line_above" });
12412
12406
  }, [dispatch]);
12413
- const vimAppendAtLineEnd = (0, import_react14.useCallback)(() => {
12407
+ const vimAppendAtLineEnd = (0, import_react12.useCallback)(() => {
12414
12408
  dispatch({ type: "vim_append_at_line_end" });
12415
12409
  }, [dispatch]);
12416
- const vimInsertAtLineStart = (0, import_react14.useCallback)(() => {
12410
+ const vimInsertAtLineStart = (0, import_react12.useCallback)(() => {
12417
12411
  dispatch({ type: "vim_insert_at_line_start" });
12418
12412
  }, [dispatch]);
12419
- const vimMoveToLineStart = (0, import_react14.useCallback)(() => {
12413
+ const vimMoveToLineStart = (0, import_react12.useCallback)(() => {
12420
12414
  dispatch({ type: "vim_move_to_line_start" });
12421
12415
  }, [dispatch]);
12422
- const vimMoveToLineEnd = (0, import_react14.useCallback)(() => {
12416
+ const vimMoveToLineEnd = (0, import_react12.useCallback)(() => {
12423
12417
  dispatch({ type: "vim_move_to_line_end" });
12424
12418
  }, [dispatch]);
12425
- const vimMoveToFirstNonWhitespace = (0, import_react14.useCallback)(() => {
12419
+ const vimMoveToFirstNonWhitespace = (0, import_react12.useCallback)(() => {
12426
12420
  dispatch({ type: "vim_move_to_first_nonwhitespace" });
12427
12421
  }, [dispatch]);
12428
- const vimMoveToFirstLine = (0, import_react14.useCallback)(() => {
12422
+ const vimMoveToFirstLine = (0, import_react12.useCallback)(() => {
12429
12423
  dispatch({ type: "vim_move_to_first_line" });
12430
12424
  }, [dispatch]);
12431
- const vimMoveToLastLine = (0, import_react14.useCallback)(() => {
12425
+ const vimMoveToLastLine = (0, import_react12.useCallback)(() => {
12432
12426
  dispatch({ type: "vim_move_to_last_line" });
12433
12427
  }, [dispatch]);
12434
- const vimMoveToLine = (0, import_react14.useCallback)(
12428
+ const vimMoveToLine = (0, import_react12.useCallback)(
12435
12429
  (lineNumber) => {
12436
12430
  dispatch({ type: "vim_move_to_line", payload: { lineNumber } });
12437
12431
  },
12438
12432
  [dispatch]
12439
12433
  );
12440
- const vimEscapeInsertMode = (0, import_react14.useCallback)(() => {
12434
+ const vimEscapeInsertMode = (0, import_react12.useCallback)(() => {
12441
12435
  dispatch({ type: "vim_escape_insert_mode" });
12442
12436
  }, [dispatch]);
12443
- const openInExternalEditor = (0, import_react14.useCallback)(
12437
+ const openInExternalEditor = (0, import_react12.useCallback)(
12444
12438
  async (opts = {}) => {
12445
12439
  let tmpDir;
12446
12440
  let filePath;
@@ -12558,7 +12552,7 @@ function useTextBuffer({
12558
12552
  },
12559
12553
  [dispatch, stdin, setRawMode, preferredEditor]
12560
12554
  );
12561
- const handleInput = (0, import_react14.useCallback)(
12555
+ const handleInput = (0, import_react12.useCallback)(
12562
12556
  (key) => {
12563
12557
  const { sequence: input } = key;
12564
12558
  if (key.paste) {
@@ -12609,11 +12603,11 @@ function useTextBuffer({
12609
12603
  redo
12610
12604
  ]
12611
12605
  );
12612
- const renderedVisualLines = (0, import_react14.useMemo)(
12606
+ const renderedVisualLines = (0, import_react12.useMemo)(
12613
12607
  () => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height),
12614
12608
  [visualLines, visualScrollRow, viewport.height]
12615
12609
  );
12616
- const replaceRange = (0, import_react14.useCallback)(
12610
+ const replaceRange = (0, import_react12.useCallback)(
12617
12611
  (startRow, startCol, endRow, endCol, text2) => {
12618
12612
  dispatch({
12619
12613
  type: "replace_range",
@@ -12622,7 +12616,7 @@ function useTextBuffer({
12622
12616
  },
12623
12617
  [dispatch]
12624
12618
  );
12625
- const replaceRangeByOffset = (0, import_react14.useCallback)(
12619
+ const replaceRangeByOffset = (0, import_react12.useCallback)(
12626
12620
  (startOffset, endOffset, replacementText) => {
12627
12621
  const currentText = stateRef.current.lines.join("\n");
12628
12622
  const [startRow, startCol] = offsetToLogicalPos(currentText, startOffset);
@@ -12631,13 +12625,13 @@ function useTextBuffer({
12631
12625
  },
12632
12626
  [replaceRange]
12633
12627
  );
12634
- const moveToOffset = (0, import_react14.useCallback)(
12628
+ const moveToOffset = (0, import_react12.useCallback)(
12635
12629
  (offset) => {
12636
12630
  dispatch({ type: "move_to_offset", payload: { offset } });
12637
12631
  },
12638
12632
  [dispatch]
12639
12633
  );
12640
- const returnValue = (0, import_react14.useMemo)(
12634
+ const returnValue = (0, import_react12.useMemo)(
12641
12635
  () => ({
12642
12636
  get lines() {
12643
12637
  return stateRef.current.lines;
@@ -12773,11 +12767,11 @@ __name(useTextBuffer, "useTextBuffer");
12773
12767
 
12774
12768
  // packages/cli/src/ui/hooks/usePreferredEditor.ts
12775
12769
  init_esbuild_shims();
12776
- var import_react15 = __toESM(require_react(), 1);
12770
+ var import_react13 = __toESM(require_react(), 1);
12777
12771
  var debugLogger5 = createDebugLogger("PREFERRED_EDITOR");
12778
12772
  function usePreferredEditor() {
12779
12773
  const settings = useSettings();
12780
- return (0, import_react15.useMemo)(() => {
12774
+ return (0, import_react13.useMemo)(() => {
12781
12775
  const raw = settings.merged.general?.preferredEditor ?? "";
12782
12776
  if (raw && !isValidEditorType(raw)) {
12783
12777
  debugLogger5.warn(
@@ -12797,7 +12791,7 @@ function usePreferredEditor() {
12797
12791
  __name(usePreferredEditor, "usePreferredEditor");
12798
12792
 
12799
12793
  // packages/cli/src/ui/components/shared/TextInput.tsx
12800
- var import_react16 = __toESM(require_react(), 1);
12794
+ var import_react14 = __toESM(require_react(), 1);
12801
12795
 
12802
12796
  // packages/cli/src/ui/utils/software-cursor.ts
12803
12797
  init_esbuild_shims();
@@ -12895,12 +12889,12 @@ function TextInput({
12895
12889
  ellipsizeOverflow = false
12896
12890
  }) {
12897
12891
  const allowMultiline = height > 1;
12898
- const [cursorVisible, setCursorVisible] = (0, import_react16.useState)(isActive);
12899
- const onChangeRef = (0, import_react16.useRef)(onChange);
12900
- (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)(() => {
12901
12895
  onChangeRef.current = onChange;
12902
12896
  }, [onChange]);
12903
- const stableOnChange = (0, import_react16.useCallback)((text) => {
12897
+ const stableOnChange = (0, import_react14.useCallback)((text) => {
12904
12898
  onChangeRef.current?.(text);
12905
12899
  }, []);
12906
12900
  const preferredEditor = usePreferredEditor();
@@ -12915,7 +12909,7 @@ function TextInput({
12915
12909
  onChange: stableOnChange,
12916
12910
  preferredEditor
12917
12911
  });
12918
- (0, import_react16.useEffect)(() => {
12912
+ (0, import_react14.useEffect)(() => {
12919
12913
  if (!isActive) {
12920
12914
  setCursorVisible(false);
12921
12915
  return;
@@ -13034,13 +13028,13 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13034
13028
  isFocused = true,
13035
13029
  onConfirm
13036
13030
  }) => {
13037
- const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react17.useState)(0);
13038
- const [selectedOptions, setSelectedOptions] = (0, import_react17.useState)({});
13039
- const [customInputValues, setCustomInputValues] = (0, import_react17.useState)({});
13040
- const customInputValuesRef = (0, import_react17.useRef)({});
13041
- const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
13042
- const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react17.useState)({});
13043
- 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)({});
13044
13038
  const hasMultipleQuestions = confirmationDetails.questions.length > 1;
13045
13039
  const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
13046
13040
  const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
@@ -13134,6 +13128,10 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13134
13128
  void onConfirm("cancel" /* Cancel */);
13135
13129
  return;
13136
13130
  }
13131
+ if (key.name === "return") {
13132
+ handleCustomInputSubmit();
13133
+ return;
13134
+ }
13137
13135
  return;
13138
13136
  }
13139
13137
  const input = key.sequence;
@@ -13159,8 +13157,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
13159
13157
  setSelectedIndex(Math.min(totalOptions - 1, selectedIndex + 1));
13160
13158
  return;
13161
13159
  }
13162
- const numKey = parseInt(input || "", 10);
13163
- 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) {
13164
13162
  const targetIndex = numKey - 1;
13165
13163
  setSelectedIndex(targetIndex);
13166
13164
  if (!isMultiSelect && !isSubmitTab && currentQuestion && targetIndex < currentQuestion.options.length) {
@@ -13415,9 +13413,9 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
13415
13413
  const { onConfirm } = confirmationDetails;
13416
13414
  const settings = useSettings();
13417
13415
  const preferredEditor = settings.merged.general?.preferredEditor;
13418
- const [ideClient, setIdeClient] = (0, import_react18.useState)(null);
13419
- const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react18.useState)(false);
13420
- (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)(() => {
13421
13419
  let isMounted = true;
13422
13420
  if (config.getIdeMode()) {
13423
13421
  const getIdeClient = /* @__PURE__ */ __name(async () => {
@@ -13802,7 +13800,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
13802
13800
 
13803
13801
  // packages/cli/src/ui/components/ShellInputPrompt.tsx
13804
13802
  init_esbuild_shims();
13805
- var import_react19 = __toESM(require_react(), 1);
13803
+ var import_react17 = __toESM(require_react(), 1);
13806
13804
 
13807
13805
  // packages/cli/src/ui/hooks/keyToAnsi.ts
13808
13806
  init_esbuild_shims();
@@ -13865,7 +13863,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13865
13863
  activeShellPtyId,
13866
13864
  focus = true
13867
13865
  }) => {
13868
- const handleShellInputSubmit = (0, import_react19.useCallback)(
13866
+ const handleShellInputSubmit = (0, import_react17.useCallback)(
13869
13867
  (input) => {
13870
13868
  if (activeShellPtyId) {
13871
13869
  ShellExecutionService.writeToPty(activeShellPtyId, input);
@@ -13873,7 +13871,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13873
13871
  },
13874
13872
  [activeShellPtyId]
13875
13873
  );
13876
- const handleInput = (0, import_react19.useCallback)(
13874
+ const handleInput = (0, import_react17.useCallback)(
13877
13875
  (key) => {
13878
13876
  if (!focus || !activeShellPtyId) {
13879
13877
  return;
@@ -13908,16 +13906,16 @@ init_esbuild_shims();
13908
13906
 
13909
13907
  // packages/cli/src/ui/components/GeminiRespondingSpinner.tsx
13910
13908
  init_esbuild_shims();
13911
- var import_react22 = __toESM(require_react(), 1);
13909
+ var import_react20 = __toESM(require_react(), 1);
13912
13910
 
13913
13911
  // node_modules/ink-spinner/build/index.js
13914
13912
  init_esbuild_shims();
13915
- var import_react20 = __toESM(require_react(), 1);
13913
+ var import_react18 = __toESM(require_react(), 1);
13916
13914
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
13917
13915
  function Spinner({ type = "dots" }) {
13918
- const [frame, setFrame] = (0, import_react20.useState)(0);
13916
+ const [frame, setFrame] = (0, import_react18.useState)(0);
13919
13917
  const spinner = import_cli_spinners.default[type];
13920
- (0, import_react20.useEffect)(() => {
13918
+ (0, import_react18.useEffect)(() => {
13921
13919
  const timer = setInterval(() => {
13922
13920
  setFrame((previousFrame) => {
13923
13921
  const isLastFrame = previousFrame === spinner.frames.length - 1;
@@ -13928,19 +13926,19 @@ function Spinner({ type = "dots" }) {
13928
13926
  clearInterval(timer);
13929
13927
  };
13930
13928
  }, [spinner]);
13931
- return import_react20.default.createElement(Text, null, spinner.frames[frame]);
13929
+ return import_react18.default.createElement(Text, null, spinner.frames[frame]);
13932
13930
  }
13933
13931
  __name(Spinner, "Spinner");
13934
13932
  var build_default = Spinner;
13935
13933
 
13936
13934
  // packages/cli/src/ui/contexts/StreamingContext.tsx
13937
13935
  init_esbuild_shims();
13938
- var import_react21 = __toESM(require_react(), 1);
13939
- var StreamingContext = (0, import_react21.createContext)(
13936
+ var import_react19 = __toESM(require_react(), 1);
13937
+ var StreamingContext = (0, import_react19.createContext)(
13940
13938
  void 0
13941
13939
  );
13942
13940
  var useStreamingContext = /* @__PURE__ */ __name(() => {
13943
- const context = import_react21.default.useContext(StreamingContext);
13941
+ const context = import_react19.default.useContext(StreamingContext);
13944
13942
  if (context === void 0) {
13945
13943
  throw new Error(
13946
13944
  "useStreamingContext must be used within a StreamingContextProvider"
@@ -13975,8 +13973,8 @@ var GeminiSpinner = /* @__PURE__ */ __name(({
13975
13973
  }) => {
13976
13974
  const isScreenReaderEnabled = use_is_screen_reader_enabled_default();
13977
13975
  const isTmux = Boolean(process.env["TMUX"]);
13978
- const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react22.useState)(0);
13979
- (0, import_react22.useEffect)(() => {
13976
+ const [tmuxFrameIndex, setTmuxFrameIndex] = (0, import_react20.useState)(0);
13977
+ (0, import_react20.useEffect)(() => {
13980
13978
  if (isScreenReaderEnabled || !isTmux) {
13981
13979
  return;
13982
13980
  }
@@ -14021,15 +14019,15 @@ var ToolStatusIndicator = /* @__PURE__ */ __name(({
14021
14019
 
14022
14020
  // packages/cli/src/ui/components/shared/ToolElapsedTime.tsx
14023
14021
  init_esbuild_shims();
14024
- var import_react23 = __toESM(require_react(), 1);
14022
+ var import_react21 = __toESM(require_react(), 1);
14025
14023
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
14026
14024
  var ToolElapsedTime = /* @__PURE__ */ __name(({
14027
14025
  status,
14028
14026
  executionStartTime,
14029
14027
  timeoutMs
14030
14028
  }) => {
14031
- const [elapsedSeconds, setElapsedSeconds] = (0, import_react23.useState)(0);
14032
- (0, import_react23.useEffect)(() => {
14029
+ const [elapsedSeconds, setElapsedSeconds] = (0, import_react21.useState)(0);
14030
+ (0, import_react21.useEffect)(() => {
14033
14031
  if (status !== "Executing" /* Executing */ || !executionStartTime) {
14034
14032
  setElapsedSeconds(0);
14035
14033
  return;
@@ -14273,7 +14271,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
14273
14271
  };
14274
14272
  }
14275
14273
  __name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
14276
- var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react24.default.useMemo(() => {
14274
+ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react22.default.useMemo(() => {
14277
14275
  if (!resultDisplay) {
14278
14276
  return { type: "none" };
14279
14277
  }
@@ -14487,21 +14485,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
14487
14485
  }) => {
14488
14486
  const settings = useSettings();
14489
14487
  const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
14490
- const [lastUpdateTime, setLastUpdateTime] = import_react24.default.useState(null);
14491
- const [userHasFocused, setUserHasFocused] = import_react24.default.useState(false);
14492
- const [showFocusHint, setShowFocusHint] = import_react24.default.useState(false);
14493
- 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(() => {
14494
14492
  if (resultDisplay) {
14495
14493
  setLastUpdateTime(/* @__PURE__ */ new Date());
14496
14494
  }
14497
14495
  }, [resultDisplay]);
14498
- const shellTimeoutMs = import_react24.default.useMemo(() => {
14496
+ const shellTimeoutMs = import_react22.default.useMemo(() => {
14499
14497
  if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
14500
14498
  return resultDisplay.timeoutMs;
14501
14499
  }
14502
14500
  return void 0;
14503
14501
  }, [resultDisplay]);
14504
- import_react24.default.useEffect(() => {
14502
+ import_react22.default.useEffect(() => {
14505
14503
  if (!lastUpdateTime) {
14506
14504
  return;
14507
14505
  }
@@ -14510,7 +14508,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
14510
14508
  }, 5e3);
14511
14509
  return () => clearTimeout(timer);
14512
14510
  }, [lastUpdateTime]);
14513
- import_react24.default.useEffect(() => {
14511
+ import_react22.default.useEffect(() => {
14514
14512
  if (isThisShellFocused) {
14515
14513
  setUserHasFocused(true);
14516
14514
  }
@@ -14629,7 +14627,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
14629
14627
  status,
14630
14628
  emphasis
14631
14629
  }) => {
14632
- const nameColor = import_react24.default.useMemo(() => {
14630
+ const nameColor = import_react22.default.useMemo(() => {
14633
14631
  switch (emphasis) {
14634
14632
  case "high":
14635
14633
  return theme.text.primary;
@@ -14656,7 +14654,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
14656
14654
 
14657
14655
  // packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
14658
14656
  init_esbuild_shims();
14659
- var import_react25 = __toESM(require_react(), 1);
14657
+ var import_react23 = __toESM(require_react(), 1);
14660
14658
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
14661
14659
  function deriveAgentId(toolCall, resultDisplay) {
14662
14660
  return `${resultDisplay.subagentName}-${toolCall.callId}`;
@@ -14723,8 +14721,8 @@ function truncateMiddle(input, max) {
14723
14721
  }
14724
14722
  __name(truncateMiddle, "truncateMiddle");
14725
14723
  var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
14726
- const config = (0, import_react25.useContext)(ConfigContext);
14727
- const agentEntries = (0, import_react25.useMemo)(() => {
14724
+ const config = (0, import_react23.useContext)(ConfigContext);
14725
+ const agentEntries = (0, import_react23.useMemo)(() => {
14728
14726
  const out = [];
14729
14727
  for (const tc of toolCalls) {
14730
14728
  if (isAgentResult(tc.resultDisplay)) {
@@ -14733,19 +14731,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
14733
14731
  }
14734
14732
  return out;
14735
14733
  }, [toolCalls]);
14736
- const [now, setNow] = (0, import_react25.useState)(() => Date.now());
14737
- const hasLiveAgent = (0, import_react25.useMemo)(
14734
+ const [now, setNow] = (0, import_react23.useState)(() => Date.now());
14735
+ const hasLiveAgent = (0, import_react23.useMemo)(
14738
14736
  () => agentEntries.some(
14739
14737
  (e) => e.result.status === "running" || e.result.status === "background"
14740
14738
  ),
14741
14739
  [agentEntries]
14742
14740
  );
14743
- (0, import_react25.useEffect)(() => {
14741
+ (0, import_react23.useEffect)(() => {
14744
14742
  if (!hasLiveAgent) return;
14745
14743
  const id = setInterval(() => setNow(Date.now()), 1e3);
14746
14744
  return () => clearInterval(id);
14747
14745
  }, [hasLiveAgent]);
14748
- const rows = (0, import_react25.useMemo)(() => {
14746
+ const rows = (0, import_react23.useMemo)(() => {
14749
14747
  const registry = config?.getBackgroundTaskRegistry();
14750
14748
  void now;
14751
14749
  return agentEntries.map(({ toolCall, result }) => {
@@ -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,7 +14890,7 @@ 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
  );
@@ -15127,7 +15125,7 @@ init_esbuild_shims();
15127
15125
 
15128
15126
  // node_modules/ink-link/dist/index.js
15129
15127
  init_esbuild_shims();
15130
- var import_react27 = __toESM(require_react(), 1);
15128
+ var import_react25 = __toESM(require_react(), 1);
15131
15129
  var import_prop_types = __toESM(require_prop_types(), 1);
15132
15130
 
15133
15131
  // node_modules/ink-link/node_modules/terminal-link/index.js
@@ -15275,10 +15273,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
15275
15273
  // node_modules/ink-link/dist/index.js
15276
15274
  var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
15277
15275
  // eslint-disable-line react/function-component-definition
15278
- import_react27.default.createElement(
15276
+ import_react25.default.createElement(
15279
15277
  Transform,
15280
15278
  { transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
15281
- import_react27.default.createElement(Text, null, children)
15279
+ import_react25.default.createElement(Text, null, children)
15282
15280
  )
15283
15281
  ), "Link");
15284
15282
  Link.propTypes = {
@@ -15432,7 +15430,7 @@ init_esbuild_shims();
15432
15430
 
15433
15431
  // node_modules/ink-gradient/dist/index.js
15434
15432
  init_esbuild_shims();
15435
- var import_react28 = __toESM(require_react(), 1);
15433
+ var import_react26 = __toESM(require_react(), 1);
15436
15434
  var import_prop_types2 = __toESM(require_prop_types(), 1);
15437
15435
  var import_gradient_string = __toESM(require_gradient_string(), 1);
15438
15436
  var Gradient = /* @__PURE__ */ __name((props) => {
@@ -15448,7 +15446,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
15448
15446
  throw new Error("Either `name` or `colors` prop must be provided");
15449
15447
  }
15450
15448
  const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
15451
- return import_react28.default.createElement(Transform, { transform: applyGradient }, props.children);
15449
+ return import_react26.default.createElement(Transform, { transform: applyGradient }, props.children);
15452
15450
  }, "Gradient");
15453
15451
  Gradient.propTypes = {
15454
15452
  children: import_prop_types2.default.oneOfType([
@@ -16248,7 +16246,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
16248
16246
 
16249
16247
  // packages/cli/src/ui/components/Help.tsx
16250
16248
  init_esbuild_shims();
16251
- var import_react29 = __toESM(require_react(), 1);
16249
+ var import_react27 = __toESM(require_react(), 1);
16252
16250
  var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
16253
16251
  var DEFAULT_WIDTH = 100;
16254
16252
  var KEY_COL_WIDTH = 20;
@@ -16269,7 +16267,7 @@ var Help = /* @__PURE__ */ __name(({
16269
16267
  }) => {
16270
16268
  const safeWidth = Math.max(72, width);
16271
16269
  const bodyWidth = safeWidth - 6;
16272
- const handleTabChange = (0, import_react29.useCallback)(
16270
+ const handleTabChange = (0, import_react27.useCallback)(
16273
16271
  (direction) => {
16274
16272
  const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
16275
16273
  const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
@@ -16406,20 +16404,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
16406
16404
  /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
16407
16405
  ] }), "ShortcutRow");
16408
16406
  var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
16409
- const groups = (0, import_react29.useMemo)(
16407
+ const groups = (0, import_react27.useMemo)(
16410
16408
  () => groupCommands(commands, customOnly),
16411
16409
  [commands, customOnly]
16412
16410
  );
16413
- const lines = (0, import_react29.useMemo)(
16411
+ const lines = (0, import_react27.useMemo)(
16414
16412
  () => renderCommandLines(groups, width),
16415
16413
  [groups, width]
16416
16414
  );
16417
16415
  const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
16418
- const [scrollOffset, setScrollOffset] = (0, import_react29.useState)(0);
16419
- (0, import_react29.useEffect)(() => {
16416
+ const [scrollOffset, setScrollOffset] = (0, import_react27.useState)(0);
16417
+ (0, import_react27.useEffect)(() => {
16420
16418
  setScrollOffset(0);
16421
16419
  }, [customOnly, commands]);
16422
- (0, import_react29.useEffect)(() => {
16420
+ (0, import_react27.useEffect)(() => {
16423
16421
  setScrollOffset((offset) => Math.min(offset, maxScroll));
16424
16422
  }, [maxScroll]);
16425
16423
  useKeypress(
@@ -16607,26 +16605,26 @@ init_esbuild_shims();
16607
16605
 
16608
16606
  // packages/cli/src/ui/contexts/UIStateContext.tsx
16609
16607
  init_esbuild_shims();
16610
- var import_react36 = __toESM(require_react(), 1);
16608
+ var import_react34 = __toESM(require_react(), 1);
16611
16609
 
16612
16610
  // packages/cli/src/ui/hooks/useHistoryManager.ts
16613
16611
  init_esbuild_shims();
16614
- var import_react30 = __toESM(require_react(), 1);
16612
+ var import_react28 = __toESM(require_react(), 1);
16615
16613
  import process2 from "node:process";
16616
16614
  var debugLogger6 = createDebugLogger("HISTORY_MANAGER");
16617
16615
  var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
16618
16616
  var UI_COMPACT_KEEP_RECENT = 20;
16619
16617
  function useHistory() {
16620
- const [history, setHistory] = (0, import_react30.useState)([]);
16621
- const messageIdCounterRef = (0, import_react30.useRef)(0);
16622
- 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) => {
16623
16621
  messageIdCounterRef.current += 1;
16624
16622
  return baseTimestamp + messageIdCounterRef.current;
16625
16623
  }, []);
16626
- const loadHistory = (0, import_react30.useCallback)((newHistory) => {
16624
+ const loadHistory = (0, import_react28.useCallback)((newHistory) => {
16627
16625
  setHistory(newHistory);
16628
16626
  }, []);
16629
- const addItem = (0, import_react30.useCallback)(
16627
+ const addItem = (0, import_react28.useCallback)(
16630
16628
  (itemData, baseTimestamp) => {
16631
16629
  const id = getNextMessageId(baseTimestamp);
16632
16630
  const newItem = { ...itemData, id };
@@ -16650,7 +16648,7 @@ function useHistory() {
16650
16648
  },
16651
16649
  [getNextMessageId]
16652
16650
  );
16653
- const updateItem = (0, import_react30.useCallback)(
16651
+ const updateItem = (0, import_react28.useCallback)(
16654
16652
  (id, updates) => {
16655
16653
  setHistory((prevHistory) => {
16656
16654
  let updated = false;
@@ -16673,7 +16671,7 @@ function useHistory() {
16673
16671
  },
16674
16672
  []
16675
16673
  );
16676
- const clearItems = (0, import_react30.useCallback)(() => {
16674
+ const clearItems = (0, import_react28.useCallback)(() => {
16677
16675
  if (debugLogger6.isEnabled()) {
16678
16676
  debugLogger6.debug(
16679
16677
  `[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
@@ -16682,13 +16680,13 @@ function useHistory() {
16682
16680
  setHistory([]);
16683
16681
  messageIdCounterRef.current = 0;
16684
16682
  }, []);
16685
- const truncateToItem = (0, import_react30.useCallback)((itemId) => {
16683
+ const truncateToItem = (0, import_react28.useCallback)((itemId) => {
16686
16684
  setHistory((prev) => {
16687
16685
  const index = prev.findIndex((h) => h.id === itemId);
16688
16686
  return index === -1 ? prev : prev.slice(0, index);
16689
16687
  });
16690
16688
  }, []);
16691
- const compactOldItems = (0, import_react30.useCallback)(() => {
16689
+ const compactOldItems = (0, import_react28.useCallback)(() => {
16692
16690
  setHistory((prev) => {
16693
16691
  if (prev.length === 0) return prev;
16694
16692
  let thoughtRemoved = 0;
@@ -16752,7 +16750,7 @@ function useHistory() {
16752
16750
  return thoughtRemoved > 0 || toolGroupsCompacted > 0 ? next : prev;
16753
16751
  });
16754
16752
  }, []);
16755
- return (0, import_react30.useMemo)(
16753
+ return (0, import_react28.useMemo)(
16756
16754
  () => ({
16757
16755
  history,
16758
16756
  addItem,
@@ -16777,7 +16775,7 @@ __name(useHistory, "useHistory");
16777
16775
 
16778
16776
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
16779
16777
  init_esbuild_shims();
16780
- var import_react33 = __toESM(require_react(), 1);
16778
+ var import_react31 = __toESM(require_react(), 1);
16781
16779
 
16782
16780
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
16783
16781
  init_esbuild_shims();
@@ -16919,7 +16917,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
16919
16917
 
16920
16918
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
16921
16919
  init_esbuild_shims();
16922
- var import_react31 = __toESM(require_react(), 1);
16920
+ var import_react29 = __toESM(require_react(), 1);
16923
16921
  import * as process3 from "node:process";
16924
16922
  import * as path2 from "node:path";
16925
16923
  var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
@@ -16927,7 +16925,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
16927
16925
  onSelect,
16928
16926
  isRestarting
16929
16927
  }) => {
16930
- (0, import_react31.useEffect)(() => {
16928
+ (0, import_react29.useEffect)(() => {
16931
16929
  const doRelaunch = /* @__PURE__ */ __name(async () => {
16932
16930
  if (isRestarting) {
16933
16931
  setTimeout(async () => {
@@ -17055,16 +17053,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
17055
17053
 
17056
17054
  // packages/cli/src/ui/hooks/useArenaCommand.ts
17057
17055
  init_esbuild_shims();
17058
- var import_react32 = __toESM(require_react(), 1);
17056
+ var import_react30 = __toESM(require_react(), 1);
17059
17057
  function useArenaCommand() {
17060
- const [activeArenaDialog, setActiveArenaDialog] = (0, import_react32.useState)(null);
17061
- const openArenaDialog = (0, import_react32.useCallback)(
17058
+ const [activeArenaDialog, setActiveArenaDialog] = (0, import_react30.useState)(null);
17059
+ const openArenaDialog = (0, import_react30.useCallback)(
17062
17060
  (type) => {
17063
17061
  setActiveArenaDialog(type);
17064
17062
  },
17065
17063
  []
17066
17064
  );
17067
- const closeArenaDialog = (0, import_react32.useCallback)(() => {
17065
+ const closeArenaDialog = (0, import_react30.useCallback)(() => {
17068
17066
  setActiveArenaDialog(null);
17069
17067
  }, []);
17070
17068
  return {
@@ -17076,9 +17074,9 @@ function useArenaCommand() {
17076
17074
  __name(useArenaCommand, "useArenaCommand");
17077
17075
 
17078
17076
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
17079
- var UIActionsContext = (0, import_react33.createContext)(null);
17077
+ var UIActionsContext = (0, import_react31.createContext)(null);
17080
17078
  var useUIActions = /* @__PURE__ */ __name(() => {
17081
- const context = (0, import_react33.useContext)(UIActionsContext);
17079
+ const context = (0, import_react31.useContext)(UIActionsContext);
17082
17080
  if (!context) {
17083
17081
  throw new Error("useUIActions must be used within a UIActionsProvider");
17084
17082
  }
@@ -17087,16 +17085,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
17087
17085
 
17088
17086
  // packages/cli/src/ui/hooks/useIdeTrustListener.ts
17089
17087
  init_esbuild_shims();
17090
- var import_react34 = __toESM(require_react(), 1);
17088
+ var import_react32 = __toESM(require_react(), 1);
17091
17089
  function useIdeTrustListener() {
17092
17090
  const settings = useSettings();
17093
- const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
17091
+ const [connectionStatus, setConnectionStatus] = (0, import_react32.useState)(
17094
17092
  "disconnected" /* Disconnected */
17095
17093
  );
17096
- const previousTrust = (0, import_react34.useRef)(void 0);
17097
- const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
17098
- const [needsRestart, setNeedsRestart] = (0, import_react34.useState)(false);
17099
- 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) => {
17100
17098
  const handleStatusChange = /* @__PURE__ */ __name((state) => {
17101
17099
  setConnectionStatus(state.status);
17102
17100
  setRestartReason("CONNECTION_CHANGE");
@@ -17126,8 +17124,8 @@ function useIdeTrustListener() {
17126
17124
  }
17127
17125
  return ideContextStore.get()?.workspaceState?.isTrusted;
17128
17126
  }, "getSnapshot");
17129
- const isIdeTrusted = (0, import_react34.useSyncExternalStore)(subscribe, getSnapshot);
17130
- (0, import_react34.useEffect)(() => {
17127
+ const isIdeTrusted = (0, import_react32.useSyncExternalStore)(subscribe, getSnapshot);
17128
+ (0, import_react32.useEffect)(() => {
17131
17129
  const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
17132
17130
  if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
17133
17131
  setNeedsRestart(true);
@@ -17140,7 +17138,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
17140
17138
 
17141
17139
  // packages/cli/src/ui/hooks/useProviderUpdates.ts
17142
17140
  init_esbuild_shims();
17143
- var import_react35 = __toESM(require_react(), 1);
17141
+ var import_react33 = __toESM(require_react(), 1);
17144
17142
  function getProviderMetadata(settings, metadataKey) {
17145
17143
  const mergedSettings = settings.merged;
17146
17144
  const ns = mergedSettings[PROVIDER_METADATA_NS];
@@ -17239,9 +17237,9 @@ function findAllPendingUpdates(settings, currentModel) {
17239
17237
  }
17240
17238
  __name(findAllPendingUpdates, "findAllPendingUpdates");
17241
17239
  function useProviderUpdates(settings, config, addItem) {
17242
- const [updateRequest, setUpdateRequest] = (0, import_react35.useState)();
17243
- const migrated = (0, import_react35.useRef)(false);
17244
- 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)(
17245
17243
  async (providerCfg, baseUrl) => {
17246
17244
  try {
17247
17245
  const resolved = resolveBaseUrl(providerCfg, baseUrl);
@@ -17321,7 +17319,7 @@ function useProviderUpdates(settings, config, addItem) {
17321
17319
  },
17322
17320
  [settings, config, addItem]
17323
17321
  );
17324
- const checkForUpdates = (0, import_react35.useCallback)(() => {
17322
+ const checkForUpdates = (0, import_react33.useCallback)(() => {
17325
17323
  if (!migrated.current) {
17326
17324
  migrated.current = true;
17327
17325
  migrateProviderMetadata(settings);
@@ -17354,10 +17352,10 @@ function useProviderUpdates(settings, config, addItem) {
17354
17352
  }, "onConfirm")
17355
17353
  });
17356
17354
  }, [settings, config, executeUpdate]);
17357
- (0, import_react35.useEffect)(() => {
17355
+ (0, import_react33.useEffect)(() => {
17358
17356
  checkForUpdates();
17359
17357
  }, [checkForUpdates]);
17360
- const dismissProviderUpdate = (0, import_react35.useCallback)(() => {
17358
+ const dismissProviderUpdate = (0, import_react33.useCallback)(() => {
17361
17359
  setUpdateRequest(void 0);
17362
17360
  }, []);
17363
17361
  return {
@@ -17368,9 +17366,9 @@ function useProviderUpdates(settings, config, addItem) {
17368
17366
  __name(useProviderUpdates, "useProviderUpdates");
17369
17367
 
17370
17368
  // packages/cli/src/ui/contexts/UIStateContext.tsx
17371
- var UIStateContext = (0, import_react36.createContext)(null);
17369
+ var UIStateContext = (0, import_react34.createContext)(null);
17372
17370
  var useUIState = /* @__PURE__ */ __name(() => {
17373
- const context = (0, import_react36.useContext)(UIStateContext);
17371
+ const context = (0, import_react34.useContext)(UIStateContext);
17374
17372
  if (!context) {
17375
17373
  throw new Error("useUIState must be used within a UIStateProvider");
17376
17374
  }
@@ -18545,7 +18543,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
18545
18543
 
18546
18544
  // packages/cli/src/ui/components/messages/BtwMessage.tsx
18547
18545
  init_esbuild_shims();
18548
- var import_react37 = __toESM(require_react(), 1);
18546
+ var import_react35 = __toESM(require_react(), 1);
18549
18547
  var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
18550
18548
  var BTW_SELF_CHROME = 4;
18551
18549
  function normalizeCodeFences(text) {
@@ -18593,7 +18591,7 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
18593
18591
  }
18594
18592
  );
18595
18593
  }, "BtwMessageInternal");
18596
- var BtwMessage = import_react37.default.memo(BtwMessageInternal);
18594
+ var BtwMessage = import_react35.default.memo(BtwMessageInternal);
18597
18595
 
18598
18596
  // packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
18599
18597
  init_esbuild_shims();
@@ -18712,7 +18710,7 @@ __name(padRight, "padRight");
18712
18710
 
18713
18711
  // packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
18714
18712
  init_esbuild_shims();
18715
- var import_react38 = __toESM(require_react(), 1);
18713
+ var import_react36 = __toESM(require_react(), 1);
18716
18714
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
18717
18715
  var pluralTurns = /* @__PURE__ */ __name((n) => n === 1 ? "turn" : "turns", "pluralTurns");
18718
18716
  function assertNeverGoalStatusKind(kind) {
@@ -18813,115 +18811,25 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name(({
18813
18811
  ] })
18814
18812
  ] });
18815
18813
  }, "GoalStatusMessageInternal");
18816
- var GoalStatusMessage = import_react38.default.memo(GoalStatusMessageInternal);
18814
+ var GoalStatusMessage = import_react36.default.memo(GoalStatusMessageInternal);
18817
18815
 
18818
18816
  // packages/cli/src/ui/contexts/ThoughtExpandedContext.tsx
18819
18817
  init_esbuild_shims();
18820
- var import_react39 = __toESM(require_react(), 1);
18821
- var ThoughtExpandedContext = (0, import_react39.createContext)(false);
18822
- 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");
18823
18821
  var ThoughtExpandedProvider = ThoughtExpandedContext.Provider;
18824
18822
 
18825
18823
  // packages/cli/src/ui/contexts/ThinkingViewerContext.tsx
18826
18824
  init_esbuild_shims();
18827
- var import_react40 = __toESM(require_react(), 1);
18828
- var ThinkingViewerContext = (0, import_react40.createContext)({
18825
+ var import_react38 = __toESM(require_react(), 1);
18826
+ var ThinkingViewerContext = (0, import_react38.createContext)({
18829
18827
  openThinkingViewer: /* @__PURE__ */ __name(() => {
18830
18828
  }, "openThinkingViewer")
18831
18829
  });
18832
- var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react40.useContext)(ThinkingViewerContext), "useThinkingViewer");
18830
+ var useThinkingViewer = /* @__PURE__ */ __name(() => (0, import_react38.useContext)(ThinkingViewerContext), "useThinkingViewer");
18833
18831
  var ThinkingViewerProvider = ThinkingViewerContext.Provider;
18834
18832
 
18835
- // packages/cli/src/ui/hooks/useMouseEvents.ts
18836
- init_esbuild_shims();
18837
- var import_react41 = __toESM(require_react(), 1);
18838
- var mouseModeRefs = /* @__PURE__ */ new Map();
18839
- var disableAllMouseModes = /* @__PURE__ */ __name(() => {
18840
- for (const stdout of mouseModeRefs.keys()) {
18841
- disableMouseEvents(stdout);
18842
- }
18843
- mouseModeRefs.clear();
18844
- }, "disableAllMouseModes");
18845
- function acquireMouseMode(stdout) {
18846
- const entry = mouseModeRefs.get(stdout);
18847
- if (entry) {
18848
- entry.refs += 1;
18849
- return;
18850
- }
18851
- enableMouseEvents(stdout);
18852
- if (mouseModeRefs.size === 0) {
18853
- process.on("exit", disableAllMouseModes);
18854
- }
18855
- mouseModeRefs.set(stdout, { refs: 1 });
18856
- }
18857
- __name(acquireMouseMode, "acquireMouseMode");
18858
- function releaseMouseMode(stdout) {
18859
- const entry = mouseModeRefs.get(stdout);
18860
- if (!entry) return;
18861
- entry.refs -= 1;
18862
- if (entry.refs <= 0) {
18863
- mouseModeRefs.delete(stdout);
18864
- disableMouseEvents(stdout);
18865
- if (mouseModeRefs.size === 0) {
18866
- process.removeListener("exit", disableAllMouseModes);
18867
- }
18868
- }
18869
- }
18870
- __name(releaseMouseMode, "releaseMouseMode");
18871
- function useMouseEvents(handler, { isActive, bypassVpGate = false }) {
18872
- const { isRawModeSupported } = use_stdin_default();
18873
- const { stdout } = use_stdout_default();
18874
- const { subscribeMouse, unsubscribeMouse } = useKeypressContext();
18875
- const settings = (0, import_react41.useContext)(SettingsContext);
18876
- const isVpMode = settings?.merged.ui?.useTerminalBuffer ?? false;
18877
- const vpGateOpen = isVpMode || bypassVpGate;
18878
- const handlerRef = (0, import_react41.useRef)(handler);
18879
- handlerRef.current = handler;
18880
- const enabled = isActive && isRawModeSupported && vpGateOpen;
18881
- (0, import_react41.useEffect)(() => {
18882
- if (!enabled) return;
18883
- acquireMouseMode(stdout);
18884
- return () => {
18885
- releaseMouseMode(stdout);
18886
- };
18887
- }, [enabled, stdout]);
18888
- const mouseCallback = (0, import_react41.useCallback)((event) => {
18889
- handlerRef.current(event);
18890
- }, []);
18891
- (0, import_react41.useEffect)(() => {
18892
- if (!enabled) return;
18893
- subscribeMouse(mouseCallback);
18894
- return () => unsubscribeMouse(mouseCallback);
18895
- }, [enabled, subscribeMouse, unsubscribeMouse, mouseCallback]);
18896
- }
18897
- __name(useMouseEvents, "useMouseEvents");
18898
-
18899
- // packages/cli/src/ui/utils/measure-element-position.ts
18900
- init_esbuild_shims();
18901
- function measureElementPosition(node) {
18902
- const { yogaNode } = node;
18903
- if (!yogaNode) {
18904
- return { x: 0, y: 0, width: 0, height: 0 };
18905
- }
18906
- let x = yogaNode.getComputedLeft();
18907
- let y = yogaNode.getComputedTop();
18908
- let current = node.parentNode;
18909
- while (current) {
18910
- if (current.yogaNode) {
18911
- x += current.yogaNode.getComputedLeft();
18912
- y += current.yogaNode.getComputedTop();
18913
- }
18914
- current = current.parentNode;
18915
- }
18916
- return {
18917
- x,
18918
- y,
18919
- width: yogaNode.getComputedWidth(),
18920
- height: yogaNode.getComputedHeight()
18921
- };
18922
- }
18923
- __name(measureElementPosition, "measureElementPosition");
18924
-
18925
18833
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
18926
18834
  var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
18927
18835
  var ClickableThinkMessage = /* @__PURE__ */ __name(({
@@ -18933,15 +18841,15 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
18933
18841
  contentWidth,
18934
18842
  durationMs
18935
18843
  }) => {
18936
- const ref = (0, import_react42.useRef)(null);
18844
+ const ref = (0, import_react39.useRef)(null);
18937
18845
  const { openThinkingViewer } = useThinkingViewer();
18938
18846
  const isActive = !isPending && !expanded;
18939
- const sanitizedViewerText = (0, import_react42.useMemo)(
18847
+ const sanitizedViewerText = (0, import_react39.useMemo)(
18940
18848
  () => escapeAnsiCtrlCodes(viewerText),
18941
18849
  [viewerText]
18942
18850
  );
18943
18851
  useMouseEvents(
18944
- (0, import_react42.useCallback)(
18852
+ (0, import_react39.useCallback)(
18945
18853
  (event) => {
18946
18854
  if (event.name !== "left-press" || !ref.current) return;
18947
18855
  const metrics = measureElementPosition(ref.current);
@@ -19020,7 +18928,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
19020
18928
  const resolvedThoughtExpanded = thoughtExpanded ?? contextThoughtExpanded;
19021
18929
  const settings = useSettings();
19022
18930
  const showTimestamps = settings.merged.output?.showTimestamps === true;
19023
- const itemForDisplay = (0, import_react42.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
18931
+ const itemForDisplay = (0, import_react39.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
19024
18932
  const contentWidth = terminalWidth - 4;
19025
18933
  const boxWidth = mainAreaWidth || contentWidth;
19026
18934
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
@@ -19238,9 +19146,9 @@ function SessionPreview(props) {
19238
19146
  onResume
19239
19147
  } = props;
19240
19148
  const { columns } = useTerminalSize();
19241
- const [data, setData] = (0, import_react43.useState)(null);
19242
- const [error, setError] = (0, import_react43.useState)(null);
19243
- (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)(() => {
19244
19152
  let cancelled = false;
19245
19153
  setData(null);
19246
19154
  setError(null);
@@ -19259,11 +19167,11 @@ function SessionPreview(props) {
19259
19167
  cancelled = true;
19260
19168
  };
19261
19169
  }, [sessionService, sessionId]);
19262
- const items = (0, import_react43.useMemo)(() => {
19170
+ const items = (0, import_react40.useMemo)(() => {
19263
19171
  if (!data) return [];
19264
19172
  return buildResumedHistoryItems(data, null);
19265
19173
  }, [data]);
19266
- const computedMessageCount = (0, import_react43.useMemo)(() => {
19174
+ const computedMessageCount = (0, import_react40.useMemo)(() => {
19267
19175
  if (!data) return void 0;
19268
19176
  const seen = /* @__PURE__ */ new Set();
19269
19177
  for (const msg of data.conversation.messages) {
@@ -19571,10 +19479,10 @@ __name(SessionPicker, "SessionPicker");
19571
19479
  export {
19572
19480
  ConfigContext,
19573
19481
  useConfig,
19574
- SettingsContext,
19575
- useSettings,
19576
19482
  truncateText,
19577
- useTerminalSize,
19483
+ removeLastGrapheme,
19484
+ isDeletionKey,
19485
+ isPrintableSearchChar,
19578
19486
  loadLowlight,
19579
19487
  colorizeCode,
19580
19488
  sanitizeForOsc,
@@ -19612,6 +19520,7 @@ export {
19612
19520
  GeminiRespondingSpinner,
19613
19521
  GeminiSpinner,
19614
19522
  dist_default,
19523
+ AboutBox,
19615
19524
  dist_default2,
19616
19525
  getRenderableGradientColors,
19617
19526
  Help,
@@ -19632,8 +19541,6 @@ export {
19632
19541
  BtwMessage,
19633
19542
  ThoughtExpandedProvider,
19634
19543
  ThinkingViewerProvider,
19635
- useMouseEvents,
19636
- measureElementPosition,
19637
19544
  HistoryItemDisplayComponent,
19638
19545
  SessionPicker
19639
19546
  };
@@ -19662,22 +19569,3 @@ export {
19662
19569
  * Copyright 2025 Qwen Team
19663
19570
  * SPDX-License-Identifier: Apache-2.0
19664
19571
  */
19665
- /**
19666
- * @license
19667
- * Copyright 2025 Qwen
19668
- * SPDX-License-Identifier: Apache-2.0
19669
- *
19670
- * Inspired by gemini-cli's MouseContext (Google LLC, Apache-2.0): enable SGR
19671
- * mouse mode while at least one subscriber is active, parse mouse sequences
19672
- * out of the KeypressContext pipeline, call each handler, restore on cleanup.
19673
- */
19674
- /**
19675
- * @license
19676
- * Copyright 2025 Qwen Team
19677
- * SPDX-License-Identifier: Apache-2.0
19678
- *
19679
- * Shim for ink PR #968 (vadimdemedes/ink#968): extends measureElement()
19680
- * to return {x, y, width, height}. Once the upstream PR is merged and
19681
- * ink is upgraded, replace usages with `measureElement` from 'ink'
19682
- * and delete this file.
19683
- */