@qwen-code/qwen-code 0.21.1 → 0.21.2-nightly.20260801.bc382c3ff

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 (367) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +9 -7
  2. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  3. package/bundled/qc-helper/docs/features/channels/github.md +49 -10
  4. package/bundled/qc-helper/docs/features/channels/gitlab.md +177 -0
  5. package/bundled/qc-helper/docs/features/code-review.md +20 -0
  6. package/bundled/qc-helper/docs/features/commands.md +1 -0
  7. package/bundled/qc-helper/docs/features/hooks.md +135 -18
  8. package/bundled/qc-helper/docs/features/memory.md +27 -0
  9. package/bundled/qc-helper/docs/features/skills.md +14 -0
  10. package/bundled/qc-helper/docs/features/sub-agents.md +55 -8
  11. package/bundled/qc-helper/docs/features/tool-use-summaries.md +7 -7
  12. package/bundled/qc-helper/docs/qwen-serve.md +28 -6
  13. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  14. package/bundled/review/SKILL.md +1 -1
  15. package/chunks/{MaxSizedBox-VI3ROJJA.js → MaxSizedBox-CDHTDITS.js} +45 -40
  16. package/chunks/{StandaloneSessionPicker-LYXKD2EV.js → StandaloneSessionPicker-L63HUAHP.js} +65 -60
  17. package/chunks/{acp-startup-profiler-DFVPFQ6C.js → acp-startup-profiler-3RICG2YW.js} +2 -2
  18. package/chunks/{acpAgent-WN5SRDQO.js → acpAgent-6WVVT2P3.js} +962 -599
  19. package/chunks/{agent-K6ECSM64.js → agent-KDM4CBOU.js} +40 -35
  20. package/chunks/agent-headless-AS7K2K57.js +79 -0
  21. package/chunks/{anthropicContentGenerator-V2QOGVYD.js → anthropicContentGenerator-WCBYB6JG.js} +337 -27
  22. package/chunks/{artifact-tool-6K6U7XYJ.js → artifact-tool-ANV4CFCR.js} +2 -2
  23. package/chunks/{askUserQuestion-GD2IJJ7I.js → askUserQuestion-MALEB47H.js} +2 -2
  24. package/chunks/{bridge-3KJEWDNE.js → bridge-JNEW6FES.js} +46 -41
  25. package/chunks/{build-S6DO7LMM.js → build-GDBLPA24.js} +1 -1
  26. package/chunks/{ca-6W3SK7OQ.js → ca-4OJN75WT.js} +46 -5
  27. package/chunks/{channel-management-service-XR7GZSWF.js → channel-management-service-QOO7TD3T.js} +21 -6
  28. package/chunks/{channel-settings-store-HW4FXXUA.js → channel-settings-store-4CSMTR4L.js} +47 -42
  29. package/chunks/{channel-worker-group-XDPTDWTX.js → channel-worker-group-ERSUOPIR.js} +8 -8
  30. package/chunks/{channel-worker-manager-YYEHVRRE.js → channel-worker-manager-X247YDQ7.js} +8 -8
  31. package/chunks/{channel-worker-supervisor-74HTWA2G.js → channel-worker-supervisor-ORJIEEPP.js} +4 -4
  32. package/chunks/{chunk-VWOOBLTY.js → chunk-25QQVOCG.js} +5 -5
  33. package/chunks/{chunk-CAPPWD3X.js → chunk-2A6MHYIA.js} +3 -3
  34. package/chunks/{chunk-2XSLTRFZ.js → chunk-2CTKGIFR.js} +2 -2
  35. package/chunks/{chunk-DZLYR4U3.js → chunk-2DNKEBXY.js} +1 -1
  36. package/chunks/{chunk-UWMLWVCA.js → chunk-2IIJTXYF.js} +26 -10
  37. package/chunks/{chunk-JYBU6YUE.js → chunk-2M5N3DHY.js} +1 -1
  38. package/chunks/{chunk-AQIDMUGU.js → chunk-2PNQQ4UR.js} +2 -2
  39. package/chunks/{chunk-OKF7JF3R.js → chunk-2UISUFHQ.js} +3 -3
  40. package/chunks/{chunk-2LQTH543.js → chunk-33FNCQSY.js} +2 -2
  41. package/chunks/{chunk-M7OONWYU.js → chunk-3LGZEYOF.js} +4 -2
  42. package/chunks/{chunk-ZURDMIDR.js → chunk-3MHPWQ2M.js} +242 -76
  43. package/chunks/{chunk-UHUSJ6X7.js → chunk-3RXUYQJI.js} +25 -6
  44. package/chunks/{chunk-E5Z2AVNV.js → chunk-3SH53ANB.js} +0 -11
  45. package/chunks/{chunk-BNWB5CYE.js → chunk-3WXMXT7C.js} +22 -11
  46. package/chunks/{chunk-A2D5BAVP.js → chunk-42IKVPST.js} +1 -1
  47. package/chunks/{chunk-2DN4J57Y.js → chunk-432XCUHF.js} +1 -1
  48. package/chunks/{chunk-EVKE2FZL.js → chunk-433VD3HX.js} +4 -4
  49. package/chunks/{chunk-Q43KPN7X.js → chunk-434YCHSV.js} +6 -6
  50. package/chunks/{chunk-5TBMQLGG.js → chunk-4LKVQFHM.js} +2 -2
  51. package/chunks/{chunk-YDLJGZHL.js → chunk-4NFY2S7N.js} +0 -33
  52. package/chunks/{chunk-6PE7N3A4.js → chunk-5UJ6A3CH.js} +145 -10
  53. package/chunks/{chunk-GNR2RNMP.js → chunk-5UZITEHA.js} +3 -3
  54. package/chunks/chunk-6FMJLI5M.js +1591 -0
  55. package/chunks/{chunk-RPLGZJV2.js → chunk-6O5DVH27.js} +1 -1
  56. package/chunks/{chunk-2RFKHEXL.js → chunk-6PLDPT2C.js} +1 -1
  57. package/chunks/{chunk-7AEJDLRA.js → chunk-7IYLHTTM.js} +3 -3
  58. package/chunks/{chunk-65PQENQP.js → chunk-7K2WTPQO.js} +5 -5
  59. package/chunks/{chunk-P4WOAOJW.js → chunk-7MY2AR5A.js} +72 -26
  60. package/chunks/{chunk-GXIJHV66.js → chunk-A2A34TSB.js} +3 -3
  61. package/chunks/{chunk-XWWKIXVD.js → chunk-A5YZ3FA2.js} +2 -1
  62. package/chunks/{chunk-64LQLPL7.js → chunk-A6SX5TAH.js} +3 -3
  63. package/chunks/{chunk-SZ3KHTDR.js → chunk-AKA24BGO.js} +1 -1
  64. package/chunks/chunk-AQ37AY7B.js +93 -0
  65. package/chunks/{chunk-2N7CODY5.js → chunk-AQEWCKX4.js} +2 -2
  66. package/chunks/{chunk-KCO4FLFJ.js → chunk-AYB4HSBI.js} +3 -3
  67. package/chunks/{chunk-WZRWHXFE.js → chunk-BFHXDAR7.js} +1 -1
  68. package/chunks/{chunk-L55JWS76.js → chunk-BGXZBI5B.js} +1 -1
  69. package/chunks/{chunk-5MKRTI4T.js → chunk-BKUN5QHP.js} +7 -7
  70. package/chunks/{chunk-Y4IHBGBP.js → chunk-BV4QX43X.js} +1 -1
  71. package/chunks/{chunk-PB3MBFKG.js → chunk-C4L2MEIT.js} +4 -4
  72. package/chunks/{chunk-TCIFAA7K.js → chunk-CHCLO3M7.js} +14 -14
  73. package/chunks/{chunk-CVHIL5IG.js → chunk-CWEIMFFW.js} +13 -6
  74. package/chunks/{chunk-2FAK6PNM.js → chunk-DUIJ2IXG.js} +5 -13
  75. package/chunks/{chunk-T2QMKU3R.js → chunk-DVGTU5TC.js} +19 -7
  76. package/chunks/{chunk-LGAOC3ZS.js → chunk-DYA25Y7U.js} +1 -1
  77. package/chunks/{chunk-SGFT55XI.js → chunk-E4WHKETF.js} +32 -4
  78. package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
  79. package/chunks/{chunk-MHAIJPTD.js → chunk-FJHA23GM.js} +12 -12
  80. package/chunks/{chunk-S7W2GKIO.js → chunk-G7XXKQYS.js} +2 -0
  81. package/chunks/{chunk-MR5EAQ5M.js → chunk-GALUTA2C.js} +1 -1
  82. package/chunks/{chunk-7I5GTCT4.js → chunk-GB3AB7TR.js} +4008 -3648
  83. package/chunks/{chunk-QIZKCVM3.js → chunk-GHJM2C2T.js} +6 -8
  84. package/chunks/chunk-GOFAQQZA.js +132 -0
  85. package/chunks/{chunk-BCZFQXWK.js → chunk-GTM6IHBB.js} +2 -2
  86. package/chunks/{chunk-5ZF5XXTS.js → chunk-GVISB2OH.js} +2 -2
  87. package/chunks/{chunk-FNMZK765.js → chunk-H36SETQS.js} +1 -1
  88. package/chunks/{chunk-UBEPNVDI.js → chunk-H4346YW5.js} +28 -16
  89. package/chunks/{chunk-CQL64ESB.js → chunk-H4DSRWAS.js} +24 -13
  90. package/chunks/{chunk-YGF33UXG.js → chunk-H6MC6VQX.js} +222 -173
  91. package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
  92. package/chunks/{chunk-Y6AXW2OG.js → chunk-I5GNT6ZS.js} +7 -1
  93. package/chunks/{chunk-GEBV2JGB.js → chunk-I6FAHB4N.js} +1 -1
  94. package/chunks/{chunk-UPUG4GXM.js → chunk-I7JDGNG6.js} +3 -3
  95. package/chunks/{chunk-JHNRZMHI.js → chunk-II6WPWHY.js} +9 -9
  96. package/chunks/{chunk-B4AJNNOL.js → chunk-J26HHFI5.js} +1 -1
  97. package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
  98. package/chunks/{chunk-ZHBO7WVX.js → chunk-JELIWHXD.js} +1 -1
  99. package/chunks/{chunk-3EFXSQCM.js → chunk-JRIDA5HF.js} +7 -7
  100. package/chunks/{chunk-TFRMVU6R.js → chunk-K4CGQN4Q.js} +1 -1
  101. package/chunks/{chunk-WUZ7H6DP.js → chunk-K5Q62CGR.js} +1 -1
  102. package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
  103. package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
  104. package/chunks/{chunk-TDL6LB4K.js → chunk-KG22G46Y.js} +22 -10
  105. package/chunks/{chunk-GATT5TKW.js → chunk-KKN2IE7Q.js} +1 -1
  106. package/chunks/{chunk-JMONIXMJ.js → chunk-KVUBYJDM.js} +2 -2
  107. package/chunks/{chunk-TBBV36Y4.js → chunk-KXSYDCP2.js} +4 -4
  108. package/chunks/{chunk-EIF3FXTB.js → chunk-LAPK3GLC.js} +121 -18
  109. package/chunks/chunk-LBOVL47Y.js +29 -0
  110. package/chunks/{chunk-U3E3UQAA.js → chunk-LBWNSLJK.js} +4 -4
  111. package/chunks/{chunk-S4WJVPZW.js → chunk-LL4U3BSH.js} +15 -7
  112. package/chunks/{chunk-657BH7VM.js → chunk-LRJWFR6L.js} +4 -4
  113. package/chunks/{chunk-PT722TDT.js → chunk-M2F5PLOW.js} +770 -125
  114. package/chunks/{chunk-3L2SPEBH.js → chunk-M744OFVE.js} +1 -1
  115. package/chunks/{chunk-VYOXCEPJ.js → chunk-MBKPUM5Y.js} +1 -1
  116. package/chunks/chunk-MISUEWB4.js +8749 -0
  117. package/chunks/{chunk-PONHVBRT.js → chunk-MOHAWIAW.js} +2 -2
  118. package/chunks/{chunk-HMRM2A3U.js → chunk-MSIVKDRC.js} +4 -4
  119. package/chunks/{record-artifact-XAMSFSW4.js → chunk-MYT7N6QH.js} +22 -7
  120. package/chunks/{chunk-X5WNMMIA.js → chunk-NGWYUZZO.js} +11510 -15137
  121. package/chunks/{chunk-PQNHRFJC.js → chunk-NYX53SV4.js} +0 -2
  122. package/chunks/{chunk-6RPMI2AB.js → chunk-NZB4NDJL.js} +10 -10
  123. package/chunks/{chunk-BGTQCTQW.js → chunk-O2ZYHG33.js} +6 -5
  124. package/chunks/chunk-O6GEWCJA.js +21 -0
  125. package/chunks/{chunk-JX27F6QS.js → chunk-OBAIHYFT.js} +1 -1
  126. package/chunks/{chunk-BPZKP57P.js → chunk-OCRM53TT.js} +3 -3
  127. package/chunks/{chunk-V7RNNPGC.js → chunk-P5Y23G2L.js} +18 -1
  128. package/chunks/{chunk-FTD6DP4T.js → chunk-PDDYAXL2.js} +5 -1
  129. package/chunks/{chunk-JSD33JG6.js → chunk-PGEGUNH5.js} +67 -10
  130. package/chunks/{chunk-A4COXFB3.js → chunk-PGP7Y3RQ.js} +5 -5
  131. package/chunks/{chunk-T3O2B4XO.js → chunk-PHODQP2V.js} +6 -6
  132. package/chunks/{chunk-BMFALVGQ.js → chunk-PXA5AWHY.js} +1 -1
  133. package/chunks/chunk-QL4TN4HS.js +59 -0
  134. package/chunks/{chunk-W4MIWP6M.js → chunk-QMBEW7EW.js} +2 -2
  135. package/chunks/{chunk-U4VTUMMK.js → chunk-QONSRAEV.js} +1 -1
  136. package/chunks/{chunk-LW3RFMG7.js → chunk-QYPT3QUD.js} +3 -3
  137. package/chunks/{chunk-TV64SXKD.js → chunk-RGJ4JWSU.js} +131 -48
  138. package/chunks/{chunk-75MIQ3LV.js → chunk-RPYYTL7E.js} +61 -13
  139. package/chunks/{chunk-52ZSWYEG.js → chunk-SK2UKB45.js} +1 -1
  140. package/chunks/{chunk-PLDQBIO6.js → chunk-SWEBEXPI.js} +1 -1
  141. package/chunks/chunk-T3CHYWJZ.js +758 -0
  142. package/chunks/{chunk-VCPIZRYH.js → chunk-TFFMATHX.js} +9 -7
  143. package/chunks/{chunk-J7OACQDE.js → chunk-TNVKFQXQ.js} +458 -97
  144. package/chunks/{chunk-A3NDJ5SB.js → chunk-TYERNYH4.js} +2 -2
  145. package/chunks/{chunk-GKX7E4CO.js → chunk-U25CMJYY.js} +1 -1
  146. package/chunks/{chunk-7XATOOE7.js → chunk-UH7Z7Y45.js} +1 -1
  147. package/chunks/{chunk-XFZYFU3I.js → chunk-UHQ3L6GC.js} +1 -1
  148. package/chunks/{chunk-GZ3RCT54.js → chunk-UHTJC7O3.js} +1 -1
  149. package/chunks/{chunk-XZC5VLBZ.js → chunk-UKZEXS6K.js} +6 -0
  150. package/chunks/{chunk-LO4ROVP4.js → chunk-UOFFZNXV.js} +111 -13
  151. package/chunks/{chunk-5YKDXHUY.js → chunk-URN76TKR.js} +2 -2
  152. package/chunks/{chunk-T4TXDL7G.js → chunk-UWLG4UCE.js} +132 -35
  153. package/chunks/{chunk-KAMYKP7E.js → chunk-UWSXFI6E.js} +1 -1
  154. package/chunks/{chunk-7BAU433D.js → chunk-VS3GXRNZ.js} +1198 -240
  155. package/chunks/{chunk-EJGJIBRS.js → chunk-VWF42XC6.js} +3 -3
  156. package/chunks/{chunk-RCUQIPTN.js → chunk-W7XZ3KP5.js} +1 -1
  157. package/chunks/{chunk-OCESJA77.js → chunk-WISQLM4Q.js} +1197 -1154
  158. package/chunks/{chunk-NOKIVHOL.js → chunk-WK4TJUEA.js} +1 -1
  159. package/chunks/{chunk-JFMA7Y5M.js → chunk-WP4HGHFG.js} +5 -5
  160. package/chunks/{chunk-4G2BISNC.js → chunk-XC2VAFVZ.js} +1 -1
  161. package/chunks/{chunk-2LKVPASC.js → chunk-XC656O42.js} +3 -3
  162. package/chunks/{chunk-5KTQXHPY.js → chunk-XCLLRKY5.js} +3 -3
  163. package/chunks/{chunk-HV26XH34.js → chunk-XFDPIC4P.js} +3 -3
  164. package/chunks/{chunk-JTV5K7NH.js → chunk-XSA5EKTJ.js} +1 -1
  165. package/chunks/{chunk-75GFAX4R.js → chunk-YAVY33G4.js} +1 -1
  166. package/chunks/{chunk-WBSMNTSV.js → chunk-YXEVDA66.js} +2 -2
  167. package/chunks/{chunk-7DXQIJID.js → chunk-ZRFJ75D7.js} +3 -3
  168. package/chunks/{chunk-XBYYDKAZ.js → chunk-ZTN6OA5J.js} +8 -7
  169. package/chunks/{computer-use-ZTIDHMMA.js → computer-use-Z4NCIIJN.js} +40 -35
  170. package/chunks/{config-utils-NYSXDMEQ.js → config-utils-64LM6OEQ.js} +4 -4
  171. package/chunks/{contextCommand-2PIEU37Z.js → contextCommand-HVM7XFCB.js} +43 -38
  172. package/chunks/{core-runtime-3XEYLQFK.js → core-runtime-NL3ZBHBU.js} +40 -35
  173. package/chunks/{create-sub-session-SBYUMSSS.js → create-sub-session-AM32K2HD.js} +2 -2
  174. package/chunks/{create-sub-session-R76FVXCI.js → create-sub-session-XHSCDYFU.js} +43 -38
  175. package/chunks/{cron-create-2QK6TCEC.js → cron-create-HPXYE6C5.js} +4 -4
  176. package/chunks/{cron-delete-FDCDFYMG.js → cron-delete-FPVNTKPK.js} +4 -4
  177. package/chunks/{cron-list-XN3WVBTP.js → cron-list-ZEI6PAAV.js} +4 -4
  178. package/chunks/{daemon-Q2AB5Z23.js → daemon-PCNCI5YU.js} +72 -3
  179. package/chunks/daemon-status-provider-XD23SNAM.js +94 -0
  180. package/chunks/{daemon-trust-policy-ILUDTLHD.js → daemon-trust-policy-NOHK7IW5.js} +46 -41
  181. package/chunks/{daemon-trust-policy-monitor-HS3PKKRO.js → daemon-trust-policy-monitor-ZBTSR333.js} +46 -41
  182. package/chunks/{de-SY6O76BF.js → de-A6TI4LBB.js} +46 -5
  183. package/chunks/{deferred-core-runtime-X4QV662U.js → deferred-core-runtime-JJBHKM2C.js} +40 -35
  184. package/chunks/{dist-HVRQ2CFL.js → dist-4LAMY2SK.js} +1180 -5
  185. package/chunks/{dist-DOLYHMXE.js → dist-4T4NCJFL.js} +2 -2
  186. package/chunks/dist-7KOL6OMD.js +13467 -0
  187. package/chunks/{dist-SSU66DM4.js → dist-BH76AT7N.js} +1 -1
  188. package/chunks/{dist-BSTVRPMT.js → dist-BXA3JXVQ.js} +541 -19
  189. package/chunks/{dist-SV7Q3AWJ.js → dist-OEEFI6UU.js} +12 -9
  190. package/chunks/{dist-YGBBMK3Z.js → dist-SMLVOWKV.js} +5 -4
  191. package/chunks/{dist-IXQEQWRG.js → dist-V2RK6S6Q.js} +1 -1
  192. package/chunks/{earlyInputCapture-XKLZT7ZD.js → earlyInputCapture-KLAZDAIP.js} +41 -36
  193. package/chunks/{edit-HHGIOTQ2.js → edit-YQZWCISX.js} +40 -35
  194. package/chunks/{en-NBK3JKCE.js → en-RESOFG55.js} +46 -5
  195. package/chunks/{enter-worktree-ZN7PUQ46.js → enter-worktree-WLVWI3FP.js} +40 -35
  196. package/chunks/{enterPlanMode-EIFIDSIV.js → enterPlanMode-6RYXFQUD.js} +40 -35
  197. package/chunks/{environment-XXQ75D2Q.js → environment-DXJTXSVT.js} +43 -38
  198. package/chunks/{errors-4GMVU7CK.js → errors-XGAGG2S2.js} +43 -38
  199. package/chunks/{exit-worktree-GXMI4ATY.js → exit-worktree-C4276VPP.js} +40 -35
  200. package/chunks/{exitPlanMode-34UVY7M6.js → exitPlanMode-MM5HIRUF.js} +40 -35
  201. package/chunks/{fast-path-VPIVA7L6.js → fast-path-PIXYOHCH.js} +6 -2
  202. package/chunks/{fr-4KG5V7UT.js → fr-QF7RI5ZE.js} +46 -5
  203. package/chunks/{gemini-4BWIK4WD.js → gemini-43RLVUNP.js} +158 -96
  204. package/chunks/{geminiContentGenerator-3XVV5MSS.js → geminiContentGenerator-PNQ4TSID.js} +6 -6
  205. package/chunks/{glob-TZ2ABCJG.js → glob-ZMBQKAU5.js} +40 -35
  206. package/chunks/goal-tools-Y767F7LZ.js +335 -0
  207. package/chunks/{grep-BEF463NA.js → grep-HSV37W2Q.js} +40 -35
  208. package/chunks/handleAutoUpdate-QDHZPBAY.js +85 -0
  209. package/chunks/{i18n-FMM5FDXR.js → i18n-ME22A6RN.js} +42 -37
  210. package/chunks/{image-gen-HHVLF7HS.js → image-gen-IFC7ZWSB.js} +9 -9
  211. package/chunks/{initializer-625TIAIO.js → initializer-J7H2CHVB.js} +47 -42
  212. package/chunks/{installationInfo-6AM4I2Y3.js → installationInfo-R7FXPQN5.js} +41 -36
  213. package/chunks/{ja-F3GSQXMF.js → ja-URQESVGW.js} +46 -5
  214. package/chunks/{keychain-token-storage-72IYCAZV.js → keychain-token-storage-7BT4TQ2A.js} +2 -2
  215. package/chunks/{kittyProtocolDetector-MBRTDRBK.js → kittyProtocolDetector-BFLAKYXH.js} +1 -1
  216. package/chunks/list-OYDIBA4N.js +93 -0
  217. package/chunks/{list-agents-R6KDXQR3.js → list-agents-GATIBBQQ.js} +2 -2
  218. package/chunks/{loadedSettingsAdapter-SPUTNKAV.js → loadedSettingsAdapter-OK6GK2GE.js} +46 -41
  219. package/chunks/{loggingContentGenerator-LKOF7XI7.js → loggingContentGenerator-U4ZEG4GL.js} +53 -38
  220. package/chunks/{loop-wakeup-3IQKCYAH.js → loop-wakeup-3DZMQQQQ.js} +13 -6
  221. package/chunks/{ls-DKZ37A7N.js → ls-7F4GHXIH.js} +4 -4
  222. package/chunks/{lsp-QNWN7KN3.js → lsp-6FEHVBWI.js} +2 -2
  223. package/chunks/{managed-npm-update-ACQGGIN5.js → managed-npm-update-PGKAJLLO.js} +43 -38
  224. package/chunks/mcp-S4DXJD2G.js +87 -0
  225. package/chunks/{monitor-DF52UVHI.js → monitor-E5ZFMT74.js} +40 -35
  226. package/chunks/nonInteractiveCli-HNOHKEPE.js +149 -0
  227. package/chunks/{notebook-edit-FCWS4XVN.js → notebook-edit-6QDN6VZJ.js} +40 -35
  228. package/chunks/{openaiContentGenerator-7LDK3DCJ.js → openaiContentGenerator-3NLB2C5O.js} +19 -19
  229. package/chunks/{pidfile-6ERW3DF4.js → pidfile-ZMOIUGG6.js} +41 -36
  230. package/chunks/{processUtils-COKZAMUP.js → processUtils-E4QGQVWW.js} +2 -2
  231. package/chunks/{pt-EQ33KWEN.js → pt-EEEQXRUI.js} +46 -5
  232. package/chunks/{qwenContentGenerator-TKWUMR7N.js → qwenContentGenerator-2LFRWJTM.js} +46 -41
  233. package/chunks/{qwenOAuth2-7HMU47SF.js → qwenOAuth2-N32BUQDC.js} +8 -8
  234. package/chunks/{read-file-X6DRC574.js → read-file-GLDCWZBG.js} +11 -11
  235. package/chunks/{read-mcp-resource-GFTWYXMK.js → read-mcp-resource-AFS3UKZO.js} +2 -2
  236. package/chunks/record-artifact-ECZSCEG5.js +21 -0
  237. package/chunks/{resumeHistoryUtils-PFPM2GWM.js → resumeHistoryUtils-F5BE5QDW.js} +48 -43
  238. package/chunks/ripGrep-T23Y4AGY.js +77 -0
  239. package/chunks/{ru-7OZAUKGG.js → ru-WGZDYQAB.js} +46 -5
  240. package/chunks/{run-qwen-serve-TSTCO4XE.js → run-qwen-serve-TI2HGLLU.js} +290 -75
  241. package/chunks/{runtime-DAUPSUKI.js → runtime-WCWM3DO7.js} +53 -46
  242. package/chunks/{scheduler-KMADMT26.js → scheduler-2QZO5AV5.js} +40 -35
  243. package/chunks/{sdk-exporters-http-WO556XNU.js → sdk-exporters-http-IKNWQJNV.js} +3 -3
  244. package/chunks/{sdk-impl-LPAVACSF.js → sdk-impl-7CUUMQDB.js} +3 -3
  245. package/chunks/{send-message-SAWK4DZX.js → send-message-X7G2JSII.js} +6 -11
  246. package/chunks/{serve-NNRWS6F4.js → serve-DZOMYUFU.js} +46 -41
  247. package/chunks/{server-WEH7DVCH.js → server-N4AJRKIQ.js} +2269 -1016
  248. package/chunks/{session-WXC56V2I.js → session-GS6AKMN7.js} +151 -86
  249. package/chunks/{settings-DJDXFDZ3.js → settings-CUN3SELH.js} +50 -45
  250. package/chunks/{shell-JN5VRQXD.js → shell-NGBFVXC5.js} +40 -35
  251. package/chunks/{skill-SGXPKJCS.js → skill-SC2BSO75.js} +30 -16
  252. package/chunks/{skill-settings-VJ5PDMZI.js → skill-settings-XVPCPW5K.js} +45 -40
  253. package/chunks/{spawnChannel-ETMJW7YX.js → spawnChannel-RILO4YY3.js} +42 -37
  254. package/chunks/{standalone-update-MK3Z7KBI.js → standalone-update-TMLT6LVJ.js} +43 -38
  255. package/chunks/{startInteractiveUI-ZCGIXPGT.js → startInteractiveUI-J45WOEOU.js} +883 -1112
  256. package/chunks/{syntheticOutput-355CB6CJ.js → syntheticOutput-FHRY3BPQ.js} +3 -3
  257. package/chunks/{task-create-INGWNUG4.js → task-create-LAQXBIHC.js} +11 -10
  258. package/chunks/{task-list-5XNNGTF4.js → task-list-V6K5DRDH.js} +6 -6
  259. package/chunks/{task-stop-4ROAOBXH.js → task-stop-LQXE52L6.js} +2 -2
  260. package/chunks/{task-update-CRK5VWWZ.js → task-update-NXRCXSPB.js} +11 -10
  261. package/chunks/{team-create-QQGAJG7P.js → team-create-W3EVWCTA.js} +40 -35
  262. package/chunks/{team-delete-S2RCXA4P.js → team-delete-Z4KGO7RC.js} +6 -6
  263. package/chunks/{team-plan-approval-RT7Q5R6O.js → team-plan-approval-URYVKJF4.js} +40 -35
  264. package/chunks/theme-manager-CUAMS2NI.js +81 -0
  265. package/chunks/{todoWrite-7WM3VDMY.js → todoWrite-OFIZDI7P.js} +32 -4
  266. package/chunks/{tool-search-Z3Z4AYKP.js → tool-search-DCICFL32.js} +15 -14
  267. package/chunks/total-session-admission-3ZTAXVUK.js +89 -0
  268. package/chunks/{trustedFolders-X2JEIO57.js → trustedFolders-EVCN36O5.js} +42 -37
  269. package/chunks/{update-relaunch-VWNPYDIP.js → update-relaunch-XLW46RHQ.js} +5 -5
  270. package/chunks/{updateCheck-KAQH67DV.js → updateCheck-ZHVXDAIH.js} +44 -39
  271. package/chunks/{useAutoAcceptIndicator-JH6BCF7S.js → useAutoAcceptIndicator-ZGD6BJSP.js} +50 -45
  272. package/chunks/{validateNonInterActiveAuth-GIUJ2UFS.js → validateNonInterActiveAuth-R3BAQFDY.js} +88 -83
  273. package/chunks/{version-BGLYIJUY.js → version-PMWREGCG.js} +1 -1
  274. package/chunks/{web-fetch-OTDU4VQF.js → web-fetch-PGN27SGF.js} +14 -14
  275. package/chunks/{web-search-FP6SIHPR.js → web-search-KW4UNMRE.js} +8 -8
  276. package/chunks/{workflow-YCIVBYSB.js → workflow-SN3TJBTJ.js} +363 -310
  277. package/chunks/workspace-providers-status-O3HUZGGR.js +90 -0
  278. package/chunks/{workspace-registration-store-OTMS3H4C.js → workspace-registration-store-M3FJ74RS.js} +2 -2
  279. package/chunks/{workspace-registry-O63R6IZ4.js → workspace-registry-U7ISW23N.js} +47 -42
  280. package/chunks/{workspace-service-M6LLHKJ5.js → workspace-service-VH6IWADT.js} +53 -48
  281. package/chunks/{workspace-skills-status-C2V7BAIS.js → workspace-skills-status-XANARSZS.js} +48 -43
  282. package/chunks/{workspace-trust-reconciler-IBUPOUJN.js → workspace-trust-reconciler-35EFR4GC.js} +53 -48
  283. package/chunks/write-file-NCRSGUDT.js +79 -0
  284. package/chunks/{zh-H3YDK5QW.js → zh-OHX23Q44.js} +43 -5
  285. package/chunks/{zh-TW-JYCP7XUA.js → zh-TW-4G7YKDAQ.js} +43 -5
  286. package/chunks/zoom-image-X7CIADYC.js +224 -0
  287. package/cli.js +55 -48
  288. package/locales/ca.js +60 -4
  289. package/locales/de.js +62 -4
  290. package/locales/en.js +59 -4
  291. package/locales/fr.js +64 -4
  292. package/locales/ja.js +61 -4
  293. package/locales/pt.js +60 -4
  294. package/locales/ru.js +63 -4
  295. package/locales/zh-TW.js +52 -4
  296. package/locales/zh.js +52 -4
  297. package/package.json +3 -3
  298. package/web-shell/assets/{arc-75-Wdeo3.js → arc-CaMTqKio.js} +1 -1
  299. package/web-shell/assets/{architectureDiagram-3BPJPVTR-FKeXQbyP.js → architectureDiagram-3BPJPVTR-Bjxztij2.js} +1 -1
  300. package/web-shell/assets/{blockDiagram-GPEHLZMM-CY0vc-A3.js → blockDiagram-GPEHLZMM-BYJzeHi9.js} +1 -1
  301. package/web-shell/assets/{c4Diagram-AAUBKEIU-CNP-A-8u.js → c4Diagram-AAUBKEIU-fYAa-Eil.js} +1 -1
  302. package/web-shell/assets/channel-LEZei0-5.js +1 -0
  303. package/web-shell/assets/{chunk-2J33WTMH-GybS4Gii.js → chunk-2J33WTMH-B1OTlTml.js} +1 -1
  304. package/web-shell/assets/{chunk-4BX2VUAB-02H91V8v.js → chunk-4BX2VUAB-DNj4uy6k.js} +1 -1
  305. package/web-shell/assets/{chunk-55IACEB6-D3M-2VT6.js → chunk-55IACEB6-DAqNmg3c.js} +1 -1
  306. package/web-shell/assets/{chunk-727SXJPM-CCu29u4H.js → chunk-727SXJPM-BwB4ddxE.js} +1 -1
  307. package/web-shell/assets/{chunk-AQP2D5EJ-CaFKWgrn.js → chunk-AQP2D5EJ-DmHR_UZs.js} +1 -1
  308. package/web-shell/assets/{chunk-FMBD7UC4-ZZpPqIwQ.js → chunk-FMBD7UC4-BlfOXumo.js} +1 -1
  309. package/web-shell/assets/{chunk-ND2GUHAM-D22DqGs8.js → chunk-ND2GUHAM-BKogiSy7.js} +1 -1
  310. package/web-shell/assets/{chunk-QZHKN3VN-Bu85S0fw.js → chunk-QZHKN3VN-DEclVrOF.js} +1 -1
  311. package/web-shell/assets/classDiagram-4FO5ZUOK-BiaRhfvf.js +1 -0
  312. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BiaRhfvf.js +1 -0
  313. package/web-shell/assets/{cose-bilkent-S5V4N54A-f1CK1Gwe.js → cose-bilkent-S5V4N54A-CwtS21WT.js} +1 -1
  314. package/web-shell/assets/{dagre-BM42HDAG-D0Ow8F_n.js → dagre-BM42HDAG-BAAIlB4p.js} +1 -1
  315. package/web-shell/assets/{diagram-2AECGRRQ-BPrmTWp8.js → diagram-2AECGRRQ-ChljtF_V.js} +1 -1
  316. package/web-shell/assets/{diagram-5GNKFQAL-HccuFAzy.js → diagram-5GNKFQAL-BIXVd31-.js} +1 -1
  317. package/web-shell/assets/{diagram-KO2AKTUF-BrS76mbA.js → diagram-KO2AKTUF-BEiBaS15.js} +1 -1
  318. package/web-shell/assets/{diagram-LMA3HP47-V7T9lU-5.js → diagram-LMA3HP47-C-g4tWKM.js} +1 -1
  319. package/web-shell/assets/{diagram-OG6HWLK6-DKidyJMR.js → diagram-OG6HWLK6-CNCCbNQG.js} +1 -1
  320. package/web-shell/assets/{erDiagram-TEJ5UH35-DBadZIkp.js → erDiagram-TEJ5UH35-v8ysnsdI.js} +1 -1
  321. package/web-shell/assets/{flowDiagram-I6XJVG4X-BymfqdNJ.js → flowDiagram-I6XJVG4X-LKVlLjwA.js} +1 -1
  322. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DOw340jf.js → ganttDiagram-6RSMTGT7-DA5MrKYG.js} +1 -1
  323. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-_8EiD8sl.js → gitGraphDiagram-PVQCEYII-Cyg5fe6d.js} +1 -1
  324. package/web-shell/assets/index-BgOcEaVt.js +1756 -0
  325. package/web-shell/assets/index-C2GE3DAF.js +74 -0
  326. package/web-shell/assets/{index-CKIadvET.js → index-CKdUkVVS.js} +1 -1
  327. package/web-shell/assets/index-DA5Lvscv.css +5 -0
  328. package/web-shell/assets/{infoDiagram-5YYISTIA-D61KYQBu.js → infoDiagram-5YYISTIA-SLsfu3Qd.js} +1 -1
  329. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CsiXSpNx.js → ishikawaDiagram-YF4QCWOH-CmHOmTNx.js} +1 -1
  330. package/web-shell/assets/{journeyDiagram-JHISSGLW-Sdfionyh.js → journeyDiagram-JHISSGLW-C3gM_HFQ.js} +1 -1
  331. package/web-shell/assets/{kanban-definition-UN3LZRKU-C3WI3Cnl.js → kanban-definition-UN3LZRKU-BbHD7duM.js} +1 -1
  332. package/web-shell/assets/{linear-Dpigcc62.js → linear-CSBvm435.js} +1 -1
  333. package/web-shell/assets/{mermaid.core-Ct97pqgW.js → mermaid.core-CPMw15lU.js} +5 -5
  334. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BzeaN0rB.js → mindmap-definition-RKZ34NQL-C_tNqXQW.js} +1 -1
  335. package/web-shell/assets/{pieDiagram-4H26LBE5-CvjgcbVD.js → pieDiagram-4H26LBE5-DH_N-8yY.js} +1 -1
  336. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BUzgTNdH.js → quadrantDiagram-W4KKPZXB-CRbS8UkN.js} +1 -1
  337. package/web-shell/assets/{requirementDiagram-4Y6WPE33-B7zKlgUQ.js → requirementDiagram-4Y6WPE33-DJgdZPZn.js} +1 -1
  338. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bb9CQgrT.js → sankeyDiagram-5OEKKPKP-vhL1y5zx.js} +1 -1
  339. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DJ6V7itG.js → sequenceDiagram-3UESZ5HK-UQthhFwd.js} +1 -1
  340. package/web-shell/assets/{stateDiagram-AJRCARHV-IImflERY.js → stateDiagram-AJRCARHV-CAywEm20.js} +1 -1
  341. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-lfJQHw-7.js +1 -0
  342. package/web-shell/assets/{timeline-definition-PNZ67QCA-6Q_uWHKh.js → timeline-definition-PNZ67QCA-CLO8b3FD.js} +1 -1
  343. package/web-shell/assets/{vennDiagram-CIIHVFJN-TmyKyjwv.js → vennDiagram-CIIHVFJN-BNAAh0Mu.js} +1 -1
  344. package/web-shell/assets/{wardley-L42UT6IY-CRh9uiPv.js → wardley-L42UT6IY-CUY7bLpN.js} +1 -1
  345. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-59TKAW8w.js → wardleyDiagram-YWT4CUSO-CSg_ORdW.js} +1 -1
  346. package/web-shell/assets/{xychartDiagram-2RQKCTM6-GCSUIK2L.js → xychartDiagram-2RQKCTM6-BjffV208.js} +1 -1
  347. package/web-shell/index.html +2 -2
  348. package/chunks/agent-headless-NO4Y2HOE.js +0 -74
  349. package/chunks/chunk-6QIGFD5W.js +0 -82
  350. package/chunks/chunk-HGT6JR3U.js +0 -177
  351. package/chunks/daemon-status-provider-3XJI6CAL.js +0 -89
  352. package/chunks/handleAutoUpdate-L6ERF36Y.js +0 -80
  353. package/chunks/list-L2GA674Y.js +0 -88
  354. package/chunks/mcp-SZLHKFJW.js +0 -82
  355. package/chunks/nonInteractiveCli-5T7KYKLK.js +0 -144
  356. package/chunks/ripGrep-OWV2IVJC.js +0 -72
  357. package/chunks/theme-manager-EEWIQJ7J.js +0 -76
  358. package/chunks/total-session-admission-44JKRWQD.js +0 -84
  359. package/chunks/workspace-providers-status-S35YAIUS.js +0 -85
  360. package/chunks/write-file-3BZC3EAE.js +0 -72
  361. package/chunks/zoom-image-TZ6S2O57.js +0 -351
  362. package/web-shell/assets/channel-DPYMT76A.js +0 -1
  363. package/web-shell/assets/classDiagram-4FO5ZUOK--JstsIgL.js +0 -1
  364. package/web-shell/assets/classDiagram-v2-Q7XG4LA2--JstsIgL.js +0 -1
  365. package/web-shell/assets/index-D1eXNRHe.js +0 -1389
  366. package/web-shell/assets/index-DVLD4CQq.css +0 -5
  367. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CYI_YoNR.js +0 -1
