@organizaone/o1-code 0.21.7 → 0.21.10

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 (276) hide show
  1. package/chunks/{MaxSizedBox-KSMVEOUG.js → MaxSizedBox-FJ6C2KZK.js} +26 -27
  2. package/chunks/{StandaloneSessionPicker-WBGTMJDM.js → StandaloneSessionPicker-CWXWHXGS.js} +41 -42
  3. package/chunks/{acp-subagent-executor-7NJVMZZY.js → acp-subagent-executor-FNXCNLE4.js} +24 -24
  4. package/chunks/{acpAgent-B2GHZBGB.js → acpAgent-SV63EP4F.js} +109 -110
  5. package/chunks/{agent-TH4FMIEQ.js → agent-7YR4AKUE.js} +13 -13
  6. package/chunks/{agent-headless-S7SDHOOR.js → agent-headless-PA5EHZLH.js} +13 -13
  7. package/chunks/{all-providers-VN6R4EOW.js → all-providers-IRY4MO56.js} +3 -3
  8. package/chunks/{anthropicContentGenerator-SJCJCLLS.js → anthropicContentGenerator-BK3JPNMQ.js} +7 -7
  9. package/chunks/{bridge-XC5DHEQ2.js → bridge-X4L7QZHF.js} +25 -25
  10. package/chunks/{build-MAJLYX7D.js → build-U7CYF476.js} +3 -1
  11. package/chunks/{chunk-AWMOHE2Z.js → chunk-2AS35LME.js} +4 -4
  12. package/chunks/{chunk-R6QCRZTF.js → chunk-2J5KVLHY.js} +22 -2
  13. package/chunks/{chunk-2GBUKUFR.js → chunk-2VBHBRZZ.js} +5 -5
  14. package/chunks/{chunk-JQAQ6BCR.js → chunk-37HZ4W24.js} +1 -1
  15. package/chunks/{chunk-JJRS5WW2.js → chunk-3DOSV7VB.js} +2 -2
  16. package/chunks/{chunk-R7SPXY4A.js → chunk-3MYKJC6P.js} +1 -1
  17. package/chunks/{chunk-IE4RH3YW.js → chunk-4ABCTDVK.js} +1 -1
  18. package/chunks/{chunk-N2D4M5H7.js → chunk-5GSWMIDF.js} +2 -2
  19. package/chunks/{chunk-W2B55HZP.js → chunk-5RHVEZCT.js} +2 -2
  20. package/chunks/{chunk-V5NPRDZP.js → chunk-5YWGYTY5.js} +4 -4
  21. package/chunks/{chunk-7UVSBCBO.js → chunk-6G2QCKHE.js} +40 -42
  22. package/chunks/{chunk-54JQMCRJ.js → chunk-77C6SJX6.js} +1 -1
  23. package/chunks/{chunk-KQH2ZTLC.js → chunk-7EZKXBZF.js} +24897 -31464
  24. package/chunks/{chunk-P7RO4QSF.js → chunk-7HN3RHKV.js} +998 -87
  25. package/chunks/{chunk-LJG2GEUH.js → chunk-A4PPT6FK.js} +2 -2
  26. package/chunks/{chunk-R66FHOGT.js → chunk-A5M4PU7C.js} +1 -1
  27. package/chunks/{chunk-3VJZ4EGX.js → chunk-A6QLPS5V.js} +3 -3
  28. package/chunks/{chunk-NUSDLSOD.js → chunk-AAJUSHR6.js} +1 -1
  29. package/chunks/{chunk-HIMOZPLA.js → chunk-AAW2TG66.js} +1 -0
  30. package/chunks/{chunk-H73LIQA3.js → chunk-AIPLJV3Z.js} +8 -8
  31. package/chunks/{chunk-7DQWDZUQ.js → chunk-AZMVJ5C3.js} +1 -1
  32. package/chunks/{chunk-YYMSSOUH.js → chunk-AZW3MOGG.js} +1 -1
  33. package/chunks/{chunk-JNTC73DK.js → chunk-BDB73PON.js} +344 -251
  34. package/chunks/{chunk-6CE7A7XV.js → chunk-CHKOOGOG.js} +8 -8
  35. package/chunks/{chunk-XYA43OKS.js → chunk-CRZLYMW5.js} +1 -1
  36. package/chunks/{chunk-SCDW5FBL.js → chunk-CZFWZRC5.js} +1 -1
  37. package/chunks/{chunk-DOARTD2M.js → chunk-D45V5VQP.js} +1 -1
  38. package/chunks/{chunk-TJYFNI7A.js → chunk-DPMMO2N7.js} +1 -1
  39. package/chunks/{chunk-TJQTTY4F.js → chunk-DQORDG4A.js} +2 -2
  40. package/chunks/{chunk-NU7LOATP.js → chunk-DTJG43NT.js} +4 -4
  41. package/chunks/{chunk-R5HO4EJV.js → chunk-E2NTOSGU.js} +1 -1
  42. package/chunks/{chunk-NBMN763T.js → chunk-EI3BQUUV.js} +3 -3
  43. package/chunks/{chunk-RVRJZT5M.js → chunk-EVIGOLAL.js} +1 -1
  44. package/chunks/{chunk-SJXR2EXI.js → chunk-F6E5OEF4.js} +1 -1
  45. package/chunks/{chunk-XRY6XLJD.js → chunk-FGRVF6H3.js} +1350 -168
  46. package/chunks/{chunk-6NBAY4AG.js → chunk-FLQMNGAF.js} +3 -3
  47. package/chunks/{chunk-AM6SU4HK.js → chunk-G3IKG3HV.js} +2 -2
  48. package/chunks/{chunk-7TFQ4MBE.js → chunk-GC2ERDQL.js} +3 -3
  49. package/chunks/{chunk-TC2TJAOF.js → chunk-GM2WNDZ5.js} +1 -1
  50. package/chunks/{chunk-JM6J5ASY.js → chunk-GVCGYCCE.js} +2 -2
  51. package/chunks/{chunk-RUHXHJDO.js → chunk-HEELTUTL.js} +1 -1
  52. package/chunks/{chunk-PMYQMKUC.js → chunk-IHOWB2BG.js} +6 -6
  53. package/chunks/{chunk-V3XZTGJW.js → chunk-ILSK2K5P.js} +1 -1
  54. package/chunks/{chunk-QYSP7E7N.js → chunk-JB5RH2RR.js} +2 -2
  55. package/chunks/{chunk-EOZZ7CZT.js → chunk-JD2XBV4H.js} +7 -7
  56. package/chunks/{chunk-N3P6HTB2.js → chunk-JS723QZ3.js} +4 -4
  57. package/chunks/{chunk-IZWMLSJK.js → chunk-KAKF4XJG.js} +4 -4
  58. package/chunks/{chunk-XMWIH4MM.js → chunk-KBL56IWK.js} +1 -1
  59. package/chunks/{chunk-ECDA4WRP.js → chunk-KEKBYXC3.js} +4 -4
  60. package/chunks/{chunk-JY2XL5ZF.js → chunk-LPQZYMAP.js} +2 -2
  61. package/chunks/{chunk-PC65ZVRU.js → chunk-M7UZ3MU6.js} +2 -2
  62. package/chunks/{chunk-7SWY3CW2.js → chunk-MSWEGIQG.js} +1 -1
  63. package/chunks/{chunk-5NQPR6ZR.js → chunk-NCGQPRHQ.js} +12 -12
  64. package/chunks/{chunk-VZTF4OOG.js → chunk-NHTNE6KQ.js} +1 -1
  65. package/chunks/{chunk-EWPNBHJ5.js → chunk-NLU5GWN2.js} +2 -2
  66. package/chunks/{chunk-HVQQIKDI.js → chunk-NUF3FLRS.js} +1 -1
  67. package/chunks/{chunk-KXLKGWX4.js → chunk-NXEXWZLN.js} +6 -6
  68. package/chunks/{chunk-K2SSUCN3.js → chunk-OCLOTHK2.js} +1 -1
  69. package/chunks/{chunk-6VF7EU56.js → chunk-P4JFO6QK.js} +5 -2
  70. package/chunks/{chunk-D6FL5RTE.js → chunk-P6NZWNQV.js} +4 -4
  71. package/chunks/{chunk-PRNMGVOU.js → chunk-PAUZVMDC.js} +2 -2
  72. package/chunks/{chunk-HCKSE3DQ.js → chunk-PC7DSMKL.js} +1 -1
  73. package/chunks/{chunk-35MAUYQX.js → chunk-PKKMIKJY.js} +4 -4
  74. package/chunks/{chunk-FYIXVVSS.js → chunk-PN3OU2HT.js} +7 -7
  75. package/chunks/{chunk-IEKYDNVM.js → chunk-PTOAGZBC.js} +3 -3
  76. package/chunks/{chunk-UFBWN6GO.js → chunk-Q76KPZ6F.js} +7 -7
  77. package/chunks/{chunk-I376VKOZ.js → chunk-QAJJA76Y.js} +2 -2
  78. package/chunks/{chunk-MRTHM5GF.js → chunk-R5AMOGLJ.js} +13 -4
  79. package/chunks/{chunk-T5C5LMFJ.js → chunk-RGQ47LIC.js} +11 -11
  80. package/chunks/{chunk-3HKTHY6V.js → chunk-RWOFJXCI.js} +37 -37
  81. package/chunks/{chunk-CCKT3LRB.js → chunk-S4PWRZB6.js} +2 -2
  82. package/chunks/{chunk-KMWAEX43.js → chunk-S6F7ZE4T.js} +5898 -931
  83. package/chunks/{chunk-HDGYCLNB.js → chunk-S6HB6BVJ.js} +1 -1
  84. package/chunks/{chunk-ESBIRQCE.js → chunk-S7L7UWX7.js} +1 -1
  85. package/chunks/{chunk-JOBZWTVK.js → chunk-SLH747HE.js} +2 -2
  86. package/chunks/{chunk-OJF7X35J.js → chunk-SLXNWEFC.js} +5 -5
  87. package/chunks/{chunk-HH62GKKA.js → chunk-SMJRDORP.js} +1 -1
  88. package/chunks/{chunk-E4ETMOCY.js → chunk-T224WOVX.js} +2 -2
  89. package/chunks/{chunk-CBZAVLXA.js → chunk-UKFESCEI.js} +2 -2
  90. package/chunks/{chunk-UPG4HSDF.js → chunk-UMI446BY.js} +1 -1
  91. package/chunks/{chunk-R2LEWAYI.js → chunk-UTWS2ZCR.js} +1 -1
  92. package/chunks/{chunk-RY6YWQNA.js → chunk-UU3BV6SB.js} +1 -1
  93. package/chunks/{chunk-EYUVZKAI.js → chunk-VFN6U5I2.js} +2 -2
  94. package/chunks/{chunk-M75MHHKK.js → chunk-VHHVDB5F.js} +1 -1
  95. package/chunks/{chunk-6BN2BUXV.js → chunk-VY2R32ZP.js} +5 -5
  96. package/chunks/{chunk-EZKRQYVY.js → chunk-WMH3SYFF.js} +3 -3
  97. package/chunks/{chunk-E7EWK6XV.js → chunk-WOEB2UQY.js} +3 -3
  98. package/chunks/{chunk-GD7S43QP.js → chunk-XDUTL6ZZ.js} +4 -4
  99. package/chunks/{chunk-FQVQT4TX.js → chunk-XT3S375S.js} +5 -5
  100. package/chunks/{chunk-JEA3U65O.js → chunk-XV4KEHP2.js} +2 -2
  101. package/chunks/{chunk-W7NMNNKN.js → chunk-YA7ULYER.js} +12 -12
  102. package/chunks/{chunk-5CQHXP4X.js → chunk-YKVRRLWF.js} +3 -3
  103. package/chunks/{chunk-JYDVXBGK.js → chunk-Z7UCHNEI.js} +3 -3
  104. package/chunks/{chunk-37YWUOWY.js → chunk-ZCX6KV2Q.js} +552 -553
  105. package/chunks/{codex-subagent-executor-WMH54RGD.js → codex-subagent-executor-BAF5CFEM.js} +24 -24
  106. package/chunks/{contextCommand-VC2Q2P3K.js → contextCommand-IVSOHLW5.js} +23 -23
  107. package/chunks/{core-runtime-BO4A6L7N.js → core-runtime-5UV3KSLE.js} +22 -22
  108. package/chunks/{create-sub-session-B3RRZWZX.js → create-sub-session-OAMGFOTT.js} +23 -23
  109. package/chunks/{daemon-git-worktree-guard-FG4LCHET.js → daemon-git-worktree-guard-5CT5ACGZ.js} +22 -22
  110. package/chunks/{daemon-status-provider-JMSXKGL2.js → daemon-status-provider-4O5GUQXO.js} +30 -30
  111. package/chunks/{daemon-trust-policy-B3G5SW6N.js → daemon-trust-policy-ZTONW2EF.js} +27 -27
  112. package/chunks/{daemon-trust-policy-monitor-2CA65WGV.js → daemon-trust-policy-monitor-AH3MSX6S.js} +27 -27
  113. package/chunks/{deferred-core-runtime-3RDIX523.js → deferred-core-runtime-EZELEJEB.js} +22 -22
  114. package/chunks/{edit-L5GTDREM.js → edit-5E7R4FGC.js} +15 -15
  115. package/chunks/{enterPlanMode-U3GDJRHW.js → enterPlanMode-2ZA3VKE5.js} +13 -13
  116. package/chunks/{environment-I7WX5X5M.js → environment-PZC2VS6I.js} +24 -24
  117. package/chunks/{errors-VRJJMYRX.js → errors-PCDU7EH5.js} +24 -24
  118. package/chunks/{execution-tool-ZP54ULEB.js → execution-tool-VOKPN4R3.js} +15 -15
  119. package/chunks/{execution-worker-KVOEQMMI.js → execution-worker-IBFJY6CH.js} +18 -18
  120. package/chunks/{exitPlanMode-E2WUKN3H.js → exitPlanMode-3KEJ5X4V.js} +13 -13
  121. package/chunks/{fast-path-XC37ILCB.js → fast-path-SWIIYG2P.js} +2 -2
  122. package/chunks/{foreground-runner-DP6XQSZM.js → foreground-runner-SQ4PZZRO.js} +77 -40
  123. package/chunks/{glob-C7LO5FXS.js → glob-OESTKXLC.js} +13 -13
  124. package/chunks/{goal-tools-3AWUWDA2.js → goal-tools-BOLGH57J.js} +13 -13
  125. package/chunks/{handleAutoUpdate-DQ4TG2MS.js → handleAutoUpdate-Q4PZA3AF.js} +25 -25
  126. package/chunks/{i18n-5CVW67JG.js → i18n-NREBC77M.js} +22 -22
  127. package/chunks/{image-gen-27Q5XGGZ.js → image-gen-KX5VPAGI.js} +3 -3
  128. package/chunks/{initializer-H76QQXH4.js → initializer-AZDTSPLB.js} +28 -29
  129. package/chunks/{installationInfo-FHGRGQBH.js → installationInfo-MIBZV3CK.js} +22 -22
  130. package/chunks/{list-YUF62GHJ.js → list-G3F6YMX3.js} +29 -29
  131. package/chunks/{llm-ADULBBKO.js → llm-2ZTGYBSH.js} +58 -58
  132. package/chunks/{llm-content-generator-6U5TYIES.js → llm-content-generator-J7URYLZ7.js} +5 -5
  133. package/chunks/{loadedSettingsAdapter-EYPSWKNO.js → loadedSettingsAdapter-T5K3RK6B.js} +27 -27
  134. package/chunks/{local-execution-environment-OJVVXTIM.js → local-execution-environment-VZZ6GAFG.js} +18 -18
  135. package/chunks/{loggingContentGenerator-FBAGMYJO.js → loggingContentGenerator-3TU53NDQ.js} +15 -15
  136. package/chunks/{managed-npm-update-ODTVQ62K.js → managed-npm-update-SZ7V4ZXK.js} +22 -22
  137. package/chunks/{mcp-B5XE2ZPU.js → mcp-JOYX3TT5.js} +27 -27
  138. package/chunks/{model-call-collection-MVGLDLNL.js → model-call-collection-YABIWR5B.js} +1 -1
  139. package/chunks/{model-configuration-5FSAEZFG.js → model-configuration-CJKGPW2E.js} +28 -28
  140. package/chunks/{modelConfigUtils-WXI3RUVN.js → modelConfigUtils-EZMPC47D.js} +24 -24
  141. package/chunks/{monitor-YSKEJ67F.js → monitor-SG5LYTI4.js} +13 -13
  142. package/chunks/{nonInteractiveCli-Y4VQGPU3.js → nonInteractiveCli-KKENBKF7.js} +58 -59
  143. package/chunks/{nonInteractiveToolExecutor-S6DZNQYH.js → nonInteractiveToolExecutor-4CS4TEMJ.js} +14 -14
  144. package/chunks/{notebook-edit-B7RQZI4A.js → notebook-edit-57PXAYZN.js} +14 -14
  145. package/chunks/{omni-WXNOAMT7.js → omni-FUNBK2BA.js} +12 -12
  146. package/chunks/{openai-44SFHTR2.js → openai-XJV7KGB7.js} +11 -3
  147. package/chunks/{openaiContentGenerator-7LKIXBKH.js → openaiContentGenerator-VSMKP2PK.js} +11 -11
  148. package/chunks/{openaiResponsesContentGenerator-BCQ4GRCZ.js → openaiResponsesContentGenerator-HKMETP6V.js} +7 -7
  149. package/chunks/{processUtils-UOUOWKIO.js → processUtils-QMGAKTAD.js} +2 -2
  150. package/chunks/{prompt-terminal-ledger-GCAC6CVW.js → prompt-terminal-ledger-26V5OPOY.js} +23 -23
  151. package/chunks/{pty-host-process-Y4BPXZFM.js → pty-host-process-UP752FWV.js} +1 -1
  152. package/chunks/{reactive-degrade-DAD2GNTE.js → reactive-degrade-J7RMY47P.js} +11 -11
  153. package/chunks/{read-file-4M25AWZW.js → read-file-NOSU4AB6.js} +2 -2
  154. package/chunks/{resumeHistoryUtils-A2ZIPK72.js → resumeHistoryUtils-KQDIT4GG.js} +27 -28
  155. package/chunks/{ripGrep-ULG5YOFZ.js → ripGrep-X5XFME7P.js} +2 -2
  156. package/chunks/{run-o1-code-serve-J3KMS2EV.js → run-o1-code-serve-LBX526TI.js} +43 -43
  157. package/chunks/{sandboxConfig-37E2NZVJ.js → sandboxConfig-XSQ3WWPO.js} +22 -22
  158. package/chunks/{scheduled-tasks-VYOEL3HD.js → scheduled-tasks-2C2BJKKF.js} +28 -28
  159. package/chunks/{scheduler-JOUK3FZE.js → scheduler-MYI7M6ZV.js} +24 -24
  160. package/chunks/{serve-26KUEPHX.js → serve-I4442E26.js} +27 -27
  161. package/chunks/{server-PTOFCXOE.js → server-QYP5Y5X7.js} +134 -134
  162. package/chunks/{session-2Q2UN3P6.js → session-OIFZMGIG.js} +59 -60
  163. package/chunks/{session-YDZJ2DIQ.js → session-OYM3OHGL.js} +2 -2
  164. package/chunks/{session-attachments-root-N5HYHFBJ.js → session-attachments-root-MRIKLMKD.js} +22 -22
  165. package/chunks/{session-pr-refresh-JFJZC4R2.js → session-pr-refresh-6GHYSKLU.js} +27 -27
  166. package/chunks/{settings-AL3WSHXU.js → settings-CTNVOXKI.js} +26 -26
  167. package/chunks/{shell-PIDQ3F7H.js → shell-PYQDIUC3.js} +13 -13
  168. package/chunks/{skill-KBAFPZTY.js → skill-6PVIODCP.js} +2 -2
  169. package/chunks/{skill-settings-XKAM252R.js → skill-settings-TJTEFJ2P.js} +26 -26
  170. package/chunks/{spawnChannel-43MBG5JQ.js → spawnChannel-73QZTEZU.js} +23 -23
  171. package/chunks/{standalone-update-PKNAEETO.js → standalone-update-I7B4HYFF.js} +24 -24
  172. package/chunks/{startInteractiveUI-UJC4FAPU.js → startInteractiveUI-2IHBYFXY.js} +229 -177
  173. package/chunks/{supervisor-runner-YD27MXSJ.js → supervisor-runner-MDQEC376.js} +2 -2
  174. package/chunks/{team-create-GMWVLBIQ.js → team-create-NUDDVJB3.js} +13 -13
  175. package/chunks/{team-plan-approval-UCQJ57EP.js → team-plan-approval-HSZUKHPE.js} +13 -13
  176. package/chunks/{terminal-image-renderer-P55NEO7K.js → terminal-image-renderer-HWTISMNL.js} +22 -22
  177. package/chunks/{theme-manager-QTT6RX5N.js → theme-manager-MROOV6VP.js} +23 -24
  178. package/chunks/{tool-result-media-YP4IHM2C.js → tool-result-media-MX55ROPV.js} +12 -12
  179. package/chunks/{tool-search-G2ORH5ZP.js → tool-search-AQFQKLVO.js} +2 -2
  180. package/chunks/{total-session-admission-PIGPEE7I.js → total-session-admission-KVWPGZPG.js} +25 -25
  181. package/chunks/{trustedFolders-F3R55CXV.js → trustedFolders-QJG5VHDQ.js} +23 -23
  182. package/chunks/{undici-I7LHD7IT.js → undici-M5SHDWIM.js} +659 -230
  183. package/chunks/{update-relaunch-ZKMM7F7X.js → update-relaunch-2JR5JPF2.js} +5 -5
  184. package/chunks/{updateCheck-J3VNU2IK.js → updateCheck-YMZA57UC.js} +22 -22
  185. package/chunks/{upload-config-47HNQCBS.js → upload-config-FAYLOGRK.js} +9 -9
  186. package/chunks/{useAutoAcceptIndicator-7CHZOIWY.js → useAutoAcceptIndicator-YP5XVQYG.js} +30 -30
  187. package/chunks/{validateNonInterActiveAuth-IKMKA66V.js → validateNonInterActiveAuth-4EB6LXQY.js} +56 -57
  188. package/chunks/{version-3U5P6SJG.js → version-ZN2GS3CQ.js} +1 -1
  189. package/chunks/{web-fetch-4VJCYGQW.js → web-fetch-ICZ3KY5Z.js} +3 -3
  190. package/chunks/{web-search-K6CE33DM.js → web-search-UTZSXUV5.js} +10 -10
  191. package/chunks/{web-shell-static-OOIIII74.js → web-shell-static-LITKZKQN.js} +2 -2
  192. package/chunks/{workflow-7CZKMVZN.js → workflow-X6BKVUYT.js} +14 -14
  193. package/chunks/{workspace-providers-status-6KD3IGK5.js → workspace-providers-status-4BAUYRPL.js} +32 -32
  194. package/chunks/{workspace-registration-store-MDPW7CEZ.js → workspace-registration-store-6LZKX2RB.js} +1 -1
  195. package/chunks/{workspace-registry-WGBHXPDQ.js → workspace-registry-M3HEVDT5.js} +25 -25
  196. package/chunks/{workspace-runtime-coordinator-Z3HOGU45.js → workspace-runtime-coordinator-4VTVVFTK.js} +25 -25
  197. package/chunks/{workspace-service-JLH4B5SW.js → workspace-service-QMGQB3OE.js} +29 -29
  198. package/chunks/{workspace-skills-status-DK7QZDFR.js → workspace-skills-status-ZY3N5ZUH.js} +28 -28
  199. package/chunks/{workspace-trust-reconciler-7ZJMFTAS.js → workspace-trust-reconciler-BFW5OR5C.js} +30 -30
  200. package/chunks/{write-file-CLOS6ZQS.js → write-file-KLEVHL3D.js} +15 -15
  201. package/chunks/{zoom-image-U3KNRND3.js → zoom-image-PXWPZ35Z.js} +2 -2
  202. package/cli.js +16 -16
  203. package/examples/mcp-server/example.ts +4 -4
  204. package/examples/mcp-server/package.json +2 -2
  205. package/examples/starter/example.ts +4 -4
  206. package/examples/starter/package.json +2 -2
  207. package/execution-worker.js +1 -1
  208. package/export-transcript-document.js +136 -199
  209. package/package.json +2 -2
  210. package/release-notes.json +13 -0
  211. package/web-shell/assets/{abnfDiagram-VCTEODGH-C8eqGoOq.js → abnfDiagram-VCTEODGH-CyS097jd.js} +1 -1
  212. package/web-shell/assets/{arc-CoUm8dfZ.js → arc-C5ag-p3N.js} +1 -1
  213. package/web-shell/assets/{architectureDiagram-5GKGNRK7-TpllHxSp.js → architectureDiagram-5GKGNRK7-BdMkuHkQ.js} +1 -1
  214. package/web-shell/assets/{blockDiagram-NRAW4CY4-WEyyYhux.js → blockDiagram-NRAW4CY4-C3UYLyTT.js} +1 -1
  215. package/web-shell/assets/{c4Diagram-UCG6FXSJ-CtPTXMOO.js → c4Diagram-UCG6FXSJ-DFtJftTV.js} +1 -1
  216. package/web-shell/assets/channel-oDZ5nd9A.js +1 -0
  217. package/web-shell/assets/{chunk-2Q5K7J3B-Ds196WJl.js → chunk-2Q5K7J3B-C2aFjqep.js} +1 -1
  218. package/web-shell/assets/{chunk-5VM5RSS4-sKeSdrrt.js → chunk-5VM5RSS4-tYH7pzRt.js} +1 -1
  219. package/web-shell/assets/{chunk-F27PBJKO-LHNSMQOB.js → chunk-F27PBJKO-DwY_ngVY.js} +1 -1
  220. package/web-shell/assets/{chunk-G27WJ6UU-CZvAc4j3.js → chunk-G27WJ6UU-CW5E-aG-.js} +1 -1
  221. package/web-shell/assets/{chunk-JWPE2WC7-Dphlp9Xg.js → chunk-JWPE2WC7-UhCqXW5N.js} +1 -1
  222. package/web-shell/assets/{chunk-LCL6LL3I-CMPXpFS5.js → chunk-LCL6LL3I-KnzQ1zLY.js} +1 -1
  223. package/web-shell/assets/{chunk-POPQ4Y6H-CGWcjLpZ.js → chunk-POPQ4Y6H-DDzG7AYc.js} +1 -1
  224. package/web-shell/assets/{chunk-SVP7TREG-CE4Pe9fb.js → chunk-SVP7TREG-DsNsZgNu.js} +1 -1
  225. package/web-shell/assets/{chunk-XXDRQBXY-BtIM7Aj_.js → chunk-XXDRQBXY-DsN_-dPN.js} +1 -1
  226. package/web-shell/assets/classDiagram-DTDB5LWJ-DqPncmiN.js +1 -0
  227. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DqPncmiN.js +1 -0
  228. package/web-shell/assets/{cose-bilkent-JH36ORCC-DG8UnitR.js → cose-bilkent-JH36ORCC-DFcKfzfA.js} +1 -1
  229. package/web-shell/assets/{cynefin-OW5HDTMX-wSfFFOGS.js → cynefin-OW5HDTMX-ByKijDw9.js} +1 -1
  230. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CCo9QoOk.js → cynefinDiagram-5FMLGOSQ-B4kGwEej.js} +1 -1
  231. package/web-shell/assets/{dagre-3AP2YEHR-BCMIHNF9.js → dagre-3AP2YEHR-CRV8UYTU.js} +1 -1
  232. package/web-shell/assets/{diagram-S7CK7UJ4-DdqeWJG1.js → diagram-S7CK7UJ4-DKTiyERa.js} +1 -1
  233. package/web-shell/assets/{diagram-UQ7AKVKN-CFZzixOJ.js → diagram-UQ7AKVKN-D5mn_Nku.js} +1 -1
  234. package/web-shell/assets/{diagram-VSXAHHWV-Q3zbYC-V.js → diagram-VSXAHHWV-Dh_rhvjS.js} +1 -1
  235. package/web-shell/assets/{diagram-VX7I27RA-LAng4oE6.js → diagram-VX7I27RA-hUvldCLj.js} +1 -1
  236. package/web-shell/assets/{diagram-Z3DM3KII-DP8kMQos.js → diagram-Z3DM3KII-w_Fbc1_z.js} +1 -1
  237. package/web-shell/assets/{ebnfDiagram-PWID7BFC-C8p0vrLb.js → ebnfDiagram-PWID7BFC-DiNETIFd.js} +1 -1
  238. package/web-shell/assets/{erDiagram-SSCWMZ5O-BsVb4lXS.js → erDiagram-SSCWMZ5O-C4AcmrAq.js} +1 -1
  239. package/web-shell/assets/{flowDiagram-A5DVABFB-DPojesgF.js → flowDiagram-A5DVABFB-D9mOOdFA.js} +1 -1
  240. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BwIOKSIg.js → ganttDiagram-EL5Y4UJY-CN6niq6J.js} +1 -1
  241. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-2ufnLs3X.js → gitGraphDiagram-WWUBYQGX-D5AoFWfE.js} +1 -1
  242. package/web-shell/assets/{index-DUXz2aHf.js → index-CS8CwW9f.js} +516 -485
  243. package/web-shell/assets/{index-CJrdSS1J.js → index-DOw9K3Bq.js} +1 -1
  244. package/web-shell/assets/{infoDiagram-RXCK75RN-CBJzq9Eg.js → infoDiagram-RXCK75RN-BMmTZffy.js} +1 -1
  245. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CCRdDcqz.js → ishikawaDiagram-5VMMS53U-DEKpvoPS.js} +1 -1
  246. package/web-shell/assets/{journeyDiagram-EYS64GPL-BNEHCVRP.js → journeyDiagram-EYS64GPL-DlCviwKj.js} +1 -1
  247. package/web-shell/assets/{kanban-definition-3QL26DDD-C4_Fz7Af.js → kanban-definition-3QL26DDD-BkVlPyRx.js} +1 -1
  248. package/web-shell/assets/{layout-DJCbyo7j.js → layout-CJPeVll6.js} +1 -1
  249. package/web-shell/assets/{linear-BT7vD4rS.js → linear-B09bulGi.js} +1 -1
  250. package/web-shell/assets/mermaid.core-CiMLBEnS.js +312 -0
  251. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CWyPLmaT.js → mindmap-definition-FBJOCRG2-VMATJEz6.js} +1 -1
  252. package/web-shell/assets/{pegDiagram-XKGWAZYB-C26bsO8L.js → pegDiagram-XKGWAZYB-BBteqi33.js} +1 -1
  253. package/web-shell/assets/{pieDiagram-E7YTZNPT-YbicVSIw.js → pieDiagram-E7YTZNPT-CfYDtWH-.js} +1 -1
  254. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-Bfb9tuq4.js → quadrantDiagram-AXDQQJYC-B4NTRdT0.js} +1 -1
  255. package/web-shell/assets/{railroadDiagram-O6MQD6OU-BWq89Gp-.js → railroadDiagram-O6MQD6OU-DpvXXjTt.js} +1 -1
  256. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CbimERt9.js → requirementDiagram-EFPCY7ZU-Uj9T6A6X.js} +1 -1
  257. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-2eUcs1CY.js → sankeyDiagram-P5KCCOFB-PjVo1Bfo.js} +1 -1
  258. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DlTCWm8V.js → sequenceDiagram-WJ2MYXX4-CW2KqqvI.js} +1 -1
  259. package/web-shell/assets/{sizeCapture-X5ZJPWSS-B8238B5f.js → sizeCapture-X5ZJPWSS-BSxJAFlW.js} +1 -1
  260. package/web-shell/assets/{stateDiagram-HBIQ2CUA-Dd2jd_kW.js → stateDiagram-HBIQ2CUA-Cx2NCYF1.js} +1 -1
  261. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BGcfdFqB.js +1 -0
  262. package/web-shell/assets/{swimlanes-XN3QIQJK-D7DY2esd.js → swimlanes-XN3QIQJK-BqbjLLi8.js} +1 -1
  263. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DHmBybUx.js +8 -0
  264. package/web-shell/assets/{timeline-definition-24CTP7MA-CgGRayzz.js → timeline-definition-24CTP7MA-Dua9VLHV.js} +1 -1
  265. package/web-shell/assets/{vennDiagram-4TSXK5OY-aF-kYD6H.js → vennDiagram-4TSXK5OY-C8PCMTKz.js} +1 -1
  266. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BcTegb-P.js → wardleyDiagram-VM6X3IG4-Bcs1T3GE.js} +1 -1
  267. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-Cbp7US-v.js → xychartDiagram-S5SC5T6Z-CkNyXMHd.js} +1 -1
  268. package/web-shell/index.html +1 -1
  269. package/web-shell/sw.js +1 -1
  270. package/chunks/chunk-YQQ7QFC5.js +0 -945
  271. package/web-shell/assets/channel-Cq574eJp.js +0 -1
  272. package/web-shell/assets/classDiagram-DTDB5LWJ-DZow5usR.js +0 -1
  273. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DZow5usR.js +0 -1
  274. package/web-shell/assets/mermaid.core-Cqv8h1sX.js +0 -312
  275. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-qZPDJzMf.js +0 -1
  276. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B1OVWrqB.js +0 -8
@@ -1,11 +1,12 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
+ KeypressScope,
4
5
  disableMouseEvents,
5
6
  enableMouseEvents,
6
7
  useKeypress,
7
8
  useKeypressContext
8
- } from "./chunk-R6QCRZTF.js";
9
+ } from "./chunk-2J5KVLHY.js";
9
10
  import {
10
11
  INLINE_CODE_SPAN_PATTERN_SOURCE,
11
12
  calculateAverageLatency,
@@ -27,11 +28,11 @@ import {
27
28
  readInlineMathSpanAt,
28
29
  unescapeMarkdownBeforeMath,
29
30
  unescapeMarkdownDollars
30
- } from "./chunk-CBZAVLXA.js";
31
+ } from "./chunk-UKFESCEI.js";
31
32
  import {
32
33
  MINIMUM_MAX_HEIGHT,
33
34
  MaxSizedBox
34
- } from "./chunk-TJQTTY4F.js";
35
+ } from "./chunk-DQORDG4A.js";
35
36
  import {
36
37
  CompactToolGroupDisplay,
37
38
  ICON,
@@ -52,7 +53,7 @@ import {
52
53
  isCollapsibleTool,
53
54
  isFindingsListDisplay,
54
55
  showsToolLabel
55
- } from "./chunk-UFBWN6GO.js";
56
+ } from "./chunk-Q76KPZ6F.js";
56
57
  import {
57
58
  formatDuration,
58
59
  formatRelativeTime,
@@ -61,7 +62,7 @@ import {
61
62
  import {
62
63
  extendedTheme,
63
64
  theme
64
- } from "./chunk-R5HO4EJV.js";
65
+ } from "./chunk-E2NTOSGU.js";
65
66
  import {
66
67
  require_jsx_runtime
67
68
  } from "./chunk-SKTOH6US.js";
@@ -76,20 +77,10 @@ import {
76
77
  use_stdin_default,
77
78
  use_stdout_default,
78
79
  wrapAnsi
79
- } from "./chunk-MRTHM5GF.js";
80
+ } from "./chunk-R5AMOGLJ.js";
80
81
  import {
81
82
  require_react
82
83
  } from "./chunk-2KK65OQ6.js";