@@ -1,18 +1,83 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ import {
4
+ classifyApiError,
5
+ fireSessionDeleteHook
6
+ } from "./chunk-P5Y23G2L.js";
3
7
  import {
4
8
  buildPermissionSuggestions
5
9
  } from "./chunk-43T5WDQ7.js";
6
10
  import {
7
11
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
8
12
  reportChatRecordingFailureToAdapter
9
- } from "./chunk-657BH7VM.js";
13
+ } from "./chunk-LRJWFR6L.js";
14
+ import {
15
+ MAX_SUGGESTIONS_TO_SHOW,
16
+ SESSION_MENTION_PREFIX,
17
+ buildMcpResourceRef,
18
+ buildMcpServerRef,
19
+ buildSessionRef,
20
+ getExtensionSuggestions,
21
+ handleAtCommand,
22
+ matchMcpServerPrefix,
23
+ resolveAtCommandQuery,
24
+ sanitizeDisplayText
25
+ } from "./chunk-RGJ4JWSU.js";
10
26
  import {
11
27
  StreamJsonOutputAdapter
12
- } from "./chunk-BPZKP57P.js";
28
+ } from "./chunk-OCRM53TT.js";
29
+ import {
30
+ BuiltinCommandLoader,
31
+ BundledSkillLoader,
32
+ CommandService,
33
+ DISPLAY_HOOK_EVENTS,
34
+ FileCommandLoader,
35
+ MAX_STACKED_SKILLS,
36
+ McpPromptLoader,
37
+ SavedWorkflowLoader,
38
+ SkillCommandLoader,
39
+ addConfigToMatcherGroup,
40
+ appendUserPromptExpansionAdditionalContext,
41
+ copyToClipboard,
42
+ createEmptyHookEventInfo,
43
+ dayKey,
44
+ findMidInputSlashCommand,
45
+ findSlashCommandTokens,
46
+ formatApprovalModeDescription,
47
+ formatApprovalModeName,
48
+ formatUserPromptExpansionBlockedMessage,
49
+ getAllConfigs,
50
+ getBestSlashCommandMatch,
51
+ getTranslatedSourceDisplayMap,
52
+ hasBlockingBackgroundWork,
53
+ hasSlashCommandPathSeparator,
54
+ isAtCommand,
55
+ isBtwCommand,
56
+ isMidInputCompletableCommand,
57
+ isSlashCommand,
58
+ isStackedSkillCompletableCommand,
59
+ isValidStackedSkillPrefix,
60
+ normalizePartList,
61
+ parseDayKey,
62
+ parseSlashCommand,
63
+ parseStackedSlashCommands,
64
+ recordAutoSkillCommandUsage,
65
+ refreshExtensionContentRuntime,
66
+ resetBackgroundStateForSessionSwitch,
67
+ serializeUserPromptExpansionPrompt,
68
+ supportsMatchers
69
+ } from "./chunk-TNVKFQXQ.js";
70
+ import "./chunk-7K2WTPQO.js";
13
71
  import {
14
72
  startPostRenderPrefetches
15
- } from "./chunk-MHAIJPTD.js";
73
+ } from "./chunk-FJHA23GM.js";
74
+ import {
75
+ EXTENSION_RELOAD_FAILED_REASON,
76
+ ExtensionRefreshState,
77
+ appEvents,
78
+ cleanupReviewWorktreeLeases,
79
+ loadHierarchicalGeminiMemory
80
+ } from "./chunk-VS3GXRNZ.js";
16
81
  import {
17
82
  AboutBox,
18
83
  BaseSelectionList,
@@ -21,6 +86,7 @@ import {
21
86
  CommandFormatMigrationNudge,
22
87
  ConfigContext,
23
88
  DiffRenderer,
89
+ ErrorBoundary,
24
90
  FolderTrustDialog,
25
91
  Help,
26
92
  HistoryItemDisplay,
@@ -47,6 +113,7 @@ import {
47
113
  VirtualViewportContext,
48
114
  checkExhaustive,
49
115
  colorizeCode,
116
+ consumeLastRenderError,
50
117
  countMarkdownSourceBlocks,
51
118
  dist_default,
52
119
  dist_default2,
@@ -81,13 +148,27 @@ import {
81
148
  useSelectionList,
82
149
  useSessionStats,
83
150
  useSettings,
84
- useTerminalOutput,
85
151
  useTerminalSize,
86
152
  useTextBuffer,
153
+ useThoughtExpanded,
87
154
  useUIActions,
88
155
  useUIState,
89
156
  useVirtualViewport
90
- } from "./chunk-OCESJA77.js";
157
+ } from "./chunk-WISQLM4Q.js";
158
+ import {
159
+ getCommandDisplayName,
160
+ getCommandSourceBadge
161
+ } from "./chunk-OBAIHYFT.js";
162
+ import {
163
+ computeSessionStats,
164
+ levelLabel
165
+ } from "./chunk-7IYLHTTM.js";
166
+ import "./chunk-4WGODMVR.js";
167
+ import {
168
+ MaxSizedBox,
169
+ OverflowProvider,
170
+ useOverflowState
171
+ } from "./chunk-LBWNSLJK.js";
91
172
  import {
92
173
  GeminiRespondingSpinner,
93
174
  GeminiSpinner,
@@ -101,95 +182,28 @@ import {
101
182
  expandCollapsedHistory,
102
183
  isCollapsibleTool,
103
184
  useStreamingContext
104
- } from "./chunk-TDL6LB4K.js";
185
+ } from "./chunk-KG22G46Y.js";
186
+ import {
187
+ theme
188
+ } from "./chunk-U25CMJYY.js";
105
189
  import {
106
190
  stopAndGetCapturedInput
107
- } from "./chunk-JMONIXMJ.js";
191
+ } from "./chunk-KVUBYJDM.js";
192
+ import {
193
+ disableKittyProtocol,
194
+ isKittyProtocolEnabled,
195
+ isKittyProtocolSupported,
196
+ pushKittyProtocolFlags
197
+ } from "./chunk-NYX53SV4.js";
108
198
  import {
109
199
  useAutoAcceptIndicator
110
- } from "./chunk-HMRM2A3U.js";
200
+ } from "./chunk-MSIVKDRC.js";
111
201
  import {
112
202
  KeypressProvider,
113
203
  useFocus,
114
204
  useKeypress,
115
205
  useKeypressContext
116
- } from "./chunk-CQL64ESB.js";
117
- import {
118
- classifyApiError
119
- } from "./chunk-V7RNNPGC.js";
120
- import {
121
- MAX_SUGGESTIONS_TO_SHOW,
122
- SESSION_MENTION_PREFIX,
123
- buildMcpResourceRef,
124
- buildMcpServerRef,
125
- buildSessionRef,
126
- getExtensionSuggestions,
127
- handleAtCommand,
128
- matchMcpServerPrefix,
129
- resolveAtCommandQuery,
130
- sanitizeDisplayText
131
- } from "./chunk-TV64SXKD.js";
132
- import {
133
- BuiltinCommandLoader,
134
- BundledSkillLoader,
135
- CommandService,
136
- DISPLAY_HOOK_EVENTS,
137
- FileCommandLoader,
138
- MAX_STACKED_SKILLS,
139
- McpPromptLoader,
140
- SavedWorkflowLoader,
141
- SkillCommandLoader,
142
- addConfigToMatcherGroup,
143
- appendUserPromptExpansionAdditionalContext,
144
- copyToClipboard,
145
- createEmptyHookEventInfo,
146
- dayKey,
147
- findMidInputSlashCommand,
148
- findSlashCommandTokens,
149
- formatApprovalModeDescription,
150
- formatApprovalModeName,
151
- formatUserPromptExpansionBlockedMessage,
152
- getAllConfigs,
153
- getBestSlashCommandMatch,
154
- getTranslatedSourceDisplayMap,
155
- hasBlockingBackgroundWork,
156
- hasSlashCommandPathSeparator,
157
- isAtCommand,
158
- isBtwCommand,
159
- isMidInputCompletableCommand,
160
- isSlashCommand,
161
- isStackedSkillCompletableCommand,
162
- isValidStackedSkillPrefix,
163
- normalizePartList,
164
- parseDayKey,
165
- parseSlashCommand,
166
- parseStackedSlashCommands,
167
- refreshExtensionContentRuntime,
168
- resetBackgroundStateForSessionSwitch,
169
- serializeUserPromptExpansionPrompt,
170
- supportsMatchers
171
- } from "./chunk-J7OACQDE.js";
172
- import {
173
- EXTENSION_RELOAD_FAILED_REASON,
174
- ExtensionRefreshState,
175
- appEvents,
176
- cleanupReviewWorktreeLeases,
177
- loadHierarchicalGeminiMemory
178
- } from "./chunk-7BAU433D.js";
179
- import {
180
- getCommandDisplayName,
181
- getCommandSourceBadge
182
- } from "./chunk-JX27F6QS.js";
183
- import {
184
- computeSessionStats,
185
- levelLabel
186
- } from "./chunk-7AEJDLRA.js";
187
- import {
188
- disableKittyProtocol,
189
- isKittyProtocolEnabled,
190
- isKittyProtocolSupported,
191
- pushKittyProtocolFlags
192
- } from "./chunk-PQNHRFJC.js";
206
+ } from "./chunk-H4DSRWAS.js";
193
207
  import {
194
208
  BEL,
195
209
  OSC_PREFIX,
@@ -202,27 +216,10 @@ import {
202
216
  oscKittyNotify,
203
217
  saveClipboardImage,
204
218
  writeOsc52
205
- } from "./chunk-M7OONWYU.js";
206
- import "./chunk-65PQENQP.js";
207
- import "./chunk-4WGODMVR.js";
208
- import "./chunk-JFMA7Y5M.js";
209
- import "./chunk-KW7NOTN6.js";
210
- import {
211
- MaxSizedBox,
212
- OverflowProvider,
213
- useOverflowState
214
- } from "./chunk-U3E3UQAA.js";
215
- import {
216
- theme
217
- } from "./chunk-GKX7E4CO.js";
219
+ } from "./chunk-3LGZEYOF.js";
218
220
  import {
219
221
  require_jsx_runtime
220
222
  } from "./chunk-SV5PQVQE.js";
221
- import {
222
- AUTO_THEME_NAME,
223
- DEFAULT_THEME,
224
- themeManager
225
- } from "./chunk-GATT5TKW.js";
226
223
  import {
227
224
  Box_default,
228
225
  Static,
@@ -236,36 +233,40 @@ import {
236
233
  use_is_screen_reader_enabled_default,
237
234
  use_stdin_default,
238
235
  use_stdout_default
239
- } from "./chunk-UWMLWVCA.js";
236
+ } from "./chunk-2IIJTXYF.js";
237
+ import {
238
+ relaunchApp
239
+ } from "./chunk-42IKVPST.js";
240
+ import {
241
+ setUpdateHandler
242
+ } from "./chunk-C4L2MEIT.js";
243
+ import "./chunk-WP4HGHFG.js";
244
+ import {
245
+ AUTO_THEME_NAME,
246
+ DEFAULT_THEME,
247
+ themeManager
248
+ } from "./chunk-KKN2IE7Q.js";
249
+ import "./chunk-KW7NOTN6.js";
240
250
  import {
241
251
  require_react
242
252
  } from "./chunk-5QWWOFGG.js";
243
- import "./chunk-EVKE2FZL.js";
253
+ import "./chunk-433VD3HX.js";
244
254
  import {
245
255
  getErrorMessage as getErrorMessage2
246
- } from "./chunk-T3O2B4XO.js";
247
- import "./chunk-EJGJIBRS.js";
248
- import {
249
- relaunchApp
250
- } from "./chunk-A2D5BAVP.js";
251
- import {
252
- setUpdateHandler
253
- } from "./chunk-PB3MBFKG.js";
254
- import "./chunk-7DXQIJID.js";
256
+ } from "./chunk-PHODQP2V.js";
257
+ import "./chunk-VWF42XC6.js";
258
+ import "./chunk-ZRFJ75D7.js";
255
259
  import "./chunk-YAF2MQZ6.js";
256
- import "./chunk-S4WJVPZW.js";
257
- import "./chunk-6H67XLET.js";
258
260
  import {
259
261
  openQwenAsrRealtimeStream,
260
262
  openVoiceStream,
261
263
  openVoiceStreamWithRetry
262
- } from "./chunk-BCZFQXWK.js";
264
+ } from "./chunk-GTM6IHBB.js";
263
265
  import {
264
266
  recordGoalStatusItem,
265
267
  restoreGoalFromHistory
266
- } from "./chunk-LO4ROVP4.js";
267
- import "./chunk-LGAOC3ZS.js";
268
- import "./chunk-XFZYFU3I.js";
268
+ } from "./chunk-UOFFZNXV.js";
269
+ import "./chunk-DYA25Y7U.js";
269
270
  import {
270
271
  cpLen,
271
272
  cpSlice,
@@ -277,7 +278,8 @@ import {
277
278
  sanitizeTerminalText,
278
279
  stripUnsafeCharacters,
279
280
  toCodePoints
280
- } from "./chunk-YDLJGZHL.js";
281
+ } from "./chunk-4NFY2S7N.js";
282
+ import "./chunk-UHQ3L6GC.js";
281
283
  import {
282
284
  stringWidth
283
285
  } from "./chunk-2MIN6GRR.js";
@@ -287,64 +289,65 @@ import {
287
289
  } from "./chunk-QTERJVPZ.js";
288
290
  import "./chunk-3Z43GZUQ.js";
289
291
  import "./chunk-RXFQM6FQ.js";
292
+ import "./chunk-LL4U3BSH.js";
293
+ import "./chunk-6H67XLET.js";
290
294
  import {
291
295
  assertVoiceBaseUrlNetworkAllowed,
292
296
  isKeytermEcho,
293
297
  isStreamingVoiceModel,
294
298
  resolveVoiceStreamConfig,
295
299
  transcribeVoiceAudio
296
- } from "./chunk-CAPPWD3X.js";
300
+ } from "./chunk-2A6MHYIA.js";
297
301
  import {
298
302
  formatUnsupportedVoiceModelMessage,
299
303
  isSelectableVoiceModel
300
- } from "./chunk-JTV5K7NH.js";
301
- import "./chunk-ZHBO7WVX.js";
304
+ } from "./chunk-XSA5EKTJ.js";
305
+ import "./chunk-JELIWHXD.js";
302
306
  import {
303
307
  createLoadedSettingsAdapter
304
- } from "./chunk-WUZ7H6DP.js";
308
+ } from "./chunk-K5Q62CGR.js";
305
309
  import {
306
310
  getExtendedSystemInfo
307
- } from "./chunk-QIZKCVM3.js";
311
+ } from "./chunk-GHJM2C2T.js";
308
312
  import {
309
313
  formatDuration,
310
- formatMemoryUsage,
311
314
  formatRelativeTime,
312
315
  formatTokenCount
313
- } from "./chunk-E5Z2AVNV.js";
316
+ } from "./chunk-3SH53ANB.js";
314
317
  import "./chunk-GLWP3FDB.js";
315
318
  import "./chunk-XCGIMOLN.js";
316
319
  import {
317
320
  isInlineModelOverrideAllowed
318
- } from "./chunk-KCO4FLFJ.js";
321
+ } from "./chunk-AYB4HSBI.js";
319
322
  import {
320
323
  computeWorkspaceSkillListUpdates,
321
324
  resolveSkillSettings,
322
325
  skillSettingStrings
323
326
  } from "./chunk-Z4X5MTRT.js";
324
- import "./chunk-BNWB5CYE.js";
327
+ import "./chunk-3WXMXT7C.js";
325
328
  import {
326
329
  requestConsentInteractive,
327
330
  requestConsentOrFail
328
- } from "./chunk-5MKRTI4T.js";
331
+ } from "./chunk-BKUN5QHP.js";
329
332
  import "./chunk-57OAHC2Y.js";
330
- import "./chunk-2XSLTRFZ.js";
331
- import "./chunk-TFRMVU6R.js";
332
- import "./chunk-XBYYDKAZ.js";
333
+ import "./chunk-2CTKGIFR.js";
334
+ import "./chunk-K4CGQN4Q.js";
335
+ import "./chunk-ZTN6OA5J.js";
333
336
  import "./chunk-V6WHFGST.js";
334
- import "./chunk-2RFKHEXL.js";
337
+ import "./chunk-6PLDPT2C.js";
335
338
  import "./chunk-FYJ7W2PI.js";
336
- import "./chunk-U4VTUMMK.js";
337
- import "./chunk-GZ3RCT54.js";
339
+ import "./chunk-QONSRAEV.js";
340
+ import "./chunk-UHTJC7O3.js";
338
341
  import "./chunk-ALMR3E6Q.js";
339
342
  import "./chunk-BK2UNYWD.js";
340
343
  import "./chunk-M5GB774H.js";
341
- import "./chunk-4G2BISNC.js";
342
- import "./chunk-GEBV2JGB.js";
343
- import "./chunk-7I5GTCT4.js";
344
+ import "./chunk-XC2VAFVZ.js";
345
+ import "./chunk-I6FAHB4N.js";
346
+ import "./chunk-GB3AB7TR.js";
344
347
  import "./chunk-UDXSXLER.js";
345
348
  import {
346
349
  loadMcpApprovals
347
- } from "./chunk-6RPMI2AB.js";
350
+ } from "./chunk-NZB4NDJL.js";
348
351
  import {
349
352
  CORRUPTED_SUFFIX,
350
353
  SettingScope,
@@ -367,39 +370,34 @@ import {
367
370
  settingExistsInScope,
368
371
  validateSettingValue,
369
372
  writeOutputLanguageAndRegisterPath
370
- } from "./chunk-EIF3FXTB.js";
373
+ } from "./chunk-LAPK3GLC.js";
371
374
  import "./chunk-RKUWKYED.js";
375
+ import "./chunk-GOXKNSDZ.js";
376
+ import "./chunk-IDS7MSUP.js";
372
377
  import {
373
378
  getCurrentLanguage,
374
379
  localizeToolDisplayName,
375
380
  t,
376
381
  ta
377
- } from "./chunk-TCIFAA7K.js";
378
- import "./chunk-2N7CODY5.js";
379
- import "./chunk-DP3IHZGG.js";
380
- import "./chunk-VWOOBLTY.js";
381
- import "./chunk-GOXKNSDZ.js";
382
- import "./chunk-IDS7MSUP.js";
382
+ } from "./chunk-CHCLO3M7.js";
383
+ import "./chunk-AQEWCKX4.js";
383
384
  import "./chunk-6PEXNQTX.js";
384
- import "./chunk-XFSFZCM5.js";
385
- import "./chunk-URK542T4.js";
386
- import {
387
- getCliVersion
388
- } from "./chunk-VYOXCEPJ.js";
389
- import "./chunk-VJNBRRZG.js";
385
+ import "./chunk-DP3IHZGG.js";
386
+ import "./chunk-25QQVOCG.js";
390
387
  import {
391
388
  isWorkspaceTrusted,
392
389
  loadTrustedFolders
393
- } from "./chunk-Q43KPN7X.js";
390
+ } from "./chunk-434YCHSV.js";
394
391
  import {
395
392
  require_strip_json_comments
396
393
  } from "./chunk-ALGGS7UH.js";
397
394
  import "./chunk-MR3PXB6E.js";
395
+ import "./chunk-XFSFZCM5.js";
396
+ import "./chunk-URK542T4.js";
398
397
  import {
399
- clearScreen,
400
- writeStderrLine,
401
- writeStderrLineSafe
402
- } from "./chunk-OWAK7LMW.js";
398
+ getCliVersion
399
+ } from "./chunk-MBKPUM5Y.js";
400
+ import "./chunk-VJNBRRZG.js";
403
401
  import {
404
402
  ALIBABA_PROVIDERS,
405
403
  AsyncFzf,
@@ -456,6 +454,7 @@ import {
456
454
  findProviderById,
457
455
  findRepeatedDuplicateProviderToolCall,
458
456
  fireNotificationHook,
457
+ formatMemoryUsage,
459
458
  generatePromptSuggestion,
460
459
  generateSessionRecap,
461
460
  generateToolUseSummary,
@@ -487,7 +486,6 @@ import {
487
486
  parseInstallSource,
488
487
  parseRule,
489
488
  parseVisionModelSetting,
490
- promptIdContext,
491
489
  readWorktreeSession,
492
490
  readWorktreeSessionMarker,
493
491
  redactUrlCredentials,
@@ -506,41 +504,48 @@ import {
506
504
  validateWorkflowName,
507
505
  watchRepoBranch,
508
506
  writeRuntimeStatus
509
- } from "./chunk-X5WNMMIA.js";
507
+ } from "./chunk-NGWYUZZO.js";
508
+ import "./chunk-GOFAQQZA.js";
509
+ import "./chunk-5M6IDOMF.js";
510
510
  import "./chunk-TWPJO254.js";
511
511
  import "./chunk-H6XPXXMH.js";
512
- import "./chunk-5M6IDOMF.js";
513
- import "./chunk-UPUG4GXM.js";
514
- import "./chunk-64LQLPL7.js";
515
- import "./chunk-2LQTH543.js";
516
- import "./chunk-KRXPRVGL.js";
512
+ import "./chunk-CWEIMFFW.js";
513
+ import "./chunk-I7JDGNG6.js";
514
+ import "./chunk-A6SX5TAH.js";
515
+ import "./chunk-33FNCQSY.js";
516
+ import "./chunk-6PVPNMXU.js";
517
517
  import {
518
518
  resolveModelId
519
- } from "./chunk-BMFALVGQ.js";
520
- import "./chunk-CVHIL5IG.js";
519
+ } from "./chunk-PXA5AWHY.js";
521
520
  import "./chunk-IRH27ZC2.js";
522
521
  import "./chunk-QHWCP53L.js";
523
- import "./chunk-PONHVBRT.js";
522
+ import "./chunk-MOHAWIAW.js";
523
+ import "./chunk-MYT7N6QH.js";
524
+ import {
525
+ promptIdContext
526
+ } from "./chunk-O6GEWCJA.js";
524
527
  import "./chunk-T26EAKDL.js";
525
- import "./chunk-6PVPNMXU.js";
526
528
  import "./chunk-CPBF7KYF.js";
527
- import "./chunk-6QIGFD5W.js";
529
+ import "./chunk-MISUEWB4.js";
530
+ import "./chunk-KRXPRVGL.js";
528
531
  import {
529
532
  HOOKS_CONFIG_FIELDS
530
- } from "./chunk-XWWKIXVD.js";
531
- import "./chunk-75GFAX4R.js";
532
- import "./chunk-OKF7JF3R.js";
533
+ } from "./chunk-A5YZ3FA2.js";
534
+ import "./chunk-YAVY33G4.js";
535
+ import "./chunk-2UISUFHQ.js";
536
+ import "./chunk-6FMJLI5M.js";
533
537
  import {
534
538
  APPROVAL_MODES,
535
539
  getStartupContextLength,
536
540
  isSystemReminderContent,
537
541
  runOutsideAgentContext
538
- } from "./chunk-JSD33JG6.js";
542
+ } from "./chunk-PGEGUNH5.js";
539
543
  import "./chunk-S6LOFUVP.js";
540
- import "./chunk-JCW2R7WC.js";
544
+ import "./chunk-K623ENWT.js";
545
+ import "./chunk-AQ37AY7B.js";
541
546
  import {
542
547
  isPathWithinRoot
543
- } from "./chunk-2DN4J57Y.js";
548
+ } from "./chunk-432XCUHF.js";
544
549
  import "./chunk-ZPJWUGCS.js";
545
550
  import {
546
551
  osc8Hyperlink,
@@ -548,10 +553,10 @@ import {
548
553
  sanitizeForOsc,
549
554
  supportsHyperlinks,
550
555
  wrapForMultiplexer
551
- } from "./chunk-2LKVPASC.js";
556
+ } from "./chunk-XC656O42.js";
552
557
  import "./chunk-NAVJD2PQ.js";
553
- import "./chunk-LW3RFMG7.js";
554
- import "./chunk-W4MIWP6M.js";
558
+ import "./chunk-QYPT3QUD.js";
559
+ import "./chunk-QMBEW7EW.js";
555
560
  import {
556
561
  REASONING_EFFORT_TIERS
557
562
  } from "./chunk-DGEIYUC3.js";
@@ -561,13 +566,13 @@ import {
561
566
  } from "./chunk-MPHPFVKK.js";
562
567
  import "./chunk-GLNBDYUX.js";
563
568
  import "./chunk-DJ2GSRLV.js";
564
- import "./chunk-5KTQXHPY.js";
565
- import "./chunk-75MIQ3LV.js";
569
+ import "./chunk-XCLLRKY5.js";
570
+ import "./chunk-RPYYTL7E.js";
566
571
  import "./chunk-2J3OJGTL.js";
567
572
  import "./chunk-P3QQPMQA.js";
568
- import "./chunk-RPLGZJV2.js";
573
+ import "./chunk-6O5DVH27.js";
569
574
  import "./chunk-GLCZKT5V.js";
570
- import "./chunk-DZLYR4U3.js";
575
+ import "./chunk-2DNKEBXY.js";
571
576
  import {
572
577
  ApiCancelEvent,
573
578
  AuthEvent,
@@ -608,7 +613,7 @@ import {
608
613
  runVisionBridge,
609
614
  shouldRunVisionBridge,
610
615
  splitImageParts
611
- } from "./chunk-PT722TDT.js";
616
+ } from "./chunk-M2F5PLOW.js";
612
617
  import "./chunk-VGC4I5JJ.js";
613
618
  import {
614
619
  AUTO_MEMORY_INDEX_FILENAME,
@@ -616,27 +621,27 @@ import {
616
621
  getAutoMemoryRoot,
617
622
  getUserAutoMemoryRoot,
618
623
  isAnyAutoMemPath
619
- } from "./chunk-SGFT55XI.js";
620
- import "./chunk-Y4IHBGBP.js";
624
+ } from "./chunk-E4WHKETF.js";
625
+ import "./chunk-BV4QX43X.js";
621
626
  import {
622
627
  ToolNames,
623
628
  isShellProgressData
624
- } from "./chunk-Y6AXW2OG.js";
629
+ } from "./chunk-I5GNT6ZS.js";
625
630
  import {
626
631
  MAINLINE_CODER_MODEL
627
- } from "./chunk-VCPIZRYH.js";
632
+ } from "./chunk-TFFMATHX.js";
628
633
  import "./chunk-46UV252V.js";
629
634
  import {
630
635
  DEFAULT_TOKEN_LIMIT
631
636
  } from "./chunk-ZBVS26BY.js";
632
- import "./chunk-WZRWHXFE.js";
633
- import "./chunk-A3NDJ5SB.js";
637
+ import "./chunk-BFHXDAR7.js";
638
+ import "./chunk-TYERNYH4.js";
634
639
  import {
635
640
  atomicWriteFileSync
636
- } from "./chunk-7XATOOE7.js";
637
- import "./chunk-BGTQCTQW.js";
641
+ } from "./chunk-UH7Z7Y45.js";
642
+ import "./chunk-O2ZYHG33.js";
638
643
  import "./chunk-W4RQUHY3.js";
639
- import "./chunk-S7W2GKIO.js";
644
+ import "./chunk-G7XXKQYS.js";
640
645
  import {
641
646
  Storage,
642
647
  UnauthorizedError,
@@ -648,18 +653,23 @@ import {
648
653
  isNodeError,
649
654
  shortenPath,
650
655
  tildeifyPath
651
- } from "./chunk-UHUSJ6X7.js";
656
+ } from "./chunk-3RXUYQJI.js";
652
657
  import "./chunk-VOQXFAY5.js";
653
- import "./chunk-RCUQIPTN.js";
658
+ import "./chunk-W7XZ3KP5.js";
654
659
  import {
655
660
  registerCleanup,
656
661
  runExitCleanup
657
- } from "./chunk-52ZSWYEG.js";
662
+ } from "./chunk-SK2UKB45.js";
658
663
  import {
659
664
  finalizeStartupProfile,
660
665
  profileCheckpoint
661
666
  } from "./chunk-QSWDGAIC.js";
662
667
  import "./chunk-Q7YDKOGY.js";
668
+ import {
669
+ clearScreen,
670
+ writeStderrLine,
671
+ writeStderrLineSafe
672
+ } from "./chunk-OWAK7LMW.js";
663
673
  import "./chunk-75DOP5OR.js";
664
674
  import "./chunk-DMTGGOSA.js";
665
675
  import "./chunk-YQ3U5MUC.js";
@@ -681,7 +691,7 @@ import {
681
691
  // packages/cli/src/ui/startInteractiveUI.tsx
682
692
  init_esbuild_shims();
683
693
  import { basename as basename4 } from "node:path";
684
- var import_react167 = __toESM(require_react(), 1);
694
+ var import_react163 = __toESM(require_react(), 1);
685
695
 
686
696
  // packages/cli/src/dualOutput/DualOutputBridge.ts
687
697
  init_esbuild_shims();
@@ -1297,7 +1307,7 @@ var useRemoteInput = /* @__PURE__ */ __name(() => (0, import_react2.useContext)(
1297
1307
 
1298
1308
  // packages/cli/src/ui/AppContainer.tsx
1299
1309
  init_esbuild_shims();
1300
- var import_react165 = __toESM(require_react(), 1);
1310
+ var import_react161 = __toESM(require_react(), 1);
1301
1311
 
1302
1312
  // packages/cli/src/ui/App.tsx
1303
1313
  init_esbuild_shims();
@@ -2521,7 +2531,7 @@ function VirtualizedList(props, ref) {
2521
2531
  data,
2522
2532
  renderItem,
2523
2533
  estimatedItemHeight,
2524
- keyExtractor: keyExtractor2,
2534
+ keyExtractor,
2525
2535
  initialScrollIndex,
2526
2536
  initialScrollOffsetInIndex,
2527
2537
  renderStatic,
@@ -2573,7 +2583,7 @@ function VirtualizedList(props, ref) {
2573
2583
  if (prevKeys.length <= Math.max(8, 2 * data.length)) return prev;
2574
2584
  const currentKeys = /* @__PURE__ */ new Set();
2575
2585
  for (let i = 0; i < data.length; i++) {
2576
- currentKeys.add(keyExtractor2(data[i], i));
2586
+ currentKeys.add(keyExtractor(data[i], i));
2577
2587
  }
2578
2588
  let staleSeen = false;
2579
2589
  for (const k of prevKeys) {
@@ -2589,19 +2599,19 @@ function VirtualizedList(props, ref) {
2589
2599
  }
2590
2600
  return next;
2591
2601
  });
2592
- }, [data, keyExtractor2]);
2602
+ }, [data, keyExtractor]);
2593
2603
  const { totalHeight, offsets } = (0, import_react10.useMemo)(() => {
2594
2604
  const offsets2 = [0];
2595
2605
  let totalHeight2 = 0;
2596
2606
  for (let i = 0; i < data.length; i++) {
2597
- const key = keyExtractor2(data[i], i);
2607
+ const key = keyExtractor(data[i], i);
2598
2608
  const raw = heights[key] ?? estimatedItemHeight(i);
2599
2609
  const height = Number.isFinite(raw) && raw > 0 ? raw : 0;
2600
2610
  totalHeight2 += height;
2601
2611
  offsets2.push(totalHeight2);
2602
2612
  }
2603
2613
  return { totalHeight: totalHeight2, offsets: offsets2 };
2604
- }, [heights, data, estimatedItemHeight, keyExtractor2]);
2614
+ }, [heights, data, estimatedItemHeight, keyExtractor]);
2605
2615
  const scrollableContainerHeight = containerHeight;
2606
2616
  const getAnchorForScrollTop = (0, import_react10.useCallback)(
2607
2617
  (scrollTop2, offsets2) => {
@@ -2641,7 +2651,7 @@ function VirtualizedList(props, ref) {
2641
2651
  }
2642
2652
  if (scrollAnchor.offset === SCROLL_TO_ITEM_END) {
2643
2653
  const item = data[scrollAnchor.index];
2644
- const key = item ? keyExtractor2(item, scrollAnchor.index) : "";
2654
+ const key = item ? keyExtractor(item, scrollAnchor.index) : "";
2645
2655
  const itemHeight = heights[key] ?? 0;
2646
2656
  return offset + itemHeight - scrollableContainerHeight;
2647
2657
  }
@@ -2652,7 +2662,7 @@ function VirtualizedList(props, ref) {
2652
2662
  heights,
2653
2663
  scrollableContainerHeight,
2654
2664
  data,
2655
- keyExtractor2
2665
+ keyExtractor
2656
2666
  ]);
2657
2667
  const scrollTop = isStickingToBottom ? Number.MAX_SAFE_INTEGER : actualScrollTop;
2658
2668
  const prevDataLength = (0, import_react10.useRef)(data.length);
@@ -2783,7 +2793,7 @@ function VirtualizedList(props, ref) {
2783
2793
  debugLogger4.debug(`renderItem threw at index ${i}`, err);
2784
2794
  content = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Box_default, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color: "red", children: "[render error]" }) });
2785
2795
  }