83
- import {
84
- themeManager
85
- } from "./chunk-P7RO4QSF.js";
86
- import {
87
- TOP_FRAME,
88
- glyphs
89
- } from "./chunk-U6ZAL4MF.js";
90
- import {
91
- relaunchApp
92
- } from "./chunk-XMWIH4MM.js";
93
84
  import {
94
85
  markKittyImageWritten,
95
86
  prepareInlineTerminalImage,
@@ -100,12 +91,19 @@ import {
100
91
  import {
101
92
  formatInlineImageOverflow
102
93
  } from "./chunk-KIN34HCU.js";
94
+ import {
95
+ TOP_FRAME,
96
+ glyphs
97
+ } from "./chunk-U6ZAL4MF.js";
103
98
  import {
104
99
  require_source
105
100
  } from "./chunk-XZ3MQL2U.js";
101
+ import {
102
+ relaunchApp
103
+ } from "./chunk-KBL56IWK.js";
106
104
  import {
107
105
  getErrorMessage
108
- } from "./chunk-5CQHXP4X.js";
106
+ } from "./chunk-YKVRRLWF.js";
109
107
  import {
110
108
  cpLen,
111
109
  cpSlice,
@@ -119,18 +117,19 @@ import {
119
117
  toCodePoints,
120
118
  truncateToWidth
121
119
  } from "./chunk-PJF3WRYZ.js";
122
- import {
123
- resolveColor
124
- } from "./chunk-YQQ7QFC5.js";
125
120
  import {
126
121
  stringWidth
127
122
  } from "./chunk-F5IN4KK7.js";
123
+ import {
124
+ resolveColor,
125
+ themeManager
126
+ } from "./chunk-7HN3RHKV.js";
128
127
  import {
129
128
  createLoadedSettingsAdapter
130
- } from "./chunk-GD7S43QP.js";
129
+ } from "./chunk-XDUTL6ZZ.js";
131
130
  import {
132
131
  getPersistScopeForModelSelection
133
- } from "./chunk-FYIXVVSS.js";
132
+ } from "./chunk-PN3OU2HT.js";
134
133
  import {
135
134
  getCurrentLanguage,
136
135
  localizeToolDisplayName,
@@ -138,12 +137,12 @@ import {
138
137
  } from "./chunk-TADRPMGC.js";
139
138
  import {
140
139
  isWorkspaceTrusted
141
- } from "./chunk-NUSDLSOD.js";
140
+ } from "./chunk-AAJUSHR6.js";
142
141
  import {
143
142
  sanitizeForOsc,
144
143
  supportsHyperlinks,
145
144
  wrapForMultiplexer
146
- } from "./chunk-35MAUYQX.js";
145
+ } from "./chunk-PKKMIKJY.js";
147
146
  import {
148
147
  IdeClient,
149
148
  allowEditorTypeInSandbox,
@@ -153,7 +152,7 @@ import {
153
152
  ideContextStore,
154
153
  isEditorAvailable,
155
154
  isValidEditorType
156
- } from "./chunk-KQH2ZTLC.js";
155
+ } from "./chunk-7EZKXBZF.js";
157
156
  import {
158
157
  ShellExecutionService
159
158
  } from "./chunk-PHCY2DQ2.js";
@@ -201,7 +200,7 @@ import {
201
200
  resolveMetadataKey,
202
201
  resolveOwnsModel,
203
202
  tryResolveModelProtocol
204
- } from "./chunk-IEKYDNVM.js";
203
+ } from "./chunk-PTOAGZBC.js";
205
204
  import {
206
205
  require_has_flag,
207
206
  require_supports_color
@@ -2671,11 +2670,11 @@ __name(useTerminalSize, "useTerminalSize");
2671
2670
 
2672
2671
  // packages/cli/src/ui/components/SessionPreview.tsx
2673
2672
  init_esbuild_shims();
2674
- var import_react56 = __toESM(require_react(), 1);
2673
+ var import_react57 = __toESM(require_react(), 1);
2675
2674
 
2676
2675
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
2677
2676
  init_esbuild_shims();
2678
- var import_react55 = __toESM(require_react(), 1);
2677
+ var import_react56 = __toESM(require_react(), 1);
2679
2678
 
2680
2679
  // packages/cli/src/ui/components/messages/ProviderRetryBox.tsx
2681
2680
  init_esbuild_shims();
@@ -6858,11 +6857,11 @@ var ThinkMessageContent = /* @__PURE__ */ __name(({
6858
6857
 
6859
6858
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
6860
6859
  init_esbuild_shims();
6861
- var import_react40 = __toESM(require_react(), 1);
6860
+ var import_react41 = __toESM(require_react(), 1);
6862
6861
 
6863
6862
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
6864
6863
  init_esbuild_shims();
6865
- var import_react37 = __toESM(require_react(), 1);
6864
+ var import_react38 = __toESM(require_react(), 1);
6866
6865
 
6867
6866
  // packages/cli/src/ui/components/messages/DiffRenderer.tsx
6868
6867
  init_esbuild_shims();
@@ -7333,7 +7332,7 @@ var AGENT_TOOL_NAMES = /* @__PURE__ */ new Set([
7333
7332
 
7334
7333
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
7335
7334
  init_esbuild_shims();
7336
- var import_react35 = __toESM(require_react(), 1);
7335
+ var import_react36 = __toESM(require_react(), 1);
7337
7336
  import { promises as fs2 } from "node:fs";
7338
7337
  import * as os2 from "node:os";
7339
7338
  import * as path3 from "node:path";
@@ -8477,7 +8476,7 @@ __name(sideMargin, "sideMargin");
8477
8476
 
8478
8477
  // packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
8479
8478
  init_esbuild_shims();
8480
- var import_react34 = __toESM(require_react(), 1);
8479
+ var import_react35 = __toESM(require_react(), 1);
8481
8480
 
8482
8481
  // packages/cli/src/ui/components/shared/TextInput.tsx
8483
8482
  init_esbuild_shims();
@@ -11208,7 +11207,7 @@ function usePreferredEditor() {
11208
11207
  __name(usePreferredEditor, "usePreferredEditor");
11209
11208
 
11210
11209
  // packages/cli/src/ui/components/shared/TextInput.tsx
11211
- var import_react27 = __toESM(require_react(), 1);
11210
+ var import_react28 = __toESM(require_react(), 1);
11212
11211
 
11213
11212
  // packages/cli/src/ui/utils/software-cursor.ts
11214
11213
  init_esbuild_shims();
@@ -11284,12 +11283,22 @@ function terminalShowsInputCursor(platform = process.platform) {
11284
11283
  return platform === "win32";
11285
11284
  }
11286
11285
  __name(terminalShowsInputCursor, "terminalShowsInputCursor");
11287
- function renderSoftwareCursor(text) {
11286
+ function renderSoftwareCursor(text, backgroundColor) {
11288
11287
  const cursorText = text || " ";
11289
- return compositionOverlaysSoftwareCursor() ? import_chalk.default.underline(cursorText) : import_chalk.default.bgHex(getSoftwareCursorBackground())(cursorText);
11288
+ if (compositionOverlaysSoftwareCursor()) return import_chalk.default.underline(cursorText);
11289
+ const cursorBackground = getSoftwareCursorBackground(backgroundColor);
11290
+ const cursor = import_chalk.default.bgHex(cursorBackground);
11291
+ if (!backgroundColor) return cursor(cursorText);
11292
+ const foreground = cursorBackground === DARK_CURSOR_BACKGROUND ? "#ffffff" : "#000000";
11293
+ return cursor.hex(foreground)(cursorText);
11290
11294
  }
11291
11295
  __name(renderSoftwareCursor, "renderSoftwareCursor");
11292
11296
 
11297
+ // packages/cli/src/ui/contexts/theme-canvas-context.ts
11298
+ init_esbuild_shims();
11299
+ var import_react27 = __toESM(require_react(), 1);
11300
+ var ThemeCanvasContext = (0, import_react27.createContext)(void 0);
11301
+
11293
11302
  // packages/cli/src/ui/components/shared/TextInput.tsx
11294
11303
  var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
11295
11304
  function ellipsizeMiddle(text, width) {
@@ -11323,13 +11332,14 @@ function TextInput({
11323
11332
  allowExternalEditor = true,
11324
11333
  mask
11325
11334
  }) {
11335
+ const canvasBackground = (0, import_react28.useContext)(ThemeCanvasContext);
11326
11336
  const allowMultiline = height > 1;
11327
- const [cursorVisible, setCursorVisible] = (0, import_react27.useState)(isActive);
11328
- const onChangeRef = (0, import_react27.useRef)(onChange);
11329
- (0, import_react27.useEffect)(() => {
11337
+ const [cursorVisible, setCursorVisible] = (0, import_react28.useState)(isActive);
11338
+ const onChangeRef = (0, import_react28.useRef)(onChange);
11339
+ (0, import_react28.useEffect)(() => {
11330
11340
  onChangeRef.current = onChange;
11331
11341
  }, [onChange]);
11332
- const stableOnChange = (0, import_react27.useCallback)((text) => {
11342
+ const stableOnChange = (0, import_react28.useCallback)((text) => {
11333
11343
  onChangeRef.current?.(text);
11334
11344
  }, []);
11335
11345
  const preferredEditor = usePreferredEditor();
@@ -11344,7 +11354,7 @@ function TextInput({
11344
11354
  onChange: stableOnChange,
11345
11355
  preferredEditor
11346
11356
  });
11347
- (0, import_react27.useEffect)(() => {
11357
+ (0, import_react28.useEffect)(() => {
11348
11358
  if (!isActive) {
11349
11359
  setCursorVisible(false);
11350
11360
  return;
@@ -11432,7 +11442,10 @@ function TextInput({
11432
11442
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Box_default, { children: [
11433
11443
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: theme.text.accent, children: "> " }),
11434
11444
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Box_default, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? shouldRenderCursor ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Text, { children: [
11435
- renderSoftwareCursor(placeholder.slice(0, 1)),
11445
+ renderSoftwareCursor(
11446
+ placeholder.slice(0, 1),
11447
+ canvasBackground
11448
+ ),
11436
11449
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: Colors.Gray, children: placeholder.slice(1) })
11437
11450
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { color: Colors.Gray, children: placeholder }) : ellipsizeOverflow && stringWidth(buffer.text) > inputWidth ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { children: ellipsizeMiddle(
11438
11451
  mask ? mask(buffer.text) : buffer.text,
@@ -11460,10 +11473,13 @@ function TextInput({
11460
11473
  relativeVisualColForHighlight,
11461
11474
  relativeVisualColForHighlight + 1
11462
11475
  ) || " ";
11463
- const highlighted = renderSoftwareCursor(charToHighlight);
11476
+ const highlighted = renderSoftwareCursor(
11477
+ charToHighlight,
11478
+ canvasBackground
11479
+ );
11464
11480
  display = cpSlice(display, 0, relativeVisualColForHighlight) + highlighted + cpSlice(display, relativeVisualColForHighlight + 1);
11465
11481
  } else if (relativeVisualColForHighlight === cpLen(display) && cpLen(display) === inputWidth) {
11466
- display = display + renderSoftwareCursor(" ");
11482
+ display = display + renderSoftwareCursor(" ", canvasBackground);
11467
11483
  }
11468
11484
  }
11469
11485
  }
@@ -11489,27 +11505,27 @@ __name(TextInput, "TextInput");
11489
11505
 
11490
11506
  // packages/cli/src/ui/components/shared/ScrollableList.tsx
11491
11507
  init_esbuild_shims();
11492
- var import_react33 = __toESM(require_react(), 1);
11508
+ var import_react34 = __toESM(require_react(), 1);
11493
11509
 
11494
11510
  // packages/cli/src/ui/components/shared/VirtualizedList.tsx
11495
11511
  init_esbuild_shims();
11496
- var import_react31 = __toESM(require_react(), 1);
11512
+ var import_react32 = __toESM(require_react(), 1);
11497
11513
 
11498
11514
  // packages/cli/src/ui/hooks/useBatchedScroll.ts
11499
11515
  init_esbuild_shims();
11500
- var import_react28 = __toESM(require_react(), 1);
11516
+ var import_react29 = __toESM(require_react(), 1);
11501
11517
  function useBatchedScroll(currentScrollTop) {
11502
- const pendingScrollTopRef = (0, import_react28.useRef)(null);
11503
- const currentScrollTopRef = (0, import_react28.useRef)(currentScrollTop);
11504
- (0, import_react28.useLayoutEffect)(() => {
11518
+ const pendingScrollTopRef = (0, import_react29.useRef)(null);
11519
+ const currentScrollTopRef = (0, import_react29.useRef)(currentScrollTop);
11520
+ (0, import_react29.useLayoutEffect)(() => {
11505
11521
  currentScrollTopRef.current = currentScrollTop;
11506
11522
  pendingScrollTopRef.current = null;
11507
11523
  });
11508
- const getScrollTop = (0, import_react28.useCallback)(
11524
+ const getScrollTop = (0, import_react29.useCallback)(
11509
11525
  () => pendingScrollTopRef.current ?? currentScrollTopRef.current,
11510
11526
  []
11511
11527
  );
11512
- const setPendingScrollTop = (0, import_react28.useCallback)((newScrollTop) => {
11528
+ const setPendingScrollTop = (0, import_react29.useCallback)((newScrollTop) => {
11513
11529
  pendingScrollTopRef.current = newScrollTop;
11514
11530
  }, []);
11515
11531
  return { getScrollTop, setPendingScrollTop };
@@ -11518,12 +11534,12 @@ __name(useBatchedScroll, "useBatchedScroll");
11518
11534
 
11519
11535
  // packages/cli/src/ui/hooks/useAnimatedScrollbar.ts
11520
11536
  init_esbuild_shims();
11521
- var import_react29 = __toESM(require_react(), 1);
11537
+ var import_react30 = __toESM(require_react(), 1);
11522
11538
  function useAnimatedScrollbar(options = {}) {
11523
11539
  const { idleHideMs = 1500 } = options;
11524
- const [isVisible, setIsVisible] = (0, import_react29.useState)(false);
11525
- const timerRef = (0, import_react29.useRef)(null);
11526
- const flashScrollbar = (0, import_react29.useCallback)(() => {
11540
+ const [isVisible, setIsVisible] = (0, import_react30.useState)(false);
11541
+ const timerRef = (0, import_react30.useRef)(null);
11542
+ const flashScrollbar = (0, import_react30.useCallback)(() => {
11527
11543
  setIsVisible(true);
11528
11544
  if (timerRef.current !== null) {
11529
11545
  clearTimeout(timerRef.current);
@@ -11537,7 +11553,7 @@ function useAnimatedScrollbar(options = {}) {
11537
11553
  timerRef.current = null;
11538
11554
  }, idleHideMs);
11539
11555
  }, [idleHideMs]);
11540
- (0, import_react29.useEffect)(
11556
+ (0, import_react30.useEffect)(
11541
11557
  () => () => {
11542
11558
  if (timerRef.current !== null) {
11543
11559
  clearTimeout(timerRef.current);
@@ -11552,9 +11568,9 @@ __name(useAnimatedScrollbar, "useAnimatedScrollbar");
11552
11568
 
11553
11569
  // packages/cli/src/ui/components/shared/StaticRender.tsx
11554
11570
  init_esbuild_shims();
11555
- var import_react30 = __toESM(require_react(), 1);
11571
+ var import_react31 = __toESM(require_react(), 1);
11556
11572
  var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
11557
- var StaticRender = (0, import_react30.memo)(
11573
+ var StaticRender = (0, import_react31.memo)(
11558
11574
  ({ children, width }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { width, flexDirection: "column", flexShrink: 0, children }),
11559
11575
  (prev, next) => prev.children === next.children && prev.width === next.width
11560
11576
  );
@@ -11587,35 +11603,46 @@ function firstIndexOfOffsetRun(offsets, index) {
11587
11603
  return i;
11588
11604
  }
11589
11605
  __name(firstIndexOfOffsetRun, "firstIndexOfOffsetRun");
11590
- var VirtualizedListItem = (0, import_react31.memo)(
11606
+ var VirtualizedListItem = (0, import_react32.memo)(
11591
11607
  ({
11592
11608
  content,
11593
11609
  shouldBeStatic,
11594
11610
  width,
11595
11611
  containerWidth,
11596
11612
  itemKey,
11597
- onHeightChange
11613
+ onHeightChange,
11614
+ isHidden
11598
11615
  }) => {
11599
- const itemRef = (0, import_react31.useRef)(null);
11616
+ const itemRef = (0, import_react32.useRef)(null);
11600
11617
  const { height, hasMeasured } = use_box_metrics_default(
11601
11618
  itemRef
11602
11619
  );
11603
- const onHeightChangeRef = (0, import_react31.useRef)(onHeightChange);
11620
+ const onHeightChangeRef = (0, import_react32.useRef)(onHeightChange);
11604
11621
  onHeightChangeRef.current = onHeightChange;
11605
- (0, import_react31.useLayoutEffect)(() => {
11622
+ (0, import_react32.useLayoutEffect)(() => {
11606
11623
  const measuredHeight = itemRef.current?.yogaNode?.getComputedHeight() ?? height;
11607
- if (hasMeasured) {
11624
+ if (hasMeasured && !isHidden) {
11608
11625
  onHeightChangeRef.current(itemKey, measuredHeight);
11609
11626
  }
11610
- }, [itemKey, height, hasMeasured, content]);
11611
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { width: "100%", flexDirection: "column", flexShrink: 0, ref: itemRef, children: shouldBeStatic ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11612
- StaticRender,
11627
+ }, [itemKey, height, hasMeasured, content, isHidden]);
11628
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11629
+ Box_default,
11613
11630
  {
11614
- width: typeof width === "number" ? width : containerWidth,
11615
- children: content
11616
- },
11617
- itemKey + "-static-" + (typeof width === "number" ? width : containerWidth)
11618
- ) : content });
11631
+ width: "100%",
11632
+ flexDirection: "column",
11633
+ flexShrink: 0,
11634
+ ref: itemRef,
11635
+ display: isHidden ? "none" : "flex",
11636
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(KeypressScope, { isActive: !isHidden, children: shouldBeStatic ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
11637
+ StaticRender,
11638
+ {
11639
+ width: typeof width === "number" ? width : containerWidth,
11640
+ children: content
11641
+ },
11642
+ itemKey + "-static-" + (typeof width === "number" ? width : containerWidth)
11643
+ ) : content })
11644
+ }
11645
+ );
11619
11646
  }
11620
11647
  );
11621
11648
  VirtualizedListItem.displayName = "VirtualizedListItem";
@@ -11629,9 +11656,10 @@ function VirtualizedList(props, ref) {
11629
11656
  initialScrollOffsetInIndex,
11630
11657
  renderStatic,
11631
11658
  isStaticItem,
11659
+ keepMountedIndices,
11632
11660
  width
11633
11661
  } = props;
11634
- const [scrollAnchor, setScrollAnchor] = (0, import_react31.useState)(() => {
11662
+ const [scrollAnchor, setScrollAnchor] = (0, import_react32.useState)(() => {
11635
11663
  const scrollToEnd = initialScrollIndex === SCROLL_TO_ITEM_END || typeof initialScrollIndex === "number" && initialScrollIndex >= data.length - 1 && initialScrollOffsetInIndex === SCROLL_TO_ITEM_END;
11636
11664
  if (scrollToEnd) {
11637
11665
  return {
@@ -11653,19 +11681,19 @@ function VirtualizedList(props, ref) {
11653
11681
  }
11654
11682
  return { index: 0, offset: 0 };
11655
11683
  });
11656
- const [isStickingToBottom, setIsStickingToBottom] = (0, import_react31.useState)(() => {
11684
+ const [isStickingToBottom, setIsStickingToBottom] = (0, import_react32.useState)(() => {
11657
11685
  const scrollToEnd = initialScrollIndex === SCROLL_TO_ITEM_END || typeof initialScrollIndex === "number" && initialScrollIndex >= data.length - 1 && initialScrollOffsetInIndex === SCROLL_TO_ITEM_END;
11658
11686
  return scrollToEnd;
11659
11687
  });
11660
- const containerRef = (0, import_react31.useRef)(null);
11661
- const rootRef = (0, import_react31.useRef)(null);
11688
+ const containerRef = (0, import_react32.useRef)(null);
11689
+ const rootRef = (0, import_react32.useRef)(null);
11662
11690
  const { width: measuredContainerWidth, height: measuredContainerHeight } = use_box_metrics_default(containerRef);
11663
11691
  const containerHeight = props.containerHeight ?? measuredContainerHeight;
11664
11692
  const containerWidth = measuredContainerWidth;
11665
- const [heights, setHeights] = (0, import_react31.useState)({});
11693
+ const [heights, setHeights] = (0, import_react32.useState)({});
11666
11694
  const measureAtFullHeight = props.measureAtFullHeight === true;
11667
- const [fullHeightMeasurementPending, setFullHeightMeasurementPending] = (0, import_react31.useState)(measureAtFullHeight);
11668
- const [previousMeasurementInputs, setPreviousMeasurementInputs] = (0, import_react31.useState)({
11695
+ const [fullHeightMeasurementPending, setFullHeightMeasurementPending] = (0, import_react32.useState)(measureAtFullHeight);
11696
+ const [previousMeasurementInputs, setPreviousMeasurementInputs] = (0, import_react32.useState)({
11669
11697
  enabled: measureAtFullHeight,
11670
11698
  data,
11671
11699
  renderItem
@@ -11678,15 +11706,15 @@ function VirtualizedList(props, ref) {
11678
11706
  });
11679
11707
  setFullHeightMeasurementPending(measureAtFullHeight);
11680
11708
  }
11681
- const isInitialScrollSet = (0, import_react31.useRef)(false);
11682
- const onHeightChange = (0, import_react31.useCallback)((key, height) => {
11709
+ const isInitialScrollSet = (0, import_react32.useRef)(false);
11710
+ const onHeightChange = (0, import_react32.useCallback)((key, height) => {
11683
11711
  setHeights((prev) => {
11684
11712
  if (prev[key] === height) return prev;
11685
11713
  return { ...prev, [key]: height };
11686
11714
  });
11687
11715
  setFullHeightMeasurementPending(false);
11688
11716
  }, []);
11689
- (0, import_react31.useLayoutEffect)(() => {
11717
+ (0, import_react32.useLayoutEffect)(() => {
11690
11718
  setHeights((prev) => {
11691
11719
  const prevKeys = Object.keys(prev);
11692
11720
  if (prevKeys.length <= Math.max(8, 2 * data.length)) return prev;
@@ -11709,7 +11737,7 @@ function VirtualizedList(props, ref) {
11709
11737
  return next;
11710
11738
  });
11711
11739
  }, [data, keyExtractor]);
11712
- const { totalHeight, offsets } = (0, import_react31.useMemo)(() => {
11740
+ const { totalHeight, offsets } = (0, import_react32.useMemo)(() => {
11713
11741
  const offsets2 = [0];
11714
11742
  let totalHeight2 = 0;
11715
11743
  for (let i = 0; i < data.length; i++) {
@@ -11722,7 +11750,7 @@ function VirtualizedList(props, ref) {
11722
11750
  return { totalHeight: totalHeight2, offsets: offsets2 };
11723
11751
  }, [heights, data, estimatedItemHeight, keyExtractor]);
11724
11752
  const scrollableContainerHeight = containerHeight;
11725
- const getAnchorForScrollTop = (0, import_react31.useCallback)(
11753
+ const getAnchorForScrollTop = (0, import_react32.useCallback)(
11726
11754
  (scrollTop2, offsets2) => {
11727
11755
  const found = findLastLE(offsets2, scrollTop2);
11728
11756
  if (found === -1) {
@@ -11733,10 +11761,10 @@ function VirtualizedList(props, ref) {
11733
11761
  },
11734
11762
  []
11735
11763
  );
11736
- const [prevTargetScrollIndex, setPrevTargetScrollIndex] = (0, import_react31.useState)(
11764
+ const [prevTargetScrollIndex, setPrevTargetScrollIndex] = (0, import_react32.useState)(
11737
11765
  props.targetScrollIndex
11738
11766
  );
11739
- const prevOffsetsLength = (0, import_react31.useRef)(1);
11767
+ const prevOffsetsLength = (0, import_react32.useRef)(1);
11740
11768
  const target = props.targetScrollIndex;
11741
11769
  if (target !== void 0 && offsets.length > 1) {
11742
11770
  const targetChanged = target !== prevTargetScrollIndex;
@@ -11758,7 +11786,7 @@ function VirtualizedList(props, ref) {
11758
11786
  }
11759
11787
  }
11760
11788
  prevOffsetsLength.current = offsets.length;
11761
- const actualScrollTop = (0, import_react31.useMemo)(() => {
11789
+ const actualScrollTop = (0, import_react32.useMemo)(() => {
11762
11790
  const offset = offsets[scrollAnchor.index];
11763
11791
  if (typeof offset !== "number") {
11764
11792
  return 0;
@@ -11779,11 +11807,11 @@ function VirtualizedList(props, ref) {
11779
11807
  keyExtractor
11780
11808
  ]);
11781
11809
  const scrollTop = isStickingToBottom ? Number.MAX_SAFE_INTEGER : actualScrollTop;
11782
- const prevDataLength = (0, import_react31.useRef)(data.length);
11783
- const prevTotalHeight = (0, import_react31.useRef)(totalHeight);
11784
- const prevScrollTop = (0, import_react31.useRef)(actualScrollTop);
11785
- const prevContainerHeight = (0, import_react31.useRef)(scrollableContainerHeight);
11786
- (0, import_react31.useLayoutEffect)(() => {
11810
+ const prevDataLength = (0, import_react32.useRef)(data.length);
11811
+ const prevTotalHeight = (0, import_react32.useRef)(totalHeight);
11812
+ const prevScrollTop = (0, import_react32.useRef)(actualScrollTop);
11813
+ const prevContainerHeight = (0, import_react32.useRef)(scrollableContainerHeight);
11814
+ (0, import_react32.useLayoutEffect)(() => {
11787
11815
  const contentPreviouslyFit = prevTotalHeight.current <= prevContainerHeight.current;
11788
11816
  const wasScrolledToBottomPixels = prevScrollTop.current >= prevTotalHeight.current - prevContainerHeight.current - 1;
11789
11817
  const wasAtBottom = contentPreviouslyFit || wasScrolledToBottomPixels;
@@ -11833,7 +11861,7 @@ function VirtualizedList(props, ref) {
11833
11861
  isStickingToBottom,
11834
11862
  props.targetScrollIndex
11835
11863
  ]);
11836
- (0, import_react31.useLayoutEffect)(() => {
11864
+ (0, import_react32.useLayoutEffect)(() => {
11837
11865
  if (isInitialScrollSet.current || offsets.length <= 1 || totalHeight <= 0 || scrollableContainerHeight <= 0) {
11838
11866
  return;
11839
11867
  }
@@ -11898,19 +11926,27 @@ function VirtualizedList(props, ref) {
11898
11926
  }
11899
11927
  const renderRangeStart = renderStatic ? 0 : startIndex;
11900
11928
  const renderRangeEnd = renderStatic ? data.length - 1 : endIndex;
11901
- const renderedItems = (0, import_react31.useMemo)(() => {
11929
+ const renderedItems = (0, import_react32.useMemo)(() => {
11902
11930
  if (!isReady) {
11903
11931
  return [];
11904
11932
  }
11905
11933
  const items = [];
11906
- for (let i = renderRangeStart; i <= renderRangeEnd; i++) {
11934
+ const indices = /* @__PURE__ */ new Set();
11935
+ for (let i = renderRangeStart; i <= renderRangeEnd; i++) indices.add(i);
11936
+ for (const i of keepMountedIndices ?? []) {
11937
+ if (i >= 0 && i < data.length) indices.add(i);
11938
+ }
11939
+ for (const i of [...indices].sort((a, b) => a - b)) {
11907
11940
  const item = data[i];
11908
11941
  if (item) {
11909
11942
  const isOutsideViewport = i < startIndex || i > endIndex;
11910
11943
  const shouldBeStatic = renderStatic === true && isOutsideViewport || isStaticItem?.(item, i) === true;
11911
11944
  let content;
11912
11945
  try {
11913
- content = renderItem({ item, index: i });
11946
+ content = renderItem({
11947
+ item,
11948
+ index: i
11949
+ });
11914
11950
  } catch (err) {
11915
11951
  debugLogger7.debug(`renderItem threw at index ${i}`, err);
11916
11952
  content = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box_default, { flexDirection: "column", flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { color: "red", children: "[render error]" }) });
@@ -11925,7 +11961,8 @@ function VirtualizedList(props, ref) {
11925
11961
  shouldBeStatic,
11926
11962
  width,
11927
11963
  containerWidth,
11928
- onHeightChange
11964
+ onHeightChange,
11965
+ isHidden: !renderStatic && isOutsideViewport
11929
11966
  },
11930
11967
  key
11931
11968
  )
@@ -11946,10 +11983,11 @@ function VirtualizedList(props, ref) {
11946
11983
  keyExtractor,
11947
11984
  width,
11948
11985
  containerWidth,
11949
- onHeightChange
11986
+ onHeightChange,
11987
+ keepMountedIndices
11950
11988
  ]);
11951
11989
  const { getScrollTop, setPendingScrollTop } = useBatchedScroll(scrollTop);
11952
- const getScrollbarGeometry = (0, import_react31.useCallback)(() => {
11990
+ const getScrollbarGeometry = (0, import_react32.useCallback)(() => {
11953
11991
  const shouldShowScrollbar = (props.showScrollbar ?? true) && maxScroll > 0;
11954
11992
  if (!shouldShowScrollbar || !rootRef.current || scrollableContainerHeight <= 0) {
11955
11993
  return null;
@@ -11962,7 +12000,7 @@ function VirtualizedList(props, ref) {
11962
12000
  height: scrollableContainerHeight
11963
12001
  };
11964
12002
  }, [props.showScrollbar, maxScroll, scrollableContainerHeight]);
11965
- const hitTestScrollbar = (0, import_react31.useCallback)(
12003
+ const hitTestScrollbar = (0, import_react32.useCallback)(
11966
12004
  ({ col, row }) => {
11967
12005
  const geometry = getScrollbarGeometry();
11968
12006
  if (!geometry) return false;
@@ -11972,8 +12010,8 @@ function VirtualizedList(props, ref) {
11972
12010
  },
11973
12011
  [getScrollbarGeometry]
11974
12012
  );
11975
- const userScrollPending = (0, import_react31.useRef)(false);
11976
- const scrollToScrollbarRow = (0, import_react31.useCallback)(
12013
+ const userScrollPending = (0, import_react32.useRef)(false);
12014
+ const scrollToScrollbarRow = (0, import_react32.useCallback)(
11977
12015
  (row) => {
11978
12016
  const geometry = getScrollbarGeometry();
11979
12017
  if (!geometry) return;
@@ -12009,7 +12047,7 @@ function VirtualizedList(props, ref) {
12009
12047
  setPendingScrollTop
12010
12048
  ]
12011
12049
  );
12012
- (0, import_react31.useImperativeHandle)(
12050
+ (0, import_react32.useImperativeHandle)(
12013
12051
  ref,
12014
12052
  () => ({
12015
12053
  scrollBy: /* @__PURE__ */ __name((delta) => {
@@ -12144,8 +12182,8 @@ function VirtualizedList(props, ref) {
12144
12182
  );
12145
12183
  const showScrollbar = (props.showScrollbar ?? true) && maxScroll > 0;
12146
12184
  const { isVisible: scrollbarThumbActive, flashScrollbar } = useAnimatedScrollbar();
12147
- const isInitialScrollFlash = (0, import_react31.useRef)(true);
12148
- (0, import_react31.useLayoutEffect)(() => {
12185
+ const isInitialScrollFlash = (0, import_react32.useRef)(true);
12186
+ (0, import_react32.useLayoutEffect)(() => {
12149
12187
  if (isInitialScrollFlash.current) {
12150
12188
  isInitialScrollFlash.current = false;
12151
12189
  return;
@@ -12156,7 +12194,7 @@ function VirtualizedList(props, ref) {
12156
12194
  userScrollPending.current = false;
12157
12195
  flashScrollbar();
12158
12196
  }, [clampedScrollTop, flashScrollbar]);
12159
- const scrollbarContent = (0, import_react31.useMemo)(() => {
12197
+ const scrollbarContent = (0, import_react32.useMemo)(() => {
12160
12198
  if (!showScrollbar || scrollableContainerHeight <= 0) return null;
12161
12199
  const trackLen = scrollableContainerHeight;
12162
12200
  const thumbLen = Math.max(
@@ -12214,19 +12252,19 @@ function VirtualizedList(props, ref) {
12214
12252
  ] });
12215
12253
  }
12216
12254
  __name(VirtualizedList, "VirtualizedList");
12217
- var VirtualizedListWithForwardRef = (0, import_react31.forwardRef)(VirtualizedList);
12255
+ var VirtualizedListWithForwardRef = (0, import_react32.forwardRef)(VirtualizedList);
12218
12256
  VirtualizedList.displayName = "VirtualizedList";
12219
12257
 
12220
12258
  // packages/cli/src/ui/hooks/use-frame-coalesced-flush.ts
12221
12259
  init_esbuild_shims();
12222
- var import_react32 = __toESM(require_react(), 1);
12260
+ var import_react33 = __toESM(require_react(), 1);
12223
12261
  var SCROLL_FRAME_MS = 16;
12224
12262
  function useFrameCoalescedFlush(flush, frameMs = SCROLL_FRAME_MS) {
12225
- const timer = (0, import_react32.useRef)(null);
12226
- const dirty = (0, import_react32.useRef)(false);
12227
- const flushRef = (0, import_react32.useRef)(flush);
12263
+ const timer = (0, import_react33.useRef)(null);
12264
+ const dirty = (0, import_react33.useRef)(false);
12265
+ const flushRef = (0, import_react33.useRef)(flush);
12228
12266
  flushRef.current = flush;
12229
- const closeWindow = (0, import_react32.useCallback)(() => {
12267
+ const closeWindow = (0, import_react33.useCallback)(() => {
12230
12268
  timer.current = null;
12231
12269
  if (!dirty.current) {
12232
12270
  return;
@@ -12235,7 +12273,7 @@ function useFrameCoalescedFlush(flush, frameMs = SCROLL_FRAME_MS) {
12235
12273
  flushRef.current();
12236
12274
  timer.current = setTimeout(closeWindow, frameMs);
12237
12275
  }, [frameMs]);
12238
- const schedule = (0, import_react32.useCallback)(() => {
12276
+ const schedule = (0, import_react33.useCallback)(() => {
12239
12277
  if (timer.current !== null) {
12240
12278
  dirty.current = true;
12241
12279
  return;
@@ -12243,25 +12281,49 @@ function useFrameCoalescedFlush(flush, frameMs = SCROLL_FRAME_MS) {
12243
12281
  flushRef.current();
12244
12282
  timer.current = setTimeout(closeWindow, frameMs);
12245
12283
  }, [closeWindow, frameMs]);
12246
- const cancel = (0, import_react32.useCallback)(() => {
12284
+ const cancel = (0, import_react33.useCallback)(() => {
12247
12285
  dirty.current = false;
12248
12286
  if (timer.current !== null) {
12249
12287
  clearTimeout(timer.current);
12250
12288
  timer.current = null;
12251
12289
  }
12252
12290
  }, []);
12253
- (0, import_react32.useEffect)(() => cancel, [cancel]);
12291
+ (0, import_react33.useEffect)(() => cancel, [cancel]);
12254
12292
  return { schedule, cancel };
12255
12293
  }
12256
12294
  __name(useFrameCoalescedFlush, "useFrameCoalescedFlush");
12257
12295
 
12258
12296
  // packages/cli/src/ui/components/shared/ScrollableList.tsx
12259
12297
  var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
12298
+ var ScrollRegionContext = (0, import_react34.createContext)(null);
12299
+ function getScrollOwner(region, event, direction, pointer) {
12300
+ let root = region;
12301
+ while (root.parent) root = root.parent;
12302
+ if (root.owners.has(event)) return root.owners.get(event) ?? null;
12303
+ const findOwner = /* @__PURE__ */ __name((candidate) => {
12304
+ if (!candidate.active) return null;
12305
+ const rect = pointer ? candidate.rect() : null;
12306
+ const inside = !pointer || rect !== null && pointer.col - 1 >= rect.x && pointer.col - 1 < rect.x + rect.width && pointer.row - 1 >= rect.y && pointer.row - 1 < rect.y + rect.height;
12307
+ if (!inside && candidate.parent) return null;
12308
+ if (inside) {
12309
+ for (const child of candidate.children) {
12310
+ const owner2 = findOwner(child);
12311
+ if (owner2) return owner2;
12312
+ }
12313
+ }
12314
+ const state = candidate.state();
12315
+ return (direction < 0 ? state.scrollTop > 0 : state.scrollTop + state.innerHeight < state.scrollHeight) ? candidate : null;
12316
+ }, "findOwner");
12317
+ const owner = findOwner(root);
12318
+ root.owners.set(event, owner);
12319
+ return owner;
12320
+ }
12321
+ __name(getScrollOwner, "getScrollOwner");
12260
12322
  function ScrollableList(props, ref) {
12261
12323
  const { hasFocus, ...virtualizedListProps } = props;
12262
- const virtualizedListRef = (0, import_react33.useRef)(null);
12263
- const isDraggingScrollbar = (0, import_react33.useRef)(false);
12264
- const getScrollState = (0, import_react33.useCallback)(
12324
+ const virtualizedListRef = (0, import_react34.useRef)(null);
12325
+ const isDraggingScrollbar = (0, import_react34.useRef)(false);
12326
+ const getScrollState = (0, import_react34.useCallback)(
12265
12327
  () => virtualizedListRef.current?.getScrollState() ?? {
12266
12328
  scrollTop: 0,
12267
12329
  scrollHeight: 0,
@@ -12269,10 +12331,31 @@ function ScrollableList(props, ref) {
12269
12331
  },
12270
12332
  []
12271
12333
  );
12334
+ const parentRegion = (0, import_react34.useContext)(ScrollRegionContext);
12335
+ const { inputEnabled } = useKeypressContext();
12336
+ const region = (0, import_react34.useMemo)(
12337
+ () => ({
12338
+ parent: null,
12339
+ children: /* @__PURE__ */ new Set(),
12340
+ active: false,
12341
+ state: getScrollState,
12342
+ rect: /* @__PURE__ */ __name(() => virtualizedListRef.current?.getViewportRect() ?? null, "rect"),
12343
+ owners: /* @__PURE__ */ new WeakMap()
12344
+ }),
12345
+ [getScrollState]
12346
+ );
12347
+ region.parent = parentRegion;
12348
+ region.active = hasFocus && inputEnabled !== false;
12349
+ (0, import_react34.useEffect)(() => {
12350
+ parentRegion?.children.add(region);
12351
+ return () => {
12352
+ parentRegion?.children.delete(region);
12353
+ };
12354
+ }, [parentRegion, region]);
12272
12355
  const WHEEL_LINES_PER_TICK = 3;
12273
- const pendingWheelDelta = (0, import_react33.useRef)(0);
12274
- const pendingDragRow = (0, import_react33.useRef)(null);
12275
- const applyPendingScroll = (0, import_react33.useCallback)(() => {
12356
+ const pendingWheelDelta = (0, import_react34.useRef)(0);
12357
+ const pendingDragRow = (0, import_react34.useRef)(null);
12358
+ const applyPendingScroll = (0, import_react34.useCallback)(() => {
12276
12359
  const list = virtualizedListRef.current;
12277
12360
  const dragRow = pendingDragRow.current;
12278
12361
  const wheelDelta = pendingWheelDelta.current;
@@ -12288,19 +12371,19 @@ function ScrollableList(props, ref) {
12288
12371
  }
12289
12372
  }, []);
12290
12373
  const { schedule: scheduleScrollFlush, cancel: cancelScrollFlush } = useFrameCoalescedFlush(applyPendingScroll);
12291
- const cancelPendingScroll = (0, import_react33.useCallback)(() => {
12374
+ const cancelPendingScroll = (0, import_react34.useCallback)(() => {
12292
12375
  pendingWheelDelta.current = 0;
12293
12376
  pendingDragRow.current = null;
12294
12377
  cancelScrollFlush();
12295
12378
  }, [cancelScrollFlush]);
12296
- const queueKeyboardScroll = (0, import_react33.useCallback)(
12379
+ const queueKeyboardScroll = (0, import_react34.useCallback)(
12297
12380
  (delta) => {
12298
12381
  pendingWheelDelta.current += delta;
12299
12382
  scheduleScrollFlush();
12300
12383
  },
12301
12384
  [scheduleScrollFlush]
12302
12385
  );
12303
- (0, import_react33.useImperativeHandle)(
12386
+ (0, import_react34.useImperativeHandle)(
12304
12387
  ref,
12305
12388
  () => ({
12306
12389
  scrollBy: /* @__PURE__ */ __name((delta) => queueKeyboardScroll(delta), "scrollBy"),
@@ -12332,8 +12415,11 @@ function ScrollableList(props, ref) {
12332
12415
  [queueKeyboardScroll, cancelPendingScroll, getScrollState]
12333
12416
  );
12334
12417
  useKeypress(
12335
- (0, import_react33.useCallback)(
12418
+ (0, import_react34.useCallback)(
12336
12419
  (key) => {
12420
+ const direction = keyMatchers["scrollUp" /* SCROLL_UP */](key) || keyMatchers["pageUp" /* PAGE_UP */](key) || keyMatchers["scrollHome" /* SCROLL_HOME */](key) ? -1 : keyMatchers["scrollDown" /* SCROLL_DOWN */](key) || keyMatchers["pageDown" /* PAGE_DOWN */](key) || keyMatchers["scrollEnd" /* SCROLL_END */](key) ? 1 : 0;
12421
+ if (!direction || getScrollOwner(region, key, direction) !== region)
12422
+ return;
12337
12423
  if (keyMatchers["scrollUp" /* SCROLL_UP */](key)) {
12338
12424
  queueKeyboardScroll(-1);
12339
12425
  } else if (keyMatchers["scrollDown" /* SCROLL_DOWN */](key)) {
@@ -12354,13 +12440,17 @@ function ScrollableList(props, ref) {
12354
12440
  virtualizedListRef.current?.scrollToEnd();
12355
12441
  }
12356
12442
  },
12357
- [getScrollState, queueKeyboardScroll, cancelPendingScroll]
12443
+ [getScrollState, queueKeyboardScroll, cancelPendingScroll, region]
12358
12444
  ),
12359
12445
  { isActive: hasFocus }
12360
12446
  );
12361
- const handleMouseEvent = (0, import_react33.useCallback)(
12447
+ const handleMouseEvent = (0, import_react34.useCallback)(
12362
12448
  (event) => {
12363
12449
  if (!virtualizedListRef.current) return;
12450
+ if (event.name === "scroll-up" || event.name === "scroll-down") {
12451
+ const direction = event.name === "scroll-up" ? -1 : 1;
12452
+ if (getScrollOwner(region, event, direction, event) !== region) return;
12453
+ }
12364
12454
  if (event.name === "left-release") {
12365
12455
  isDraggingScrollbar.current = false;
12366
12456
  return;
@@ -12386,13 +12476,13 @@ function ScrollableList(props, ref) {
12386
12476
  scheduleScrollFlush();
12387
12477
  }
12388
12478
  },
12389
- [scheduleScrollFlush, cancelPendingScroll]
12479
+ [scheduleScrollFlush, cancelPendingScroll, region]
12390
12480
  );
12391
12481
  useMouseEvents(handleMouseEvent, { isActive: hasFocus, bypassVpGate: true });
12392
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VirtualizedListWithForwardRef, { ref: virtualizedListRef, ...virtualizedListProps });
12482
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ScrollRegionContext.Provider, { value: region, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(VirtualizedListWithForwardRef, { ref: virtualizedListRef, ...virtualizedListProps }) });
12393
12483
  }
12394
12484
  __name(ScrollableList, "ScrollableList");
12395
- var ScrollableListWithForwardRef = (0, import_react33.forwardRef)(ScrollableList);
12485
+ var ScrollableListWithForwardRef = (0, import_react34.forwardRef)(ScrollableList);
12396
12486
 
12397
12487
  // packages/cli/src/ui/components/messages/AskUserQuestionDialog.tsx
12398
12488
  var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
@@ -12414,12 +12504,12 @@ function QuestionDialogLayout({
12414
12504
  children,
12415
12505
  renderOverflow
12416
12506
  }) {
12417
- const naturalRef = (0, import_react34.useRef)(null);
12507
+ const naturalRef = (0, import_react35.useRef)(null);
12418
12508
  const { height, hasMeasured } = use_box_metrics_default(
12419
12509
  naturalRef
12420
12510
  );
12421
- const [naturalHeight, setNaturalHeight] = (0, import_react34.useState)(null);
12422
- (0, import_react34.useLayoutEffect)(() => {
12511
+ const [naturalHeight, setNaturalHeight] = (0, import_react35.useState)(null);
12512
+ (0, import_react35.useLayoutEffect)(() => {
12423
12513
  if (hasMeasured && naturalRef.current && height > 0) {
12424
12514
  setNaturalHeight(height);
12425
12515
  }
@@ -12438,14 +12528,14 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
12438
12528
  availableHeight,
12439
12529
  onConfirm
12440
12530
  }) => {
12441
- const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react34.useState)(0);
12442
- const [selectedOptions, setSelectedOptions] = (0, import_react34.useState)({});
12443
- const [customInputValues, setCustomInputValues] = (0, import_react34.useState)({});
12444
- const customInputValuesRef = (0, import_react34.useRef)({});
12445
- const [selectedIndex, setSelectedIndex] = (0, import_react34.useState)(0);
12446
- const [isCompactContentVisible, setIsCompactContentVisible] = (0, import_react34.useState)(false);
12447
- const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react34.useState)({});
12448
- const [customInputChecked, setCustomInputChecked] = (0, import_react34.useState)({});
12531
+ const [currentQuestionIndex, setCurrentQuestionIndex] = (0, import_react35.useState)(0);
12532
+ const [selectedOptions, setSelectedOptions] = (0, import_react35.useState)({});
12533
+ const [customInputValues, setCustomInputValues] = (0, import_react35.useState)({});
12534
+ const customInputValuesRef = (0, import_react35.useRef)({});
12535
+ const [selectedIndex, setSelectedIndex] = (0, import_react35.useState)(0);
12536
+ const [isCompactContentVisible, setIsCompactContentVisible] = (0, import_react35.useState)(false);
12537
+ const [multiSelectedOptions, setMultiSelectedOptions] = (0, import_react35.useState)({});
12538
+ const [customInputChecked, setCustomInputChecked] = (0, import_react35.useState)({});
12449
12539
  const hasMultipleQuestions = confirmationDetails.questions.length > 1;
12450
12540
  const totalTabs = hasMultipleQuestions ? confirmationDetails.questions.length + 1 : confirmationDetails.questions.length;
12451
12541
  const isSubmitTab = hasMultipleQuestions && currentQuestionIndex === totalTabs - 1;
@@ -12557,6 +12647,8 @@ var AskUserQuestionDialog = /* @__PURE__ */ __name(({
12557
12647
  }
12558
12648
  setIsCompactContentVisible(false);
12559
12649
  }
12650
+ if (keyMatchers["scrollUp" /* SCROLL_UP */](key) || keyMatchers["scrollDown" /* SCROLL_DOWN */](key))
12651
+ return;
12560
12652
  if (isCustomInputSelected) {
12561
12653
  const isOptionUp = key.name === "up" || key.ctrl && key.name === "p";
12562
12654
  const isOptionDown = key.name === "down" || key.ctrl && key.name === "n";
@@ -13122,20 +13214,20 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
13122
13214
  const { onConfirm } = confirmationDetails;
13123
13215
  const summarize = useDisplayMode().summaryActive && !compactMode;
13124
13216
  const intentSentence = intent ? oneLine(intent) : "";
13125
- const [showChanges, setShowChanges] = (0, import_react35.useState)(false);
13217
+ const [showChanges, setShowChanges] = (0, import_react36.useState)(false);
13126
13218
  const autoModeFallback = confirmationDetails.autoModeFallback;
13127
13219
  const offersSwitchToDefault = autoModeFallback?.reason === "classifier_unavailable" || autoModeFallback?.reason === "consecutive_unavailable";
13128
13220
  const hidesAlwaysAllow = "hideAlwaysAllow" in confirmationDetails && confirmationDetails.hideAlwaysAllow === true;
13129
13221
  const settings = useSettings();
13130
13222
  const preferredEditor = settings.merged.general?.preferredEditor;
13131
13223
  const hideModify = confirmationDetails.type === "edit" ? confirmationDetails.hideModify : false;
13132
- const editorAvailable = (0, import_react35.useMemo)(
13224
+ const editorAvailable = (0, import_react36.useMemo)(
13133
13225
  () => !compactMode && confirmationDetails.type === "edit" && !hideModify && preferredEditor !== void 0 && isEditorAvailable(preferredEditor),
13134
13226
  [compactMode, confirmationDetails.type, hideModify, preferredEditor]
13135
13227
  );
13136
- const [ideClient, setIdeClient] = (0, import_react35.useState)(null);
13137
- const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react35.useState)(false);
13138
- (0, import_react35.useEffect)(() => {
13228
+ const [ideClient, setIdeClient] = (0, import_react36.useState)(null);
13229
+ const [isDiffingEnabled, setIsDiffingEnabled] = (0, import_react36.useState)(false);
13230
+ (0, import_react36.useEffect)(() => {
13139
13231
  let isMounted = true;
13140
13232
  if (config.getIdeMode()) {
13141
13233
  const getIdeClient = /* @__PURE__ */ __name(async () => {
@@ -13168,7 +13260,7 @@ var ToolConfirmationMessage = /* @__PURE__ */ __name(({
13168
13260
  }, "handleConfirm");
13169
13261
  const isTrustedFolder = config.isTrustedFolder();
13170
13262
  const launchEditor = useLaunchEditor();
13171
- const [planViewError, setPlanViewError] = (0, import_react35.useState)(null);
13263
+ const [planViewError, setPlanViewError] = (0, import_react36.useState)(null);
13172
13264
  const openFullPlanInEditor = /* @__PURE__ */ __name(() => {
13173
13265
  if (confirmationDetails.type !== "plan") return;
13174
13266
  setPlanViewError(null);
@@ -13741,7 +13833,7 @@ var PlanSummaryDisplay = /* @__PURE__ */ __name(({
13741
13833
 
13742
13834
  // packages/cli/src/ui/components/ShellInputPrompt.tsx
13743
13835
  init_esbuild_shims();
13744
- var import_react36 = __toESM(require_react(), 1);
13836
+ var import_react37 = __toESM(require_react(), 1);
13745
13837
 
13746
13838
  // packages/cli/src/ui/hooks/keyToAnsi.ts
13747
13839
  init_esbuild_shims();
@@ -13804,7 +13896,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13804
13896
  activeShellPtyId,
13805
13897
  focus = true
13806
13898
  }) => {
13807
- const handleShellInputSubmit = (0, import_react36.useCallback)(
13899
+ const handleShellInputSubmit = (0, import_react37.useCallback)(
13808
13900
  (input) => {
13809
13901
  if (activeShellPtyId) {
13810
13902
  ShellExecutionService.writeToPty(activeShellPtyId, input);
@@ -13812,7 +13904,7 @@ var ShellInputPrompt = /* @__PURE__ */ __name(({
13812
13904
  },
13813
13905
  [activeShellPtyId]
13814
13906
  );
13815
- const handleInput = (0, import_react36.useCallback)(
13907
+ const handleInput = (0, import_react37.useCallback)(
13816
13908
  (key) => {
13817
13909
  if (!focus || !activeShellPtyId) {
13818
13910
  return;
@@ -13903,7 +13995,7 @@ function sliceTextForMaxHeight(text, maxHeight, maxWidth) {
13903
13995
  };
13904
13996
  }
13905
13997
  __name(sliceTextForMaxHeight, "sliceTextForMaxHeight");
13906
- var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react37.default.useMemo(() => {
13998
+ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_react38.default.useMemo(() => {
13907
13999
  if (!resultDisplay) {
13908
14000
  return { type: "none" };
13909
14001
  }
@@ -14182,21 +14274,21 @@ var ToolMessage = /* @__PURE__ */ __name(({
14182
14274
  }) => {
14183
14275
  const settings = useSettings();
14184
14276
  const isThisShellFocused = (name === SHELL_COMMAND_NAME || name === SHELL_NAME) && status === "Executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused;
14185
- const [lastUpdateTime, setLastUpdateTime] = import_react37.default.useState(null);
14186
- const [userHasFocused, setUserHasFocused] = import_react37.default.useState(false);
14187
- const [showFocusHint, setShowFocusHint] = import_react37.default.useState(false);
14188
- import_react37.default.useEffect(() => {
14277
+ const [lastUpdateTime, setLastUpdateTime] = import_react38.default.useState(null);
14278
+ const [userHasFocused, setUserHasFocused] = import_react38.default.useState(false);
14279
+ const [showFocusHint, setShowFocusHint] = import_react38.default.useState(false);
14280
+ import_react38.default.useEffect(() => {
14189
14281
  if (resultDisplay) {
14190
14282
  setLastUpdateTime(/* @__PURE__ */ new Date());
14191
14283
  }
14192
14284
  }, [resultDisplay]);
14193
- const shellTimeoutMs = import_react37.default.useMemo(() => {
14285
+ const shellTimeoutMs = import_react38.default.useMemo(() => {
14194
14286
  if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
14195
14287
  return resultDisplay.timeoutMs;
14196
14288
  }
14197
14289
  return void 0;
14198
14290
  }, [resultDisplay]);
14199
- import_react37.default.useEffect(() => {
14291
+ import_react38.default.useEffect(() => {
14200
14292
  if (!lastUpdateTime) {
14201
14293
  return;
14202
14294
  }
@@ -14205,7 +14297,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
14205
14297
  }, 5e3);
14206
14298
  return () => clearTimeout(timer);
14207
14299
  }, [lastUpdateTime]);
14208
- import_react37.default.useEffect(() => {
14300
+ import_react38.default.useEffect(() => {
14209
14301
  if (isThisShellFocused) {
14210
14302
  setUserHasFocused(true);
14211
14303
  }
@@ -14230,7 +14322,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
14230
14322
  renderOutputAsMarkdown = false;
14231
14323
  }
14232
14324
  const usingDetailedDisplay = fullDetail && isCollapsibleTool(name) && typeof detailedDisplay === "string" && detailedDisplay.length > 0;
14233
- const sanitizedDetailedDisplay = import_react37.default.useMemo(
14325
+ const sanitizedDetailedDisplay = import_react38.default.useMemo(
14234
14326
  () => usingDetailedDisplay && typeof detailedDisplay === "string" ? sanitizeTerminalText(detailedDisplay) : detailedDisplay,
14235
14327
  [detailedDisplay, usingDetailedDisplay]
14236
14328
  );
@@ -14247,7 +14339,7 @@ var ToolMessage = /* @__PURE__ */ __name(({
14247
14339
  effectiveResultDisplay
14248
14340
  );
14249
14341
  const shouldCollapseResult = !forceShowResult && status === "Success" /* Success */ && isCollapsibleTool(name) && (effectiveDisplayRenderer.type === "string" || effectiveDisplayRenderer.type === "ansi");
14250
- const inlineToolArgs = import_react37.default.useMemo(
14342
+ const inlineToolArgs = import_react38.default.useMemo(
14251
14343
  () => showToolCallArgs ? formatInlineToolArgs(
14252
14344
  args,
14253
14345
  description,
@@ -14495,7 +14587,7 @@ var ToolInfo = /* @__PURE__ */ __name(({
14495
14587
  hideDescription,
14496
14588
  truncate: truncate2
14497
14589
  }) => {
14498
- const nameColor = import_react37.default.useMemo(() => {
14590
+ const nameColor = import_react38.default.useMemo(() => {
14499
14591
  switch (emphasis) {
14500
14592
  case "high":
14501
14593
  return theme.text.primary;
@@ -14531,7 +14623,7 @@ var TrailingIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_
14531
14623
 
14532
14624
  // packages/cli/src/ui/components/messages/InlineParallelAgentsDisplay.tsx
14533
14625
  init_esbuild_shims();
14534
- var import_react38 = __toESM(require_react(), 1);
14626
+ var import_react39 = __toESM(require_react(), 1);
14535
14627
  var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
14536
14628
  function deriveAgentId(toolCall, resultDisplay) {
14537
14629
  return `${resultDisplay.subagentName}-${toolCall.callId}`;
@@ -14592,8 +14684,8 @@ function truncateMiddle(input, max) {
14592
14684
  }
14593
14685
  __name(truncateMiddle, "truncateMiddle");
14594
14686
  var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth, totalAgentCount, availableTerminalHeight }) => {
14595
- const config = (0, import_react38.useContext)(ConfigContext);
14596
- const agentEntries = (0, import_react38.useMemo)(() => {
14687
+ const config = (0, import_react39.useContext)(ConfigContext);
14688
+ const agentEntries = (0, import_react39.useMemo)(() => {
14597
14689
  const out = [];
14598
14690
  for (const tc of toolCalls) {
14599
14691
  if (isAgentResult(tc.resultDisplay)) {
@@ -14602,19 +14694,19 @@ var InlineParallelAgentsDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWi
14602
14694
  }
14603
14695
  return out;
14604
14696
  }, [toolCalls]);
14605
- const [now, setNow] = (0, import_react38.useState)(() => Date.now());
14606
- const hasLiveAgent = (0, import_react38.useMemo)(
14697
+ const [now, setNow] = (0, import_react39.useState)(() => Date.now());
14698
+ const hasLiveAgent = (0, import_react39.useMemo)(
14607
14699
  () => agentEntries.some(
14608
14700
  (e) => e.result.status === "running" || e.result.status === "background"
14609
14701
  ),
14610
14702
  [agentEntries]
14611
14703
  );
14612
- (0, import_react38.useEffect)(() => {
14704
+ (0, import_react39.useEffect)(() => {
14613
14705
  if (!hasLiveAgent) return;
14614
14706
  const id = setInterval(() => setNow(Date.now()), 1e3);
14615
14707
  return () => clearInterval(id);
14616
14708
  }, [hasLiveAgent]);
14617
- const rows = (0, import_react38.useMemo)(() => {
14709
+ const rows = (0, import_react39.useMemo)(() => {
14618
14710
  const registry = config?.getBackgroundTaskRegistry();
14619
14711
  void now;
14620
14712
  return agentEntries.map(({ toolCall, result }) => {
@@ -14802,9 +14894,9 @@ var SummaryToolGroupDisplay = /* @__PURE__ */ __name(({ toolCalls, contentWidth
14802
14894
 
14803
14895
  // packages/cli/src/ui/hooks/use-show-tool-call-args.ts
14804
14896
  init_esbuild_shims();
14805
- var import_react39 = __toESM(require_react(), 1);
14897
+ var import_react40 = __toESM(require_react(), 1);
14806
14898
  function useShowToolCallArgs() {
14807
- return (0, import_react39.useContext)(SettingsContext)?.merged.ui?.showToolCallArgs === true;
14899
+ return (0, import_react40.useContext)(SettingsContext)?.merged.ui?.showToolCallArgs === true;
14808
14900
  }
14809
14901
  __name(useShowToolCallArgs, "useShowToolCallArgs");
14810
14902
 
@@ -14904,33 +14996,33 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
14904
14996
  const isEmbeddedShellFocused = embeddedShellFocused && toolCalls.some(
14905
14997
  (t2) => t2.ptyId === activeShellPtyId && t2.status === "Executing" /* Executing */
14906
14998
  );
14907
- const toolAwaitingApproval = (0, import_react40.useMemo)(
14999
+ const toolAwaitingApproval = (0, import_react41.useMemo)(
14908
15000
  () => toolCalls.find((tc) => tc.status === "Confirming" /* Confirming */),
14909
15001
  [toolCalls]
14910
15002
  );
14911
- const isMemoryOnlyGroup = (0, import_react40.useMemo)(
15003
+ const isMemoryOnlyGroup = (0, import_react41.useMemo)(
14912
15004
  () => toolCalls.length > 0 && toolCalls.every((t2) => t2.isMemoryOp != null),
14913
15005
  [toolCalls]
14914
15006
  );
14915
- const inlineToolCalls = (0, import_react40.useMemo)(
15007
+ const inlineToolCalls = (0, import_react41.useMemo)(
14916
15008
  () => isPending ? toolCalls.filter(
14917
15009
  (tool) => !isPanelOwnedSubagentTool(tool) || isAgentWithPendingConfirmation(tool.resultDisplay)
14918
15010
  ) : toolCalls,
14919
15011
  [isPending, toolCalls]
14920
15012
  );
14921
- const hasRenderableToolCallArgs = (0, import_react40.useMemo)(
15013
+ const hasRenderableToolCallArgs = (0, import_react41.useMemo)(
14922
15014
  () => showToolCallArgs && inlineToolCalls.some(
14923
15015
  (t2) => t2.args != null && Object.keys(t2.args).length > 0
14924
15016
  ),
14925
15017
  [showToolCallArgs, inlineToolCalls]
14926
15018
  );
14927
- const subagentsAwaitingApproval = (0, import_react40.useMemo)(
15019
+ const subagentsAwaitingApproval = (0, import_react41.useMemo)(
14928
15020
  () => toolCalls.filter(
14929
15021
  (tc) => isAgentWithPendingConfirmation(tc.resultDisplay)
14930
15022
  ),
14931
15023
  [toolCalls]
14932
15024
  );
14933
- const focusedSubagentRef = (0, import_react40.useRef)(null);
15025
+ const focusedSubagentRef = (0, import_react41.useRef)(null);
14934
15026
  const stillPending = subagentsAwaitingApproval.some(
14935
15027
  (tc) => tc.callId === focusedSubagentRef.current
14936
15028
  );
@@ -14938,7 +15030,7 @@ var ToolGroupMessage = /* @__PURE__ */ __name(({
14938
15030
  focusedSubagentRef.current = subagentsAwaitingApproval[0]?.callId ?? null;
14939
15031
  }
14940
15032
  const focusedSubagentCallId = focusedSubagentRef.current;
14941
- const runningSubagentCallId = (0, import_react40.useMemo)(
15033
+ const runningSubagentCallId = (0, import_react41.useMemo)(
14942
15034
  () => toolCalls.find((tc) => isRunningAgent(tc.resultDisplay))?.callId ?? null,
14943
15035
  [toolCalls]
14944
15036
  );
@@ -15186,7 +15278,7 @@ init_esbuild_shims();
15186
15278
 
15187
15279
  // node_modules/ink-link/dist/index.js
15188
15280
  init_esbuild_shims();
15189
- var import_react41 = __toESM(require_react(), 1);
15281
+ var import_react42 = __toESM(require_react(), 1);
15190
15282
  var import_prop_types = __toESM(require_prop_types(), 1);
15191
15283
 
15192
15284
  // node_modules/terminal-link/index.js
@@ -15334,10 +15426,10 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
15334
15426
  // node_modules/ink-link/dist/index.js
15335
15427
  var Link = /* @__PURE__ */ __name(({ children, url, fallback = true }) => (
15336
15428
  // eslint-disable-line react/function-component-definition
15337
- import_react41.default.createElement(
15429
+ import_react42.default.createElement(
15338
15430
  Transform,
15339
15431
  { transform: /* @__PURE__ */ __name((children2) => terminalLink(children2, url, { fallback }), "transform") },
15340
- import_react41.default.createElement(Text, null, children)
15432
+ import_react42.default.createElement(Text, null, children)
15341
15433
  )
15342
15434
  ), "Link");
15343
15435
  Link.propTypes = {
@@ -15491,7 +15583,7 @@ init_esbuild_shims();
15491
15583
 
15492
15584
  // node_modules/ink-gradient/dist/index.js
15493
15585
  init_esbuild_shims();
15494
- var import_react42 = __toESM(require_react(), 1);
15586
+ var import_react43 = __toESM(require_react(), 1);
15495
15587
  var import_prop_types2 = __toESM(require_prop_types(), 1);
15496
15588
  var import_gradient_string = __toESM(require_gradient_string(), 1);
15497
15589
  var Gradient = /* @__PURE__ */ __name((props) => {
@@ -15507,7 +15599,7 @@ var Gradient = /* @__PURE__ */ __name((props) => {
15507
15599
  throw new Error("Either `name` or `colors` prop must be provided");
15508
15600
  }
15509
15601
  const applyGradient = /* @__PURE__ */ __name((text) => gradient.multiline(stripAnsi(text)), "applyGradient");
15510
- return import_react42.default.createElement(Transform, { transform: applyGradient }, props.children);
15602
+ return import_react43.default.createElement(Transform, { transform: applyGradient }, props.children);
15511
15603
  }, "Gradient");
15512
15604
  Gradient.propTypes = {
15513
15605
  children: import_prop_types2.default.oneOfType([
@@ -16370,7 +16462,7 @@ var SessionSummaryDisplay = /* @__PURE__ */ __name(({
16370
16462
 
16371
16463
  // packages/cli/src/ui/components/Help.tsx
16372
16464
  init_esbuild_shims();
16373
- var import_react43 = __toESM(require_react(), 1);
16465
+ var import_react44 = __toESM(require_react(), 1);
16374
16466
  var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
16375
16467
  var DEFAULT_WIDTH = 100;
16376
16468
  var KEY_COL_WIDTH = 20;
@@ -16391,7 +16483,7 @@ var Help = /* @__PURE__ */ __name(({
16391
16483
  }) => {
16392
16484
  const safeWidth = Math.max(72, width);
16393
16485
  const bodyWidth = safeWidth - 6;
16394
- const handleTabChange = (0, import_react43.useCallback)(
16486
+ const handleTabChange = (0, import_react44.useCallback)(
16395
16487
  (direction) => {
16396
16488
  const currentIndex = TAB_DEFS.findIndex((tab) => tab.tab === activeTab);
16397
16489
  const nextIndex = (currentIndex + direction + TAB_DEFS.length) % TAB_DEFS.length;
@@ -16530,20 +16622,20 @@ var ShortcutRow = /* @__PURE__ */ __name(({ shortcutKey, desc, width }) => /* @_
16530
16622
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { color: theme.text.primary, wrap: "truncate", children: truncateText2(desc, width - KEY_COL_WIDTH - 1) })
16531
16623
  ] }), "ShortcutRow");
16532
16624
  var CommandsHelp = /* @__PURE__ */ __name(({ commands, width, customOnly, isInteractive }) => {
16533
- const groups = (0, import_react43.useMemo)(
16625
+ const groups = (0, import_react44.useMemo)(
16534
16626
  () => groupCommands(commands, customOnly),
16535
16627
  [commands, customOnly]
16536
16628
  );
16537
- const lines = (0, import_react43.useMemo)(
16629
+ const lines = (0, import_react44.useMemo)(
16538
16630
  () => renderCommandLines(groups, width),
16539
16631
  [groups, width]
16540
16632
  );
16541
16633
  const maxScroll = Math.max(0, lines.length - COMMAND_LIST_VISIBLE_LINES);
16542
- const [scrollOffset, setScrollOffset] = (0, import_react43.useState)(0);
16543
- (0, import_react43.useEffect)(() => {
16634
+ const [scrollOffset, setScrollOffset] = (0, import_react44.useState)(0);
16635
+ (0, import_react44.useEffect)(() => {
16544
16636
  setScrollOffset(0);
16545
16637
  }, [customOnly, commands]);
16546
- (0, import_react43.useEffect)(() => {
16638
+ (0, import_react44.useEffect)(() => {
16547
16639
  setScrollOffset((offset) => Math.min(offset, maxScroll));
16548
16640
  }, [maxScroll]);
16549
16641
  useKeypress(
@@ -16731,21 +16823,21 @@ init_esbuild_shims();
16731
16823
 
16732
16824
  // packages/cli/src/ui/contexts/UIStateContext.tsx
16733
16825
  init_esbuild_shims();
16734
- var import_react50 = __toESM(require_react(), 1);
16826
+ var import_react51 = __toESM(require_react(), 1);
16735
16827
 
16736
16828
  // packages/cli/src/ui/hooks/useHistoryManager.ts
16737
16829
  init_esbuild_shims();
16738
- var import_react44 = __toESM(require_react(), 1);
16830
+ var import_react45 = __toESM(require_react(), 1);
16739
16831
  import process2 from "node:process";
16740
16832
  var debugLogger8 = createDebugLogger("HISTORY_MANAGER");
16741
16833
  var UI_COMPACT_CLEARED_MESSAGE = "[Old tool result content cleared]";
16742
16834
  var UI_COMPACT_CLEARED_IMAGE_MESSAGE = "[Old assistant image content cleared]";
16743
16835
  var UI_COMPACT_KEEP_RECENT = 20;
16744
16836
  function useHistory() {
16745
- const [history, setHistory] = (0, import_react44.useState)([]);
16746
- const messageIdCounterRef = (0, import_react44.useRef)(0);
16747
- const lastMessageIdRef = (0, import_react44.useRef)(0);
16748
- const getNextMessageId = (0, import_react44.useCallback)((baseTimestamp) => {
16837
+ const [history, setHistory] = (0, import_react45.useState)([]);
16838
+ const messageIdCounterRef = (0, import_react45.useRef)(0);
16839
+ const lastMessageIdRef = (0, import_react45.useRef)(0);
16840
+ const getNextMessageId = (0, import_react45.useCallback)((baseTimestamp) => {
16749
16841
  messageIdCounterRef.current += 1;
16750
16842
  const id = Math.max(
16751
16843
  baseTimestamp + messageIdCounterRef.current,
@@ -16754,7 +16846,7 @@ function useHistory() {
16754
16846
  lastMessageIdRef.current = id;
16755
16847
  return id;
16756
16848
  }, []);
16757
- const loadHistory = (0, import_react44.useCallback)((newHistory) => {
16849
+ const loadHistory = (0, import_react45.useCallback)((newHistory) => {
16758
16850
  setHistory(newHistory);
16759
16851
  let maxLoadedId = 0;
16760
16852
  for (const item of newHistory) {
@@ -16768,7 +16860,7 @@ function useHistory() {
16768
16860
  );
16769
16861
  lastMessageIdRef.current = Math.max(lastMessageIdRef.current, maxLoadedId);
16770
16862
  }, []);
16771
- const addItem = (0, import_react44.useCallback)(
16863
+ const addItem = (0, import_react45.useCallback)(
16772
16864
  (itemData, baseTimestamp) => {
16773
16865
  const id = getNextMessageId(baseTimestamp);
16774
16866
  const newItem = { ...itemData, id };
@@ -16797,7 +16889,7 @@ function useHistory() {
16797
16889
  },
16798
16890
  [getNextMessageId]
16799
16891
  );
16800
- const updateItem = (0, import_react44.useCallback)(
16892
+ const updateItem = (0, import_react45.useCallback)(
16801
16893
  (id, updates) => {
16802
16894
  setHistory((prevHistory) => {
16803
16895
  let updated = false;
@@ -16820,7 +16912,7 @@ function useHistory() {
16820
16912
  },
16821
16913
  []
16822
16914
  );
16823
- const clearItems = (0, import_react44.useCallback)(() => {
16915
+ const clearItems = (0, import_react45.useCallback)(() => {
16824
16916
  if (debugLogger8.isEnabled()) {
16825
16917
  debugLogger8.debug(
16826
16918
  `[CLEAR_HISTORY] Clearing history, memory before=${(process2.memoryUsage().heapUsed / 1024 / 1024).toFixed(1)}MB`
@@ -16830,13 +16922,13 @@ function useHistory() {
16830
16922
  messageIdCounterRef.current = 0;
16831
16923
  lastMessageIdRef.current = 0;
16832
16924
  }, []);
16833
- const truncateToItem = (0, import_react44.useCallback)((itemId) => {
16925
+ const truncateToItem = (0, import_react45.useCallback)((itemId) => {
16834
16926
  setHistory((prev) => {
16835
16927
  const index = prev.findIndex((h) => h.id === itemId);
16836
16928
  return index === -1 ? prev : prev.slice(0, index);
16837
16929
  });
16838
16930
  }, []);
16839
- const compactOldItems = (0, import_react44.useCallback)(() => {
16931
+ const compactOldItems = (0, import_react45.useCallback)(() => {
16840
16932
  setHistory((prev) => {
16841
16933
  if (prev.length === 0) return prev;
16842
16934
  let thoughtRemoved = 0;
@@ -16930,7 +17022,7 @@ ${UI_COMPACT_CLEARED_IMAGE_MESSAGE}` : UI_COMPACT_CLEARED_IMAGE_MESSAGE,
16930
17022
  return thoughtRemoved > 0 || toolGroupsCompacted > 0 || assistantImageItemsCompacted > 0 ? next : prev;
16931
17023
  });
16932
17024
  }, []);
16933
- return (0, import_react44.useMemo)(
17025
+ return (0, import_react45.useMemo)(
16934
17026
  () => ({
16935
17027
  history,
16936
17028
  addItem,
@@ -16955,7 +17047,7 @@ __name(useHistory, "useHistory");
16955
17047
 
16956
17048
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
16957
17049
  init_esbuild_shims();
16958
- var import_react47 = __toESM(require_react(), 1);
17050
+ var import_react48 = __toESM(require_react(), 1);
16959
17051
 
16960
17052
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
16961
17053
  init_esbuild_shims();
@@ -17097,7 +17189,7 @@ __name(CommandFormatMigrationNudge, "CommandFormatMigrationNudge");
17097
17189
 
17098
17190
  // packages/cli/src/ui/components/FolderTrustDialog.tsx
17099
17191
  init_esbuild_shims();
17100
- var import_react45 = __toESM(require_react(), 1);
17192
+ var import_react46 = __toESM(require_react(), 1);
17101
17193
  import * as process3 from "node:process";
17102
17194
  import * as path4 from "node:path";
17103
17195
  var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
@@ -17105,7 +17197,7 @@ var FolderTrustDialog = /* @__PURE__ */ __name(({
17105
17197
  onSelect,
17106
17198
  isRestarting
17107
17199
  }) => {
17108
- (0, import_react45.useEffect)(() => {
17200
+ (0, import_react46.useEffect)(() => {
17109
17201
  const doRelaunch = /* @__PURE__ */ __name(async () => {
17110
17202
  if (isRestarting) {
17111
17203
  setTimeout(async () => {
@@ -17233,16 +17325,16 @@ var MCPServerApprovalDialog = /* @__PURE__ */ __name(({ serverName, summary, sou
17233
17325
 
17234
17326
  // packages/cli/src/ui/hooks/useArenaCommand.ts
17235
17327
  init_esbuild_shims();
17236
- var import_react46 = __toESM(require_react(), 1);
17328
+ var import_react47 = __toESM(require_react(), 1);
17237
17329
  function useArenaCommand() {
17238
- const [activeArenaDialog, setActiveArenaDialog] = (0, import_react46.useState)(null);
17239
- const openArenaDialog = (0, import_react46.useCallback)(
17330
+ const [activeArenaDialog, setActiveArenaDialog] = (0, import_react47.useState)(null);
17331
+ const openArenaDialog = (0, import_react47.useCallback)(
17240
17332
  (type) => {
17241
17333
  setActiveArenaDialog(type);
17242
17334
  },
17243
17335
  []
17244
17336
  );
17245
- const closeArenaDialog = (0, import_react46.useCallback)(() => {
17337
+ const closeArenaDialog = (0, import_react47.useCallback)(() => {
17246
17338
  setActiveArenaDialog(null);
17247
17339
  }, []);
17248
17340
  return {
@@ -17254,9 +17346,9 @@ function useArenaCommand() {
17254
17346
  __name(useArenaCommand, "useArenaCommand");
17255
17347
 
17256
17348
  // packages/cli/src/ui/contexts/UIActionsContext.tsx
17257
- var UIActionsContext = (0, import_react47.createContext)(null);
17349
+ var UIActionsContext = (0, import_react48.createContext)(null);
17258
17350
  var useUIActions = /* @__PURE__ */ __name(() => {
17259
- const context = (0, import_react47.useContext)(UIActionsContext);
17351
+ const context = (0, import_react48.useContext)(UIActionsContext);
17260
17352
  if (!context) {
17261
17353
  throw new Error("useUIActions must be used within a UIActionsProvider");
17262
17354
  }
@@ -17265,16 +17357,16 @@ var useUIActions = /* @__PURE__ */ __name(() => {
17265
17357
 
17266
17358
  // packages/cli/src/ui/hooks/useIdeTrustListener.ts
17267
17359
  init_esbuild_shims();
17268
- var import_react48 = __toESM(require_react(), 1);
17360
+ var import_react49 = __toESM(require_react(), 1);
17269
17361
  function useIdeTrustListener(enabled = true) {
17270
17362
  const settings = useSettings();
17271
- const [connectionStatus, setConnectionStatus] = (0, import_react48.useState)(
17363
+ const [connectionStatus, setConnectionStatus] = (0, import_react49.useState)(
17272
17364
  "disconnected" /* Disconnected */
17273
17365
  );
17274
- const previousTrust = (0, import_react48.useRef)(void 0);
17275
- const [restartReason, setRestartReason] = (0, import_react48.useState)("NONE");
17276
- const [needsRestart, setNeedsRestart] = (0, import_react48.useState)(false);
17277
- const subscribe2 = (0, import_react48.useCallback)(
17366
+ const previousTrust = (0, import_react49.useRef)(void 0);
17367
+ const [restartReason, setRestartReason] = (0, import_react49.useState)("NONE");
17368
+ const [needsRestart, setNeedsRestart] = (0, import_react49.useState)(false);
17369
+ const subscribe2 = (0, import_react49.useCallback)(
17278
17370
  (onStoreChange) => {
17279
17371
  if (!enabled) return () => {
17280
17372
  };
@@ -17309,8 +17401,8 @@ function useIdeTrustListener(enabled = true) {
17309
17401
  }
17310
17402
  return ideContextStore.get()?.workspaceState?.isTrusted;
17311
17403
  }, "getSnapshot");
17312
- const isIdeTrusted = (0, import_react48.useSyncExternalStore)(subscribe2, getSnapshot);
17313
- (0, import_react48.useEffect)(() => {
17404
+ const isIdeTrusted = (0, import_react49.useSyncExternalStore)(subscribe2, getSnapshot);
17405
+ (0, import_react49.useEffect)(() => {
17314
17406
  const currentTrust = isWorkspaceTrusted(settings.merged).isTrusted;
17315
17407
  if (previousTrust.current !== void 0 && previousTrust.current !== currentTrust) {
17316
17408
  setNeedsRestart(true);
@@ -17323,7 +17415,7 @@ __name(useIdeTrustListener, "useIdeTrustListener");
17323
17415
 
17324
17416
  // packages/cli/src/ui/hooks/useProviderUpdates.ts
17325
17417
  init_esbuild_shims();
17326
- var import_react49 = __toESM(require_react(), 1);
17418
+ var import_react50 = __toESM(require_react(), 1);
17327
17419
  var LATER_COOLDOWN_MS = 24 * 60 * 60 * 1e3;
17328
17420
  function getProviderMetadata(settings, metadataKey) {
17329
17421
  const mergedSettings = settings.merged;
@@ -17428,9 +17520,9 @@ function findAllPendingUpdates(settings, currentModel) {
17428
17520
  }
17429
17521
  __name(findAllPendingUpdates, "findAllPendingUpdates");
17430
17522
  function useProviderUpdates(settings, config, addItem) {
17431
- const [updateRequest, setUpdateRequest] = (0, import_react49.useState)();
17432
- const migrated = (0, import_react49.useRef)(false);
17433
- const executeUpdate = (0, import_react49.useCallback)(
17523
+ const [updateRequest, setUpdateRequest] = (0, import_react50.useState)();
17524
+ const migrated = (0, import_react50.useRef)(false);
17525
+ const executeUpdate = (0, import_react50.useCallback)(
17434
17526
  async (pending) => {
17435
17527
  try {
17436
17528
  const providerCfg = pending.provider;
@@ -17531,7 +17623,7 @@ function useProviderUpdates(settings, config, addItem) {
17531
17623
  },
17532
17624
  [settings, config, addItem]
17533
17625
  );
17534
- const checkForUpdates = (0, import_react49.useCallback)(() => {
17626
+ const checkForUpdates = (0, import_react50.useCallback)(() => {
17535
17627
  if (!migrated.current) {
17536
17628
  migrated.current = true;
17537
17629
  migrateProviderMetadata(settings);
@@ -17593,10 +17685,10 @@ function useProviderUpdates(settings, config, addItem) {
17593
17685
  }, "onConfirm")
17594
17686
  });
17595
17687
  }, [settings, config, executeUpdate, addItem]);
17596
- (0, import_react49.useEffect)(() => {
17688
+ (0, import_react50.useEffect)(() => {
17597
17689
  checkForUpdates();
17598
17690
  }, [checkForUpdates]);
17599
- const dismissProviderUpdate = (0, import_react49.useCallback)(() => {
17691
+ const dismissProviderUpdate = (0, import_react50.useCallback)(() => {
17600
17692
  setUpdateRequest(void 0);
17601
17693
  }, []);
17602
17694
  return {
@@ -17607,9 +17699,9 @@ function useProviderUpdates(settings, config, addItem) {
17607
17699
  __name(useProviderUpdates, "useProviderUpdates");
17608
17700
 
17609
17701
  // packages/cli/src/ui/contexts/UIStateContext.tsx
17610
- var UIStateContext = (0, import_react50.createContext)(null);
17702
+ var UIStateContext = (0, import_react51.createContext)(null);
17611
17703
  var useUIState = /* @__PURE__ */ __name(() => {
17612
- const context = (0, import_react50.useContext)(UIStateContext);
17704
+ const context = (0, import_react51.useContext)(UIStateContext);
17613
17705
  if (!context) {
17614
17706
  throw new Error("useUIState must be used within a UIStateProvider");
17615
17707
  }
@@ -18846,7 +18938,7 @@ var InsightProgressMessage = /* @__PURE__ */ __name(({
18846
18938
 
18847
18939
  // packages/cli/src/ui/components/messages/BtwMessage.tsx
18848
18940
  init_esbuild_shims();
18849
- var import_react51 = __toESM(require_react(), 1);
18941
+ var import_react52 = __toESM(require_react(), 1);
18850
18942
  var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
18851
18943
  var BTW_SELF_CHROME = 4;
18852
18944
  function normalizeCodeFences(text) {
@@ -18894,11 +18986,11 @@ var BtwMessageInternal = /* @__PURE__ */ __name(({
18894
18986
  }
18895
18987
  );
18896
18988
  }, "BtwMessageInternal");
18897
- var BtwMessage = import_react51.default.memo(BtwMessageInternal);
18989
+ var BtwMessage = import_react52.default.memo(BtwMessageInternal);
18898
18990
 
18899
18991
  // packages/cli/src/ui/components/messages/AdvisorMessage.tsx
18900
18992
  init_esbuild_shims();
18901
- var import_react52 = __toESM(require_react(), 1);
18993
+ var import_react53 = __toESM(require_react(), 1);
18902
18994
  var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
18903
18995
  var ADVISOR_SELF_CHROME = 4;
18904
18996
  var AdvisorMessageInternal = /* @__PURE__ */ __name(({
@@ -18934,7 +19026,7 @@ var AdvisorMessageInternal = /* @__PURE__ */ __name(({
18934
19026
  }
18935
19027
  );
18936
19028
  }, "AdvisorMessageInternal");
18937
- var AdvisorMessage = import_react52.default.memo(AdvisorMessageInternal);
19029
+ var AdvisorMessage = import_react53.default.memo(AdvisorMessageInternal);
18938
19030
 
18939
19031
  // packages/cli/src/ui/components/messages/MemorySavedMessage.tsx
18940
19032
  init_esbuild_shims();
@@ -19063,7 +19155,7 @@ __name(padRight, "padRight");
19063
19155
 
19064
19156
  // packages/cli/src/ui/components/messages/GoalStatusMessage.tsx
19065
19157
  init_esbuild_shims();
19066
- var import_react53 = __toESM(require_react(), 1);
19158
+ var import_react54 = __toESM(require_react(), 1);
19067
19159
 
19068
19160
  // packages/cli/src/ui/utils/goal-card-view.ts
19069
19161
  init_esbuild_shims();
@@ -19645,18 +19737,18 @@ var GoalStatusMessageInternal = /* @__PURE__ */ __name((props) => {
19645
19737
  ] })
19646
19738
  ] });
19647
19739
  }, "GoalStatusMessageInternal");
19648
- var GoalStatusMessage = import_react53.default.memo(GoalStatusMessageInternal);
19740
+ var GoalStatusMessage = import_react54.default.memo(GoalStatusMessageInternal);
19649
19741
 
19650
19742
  // packages/cli/src/ui/contexts/ToolDetailsExpandedContext.tsx
19651
19743
  init_esbuild_shims();
19652
- var import_react54 = __toESM(require_react(), 1);
19744
+ var import_react55 = __toESM(require_react(), 1);
19653
19745
  var EMPTY_IDS2 = /* @__PURE__ */ new Set();
19654
- var ToolDetailsExpandedContext = (0, import_react54.createContext)({
19746
+ var ToolDetailsExpandedContext = (0, import_react55.createContext)({
19655
19747
  expandedBatchIds: EMPTY_IDS2,
19656
19748
  expandBatch: /* @__PURE__ */ __name(() => {
19657
19749
  }, "expandBatch")
19658
19750
  });
19659
- var useToolDetailsExpanded = /* @__PURE__ */ __name(() => (0, import_react54.useContext)(ToolDetailsExpandedContext), "useToolDetailsExpanded");
19751
+ var useToolDetailsExpanded = /* @__PURE__ */ __name(() => (0, import_react55.useContext)(ToolDetailsExpandedContext), "useToolDetailsExpanded");
19660
19752
  var ToolDetailsExpandedProvider = ToolDetailsExpandedContext.Provider;
19661
19753
 
19662
19754
  // packages/cli/src/ui/utils/hyperlink-at.ts
@@ -19825,8 +19917,8 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
19825
19917
  durationMs,
19826
19918
  onToggle
19827
19919
  }) => {
19828
- const ref = (0, import_react55.useRef)(null);
19829
- const pressRef = (0, import_react55.useRef)(null);
19920
+ const ref = (0, import_react56.useRef)(null);
19921
+ const pressRef = (0, import_react56.useRef)(null);
19830
19922
  const { rows: terminalHeight } = useTerminalSize();
19831
19923
  const { stdout } = use_stdout_default();
19832
19924
  const settings = useSettings();
@@ -19835,7 +19927,7 @@ var ClickableThinkMessage = /* @__PURE__ */ __name(({
19835
19927
  const { menu: contextMenu } = useContextMenu();
19836
19928
  const isActive = !isPending && contextMenu === null;
19837
19929
  useMouseEvents(
19838
- (0, import_react55.useCallback)(
19930
+ (0, import_react56.useCallback)(
19839
19931
  (event) => {
19840
19932
  if (!ref.current) return;
19841
19933
  if (event.name === "move") {
@@ -19902,16 +19994,16 @@ function hasRequiredToolInteraction(props) {
19902
19994
  __name(hasRequiredToolInteraction, "hasRequiredToolInteraction");
19903
19995
  var CollapsibleToolGroupMessage = /* @__PURE__ */ __name(({ expansionKey, ...props }) => {
19904
19996
  const settings = useSettings();
19905
- const [locallyExpanded, setLocallyExpanded] = (0, import_react55.useState)(false);
19997
+ const [locallyExpanded, setLocallyExpanded] = (0, import_react56.useState)(false);
19906
19998
  const { expandedBatchIds, expandBatch } = useToolDetailsExpanded();
19907
- const ref = (0, import_react55.useRef)(null);
19908
- const pressRef = (0, import_react55.useRef)(null);
19999
+ const ref = (0, import_react56.useRef)(null);
20000
+ const pressRef = (0, import_react56.useRef)(null);
19909
20001
  const { rows: terminalHeight } = useTerminalSize();
19910
20002
  const mouseTrackingEnabled = useMouseTrackingEnabled();
19911
20003
  const clickable = useVirtualViewport(settings.merged.ui?.useTerminalBuffer) && mouseTrackingEnabled;
19912
20004
  const collapsed = settings.merged.ui?.showToolCallDetails === false && !locallyExpanded && !(expansionKey && expandedBatchIds.has(expansionKey)) && !props.fullDetail && !hasRequiredToolInteraction(props);
19913
20005
  useMouseEvents(
19914
- (0, import_react55.useCallback)(
20006
+ (0, import_react56.useCallback)(
19915
20007
  (event) => {
19916
20008
  if (!collapsed || !ref.current) return;
19917
20009
  if (event.name === "move") {
@@ -20019,7 +20111,7 @@ var HistoryItemDisplayComponent = /* @__PURE__ */ __name(({
20019
20111
  const resolvedThoughtExpanded = fullDetail || (thoughtExpanded ?? (allExpanded || expandedHeadIds.has(thoughtGroupHeadId)));
20020
20112
  const settings = useSettings();
20021
20113
  const showTimestamps = settings.merged.output?.showTimestamps === true;
20022
- const itemForDisplay = (0, import_react55.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
20114
+ const itemForDisplay = (0, import_react56.useMemo)(() => escapeAnsiCtrlCodes(item), [item]);
20023
20115
  const contentWidth = terminalWidth - 4;
20024
20116
  const boxWidth = mainAreaWidth || contentWidth;
20025
20117
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
@@ -20250,7 +20342,7 @@ Original prompt: ${sanitizeSensitiveText(itemForDisplay.originalPrompt)}` }) }),
20250
20342
  itemForDisplay.id
20251
20343
  );
20252
20344
  }, "HistoryItemDisplayComponent");
20253
- var HistoryItemDisplay = (0, import_react55.memo)(HistoryItemDisplayComponent);
20345
+ var HistoryItemDisplay = (0, import_react56.memo)(HistoryItemDisplayComponent);
20254
20346
  HistoryItemDisplay.displayName = "HistoryItemDisplay";
20255
20347
 
20256
20348
  // packages/cli/src/ui/components/SessionPreview.tsx
@@ -20267,9 +20359,9 @@ function SessionPreview(props) {
20267
20359
  onResume
20268
20360
  } = props;
20269
20361
  const { columns } = useTerminalSize();
20270
- const [data, setData] = (0, import_react56.useState)(null);
20271
- const [error, setError] = (0, import_react56.useState)(null);
20272
- (0, import_react56.useEffect)(() => {
20362
+ const [data, setData] = (0, import_react57.useState)(null);
20363
+ const [error, setError] = (0, import_react57.useState)(null);
20364
+ (0, import_react57.useEffect)(() => {
20273
20365
  let cancelled = false;
20274
20366
  setData(null);
20275
20367
  setError(null);
@@ -20288,11 +20380,11 @@ function SessionPreview(props) {
20288
20380
  cancelled = true;
20289
20381
  };
20290
20382
  }, [sessionService, sessionId]);
20291
- const items = (0, import_react56.useMemo)(() => {
20383
+ const items = (0, import_react57.useMemo)(() => {
20292
20384
  if (!data) return [];
20293
20385
  return buildResumedHistoryItems(data, null);
20294
20386
  }, [data]);
20295
- const computedMessageCount = (0, import_react56.useMemo)(() => {
20387
+ const computedMessageCount = (0, import_react57.useMemo)(() => {
20296
20388
  if (!data) return void 0;
20297
20389
  const seen = /* @__PURE__ */ new Set();
20298
20390
  for (const msg of data.conversation.messages) {
@@ -20658,6 +20750,7 @@ export {
20658
20750
  usePreferredEditor,
20659
20751
  terminalShowsInputCursor,
20660
20752
  renderSoftwareCursor,
20753
+ ThemeCanvasContext,
20661
20754
  TextInput,
20662
20755
  SCROLL_TO_ITEM_END,
20663
20756
  ScrollableListWithForwardRef,