2786
- const key = keyExtractor2(item, i);
2796
+ const key = keyExtractor(item, i);
2787
2797
  items.push(
2788
2798
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2789
2799
  VirtualizedListItem,
@@ -2811,7 +2821,7 @@ function VirtualizedList(props, ref) {
2811
2821
  renderStatic,
2812
2822
  isStaticItem,
2813
2823
  renderItem,
2814
- keyExtractor2,
2824
+ keyExtractor,
2815
2825
  width,
2816
2826
  containerWidth,
2817
2827
  onHeightChange
@@ -3714,6 +3724,7 @@ var virtualIsStaticItem = /* @__PURE__ */ __name((item) => item.type === "vp-ban
3714
3724
  var MainContent = /* @__PURE__ */ __name(() => {
3715
3725
  const { version } = useAppContext();
3716
3726
  const uiState = useUIState();
3727
+ const { allExpanded: fullDetail } = useThoughtExpanded();
3717
3728
  const streamingState = uiState.streamingState;
3718
3729
  const showScrollbar = uiState.showScrollbar ?? true;
3719
3730
  const {
@@ -3878,7 +3889,8 @@ var MainContent = /* @__PURE__ */ __name(() => {
3878
3889
  activeShellPtyId: ps.activePtyId,
3879
3890
  embeddedShellFocused: ps.embeddedShellFocused,
3880
3891
  commands: uiState.slashCommands,
3881
- sourceCopyIndexOffsets
3892
+ sourceCopyIndexOffsets,
3893
+ fullDetail
3882
3894
  }
3883
3895
  );
3884
3896
  }
@@ -3893,7 +3905,8 @@ var MainContent = /* @__PURE__ */ __name(() => {
3893
3905
  isPending: false,
3894
3906
  commands: uiState.slashCommands,
3895
3907
  sourceCopyIndexOffsets,
3896
- thoughtHeadId: thoughtHeadIdByItemRef.current.get(item)
3908
+ thoughtHeadId: thoughtHeadIdByItemRef.current.get(item),
3909
+ fullDetail
3897
3910
  }
3898
3911
  );
3899
3912
  },
@@ -3903,7 +3916,8 @@ var MainContent = /* @__PURE__ */ __name(() => {
3903
3916
  mainAreaWidth,
3904
3917
  staticAreaMaxItemHeight,
3905
3918
  uiState.slashCommands,
3906
- sourceCopyOffsetsByHistoryItem
3919
+ sourceCopyOffsetsByHistoryItem,
3920
+ fullDetail
3907
3921
  ]
3908
3922
  );
3909
3923
  if (useVirtualScroll) {
@@ -3963,7 +3977,8 @@ var MainContent = /* @__PURE__ */ __name(() => {
3963
3977
  isPending: false,
3964
3978
  commands: uiState.slashCommands,
3965
3979
  sourceCopyIndexOffsets,
3966
- thoughtHeadId: thoughtHeadIdByItem.get(h)
3980
+ thoughtHeadId: thoughtHeadIdByItem.get(h),
3981
+ fullDetail
3967
3982
  },
3968
3983
  h.id
3969
3984
  )
@@ -3993,7 +4008,8 @@ var MainContent = /* @__PURE__ */ __name(() => {
3993
4008
  isFocused: !uiState.isEditorDialogOpen,
3994
4009
  activeShellPtyId: uiState.activePtyId,
3995
4010
  embeddedShellFocused: uiState.embeddedShellFocused,
3996
- sourceCopyIndexOffsets
4011
+ sourceCopyIndexOffsets,
4012
+ fullDetail
3997
4013
  },
3998
4014
  i
3999
4015
  )
@@ -22869,6 +22885,7 @@ function useBackgroundTaskView(config) {
22869
22885
  monitorRegistry.setStatusChangeCallback(refreshFromRegistry);
22870
22886
  workflowRegistry.setStatusChangeCallback(refreshFromRegistry);
22871
22887
  agentRegistry.setApprovalChangeCallback(refreshFromRegistry);
22888
+ workflowRegistry.setApprovalChangeCallback(refreshFromRegistry);
22872
22889
  const memoryListener = /* @__PURE__ */ __name(() => {
22873
22890
  const dreams = memoryManager.listTasksByType("dream", projectRoot);
22874
22891
  const sig = computeDreamSig(dreams);
@@ -22884,6 +22901,7 @@ function useBackgroundTaskView(config) {
22884
22901
  monitorRegistry.setStatusChangeCallback(void 0);
22885
22902
  workflowRegistry.setStatusChangeCallback(void 0);
22886
22903
  agentRegistry.setApprovalChangeCallback(void 0);
22904
+ workflowRegistry.setApprovalChangeCallback(void 0);
22887
22905
  unsubscribeMemory();
22888
22906
  };
22889
22907
  }, [config]);
@@ -23345,7 +23363,8 @@ function rowLabel(entry, userBlocking) {
23345
23363
  const label = entry.meta?.name ?? entry.runId;
23346
23364
  const phase = entry.currentPhase ? ` \xB7 ${entry.currentPhase}` : "";
23347
23365
  const counts = entry.agentsDispatched > 0 ? ` (${entry.agentsCompleted}/${entry.agentsDispatched})` : "";
23348
- return `[workflow] ${label}${phase}${counts}`;
23366
+ const approval = entry.pendingApprovals.length ? ` \u26A0 ${t("needs approval")}` : "";
23367
+ return `[workflow] ${label}${phase}${counts}${approval}`;
23349
23368
  }
23350
23369
  case "dream":
23351
23370
  return formatDreamRowLabel(entry);
@@ -23938,20 +23957,37 @@ var BackgroundTasksDialog = /* @__PURE__ */ __name(({
23938
23957
  }, [entries, selectedIndex, config, activityTick]);
23939
23958
  const selectedEntryId = selectedEntry ? entryId(selectedEntry) : void 0;
23940
23959
  const selectedAgentIdForActivity = selectedEntry?.kind === "agent" ? selectedEntry.agentId : void 0;
23941
- const selectedApproval = selectedEntry?.kind === "agent" ? selectedEntry.pendingApprovals?.[0] : void 0;
23960
+ const selectedApproval = selectedEntry?.kind === "agent" && selectedEntry.pendingApprovals?.[0] ? {
23961
+ kind: "agent",
23962
+ approval: selectedEntry.pendingApprovals[0],
23963
+ ownerId: selectedEntry.agentId
23964
+ } : selectedEntry?.kind === "workflow" && selectedEntry.pendingApprovals[0] ? {
23965
+ kind: "workflow",
23966
+ approval: selectedEntry.pendingApprovals[0],
23967
+ ownerId: selectedEntry.runId
23968
+ } : void 0;
23942
23969
  const approvalActive = isDetailMode && Boolean(selectedApproval);
23943
- const approvalUsesQuestionDialog = selectedApproval?.confirmationDetails.type === "ask_user_question";
23944
- const approvalConfirmationDetails = selectedApproval && selectedAgentIdForActivity ? (
23970
+ const approvalUsesQuestionDialog = selectedApproval?.approval.confirmationDetails.type === "ask_user_question";
23971
+ const approvalConfirmationDetails = selectedApproval ? (
23945
23972
  // The spread restores every field except `onConfirm`; the cast is
23946
23973
  // needed because TS can't prove the discriminated-union shape across
23947
23974
  // an object spread.
23948
23975
  {
23949
- ...selectedApproval.confirmationDetails,
23976
+ ...selectedApproval.approval.confirmationDetails,
23950
23977
  hideAlwaysAllow: true,
23951
23978
  onConfirm: /* @__PURE__ */ __name(async (outcome, payload) => {
23952
- await config.getBackgroundTaskRegistry().resolvePendingApproval(
23953
- selectedAgentIdForActivity,
23954
- selectedApproval.callId,
23979
+ if (selectedApproval.kind === "agent") {
23980
+ await config.getBackgroundTaskRegistry().resolvePendingApproval(
23981
+ selectedApproval.ownerId,
23982
+ selectedApproval.approval.callId,
23983
+ outcome,
23984
+ payload
23985
+ );
23986
+ return;
23987
+ }
23988
+ await config.getWorkflowRunRegistry().resolvePendingApproval(
23989
+ selectedApproval.ownerId,
23990
+ selectedApproval.approval.approvalId,
23955
23991
  outcome,
23956
23992
  payload
23957
23993
  );
@@ -24166,7 +24202,7 @@ var BackgroundTasksDialog = /* @__PURE__ */ __name(({
24166
24202
  }
24167
24203
  ) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { color: theme.text.secondary, children: t("No entry to show.") }) }),
24168
24204
  approvalActive && approvalConfirmationDetails && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, paddingX: 1, children: [
24169
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, color: theme.status.warning, children: t("Background agent needs approval") }),
24205
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, color: theme.status.warning, children: selectedApproval?.kind === "workflow" ? `[workflow] ${t("needs approval")}` : t("Background agent needs approval") }),
24170
24206
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
24171
24207
  ToolConfirmationMessage,
24172
24208
  {
@@ -25014,7 +25050,7 @@ function SuggestionsDisplay({
25014
25050
  }
25015
25051
  ) }, cat);
25016
25052
  }),
25017
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { color: theme.text.secondary, children: t("(Ctrl+\u2190/\u2192 to switch)") }) })
25053
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { color: theme.text.secondary, children: t("(Ctrl+Tab / Ctrl+Shift+Tab or Ctrl+\u2190/\u2192 to switch)") }) })
25018
25054
  ] }),
25019
25055
  scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { color: theme.text.primary, children: "\u25B2" }),
25020
25056
  visibleSuggestions.map((suggestion, index) => {
@@ -30619,7 +30655,7 @@ var KIND_NAMES = {
30619
30655
  };
30620
30656
  function hasPendingApproval(entries) {
30621
30657
  return entries.some(
30622
- (e) => e.kind === "agent" && (e.pendingApprovals?.length ?? 0) > 0
30658
+ (e) => (e.kind === "agent" || e.kind === "workflow") && (e.pendingApprovals?.length ?? 0) > 0
30623
30659
  );
30624
30660
  }
30625
30661
  __name(hasPendingApproval, "hasPendingApproval");
@@ -31510,7 +31546,7 @@ var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1);
31510
31546
  var getNewlineKey = /* @__PURE__ */ __name(() => process.platform === "win32" ? "ctrl+enter" : "ctrl+j", "getNewlineKey");
31511
31547
  var getPasteKey = /* @__PURE__ */ __name(() => {
31512
31548
  if (process.platform === "win32") return "alt+v";
31513
- return process.platform === "darwin" ? "cmd+v" : "ctrl+v";
31549
+ return process.platform === "darwin" ? "ctrl+v / option+v" : "ctrl+v";
31514
31550
  }, "getPasteKey");
31515
31551
  var getExternalEditorKey = /* @__PURE__ */ __name(() => process.platform === "darwin" ? "ctrl+x" : "ctrl+x", "getExternalEditorKey");
31516
31552
  var getShortcuts = /* @__PURE__ */ __name(() => [
@@ -31525,7 +31561,7 @@ var getShortcuts = /* @__PURE__ */ __name(() => [
31525
31561
  { key: "ctrl+c", description: t("to quit") },
31526
31562
  { key: getNewlineKey(), description: t("for newline") + " \u23CE" },
31527
31563
  { key: "ctrl+l", description: t("to clear screen") },
31528
- { key: "ctrl+o", description: t("to view transcript") },
31564
+ { key: "ctrl+o", description: t("to expand details") },
31529
31565
  { key: "ctrl+r", description: t("to search history") },
31530
31566
  { key: "ctrl+y", description: t("to retry last request") },
31531
31567
  { key: "ctrl+q", description: t("to queue for the next turn") },
@@ -32690,7 +32726,7 @@ var AgentComposer = /* @__PURE__ */ __name(({ agentId }) => {
32690
32726
  const agentApprovalMode = agentApprovalModes.get(agentId) ?? "default" /* DEFAULT */;
32691
32727
  useKeypress(
32692
32728
  (key) => {
32693
- const isShiftTab = key.shift && key.name === "tab";
32729
+ const isShiftTab = key.shift && key.name === "tab" && !key.ctrl;
32694
32730
  const isWindowsTab = process.platform === "win32" && key.name === "tab" && !key.ctrl && !key.meta;
32695
32731
  if (isShiftTab || isWindowsTab) {
32696
32732
  const currentIndex = APPROVAL_MODES.indexOf(agentApprovalMode);
@@ -33239,34 +33275,15 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
33239
33275
  }, [addItem, compactOldItems]);
33240
33276
  }, "useMemoryMonitor");
33241
33277
 
33242
- // packages/cli/src/ui/hooks/useResizeSettleRepaint.ts
33243
- init_esbuild_shims();
33244
- var import_react117 = __toESM(require_react(), 1);
33245
- var RESIZE_REPAINT_SETTLE_MS = 200;
33246
- function useResizeSettleRepaint(terminalWidth, refreshStatic) {
33247
- const settledTerminalWidthRef = (0, import_react117.useRef)(terminalWidth);
33248
- (0, import_react117.useEffect)(() => {
33249
- if (settledTerminalWidthRef.current === terminalWidth) {
33250
- return;
33251
- }
33252
- const timer = setTimeout(() => {
33253
- settledTerminalWidthRef.current = terminalWidth;
33254
- refreshStatic();
33255
- }, RESIZE_REPAINT_SETTLE_MS);
33256
- return () => clearTimeout(timer);
33257
- }, [terminalWidth, refreshStatic]);
33258
- }
33259
- __name(useResizeSettleRepaint, "useResizeSettleRepaint");
33260
-
33261
33278
  // packages/cli/src/ui/hooks/use-wake-repaint.ts
33262
33279
  init_esbuild_shims();
33263
- var import_react118 = __toESM(require_react(), 1);
33280
+ var import_react117 = __toESM(require_react(), 1);
33264
33281
  var HEARTBEAT_INTERVAL_MS = 5e3;
33265
33282
  var WAKE_THRESHOLD_MS = HEARTBEAT_INTERVAL_MS * 2;
33266
33283
  function useWakeRepaint(repaint) {
33267
- const repaintRef = (0, import_react118.useRef)(repaint);
33284
+ const repaintRef = (0, import_react117.useRef)(repaint);
33268
33285
  repaintRef.current = repaint;
33269
- (0, import_react118.useEffect)(() => {
33286
+ (0, import_react117.useEffect)(() => {
33270
33287
  let lastTick = Date.now();
33271
33288
  const timer = setInterval(() => {
33272
33289
  const now = Date.now();
@@ -33292,12 +33309,12 @@ __name(useWakeRepaint, "useWakeRepaint");
33292
33309
 
33293
33310
  // packages/cli/src/ui/hooks/useThemeCommand.ts
33294
33311
  init_esbuild_shims();
33295
- var import_react119 = __toESM(require_react(), 1);
33312
+ var import_react118 = __toESM(require_react(), 1);
33296
33313
  import process13 from "node:process";
33297
33314
  var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError) => {
33298
- const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react119.useState)(!!initialThemeError);
33299
- const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react119.useState)(themeManager.getActiveTheme().name);
33300
- const openThemeDialog = (0, import_react119.useCallback)(() => {
33315
+ const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react118.useState)(!!initialThemeError);
33316
+ const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react118.useState)(themeManager.getActiveTheme().name);
33317
+ const openThemeDialog = (0, import_react118.useCallback)(() => {
33301
33318
  if (process13.env["NO_COLOR"]) {
33302
33319
  addItem(
33303
33320
  {
@@ -33313,7 +33330,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
33313
33330
  setThemeBeforeDialogOpen(themeManager.getActiveTheme().name);
33314
33331
  setIsThemeDialogOpen(true);
33315
33332
  }, [addItem]);
33316
- const applyTheme = (0, import_react119.useCallback)(
33333
+ const applyTheme = (0, import_react118.useCallback)(
33317
33334
  (themeName) => {
33318
33335
  if (!themeManager.setActiveTheme(themeName)) {
33319
33336
  setIsThemeDialogOpen(true);
@@ -33328,13 +33345,13 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
33328
33345
  },
33329
33346
  [setThemeError]
33330
33347
  );
33331
- const handleThemeHighlight = (0, import_react119.useCallback)(
33348
+ const handleThemeHighlight = (0, import_react118.useCallback)(
33332
33349
  (themeName) => {
33333
33350
  applyTheme(themeName);
33334
33351
  },
33335
33352
  [applyTheme]
33336
33353
  );
33337
- const handleThemeSelect = (0, import_react119.useCallback)(
33354
+ const handleThemeSelect = (0, import_react118.useCallback)(
33338
33355
  (themeName, scope) => {
33339
33356
  if (themeName === void 0) {
33340
33357
  applyTheme(themeBeforeDialogOpen);
@@ -33381,7 +33398,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
33381
33398
 
33382
33399
  // packages/cli/src/ui/hooks/useFeedbackDialog.ts
33383
33400
  init_esbuild_shims();
33384
- var import_react120 = __toESM(require_react(), 1);
33401
+ var import_react119 = __toESM(require_react(), 1);
33385
33402
  import * as fs15 from "node:fs";
33386
33403
  var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
33387
33404
  var FEEDBACK_SHOW_PROBABILITY = 0.25;
@@ -33427,20 +33444,20 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
33427
33444
  history,
33428
33445
  sessionStats
33429
33446
  }) => {
33430
- const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react120.useState)(false);
33431
- const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react120.useState)(false);
33432
- const openFeedbackDialog = (0, import_react120.useCallback)(() => {
33447
+ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = (0, import_react119.useState)(false);
33448
+ const [isFeedbackDismissedTemporarily, setIsFeedbackDismissedTemporarily] = (0, import_react119.useState)(false);
33449
+ const openFeedbackDialog = (0, import_react119.useCallback)(() => {
33433
33450
  setIsFeedbackDialogOpen(true);
33434
33451
  }, []);
33435
- const closeFeedbackDialog = (0, import_react120.useCallback)(
33452
+ const closeFeedbackDialog = (0, import_react119.useCallback)(
33436
33453
  () => setIsFeedbackDialogOpen(false),
33437
33454
  []
33438
33455
  );
33439
- const temporaryCloseFeedbackDialog = (0, import_react120.useCallback)(() => {
33456
+ const temporaryCloseFeedbackDialog = (0, import_react119.useCallback)(() => {
33440
33457
  setIsFeedbackDialogOpen(false);
33441
33458
  setIsFeedbackDismissedTemporarily(true);
33442
33459
  }, []);
33443
- const submitFeedback = (0, import_react120.useCallback)(
33460
+ const submitFeedback = (0, import_react119.useCallback)(
33444
33461
  (rating) => {
33445
33462
  if (rating >= FEEDBACK_OPTIONS.GOOD && rating <= FEEDBACK_OPTIONS.FINE) {
33446
33463
  const feedbackEvent = new UserFeedbackEvent(
@@ -33460,7 +33477,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
33460
33477
  },
33461
33478
  [closeFeedbackDialog, sessionStats.sessionId, config, settings]
33462
33479
  );
33463
- (0, import_react120.useEffect)(() => {
33480
+ (0, import_react119.useEffect)(() => {
33464
33481
  const checkAndShowFeedback = /* @__PURE__ */ __name(() => {
33465
33482
  if (streamingState === "idle" /* Idle */ && history.length > 0) {
33466
33483
  if (!config.getUsageStatisticsEnabled() || settings.merged.ui?.enableUserFeedback === false || !lastMessageIsAIResponse(history) || Math.random() > FEEDBACK_SHOW_PROBABILITY || !meetsMinimumSessionRequirements(sessionStats) || isFeedbackDismissedTemporarily) {
@@ -33482,7 +33499,7 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
33482
33499
  settings.merged.ui?.enableUserFeedback,
33483
33500
  config
33484
33501
  ]);
33485
- (0, import_react120.useEffect)(() => {
33502
+ (0, import_react119.useEffect)(() => {
33486
33503
  if (streamingState === "responding" /* Responding */ && isFeedbackDismissedTemporarily) {
33487
33504
  setIsFeedbackDismissedTemporarily(false);
33488
33505
  }
@@ -33498,13 +33515,13 @@ var useFeedbackDialog = /* @__PURE__ */ __name(({
33498
33515
 
33499
33516
  // packages/cli/src/ui/hooks/useEditorSettings.ts
33500
33517
  init_esbuild_shims();
33501
- var import_react121 = __toESM(require_react(), 1);
33518
+ var import_react120 = __toESM(require_react(), 1);
33502
33519
  var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError, addItem) => {
33503
- const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react121.useState)(false);
33504
- const openEditorDialog = (0, import_react121.useCallback)(() => {
33520
+ const [isEditorDialogOpen, setIsEditorDialogOpen] = (0, import_react120.useState)(false);
33521
+ const openEditorDialog = (0, import_react120.useCallback)(() => {
33505
33522
  setIsEditorDialogOpen(true);
33506
33523
  }, []);
33507
- const handleEditorSelect = (0, import_react121.useCallback)(
33524
+ const handleEditorSelect = (0, import_react120.useCallback)(
33508
33525
  (editorType, scope) => {
33509
33526
  if (editorType && (!checkHasEditorType(editorType) || !allowEditorTypeInSandbox(editorType))) {
33510
33527
  return;
@@ -33526,7 +33543,7 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
33526
33543
  },
33527
33544
  [loadedSettings, setEditorError, addItem]
33528
33545
  );
33529
- const exitEditorDialog = (0, import_react121.useCallback)(() => {
33546
+ const exitEditorDialog = (0, import_react120.useCallback)(() => {
33530
33547
  setIsEditorDialogOpen(false);
33531
33548
  }, []);
33532
33549
  return {
@@ -33539,13 +33556,13 @@ var useEditorSettings = /* @__PURE__ */ __name((loadedSettings, setEditorError,
33539
33556
 
33540
33557
  // packages/cli/src/ui/hooks/useSettingsCommand.ts
33541
33558
  init_esbuild_shims();
33542
- var import_react122 = __toESM(require_react(), 1);
33559
+ var import_react121 = __toESM(require_react(), 1);
33543
33560
  function useSettingsCommand() {
33544
- const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react122.useState)(false);
33545
- const openSettingsDialog = (0, import_react122.useCallback)(() => {
33561
+ const [isSettingsDialogOpen, setIsSettingsDialogOpen] = (0, import_react121.useState)(false);
33562
+ const openSettingsDialog = (0, import_react121.useCallback)(() => {
33546
33563
  setIsSettingsDialogOpen(true);
33547
33564
  }, []);
33548
- const closeSettingsDialog = (0, import_react122.useCallback)(() => {
33565
+ const closeSettingsDialog = (0, import_react121.useCallback)(() => {
33549
33566
  setIsSettingsDialogOpen(false);
33550
33567
  }, []);
33551
33568
  return {
@@ -33585,15 +33602,15 @@ __name(shouldUseVirtualViewport, "shouldUseVirtualViewport");
33585
33602
 
33586
33603
  // packages/cli/src/ui/hooks/useModelCommand.ts
33587
33604
  init_esbuild_shims();
33588
- var import_react123 = __toESM(require_react(), 1);
33605
+ var import_react122 = __toESM(require_react(), 1);
33589
33606
  var useModelCommand = /* @__PURE__ */ __name(() => {
33590
- const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react123.useState)(false);
33591
- const [isFastModelMode, setIsFastModelMode] = (0, import_react123.useState)(false);
33592
- const [isVoiceModelMode, setIsVoiceModelMode] = (0, import_react123.useState)(false);
33593
- const [isVisionModelMode, setIsVisionModelMode] = (0, import_react123.useState)(false);
33594
- const [isImageModelMode, setIsImageModelMode] = (0, import_react123.useState)(false);
33595
- const [modelDialogPersistScope, setModelDialogPersistScope] = (0, import_react123.useState)(void 0);
33596
- const openModelDialog = (0, import_react123.useCallback)(
33607
+ const [isModelDialogOpen, setIsModelDialogOpen] = (0, import_react122.useState)(false);
33608
+ const [isFastModelMode, setIsFastModelMode] = (0, import_react122.useState)(false);
33609
+ const [isVoiceModelMode, setIsVoiceModelMode] = (0, import_react122.useState)(false);
33610
+ const [isVisionModelMode, setIsVisionModelMode] = (0, import_react122.useState)(false);
33611
+ const [isImageModelMode, setIsImageModelMode] = (0, import_react122.useState)(false);
33612
+ const [modelDialogPersistScope, setModelDialogPersistScope] = (0, import_react122.useState)(void 0);
33613
+ const openModelDialog = (0, import_react122.useCallback)(
33597
33614
  (options) => {
33598
33615
  const voiceModelMode = options?.voiceModelMode ?? false;
33599
33616
  const visionModelMode = options?.visionModelMode ?? false;
@@ -33611,7 +33628,7 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
33611
33628
  },
33612
33629
  []
33613
33630
  );
33614
- const closeModelDialog = (0, import_react123.useCallback)(() => {
33631
+ const closeModelDialog = (0, import_react122.useCallback)(() => {
33615
33632
  setIsModelDialogOpen(false);
33616
33633
  setIsFastModelMode(false);
33617
33634
  setIsVoiceModelMode(false);
@@ -33633,13 +33650,13 @@ var useModelCommand = /* @__PURE__ */ __name(() => {
33633
33650
 
33634
33651
  // packages/cli/src/ui/hooks/useApprovalModeCommand.ts
33635
33652
  init_esbuild_shims();
33636
- var import_react124 = __toESM(require_react(), 1);
33653
+ var import_react123 = __toESM(require_react(), 1);
33637
33654
  var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config) => {
33638
- const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react124.useState)(false);
33639
- const openApprovalModeDialog = (0, import_react124.useCallback)(() => {
33655
+ const [isApprovalModeDialogOpen, setIsApprovalModeDialogOpen] = (0, import_react123.useState)(false);
33656
+ const openApprovalModeDialog = (0, import_react123.useCallback)(() => {
33640
33657
  setIsApprovalModeDialogOpen(true);
33641
33658
  }, []);
33642
- const handleApprovalModeSelect = (0, import_react124.useCallback)(
33659
+ const handleApprovalModeSelect = (0, import_react123.useCallback)(
33643
33660
  (mode, scope) => {
33644
33661
  try {
33645
33662
  if (!mode) {
@@ -33665,13 +33682,13 @@ var useApprovalModeCommand = /* @__PURE__ */ __name((loadedSettings, config) =>
33665
33682
 
33666
33683
  // packages/cli/src/ui/hooks/use-effort-command.ts
33667
33684
  init_esbuild_shims();
33668
- var import_react125 = __toESM(require_react(), 1);
33685
+ var import_react124 = __toESM(require_react(), 1);
33669
33686
  var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem) => {
33670
- const [isEffortDialogOpen, setIsEffortDialogOpen] = (0, import_react125.useState)(false);
33671
- const openEffortDialog = (0, import_react125.useCallback)(() => {
33687
+ const [isEffortDialogOpen, setIsEffortDialogOpen] = (0, import_react124.useState)(false);
33688
+ const openEffortDialog = (0, import_react124.useCallback)(() => {
33672
33689
  setIsEffortDialogOpen(true);
33673
33690
  }, []);
33674
- const handleEffortSelect = (0, import_react125.useCallback)(
33691
+ const handleEffortSelect = (0, import_react124.useCallback)(
33675
33692
  (effort) => {
33676
33693
  try {
33677
33694
  if (!effort) {
@@ -33723,7 +33740,7 @@ var useEffortCommand = /* @__PURE__ */ __name((loadedSettings, config, addItem)
33723
33740
 
33724
33741
  // packages/cli/src/ui/hooks/useBranchCommand.ts
33725
33742
  init_esbuild_shims();
33726
- var import_react126 = __toESM(require_react(), 1);
33743
+ var import_react125 = __toESM(require_react(), 1);
33727
33744
  import { randomUUID } from "node:crypto";
33728
33745
  var BACKGROUND_WORK_BRANCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before branching the conversation.";
33729
33746
  function deriveFirstPrompt(messages) {
@@ -33744,7 +33761,7 @@ function deriveFirstPrompt(messages) {
33744
33761
  __name(deriveFirstPrompt, "deriveFirstPrompt");
33745
33762
  function useBranchCommand(options) {
33746
33763
  const { config, historyManager, startNewSession, setSessionName, remount } = options;
33747
- const handleBranch = (0, import_react126.useCallback)(
33764
+ const handleBranch = (0, import_react125.useCallback)(
33748
33765
  async (name) => {
33749
33766
  if (!config) return;
33750
33767
  if (hasBlockingBackgroundWork(config)) {
@@ -33886,19 +33903,19 @@ __name(useBranchCommand, "useBranchCommand");
33886
33903
 
33887
33904
  // packages/cli/src/ui/hooks/useResumeCommand.ts
33888
33905
  init_esbuild_shims();
33889
- var import_react127 = __toESM(require_react(), 1);
33906
+ var import_react126 = __toESM(require_react(), 1);
33890
33907
  var BACKGROUND_WORK_SWITCH_BLOCKED_MESSAGE = "Stop the current session's running background tasks before resuming another session.";
33891
33908
  function useResumeCommand(options) {
33892
- const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react127.useState)(false);
33893
- const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react127.useState)();
33894
- const openResumeDialog = (0, import_react127.useCallback)(
33909
+ const [isResumeDialogOpen, setIsResumeDialogOpen] = (0, import_react126.useState)(false);
33910
+ const [resumeMatchedSessions, setResumeMatchedSessions] = (0, import_react126.useState)();
33911
+ const openResumeDialog = (0, import_react126.useCallback)(
33895
33912
  (matchedSessions) => {
33896
33913
  setResumeMatchedSessions(matchedSessions);
33897
33914
  setIsResumeDialogOpen(true);
33898
33915
  },
33899
33916
  []
33900
33917
  );
33901
- const closeResumeDialog = (0, import_react127.useCallback)(() => {
33918
+ const closeResumeDialog = (0, import_react126.useCallback)(() => {
33902
33919
  setIsResumeDialogOpen(false);
33903
33920
  setResumeMatchedSessions(void 0);
33904
33921
  }, []);
@@ -33911,7 +33928,7 @@ function useResumeCommand(options) {
33911
33928
  remount
33912
33929
  } = options;
33913
33930
  const { addItem, clearItems, loadHistory } = historyManager;
33914
- const handleResume = (0, import_react127.useCallback)(
33931
+ const handleResume = (0, import_react126.useCallback)(
33915
33932
  async (sessionId) => {
33916
33933
  if (!config) {
33917
33934
  return;
@@ -34036,18 +34053,18 @@ __name(useResumeCommand, "useResumeCommand");
34036
34053
 
34037
34054
  // packages/cli/src/ui/hooks/useDeleteCommand.ts
34038
34055
  init_esbuild_shims();
34039
- var import_react128 = __toESM(require_react(), 1);
34056
+ var import_react127 = __toESM(require_react(), 1);
34040
34057
  function useDeleteCommand(options) {
34041
- const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react128.useState)(false);
34042
- const openDeleteDialog = (0, import_react128.useCallback)(() => {
34058
+ const [isDeleteDialogOpen, setIsDeleteDialogOpen] = (0, import_react127.useState)(false);
34059
+ const openDeleteDialog = (0, import_react127.useCallback)(() => {
34043
34060
  setIsDeleteDialogOpen(true);
34044
34061
  }, []);
34045
- const closeDeleteDialog = (0, import_react128.useCallback)(() => {
34062
+ const closeDeleteDialog = (0, import_react127.useCallback)(() => {
34046
34063
  setIsDeleteDialogOpen(false);
34047
34064
  }, []);
34048
34065
  const { config, addItem } = options ?? {};
34049
- const isDeletingManyRef = (0, import_react128.useRef)(false);
34050
- const handleDelete = (0, import_react128.useCallback)(
34066
+ const isDeletingManyRef = (0, import_react127.useRef)(false);
34067
+ const handleDelete = (0, import_react127.useCallback)(
34051
34068
  async (sessionId) => {
34052
34069
  if (!config) {
34053
34070
  return;
@@ -34077,6 +34094,7 @@ function useDeleteCommand(options) {
34077
34094
  const sessionService = config.getSessionService();
34078
34095
  const success = await sessionService.removeSession(sessionId);
34079
34096
  if (success) {
34097
+ fireSessionDeleteHook(config, sessionId);
34080
34098
  addItem?.(
34081
34099
  {
34082
34100
  type: "info",
@@ -34106,7 +34124,7 @@ function useDeleteCommand(options) {
34106
34124
  },
34107
34125
  [closeDeleteDialog, config, addItem]
34108
34126
  );
34109
- const handleDeleteMany = (0, import_react128.useCallback)(
34127
+ const handleDeleteMany = (0, import_react127.useCallback)(
34110
34128
  async (sessionIds) => {
34111
34129
  if (!config) {
34112
34130
  return;
@@ -34156,6 +34174,9 @@ function useDeleteCommand(options) {
34156
34174
  );
34157
34175
  const sessionService = config.getSessionService();
34158
34176
  const result = await sessionService.removeSessions(filtered);
34177
+ for (const sessionId of result.removed) {
34178
+ fireSessionDeleteHook(config, sessionId);
34179
+ }
34159
34180
  const removedCount = result.removed.length;
34160
34181
  const failedIds = [
34161
34182
  ...result.notFound,
@@ -34238,7 +34259,7 @@ __name(useDeleteCommand, "useDeleteCommand");
34238
34259
 
34239
34260
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
34240
34261
  init_esbuild_shims();
34241
- var import_react129 = __toESM(require_react(), 1);
34262
+ var import_react128 = __toESM(require_react(), 1);
34242
34263
  var debugLogger33 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
34243
34264
  function hasUserPromptExpansionHooks(config) {
34244
34265
  return !!config && !config.getDisableAllHooks?.() && (config.hasHooksForEvent?.("UserPromptExpansion") ?? false);
@@ -34270,33 +34291,33 @@ function getSkillCommandName(command) {
34270
34291
  }
34271
34292
  __name(getSkillCommandName, "getSkillCommandName");
34272
34293
  var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history, addItem, clearItems, loadHistory, refreshStatic, toggleVimEnabled, isProcessing, setIsProcessing, isIdleRef, setGeminiMdFileCount, actions, extensionsUpdateState, isConfigInitialized, logger, updateItem, setSessionName, extensionRefreshState) => {
34273
- const fallbackExtensionRefreshStateRef = (0, import_react129.useRef)(
34294
+ const fallbackExtensionRefreshStateRef = (0, import_react128.useRef)(
34274
34295
  null
34275
34296
  );
34276
34297
  if (!fallbackExtensionRefreshStateRef.current) {
34277
34298
  fallbackExtensionRefreshStateRef.current = new ExtensionRefreshState();
34278
34299
  }
34279
34300
  const activeExtensionRefreshState = extensionRefreshState ?? fallbackExtensionRefreshStateRef.current;
34280
- const historyRef = (0, import_react129.useRef)(history);
34281
- (0, import_react129.useLayoutEffect)(() => {
34301
+ const historyRef = (0, import_react128.useRef)(history);
34302
+ (0, import_react128.useLayoutEffect)(() => {
34282
34303
  historyRef.current = history;
34283
34304
  }, [history]);
34284
34305
  const { stats: sessionStats, startNewSession } = useSessionStats();
34285
- const [commands, setCommands] = (0, import_react129.useState)([]);
34286
- const [recentCommands, setRecentCommands] = (0, import_react129.useState)(/* @__PURE__ */ new Map());
34287
- const [reloadTrigger, setReloadTrigger] = (0, import_react129.useState)(0);
34288
- const commandReloadResolversRef = (0, import_react129.useRef)([]);
34289
- const extensionContentRefreshTimerRef = (0, import_react129.useRef)(null);
34290
- const extensionContentRefreshRunningRef = (0, import_react129.useRef)(false);
34291
- const extensionContentRefreshPendingRef = (0, import_react129.useRef)(false);
34292
- const mountedRef = (0, import_react129.useRef)(true);
34293
- (0, import_react129.useEffect)(() => {
34306
+ const [commands, setCommands] = (0, import_react128.useState)([]);
34307
+ const [recentCommands, setRecentCommands] = (0, import_react128.useState)(/* @__PURE__ */ new Map());
34308
+ const [reloadTrigger, setReloadTrigger] = (0, import_react128.useState)(0);
34309
+ const commandReloadResolversRef = (0, import_react128.useRef)([]);
34310
+ const extensionContentRefreshTimerRef = (0, import_react128.useRef)(null);
34311
+ const extensionContentRefreshRunningRef = (0, import_react128.useRef)(false);
34312
+ const extensionContentRefreshPendingRef = (0, import_react128.useRef)(false);
34313
+ const mountedRef = (0, import_react128.useRef)(true);
34314
+ (0, import_react128.useEffect)(() => {
34294
34315
  mountedRef.current = true;
34295
34316
  return () => {
34296
34317
  mountedRef.current = false;
34297
34318
  };
34298
34319
  }, []);
34299
- const resolveCommandReloads = (0, import_react129.useCallback)((completedTrigger) => {
34320
+ const resolveCommandReloads = (0, import_react128.useCallback)((completedTrigger) => {
34300
34321
  if (commandReloadResolversRef.current.length === 0) {
34301
34322
  return;
34302
34323
  }
@@ -34310,7 +34331,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34310
34331
  }
34311
34332
  commandReloadResolversRef.current = remaining;
34312
34333
  }, []);
34313
- const reloadCommands = (0, import_react129.useCallback)(() => {
34334
+ const reloadCommands = (0, import_react128.useCallback)(() => {
34314
34335
  if (!config) {
34315
34336
  return Promise.resolve();
34316
34337
  }
@@ -34325,14 +34346,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34325
34346
  });
34326
34347
  });
34327
34348
  }, [config]);
34328
- const clearPendingExtensionContentRefresh = (0, import_react129.useCallback)(() => {
34349
+ const clearPendingExtensionContentRefresh = (0, import_react128.useCallback)(() => {
34329
34350
  if (!extensionContentRefreshTimerRef.current) {
34330
34351
  return;
34331
34352
  }
34332
34353
  clearTimeout(extensionContentRefreshTimerRef.current);
34333
34354
  extensionContentRefreshTimerRef.current = null;
34334
34355
  }, []);
34335
- const showExtensionContentRefreshError = (0, import_react129.useCallback)(
34356
+ const showExtensionContentRefreshError = (0, import_react128.useCallback)(
34336
34357
  (error) => {
34337
34358
  if (!mountedRef.current) {
34338
34359
  return;
@@ -34352,7 +34373,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34352
34373
  },
34353
34374
  [addItem]
34354
34375
  );
34355
- const runExtensionContentRefresh = (0, import_react129.useCallback)(async () => {
34376
+ const runExtensionContentRefresh = (0, import_react128.useCallback)(async () => {
34356
34377
  if (!config) {
34357
34378
  return;
34358
34379
  }
@@ -34396,23 +34417,23 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34396
34417
  reloadCommands,
34397
34418
  showExtensionContentRefreshError
34398
34419
  ]);
34399
- const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react129.useState)(null);
34400
- const [confirmationRequest, setConfirmationRequest] = (0, import_react129.useState)(null);
34401
- const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react129.useState)(
34420
+ const [shellConfirmationRequest, setShellConfirmationRequest] = (0, import_react128.useState)(null);
34421
+ const [confirmationRequest, setConfirmationRequest] = (0, import_react128.useState)(null);
34422
+ const [sessionShellAllowlist, setSessionShellAllowlist] = (0, import_react128.useState)(
34402
34423
  /* @__PURE__ */ new Set()
34403
34424
  );
34404
- const [pendingItem, setPendingItem] = (0, import_react129.useState)(
34425
+ const [pendingItem, setPendingItem] = (0, import_react128.useState)(
34405
34426
  null
34406
34427
  );
34407
- const [btwItem, setBtwItem] = (0, import_react129.useState)(null);
34408
- const btwAbortControllerRef = (0, import_react129.useRef)(null);
34409
- const cancelBtw = (0, import_react129.useCallback)(() => {
34428
+ const [btwItem, setBtwItem] = (0, import_react128.useState)(null);
34429
+ const btwAbortControllerRef = (0, import_react128.useRef)(null);
34430
+ const cancelBtw = (0, import_react128.useCallback)(() => {
34410
34431
  btwAbortControllerRef.current?.abort();
34411
34432
  btwAbortControllerRef.current = null;
34412
34433
  setBtwItem(null);
34413
34434
  }, []);
34414
- const abortControllerRef = (0, import_react129.useRef)(null);
34415
- const cancelSlashCommand = (0, import_react129.useCallback)(() => {
34435
+ const abortControllerRef = (0, import_react128.useRef)(null);
34436
+ const cancelSlashCommand = (0, import_react128.useCallback)(() => {
34416
34437
  cancelBtw();
34417
34438
  if (!abortControllerRef.current) {
34418
34439
  return;
@@ -34436,14 +34457,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34436
34457
  },
34437
34458
  { isActive: isProcessing }
34438
34459
  );
34439
- const pendingHistoryItems = (0, import_react129.useMemo)(() => {
34460
+ const pendingHistoryItems = (0, import_react128.useMemo)(() => {
34440
34461
  const items = [];
34441
34462
  if (pendingItem != null) {
34442
34463
  items.push(pendingItem);
34443
34464
  }
34444
34465
  return items;
34445
34466
  }, [pendingItem]);
34446
- const addMessage = (0, import_react129.useCallback)(
34467
+ const addMessage = (0, import_react128.useCallback)(
34447
34468
  (message) => {
34448
34469
  let historyItemContent;
34449
34470
  if (message.type === "about" /* ABOUT */) {
@@ -34503,7 +34524,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34503
34524
  },
34504
34525
  [addItem]
34505
34526
  );
34506
- const commandContext = (0, import_react129.useMemo)(
34527
+ const commandContext = (0, import_react128.useMemo)(
34507
34528
  () => ({
34508
34529
  services: {
34509
34530
  config,
@@ -34575,7 +34596,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34575
34596
  activeExtensionRefreshState
34576
34597
  ]
34577
34598
  );
34578
- (0, import_react129.useEffect)(() => {
34599
+ (0, import_react128.useEffect)(() => {
34579
34600
  if (!config) {
34580
34601
  return;
34581
34602
  }
@@ -34593,7 +34614,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34593
34614
  })();
34594
34615
  };
34595
34616
  }, [config, reloadCommands]);
34596
- (0, import_react129.useEffect)(() => {
34617
+ (0, import_react128.useEffect)(() => {
34597
34618
  if (!config) {
34598
34619
  return;
34599
34620
  }
@@ -34618,7 +34639,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34618
34639
  }
34619
34640
  };
34620
34641
  }, [config, reloadCommands]);
34621
- (0, import_react129.useEffect)(() => {
34642
+ (0, import_react128.useEffect)(() => {
34622
34643
  if (!isConfigInitialized) {
34623
34644
  return;
34624
34645
  }
@@ -34633,7 +34654,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34633
34654
  reloadCommands();
34634
34655
  });
34635
34656
  }, [config, isConfigInitialized, reloadCommands]);
34636
- (0, import_react129.useEffect)(() => {
34657
+ (0, import_react128.useEffect)(() => {
34637
34658
  const listener = /* @__PURE__ */ __name((reason) => {
34638
34659
  clearPendingExtensionContentRefresh();
34639
34660
  addItem(
@@ -34660,7 +34681,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34660
34681
  addItem,
34661
34682
  clearPendingExtensionContentRefresh
34662
34683
  ]);
34663
- (0, import_react129.useEffect)(() => {
34684
+ (0, import_react128.useEffect)(() => {
34664
34685
  activeExtensionRefreshState.on(
34665
34686
  "extensions-reload-started" /* ExtensionsReloadStarted */,
34666
34687
  clearPendingExtensionContentRefresh
@@ -34680,7 +34701,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34680
34701
  );
34681
34702
  };
34682
34703
  }, [activeExtensionRefreshState, clearPendingExtensionContentRefresh]);
34683
- (0, import_react129.useEffect)(() => {
34704
+ (0, import_react128.useEffect)(() => {
34684
34705
  if (!config) {
34685
34706
  return;
34686
34707
  }
@@ -34706,7 +34727,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34706
34727
  activeExtensionRefreshState,
34707
34728
  runExtensionContentRefresh
34708
34729
  ]);
34709
- (0, import_react129.useEffect)(() => {
34730
+ (0, import_react128.useEffect)(() => {
34710
34731
  const controller = new AbortController();
34711
34732
  const load = /* @__PURE__ */ __name(async () => {
34712
34733
  try {
@@ -34803,7 +34824,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34803
34824
  settings,
34804
34825
  resolveCommandReloads
34805
34826
  ]);
34806
- const handleSlashCommand = (0, import_react129.useCallback)(
34827
+ const handleSlashCommand = (0, import_react128.useCallback)(
34807
34828
  async (rawQuery, oneTimeShellAllowlist, overwriteConfirmed, existingInvocationItemId) => {
34808
34829
  if (typeof rawQuery !== "string") {
34809
34830
  return false;
@@ -34886,10 +34907,14 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
34886
34907
  });
34887
34908
  }
34888
34909
  if (config) {
34910
+ const succeeded = skillResult?.type === "submit_prompt";
34889
34911
  recordSkillInvocation(config, {
34890
34912
  skillName: getSkillCommandName(skill),
34891
- success: skillResult?.type === "submit_prompt"
34913
+ success: succeeded
34892
34914
  });
34915
+ if (succeeded) {
34916
+ void recordAutoSkillCommandUsage(config, skill);
34917
+ }
34893
34918
  }
34894
34919
  }
34895
34920
  if (stackedResult.remainingText) {
@@ -35174,6 +35199,7 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config, settings, history
35174
35199
  updateItem(invocationItemId, { sentToModel: true });
35175
35200
  }
35176
35201
  recordSkillCommandInvocation(true);
35202
+ void recordAutoSkillCommandUsage(config, commandToExecute);
35177
35203
  return {
35178
35204
  type: "submit_prompt",
35179
35205
  content,
@@ -35365,11 +35391,11 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
35365
35391
 
35366
35392
  // packages/cli/src/ui/hooks/useDoublePress.ts
35367
35393
  init_esbuild_shims();
35368
- var import_react130 = __toESM(require_react(), 1);
35394
+ var import_react129 = __toESM(require_react(), 1);
35369
35395
  var DOUBLE_PRESS_TIMEOUT_MS = 800;
35370
35396
  function useDoublePress(onDoublePress, onPending) {
35371
- const timeoutRef = (0, import_react130.useRef)(null);
35372
- (0, import_react130.useEffect)(
35397
+ const timeoutRef = (0, import_react129.useRef)(null);
35398
+ (0, import_react129.useEffect)(
35373
35399
  () => () => {
35374
35400
  if (timeoutRef.current !== null) {
35375
35401
  clearTimeout(timeoutRef.current);
@@ -35378,7 +35404,7 @@ function useDoublePress(onDoublePress, onPending) {
35378
35404
  },
35379
35405
  []
35380
35406
  );
35381
- return (0, import_react130.useCallback)(() => {
35407
+ return (0, import_react129.useCallback)(() => {
35382
35408
  if (timeoutRef.current !== null) {
35383
35409
  clearTimeout(timeoutRef.current);
35384
35410
  timeoutRef.current = null;
@@ -35442,10 +35468,10 @@ __name(formatSessionWindowTitle, "formatSessionWindowTitle");
35442
35468
 
35443
35469
  // packages/cli/src/ui/hooks/useLogger.ts
35444
35470
  init_esbuild_shims();
35445
- var import_react131 = __toESM(require_react(), 1);
35471
+ var import_react130 = __toESM(require_react(), 1);
35446
35472
  var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
35447
- const [logger, setLogger] = (0, import_react131.useState)(null);
35448
- (0, import_react131.useEffect)(() => {
35473
+ const [logger, setLogger] = (0, import_react130.useState)(null);
35474
+ (0, import_react130.useEffect)(() => {
35449
35475
  if (!sessionId) {
35450
35476
  return;
35451
35477
  }
@@ -35466,11 +35492,11 @@ var useLogger = /* @__PURE__ */ __name((storage, sessionId) => {
35466
35492
 
35467
35493
  // packages/cli/src/ui/hooks/useGeminiStream.ts
35468
35494
  init_esbuild_shims();
35469
- var import_react136 = __toESM(require_react(), 1);
35495
+ var import_react135 = __toESM(require_react(), 1);
35470
35496
 
35471
35497
  // packages/cli/src/ui/hooks/shellCommandProcessor.ts
35472
35498
  init_esbuild_shims();
35473
- var import_react132 = __toESM(require_react(), 1);
35499
+ var import_react131 = __toESM(require_react(), 1);
35474
35500
  import crypto2 from "node:crypto";
35475
35501
  import path10 from "node:path";
35476
35502
  import os5 from "node:os";
@@ -35503,8 +35529,8 @@ ${modelContent}
35503
35529
  }
35504
35530
  __name(addShellCommandToGeminiHistory, "addShellCommandToGeminiHistory");
35505
35531
  var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPendingHistoryItem, onExec, onDebugMessage, config, geminiClient, setShellInputFocused, terminalWidth, terminalHeight) => {
35506
- const [activeShellPtyId, setActiveShellPtyId] = (0, import_react132.useState)(null);
35507
- const handleShellCommand = (0, import_react132.useCallback)(
35532
+ const [activeShellPtyId, setActiveShellPtyId] = (0, import_react131.useState)(null);
35533
+ const handleShellCommand = (0, import_react131.useCallback)(
35508
35534
  (rawQuery, abortSignal) => {
35509
35535
  if (typeof rawQuery !== "string" || rawQuery.trim() === "") {
35510
35536
  return false;
@@ -35758,11 +35784,11 @@ ${finalOutput}`;
35758
35784
 
35759
35785
  // packages/cli/src/ui/hooks/useStateAndRef.ts
35760
35786
  init_esbuild_shims();
35761
- var import_react133 = __toESM(require_react(), 1);
35787
+ var import_react132 = __toESM(require_react(), 1);
35762
35788
  var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
35763
- const [state, setState] = import_react133.default.useState(initialValue);
35764
- const ref = import_react133.default.useRef(initialValue);
35765
- const setStateInternal = import_react133.default.useCallback(
35789
+ const [state, setState] = import_react132.default.useState(initialValue);
35790
+ const ref = import_react132.default.useRef(initialValue);
35791
+ const setStateInternal = import_react132.default.useCallback(
35766
35792
  (newStateOrCallback) => {
35767
35793
  let newValue;
35768
35794
  if (typeof newStateOrCallback === "function") {
@@ -35780,12 +35806,12 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
35780
35806
 
35781
35807
  // packages/cli/src/ui/hooks/useReactToolScheduler.ts
35782
35808
  init_esbuild_shims();
35783
- var import_react134 = __toESM(require_react(), 1);
35809
+ var import_react133 = __toESM(require_react(), 1);
35784
35810
  import * as path11 from "node:path";
35785
35811
  var debugLogger35 = createDebugLogger("REACT_TOOL_SCHEDULER");
35786
35812
  function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
35787
- const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react134.useState)([]);
35788
- const outputUpdateHandler = (0, import_react134.useCallback)(
35813
+ const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react133.useState)([]);
35814
+ const outputUpdateHandler = (0, import_react133.useCallback)(
35789
35815
  (toolCallId, outputChunk) => {
35790
35816
  if (isShellProgressData(outputChunk)) {
35791
35817
  return;
@@ -35803,13 +35829,13 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35803
35829
  },
35804
35830
  []
35805
35831
  );
35806
- const allToolCallsCompleteHandler = (0, import_react134.useCallback)(
35832
+ const allToolCallsCompleteHandler = (0, import_react133.useCallback)(
35807
35833
  async (completedToolCalls) => {
35808
35834
  await onComplete(completedToolCalls);
35809
35835
  },
35810
35836
  [onComplete]
35811
35837
  );
35812
- const toolCallsUpdateHandler = (0, import_react134.useCallback)(
35838
+ const toolCallsUpdateHandler = (0, import_react133.useCallback)(
35813
35839
  (updatedCoreToolCalls) => {
35814
35840
  setToolCallsForDisplay(
35815
35841
  (prevTrackedCalls) => updatedCoreToolCalls.map((coreTc) => {
@@ -35836,7 +35862,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35836
35862
  },
35837
35863
  [setToolCallsForDisplay]
35838
35864
  );
35839
- const scheduler = (0, import_react134.useMemo)(
35865
+ const scheduler = (0, import_react133.useMemo)(
35840
35866
  () => new CoreToolScheduler({
35841
35867
  config,
35842
35868
  outputUpdateHandler,
@@ -35856,7 +35882,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35856
35882
  onToolResultFullTurnModel
35857
35883
  ]
35858
35884
  );
35859
- const schedule = (0, import_react134.useCallback)(
35885
+ const schedule = (0, import_react133.useCallback)(
35860
35886
  (request, signal, modelOverride) => {
35861
35887
  if (!modelOverride?.endsWith("\0")) {
35862
35888
  void scheduler.schedule(request, signal);
@@ -35905,7 +35931,7 @@ function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorC
35905
35931
  },
35906
35932
  [allToolCallsCompleteHandler, config, scheduler]
35907
35933
  );
35908
- const markToolsAsSubmitted = (0, import_react134.useCallback)(
35934
+ const markToolsAsSubmitted = (0, import_react133.useCallback)(
35909
35935
  (callIdsToMark) => {
35910
35936
  setToolCallsForDisplay(
35911
35937
  (prevCalls) => prevCalls.map(
@@ -36083,7 +36109,7 @@ import process15 from "node:process";
36083
36109
 
36084
36110
  // packages/cli/src/ui/hooks/useMessageQueue.ts
36085
36111
  init_esbuild_shims();
36086
- var import_react135 = __toESM(require_react(), 1);
36112
+ var import_react134 = __toESM(require_react(), 1);
36087
36113
  var GOAL_COMMAND_RE = /^\/goal(?:\s|$)/;
36088
36114
  function aggregateMessages(messages) {
36089
36115
  const modelText = messages.map((message) => message.modelText).join("\n\n");
@@ -36094,9 +36120,9 @@ function aggregateMessages(messages) {
36094
36120
  }
36095
36121
  __name(aggregateMessages, "aggregateMessages");
36096
36122
  function useMessageQueue() {
36097
- const [queuedMessages, setQueuedMessages] = (0, import_react135.useState)([]);
36098
- const queueRef = (0, import_react135.useRef)([]);
36099
- const addMessage = (0, import_react135.useCallback)(
36123
+ const [queuedMessages, setQueuedMessages] = (0, import_react134.useState)([]);
36124
+ const queueRef = (0, import_react134.useRef)([]);
36125
+ const addMessage = (0, import_react134.useCallback)(
36100
36126
  (message, deferUntilIdle = false, submittedPrompt) => {
36101
36127
  const modelText = message.trim();
36102
36128
  if (modelText.length > 0) {
@@ -36109,28 +36135,28 @@ function useMessageQueue() {
36109
36135
  },
36110
36136
  []
36111
36137
  );
36112
- const clearQueue = (0, import_react135.useCallback)(() => {
36138
+ const clearQueue = (0, import_react134.useCallback)(() => {
36113
36139
  queueRef.current = [];
36114
36140
  setQueuedMessages([]);
36115
36141
  }, []);
36116
- const getQueuedMessagesText = (0, import_react135.useCallback)(() => {
36142
+ const getQueuedMessagesText = (0, import_react134.useCallback)(() => {
36117
36143
  if (queuedMessages.length === 0) return "";
36118
36144
  return queuedMessages.map(({ modelText }) => modelText).join("\n\n");
36119
36145
  }, [queuedMessages]);
36120
- const popAllMessages = (0, import_react135.useCallback)(() => {
36146
+ const popAllMessages = (0, import_react134.useCallback)(() => {
36121
36147
  const current = queueRef.current;
36122
36148
  if (current.length === 0) return null;
36123
36149
  queueRef.current = [];
36124
36150
  setQueuedMessages([]);
36125
36151
  return aggregateMessages(current);
36126
36152
  }, []);
36127
- const restoreMessages = (0, import_react135.useCallback)((messages) => {
36153
+ const restoreMessages = (0, import_react134.useCallback)((messages) => {
36128
36154
  const restored = messages.map((text) => text.trim()).filter(Boolean).map((modelText) => ({ modelText, deferUntilIdle: false }));
36129
36155
  if (restored.length === 0) return;
36130
36156
  queueRef.current = [...restored, ...queueRef.current];
36131
36157
  setQueuedMessages(queueRef.current);
36132
36158
  }, []);
36133
- const drainQueue = (0, import_react135.useCallback)((includeDeferred = false) => {
36159
+ const drainQueue = (0, import_react134.useCallback)((includeDeferred = false) => {
36134
36160
  const current = queueRef.current;
36135
36161
  if (current.length === 0) return [];
36136
36162
  const shouldDrain = /* @__PURE__ */ __name((message) => (!isSlashCommand(message.modelText) || !includeDeferred && GOAL_COMMAND_RE.test(message.modelText)) && (includeDeferred || !message.deferUntilIdle), "shouldDrain");
@@ -36141,7 +36167,7 @@ function useMessageQueue() {
36141
36167
  setQueuedMessages(rest);
36142
36168
  return drained.map(({ modelText }) => modelText);
36143
36169
  }, []);
36144
- const popNextTurn = (0, import_react135.useCallback)(() => {
36170
+ const popNextTurn = (0, import_react134.useCallback)(() => {
36145
36171
  const current = queueRef.current;
36146
36172
  if (current.length === 0) return null;
36147
36173
  const plainMessages = current.filter(
@@ -36310,17 +36336,17 @@ function charIndexAfterLine(text, keptLines) {
36310
36336
  }
36311
36337
  __name(charIndexAfterLine, "charIndexAfterLine");
36312
36338
  var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, config, isConfigInitialized, settings, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, setShellInputFocused, terminalWidth, terminalHeight, midTurnDrainRef, logger, availableTerminalHeightRef, terminalWidthRef, midTurnRestoreRef) => {
36313
- const [initError, setInitError] = (0, import_react136.useState)(null);
36314
- const abortControllerRef = (0, import_react136.useRef)(null);
36315
- const flushBufferedStreamEventsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Set());
36316
- const turnCancelledRef = (0, import_react136.useRef)(false);
36317
- const isSubmittingQueryRef = (0, import_react136.useRef)(false);
36318
- const lastPromptRef = (0, import_react136.useRef)(null);
36319
- const lastTurnUserItemRef = (0, import_react136.useRef)(null);
36320
- const canUndoLastLoggedUserMessageRef = (0, import_react136.useRef)(false);
36321
- const turnSawContentEventRef = (0, import_react136.useRef)(false);
36322
- const lastPromptErroredRef = (0, import_react136.useRef)(false);
36323
- const commitItem = (0, import_react136.useCallback)(
36339
+ const [initError, setInitError] = (0, import_react135.useState)(null);
36340
+ const abortControllerRef = (0, import_react135.useRef)(null);
36341
+ const flushBufferedStreamEventsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
36342
+ const turnCancelledRef = (0, import_react135.useRef)(false);
36343
+ const isSubmittingQueryRef = (0, import_react135.useRef)(false);
36344
+ const lastPromptRef = (0, import_react135.useRef)(null);
36345
+ const lastTurnUserItemRef = (0, import_react135.useRef)(null);
36346
+ const canUndoLastLoggedUserMessageRef = (0, import_react135.useRef)(false);
36347
+ const turnSawContentEventRef = (0, import_react135.useRef)(false);
36348
+ const lastPromptErroredRef = (0, import_react135.useRef)(false);
36349
+ const commitItem = (0, import_react135.useCallback)(
36324
36350
  (item, userMessageTimestamp) => {
36325
36351
  if (item.type === "gemini" && !item.timestamp) {
36326
36352
  item.timestamp = Date.now();
@@ -36330,17 +36356,17 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36330
36356
  [addItem]
36331
36357
  );
36332
36358
  const dualOutput = useDualOutput();
36333
- const [isResponding, setIsResponding] = (0, import_react136.useState)(false);
36334
- const activeModelStreamsRef = (0, import_react136.useRef)(0);
36335
- const [thought, setThought] = (0, import_react136.useState)(null);
36336
- const historyRef = (0, import_react136.useRef)(history);
36337
- (0, import_react136.useLayoutEffect)(() => {
36359
+ const [isResponding, setIsResponding] = (0, import_react135.useState)(false);
36360
+ const activeModelStreamsRef = (0, import_react135.useRef)(0);
36361
+ const [thought, setThought] = (0, import_react135.useState)(null);
36362
+ const historyRef = (0, import_react135.useRef)(history);
36363
+ (0, import_react135.useLayoutEffect)(() => {
36338
36364
  historyRef.current = history;
36339
36365
  }, [history]);
36340
- const auxiliaryAbortRefsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Set());
36366
+ const auxiliaryAbortRefsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
36341
36367
  const [pendingHistoryItem, pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
36342
36368
  const [pendingThoughtItem, pendingThoughtItemRef, setPendingThoughtItem] = useStateAndRef(null);
36343
- const thoughtStartTimeRef = (0, import_react136.useRef)(null);
36369
+ const thoughtStartTimeRef = (0, import_react135.useRef)(null);
36344
36370
  const [
36345
36371
  pendingRetryErrorItem,
36346
36372
  pendingRetryErrorItemRef,
@@ -36351,25 +36377,25 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36351
36377
  pendingRetryCountdownItemRef,
36352
36378
  setPendingRetryCountdownItem
36353
36379
  ] = useStateAndRef(null);
36354
- const retryCountdownTimerRef = (0, import_react136.useRef)(
36380
+ const retryCountdownTimerRef = (0, import_react135.useRef)(
36355
36381
  null
36356
36382
  );
36357
- const processedMemoryToolsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Set());
36358
- const submitPromptOnCompleteRef = (0, import_react136.useRef)(null);
36359
- const modelOverrideRef = (0, import_react136.useRef)(void 0);
36360
- const inlineModelOverrideActiveRef = (0, import_react136.useRef)(false);
36361
- const canUseToolResultFullTurnModel = (0, import_react136.useCallback)((model) => {
36383
+ const processedMemoryToolsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
36384
+ const submitPromptOnCompleteRef = (0, import_react135.useRef)(null);
36385
+ const modelOverrideRef = (0, import_react135.useRef)(void 0);
36386
+ const inlineModelOverrideActiveRef = (0, import_react135.useRef)(false);
36387
+ const canUseToolResultFullTurnModel = (0, import_react135.useCallback)((model) => {
36362
36388
  const current = modelOverrideRef.current;
36363
36389
  return !inlineModelOverrideActiveRef.current && (!current?.endsWith("\0") || current === model);
36364
36390
  }, []);
36365
- const handledProviderToolCallIdsRef = (0, import_react136.useRef)(/* @__PURE__ */ new Set());
36366
- const duplicateProviderToolCallResponseIdsRef = (0, import_react136.useRef)(
36391
+ const handledProviderToolCallIdsRef = (0, import_react135.useRef)(/* @__PURE__ */ new Set());
36392
+ const duplicateProviderToolCallResponseIdsRef = (0, import_react135.useRef)(
36367
36393
  /* @__PURE__ */ new Set()
36368
36394
  );
36369
- const pendingDuplicateToolResponsesRef = (0, import_react136.useRef)([]);
36370
- const immediateDuplicateToolResponsesRef = (0, import_react136.useRef)(null);
36371
- const streamingResponseLengthRef = (0, import_react136.useRef)(0);
36372
- const [isReceivingContent, setIsReceivingContent] = (0, import_react136.useState)(false);
36395
+ const pendingDuplicateToolResponsesRef = (0, import_react135.useRef)([]);
36396
+ const immediateDuplicateToolResponsesRef = (0, import_react135.useRef)(null);
36397
+ const streamingResponseLengthRef = (0, import_react135.useRef)(0);
36398
+ const [isReceivingContent, setIsReceivingContent] = (0, import_react135.useState)(false);
36373
36399
  const {
36374
36400
  startNewPrompt,
36375
36401
  getPromptCount,
@@ -36395,11 +36421,11 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36395
36421
  onEditorClose,
36396
36422
  canUseToolResultFullTurnModel
36397
36423
  );
36398
- const pendingToolCallGroupDisplay = (0, import_react136.useMemo)(
36424
+ const pendingToolCallGroupDisplay = (0, import_react135.useMemo)(
36399
36425
  () => toolCalls.length ? mapToDisplay(toolCalls, config.getProjectRoot()) : void 0,
36400
36426
  [toolCalls, config]
36401
36427
  );
36402
- const activeToolPtyId = (0, import_react136.useMemo)(() => {
36428
+ const activeToolPtyId = (0, import_react135.useMemo)(() => {
36403
36429
  const executingShellTool = toolCalls?.find(
36404
36430
  (tc) => tc.status === "executing" && tc.request.name === "run_shell_command"
36405
36431
  );
@@ -36408,18 +36434,18 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36408
36434
  }
36409
36435
  return void 0;
36410
36436
  }, [toolCalls]);
36411
- const loopDetectedRef = (0, import_react136.useRef)(false);
36437
+ const loopDetectedRef = (0, import_react135.useRef)(false);
36412
36438
  const [
36413
36439
  loopDetectionConfirmationRequest,
36414
36440
  setLoopDetectionConfirmationRequest
36415
- ] = (0, import_react136.useState)(null);
36416
- const stopRetryCountdownTimer = (0, import_react136.useCallback)(() => {
36441
+ ] = (0, import_react135.useState)(null);
36442
+ const stopRetryCountdownTimer = (0, import_react135.useCallback)(() => {
36417
36443
  if (retryCountdownTimerRef.current) {
36418
36444
  clearInterval(retryCountdownTimerRef.current);
36419
36445
  retryCountdownTimerRef.current = null;
36420
36446
  }
36421
36447
  }, []);
36422
- const clearRetryCountdown = (0, import_react136.useCallback)(() => {
36448
+ const clearRetryCountdown = (0, import_react135.useCallback)(() => {
36423
36449
  stopRetryCountdownTimer();
36424
36450
  skipRetryDelayRef.current = null;
36425
36451
  setPendingRetryErrorItem(null);
@@ -36429,8 +36455,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36429
36455
  setPendingRetryCountdownItem,
36430
36456
  stopRetryCountdownTimer
36431
36457
  ]);
36432
- const skipRetryDelayRef = (0, import_react136.useRef)(null);
36433
- const startRetryCountdown = (0, import_react136.useCallback)(
36458
+ const skipRetryDelayRef = (0, import_react135.useRef)(null);
36459
+ const startRetryCountdown = (0, import_react135.useCallback)(
36434
36460
  (retryInfo) => {
36435
36461
  stopRetryCountdownTimer();
36436
36462
  skipRetryDelayRef.current = retryInfo.skipDelay;
@@ -36471,8 +36497,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36471
36497
  stopRetryCountdownTimer
36472
36498
  ]
36473
36499
  );
36474
- (0, import_react136.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
36475
- const onExec = (0, import_react136.useCallback)(async (done) => {
36500
+ (0, import_react135.useEffect)(() => () => stopRetryCountdownTimer(), [stopRetryCountdownTimer]);
36501
+ const onExec = (0, import_react135.useCallback)(async (done) => {
36476
36502
  setIsResponding(true);
36477
36503
  await done;
36478
36504
  setIsResponding(false);
@@ -36489,12 +36515,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36489
36515
  terminalHeight
36490
36516
  );
36491
36517
  const activePtyId = activeShellPtyId || activeToolPtyId;
36492
- (0, import_react136.useEffect)(() => {
36518
+ (0, import_react135.useEffect)(() => {
36493
36519
  if (!activePtyId) {
36494
36520
  setShellInputFocused(false);
36495
36521
  }
36496
36522
  }, [activePtyId, setShellInputFocused]);
36497
- const streamingState = (0, import_react136.useMemo)(() => {
36523
+ const streamingState = (0, import_react135.useMemo)(() => {
36498
36524
  if (toolCalls.some((tc) => tc.status === "awaiting_approval")) {
36499
36525
  return "waiting_for_confirmation" /* WaitingForConfirmation */;
36500
36526
  }
@@ -36512,7 +36538,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36512
36538
  }
36513
36539
  return "idle" /* Idle */;
36514
36540
  }, [isResponding, toolCalls]);
36515
- (0, import_react136.useEffect)(() => {
36541
+ (0, import_react135.useEffect)(() => {
36516
36542
  if (config.getApprovalMode() === "yolo" /* YOLO */ && streamingState === "idle" /* Idle */) {
36517
36543
  const lastUserMessageIndex = findLastUserItemIndex(history);
36518
36544
  const turnCount = lastUserMessageIndex === -1 ? 0 : history.length - lastUserMessageIndex;
@@ -36524,7 +36550,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36524
36550
  }
36525
36551
  }
36526
36552
  }, [streamingState, config, history]);
36527
- const cancelOngoingRequest = (0, import_react136.useCallback)(() => {
36553
+ const cancelOngoingRequest = (0, import_react135.useCallback)(() => {
36528
36554
  if (streamingState !== "responding" /* Responding */) {
36529
36555
  return;
36530
36556
  }
@@ -36596,7 +36622,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36596
36622
  config,
36597
36623
  getPromptCount
36598
36624
  ]);
36599
- const applyVisionBridgeIfNeeded = (0, import_react136.useCallback)(
36625
+ const applyVisionBridgeIfNeeded = (0, import_react135.useCallback)(
36600
36626
  async (parts, timestamp, signal) => {
36601
36627
  if (parts === null || !hasImageParts(parts)) {
36602
36628
  return { parts, shouldProceed: true };
@@ -36661,7 +36687,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36661
36687
  },
36662
36688
  [addItem, config]
36663
36689
  );
36664
- const prepareQueryForGemini = (0, import_react136.useCallback)(
36690
+ const prepareQueryForGemini = (0, import_react135.useCallback)(
36665
36691
  async (query, userMessageTimestamp, abortSignal, prompt_id, submitType, submittedPrompt, preserveTurnOwnership) => {
36666
36692
  if (turnCancelledRef.current) {
36667
36693
  return { queryToSend: null, shouldProceed: false };
@@ -36818,7 +36844,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36818
36844
  applyVisionBridgeIfNeeded
36819
36845
  ]
36820
36846
  );
36821
- const handleContentEvent = (0, import_react136.useCallback)(
36847
+ const handleContentEvent = (0, import_react135.useCallback)(
36822
36848
  (eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
36823
36849
  if (turnCancelledRef.current) {
36824
36850
  return "";
@@ -36943,7 +36969,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36943
36969
  terminalWidthRef
36944
36970
  ]
36945
36971
  );
36946
- const mergeThought = (0, import_react136.useCallback)(
36972
+ const mergeThought = (0, import_react135.useCallback)(
36947
36973
  (incoming) => {
36948
36974
  setThought((prev) => {
36949
36975
  const incomingDescription = incoming.description ? clampLoadingThoughtDescription(incoming.description) : incoming.description;
@@ -36972,7 +36998,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
36972
36998
  },
36973
36999
  [setThought]
36974
37000
  );
36975
- const handleThoughtEvent = (0, import_react136.useCallback)(
37001
+ const handleThoughtEvent = (0, import_react135.useCallback)(
36976
37002
  (eventValue, currentThoughtBuffer, userMessageTimestamp) => {
36977
37003
  if (turnCancelledRef.current) {
36978
37004
  return "";
@@ -37034,7 +37060,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37034
37060
  },
37035
37061
  [addItem, mergeThought, pendingThoughtItemRef, setPendingThoughtItem]
37036
37062
  );
37037
- const commitPendingThought = (0, import_react136.useCallback)(
37063
+ const commitPendingThought = (0, import_react135.useCallback)(
37038
37064
  (userMessageTimestamp) => {
37039
37065
  if (pendingThoughtItemRef.current) {
37040
37066
  const item = { ...pendingThoughtItemRef.current };
@@ -37048,7 +37074,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37048
37074
  },
37049
37075
  [addItem, pendingThoughtItemRef, setPendingThoughtItem]
37050
37076
  );
37051
- const handleUserCancelledEvent = (0, import_react136.useCallback)(
37077
+ const handleUserCancelledEvent = (0, import_react135.useCallback)(
37052
37078
  (userMessageTimestamp) => {
37053
37079
  if (turnCancelledRef.current) {
37054
37080
  return;
@@ -37088,7 +37114,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37088
37114
  clearRetryCountdown
37089
37115
  ]
37090
37116
  );
37091
- const handleErrorEvent = (0, import_react136.useCallback)(
37117
+ const handleErrorEvent = (0, import_react135.useCallback)(
37092
37118
  (eventValue, userMessageTimestamp) => {
37093
37119
  lastPromptErroredRef.current = true;
37094
37120
  commitPendingThought(userMessageTimestamp);
@@ -37131,7 +37157,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37131
37157
  clearRetryCountdown
37132
37158
  ]
37133
37159
  );
37134
- const handleCitationEvent = (0, import_react136.useCallback)(
37160
+ const handleCitationEvent = (0, import_react135.useCallback)(
37135
37161
  (text, userMessageTimestamp) => {
37136
37162
  if (!showCitations(settings)) {
37137
37163
  return;
@@ -37150,7 +37176,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37150
37176
  settings
37151
37177
  ]
37152
37178
  );
37153
- const handleFinishedEvent = (0, import_react136.useCallback)(
37179
+ const handleFinishedEvent = (0, import_react135.useCallback)(
37154
37180
  (event, userMessageTimestamp) => {
37155
37181
  const finishReason = event.value.reason;
37156
37182
  if (!finishReason) {
@@ -37191,8 +37217,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37191
37217
  },
37192
37218
  [addItem, clearRetryCountdown]
37193
37219
  );
37194
- const autonomousLoopTickResolverRef = (0, import_react136.useRef)(null);
37195
- const handleChatCompressionEvent = (0, import_react136.useCallback)(
37220
+ const autonomousLoopTickResolverRef = (0, import_react135.useRef)(null);
37221
+ const handleChatCompressionEvent = (0, import_react135.useCallback)(
37196
37222
  (eventValue, userMessageTimestamp) => {
37197
37223
  autonomousLoopTickResolverRef.current?.resetCache();
37198
37224
  if (pendingHistoryItemRef.current) {
@@ -37211,7 +37237,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37211
37237
  },
37212
37238
  [addItem, commitItem, config, pendingHistoryItemRef, setPendingHistoryItem]
37213
37239
  );
37214
- const handleMaxSessionTurnsEvent = (0, import_react136.useCallback)(
37240
+ const handleMaxSessionTurnsEvent = (0, import_react135.useCallback)(
37215
37241
  () => addItem(
37216
37242
  {
37217
37243
  type: "info",
@@ -37221,7 +37247,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37221
37247
  ),
37222
37248
  [addItem, config]
37223
37249
  );
37224
- const handleSessionTokenLimitExceededEvent = (0, import_react136.useCallback)(
37250
+ const handleSessionTokenLimitExceededEvent = (0, import_react135.useCallback)(
37225
37251
  (value) => addItem(
37226
37252
  {
37227
37253
  type: "error",
@@ -37236,7 +37262,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37236
37262
  ),
37237
37263
  [addItem]
37238
37264
  );
37239
- const handleLoopDetectionConfirmation = (0, import_react136.useCallback)(
37265
+ const handleLoopDetectionConfirmation = (0, import_react135.useCallback)(
37240
37266
  (result) => {
37241
37267
  setLoopDetectionConfirmationRequest(null);
37242
37268
  if (result.userSelection === "disable") {
@@ -37260,12 +37286,12 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37260
37286
  },
37261
37287
  [config, addItem]
37262
37288
  );
37263
- const handleLoopDetectedEvent = (0, import_react136.useCallback)(() => {
37289
+ const handleLoopDetectedEvent = (0, import_react135.useCallback)(() => {
37264
37290
  setLoopDetectionConfirmationRequest({
37265
37291
  onComplete: handleLoopDetectionConfirmation
37266
37292
  });
37267
37293
  }, [handleLoopDetectionConfirmation]);
37268
- const handleUserPromptSubmitBlockedEvent = (0, import_react136.useCallback)(
37294
+ const handleUserPromptSubmitBlockedEvent = (0, import_react135.useCallback)(
37269
37295
  (value, userMessageTimestamp) => {
37270
37296
  if (pendingHistoryItemRef.current) {
37271
37297
  commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
@@ -37282,7 +37308,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37282
37308
  },
37283
37309
  [addItem, commitItem, pendingHistoryItemRef, setPendingHistoryItem]
37284
37310
  );
37285
- const handleStopHookLoopEvent = (0, import_react136.useCallback)(
37311
+ const handleStopHookLoopEvent = (0, import_react135.useCallback)(
37286
37312
  (value, userMessageTimestamp) => {
37287
37313
  if (pendingHistoryItemRef.current) {
37288
37314
  commitItem(pendingHistoryItemRef.current, userMessageTimestamp);
@@ -37316,7 +37342,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37316
37342
  },
37317
37343
  [addItem, commitItem, config, pendingHistoryItemRef, setPendingHistoryItem]
37318
37344
  );
37319
- const handleActiveGoalEvent = (0, import_react136.useCallback)(
37345
+ const handleActiveGoalEvent = (0, import_react135.useCallback)(
37320
37346
  (activeGoal) => {
37321
37347
  const sessionId = config.getSessionId();
37322
37348
  const currentActiveGoal = getActiveGoal(sessionId);
@@ -37334,7 +37360,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37334
37360
  },
37335
37361
  [config]
37336
37362
  );
37337
- const processGeminiStreamEvents = (0, import_react136.useCallback)(
37363
+ const processGeminiStreamEvents = (0, import_react135.useCallback)(
37338
37364
  async (stream, userMessageTimestamp, signal) => {
37339
37365
  let geminiMessageBuffer = "";
37340
37366
  let thoughtBuffer = "";
@@ -37562,6 +37588,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37562
37588
  case "active_goal" /* ActiveGoal */:
37563
37589
  handleActiveGoalEvent(event.value);
37564
37590
  break;
37591
+ case "goal_state" /* GoalState */:
37592
+ break;
37565
37593
  default: {
37566
37594
  const unreachable = event;
37567
37595
  return unreachable;
@@ -37674,7 +37702,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37674
37702
  dualOutput
37675
37703
  ]
37676
37704
  );
37677
- const resolveSteeredMessages = (0, import_react136.useCallback)(
37705
+ const resolveSteeredMessages = (0, import_react135.useCallback)(
37678
37706
  async (messages, signal) => {
37679
37707
  const resolvedSegments = [];
37680
37708
  const resolvedForRecording = [];
@@ -37843,7 +37871,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37843
37871
  onDebugMessage
37844
37872
  ]
37845
37873
  );
37846
- const resolveDrainedSteerMessages = (0, import_react136.useCallback)(
37874
+ const resolveDrainedSteerMessages = (0, import_react135.useCallback)(
37847
37875
  async (messages, signal) => {
37848
37876
  try {
37849
37877
  const resolved = await resolveSteeredMessages(messages, signal);
@@ -37880,7 +37908,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37880
37908
  },
37881
37909
  [midTurnRestoreRef, onDebugMessage, resolveSteeredMessages]
37882
37910
  );
37883
- const drainSteerAtBoundary = (0, import_react136.useCallback)(
37911
+ const drainSteerAtBoundary = (0, import_react135.useCallback)(
37884
37912
  async (signal) => {
37885
37913
  const messages = midTurnDrainRef?.current?.() ?? [];
37886
37914
  if (messages.length === 0) return void 0;
@@ -37888,7 +37916,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
37888
37916
  },
37889
37917
  [midTurnDrainRef, resolveDrainedSteerMessages]
37890
37918
  );
37891
- const submitQuery = (0, import_react136.useCallback)(
37919
+ const submitQuery = (0, import_react135.useCallback)(
37892
37920
  async (query, submitType = "userQuery" /* UserQuery */, prompt_id, metadata) => {
37893
37921
  const allowConcurrentBtwDuringResponse = submitType === "userQuery" /* UserQuery */ && streamingState === "responding" /* Responding */ && typeof query === "string" && isBtwCommand(query);
37894
37922
  const isTurnContinuation = submitType === "toolResult" /* ToolResult */ || submitType === "steer" /* Steer */;
@@ -38015,6 +38043,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38015
38043
  const sendOptions = {
38016
38044
  type: submitType,
38017
38045
  notificationDisplayText: metadata?.notificationDisplayText,
38046
+ todoWorkChainId: metadata?.todoWorkChainId,
38018
38047
  modelOverride: modelOverrideRef.current,
38019
38048
  steerInput: metadata?.steerInput,
38020
38049
  ...submittedPrompt !== void 0 ? { submittedPrompt } : {},
@@ -38179,7 +38208,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38179
38208
  midTurnDrainRef
38180
38209
  ]
38181
38210
  );
38182
- const retryLastPrompt = (0, import_react136.useCallback)(async () => {
38211
+ const retryLastPrompt = (0, import_react135.useCallback)(async () => {
38183
38212
  if (skipRetryDelayRef.current) {
38184
38213
  skipRetryDelayRef.current();
38185
38214
  skipRetryDelayRef.current = null;
@@ -38203,7 +38232,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38203
38232
  clearRetryCountdown();
38204
38233
  await submitQuery(lastPrompt, "retry" /* Retry */);
38205
38234
  }, [streamingState, addItem, clearRetryCountdown, submitQuery]);
38206
- const handleApprovalModeChange = (0, import_react136.useCallback)(
38235
+ const handleApprovalModeChange = (0, import_react135.useCallback)(
38207
38236
  async (newApprovalMode) => {
38208
38237
  if (newApprovalMode === "yolo" /* YOLO */ || newApprovalMode === "auto-edit" /* AUTO_EDIT */) {
38209
38238
  let awaitingApprovalCalls = toolCalls.filter(
@@ -38238,7 +38267,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38238
38267
  },
38239
38268
  [toolCalls]
38240
38269
  );
38241
- const handleCompletedTools = (0, import_react136.useCallback)(
38270
+ const handleCompletedTools = (0, import_react135.useCallback)(
38242
38271
  async (completedToolCallsFromScheduler) => {
38243
38272
  const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter(
38244
38273
  (tc) => {
@@ -38549,7 +38578,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38549
38578
  resolveDrainedSteerMessages
38550
38579
  ]
38551
38580
  );
38552
- const pendingHistoryItems = (0, import_react136.useMemo)(
38581
+ const pendingHistoryItems = (0, import_react135.useMemo)(
38553
38582
  () => [
38554
38583
  // Reasoning renders above the streaming answer.
38555
38584
  pendingThoughtItem,
@@ -38566,7 +38595,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38566
38595
  pendingToolCallGroupDisplay
38567
38596
  ]
38568
38597
  );
38569
- (0, import_react136.useEffect)(() => {
38598
+ (0, import_react135.useEffect)(() => {
38570
38599
  const saveRestorableToolCalls = /* @__PURE__ */ __name(async () => {
38571
38600
  if (!config.getFileCheckpointingEnabled()) {
38572
38601
  return;
@@ -38637,14 +38666,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38637
38666
  }, "saveRestorableToolCalls");
38638
38667
  saveRestorableToolCalls();
38639
38668
  }, [toolCalls, config, onDebugMessage, history, geminiClient, storage]);
38640
- const notificationQueueRef = (0, import_react136.useRef)([]);
38641
- const [notificationTrigger, setNotificationTrigger] = (0, import_react136.useState)(0);
38642
- const getAutonomousLoopTickResolver = (0, import_react136.useCallback)(() => {
38669
+ const notificationQueueRef = (0, import_react135.useRef)([]);
38670
+ const [notificationTrigger, setNotificationTrigger] = (0, import_react135.useState)(0);
38671
+ const getAutonomousLoopTickResolver = (0, import_react135.useCallback)(() => {
38643
38672
  autonomousLoopTickResolverRef.current ??= new AutonomousLoopTickResolver();
38644
38673
  return autonomousLoopTickResolverRef.current;
38645
38674
  }, []);
38646
- const notificationQueueSessionIdRef = (0, import_react136.useRef)(sessionStates.sessionId);
38647
- (0, import_react136.useEffect)(() => {
38675
+ const notificationQueueSessionIdRef = (0, import_react135.useRef)(sessionStates.sessionId);
38676
+ (0, import_react135.useEffect)(() => {
38648
38677
  if (notificationQueueSessionIdRef.current === sessionStates.sessionId) {
38649
38678
  return;
38650
38679
  }
@@ -38652,9 +38681,9 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38652
38681
  notificationQueueRef.current = [];
38653
38682
  autonomousLoopTickResolverRef.current?.resetCache();
38654
38683
  }, [sessionStates.sessionId]);
38655
- const cronSessionIdRef = (0, import_react136.useRef)(sessionStates.sessionId);
38684
+ const cronSessionIdRef = (0, import_react135.useRef)(sessionStates.sessionId);
38656
38685
  cronSessionIdRef.current = sessionStates.sessionId;
38657
- (0, import_react136.useEffect)(() => {
38686
+ (0, import_react135.useEffect)(() => {
38658
38687
  if (!isConfigInitialized) return;
38659
38688
  if (!config.isCronEnabled()) return;
38660
38689
  const scheduler = config.getCronScheduler();
@@ -38684,6 +38713,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38684
38713
  displayText: `${job.missed ? "Missed" : source}: ${label}`,
38685
38714
  modelText,
38686
38715
  sendMessageType: "cron" /* Cron */,
38716
+ todoWorkChainId: job.todoWorkChainId,
38687
38717
  onDelivered: /* @__PURE__ */ __name(() => resolver.markDelivered(), "onDelivered")
38688
38718
  });
38689
38719
  setNotificationTrigger((n) => n + 1);
@@ -38692,7 +38722,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38692
38722
  notificationQueueRef.current.push({
38693
38723
  displayText: `${job.missed ? "Missed" : source}: ${label}`,
38694
38724
  modelText,
38695
- sendMessageType: "cron" /* Cron */
38725
+ sendMessageType: "cron" /* Cron */,
38726
+ todoWorkChainId: job.todoWorkChainId
38696
38727
  });
38697
38728
  setNotificationTrigger((n) => n + 1);
38698
38729
  }
@@ -38707,13 +38738,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38707
38738
  }
38708
38739
  };
38709
38740
  }, [config, getAutonomousLoopTickResolver, isConfigInitialized]);
38710
- (0, import_react136.useEffect)(() => {
38741
+ (0, import_react135.useEffect)(() => {
38711
38742
  const registry = config.getBackgroundTaskRegistry();
38712
- registry.setNotificationCallback((displayText, modelText) => {
38743
+ registry.setNotificationCallback((displayText, modelText, meta) => {
38713
38744
  notificationQueueRef.current.push({
38714
38745
  displayText,
38715
38746
  modelText,
38716
- sendMessageType: "notification" /* Notification */
38747
+ sendMessageType: "notification" /* Notification */,
38748
+ todoWorkChainId: meta?.todoWorkChainId
38717
38749
  });
38718
38750
  setNotificationTrigger((n) => n + 1);
38719
38751
  });
@@ -38721,13 +38753,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38721
38753
  registry.setNotificationCallback(void 0);
38722
38754
  };
38723
38755
  }, [config]);
38724
- (0, import_react136.useEffect)(() => {
38756
+ (0, import_react135.useEffect)(() => {
38725
38757
  const registry = config.getBackgroundShellRegistry();
38726
- registry.setNotificationCallback((displayText, modelText) => {
38758
+ registry.setNotificationCallback((displayText, modelText, meta) => {
38727
38759
  notificationQueueRef.current.push({
38728
38760
  displayText,
38729
38761
  modelText,
38730
- sendMessageType: "notification" /* Notification */
38762
+ sendMessageType: "notification" /* Notification */,
38763
+ todoWorkChainId: meta?.todoWorkChainId
38731
38764
  });
38732
38765
  setNotificationTrigger((n) => n + 1);
38733
38766
  });
@@ -38735,7 +38768,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38735
38768
  registry.setNotificationCallback(void 0);
38736
38769
  };
38737
38770
  }, [config]);
38738
- (0, import_react136.useEffect)(() => {
38771
+ (0, import_react135.useEffect)(() => {
38739
38772
  const registry = config.getMonitorRegistry();
38740
38773
  registry.setNotificationCallback((displayText, modelText, meta) => {
38741
38774
  if (meta.status === "running" && typeof registry.get === "function") {
@@ -38746,7 +38779,8 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38746
38779
  displayText,
38747
38780
  modelText,
38748
38781
  sendMessageType: "notification" /* Notification */,
38749
- monitor: { id: meta.monitorId, status: meta.status }
38782
+ monitor: { id: meta.monitorId, status: meta.status },
38783
+ todoWorkChainId: meta.todoWorkChainId
38750
38784
  });
38751
38785
  setNotificationTrigger((n) => n + 1);
38752
38786
  });
@@ -38754,7 +38788,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38754
38788
  registry.setNotificationCallback(void 0);
38755
38789
  };
38756
38790
  }, [config]);
38757
- (0, import_react136.useEffect)(() => {
38791
+ (0, import_react135.useEffect)(() => {
38758
38792
  if (streamingState === "idle" /* Idle */ && !isSubmittingQueryRef.current && notificationQueueRef.current.length > 0) {
38759
38793
  runOutsideAgentContext(() => {
38760
38794
  const queue = notificationQueueRef.current;
@@ -38777,13 +38811,14 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38777
38811
  );
38778
38812
  submitQuery(item.modelText, item.sendMessageType, void 0, {
38779
38813
  notificationDisplayText: item.displayText,
38814
+ todoWorkChainId: item.todoWorkChainId,
38780
38815
  onDelivered: item.onDelivered,
38781
38816
  onDeliveryFailed: item.onDeliveryFailed
38782
38817
  });
38783
38818
  return;
38784
38819
  }
38785
38820
  let splitIdx = 0;
38786
- while (splitIdx < queue.length && queue[splitIdx].sendMessageType === targetType) {
38821
+ while (splitIdx < queue.length && queue[splitIdx].sendMessageType === targetType && queue[splitIdx].todoWorkChainId === queue[0].todoWorkChainId) {
38787
38822
  splitIdx++;
38788
38823
  }
38789
38824
  const batch = queue.splice(0, splitIdx);
@@ -38797,14 +38832,15 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38797
38832
  const combinedModelText = batch.map((e) => e.modelText).join("\n\n");
38798
38833
  const combinedDisplayText = batch.map((e) => e.displayText).join("; ");
38799
38834
  submitQuery(combinedModelText, targetType, void 0, {
38800
- notificationDisplayText: combinedDisplayText
38835
+ notificationDisplayText: combinedDisplayText,
38836
+ todoWorkChainId: batch[0]?.todoWorkChainId
38801
38837
  });
38802
38838
  });
38803
38839
  }
38804
38840
  }, [streamingState, submitQuery, notificationTrigger, addItem, config]);
38805
- const teammateQueueRef = (0, import_react136.useRef)([]);
38806
- const [teammateTrigger, setTeammateTrigger] = (0, import_react136.useState)(0);
38807
- (0, import_react136.useEffect)(() => {
38841
+ const teammateQueueRef = (0, import_react135.useRef)([]);
38842
+ const [teammateTrigger, setTeammateTrigger] = (0, import_react135.useState)(0);
38843
+ (0, import_react135.useEffect)(() => {
38808
38844
  let boundManager = null;
38809
38845
  const handleManagerChange = /* @__PURE__ */ __name((manager) => {
38810
38846
  if (boundManager && boundManager !== manager) {
@@ -38834,7 +38870,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38834
38870
  }
38835
38871
  };
38836
38872
  }, [config]);
38837
- (0, import_react136.useEffect)(() => {
38873
+ (0, import_react135.useEffect)(() => {
38838
38874
  if (streamingState === "idle" /* Idle */ && !isSubmittingQueryRef.current && teammateQueueRef.current.length > 0) {
38839
38875
  runOutsideAgentContext(() => {
38840
38876
  const batch = teammateQueueRef.current.splice(0);
@@ -38871,7 +38907,7 @@ var useGeminiStream = /* @__PURE__ */ __name((geminiClient, history, addItem, co
38871
38907
 
38872
38908
  // packages/cli/src/ui/hooks/vim.ts
38873
38909
  init_esbuild_shims();
38874
- var import_react137 = __toESM(require_react(), 1);
38910
+ var import_react136 = __toESM(require_react(), 1);
38875
38911
  import { execFile as execFile7, execFileSync as execFileSync2 } from "child_process";
38876
38912
  var DIGIT_MULTIPLIER = 10;
38877
38913
  var DEFAULT_COUNT = 1;
@@ -39107,26 +39143,26 @@ __name(findCharInLineReverse, "findCharInLineReverse");
39107
39143
  function useVim(buffer, onSubmit) {
39108
39144
  const { vimEnabled, vimMode } = useVimModeState();
39109
39145
  const { setVimMode } = useVimModeActions();
39110
- const [state, dispatch] = (0, import_react137.useReducer)(vimReducer, initialVimState);
39111
- const bufferRef = (0, import_react137.useRef)(buffer);
39112
- const stateRef = (0, import_react137.useRef)(state);
39146
+ const [state, dispatch] = (0, import_react136.useReducer)(vimReducer, initialVimState);
39147
+ const bufferRef = (0, import_react136.useRef)(buffer);
39148
+ const stateRef = (0, import_react136.useRef)(state);
39113
39149
  bufferRef.current = buffer;
39114
39150
  stateRef.current = state;
39115
- (0, import_react137.useEffect)(() => {
39151
+ (0, import_react136.useEffect)(() => {
39116
39152
  dispatch({ type: "SET_MODE", mode: vimMode });
39117
39153
  }, [vimMode]);
39118
- const updateMode = (0, import_react137.useCallback)(
39154
+ const updateMode = (0, import_react136.useCallback)(
39119
39155
  (mode) => {
39120
39156
  setVimMode(mode);
39121
39157
  dispatch({ type: "SET_MODE", mode });
39122
39158
  },
39123
39159
  [setVimMode]
39124
39160
  );
39125
- const getCurrentCount = (0, import_react137.useCallback)(
39161
+ const getCurrentCount = (0, import_react136.useCallback)(
39126
39162
  () => stateRef.current.count || DEFAULT_COUNT,
39127
39163
  []
39128
39164
  );
39129
- const yankRange = (0, import_react137.useCallback)(
39165
+ const yankRange = (0, import_react136.useCallback)(
39130
39166
  (startRow, startCol, endRow, endCol, linewise) => {
39131
39167
  const lines = bufferRef.current.lines;
39132
39168
  let text = "";
@@ -39141,7 +39177,7 @@ function useVim(buffer, onSubmit) {
39141
39177
  },
39142
39178
  []
39143
39179
  );
39144
- const executeCommand = (0, import_react137.useCallback)(
39180
+ const executeCommand = (0, import_react136.useCallback)(
39145
39181
  (cmdType, count) => {
39146
39182
  switch (cmdType) {
39147
39183
  case CMD_TYPES.DELETE_WORD_FORWARD:
@@ -39542,7 +39578,7 @@ function useVim(buffer, onSubmit) {
39542
39578
  return { text, linewise: movement === "j" || movement === "k" };
39543
39579
  }
39544
39580
  __name(extractMovementText, "extractMovementText");
39545
- const executeFind = (0, import_react137.useCallback)(
39581
+ const executeFind = (0, import_react136.useCallback)(
39546
39582
  (findType, char, count = 1) => {
39547
39583
  const [startRow, startCol] = buffer.cursor;
39548
39584
  const line = buffer.lines[startRow] ?? "";
@@ -39578,7 +39614,7 @@ function useVim(buffer, onSubmit) {
39578
39614
  },
39579
39615
  [buffer, dispatch]
39580
39616
  );
39581
- const handleCharRead = (0, import_react137.useCallback)(
39617
+ const handleCharRead = (0, import_react136.useCallback)(
39582
39618
  (char) => {
39583
39619
  const readType = state.pendingCharRead;
39584
39620
  if (!readType) return false;
@@ -39621,7 +39657,7 @@ function useVim(buffer, onSubmit) {
39621
39657
  },
39622
39658
  [state.pendingCharRead, buffer, dispatch, executeFind]
39623
39659
  );
39624
- const handleInsertModeInput = (0, import_react137.useCallback)(
39660
+ const handleInsertModeInput = (0, import_react136.useCallback)(
39625
39661
  (normalizedKey) => {
39626
39662
  if (normalizedKey.name === "escape") {
39627
39663
  buffer.vimEscapeInsertMode();
@@ -39652,7 +39688,7 @@ function useVim(buffer, onSubmit) {
39652
39688
  },
39653
39689
  [buffer, dispatch, updateMode, onSubmit]
39654
39690
  );
39655
- const normalizeKey = (0, import_react137.useCallback)(
39691
+ const normalizeKey = (0, import_react136.useCallback)(
39656
39692
  (key) => ({
39657
39693
  name: key.name || "",
39658
39694
  sequence: key.sequence || "",
@@ -39663,7 +39699,7 @@ function useVim(buffer, onSubmit) {
39663
39699
  }),
39664
39700
  []
39665
39701
  );
39666
- const handleChangeMovement = (0, import_react137.useCallback)(
39702
+ const handleChangeMovement = (0, import_react136.useCallback)(
39667
39703
  (movement) => {
39668
39704
  const count = getCurrentCount();
39669
39705
  dispatch({ type: "CLEAR_COUNT" });
@@ -39684,7 +39720,7 @@ function useVim(buffer, onSubmit) {
39684
39720
  },
39685
39721
  [getCurrentCount, dispatch, buffer, updateMode]
39686
39722
  );
39687
- const handleDeleteMovement = (0, import_react137.useCallback)(
39723
+ const handleDeleteMovement = (0, import_react136.useCallback)(
39688
39724
  (movement) => {
39689
39725
  const count = getCurrentCount();
39690
39726
  const [row, col] = bufferRef.current.cursor;
@@ -39719,7 +39755,7 @@ function useVim(buffer, onSubmit) {
39719
39755
  },
39720
39756
  [getCurrentCount, dispatch, buffer]
39721
39757
  );
39722
- const handleYankMovement = (0, import_react137.useCallback)(
39758
+ const handleYankMovement = (0, import_react136.useCallback)(
39723
39759
  (movement) => {
39724
39760
  const count = getCurrentCount();
39725
39761
  const [row, col] = bufferRef.current.cursor;
@@ -39753,7 +39789,7 @@ function useVim(buffer, onSubmit) {
39753
39789
  },
39754
39790
  [getCurrentCount, dispatch]
39755
39791
  );
39756
- const handleOperatorMotion = (0, import_react137.useCallback)(
39792
+ const handleOperatorMotion = (0, import_react136.useCallback)(
39757
39793
  (operator, motion) => {
39758
39794
  const count = getCurrentCount();
39759
39795
  const commandMap = {
@@ -39785,7 +39821,7 @@ function useVim(buffer, onSubmit) {
39785
39821
  },
39786
39822
  [getCurrentCount, executeCommand, dispatch]
39787
39823
  );
39788
- const handleInput = (0, import_react137.useCallback)(
39824
+ const handleInput = (0, import_react136.useCallback)(
39789
39825
  (key) => {
39790
39826
  if (!vimEnabled) {
39791
39827
  return false;
@@ -40507,7 +40543,7 @@ __name(buildWorkflowSteeringNotice, "buildWorkflowSteeringNotice");
40507
40543
 
40508
40544
  // packages/cli/src/ui/hooks/useAwaySummary.ts
40509
40545
  init_esbuild_shims();
40510
- var import_react138 = __toESM(require_react(), 1);
40546
+ var import_react137 = __toESM(require_react(), 1);
40511
40547
  var DEFAULT_AWAY_THRESHOLD_MINUTES = 5;
40512
40548
  var MIN_USER_MESSAGES_TO_FIRE = 3;
40513
40549
  var MIN_USER_MESSAGES_SINCE_LAST_RECAP = 2;
@@ -40539,15 +40575,15 @@ function useAwaySummary(options) {
40539
40575
  history,
40540
40576
  awayThresholdMinutes
40541
40577
  } = options;
40542
- const blurredAtRef = (0, import_react138.useRef)(null);
40543
- const recapPendingRef = (0, import_react138.useRef)(false);
40544
- const inFlightRef = (0, import_react138.useRef)(null);
40545
- const isIdleRef = (0, import_react138.useRef)(isIdle);
40578
+ const blurredAtRef = (0, import_react137.useRef)(null);
40579
+ const recapPendingRef = (0, import_react137.useRef)(false);
40580
+ const inFlightRef = (0, import_react137.useRef)(null);
40581
+ const isIdleRef = (0, import_react137.useRef)(isIdle);
40546
40582
  isIdleRef.current = isIdle;
40547
- const historyRef = (0, import_react138.useRef)(history);
40583
+ const historyRef = (0, import_react137.useRef)(history);
40548
40584
  historyRef.current = history;
40549
40585
  const thresholdMs = (awayThresholdMinutes && awayThresholdMinutes > 0 ? awayThresholdMinutes : DEFAULT_AWAY_THRESHOLD_MINUTES) * 60 * 1e3;
40550
- (0, import_react138.useEffect)(() => {
40586
+ (0, import_react137.useEffect)(() => {
40551
40587
  if (!enabled || !config) {
40552
40588
  inFlightRef.current?.abort();
40553
40589
  inFlightRef.current = null;
@@ -40599,7 +40635,7 @@ function useAwaySummary(options) {
40599
40635
  recapPendingRef.current = false;
40600
40636
  });
40601
40637
  }, [enabled, config, isFocused, isIdle, addItem, thresholdMs]);
40602
- (0, import_react138.useEffect)(
40638
+ (0, import_react137.useEffect)(
40603
40639
  () => () => {
40604
40640
  inFlightRef.current?.abort();
40605
40641
  },
@@ -40610,14 +40646,14 @@ __name(useAwaySummary, "useAwaySummary");
40610
40646
 
40611
40647
  // packages/cli/src/ui/hooks/useBracketedPaste.ts
40612
40648
  init_esbuild_shims();
40613
- var import_react139 = __toESM(require_react(), 1);
40649
+ var import_react138 = __toESM(require_react(), 1);
40614
40650
  var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
40615
40651
  var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
40616
40652
  var useBracketedPaste = /* @__PURE__ */ __name(() => {
40617
40653
  const cleanup = /* @__PURE__ */ __name(() => {
40618
40654
  process.stdout.write(DISABLE_BRACKETED_PASTE);
40619
40655
  }, "cleanup");
40620
- (0, import_react139.useEffect)(() => {
40656
+ (0, import_react138.useEffect)(() => {
40621
40657
  process.stdout.write(ENABLE_BRACKETED_PASTE);
40622
40658
  process.on("exit", cleanup);
40623
40659
  process.on("SIGINT", cleanup);
@@ -40636,23 +40672,23 @@ init_esbuild_shims();
40636
40672
 
40637
40673
  // packages/cli/src/ui/hooks/usePhraseCycler.ts
40638
40674
  init_esbuild_shims();
40639
- var import_react140 = __toESM(require_react(), 1);
40675
+ var import_react139 = __toESM(require_react(), 1);
40640
40676
  var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
40641
40677
  var PHRASE_CHANGE_INTERVAL_MS = 15e3;
40642
40678
  var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
40643
40679
  const currentLanguage = getCurrentLanguage();
40644
- const loadingPhrases = (0, import_react140.useMemo)(() => {
40680
+ const loadingPhrases = (0, import_react139.useMemo)(() => {
40645
40681
  if (customPhrases && customPhrases.length > 0) {
40646
40682
  return customPhrases;
40647
40683
  }
40648
40684
  const translatedPhrases = ta("WITTY_LOADING_PHRASES");
40649
40685
  return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
40650
40686
  }, [customPhrases, currentLanguage]);
40651
- const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react140.useState)(
40687
+ const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react139.useState)(
40652
40688
  loadingPhrases[0]
40653
40689
  );
40654
- const phraseIntervalRef = (0, import_react140.useRef)(null);
40655
- (0, import_react140.useEffect)(() => {
40690
+ const phraseIntervalRef = (0, import_react139.useRef)(null);
40691
+ (0, import_react139.useEffect)(() => {
40656
40692
  if (isWaiting) {
40657
40693
  setCurrentLoadingPhrase(t("Waiting for user confirmation..."));
40658
40694
  if (phraseIntervalRef.current) {
@@ -40689,9 +40725,9 @@ var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases
40689
40725
  }, "usePhraseCycler");
40690
40726
 
40691
40727
  // packages/cli/src/ui/hooks/useLoadingIndicator.ts
40692
- var import_react141 = __toESM(require_react(), 1);
40728
+ var import_react140 = __toESM(require_react(), 1);
40693
40729
  var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhrases, currentCandidatesTokens, currentStreamingChars, isToolExecuting2 = false) => {
40694
- const [timerResetKey, setTimerResetKey] = (0, import_react141.useState)(0);
40730
+ const [timerResetKey, setTimerResetKey] = (0, import_react140.useState)(0);
40695
40731
  const isTimerActive = streamingState === "responding" /* Responding */;
40696
40732
  const elapsedTimeFromTimer = useTimer(
40697
40733
  isTimerActive,
@@ -40705,17 +40741,17 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
40705
40741
  isWaiting,
40706
40742
  customWittyPhrases
40707
40743
  );
40708
- const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react141.useState)(0);
40709
- const [taskStartTokens, setTaskStartTokensState] = (0, import_react141.useState)(0);
40710
- const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0, import_react141.useState)(0);
40711
- const taskStartTokensRef = (0, import_react141.useRef)(0);
40712
- const taskStartStreamingCharsRef = (0, import_react141.useRef)(0);
40713
- const pauseStartTokensRef = (0, import_react141.useRef)(null);
40714
- const pauseStartStreamingCharsRef = (0, import_react141.useRef)(null);
40715
- const pauseBaseTaskStartTokensRef = (0, import_react141.useRef)(0);
40716
- const pauseBaseTaskStartStreamingCharsRef = (0, import_react141.useRef)(0);
40717
- const prevStreamingStateRef = (0, import_react141.useRef)(null);
40718
- (0, import_react141.useEffect)(() => {
40744
+ const [retainedElapsedTime, setRetainedElapsedTime] = (0, import_react140.useState)(0);
40745
+ const [taskStartTokens, setTaskStartTokensState] = (0, import_react140.useState)(0);
40746
+ const [taskStartStreamingChars, setTaskStartStreamingCharsState] = (0, import_react140.useState)(0);
40747
+ const taskStartTokensRef = (0, import_react140.useRef)(0);
40748
+ const taskStartStreamingCharsRef = (0, import_react140.useRef)(0);
40749
+ const pauseStartTokensRef = (0, import_react140.useRef)(null);
40750
+ const pauseStartStreamingCharsRef = (0, import_react140.useRef)(null);
40751
+ const pauseBaseTaskStartTokensRef = (0, import_react140.useRef)(0);
40752
+ const pauseBaseTaskStartStreamingCharsRef = (0, import_react140.useRef)(0);
40753
+ const prevStreamingStateRef = (0, import_react140.useRef)(null);
40754
+ (0, import_react140.useEffect)(() => {
40719
40755
  const currentTokens = currentCandidatesTokens ?? 0;
40720
40756
  const currentChars = currentStreamingChars ?? 0;
40721
40757
  const setTaskStartTokens = /* @__PURE__ */ __name((tokens) => {
@@ -40786,7 +40822,7 @@ var useLoadingIndicator = /* @__PURE__ */ __name((streamingState, customWittyPhr
40786
40822
 
40787
40823
  // packages/cli/src/ui/hooks/useTerminalProgress.ts
40788
40824
  init_esbuild_shims();
40789
- var import_react142 = __toESM(require_react(), 1);
40825
+ var import_react141 = __toESM(require_react(), 1);
40790
40826
  var PROGRESS_CLEAR = wrapForMultiplexer(`${OSC_PREFIX}9;4;0;${BEL}`);
40791
40827
  var PROGRESS_INDETERMINATE = wrapForMultiplexer(`${OSC_PREFIX}9;4;3;;${BEL}`);
40792
40828
  function isProgressBarSupported() {
@@ -40801,13 +40837,13 @@ function isProgressBarSupported() {
40801
40837
  __name(isProgressBarSupported, "isProgressBarSupported");
40802
40838
  function useTerminalProgress(streamingState, hasToolExecuting) {
40803
40839
  const { stdout } = use_stdout_default();
40804
- const writeProgress = (0, import_react142.useCallback)(
40840
+ const writeProgress = (0, import_react141.useCallback)(
40805
40841
  (seq) => {
40806
40842
  stdout?.write(seq);
40807
40843
  },
40808
40844
  [stdout]
40809
40845
  );
40810
- (0, import_react142.useEffect)(() => {
40846
+ (0, import_react141.useEffect)(() => {
40811
40847
  if (!isProgressBarSupported()) return;
40812
40848
  if (streamingState === "responding" /* Responding */ && hasToolExecuting) {
40813
40849
  writeProgress(PROGRESS_INDETERMINATE);
@@ -40818,7 +40854,7 @@ function useTerminalProgress(streamingState, hasToolExecuting) {
40818
40854
  writeProgress(PROGRESS_CLEAR);
40819
40855
  };
40820
40856
  }, [streamingState, hasToolExecuting, writeProgress]);
40821
- (0, import_react142.useEffect)(() => {
40857
+ (0, import_react141.useEffect)(() => {
40822
40858
  if (!isProgressBarSupported()) return;
40823
40859
  const clearOnExit = /* @__PURE__ */ __name(() => {
40824
40860
  stdout?.write(PROGRESS_CLEAR);
@@ -40833,20 +40869,20 @@ __name(useTerminalProgress, "useTerminalProgress");
40833
40869
 
40834
40870
  // packages/cli/src/ui/hooks/useFolderTrust.ts
40835
40871
  init_esbuild_shims();
40836
- var import_react143 = __toESM(require_react(), 1);
40872
+ var import_react142 = __toESM(require_react(), 1);
40837
40873
  import * as process16 from "node:process";
40838
40874
  var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
40839
- const [isTrusted, setIsTrusted] = (0, import_react143.useState)(void 0);
40840
- const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react143.useState)(false);
40841
- const [isRestarting, setIsRestarting] = (0, import_react143.useState)(false);
40875
+ const [isTrusted, setIsTrusted] = (0, import_react142.useState)(void 0);
40876
+ const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react142.useState)(false);
40877
+ const [isRestarting, setIsRestarting] = (0, import_react142.useState)(false);
40842
40878
  const folderTrust = settings.merged.security?.folderTrust?.enabled;
40843
- (0, import_react143.useEffect)(() => {
40879
+ (0, import_react142.useEffect)(() => {
40844
40880
  const { isTrusted: trusted } = isWorkspaceTrusted(settings.merged);
40845
40881
  setIsTrusted(trusted);
40846
40882
  setIsFolderTrustDialogOpen(trusted === void 0);
40847
40883
  onTrustChange(trusted);
40848
40884
  }, [folderTrust, onTrustChange, settings.merged]);
40849
- const handleFolderTrustSelect = (0, import_react143.useCallback)(
40885
+ const handleFolderTrustSelect = (0, import_react142.useCallback)(
40850
40886
  (choice) => {
40851
40887
  const trustedFolders = loadTrustedFolders();
40852
40888
  const cwd3 = process16.cwd();
@@ -40897,7 +40933,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
40897
40933
 
40898
40934
  // packages/cli/src/ui/hooks/useMcpApproval.ts
40899
40935
  init_esbuild_shims();
40900
- var import_react144 = __toESM(require_react(), 1);
40936
+ var import_react143 = __toESM(require_react(), 1);
40901
40937
  function sourceLabel(scope) {
40902
40938
  switch (scope) {
40903
40939
  case "workspace":
@@ -40933,8 +40969,8 @@ function summarize(config) {
40933
40969
  }
40934
40970
  __name(summarize, "summarize");
40935
40971
  var useMcpApproval = /* @__PURE__ */ __name((config) => {
40936
- const [queue, setQueue] = (0, import_react144.useState)([]);
40937
- const computePending = (0, import_react144.useCallback)(() => {
40972
+ const [queue, setQueue] = (0, import_react143.useState)([]);
40973
+ const computePending = (0, import_react143.useCallback)(() => {
40938
40974
  if (config.getApprovalMode() === "yolo" /* YOLO */) return [];
40939
40975
  const servers = config.getMcpServers() ?? {};
40940
40976
  const approvals = loadMcpApprovals();
@@ -40946,10 +40982,10 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
40946
40982
  source: sourceLabel(c.scope)
40947
40983
  }));
40948
40984
  }, [config]);
40949
- (0, import_react144.useEffect)(() => {
40985
+ (0, import_react143.useEffect)(() => {
40950
40986
  setQueue(computePending());
40951
40987
  }, [computePending]);
40952
- (0, import_react144.useEffect)(() => {
40988
+ (0, import_react143.useEffect)(() => {
40953
40989
  const onPendingChanged = /* @__PURE__ */ __name(() => {
40954
40990
  setQueue(computePending());
40955
40991
  }, "onPendingChanged");
@@ -40958,7 +40994,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
40958
40994
  appEvents.off("mcp-pending-approval-changed" /* McpPendingApprovalChanged */, onPendingChanged);
40959
40995
  };
40960
40996
  }, [computePending]);
40961
- const reconnect = (0, import_react144.useCallback)(
40997
+ const reconnect = (0, import_react143.useCallback)(
40962
40998
  (name) => {
40963
40999
  config.approveMcpServerForSession(name);
40964
41000
  const registry = config.getToolRegistry();
@@ -40970,7 +41006,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
40970
41006
  },
40971
41007
  [config]
40972
41008
  );
40973
- const handleMcpApprovalSelect = (0, import_react144.useCallback)(
41009
+ const handleMcpApprovalSelect = (0, import_react143.useCallback)(
40974
41010
  async (choice) => {
40975
41011
  const approvals = loadMcpApprovals();
40976
41012
  const root = config.getWorkingDir();
@@ -41022,7 +41058,7 @@ var useMcpApproval = /* @__PURE__ */ __name((config) => {
41022
41058
 
41023
41059
  // packages/cli/src/ui/hooks/useCommandMigration.ts
41024
41060
  init_esbuild_shims();
41025
- var import_react145 = __toESM(require_react(), 1);
41061
+ var import_react144 = __toESM(require_react(), 1);
41026
41062
 
41027
41063
  // packages/cli/src/services/command-migration-tool.ts
41028
41064
  init_esbuild_shims();
@@ -41093,9 +41129,9 @@ __name(migrateTomlCommands, "migrateTomlCommands");
41093
41129
 
41094
41130
  // packages/cli/src/ui/hooks/useCommandMigration.ts
41095
41131
  function useCommandMigration(settings, storage) {
41096
- const [showMigrationNudge, setShowMigrationNudge] = (0, import_react145.useState)(false);
41097
- const [tomlFiles, setTomlFiles] = (0, import_react145.useState)([]);
41098
- (0, import_react145.useEffect)(() => {
41132
+ const [showMigrationNudge, setShowMigrationNudge] = (0, import_react144.useState)(false);
41133
+ const [tomlFiles, setTomlFiles] = (0, import_react144.useState)([]);
41134
+ (0, import_react144.useEffect)(() => {
41099
41135
  let cancelled = false;
41100
41136
  const checkTomlCommands = /* @__PURE__ */ __name(async () => {
41101
41137
  const allFiles = [];
@@ -41163,13 +41199,13 @@ __name(sendNotification, "sendNotification");
41163
41199
 
41164
41200
  // packages/cli/src/ui/hooks/useGitBranchName.ts
41165
41201
  init_esbuild_shims();
41166
- var import_react146 = __toESM(require_react(), 1);
41202
+ var import_react145 = __toESM(require_react(), 1);
41167
41203
  var BRANCH_POLL_INTERVAL_MS = 5e3;
41168
41204
  function useGitBranchName(cwd3) {
41169
- const [branchName, setBranchName] = (0, import_react146.useState)(void 0);
41170
- const branchNameRef = (0, import_react146.useRef)(branchName);
41205
+ const [branchName, setBranchName] = (0, import_react145.useState)(void 0);
41206
+ const branchNameRef = (0, import_react145.useRef)(branchName);
41171
41207
  branchNameRef.current = branchName;
41172
- (0, import_react146.useEffect)(() => {
41208
+ (0, import_react145.useEffect)(() => {
41173
41209
  let cancelled = false;
41174
41210
  let dispose;
41175
41211
  let pollTimer;
@@ -41215,13 +41251,13 @@ __name(useGitBranchName, "useGitBranchName");
41215
41251
 
41216
41252
  // packages/cli/src/ui/hooks/useWorktreeSession.ts
41217
41253
  init_esbuild_shims();
41218
- var import_react147 = __toESM(require_react(), 1);
41254
+ var import_react146 = __toESM(require_react(), 1);
41219
41255
  import fs19 from "node:fs";
41220
41256
  import fsPromises from "node:fs/promises";
41221
41257
  import path14 from "node:path";
41222
41258
  function useWorktreeSession(config) {
41223
- const [session, setSession] = (0, import_react147.useState)(null);
41224
- (0, import_react147.useEffect)(() => {
41259
+ const [session, setSession] = (0, import_react146.useState)(null);
41260
+ (0, import_react146.useEffect)(() => {
41225
41261
  let cancelled = false;
41226
41262
  const safeLoad = /* @__PURE__ */ __name(async () => {
41227
41263
  try {
@@ -41261,7 +41297,7 @@ __name(useWorktreeSession, "useWorktreeSession");
41261
41297
 
41262
41298
  // packages/cli/src/ui/hooks/useExtensionUpdates.ts
41263
41299
  init_esbuild_shims();
41264
- var import_react148 = __toESM(require_react(), 1);
41300
+ var import_react147 = __toESM(require_react(), 1);
41265
41301
  function confirmationRequestsReducer(state, action) {
41266
41302
  switch (action.type) {
41267
41303
  case "add":
@@ -41278,8 +41314,8 @@ var useConfirmUpdateRequests = /* @__PURE__ */ __name(() => {
41278
41314
  const [
41279
41315
  confirmUpdateExtensionRequests,
41280
41316
  dispatchConfirmUpdateExtensionRequests
41281
- ] = (0, import_react148.useReducer)(confirmationRequestsReducer, []);
41282
- const addConfirmUpdateExtensionRequest = (0, import_react148.useCallback)(
41317
+ ] = (0, import_react147.useReducer)(confirmationRequestsReducer, []);
41318
+ const addConfirmUpdateExtensionRequest = (0, import_react147.useCallback)(
41283
41319
  (original) => {
41284
41320
  const wrappedRequest = {
41285
41321
  prompt: original.prompt,
@@ -41317,11 +41353,11 @@ function settingInputRequestsReducer(state, action) {
41317
41353
  }
41318
41354
  __name(settingInputRequestsReducer, "settingInputRequestsReducer");
41319
41355
  var useSettingInputRequests = /* @__PURE__ */ __name(() => {
41320
- const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react148.useReducer)(
41356
+ const [settingInputRequests, dispatchSettingInputRequests] = (0, import_react147.useReducer)(
41321
41357
  settingInputRequestsReducer,
41322
41358
  []
41323
41359
  );
41324
- const addSettingInputRequest = (0, import_react148.useCallback)(
41360
+ const addSettingInputRequest = (0, import_react147.useCallback)(
41325
41361
  (original) => {
41326
41362
  const wrappedRequest = {
41327
41363
  settingName: original.settingName,
@@ -41368,11 +41404,11 @@ function pluginChoiceRequestsReducer(state, action) {
41368
41404
  }
41369
41405
  __name(pluginChoiceRequestsReducer, "pluginChoiceRequestsReducer");
41370
41406
  var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
41371
- const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react148.useReducer)(
41407
+ const [pluginChoiceRequests, dispatchPluginChoiceRequests] = (0, import_react147.useReducer)(
41372
41408
  pluginChoiceRequestsReducer,
41373
41409
  []
41374
41410
  );
41375
- const addPluginChoiceRequest = (0, import_react148.useCallback)(
41411
+ const addPluginChoiceRequest = (0, import_react147.useCallback)(
41376
41412
  (original) => {
41377
41413
  const wrappedRequest = {
41378
41414
  marketplaceName: original.marketplaceName,
@@ -41406,12 +41442,12 @@ var usePluginChoiceRequests = /* @__PURE__ */ __name(() => {
41406
41442
  };
41407
41443
  }, "usePluginChoiceRequests");
41408
41444
  var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd3) => {
41409
- const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react148.useReducer)(
41445
+ const [extensionsUpdateState, dispatchExtensionStateUpdate] = (0, import_react147.useReducer)(
41410
41446
  extensionUpdatesReducer,
41411
41447
  initialExtensionUpdatesState
41412
41448
  );
41413
41449
  const extensions = extensionManager.getLoadedExtensions();
41414
- (0, import_react148.useEffect)(() => {
41450
+ (0, import_react147.useEffect)(() => {
41415
41451
  (async () => {
41416
41452
  const extensionsToCheck = extensions.filter((extension) => {
41417
41453
  const currentStatus = extensionsUpdateState.extensionStatuses.get(
@@ -41439,7 +41475,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
41439
41475
  extensionsUpdateState.extensionStatuses,
41440
41476
  dispatchExtensionStateUpdate
41441
41477
  ]);
41442
- (0, import_react148.useEffect)(() => {
41478
+ (0, import_react147.useEffect)(() => {
41443
41479
  if (extensionsUpdateState.batchChecksInProgress > 0) {
41444
41480
  return;
41445
41481
  }
@@ -41508,7 +41544,7 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
41508
41544
  );
41509
41545
  }
41510
41546
  }, [extensions, extensionManager, extensionsUpdateState, addItem, cwd3]);
41511
- const extensionsUpdateStateComputed = (0, import_react148.useMemo)(() => {
41547
+ const extensionsUpdateStateComputed = (0, import_react147.useMemo)(() => {
41512
41548
  const result = /* @__PURE__ */ new Map();
41513
41549
  for (const [
41514
41550
  key,
@@ -41525,194 +41561,16 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
41525
41561
  };
41526
41562
  }, "useExtensionUpdates");
41527
41563
 
41528
- // packages/cli/src/ui/components/TranscriptView.tsx
41529
- init_esbuild_shims();
41530
- var import_react151 = __toESM(require_react(), 1);
41531
-
41532
- // packages/cli/src/ui/components/AlternateScreen.tsx
41533
- init_esbuild_shims();
41534
- var import_react149 = __toESM(require_react(), 1);
41535
- var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
41536
- var ENTER_ALT_SCREEN = "\x1B[?1049h";
41537
- var EXIT_ALT_SCREEN = "\x1B[?1049l";
41538
- var CLEAR_SCREEN = "\x1B[2J\x1B[H";
41539
- var HIDE_CURSOR = "\x1B[?25l";
41540
- var SHOW_CURSOR = "\x1B[?25h";
41541
- var AlternateScreen = /* @__PURE__ */ __name(({
41542
- children,
41543
- disabled
41544
- }) => {
41545
- const writeRaw = useTerminalOutput();
41546
- const { rows } = useTerminalSize();
41547
- (0, import_react149.useEffect)(() => {
41548
- if (disabled || !process.stdout.isTTY) return;
41549
- const safeWrite = /* @__PURE__ */ __name((data) => {
41550
- try {
41551
- writeRaw(data);
41552
- } catch {
41553
- }
41554
- }, "safeWrite");
41555
- safeWrite(ENTER_ALT_SCREEN + CLEAR_SCREEN + HIDE_CURSOR);
41556
- const onExit = /* @__PURE__ */ __name(() => safeWrite(SHOW_CURSOR + EXIT_ALT_SCREEN), "onExit");
41557
- process.on("exit", onExit);
41558
- return () => {
41559
- process.removeListener("exit", onExit);
41560
- safeWrite(SHOW_CURSOR + EXIT_ALT_SCREEN);
41561
- };
41562
- }, [writeRaw, disabled]);
41563
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Box_default, { flexDirection: "column", height: rows, children });
41564
- }, "AlternateScreen");
41565
-
41566
- // packages/cli/src/ui/components/shared/ErrorBoundary.tsx
41567
- init_esbuild_shims();
41568
- var import_react150 = __toESM(require_react(), 1);
41569
- var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
41570
- function normalizeError(error) {
41571
- if (error instanceof Error) {
41572
- return error;
41573
- }
41574
- return new Error(String(error));
41575
- }
41576
- __name(normalizeError, "normalizeError");
41577
- var ErrorBoundary = class extends import_react150.Component {
41578
- static {
41579
- __name(this, "ErrorBoundary");
41580
- }
41581
- state = { error: null };
41582
- static getDerivedStateFromError(error) {
41583
- return { error: normalizeError(error) };
41584
- }
41585
- componentDidCatch(error, info) {
41586
- this.props.onError?.(normalizeError(error), info);
41587
- }
41588
- reset = /* @__PURE__ */ __name(() => {
41589
- this.setState({ error: null });
41590
- }, "reset");
41591
- render() {
41592
- const { error } = this.state;
41593
- if (error) {
41594
- if (this.props.fallback) {
41595
- return this.props.fallback(error, this.reset);
41596
- }
41597
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Box_default, { flexDirection: "column", children: [
41598
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Text, { color: theme.status.error, bold: true, children: "Something went wrong while rendering." }),
41599
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Text, { color: theme.text.secondary, children: sanitizeTerminalText(error.message) })
41600
- ] });
41601
- }
41602
- return this.props.children;
41603
- }
41604
- };
41605
-
41606
- // packages/cli/src/ui/components/TranscriptView.tsx
41607
- var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
41608
- var debugLogger39 = createDebugLogger("TRANSCRIPT_VIEW");
41609
- function estimateTranscriptItemHeight(item) {
41610
- switch (item.type) {
41611
- case "gemini_thought":
41612
- case "gemini_thought_content":
41613
- return 12;
41614
- case "tool_group":
41615
- return 16;
41616
- case "gemini":
41617
- case "gemini_content":
41618
- return 8;
41619
- case "user":
41620
- case "user_shell":
41621
- return 2;
41622
- default:
41623
- return 4;
41624
- }
41625
- }
41626
- __name(estimateTranscriptItemHeight, "estimateTranscriptItemHeight");
41627
- var keyExtractor = /* @__PURE__ */ __name((item) => item.id >= 0 ? `t-${item.id}` : `tp-${-item.id - 1}`, "keyExtractor");
41628
- var TranscriptViewImpl = /* @__PURE__ */ __name(({
41629
- items,
41630
- useAlternateScreen = true
41631
- }) => {
41632
- const { rows, columns } = useTerminalSize();
41633
- const headerHeight = 1;
41634
- const footerHeight = 1;
41635
- const contentHeight = Math.max(rows - headerHeight - footerHeight, 1);
41636
- const estimatedItemHeight = (0, import_react151.useCallback)(
41637
- (index) => estimateTranscriptItemHeight(items[index]),
41638
- [items]
41639
- );
41640
- const renderItem = (0, import_react151.useCallback)(
41641
- ({ item }) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
41642
- HistoryItemDisplay,
41643
- {
41644
- item,
41645
- isPending: false,
41646
- terminalWidth: columns,
41647
- fullDetail: true
41648
- }
41649
- ),
41650
- [columns]
41651
- );
41652
- const title = t("Transcript");
41653
- const content = (0, import_react151.useMemo)(
41654
- () => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
41655
- ScrollableListWithForwardRef,
41656
- {
41657
- hasFocus: true,
41658
- data: items,
41659
- renderItem,
41660
- estimatedItemHeight,
41661
- keyExtractor,
41662
- initialScrollIndex: SCROLL_TO_ITEM_END,
41663
- containerHeight: contentHeight
41664
- }
41665
- ) }),
41666
- [items, renderItem, estimatedItemHeight, contentHeight]
41667
- );
41668
- const errorFallback = (0, import_react151.useCallback)(
41669
- (error) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
41670
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.status.error, bold: true, children: t("Failed to render transcript.") }),
41671
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.text.secondary, children: sanitizeTerminalText(error.message) }),
41672
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Text, { dimColor: true, italic: true, children: [
41673
- "Esc/q ",
41674
- t("to close")
41675
- ] })
41676
- ] }),
41677
- []
41678
- );
41679
- const onRenderError = (0, import_react151.useCallback)((error, info) => {
41680
- debugLogger39.error(
41681
- `render error: ${error.message}`,
41682
- info.componentStack ?? ""
41683
- );
41684
- }, []);
41685
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(AlternateScreen, { disabled: !useAlternateScreen, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Box_default, { flexDirection: "column", height: rows, width: columns, children: [
41686
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Text, { color: theme.text.accent, bold: true, children: title }) }),
41687
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { flexDirection: "column", flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ErrorBoundary, { fallback: errorFallback, onError: onRenderError, children: content }) }),
41688
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Box_default, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(Text, { dimColor: true, italic: true, children: [
41689
- "Esc/q ",
41690
- t("to close"),
41691
- " ",
41692
- " ",
41693
- "Shift+\u2191\u2193 ",
41694
- t("to scroll"),
41695
- " ",
41696
- " ",
41697
- "PgUp/PgDn",
41698
- " ",
41699
- "Ctrl+Home/End"
41700
- ] }) })
41701
- ] }) });
41702
- }, "TranscriptViewImpl");
41703
- var TranscriptView = (0, import_react151.memo)(TranscriptViewImpl);
41704
- TranscriptView.displayName = "TranscriptView";
41705
-
41706
41564
  // packages/cli/src/ui/hooks/useWelcomeBack.ts
41707
41565
  init_esbuild_shims();
41708
- var import_react152 = __toESM(require_react(), 1);
41566
+ var import_react148 = __toESM(require_react(), 1);
41709
41567
  function useWelcomeBack(config, submitQuery, buffer, settings) {
41710
- const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react152.useState)(null);
41711
- const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react152.useState)(false);
41712
- const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react152.useState)(null);
41713
- const [shouldFillInput, setShouldFillInput] = (0, import_react152.useState)(false);
41714
- const [inputFillText, setInputFillText] = (0, import_react152.useState)(null);
41715
- const checkWelcomeBack = (0, import_react152.useCallback)(async () => {
41568
+ const [welcomeBackInfo, setWelcomeBackInfo] = (0, import_react148.useState)(null);
41569
+ const [showWelcomeBackDialog, setShowWelcomeBackDialog] = (0, import_react148.useState)(false);
41570
+ const [welcomeBackChoice, setWelcomeBackChoice] = (0, import_react148.useState)(null);
41571
+ const [shouldFillInput, setShouldFillInput] = (0, import_react148.useState)(false);
41572
+ const [inputFillText, setInputFillText] = (0, import_react148.useState)(null);
41573
+ const checkWelcomeBack = (0, import_react148.useCallback)(async () => {
41716
41574
  if (settings.ui?.enableWelcomeBack === false) {
41717
41575
  return;
41718
41576
  }
@@ -41731,7 +41589,7 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
41731
41589
  config.getDebugLogger().debug("Welcome back check failed:", error);
41732
41590
  }
41733
41591
  }, [config, settings.ui?.enableWelcomeBack]);
41734
- const handleWelcomeBackSelection = (0, import_react152.useCallback)(
41592
+ const handleWelcomeBackSelection = (0, import_react148.useCallback)(
41735
41593
  (choice) => {
41736
41594
  setWelcomeBackChoice(choice);
41737
41595
  setShowWelcomeBackDialog(false);
@@ -41755,21 +41613,21 @@ function useWelcomeBack(config, submitQuery, buffer, settings) {
41755
41613
  },
41756
41614
  [config, welcomeBackInfo]
41757
41615
  );
41758
- const handleWelcomeBackClose = (0, import_react152.useCallback)(() => {
41616
+ const handleWelcomeBackClose = (0, import_react148.useCallback)(() => {
41759
41617
  setWelcomeBackChoice("restart");
41760
41618
  setShowWelcomeBackDialog(false);
41761
41619
  }, []);
41762
- const clearInputFill = (0, import_react152.useCallback)(() => {
41620
+ const clearInputFill = (0, import_react148.useCallback)(() => {
41763
41621
  setShouldFillInput(false);
41764
41622
  setInputFillText(null);
41765
41623
  }, []);
41766
- (0, import_react152.useEffect)(() => {
41624
+ (0, import_react148.useEffect)(() => {
41767
41625
  if (shouldFillInput && inputFillText) {
41768
41626
  buffer.setText(inputFillText);
41769
41627
  clearInputFill();
41770
41628
  }
41771
41629
  }, [shouldFillInput, inputFillText, buffer, clearInputFill]);
41772
- (0, import_react152.useEffect)(() => {
41630
+ (0, import_react148.useEffect)(() => {
41773
41631
  checkWelcomeBack();
41774
41632
  }, [checkWelcomeBack]);
41775
41633
  return {
@@ -41790,9 +41648,9 @@ __name(useWelcomeBack, "useWelcomeBack");
41790
41648
 
41791
41649
  // packages/cli/src/ui/hooks/useDialogClose.ts
41792
41650
  init_esbuild_shims();
41793
- var import_react153 = __toESM(require_react(), 1);
41651
+ var import_react149 = __toESM(require_react(), 1);
41794
41652
  function useDialogClose(options) {
41795
- const closeAnyOpenDialog = (0, import_react153.useCallback)(() => {
41653
+ const closeAnyOpenDialog = (0, import_react149.useCallback)(() => {
41796
41654
  if (options.isThemeDialogOpen) {
41797
41655
  options.handleThemeSelect(void 0, "User" /* User */);
41798
41656
  return true;
@@ -41864,14 +41722,14 @@ __name(useDialogClose, "useDialogClose");
41864
41722
 
41865
41723
  // packages/cli/src/ui/hooks/useInitializationAuthError.ts
41866
41724
  init_esbuild_shims();
41867
- var import_react154 = __toESM(require_react(), 1);
41725
+ var import_react150 = __toESM(require_react(), 1);
41868
41726
  var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError) => {
41869
- const hasHandled = (0, import_react154.useRef)(false);
41870
- const authErrorRef = (0, import_react154.useRef)(authError);
41871
- const onAuthErrorRef = (0, import_react154.useRef)(onAuthError);
41727
+ const hasHandled = (0, import_react150.useRef)(false);
41728
+ const authErrorRef = (0, import_react150.useRef)(authError);
41729
+ const onAuthErrorRef = (0, import_react150.useRef)(onAuthError);
41872
41730
  authErrorRef.current = authError;
41873
41731
  onAuthErrorRef.current = onAuthError;
41874
- (0, import_react154.useEffect)(() => {
41732
+ (0, import_react150.useEffect)(() => {
41875
41733
  if (hasHandled.current) {
41876
41734
  return;
41877
41735
  }
@@ -41884,13 +41742,13 @@ var useInitializationAuthError = /* @__PURE__ */ __name((authError, onAuthError)
41884
41742
 
41885
41743
  // packages/cli/src/ui/hooks/useSubagentCreateDialog.ts
41886
41744
  init_esbuild_shims();
41887
- var import_react155 = __toESM(require_react(), 1);
41745
+ var import_react151 = __toESM(require_react(), 1);
41888
41746
  function useSubagentCreateDialog() {
41889
- const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react155.useState)(false);
41890
- const openSubagentCreateDialog = (0, import_react155.useCallback)(() => {
41747
+ const [isSubagentCreateDialogOpen, setIsSubagentCreateDialogOpen] = (0, import_react151.useState)(false);
41748
+ const openSubagentCreateDialog = (0, import_react151.useCallback)(() => {
41891
41749
  setIsSubagentCreateDialogOpen(true);
41892
41750
  }, []);
41893
- const closeSubagentCreateDialog = (0, import_react155.useCallback)(() => {
41751
+ const closeSubagentCreateDialog = (0, import_react151.useCallback)(() => {
41894
41752
  setIsSubagentCreateDialogOpen(false);
41895
41753
  }, []);
41896
41754
  return {
@@ -41903,13 +41761,13 @@ __name(useSubagentCreateDialog, "useSubagentCreateDialog");
41903
41761
 
41904
41762
  // packages/cli/src/ui/hooks/useAgentsManagerDialog.ts
41905
41763
  init_esbuild_shims();
41906
- var import_react156 = __toESM(require_react(), 1);
41764
+ var import_react152 = __toESM(require_react(), 1);
41907
41765
  var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
41908
- const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react156.useState)(false);
41909
- const openAgentsManagerDialog = (0, import_react156.useCallback)(() => {
41766
+ const [isAgentsManagerDialogOpen, setIsAgentsManagerDialogOpen] = (0, import_react152.useState)(false);
41767
+ const openAgentsManagerDialog = (0, import_react152.useCallback)(() => {
41910
41768
  setIsAgentsManagerDialogOpen(true);
41911
41769
  }, []);
41912
- const closeAgentsManagerDialog = (0, import_react156.useCallback)(() => {
41770
+ const closeAgentsManagerDialog = (0, import_react152.useCallback)(() => {
41913
41771
  setIsAgentsManagerDialogOpen(false);
41914
41772
  }, []);
41915
41773
  return {
@@ -41921,13 +41779,13 @@ var useAgentsManagerDialog = /* @__PURE__ */ __name(() => {
41921
41779
 
41922
41780
  // packages/cli/src/ui/hooks/useSkillsManagerDialog.ts
41923
41781
  init_esbuild_shims();
41924
- var import_react157 = __toESM(require_react(), 1);
41782
+ var import_react153 = __toESM(require_react(), 1);
41925
41783
  var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
41926
- const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0, import_react157.useState)(false);
41927
- const openSkillsManagerDialog = (0, import_react157.useCallback)(() => {
41784
+ const [isSkillsManagerDialogOpen, setIsSkillsManagerDialogOpen] = (0, import_react153.useState)(false);
41785
+ const openSkillsManagerDialog = (0, import_react153.useCallback)(() => {
41928
41786
  setIsSkillsManagerDialogOpen(true);
41929
41787
  }, []);
41930
- const closeSkillsManagerDialog = (0, import_react157.useCallback)(() => {
41788
+ const closeSkillsManagerDialog = (0, import_react153.useCallback)(() => {
41931
41789
  setIsSkillsManagerDialogOpen(false);
41932
41790
  }, []);
41933
41791
  return {
@@ -41939,13 +41797,13 @@ var useSkillsManagerDialog = /* @__PURE__ */ __name(() => {
41939
41797
 
41940
41798
  // packages/cli/src/ui/hooks/useExtensionsManagerDialog.ts
41941
41799
  init_esbuild_shims();
41942
- var import_react158 = __toESM(require_react(), 1);
41800
+ var import_react154 = __toESM(require_react(), 1);
41943
41801
  var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
41944
- const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react158.useState)(false);
41945
- const openExtensionsManagerDialog = (0, import_react158.useCallback)(() => {
41802
+ const [isExtensionsManagerDialogOpen, setIsExtensionsManagerDialogOpen] = (0, import_react154.useState)(false);
41803
+ const openExtensionsManagerDialog = (0, import_react154.useCallback)(() => {
41946
41804
  setIsExtensionsManagerDialogOpen(true);
41947
41805
  }, []);
41948
- const closeExtensionsManagerDialog = (0, import_react158.useCallback)(() => {
41806
+ const closeExtensionsManagerDialog = (0, import_react154.useCallback)(() => {
41949
41807
  setIsExtensionsManagerDialogOpen(false);
41950
41808
  }, []);
41951
41809
  return {
@@ -41957,13 +41815,13 @@ var useExtensionsManagerDialog = /* @__PURE__ */ __name(() => {
41957
41815
 
41958
41816
  // packages/cli/src/ui/hooks/useMcpDialog.ts
41959
41817
  init_esbuild_shims();
41960
- var import_react159 = __toESM(require_react(), 1);
41818
+ var import_react155 = __toESM(require_react(), 1);
41961
41819
  var useMcpDialog = /* @__PURE__ */ __name(() => {
41962
- const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react159.useState)(false);
41963
- const openMcpDialog = (0, import_react159.useCallback)(() => {
41820
+ const [isMcpDialogOpen, setIsMcpDialogOpen] = (0, import_react155.useState)(false);
41821
+ const openMcpDialog = (0, import_react155.useCallback)(() => {
41964
41822
  setIsMcpDialogOpen(true);
41965
41823
  }, []);
41966
- const closeMcpDialog = (0, import_react159.useCallback)(() => {
41824
+ const closeMcpDialog = (0, import_react155.useCallback)(() => {
41967
41825
  setIsMcpDialogOpen(false);
41968
41826
  }, []);
41969
41827
  return {
@@ -41975,13 +41833,13 @@ var useMcpDialog = /* @__PURE__ */ __name(() => {
41975
41833
 
41976
41834
  // packages/cli/src/ui/hooks/useHooksDialog.ts
41977
41835
  init_esbuild_shims();
41978
- var import_react160 = __toESM(require_react(), 1);
41836
+ var import_react156 = __toESM(require_react(), 1);
41979
41837
  var useHooksDialog = /* @__PURE__ */ __name(() => {
41980
- const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react160.useState)(false);
41981
- const openHooksDialog = (0, import_react160.useCallback)(() => {
41838
+ const [isHooksDialogOpen, setIsHooksDialogOpen] = (0, import_react156.useState)(false);
41839
+ const openHooksDialog = (0, import_react156.useCallback)(() => {
41982
41840
  setIsHooksDialogOpen(true);
41983
41841
  }, []);
41984
- const closeHooksDialog = (0, import_react160.useCallback)(() => {
41842
+ const closeHooksDialog = (0, import_react156.useCallback)(() => {
41985
41843
  setIsHooksDialogOpen(false);
41986
41844
  }, []);
41987
41845
  return {
@@ -41993,23 +41851,23 @@ var useHooksDialog = /* @__PURE__ */ __name(() => {
41993
41851
 
41994
41852
  // packages/cli/src/ui/hooks/useStatsDialog.ts
41995
41853
  init_esbuild_shims();
41996
- var import_react161 = __toESM(require_react(), 1);
41854
+ var import_react157 = __toESM(require_react(), 1);
41997
41855
  var useStatsDialog = /* @__PURE__ */ __name(() => {
41998
- const [isStatsDialogOpen, setIsStatsDialogOpen] = (0, import_react161.useState)(false);
41999
- const openStatsDialog = (0, import_react161.useCallback)(() => setIsStatsDialogOpen(true), []);
42000
- const closeStatsDialog = (0, import_react161.useCallback)(() => setIsStatsDialogOpen(false), []);
41856
+ const [isStatsDialogOpen, setIsStatsDialogOpen] = (0, import_react157.useState)(false);
41857
+ const openStatsDialog = (0, import_react157.useCallback)(() => setIsStatsDialogOpen(true), []);
41858
+ const closeStatsDialog = (0, import_react157.useCallback)(() => setIsStatsDialogOpen(false), []);
42001
41859
  return { isStatsDialogOpen, openStatsDialog, closeStatsDialog };
42002
41860
  }, "useStatsDialog");
42003
41861
 
42004
41862
  // packages/cli/src/ui/hooks/useMemoryDialog.ts
42005
41863
  init_esbuild_shims();
42006
- var import_react162 = __toESM(require_react(), 1);
41864
+ var import_react158 = __toESM(require_react(), 1);
42007
41865
  var useMemoryDialog = /* @__PURE__ */ __name(() => {
42008
- const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0, import_react162.useState)(false);
42009
- const openMemoryDialog = (0, import_react162.useCallback)(() => {
41866
+ const [isMemoryDialogOpen, setIsMemoryDialogOpen] = (0, import_react158.useState)(false);
41867
+ const openMemoryDialog = (0, import_react158.useCallback)(() => {
42010
41868
  setIsMemoryDialogOpen(true);
42011
41869
  }, []);
42012
- const closeMemoryDialog = (0, import_react162.useCallback)(() => {
41870
+ const closeMemoryDialog = (0, import_react158.useCallback)(() => {
42013
41871
  setIsMemoryDialogOpen(false);
42014
41872
  }, []);
42015
41873
  return {
@@ -42021,7 +41879,7 @@ var useMemoryDialog = /* @__PURE__ */ __name(() => {
42021
41879
 
42022
41880
  // packages/cli/src/ui/hooks/useAttentionNotifications.ts
42023
41881
  init_esbuild_shims();
42024
- var import_react163 = __toESM(require_react(), 1);
41882
+ var import_react159 = __toESM(require_react(), 1);
42025
41883
  var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
42026
41884
  var NOTIFICATION_TITLE = "Qwen Code";
42027
41885
  var useAttentionNotifications = /* @__PURE__ */ __name(({
@@ -42036,16 +41894,16 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
42036
41894
  const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
42037
41895
  const notificationMode = settings?.merged?.general?.notificationMode === "task-complete" ? "task-complete" : "all";
42038
41896
  const approvalNotificationsEnabled = notificationMode === "all";
42039
- const awaitingNotificationSentRef = (0, import_react163.useRef)(false);
42040
- const respondingElapsedRef = (0, import_react163.useRef)(0);
42041
- const idleNotificationSentRef = (0, import_react163.useRef)(false);
42042
- const awaitingToolName = (0, import_react163.useMemo)(() => {
41897
+ const awaitingNotificationSentRef = (0, import_react159.useRef)(false);
41898
+ const respondingElapsedRef = (0, import_react159.useRef)(0);
41899
+ const idleNotificationSentRef = (0, import_react159.useRef)(false);
41900
+ const awaitingToolName = (0, import_react159.useMemo)(() => {
42043
41901
  const awaitingTool = pendingToolCalls?.find(
42044
41902
  (tc) => tc.status === "awaiting_approval"
42045
41903
  );
42046
41904
  return awaitingTool?.request.name;
42047
41905
  }, [pendingToolCalls]);
42048
- (0, import_react163.useEffect)(() => {
41906
+ (0, import_react159.useEffect)(() => {
42049
41907
  if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current && terminalBellEnabled && approvalNotificationsEnabled) {
42050
41908
  const message = awaitingToolName ? `Qwen Code needs your permission to use ${awaitingToolName}` : "Qwen Code is waiting for your input";
42051
41909
  sendNotification(
@@ -42066,7 +41924,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
42066
41924
  terminal,
42067
41925
  awaitingToolName
42068
41926
  ]);
42069
- (0, import_react163.useEffect)(() => {
41927
+ (0, import_react159.useEffect)(() => {
42070
41928
  if (streamingState === "responding" /* Responding */) {
42071
41929
  respondingElapsedRef.current = elapsedTime;
42072
41930
  idleNotificationSentRef.current = false;
@@ -42219,7 +42077,7 @@ __name(buildTerminalNotification, "buildTerminalNotification");
42219
42077
 
42220
42078
  // packages/cli/src/ui/hooks/useContextualTips.ts
42221
42079
  init_esbuild_shims();
42222
- var import_react164 = __toESM(require_react(), 1);
42080
+ var import_react160 = __toESM(require_react(), 1);
42223
42081
  function useContextualTips({
42224
42082
  streamingState,
42225
42083
  lastPromptTokenCount,
@@ -42229,9 +42087,9 @@ function useContextualTips({
42229
42087
  addItem,
42230
42088
  hideTips
42231
42089
  }) {
42232
- const prevStreamingState = (0, import_react164.useRef)("idle" /* Idle */);
42233
- const hadResponsePhase = (0, import_react164.useRef)(false);
42234
- (0, import_react164.useEffect)(() => {
42090
+ const prevStreamingState = (0, import_react160.useRef)("idle" /* Idle */);
42091
+ const hadResponsePhase = (0, import_react160.useRef)(false);
42092
+ (0, import_react160.useEffect)(() => {
42235
42093
  if (streamingState === "responding" /* Responding */ || prevStreamingState.current === "responding" /* Responding */ && streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */) {
42236
42094
  hadResponsePhase.current = true;
42237
42095
  }
@@ -42281,12 +42139,11 @@ function useContextualTips({
42281
42139
  __name(useContextualTips, "useContextualTips");
42282
42140
 
42283
42141
  // packages/cli/src/ui/AppContainer.tsx
42284
- var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1);
42142
+ var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1);
42285
42143
  var MCP_BATCH_FLUSH_MS = 16;
42286
42144
  var STARTUP_PROFILE_FINALIZE_CAP_MS = 35e3;
42287
42145
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
42288
- var debugLogger40 = createDebugLogger("APP_CONTAINER");
42289
- var EMPTY_HISTORY_ITEMS = [];
42146
+ var debugLogger39 = createDebugLogger("APP_CONTAINER");
42290
42147
  function isRenderModeToggleKey(key) {
42291
42148
  return keyMatchers["toggleRenderMode" /* TOGGLE_RENDER_MODE */](key) || key.name === "m" && key.meta && !key.ctrl && !key.paste;
42292
42149
  }
@@ -42367,7 +42224,7 @@ function getResponseCandidateTokens(pendingGeminiHistoryItems) {
42367
42224
  __name(getResponseCandidateTokens, "getResponseCandidateTokens");
42368
42225
  function useStableStickyTodos(todos) {
42369
42226
  const renderKey = getStickyTodosRenderKey(todos);
42370
- const stableTodosRef = (0, import_react165.useRef)(null);
42227
+ const stableTodosRef = (0, import_react161.useRef)(null);
42371
42228
  if (stableTodosRef.current?.renderKey !== renderKey) {
42372
42229
  stableTodosRef.current = { renderKey, todos };
42373
42230
  }
@@ -42398,29 +42255,29 @@ var SHELL_WIDTH_FRACTION = 0.89;
42398
42255
  var SHELL_HEIGHT_PADDING = 10;
42399
42256
  var AppContainer = /* @__PURE__ */ __name((props) => {
42400
42257
  const { settings, config, initializationResult, initialUseVirtualViewport } = props;
42401
- const extensionRefreshState = (0, import_react165.useMemo)(
42258
+ const extensionRefreshState = (0, import_react161.useMemo)(
42402
42259
  () => props.extensionRefreshState ?? new ExtensionRefreshState(),
42403
42260
  [props.extensionRefreshState]
42404
42261
  );
42405
42262
  const historyManager = useHistory();
42406
- const historyRef = (0, import_react165.useRef)(historyManager.history);
42263
+ const historyRef = (0, import_react161.useRef)(historyManager.history);
42407
42264
  historyRef.current = historyManager.history;
42408
42265
  useMemoryMonitor(historyManager);
42409
- const [debugMessage, setDebugMessage] = (0, import_react165.useState)("");
42410
- const [quittingMessages, setQuittingMessages] = (0, import_react165.useState)(null);
42411
- const [themeError, setThemeError] = (0, import_react165.useState)(
42266
+ const [debugMessage, setDebugMessage] = (0, import_react161.useState)("");
42267
+ const [quittingMessages, setQuittingMessages] = (0, import_react161.useState)(null);
42268
+ const [themeError, setThemeError] = (0, import_react161.useState)(
42412
42269
  initializationResult.themeError
42413
42270
  );
42414
- const [isProcessing, setIsProcessing] = (0, import_react165.useState)(false);
42415
- const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react165.useState)(false);
42416
- const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react165.useState)(
42271
+ const [isProcessing, setIsProcessing] = (0, import_react161.useState)(false);
42272
+ const [embeddedShellFocused, setEmbeddedShellFocused] = (0, import_react161.useState)(false);
42273
+ const [geminiMdFileCount, setGeminiMdFileCount] = (0, import_react161.useState)(
42417
42274
  initializationResult.geminiMdFileCount
42418
42275
  );
42419
- const [shellModeActive, setShellModeActive] = (0, import_react165.useState)(false);
42420
- const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react165.useState)(false);
42421
- const [historyRemountKey, setHistoryRemountKey] = (0, import_react165.useState)(0);
42422
- const [updateInfo, setUpdateInfo] = (0, import_react165.useState)(null);
42423
- const [isTrustedFolder, setIsTrustedFolder] = (0, import_react165.useState)(
42276
+ const [shellModeActive, setShellModeActive] = (0, import_react161.useState)(false);
42277
+ const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = (0, import_react161.useState)(false);
42278
+ const [historyRemountKey, setHistoryRemountKey] = (0, import_react161.useState)(0);
42279
+ const [updateInfo, setUpdateInfo] = (0, import_react161.useState)(null);
42280
+ const [isTrustedFolder, setIsTrustedFolder] = (0, import_react161.useState)(
42424
42281
  config.isTrustedFolder()
42425
42282
  );
42426
42283
  const extensionManager = config.getExtensionManager();
@@ -42479,31 +42336,24 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42479
42336
  config,
42480
42337
  historyManager.addItem
42481
42338
  );
42482
- const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react165.useState)(false);
42483
- const openTrustDialog = (0, import_react165.useCallback)(() => setTrustDialogOpen(true), []);
42484
- const closeTrustDialog = (0, import_react165.useCallback)(() => setTrustDialogOpen(false), []);
42485
- const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react165.useState)(false);
42486
- const openPermissionsDialog = (0, import_react165.useCallback)(
42339
+ const [isTrustDialogOpen, setTrustDialogOpen] = (0, import_react161.useState)(false);
42340
+ const openTrustDialog = (0, import_react161.useCallback)(() => setTrustDialogOpen(true), []);
42341
+ const closeTrustDialog = (0, import_react161.useCallback)(() => setTrustDialogOpen(false), []);
42342
+ const [isPermissionsDialogOpen, setPermissionsDialogOpen] = (0, import_react161.useState)(false);
42343
+ const openPermissionsDialog = (0, import_react161.useCallback)(
42487
42344
  () => setPermissionsDialogOpen(true),
42488
42345
  []
42489
42346
  );
42490
- const closePermissionsDialog = (0, import_react165.useCallback)(
42347
+ const closePermissionsDialog = (0, import_react161.useCallback)(
42491
42348
  () => setPermissionsDialogOpen(false),
42492
42349
  []
42493
42350
  );
42494
- const [currentModel, setCurrentModel] = (0, import_react165.useState)(() => config.getModel());
42495
- const [isConfigInitialized, setConfigInitialized] = (0, import_react165.useState)(false);
42496
- const [userMessages, setUserMessages] = (0, import_react165.useState)([]);
42497
- const [transcriptFreeze, setTranscriptFreeze] = (0, import_react165.useState)(null);
42498
- const isTranscriptOpen = transcriptFreeze != null;
42499
- const isTranscriptOpenRef = (0, import_react165.useRef)(isTranscriptOpen);
42500
- isTranscriptOpenRef.current = isTranscriptOpen;
42501
- const closeTranscript = (0, import_react165.useCallback)(() => {
42502
- setTranscriptFreeze(null);
42503
- }, []);
42504
- const [thoughtExpanded, setThoughtExpanded] = (0, import_react165.useState)(false);
42505
- const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0, import_react165.useState)(() => /* @__PURE__ */ new Set());
42506
- const toggleThoughtExpanded = (0, import_react165.useCallback)((headId) => {
42351
+ const [currentModel, setCurrentModel] = (0, import_react161.useState)(() => config.getModel());
42352
+ const [isConfigInitialized, setConfigInitialized] = (0, import_react161.useState)(false);
42353
+ const [userMessages, setUserMessages] = (0, import_react161.useState)([]);
42354
+ const [thoughtExpanded, setThoughtExpanded] = (0, import_react161.useState)(false);
42355
+ const [expandedThoughtHeadIds, setExpandedThoughtHeadIds] = (0, import_react161.useState)(() => /* @__PURE__ */ new Set());
42356
+ const toggleThoughtExpanded = (0, import_react161.useCallback)((headId) => {
42507
42357
  setExpandedThoughtHeadIds((prev) => {
42508
42358
  const next = new Set(prev);
42509
42359
  if (next.has(headId)) {
@@ -42517,10 +42367,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42517
42367
  const { columns: terminalWidth, rows: terminalHeight } = useTerminalSize();
42518
42368
  const { stdin, setRawMode } = use_stdin_default();
42519
42369
  const { stdout } = use_stdout_default();
42520
- const writeRaw = (0, import_react165.useCallback)((data) => {
42370
+ const writeRaw = (0, import_react161.useCallback)((data) => {
42521
42371
  process17.stdout.write(data);
42522
42372
  }, []);
42523
- const terminal = (0, import_react165.useMemo)(
42373
+ const terminal = (0, import_react161.useMemo)(
42524
42374
  () => buildTerminalNotification(writeRaw),
42525
42375
  [writeRaw]
42526
42376
  );
@@ -42534,10 +42384,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42534
42384
  const branchName = useGitBranchName(
42535
42385
  worktreeSession?.worktreePath ?? config.getTargetDir()
42536
42386
  );
42537
- const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0, import_react165.useState)(false);
42538
- const [workflowKeywordActive, setWorkflowKeywordActive] = (0, import_react165.useState)(false);
42539
- const pendingWorktreeNoticeRef = (0, import_react165.useRef)(null);
42540
- const activeWorktree = (0, import_react165.useMemo)(
42387
+ const [showWorktreeExitDialog, setShowWorktreeExitDialog] = (0, import_react161.useState)(false);
42388
+ const [workflowKeywordActive, setWorkflowKeywordActive] = (0, import_react161.useState)(false);
42389
+ const pendingWorktreeNoticeRef = (0, import_react161.useRef)(null);
42390
+ const activeWorktree = (0, import_react161.useMemo)(
42541
42391
  () => worktreeSession ? {
42542
42392
  slug: worktreeSession.slug,
42543
42393
  branch: worktreeSession.worktreeBranch,
@@ -42548,20 +42398,20 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42548
42398
  } : null,
42549
42399
  [worktreeSession]
42550
42400
  );
42551
- const mainControlsRef = (0, import_react165.useRef)(null);
42552
- const lastTitleRef = (0, import_react165.useRef)(null);
42553
- const [startupWarnings, setStartupWarnings] = (0, import_react165.useState)(
42401
+ const mainControlsRef = (0, import_react161.useRef)(null);
42402
+ const lastTitleRef = (0, import_react161.useRef)(null);
42403
+ const [startupWarnings, setStartupWarnings] = (0, import_react161.useState)(
42554
42404
  () => props.startupWarnings || []
42555
42405
  );
42556
42406
  const staticExtraHeight = 3;
42557
- (0, import_react165.useEffect)(() => {
42407
+ (0, import_react161.useEffect)(() => {
42558
42408
  void loadLowlight().catch((err) => {
42559
- debugLogger40.warn(
42409
+ debugLogger39.warn(
42560
42410
  `Failed to load lowlight chunk; code blocks will render as plain text: ${err instanceof Error ? err.message : String(err)}`
42561
42411
  );
42562
42412
  });
42563
42413
  }, []);
42564
- (0, import_react165.useEffect)(() => {
42414
+ (0, import_react161.useEffect)(() => {
42565
42415
  (async () => {
42566
42416
  profileCheckpoint("config_initialize_start");
42567
42417
  await config.initialize();
@@ -42641,9 +42491,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42641
42491
  registerCleanup(async () => {
42642
42492
  try {
42643
42493
  await config.getHookSystem()?.fireSessionEndEvent("prompt_input_exit" /* PromptInputExit */);
42644
- debugLogger40.debug("SessionEnd event completed successfully!!!");
42494
+ debugLogger39.debug("SessionEnd event completed successfully!!!");
42645
42495
  } catch (err) {
42646
- debugLogger40.error(`SessionEnd hook failed: ${err}`);
42496
+ debugLogger39.error(`SessionEnd hook failed: ${err}`);
42647
42497
  }
42648
42498
  });
42649
42499
  registerCleanup(async () => {
@@ -42651,7 +42501,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42651
42501
  await ideClient.disconnect();
42652
42502
  });
42653
42503
  }, [config]);
42654
- (0, import_react165.useEffect)(() => {
42504
+ (0, import_react161.useEffect)(() => {
42655
42505
  if (!isConfigInitialized) return void 0;
42656
42506
  const geminiClient2 = config.getGeminiClient();
42657
42507
  if (!geminiClient2) return void 0;
@@ -42669,7 +42519,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42669
42519
  flushTimer = null;
42670
42520
  }
42671
42521
  return geminiClient2.setTools().catch((err) => {
42672
- debugLogger40.error(
42522
+ debugLogger39.error(
42673
42523
  `setTools() batch-flush failed: ${err instanceof Error ? err.message : String(err)}`
42674
42524
  );
42675
42525
  });
@@ -42687,7 +42537,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42687
42537
  failureSurfaced = true;
42688
42538
  const failedNames = typeof config.getFailedMcpServerNames === "function" ? config.getFailedMcpServerNames() : [];
42689
42539
  if (failedNames.length > 0) {
42690
- debugLogger40.warn(
42540
+ debugLogger39.warn(
42691
42541
  `MCP server(s) failed to start: ${failedNames.join(", ")}. Continuing with built-in tools and any servers that did connect.`
42692
42542
  );
42693
42543
  }
@@ -42715,11 +42565,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42715
42565
  clearTimeout(finalizeCap);
42716
42566
  };
42717
42567
  }, [isConfigInitialized, config]);
42718
- const isIdleRef = (0, import_react165.useRef)(true);
42719
- const availableTerminalHeightRef = (0, import_react165.useRef)(0);
42720
- const terminalWidthRef = (0, import_react165.useRef)(0);
42721
- const updateHandlerRef = (0, import_react165.useRef)(null);
42722
- (0, import_react165.useEffect)(() => {
42568
+ const isIdleRef = (0, import_react161.useRef)(true);
42569
+ const availableTerminalHeightRef = (0, import_react161.useRef)(0);
42570
+ const terminalWidthRef = (0, import_react161.useRef)(0);
42571
+ const updateHandlerRef = (0, import_react161.useRef)(null);
42572
+ (0, import_react161.useEffect)(() => {
42723
42573
  const handler = setUpdateHandler(
42724
42574
  historyManager.addItem,
42725
42575
  setUpdateInfo,
@@ -42728,13 +42578,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42728
42578
  updateHandlerRef.current = handler;
42729
42579
  return () => handler?.cleanup();
42730
42580
  }, [historyManager.addItem]);
42731
- const { inputWidth, suggestionsWidth } = (0, import_react165.useMemo)(() => {
42581
+ const { inputWidth, suggestionsWidth } = (0, import_react161.useMemo)(() => {
42732
42582
  const { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 } = calculatePromptWidths(terminalWidth);
42733
42583
  return { inputWidth: inputWidth2, suggestionsWidth: suggestionsWidth2 };
42734
42584
  }, [terminalWidth]);
42735
42585
  const mainAreaWidth = Math.min(terminalWidth - 4, 100);
42736
42586
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
42737
- const isValidPath = (0, import_react165.useCallback)((filePath) => {
42587
+ const isValidPath = (0, import_react161.useCallback)((filePath) => {
42738
42588
  try {
42739
42589
  return fs20.existsSync(filePath) && fs20.statSync(filePath).isFile();
42740
42590
  } catch (_e) {
@@ -42742,14 +42592,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42742
42592
  }
42743
42593
  }, []);
42744
42594
  const preferredEditor = usePreferredEditor();
42745
- const restoredSubmissionRef = (0, import_react165.useRef)(null);
42746
- const submittedPromptProvenanceUnavailableRef = (0, import_react165.useRef)(false);
42747
- const setBufferTextRef = (0, import_react165.useRef)(null);
42748
- const invalidateSubmittedPromptProvenance = (0, import_react165.useCallback)(() => {
42595
+ const restoredSubmissionRef = (0, import_react161.useRef)(null);
42596
+ const submittedPromptProvenanceUnavailableRef = (0, import_react161.useRef)(false);
42597
+ const setBufferTextRef = (0, import_react161.useRef)(null);
42598
+ const invalidateSubmittedPromptProvenance = (0, import_react161.useCallback)(() => {
42749
42599
  restoredSubmissionRef.current = null;
42750
42600
  submittedPromptProvenanceUnavailableRef.current = true;
42751
42601
  }, []);
42752
- const handleBufferChange = (0, import_react165.useCallback)((text) => {
42602
+ const handleBufferChange = (0, import_react161.useCallback)((text) => {
42753
42603
  if (text.length === 0) {
42754
42604
  if (restoredSubmissionRef.current !== null || submittedPromptProvenanceUnavailableRef.current) {
42755
42605
  setBufferTextRef.current?.("", { clearUndoHistory: true });
@@ -42775,9 +42625,9 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42775
42625
  });
42776
42626
  const setBufferText = buffer.setText;
42777
42627
  setBufferTextRef.current = setBufferText;
42778
- const restoredPromptStashTargetsRef = (0, import_react165.useRef)(/* @__PURE__ */ new Set());
42628
+ const restoredPromptStashTargetsRef = (0, import_react161.useRef)(/* @__PURE__ */ new Set());
42779
42629
  const promptStashTargetDir = config.getTargetDir();
42780
- (0, import_react165.useEffect)(() => {
42630
+ (0, import_react161.useEffect)(() => {
42781
42631
  if (restoredPromptStashTargetsRef.current.has(promptStashTargetDir)) {
42782
42632
  return;
42783
42633
  }
@@ -42788,7 +42638,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42788
42638
  buffer.setText(text);
42789
42639
  });
42790
42640
  }, [buffer, promptStashTargetDir]);
42791
- (0, import_react165.useEffect)(() => {
42641
+ (0, import_react161.useEffect)(() => {
42792
42642
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
42793
42643
  const pastMessagesRaw = await logger?.getPreviousUserMessages() || [];
42794
42644
  const currentSessionUserMessages = realUserPromptTexts(
@@ -42802,10 +42652,10 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42802
42652
  }, "fetchUserMessages");
42803
42653
  fetchUserMessages();
42804
42654
  }, [historyManager.history, logger]);
42805
- const remountStaticHistory = (0, import_react165.useCallback)(() => {
42655
+ const remountStaticHistory = (0, import_react161.useCallback)(() => {
42806
42656
  setHistoryRemountKey((prev) => prev + 1);
42807
42657
  }, []);
42808
- const [useTerminalBuffer] = (0, import_react165.useState)(
42658
+ const [useTerminalBuffer] = (0, import_react161.useState)(
42809
42659
  () => initialUseVirtualViewport ?? shouldUseVirtualViewport(
42810
42660
  settings.merged.ui?.useTerminalBuffer,
42811
42661
  config.getScreenReader(),
@@ -42813,38 +42663,14 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42813
42663
  )
42814
42664
  );
42815
42665
  const showScrollbar = settings.merged.ui?.showScrollbar ?? true;
42816
- const refreshStatic = (0, import_react165.useCallback)(() => {
42817
- if (isTranscriptOpenRef.current) {
42818
- return;
42819
- }
42666
+ const refreshStatic = (0, import_react161.useCallback)(() => {
42820
42667
  if (!useTerminalBuffer) {
42821
42668
  stdout.write(base_exports.clearTerminal);
42822
42669
  }
42823
42670
  remountStaticHistory();
42824
42671
  }, [useTerminalBuffer, remountStaticHistory, stdout]);
42825
- const prevTranscriptOpenRef = (0, import_react165.useRef)(isTranscriptOpen);
42826
- const wasOpenPrevRender = prevTranscriptOpenRef.current;
42827
- prevTranscriptOpenRef.current = isTranscriptOpen;
42828
- const transcriptCloseCountRef = (0, import_react165.useRef)(0);
42829
- if (wasOpenPrevRender && !isTranscriptOpen) {
42830
- transcriptCloseCountRef.current += 1;
42831
- }
42832
- const transcriptCloseCount = transcriptCloseCountRef.current;
42833
- (0, import_react165.useEffect)(() => {
42834
- if (transcriptCloseCount === 0 || useTerminalBuffer) {
42835
- return void 0;
42836
- }
42837
- if (!stdout.isTTY) {
42838
- return void 0;
42839
- }
42840
- const id = setTimeout(() => {
42841
- stdout.write(base_exports.clearTerminal);
42842
- remountStaticHistory();
42843
- }, 0);
42844
- return () => clearTimeout(id);
42845
- }, [transcriptCloseCount, useTerminalBuffer, stdout, remountStaticHistory]);
42846
- const lastNotifiedModelRef = (0, import_react165.useRef)(currentModel);
42847
- (0, import_react165.useEffect)(() => {
42672
+ const lastNotifiedModelRef = (0, import_react161.useRef)(currentModel);
42673
+ (0, import_react161.useEffect)(() => {
42848
42674
  const unsubscribe = config.onModelChange((model) => {
42849
42675
  if (lastNotifiedModelRef.current === model) {
42850
42676
  return;
@@ -42882,7 +42708,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42882
42708
  const { onAuthError, openAuthDialog, closeAuthDialog } = authActions;
42883
42709
  const { isAuthDialogOpen, isAuthenticating, pendingAuthType } = authState;
42884
42710
  useInitializationAuthError(initializationResult.authError, onAuthError);
42885
- (0, import_react165.useEffect)(() => {
42711
+ (0, import_react161.useEffect)(() => {
42886
42712
  const currentAuthType = config.getModelsConfig().getCurrentAuthType();
42887
42713
  if (settings.merged.security?.auth?.enforcedType && currentAuthType && settings.merged.security?.auth.enforcedType !== currentAuthType) {
42888
42714
  onAuthError(
@@ -42896,7 +42722,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42896
42722
  );
42897
42723
  }
42898
42724
  }, [settings.merged.security?.auth?.enforcedType, config, onAuthError]);
42899
- const [editorError, setEditorError] = (0, import_react165.useState)(null);
42725
+ const [editorError, setEditorError] = (0, import_react161.useState)(null);
42900
42726
  const {
42901
42727
  isEditorDialogOpen,
42902
42728
  openEditorDialog,
@@ -42904,18 +42730,18 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42904
42730
  exitEditorDialog
42905
42731
  } = useEditorSettings(settings, setEditorError, historyManager.addItem);
42906
42732
  const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
42907
- const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0, import_react165.useState)(false);
42908
- const openStatusLineDialog = (0, import_react165.useCallback)(
42733
+ const [isStatusLineDialogOpen, setStatusLineDialogOpen] = (0, import_react161.useState)(false);
42734
+ const openStatusLineDialog = (0, import_react161.useCallback)(
42909
42735
  () => setStatusLineDialogOpen(true),
42910
42736
  []
42911
42737
  );
42912
- const closeStatusLineDialog = (0, import_react165.useCallback)(
42738
+ const closeStatusLineDialog = (0, import_react161.useCallback)(
42913
42739
  () => setStatusLineDialogOpen(false),
42914
42740
  []
42915
42741
  );
42916
- const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0, import_react165.useState)(0);
42917
- const [statusLineConfigOverride, setStatusLineConfigOverride] = (0, import_react165.useState)(void 0);
42918
- const notifyStatusLineSettingsChanged = (0, import_react165.useCallback)(
42742
+ const [statusLineSettingsVersion, setStatusLineSettingsVersion] = (0, import_react161.useState)(0);
42743
+ const [statusLineConfigOverride, setStatusLineConfigOverride] = (0, import_react161.useState)(void 0);
42744
+ const notifyStatusLineSettingsChanged = (0, import_react161.useCallback)(
42919
42745
  (newConfig) => {
42920
42746
  setStatusLineConfigOverride(newConfig);
42921
42747
  setStatusLineSettingsVersion((version) => version + 1);
@@ -42934,8 +42760,8 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42934
42760
  closeModelDialog
42935
42761
  } = useModelCommand();
42936
42762
  const { activeArenaDialog, openArenaDialog, closeArenaDialog } = useArenaCommand();
42937
- const [sessionName, setSessionName] = (0, import_react165.useState)(null);
42938
- (0, import_react165.useEffect)(() => {
42763
+ const [sessionName, setSessionName] = (0, import_react161.useState)(null);
42764
+ (0, import_react161.useEffect)(() => {
42939
42765
  const chatRecordingService = config.getChatRecordingService();
42940
42766
  if (!chatRecordingService?.setTitleRecordedCallback) return;
42941
42767
  const existingCallback = chatRecordingService.getTitleRecordedCallback();
@@ -42952,7 +42778,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42952
42778
  };
42953
42779
  }, [config]);
42954
42780
  const addHistoryItem = historyManager.addItem;
42955
- (0, import_react165.useEffect)(() => {
42781
+ (0, import_react161.useEffect)(() => {
42956
42782
  if (typeof config.onChatRecordingFailure !== "function") return;
42957
42783
  return config.onChatRecordingFailure(() => {
42958
42784
  addHistoryItem(
@@ -42996,13 +42822,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
42996
42822
  config,
42997
42823
  addItem: historyManager.addItem
42998
42824
  });
42999
- const [isHelpDialogOpen, setHelpDialogOpen] = (0, import_react165.useState)(false);
43000
- const [activeHelpTab, setHelpTab] = (0, import_react165.useState)("general");
43001
- const openHelpDialog = (0, import_react165.useCallback)(() => setHelpDialogOpen(true), []);
43002
- const closeHelpDialog = (0, import_react165.useCallback)(() => setHelpDialogOpen(false), []);
42825
+ const [isHelpDialogOpen, setHelpDialogOpen] = (0, import_react161.useState)(false);
42826
+ const [activeHelpTab, setHelpTab] = (0, import_react161.useState)("general");
42827
+ const openHelpDialog = (0, import_react161.useCallback)(() => setHelpDialogOpen(true), []);
42828
+ const closeHelpDialog = (0, import_react161.useCallback)(() => setHelpDialogOpen(false), []);
43003
42829
  const { vimEnabled, vimMode } = useVimModeState();
43004
42830
  const { toggleVimEnabled } = useVimModeActions();
43005
- (0, import_react165.useLayoutEffect)(() => {
42831
+ (0, import_react161.useLayoutEffect)(() => {
43006
42832
  if (vimEnabled && buffer.text.length > 0) {
43007
42833
  invalidateSubmittedPromptProvenance();
43008
42834
  }
@@ -43030,31 +42856,31 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43030
42856
  const { isMcpDialogOpen, openMcpDialog, closeMcpDialog } = useMcpDialog();
43031
42857
  const { isHooksDialogOpen, openHooksDialog, closeHooksDialog } = useHooksDialog();
43032
42858
  const { isStatsDialogOpen, openStatsDialog, closeStatsDialog } = useStatsDialog();
43033
- const openRewindSelectorRef = (0, import_react165.useRef)(() => {
42859
+ const openRewindSelectorRef = (0, import_react161.useRef)(() => {
43034
42860
  });
43035
- const cancelOngoingRequestRef = (0, import_react165.useRef)(() => {
42861
+ const cancelOngoingRequestRef = (0, import_react161.useRef)(() => {
43036
42862
  });
43037
- const [isDiffDialogOpen, setIsDiffDialogOpen] = (0, import_react165.useState)(false);
43038
- const openDiffDialog = (0, import_react165.useCallback)(() => {
42863
+ const [isDiffDialogOpen, setIsDiffDialogOpen] = (0, import_react161.useState)(false);
42864
+ const openDiffDialog = (0, import_react161.useCallback)(() => {
43039
42865
  setIsDiffDialogOpen(true);
43040
42866
  }, []);
43041
- const closeDiffDialog = (0, import_react165.useCallback)(() => {
42867
+ const closeDiffDialog = (0, import_react161.useCallback)(() => {
43042
42868
  setIsDiffDialogOpen(false);
43043
42869
  }, []);
43044
- const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0, import_react165.useState)(false);
43045
- const [skillReviewPending, setSkillReviewPending] = (0, import_react165.useState)(null);
43046
- const skillReviewDismissedTaskIdsRef = (0, import_react165.useRef)(/* @__PURE__ */ new Set());
43047
- const dismissSkillReviewDialog = (0, import_react165.useCallback)(() => {
42870
+ const [isSkillReviewDialogOpen, setIsSkillReviewDialogOpen] = (0, import_react161.useState)(false);
42871
+ const [skillReviewPending, setSkillReviewPending] = (0, import_react161.useState)(null);
42872
+ const skillReviewDismissedTaskIdsRef = (0, import_react161.useRef)(/* @__PURE__ */ new Set());
42873
+ const dismissSkillReviewDialog = (0, import_react161.useCallback)(() => {
43048
42874
  if (skillReviewPending) {
43049
42875
  skillReviewDismissedTaskIdsRef.current.add(skillReviewPending.taskId);
43050
42876
  }
43051
42877
  setIsSkillReviewDialogOpen(false);
43052
42878
  }, [skillReviewPending]);
43053
- const closeSkillReviewDialog = (0, import_react165.useCallback)(
42879
+ const closeSkillReviewDialog = (0, import_react161.useCallback)(
43054
42880
  () => setIsSkillReviewDialogOpen(false),
43055
42881
  []
43056
42882
  );
43057
- const acceptPendingSkill = (0, import_react165.useCallback)(
42883
+ const acceptPendingSkill = (0, import_react161.useCallback)(
43058
42884
  (skillName) => {
43059
42885
  if (!skillReviewPending) return;
43060
42886
  void config.getMemoryManager().acceptPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
@@ -43062,7 +42888,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43062
42888
  },
43063
42889
  [config, skillReviewPending]
43064
42890
  );
43065
- const rejectPendingSkill = (0, import_react165.useCallback)(
42891
+ const rejectPendingSkill = (0, import_react161.useCallback)(
43066
42892
  (skillName) => {
43067
42893
  if (!skillReviewPending) return;
43068
42894
  void config.getMemoryManager().rejectPendingSkillFromTask(skillReviewPending.taskId, skillName).catch(() => {
@@ -43070,7 +42896,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43070
42896
  },
43071
42897
  [config, skillReviewPending]
43072
42898
  );
43073
- (0, import_react165.useEffect)(() => {
42899
+ (0, import_react161.useEffect)(() => {
43074
42900
  const mgr = config.getMemoryManager();
43075
42901
  const projectRoot = config.getProjectRoot();
43076
42902
  let lastSig = "";
@@ -43104,7 +42930,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43104
42930
  refresh();
43105
42931
  return unsub;
43106
42932
  }, [config]);
43107
- const slashCommandActions = (0, import_react165.useMemo)(
42933
+ const slashCommandActions = (0, import_react161.useMemo)(
43108
42934
  () => ({
43109
42935
  openAuthDialog,
43110
42936
  openThemeDialog,
@@ -43122,7 +42948,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43122
42948
  try {
43123
42949
  cancelOngoingRequestRef.current();
43124
42950
  } catch (error) {
43125
- debugLogger40.debug("Failed to cancel request while quitting:", error);
42951
+ debugLogger39.debug("Failed to cancel request while quitting:", error);
43126
42952
  }
43127
42953
  setQuittingMessages(messages);
43128
42954
  config.getGeminiClient()?.requestShutdown();
@@ -43214,13 +43040,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43214
43040
  setSessionName,
43215
43041
  extensionRefreshState
43216
43042
  );
43217
- const onDebugMessage = (0, import_react165.useCallback)(
43043
+ const onDebugMessage = (0, import_react161.useCallback)(
43218
43044
  (message) => {
43219
43045
  config.getDebugLogger().debug(message);
43220
43046
  },
43221
43047
  [config]
43222
43048
  );
43223
- const handleWorktreeExit = (0, import_react165.useCallback)(
43049
+ const handleWorktreeExit = (0, import_react161.useCallback)(
43224
43050
  async (choice) => {
43225
43051
  if (choice === "cancel") {
43226
43052
  setShowWorktreeExitDialog(false);
@@ -43285,7 +43111,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43285
43111
  },
43286
43112
  [activeWorktree, config, handleSlashCommand, historyManager]
43287
43113
  );
43288
- const performMemoryRefresh = (0, import_react165.useCallback)(async () => {
43114
+ const performMemoryRefresh = (0, import_react161.useCallback)(async () => {
43289
43115
  if (config.isSafeMode()) {
43290
43116
  config.setUserMemory("");
43291
43117
  config.setGeminiMdFileCount(0);
@@ -43339,7 +43165,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43339
43165
  },
43340
43166
  Date.now()
43341
43167
  );
43342
- debugLogger40.debug(
43168
+ debugLogger39.debug(
43343
43169
  `[DEBUG] Refreshed memory content in config: ${memoryContent.substring(
43344
43170
  0,
43345
43171
  200
@@ -43354,13 +43180,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43354
43180
  },
43355
43181
  Date.now()
43356
43182
  );
43357
- debugLogger40.error("Error refreshing memory:", error);
43183
+ debugLogger39.error("Error refreshing memory:", error);
43358
43184
  }
43359
43185
  }, [config, historyManager, settings.merged]);
43360
- const cancelHandlerRef = (0, import_react165.useRef)(() => {
43186
+ const cancelHandlerRef = (0, import_react161.useRef)(() => {
43361
43187
  });
43362
- const midTurnDrainRef = (0, import_react165.useRef)(null);
43363
- const midTurnRestoreRef = (0, import_react165.useRef)(null);
43188
+ const midTurnDrainRef = (0, import_react161.useRef)(null);
43189
+ const midTurnRestoreRef = (0, import_react161.useRef)(null);
43364
43190
  const {
43365
43191
  streamingState,
43366
43192
  submitQuery,
@@ -43403,13 +43229,13 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43403
43229
  );
43404
43230
  cancelOngoingRequestRef.current = cancelOngoingRequest;
43405
43231
  isIdleRef.current = streamingState === "idle" /* Idle */;
43406
- (0, import_react165.useEffect)(() => {
43232
+ (0, import_react161.useEffect)(() => {
43407
43233
  if (streamingState === "idle" /* Idle */) {
43408
43234
  updateHandlerRef.current?.flush();
43409
43235
  setWorkflowKeywordActive(false);
43410
43236
  }
43411
43237
  }, [streamingState]);
43412
- (0, import_react165.useEffect)(() => {
43238
+ (0, import_react161.useEffect)(() => {
43413
43239
  if (shouldAutoOpenSkillReview({
43414
43240
  pending: skillReviewPending,
43415
43241
  streamingState,
@@ -43421,7 +43247,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43421
43247
  }
43422
43248
  }, [skillReviewPending, streamingState, isMemoryDialogOpen, config]);
43423
43249
  const tipsDisabled = !!(settings.merged.ui?.hideTips || config.getScreenReader());
43424
- const tipHistory = (0, import_react165.useMemo)(
43250
+ const tipHistory = (0, import_react161.useMemo)(
43425
43251
  () => tipsDisabled ? null : getTipHistory(),
43426
43252
  [tipsDisabled]
43427
43253
  );
@@ -43434,7 +43260,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43434
43260
  addItem: historyManager.addItem,
43435
43261
  hideTips: tipsDisabled
43436
43262
  });
43437
- const [hasTabConsumer, setHasTabConsumer] = (0, import_react165.useState)(false);
43263
+ const [hasTabConsumer, setHasTabConsumer] = (0, import_react161.useState)(false);
43438
43264
  const agentViewState = useAgentViewState();
43439
43265
  const {
43440
43266
  dialogOpen: bgTasksDialogOpen,
@@ -43442,11 +43268,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43442
43268
  livePanelFocused: bgLivePanelFocused
43443
43269
  } = useBackgroundTaskViewState();
43444
43270
  const { closeDialog: closeBgTasksDialog } = useBackgroundTaskViewActions();
43445
- const [promptSuggestion, setPromptSuggestion] = (0, import_react165.useState)(null);
43446
- const prevStreamingStateRef = (0, import_react165.useRef)("idle" /* Idle */);
43447
- const speculationRef = (0, import_react165.useRef)(IDLE_SPECULATION);
43448
- const suggestionAbortRef = (0, import_react165.useRef)(null);
43449
- const abortPromptSuggestion = (0, import_react165.useCallback)(() => {
43271
+ const [promptSuggestion, setPromptSuggestion] = (0, import_react161.useState)(null);
43272
+ const prevStreamingStateRef = (0, import_react161.useRef)("idle" /* Idle */);
43273
+ const speculationRef = (0, import_react161.useRef)(IDLE_SPECULATION);
43274
+ const suggestionAbortRef = (0, import_react161.useRef)(null);
43275
+ const abortPromptSuggestion = (0, import_react161.useCallback)(() => {
43450
43276
  suggestionAbortRef.current?.abort();
43451
43277
  suggestionAbortRef.current = null;
43452
43278
  if (speculationRef.current.status !== "idle") {
@@ -43472,7 +43298,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43472
43298
  drainQueue,
43473
43299
  popNextTurn
43474
43300
  } = useMessageQueue();
43475
- const submitUserQuery = (0, import_react165.useCallback)(
43301
+ const submitUserQuery = (0, import_react161.useCallback)(
43476
43302
  (submission) => submitQuery(
43477
43303
  submission.modelText,
43478
43304
  "userQuery" /* UserQuery */,
@@ -43481,7 +43307,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43481
43307
  ),
43482
43308
  [submitQuery]
43483
43309
  );
43484
- const popAllQueuedMessages = (0, import_react165.useCallback)(() => {
43310
+ const popAllQueuedMessages = (0, import_react161.useCallback)(() => {
43485
43311
  const submission = popAllMessages();
43486
43312
  if (submission === null) return null;
43487
43313
  restoredSubmissionRef.current = submission;
@@ -43491,21 +43317,21 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43491
43317
  midTurnDrainRef.current = drainQueue;
43492
43318
  midTurnRestoreRef.current = restoreMessages;
43493
43319
  const remoteInput = useRemoteInput();
43494
- (0, import_react165.useEffect)(() => {
43320
+ (0, import_react161.useEffect)(() => {
43495
43321
  if (!remoteInput) return;
43496
43322
  remoteInput.setSubmitFn((text) => submitQuery(text));
43497
43323
  }, [remoteInput, submitQuery]);
43498
- (0, import_react165.useEffect)(() => {
43324
+ (0, import_react161.useEffect)(() => {
43499
43325
  if (!remoteInput) return;
43500
43326
  if (streamingState === "idle" /* Idle */) {
43501
43327
  remoteInput.notifyIdle();
43502
43328
  }
43503
43329
  }, [remoteInput, streamingState]);
43504
43330
  const dualOutput = useDualOutput();
43505
- const confirmRequestMap = (0, import_react165.useRef)(/* @__PURE__ */ new Map());
43506
- const confirmCallIdMap = (0, import_react165.useRef)(/* @__PURE__ */ new Map());
43507
- const confirmEmitted = (0, import_react165.useRef)(/* @__PURE__ */ new Set());
43508
- (0, import_react165.useEffect)(() => {
43331
+ const confirmRequestMap = (0, import_react161.useRef)(/* @__PURE__ */ new Map());
43332
+ const confirmCallIdMap = (0, import_react161.useRef)(/* @__PURE__ */ new Map());
43333
+ const confirmEmitted = (0, import_react161.useRef)(/* @__PURE__ */ new Set());
43334
+ (0, import_react161.useEffect)(() => {
43509
43335
  if (!dualOutput || !dualOutput.isConnected) return;
43510
43336
  for (const tc of pendingToolCalls) {
43511
43337
  if (tc.status === "awaiting_approval" && !confirmEmitted.current.has(tc.request.callId)) {
@@ -43534,11 +43360,11 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43534
43360
  }
43535
43361
  }
43536
43362
  }, [dualOutput, pendingToolCalls]);
43537
- const pendingToolCallsRef = (0, import_react165.useRef)(pendingToolCalls);
43363
+ const pendingToolCallsRef = (0, import_react161.useRef)(pendingToolCalls);
43538
43364
  pendingToolCallsRef.current = pendingToolCalls;
43539
- const dualOutputRef = (0, import_react165.useRef)(dualOutput);
43365
+ const dualOutputRef = (0, import_react161.useRef)(dualOutput);
43540
43366
  dualOutputRef.current = dualOutput;
43541
- (0, import_react165.useEffect)(() => {
43367
+ (0, import_react161.useEffect)(() => {
43542
43368
  if (!remoteInput) return;
43543
43369
  remoteInput.setConfirmationHandler(
43544
43370
  (requestId, allowed) => {
@@ -43578,7 +43404,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
43578
43404
  });
43579
43405
  };
43580
43406
  }, [remoteInput]);
43581
- const handleFinalSubmit = (0, import_react165.useCallback)(
43407
+ const handleFinalSubmit = (0, import_react161.useCallback)(
43582
43408
  (submittedValue, options) => {
43583
43409
  const consumesComposerState = options !== void 0;
43584
43410
  const restoredSubmission = consumesComposerState ? restoredSubmissionRef.current : null;
@@ -43642,6 +43468,10 @@ ${buildWorkflowSteeringNotice()}
43642
43468
  addMessage(submittedValue, true, submittedPrompt);
43643
43469
  return;
43644
43470
  }
43471
+ if (streamingState === "responding" /* Responding */ && isSlashCommand(userPromptText) && parseSlashCommand(userPromptText, slashCommands).commandToExecute?.canRunDuringStreaming) {
43472
+ void handleSlashCommand(userPromptText);
43473
+ return;
43474
+ }
43645
43475
  if (streamingState === "responding" /* Responding */ && isBtwCommand(submittedValue)) {
43646
43476
  void submitUserQuery({
43647
43477
  modelText: submittedValue,
@@ -43746,6 +43576,7 @@ ${buildWorkflowSteeringNotice()}
43746
43576
  isProcessing,
43747
43577
  submitUserQuery,
43748
43578
  handleSlashCommand,
43579
+ slashCommands,
43749
43580
  config,
43750
43581
  geminiClient,
43751
43582
  historyManager,
@@ -43754,7 +43585,7 @@ ${buildWorkflowSteeringNotice()}
43754
43585
  vimEnabled
43755
43586
  ]
43756
43587
  );
43757
- const handleArenaModelsSelected = (0, import_react165.useCallback)(
43588
+ const handleArenaModelsSelected = (0, import_react161.useCallback)(
43758
43589
  (models) => {
43759
43590
  const value = models.join(",");
43760
43591
  buffer.setText(`/arena start --models ${value} `);
@@ -43769,39 +43600,11 @@ ${buildWorkflowSteeringNotice()}
43769
43600
  handleWelcomeBackSelection,
43770
43601
  handleWelcomeBackClose
43771
43602
  } = useWelcomeBack(config, handleFinalSubmit, buffer, settings.merged);
43772
- const pendingHistoryItems = (0, import_react165.useMemo)(
43603
+ const pendingHistoryItems = (0, import_react161.useMemo)(
43773
43604
  () => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems],
43774
43605
  [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]
43775
43606
  );
43776
- const historyForTranscriptRef = (0, import_react165.useRef)(historyManager.history);
43777
- historyForTranscriptRef.current = historyManager.history;
43778
- const pendingForTranscriptRef = (0, import_react165.useRef)(pendingHistoryItems);
43779
- pendingForTranscriptRef.current = pendingHistoryItems;
43780
- const openTranscript = (0, import_react165.useCallback)(() => {
43781
- setTranscriptFreeze({
43782
- // Share MainContent's visibility predicate so the transcript shows exactly
43783
- // what the main view shows. Items collapsed on session resume
43784
- // (ui.history.collapseOnResume) are represented by their collapse-summary
43785
- // row and must NOT be re-exposed in the Ctrl+O view.
43786
- committedItems: historyForTranscriptRef.current.filter(
43787
- isHistoryItemVisibleAfterRestore
43788
- ),
43789
- pendingItems: [...pendingForTranscriptRef.current]
43790
- });
43791
- }, []);
43792
- const transcriptItems = (0, import_react165.useMemo)(() => {
43793
- if (!transcriptFreeze) return EMPTY_HISTORY_ITEMS;
43794
- return [
43795
- ...transcriptFreeze.committedItems,
43796
- // Pending snapshot gets negative ids (mirrors MainContent's `id: -(i+1)`)
43797
- // so keys never collide with committed history items.
43798
- ...transcriptFreeze.pendingItems.map((item, i) => ({
43799
- ...item,
43800
- id: -(i + 1)
43801
- }))
43802
- ];
43803
- }, [transcriptFreeze]);
43804
- const rawStickyTodos = (0, import_react165.useMemo)(
43607
+ const rawStickyTodos = (0, import_react161.useMemo)(
43805
43608
  () => getStickyTodos(historyManager.history, pendingHistoryItems),
43806
43609
  [historyManager.history, pendingHistoryItems]
43807
43610
  );
@@ -43809,7 +43612,7 @@ ${buildWorkflowSteeringNotice()}
43809
43612
  const hasExecutingTool = isToolExecuting(pendingHistoryItems);
43810
43613
  const hasPendingCompression = isCompressionPending(pendingHistoryItems);
43811
43614
  useTerminalProgress(streamingState, hasExecutingTool);
43812
- cancelHandlerRef.current = (0, import_react165.useCallback)(
43615
+ cancelHandlerRef.current = (0, import_react161.useCallback)(
43813
43616
  (info) => {
43814
43617
  const pendingHistoryItems2 = [
43815
43618
  ...pendingSlashCommandHistoryItems,
@@ -43830,18 +43633,18 @@ ${currentText}` : popped.modelText
43830
43633
  );
43831
43634
  }
43832
43635
  if (!draftWasEmpty) {
43833
- debugLogger40.debug("auto-restore bail: buffer was non-empty");
43636
+ debugLogger39.debug("auto-restore bail: buffer was non-empty");
43834
43637
  return;
43835
43638
  }
43836
43639
  if (popped !== null) {
43837
- debugLogger40.debug(
43640
+ debugLogger39.debug(
43838
43641
  "auto-restore bail: queue had items (drained to buffer)"
43839
43642
  );
43840
43643
  return;
43841
43644
  }
43842
43645
  const cancelledTurnUserItem = info?.lastTurnUserItem;
43843
43646
  if (cancelledTurnUserItem == null) {
43844
- debugLogger40.debug(
43647
+ debugLogger39.debug(
43845
43648
  "auto-restore bail: cancelled turn did not add a user history item"
43846
43649
  );
43847
43650
  return;
@@ -43855,20 +43658,20 @@ ${currentText}` : popped.modelText
43855
43658
  buffer.setText(cancelledTurnUserItem.text);
43856
43659
  }, "restoreCancelledPrompt");
43857
43660
  if (pendingHistoryItems2.some((item) => item.type === "tool_group")) {
43858
- debugLogger40.debug(
43661
+ debugLogger39.debug(
43859
43662
  "auto-restore bail: tool execution is pending or committed"
43860
43663
  );
43861
43664
  return;
43862
43665
  }
43863
43666
  if (info?.turnProducedMeaningfulContent) {
43864
- debugLogger40.debug(
43667
+ debugLogger39.debug(
43865
43668
  "auto-restore: preserving streamed output and restoring prompt text"
43866
43669
  );
43867
43670
  restoreCancelledPrompt();
43868
43671
  return;
43869
43672
  }
43870
43673
  if (pendingHistoryItems2.some((item) => !isSyntheticHistoryItem(item))) {
43871
- debugLogger40.debug(
43674
+ debugLogger39.debug(
43872
43675
  "auto-restore bail: pending stream item has meaningful content"
43873
43676
  );
43874
43677
  return;
@@ -43876,11 +43679,11 @@ ${currentText}` : popped.modelText
43876
43679
  const history = historyRef.current;
43877
43680
  const lastUserIdx = findLastUserItemIndex(history);
43878
43681
  if (lastUserIdx === -1) {
43879
- debugLogger40.debug("auto-restore bail: no user item in history");
43682
+ debugLogger39.debug("auto-restore bail: no user item in history");
43880
43683
  return;
43881
43684
  }
43882
43685
  if (!itemsAfterAreOnlySynthetic(history, lastUserIdx)) {
43883
- debugLogger40.debug(
43686
+ debugLogger39.debug(
43884
43687
  "auto-restore: preserving committed output and restoring prompt text"
43885
43688
  );
43886
43689
  restoreCancelledPrompt();
@@ -43888,18 +43691,18 @@ ${currentText}` : popped.modelText
43888
43691
  }
43889
43692
  const lastUserItem = history[lastUserIdx];
43890
43693
  if (lastUserItem.type !== "user") {
43891
- debugLogger40.debug(
43694
+ debugLogger39.debug(
43892
43695
  "auto-restore bail: lastUserItem type narrowing failed (unexpected)"
43893
43696
  );
43894
43697
  return;
43895
43698
  }
43896
43699
  if (lastUserItem.id !== cancelledTurnUserItem.id || lastUserItem.text !== cancelledTurnUserItem.text) {
43897
- debugLogger40.debug(
43700
+ debugLogger39.debug(
43898
43701
  "auto-restore bail: lastUserItem identity does not match cancelled-turn user item"
43899
43702
  );
43900
43703
  return;
43901
43704
  }
43902
- debugLogger40.debug(
43705
+ debugLogger39.debug(
43903
43706
  "auto-restore: rewinding cancelled turn and restoring prompt"
43904
43707
  );
43905
43708
  historyManager.truncateToItem(lastUserItem.id);
@@ -43908,7 +43711,7 @@ ${currentText}` : popped.modelText
43908
43711
  geminiClient?.stripOrphanedUserEntriesFromHistory?.();
43909
43712
  if (info?.canUndoLastLoggedUserMessage) {
43910
43713
  void logger?.removeLastUserMessage().catch((err) => {
43911
- debugLogger40.debug("Failed to undo cancelled prompt from log:", err);
43714
+ debugLogger39.debug("Failed to undo cancelled prompt from log:", err);
43912
43715
  });
43913
43716
  }
43914
43717
  },
@@ -43923,7 +43726,7 @@ ${currentText}` : popped.modelText
43923
43726
  pendingGeminiHistoryItems
43924
43727
  ]
43925
43728
  );
43926
- const handleClearScreen = (0, import_react165.useCallback)(() => {
43729
+ const handleClearScreen = (0, import_react161.useCallback)(() => {
43927
43730
  historyManager.clearItems();
43928
43731
  clearScreen();
43929
43732
  remountStaticHistory();
@@ -43946,13 +43749,13 @@ ${currentText}` : popped.modelText
43946
43749
  history: historyManager.history,
43947
43750
  awayThresholdMinutes: settings.merged.general?.sessionRecapAwayThresholdMinutes
43948
43751
  });
43949
- const contextFileNames = (0, import_react165.useMemo)(() => {
43752
+ const contextFileNames = (0, import_react161.useMemo)(() => {
43950
43753
  const fromSettings = settings.merged.context?.fileName;
43951
43754
  return fromSettings ? Array.isArray(fromSettings) ? fromSettings : [fromSettings] : getAllGeminiMdFilenames();
43952
43755
  }, [settings.merged.context?.fileName]);
43953
- const initialPrompt = (0, import_react165.useMemo)(() => config.getQuestion(), [config]);
43954
- const initialPromptSubmitted = (0, import_react165.useRef)(false);
43955
- (0, import_react165.useEffect)(() => {
43756
+ const initialPrompt = (0, import_react161.useMemo)(() => config.getQuestion(), [config]);
43757
+ const initialPromptSubmitted = (0, import_react161.useRef)(false);
43758
+ (0, import_react161.useEffect)(() => {
43956
43759
  if (initialPrompt && isConfigInitialized && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !isThemeDialogOpen && !isEditorDialogOpen && !showWelcomeBackDialog && welcomeBackChoice !== "restart" && geminiClient?.isInitialized?.()) {
43957
43760
  handleFinalSubmit(initialPrompt);
43958
43761
  initialPromptSubmitted.current = true;
@@ -43970,7 +43773,7 @@ ${currentText}` : popped.modelText
43970
43773
  geminiClient
43971
43774
  ]);
43972
43775
  const followupSuggestionsEnabled = settings.merged.ui?.enableFollowupSuggestions !== false;
43973
- (0, import_react165.useEffect)(() => {
43776
+ (0, import_react161.useEffect)(() => {
43974
43777
  if (!followupSuggestionsEnabled) {
43975
43778
  suggestionAbortRef.current?.abort();
43976
43779
  setPromptSuggestion(null);
@@ -44039,17 +43842,17 @@ ${currentText}` : popped.modelText
44039
43842
  isPermissionsDialogOpen,
44040
43843
  settingInputRequests
44041
43844
  ]);
44042
- (0, import_react165.useEffect)(() => {
43845
+ (0, import_react161.useEffect)(() => {
44043
43846
  if (!promptSuggestion && speculationRef.current.status !== "idle") {
44044
43847
  abortSpeculation(speculationRef.current).catch(() => {
44045
43848
  });
44046
43849
  speculationRef.current = IDLE_SPECULATION;
44047
43850
  }
44048
43851
  }, [promptSuggestion]);
44049
- const [idePromptAnswered, setIdePromptAnswered] = (0, import_react165.useState)(false);
44050
- const [currentIDE, setCurrentIDE] = (0, import_react165.useState)(null);
44051
- const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0, import_react165.useState)({ state: "idle" });
44052
- (0, import_react165.useEffect)(() => {
43852
+ const [idePromptAnswered, setIdePromptAnswered] = (0, import_react161.useState)(false);
43853
+ const [currentIDE, setCurrentIDE] = (0, import_react161.useState)(null);
43854
+ const [startupIdeConnectionStatus, setStartupIdeConnectionStatus] = (0, import_react161.useState)({ state: "idle" });
43855
+ (0, import_react161.useEffect)(() => {
44053
43856
  const getIde = /* @__PURE__ */ __name(async () => {
44054
43857
  const ideClient = await IdeClient.getInstance();
44055
43858
  const currentIde = ideClient.getCurrentIde();
@@ -44065,40 +43868,40 @@ ${currentText}` : popped.modelText
44065
43868
  tomlFiles: commandMigrationTomlFiles,
44066
43869
  setShowMigrationNudge: setShowCommandMigrationNudge
44067
43870
  } = useCommandMigration(settings, config.storage);
44068
- const [showToolDescriptions, setShowToolDescriptions] = (0, import_react165.useState)(false);
43871
+ const [showToolDescriptions, setShowToolDescriptions] = (0, import_react161.useState)(false);
44069
43872
  const configuredRenderMode = settings.merged.ui?.renderMode;
44070
- const [renderMode, setRenderMode] = (0, import_react165.useState)(
43873
+ const [renderMode, setRenderMode] = (0, import_react161.useState)(
44071
43874
  configuredRenderMode === "raw" ? "raw" : "render"
44072
43875
  );
44073
- const renderModeConfigMountedRef = (0, import_react165.useRef)(false);
44074
- (0, import_react165.useEffect)(() => {
43876
+ const renderModeConfigMountedRef = (0, import_react161.useRef)(false);
43877
+ (0, import_react161.useEffect)(() => {
44075
43878
  if (!renderModeConfigMountedRef.current) {
44076
43879
  renderModeConfigMountedRef.current = true;
44077
43880
  return;
44078
43881
  }
44079
43882
  setRenderMode(configuredRenderMode === "raw" ? "raw" : "render");
44080
43883
  }, [configuredRenderMode]);
44081
- const renderModeMountedRef = (0, import_react165.useRef)(false);
44082
- (0, import_react165.useEffect)(() => {
43884
+ const renderModeMountedRef = (0, import_react161.useRef)(false);
43885
+ (0, import_react161.useEffect)(() => {
44083
43886
  if (!renderModeMountedRef.current) {
44084
43887
  renderModeMountedRef.current = true;
44085
43888
  return;
44086
43889
  }
44087
43890
  refreshStatic();
44088
43891
  }, [renderMode, refreshStatic]);
44089
- const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react165.useState)(false);
44090
- const ctrlCTimerRef = (0, import_react165.useRef)(null);
44091
- const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react165.useState)(false);
44092
- const ctrlDTimerRef = (0, import_react165.useRef)(null);
44093
- const [escapePressedOnce, setEscapePressedOnce] = (0, import_react165.useState)(false);
44094
- const escapeTimerRef = (0, import_react165.useRef)(null);
44095
- const dialogsVisibleRef = (0, import_react165.useRef)(false);
44096
- const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0, import_react165.useState)(false);
44097
- const [rewindEscPending, setRewindEscPending] = (0, import_react165.useState)(false);
44098
- const [constrainHeight, setConstrainHeight] = (0, import_react165.useState)(true);
44099
- const [ideContextState, setIdeContextState] = (0, import_react165.useState)();
44100
- const [showEscapePrompt, setShowEscapePrompt] = (0, import_react165.useState)(false);
44101
- const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react165.useState)(false);
43892
+ const [ctrlCPressedOnce, setCtrlCPressedOnce] = (0, import_react161.useState)(false);
43893
+ const ctrlCTimerRef = (0, import_react161.useRef)(null);
43894
+ const [ctrlDPressedOnce, setCtrlDPressedOnce] = (0, import_react161.useState)(false);
43895
+ const ctrlDTimerRef = (0, import_react161.useRef)(null);
43896
+ const [escapePressedOnce, setEscapePressedOnce] = (0, import_react161.useState)(false);
43897
+ const escapeTimerRef = (0, import_react161.useRef)(null);
43898
+ const dialogsVisibleRef = (0, import_react161.useRef)(false);
43899
+ const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0, import_react161.useState)(false);
43900
+ const [rewindEscPending, setRewindEscPending] = (0, import_react161.useState)(false);
43901
+ const [constrainHeight, setConstrainHeight] = (0, import_react161.useState)(true);
43902
+ const [ideContextState, setIdeContextState] = (0, import_react161.useState)();
43903
+ const [showEscapePrompt, setShowEscapePrompt] = (0, import_react161.useState)(false);
43904
+ const [showIdeRestartPrompt, setShowIdeRestartPrompt] = (0, import_react161.useState)(false);
44102
43905
  const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder);
44103
43906
  const {
44104
43907
  isMcpApprovalDialogOpen,
@@ -44126,12 +43929,6 @@ ${currentText}` : popped.modelText
44126
43929
  });
44127
43930
  const dialogsVisible = showWelcomeBackDialog || shouldShowIdePrompt || shouldShowCommandMigrationNudge || isFolderTrustDialogOpen || isMcpApprovalDialogOpen || !!shellConfirmationRequest || !!confirmationRequest || confirmUpdateExtensionRequests.length > 0 || !!providerUpdateRequest || settingInputRequests.length > 0 || pluginChoiceRequests.length > 0 || !!loopDetectionConfirmationRequest || isThemeDialogOpen || isSettingsDialogOpen || isStatusLineDialogOpen || isMemoryDialogOpen || isModelDialogOpen || isTrustDialogOpen || activeArenaDialog !== null || isPermissionsDialogOpen || isAuthDialogOpen || isAuthenticating || isEditorDialogOpen || showIdeRestartPrompt || isSubagentCreateDialogOpen || isAgentsManagerDialogOpen || isSkillsManagerDialogOpen || isMcpDialogOpen || isHooksDialogOpen || isStatsDialogOpen || isApprovalModeDialogOpen || isEffortDialogOpen || isResumeDialogOpen || isDeleteDialogOpen || isHelpDialogOpen || isExtensionsManagerDialogOpen || isRewindSelectorOpen || isDiffDialogOpen || isSkillReviewDialogOpen || bgTasksDialogOpen || showWorktreeExitDialog || !!(settings.corruptedPath && !settings.corruptionDialogDismissed);
44128
43931
  dialogsVisibleRef.current = dialogsVisible;
44129
- const needsBlockingInput = dialogsVisible || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */;
44130
- (0, import_react165.useEffect)(() => {
44131
- if (needsBlockingInput && isTranscriptOpen) {
44132
- closeTranscript();
44133
- }
44134
- }, [needsBlockingInput, isTranscriptOpen, closeTranscript]);
44135
43932
  const shouldShowStickyTodos = stickyTodos !== null && !dialogsVisible && !isFeedbackDialogOpen && streamingState === "responding" /* Responding */;
44136
43933
  const stickyTodoWidth = Math.min(mainAreaWidth, 64);
44137
43934
  const stickyTodoMaxVisibleItems = getStickyTodoMaxVisibleItemsForMode(
@@ -44143,12 +43940,12 @@ ${currentText}` : popped.modelText
44143
43940
  stickyTodoWidth,
44144
43941
  stickyTodoMaxVisibleItems
44145
43942
  ) : "hidden";
44146
- const [controlsHeight, setControlsHeight] = (0, import_react165.useState)(0);
43943
+ const [controlsHeight, setControlsHeight] = (0, import_react161.useState)(0);
44147
43944
  const liveAgentPanelLayoutKey = getLiveAgentPanelLayoutKey(
44148
43945
  bgTaskEntries,
44149
43946
  bgLivePanelFocused
44150
43947
  );
44151
- (0, import_react165.useLayoutEffect)(() => {
43948
+ (0, import_react161.useLayoutEffect)(() => {
44152
43949
  if (!mainControlsRef.current) {
44153
43950
  setControlsHeight(
44154
43951
  (previousHeight) => previousHeight === 0 ? previousHeight : 0
@@ -44195,7 +43992,7 @@ ${currentText}` : popped.modelText
44195
43992
  pager: settings.merged.tools?.shell?.pager,
44196
43993
  showColor: settings.merged.tools?.shell?.showColor
44197
43994
  });
44198
- (0, import_react165.useEffect)(() => {
43995
+ (0, import_react161.useEffect)(() => {
44199
43996
  if (activePtyId) {
44200
43997
  ShellExecutionService.resizePty(
44201
43998
  activePtyId,
@@ -44204,19 +44001,18 @@ ${currentText}` : popped.modelText
44204
44001
  );
44205
44002
  }
44206
44003
  }, [terminalWidth, availableTerminalHeight, activePtyId]);
44207
- useResizeSettleRepaint(terminalWidth, refreshStatic);
44208
44004
  useWakeRepaint(refreshStatic);
44209
- (0, import_react165.useEffect)(() => {
44005
+ (0, import_react161.useEffect)(() => {
44210
44006
  if (ideNeedsRestart) {
44211
44007
  setShowIdeRestartPrompt(true);
44212
44008
  }
44213
44009
  }, [ideNeedsRestart]);
44214
- (0, import_react165.useEffect)(() => {
44010
+ (0, import_react161.useEffect)(() => {
44215
44011
  const unsubscribe = ideContextStore.subscribe(setIdeContextState);
44216
44012
  setIdeContextState(ideContextStore.get());
44217
44013
  return unsubscribe;
44218
44014
  }, []);
44219
- (0, import_react165.useEffect)(() => {
44015
+ (0, import_react161.useEffect)(() => {
44220
44016
  const listener = /* @__PURE__ */ __name((status) => {
44221
44017
  setStartupIdeConnectionStatus(status);
44222
44018
  }, "listener");
@@ -44225,10 +44021,10 @@ ${currentText}` : popped.modelText
44225
44021
  appEvents.off("startup-ide-connection-status-changed" /* StartupIdeConnectionStatusChanged */, listener);
44226
44022
  };
44227
44023
  }, []);
44228
- const handleEscapePromptChange = (0, import_react165.useCallback)((showPrompt) => {
44024
+ const handleEscapePromptChange = (0, import_react161.useCallback)((showPrompt) => {
44229
44025
  setShowEscapePrompt(showPrompt);
44230
44026
  }, []);
44231
- const openRewindSelector = (0, import_react165.useCallback)(() => {
44027
+ const openRewindSelector = (0, import_react161.useCallback)(() => {
44232
44028
  if (streamingState !== "idle" /* Idle */) return;
44233
44029
  if (dialogsVisibleRef.current) return;
44234
44030
  if (config.getIdeMode()) {
@@ -44246,10 +44042,10 @@ ${currentText}` : popped.modelText
44246
44042
  setIsRewindSelectorOpen(true);
44247
44043
  }, [streamingState, config, historyManager]);
44248
44044
  openRewindSelectorRef.current = openRewindSelector;
44249
- const closeRewindSelector = (0, import_react165.useCallback)(() => {
44045
+ const closeRewindSelector = (0, import_react161.useCallback)(() => {
44250
44046
  setIsRewindSelectorOpen(false);
44251
44047
  }, []);
44252
- const handleRewindConfirm = (0, import_react165.useCallback)(
44048
+ const handleRewindConfirm = (0, import_react161.useCallback)(
44253
44049
  async (userItem, option) => {
44254
44050
  try {
44255
44051
  const needsConversation = option === "conversation" || option === "both";
@@ -44413,7 +44209,7 @@ ${currentText}` : popped.modelText
44413
44209
  openRewindSelector,
44414
44210
  (pending) => setRewindEscPending(pending)
44415
44211
  );
44416
- const handleIdePromptComplete = (0, import_react165.useCallback)(
44212
+ const handleIdePromptComplete = (0, import_react161.useCallback)(
44417
44213
  (result) => {
44418
44214
  if (result.userSelection === "yes") {
44419
44215
  if (result.isExtensionPreInstalled) {
@@ -44429,7 +44225,7 @@ ${currentText}` : popped.modelText
44429
44225
  },
44430
44226
  [handleSlashCommand, settings]
44431
44227
  );
44432
- const handleCommandMigrationComplete = (0, import_react165.useCallback)(
44228
+ const handleCommandMigrationComplete = (0, import_react161.useCallback)(
44433
44229
  async (result) => {
44434
44230
  setShowCommandMigrationNudge(false);
44435
44231
  if (result.userSelection === "yes") {
@@ -44521,7 +44317,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44521
44317
  pendingToolCalls
44522
44318
  });
44523
44319
  const workflowBellEnabled = settings.merged.general?.terminalBell ?? true;
44524
- (0, import_react165.useEffect)(() => {
44320
+ (0, import_react161.useEffect)(() => {
44525
44321
  const registry = config.getWorkflowRunRegistry?.();
44526
44322
  if (!registry?.setNotificationCallback) return;
44527
44323
  registry.setNotificationCallback((entry) => {
@@ -44571,7 +44367,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44571
44367
  showWorktreeExitDialog,
44572
44368
  closeWorktreeExitDialog: /* @__PURE__ */ __name(() => setShowWorktreeExitDialog(false), "closeWorktreeExitDialog")
44573
44369
  });
44574
- const handleExit = (0, import_react165.useCallback)(
44370
+ const handleExit = (0, import_react161.useCallback)(
44575
44371
  (pressedOnce, setPressedOnce, timerRef) => {
44576
44372
  if (pressedOnce) {
44577
44373
  if (timerRef.current) {
@@ -44624,30 +44420,16 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44624
44420
  activeWorktree
44625
44421
  ]
44626
44422
  );
44627
- const handleGlobalKeypress = (0, import_react165.useCallback)(
44423
+ const handleGlobalKeypress = (0, import_react161.useCallback)(
44628
44424
  (key) => {
44629
44425
  if (settings.merged.general?.debugKeystrokeLogging) {
44630
- debugLogger40.debug("[DEBUG] Keystroke:", JSON.stringify(key));
44631
- }
44632
- if (isTranscriptOpenRef.current) {
44633
- if (keyMatchers["escape" /* ESCAPE */](key) || // Bare `q` only — Ink reports Ctrl/Alt/Shift+Q as `{ name: 'q', … }`
44634
- // too (Alt arrives as `meta`), so guard every modifier to avoid those
44635
- // silently closing it (Shift+Q is the user typing a literal `Q`, not
44636
- // a close request).
44637
- key.name === "q" && !key.ctrl && !key.meta && !key.shift || keyMatchers["quit" /* QUIT */](key) || keyMatchers["exit" /* EXIT */](key) || keyMatchers["toggleTranscript" /* TOGGLE_TRANSCRIPT */](key)) {
44638
- closeTranscript();
44639
- }
44640
- return;
44426
+ debugLogger39.debug("[DEBUG] Keystroke:", JSON.stringify(key));
44641
44427
  }
44642
44428
  if (keyMatchers["toggleThinkingExpanded" /* TOGGLE_THINKING_EXPANDED */](key)) {
44643
44429
  setThoughtExpanded((prev) => !prev);
44644
44430
  refreshStatic();
44645
44431
  return;
44646
44432
  }
44647
- if (keyMatchers["toggleTranscript" /* TOGGLE_TRANSCRIPT */](key)) {
44648
- openTranscript();
44649
- return;
44650
- }
44651
44433
  if (keyMatchers["quit" /* QUIT */](key)) {
44652
44434
  if (isAuthenticating) {
44653
44435
  return;
@@ -44759,7 +44541,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44759
44541
  );
44760
44542
  if (promotableShells.length === 1) {
44761
44543
  const executingShell = promotableShells[0];
44762
- debugLogger40.debug(
44544
+ debugLogger39.debug(
44763
44545
  `Ctrl+B promote: matched executing shell tool call ${executingShell.request.callId}`
44764
44546
  );
44765
44547
  executingShell.promoteAbortController.abort({
@@ -44767,7 +44549,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44767
44549
  });
44768
44550
  return;
44769
44551
  }
44770
- debugLogger40.debug(
44552
+ debugLogger39.debug(
44771
44553
  `Ctrl+B promote: expected exactly one executing shell tool call; falling through (streamingState=${streamingState}, pendingToolCalls=${pendingToolCallsRef.current.length}, promotableShells=${promotableShells.length})`
44772
44554
  );
44773
44555
  }
@@ -44808,13 +44590,11 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44808
44590
  handleDoubleEscRewind,
44809
44591
  vimEnabled,
44810
44592
  vimMode,
44811
- setThoughtExpanded,
44812
- openTranscript,
44813
- closeTranscript
44593
+ setThoughtExpanded
44814
44594
  ]
44815
44595
  );
44816
44596
  useKeypress(handleGlobalKeypress, { isActive: true });
44817
- (0, import_react165.useEffect)(() => {
44597
+ (0, import_react161.useEffect)(() => {
44818
44598
  if (settings.merged.ui?.hideWindowTitle) {
44819
44599
  return;
44820
44600
  }
@@ -44841,9 +44621,9 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44841
44621
  settings.merged.ui?.showStatusInTitle,
44842
44622
  config
44843
44623
  ]);
44844
- const queueDrainingRef = (0, import_react165.useRef)(false);
44845
- const [queueDrainNonce, setQueueDrainNonce] = (0, import_react165.useState)(0);
44846
- (0, import_react165.useEffect)(() => {
44624
+ const queueDrainingRef = (0, import_react161.useRef)(false);
44625
+ const [queueDrainNonce, setQueueDrainNonce] = (0, import_react161.useState)(0);
44626
+ (0, import_react161.useEffect)(() => {
44847
44627
  if (queueDrainingRef.current) return;
44848
44628
  if (!shouldDrainMessageQueue({
44849
44629
  isConfigInitialized,
@@ -44854,7 +44634,6 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44854
44634
  })) {
44855
44635
  return;
44856
44636
  }
44857
- if (isTranscriptOpenRef.current) return;
44858
44637
  const submission = popNextTurn();
44859
44638
  if (submission === null) return;
44860
44639
  queueDrainingRef.current = true;
@@ -44867,15 +44646,13 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
44867
44646
  streamingState,
44868
44647
  isProcessing,
44869
44648
  dialogsVisible,
44870
- // Re-run the drain when the transcript closes so queued messages resume.
44871
- isTranscriptOpen,
44872
44649
  messageQueue,
44873
44650
  popNextTurn,
44874
44651
  submitUserQuery,
44875
44652
  queueDrainNonce
44876
44653
  ]);
44877
44654
  const nightly = props.version.includes("nightly");
44878
- const uiState = (0, import_react165.useMemo)(
44655
+ const uiState = (0, import_react161.useMemo)(
44879
44656
  () => ({
44880
44657
  history: historyManager.history,
44881
44658
  historyManager,
@@ -45168,7 +44945,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
45168
44945
  isDiffDialogOpen
45169
44946
  ]
45170
44947
  );
45171
- const uiActions = (0, import_react165.useMemo)(
44948
+ const uiActions = (0, import_react161.useMemo)(
45172
44949
  () => ({
45173
44950
  openThemeDialog,
45174
44951
  openEditorDialog,
@@ -45351,11 +45128,11 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
45351
45128
  closeDiffDialog
45352
45129
  ]
45353
45130
  );
45354
- const renderModeValue = (0, import_react165.useMemo)(
45131
+ const renderModeValue = (0, import_react161.useMemo)(
45355
45132
  () => ({ renderMode, setRenderMode }),
45356
45133
  [renderMode, setRenderMode]
45357
45134
  );
45358
- const thoughtExpandedValue = (0, import_react165.useMemo)(
45135
+ const thoughtExpandedValue = (0, import_react161.useMemo)(
45359
45136
  () => ({
45360
45137
  allExpanded: thoughtExpanded,
45361
45138
  expandedHeadIds: expandedThoughtHeadIds,
@@ -45363,38 +45140,23 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
45363
45140
  }),
45364
45141
  [thoughtExpanded, expandedThoughtHeadIds, toggleThoughtExpanded]
45365
45142
  );
45366
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(VirtualViewportContext.Provider, { value: useTerminalBuffer, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
45143
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(VirtualViewportContext.Provider, { value: useTerminalBuffer, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
45367
45144
  AppContext.Provider,
45368
45145
  {
45369
45146
  value: {
45370
45147
  version: props.version,
45371
45148
  startupWarnings
45372
45149
  },
45373
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ThoughtExpandedProvider, { value: thoughtExpandedValue, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(RenderModeProvider, { value: renderModeValue, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TerminalOutputProvider, { value: writeRaw, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ShellFocusContext.Provider, { value: isFocused, children: transcriptFreeze ? (
45374
- // TranscriptView renders as a sibling of <App/>, which
45375
- // owns the StreamingContext.Provider — so the frozen
45376
- // transcript subtree has no provider of its own. A
45377
- // pending tool group captured in the snapshot can hold a
45378
- // tool in the Executing state, whose spinner calls
45379
- // useStreamingContext and would otherwise throw. Provide
45380
- // the context here so the transcript renders.
45381
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
45382
- TranscriptView,
45383
- {
45384
- items: transcriptItems,
45385
- useAlternateScreen: !useTerminalBuffer
45386
- }
45387
- ) })
45388
- ) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(App, {}) }) }) }) })
45150
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ThoughtExpandedProvider, { value: thoughtExpandedValue, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(RenderModeProvider, { value: renderModeValue, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TerminalOutputProvider, { value: writeRaw, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(App, {}) }) }) }) })
45389
45151
  }
45390
45152
  ) }) }) }) });
45391
45153
  }, "AppContainer");
45392
45154
 
45393
45155
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
45394
45156
  init_esbuild_shims();
45395
- var import_react166 = __toESM(require_react(), 1);
45157
+ var import_react162 = __toESM(require_react(), 1);
45396
45158
  function useKittyKeyboardProtocol() {
45397
- const [status] = (0, import_react166.useState)({
45159
+ const [status] = (0, import_react162.useState)({
45398
45160
  supported: isKittyProtocolSupported(),
45399
45161
  enabled: isKittyProtocolEnabled(),
45400
45162
  checking: false
@@ -45591,8 +45353,8 @@ function installSynchronizedOutput(stdout = process.stdout, env = process.env) {
45591
45353
  __name(installSynchronizedOutput, "installSynchronizedOutput");
45592
45354
 
45593
45355
  // packages/cli/src/ui/startInteractiveUI.tsx
45594
- var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1);
45595
- var debugLogger41 = createDebugLogger("STARTUP");
45356
+ var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1);
45357
+ var debugLogger40 = createDebugLogger("STARTUP");
45596
45358
  var PRESSURE_CHECK_INTERVAL_MS = 3e4;
45597
45359
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), initializationResult, options = {}) {
45598
45360
  const version = await getCliVersion();
@@ -45630,7 +45392,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45630
45392
  );
45631
45393
  }
45632
45394
  } catch (err) {
45633
- debugLogger41.error("Failed to initialize dual output bridge:", err);
45395
+ debugLogger40.error("Failed to initialize dual output bridge:", err);
45634
45396
  writeStderrLine(
45635
45397
  `Warning: dual output disabled \u2014 ${err instanceof Error ? err.message : String(err)}`
45636
45398
  );
@@ -45641,7 +45403,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45641
45403
  try {
45642
45404
  remoteInputWatcher = new RemoteInputWatcher(inputFile);
45643
45405
  } catch (err) {
45644
- debugLogger41.error("Failed to initialize remote input watcher:", err);
45406
+ debugLogger40.error("Failed to initialize remote input watcher:", err);
45645
45407
  writeStderrLine(
45646
45408
  `Warning: remote input disabled \u2014 ${err instanceof Error ? err.message : String(err)}`
45647
45409
  );
@@ -45656,7 +45418,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45656
45418
  const AppWrapper = /* @__PURE__ */ __name(() => {
45657
45419
  const kittyProtocolStatus = useKittyKeyboardProtocol();
45658
45420
  const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
45659
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(RemoteInputContext.Provider, { value: remoteInputWatcher, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DualOutputContext.Provider, { value: dualOutputBridge, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
45421
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(RemoteInputContext.Provider, { value: remoteInputWatcher, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DualOutputContext.Provider, { value: dualOutputBridge, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
45660
45422
  KeypressProvider,
45661
45423
  {
45662
45424
  kittyProtocolEnabled: kittyProtocolStatus.enabled,
@@ -45664,7 +45426,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45664
45426
  debugKeystrokeLogging: settings.merged.general?.debugKeystrokeLogging,
45665
45427
  pasteWorkaround: process.platform === "win32" || nodeMajorVersion < 20,
45666
45428
  initialCapturedInput,
45667
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(SessionStatsProvider, { sessionId: config.getSessionId(), children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(VimModeProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(AgentViewProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(BackgroundTaskViewProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
45429
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SessionStatsProvider, { sessionId: config.getSessionId(), children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(VimModeProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AgentViewProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(BackgroundTaskViewProvider, { config, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
45668
45430
  AppContainer,
45669
45431
  {
45670
45432
  config,
@@ -45683,11 +45445,12 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
45683
45445
  if (useVP) {
45684
45446
  process.stdout.setMaxListeners(0);
45685
45447
  }
45686
- const appTree = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
45448
+ const appTree = /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
45687
45449
  ErrorBoundary,
45688
45450
  {
45451
+ recordForExitEcho: true,
45689
45452
  onError: (error, info) => {
45690
- debugLogger41.error(
45453
+ debugLogger40.error(
45691
45454
  `[FATAL_RENDER_ERROR] ${error.message}
45692
45455
  ${info.componentStack ?? ""}
45693
45456
  ${error.stack ?? ""}`
@@ -45696,11 +45459,11 @@ ${error.stack ?? ""}`
45696
45459
  void runExitCleanup().then(() => process.exit(1));
45697
45460
  }, 5e3);
45698
45461
  },
45699
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(AppWrapper, {})
45462
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AppWrapper, {})
45700
45463
  }
45701
45464
  );
45702
45465
  const instance = render_default(
45703
- process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_react167.default.StrictMode, { children: appTree }) : appTree,
45466
+ process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react163.default.StrictMode, { children: appTree }) : appTree,
45704
45467
  {
45705
45468
  exitOnCtrlC: false,
45706
45469
  isScreenReaderEnabled: config.getScreenReader(),
@@ -45741,6 +45504,14 @@ ${error.stack ?? ""}`
45741
45504
  }
45742
45505
  restoreSynchronizedOutput();
45743
45506
  restoreTerminalRedrawOptimizer();
45507
+ const renderError = consumeLastRenderError();
45508
+ if (renderError) {
45509
+ const loggedHint = isDebugLogFileEnabled() ? " (logged to debug file)" : "";
45510
+ writeStderrLine(
45511
+ `
45512
+ Rendering error${loggedHint}: ${sanitizeTerminalText(renderError.message)}`
45513
+ );
45514
+ }
45744
45515
  });
45745
45516
  }
45746
45517
  __name(startInteractiveUI, "startInteractiveUI");