@namzu/cli 36.0.0 → 36.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-BOSEA4R3.js → acp-UTIHYG5O.js} +40 -37
  4. package/dist/chunks/{acp-BOSEA4R3.js.map → acp-UTIHYG5O.js.map} +1 -1
  5. package/dist/chunks/{activity-command-ACS7KL3C.js → activity-command-HK7YJTXV.js} +10 -10
  6. package/dist/chunks/{add-DLS54YKS.js → add-6L5XMPWJ.js} +16 -16
  7. package/dist/chunks/{agent-GV3DWYQC.js → agent-3CRGXHT2.js} +22 -22
  8. package/dist/chunks/agent-session-DYWILIEK.js +46 -0
  9. package/dist/chunks/{archive-6ZENIEBP.js → archive-C4A3HPLF.js} +8 -8
  10. package/dist/chunks/{bin-main-NFFT5ZIU.js → bin-main-UPVJ3XDT.js} +3 -3
  11. package/dist/chunks/{browser-VT2U6NG2.js → browser-CRX4HM4C.js} +6 -6
  12. package/dist/chunks/{chat-UNYVLDFL.js → chat-ADM7LQJ2.js} +13 -13
  13. package/dist/chunks/{chunk-AKKRZTPB.js → chunk-2NJ2XUXJ.js} +3 -3
  14. package/dist/chunks/{chunk-YEMJX2DS.js → chunk-5GRV6P5C.js} +2 -2
  15. package/dist/chunks/{chunk-PT537V7B.js → chunk-5VJBMAA5.js} +26 -26
  16. package/dist/chunks/{chunk-OWXJOD4H.js → chunk-62AMOGEF.js} +4 -4
  17. package/dist/chunks/{chunk-2IL6OG3X.js → chunk-6MJR3CKX.js} +4 -4
  18. package/dist/chunks/{chunk-ZKVZNOUS.js → chunk-7WJOQ6EA.js} +2 -2
  19. package/dist/chunks/{chunk-N3ZEXVSS.js → chunk-A5UXODFL.js} +2 -2
  20. package/dist/chunks/{chunk-WY2WUTFR.js → chunk-AIY4PCDR.js} +4 -4
  21. package/dist/chunks/{chunk-NBH52WHS.js → chunk-AN7FO7NS.js} +2 -2
  22. package/dist/chunks/{chunk-SGGRGKGV.js → chunk-AXIGFKJF.js} +2 -2
  23. package/dist/chunks/{chunk-T2VUTAHB.js → chunk-C5WBEO3X.js} +2 -2
  24. package/dist/chunks/{chunk-FJNDNNNQ.js → chunk-CG65NUSJ.js} +2 -2
  25. package/dist/chunks/{chunk-EVY4MVRE.js → chunk-CRFXLKRC.js} +2 -2
  26. package/dist/chunks/{chunk-MS3IYQ72.js → chunk-EIYM6TY7.js} +4 -4
  27. package/dist/chunks/{chunk-K5HARZ7G.js → chunk-EWKJGHRO.js} +46 -3
  28. package/dist/chunks/chunk-EWKJGHRO.js.map +6 -0
  29. package/dist/chunks/{chunk-QL54XCF4.js → chunk-FTL2OYRA.js} +5 -5
  30. package/dist/chunks/{chunk-7HCPD673.js → chunk-FXS3AG6B.js} +4 -4
  31. package/dist/chunks/{chunk-6YFJDVGA.js → chunk-GIU7BM3G.js} +9 -9
  32. package/dist/chunks/{chunk-QL4O4UGZ.js → chunk-GMCOZ3CU.js} +4 -4
  33. package/dist/chunks/{chunk-6CPT2ZBS.js → chunk-HBBB2CAC.js} +2 -2
  34. package/dist/chunks/{chunk-HZBKWL42.js → chunk-HFJHHCTY.js} +3 -3
  35. package/dist/chunks/{chunk-U6GZ7EW4.js → chunk-HQM2WSQT.js} +2 -2
  36. package/dist/chunks/{chunk-NQT244I2.js → chunk-IAGWQHP3.js} +10 -10
  37. package/dist/chunks/{chunk-YKLKHDZU.js → chunk-IQXCXWCU.js} +12 -12
  38. package/dist/chunks/{chunk-WT6TFCPV.js → chunk-J72CRUNX.js} +2 -2
  39. package/dist/chunks/{chunk-SB6UD3ED.js → chunk-JFZGL35C.js} +13 -13
  40. package/dist/chunks/{chunk-ENGNEELC.js → chunk-JPPC4LJF.js} +3 -3
  41. package/dist/chunks/{chunk-42ZK2AH4.js → chunk-K76WV7TN.js} +2 -2
  42. package/dist/chunks/{chunk-NICLKFBG.js → chunk-KU3W6IHV.js} +2 -2
  43. package/dist/chunks/{chunk-SMIDV4KH.js → chunk-LQMHASKR.js} +3 -3
  44. package/dist/chunks/{chunk-OWH6QQY2.js → chunk-N5IF64K3.js} +6 -6
  45. package/dist/chunks/{chunk-FOFGMP7O.js → chunk-NQY5P2EB.js} +2 -2
  46. package/dist/chunks/{chunk-D67YBUO3.js → chunk-O7DBCVNY.js} +2 -2
  47. package/dist/chunks/{chunk-YQEWD2EN.js → chunk-OLPOM3DR.js} +4 -4
  48. package/dist/chunks/{chunk-6ZPODOJN.js → chunk-PPG2QL5X.js} +4 -4
  49. package/dist/chunks/{chunk-W3UQMRYA.js → chunk-PYG7DZ2D.js} +3 -3
  50. package/dist/chunks/{chunk-M3IAMIBJ.js → chunk-Q24K7536.js} +2 -2
  51. package/dist/chunks/{chunk-NIPHHZ5G.js → chunk-Q5YM2GCX.js} +3 -3
  52. package/dist/chunks/{chunk-IJEB77SH.js → chunk-Q7LRBZ67.js} +7 -7
  53. package/dist/chunks/{chunk-W5KGCUP3.js → chunk-QRXCP5MM.js} +19 -19
  54. package/dist/chunks/{chunk-YYQJIECC.js → chunk-RC6X3ZY6.js} +4 -4
  55. package/dist/chunks/{chunk-I7HQR6ET.js → chunk-SRU3MDHZ.js} +2 -2
  56. package/dist/chunks/{chunk-JNPDWME5.js → chunk-TBJUMXSA.js} +3 -3
  57. package/dist/chunks/{chunk-DIHEHK7K.js → chunk-TIGWWAJI.js} +4 -4
  58. package/dist/chunks/{chunk-BCZR2B3Y.js → chunk-UDBEU2FR.js} +2 -2
  59. package/dist/chunks/{chunk-7KWGR2YA.js → chunk-UOOQPODR.js} +3 -3
  60. package/dist/chunks/{chunk-MH6KUKVV.js → chunk-USLQDRVP.js} +3 -3
  61. package/dist/chunks/{chunk-T4SB6AAF.js → chunk-UWWGSDZ5.js} +3 -3
  62. package/dist/chunks/{chunk-U56QFYGA.js → chunk-V7TQR6AR.js} +6 -6
  63. package/dist/chunks/{chunk-2RBYHHLM.js → chunk-WATMFOHB.js} +6 -6
  64. package/dist/chunks/{chunk-N6SR54VC.js → chunk-WM2JEUGV.js} +2 -2
  65. package/dist/chunks/{chunk-QEQZFG2X.js → chunk-WOXI3NI4.js} +2 -2
  66. package/dist/chunks/{chunk-UFHNXZL2.js → chunk-ZKEWE6K4.js} +3 -3
  67. package/dist/chunks/{chunk-UDDSFIMB.js → chunk-ZYQ2FPIX.js} +8 -8
  68. package/dist/chunks/{cli-runtime-F4MBZ2UQ.js → cli-runtime-7YAOEJGS.js} +8 -8
  69. package/dist/chunks/{commands-GMQGFTIY.js → commands-QPVRB3RK.js} +5 -5
  70. package/dist/chunks/{crash-report-STOHSORG.js → crash-report-S3BTEPYR.js} +6 -6
  71. package/dist/chunks/{dist-XTWYQHHN.js → dist-3GJFRS2X.js} +2 -2
  72. package/dist/chunks/{dist-BGYRQ5BC.js → dist-BFC7XUCT.js} +2 -2
  73. package/dist/chunks/{dist-OTTZ7WVD.js → dist-ERN5DRKK.js} +2 -2
  74. package/dist/chunks/{dist-3AF2X4S5.js → dist-EY3OJBQH.js} +2 -2
  75. package/dist/chunks/{dist-AZIMHV2B.js → dist-G42HPNIE.js} +2 -2
  76. package/dist/chunks/{dist-R3I3ATSG.js → dist-SKRHHPUR.js} +2 -2
  77. package/dist/chunks/{dist-TXEKDBQO.js → dist-WTQZCBE6.js} +22 -8
  78. package/dist/chunks/dist-WTQZCBE6.js.map +6 -0
  79. package/dist/chunks/{doctor-VXSB4Y4P.js → doctor-MHNGUWSL.js} +6 -6
  80. package/dist/chunks/{drain-DXVICQBR.js → drain-CFT2X35J.js} +10 -10
  81. package/dist/chunks/{eval-BMJQXDKA.js → eval-53UONRWR.js} +2 -2
  82. package/dist/chunks/{exec-3T5ESZPH.js → exec-XSCDSOXL.js} +22 -22
  83. package/dist/chunks/{home-ILHA7B6Z.js → home-QS7RBP34.js} +3 -3
  84. package/dist/chunks/{host-queries-QCMWDZGS.js → host-queries-4YHIJFNQ.js} +13 -13
  85. package/dist/chunks/{lifecycle-CB23VJI7.js → lifecycle-AVMQLK5O.js} +23 -23
  86. package/dist/chunks/{list-N6WXZBMD.js → list-DQZU7NEF.js} +12 -12
  87. package/dist/chunks/{login-26NCG6EQ.js → login-UQ2YJDH6.js} +8 -8
  88. package/dist/chunks/{logs-V7SNM7LA.js → logs-KSG7SFAB.js} +4 -4
  89. package/dist/chunks/{mcp-BTHCU5ZC.js → mcp-ZUCM4VTA.js} +15 -15
  90. package/dist/chunks/{message-command-HMIOR52C.js → message-command-YC7JF64G.js} +29 -29
  91. package/dist/chunks/{operator-tools-7LMWOHSN.js → operator-tools-LTPV3CH5.js} +11 -11
  92. package/dist/chunks/{output-schema-XCONYVZ7.js → output-schema-UM3P5AOR.js} +3 -3
  93. package/dist/chunks/{pal-YEUKHA6F.js → pal-HYTOWU72.js} +11 -11
  94. package/dist/chunks/{providers-EI3FAKYB.js → providers-MZHUY6G6.js} +6 -6
  95. package/dist/chunks/{resident-5ZY6OG6B.js → resident-UZKCH2RJ.js} +18 -18
  96. package/dist/chunks/{resume-command-ONYRZIIA.js → resume-command-XZWGUXRK.js} +4 -4
  97. package/dist/chunks/{schedule-6JPEO4NR.js → schedule-4WKULREU.js} +8 -8
  98. package/dist/chunks/{service-WSW3M6K5.js → service-35Y6GXDG.js} +22 -22
  99. package/dist/chunks/session-step-43UTOA63.js +26 -0
  100. package/dist/chunks/{skills-KAZJYGX5.js → skills-HV2MOBEW.js} +8 -8
  101. package/dist/chunks/{state-263OUKQA.js → state-6HV3D3O4.js} +2 -2
  102. package/dist/chunks/{store-KN65QI2M.js → store-6J2MUGON.js} +8 -8
  103. package/dist/chunks/{store-X3TESBIN.js → store-GDP2EW27.js} +6 -6
  104. package/dist/chunks/{store-3XLCJ7EL.js → store-VXNKMMNW.js} +4 -4
  105. package/dist/chunks/{tui-5MU7JBXX.js → tui-TW4Y2UBB.js} +670 -470
  106. package/dist/chunks/{tui-5MU7JBXX.js.map → tui-TW4Y2UBB.js.map} +3 -3
  107. package/dist/chunks/{upgrade-BYM4MWBC.js → upgrade-MC5JB7DK.js} +2 -2
  108. package/dist/chunks/{worktree-K3ZIPXRM.js → worktree-6YPRX6SU.js} +10 -10
  109. package/dist/commands/acp.d.ts.map +1 -1
  110. package/dist/index.js +9 -9
  111. package/dist/integrations/resident/runner-worker.js +16 -16
  112. package/dist/tui/App.d.ts.map +1 -1
  113. package/dist/tui/Composer.d.ts +3 -1
  114. package/dist/tui/Composer.d.ts.map +1 -1
  115. package/dist/tui/Transcript.d.ts +3 -0
  116. package/dist/tui/Transcript.d.ts.map +1 -1
  117. package/dist/tui/TranscriptScrollView.d.ts +23 -0
  118. package/dist/tui/TranscriptScrollView.d.ts.map +1 -0
  119. package/dist/tui/transcript-scroll.d.ts +73 -0
  120. package/dist/tui/transcript-scroll.d.ts.map +1 -0
  121. package/package.json +3 -3
  122. package/dist/chunks/agent-session-7VE6GJJH.js +0 -46
  123. package/dist/chunks/chunk-K5HARZ7G.js.map +0 -6
  124. package/dist/chunks/dist-TXEKDBQO.js.map +0 -6
  125. package/dist/chunks/session-step-2VZM3CCA.js +0 -26
  126. /package/dist/chunks/{activity-command-ACS7KL3C.js.map → activity-command-HK7YJTXV.js.map} +0 -0
  127. /package/dist/chunks/{add-DLS54YKS.js.map → add-6L5XMPWJ.js.map} +0 -0
  128. /package/dist/chunks/{agent-GV3DWYQC.js.map → agent-3CRGXHT2.js.map} +0 -0
  129. /package/dist/chunks/{agent-session-7VE6GJJH.js.map → agent-session-DYWILIEK.js.map} +0 -0
  130. /package/dist/chunks/{archive-6ZENIEBP.js.map → archive-C4A3HPLF.js.map} +0 -0
  131. /package/dist/chunks/{bin-main-NFFT5ZIU.js.map → bin-main-UPVJ3XDT.js.map} +0 -0
  132. /package/dist/chunks/{browser-VT2U6NG2.js.map → browser-CRX4HM4C.js.map} +0 -0
  133. /package/dist/chunks/{chat-UNYVLDFL.js.map → chat-ADM7LQJ2.js.map} +0 -0
  134. /package/dist/chunks/{chunk-AKKRZTPB.js.map → chunk-2NJ2XUXJ.js.map} +0 -0
  135. /package/dist/chunks/{chunk-YEMJX2DS.js.map → chunk-5GRV6P5C.js.map} +0 -0
  136. /package/dist/chunks/{chunk-PT537V7B.js.map → chunk-5VJBMAA5.js.map} +0 -0
  137. /package/dist/chunks/{chunk-OWXJOD4H.js.map → chunk-62AMOGEF.js.map} +0 -0
  138. /package/dist/chunks/{chunk-2IL6OG3X.js.map → chunk-6MJR3CKX.js.map} +0 -0
  139. /package/dist/chunks/{chunk-ZKVZNOUS.js.map → chunk-7WJOQ6EA.js.map} +0 -0
  140. /package/dist/chunks/{chunk-N3ZEXVSS.js.map → chunk-A5UXODFL.js.map} +0 -0
  141. /package/dist/chunks/{chunk-WY2WUTFR.js.map → chunk-AIY4PCDR.js.map} +0 -0
  142. /package/dist/chunks/{chunk-NBH52WHS.js.map → chunk-AN7FO7NS.js.map} +0 -0
  143. /package/dist/chunks/{chunk-SGGRGKGV.js.map → chunk-AXIGFKJF.js.map} +0 -0
  144. /package/dist/chunks/{chunk-T2VUTAHB.js.map → chunk-C5WBEO3X.js.map} +0 -0
  145. /package/dist/chunks/{chunk-FJNDNNNQ.js.map → chunk-CG65NUSJ.js.map} +0 -0
  146. /package/dist/chunks/{chunk-EVY4MVRE.js.map → chunk-CRFXLKRC.js.map} +0 -0
  147. /package/dist/chunks/{chunk-MS3IYQ72.js.map → chunk-EIYM6TY7.js.map} +0 -0
  148. /package/dist/chunks/{chunk-QL54XCF4.js.map → chunk-FTL2OYRA.js.map} +0 -0
  149. /package/dist/chunks/{chunk-7HCPD673.js.map → chunk-FXS3AG6B.js.map} +0 -0
  150. /package/dist/chunks/{chunk-6YFJDVGA.js.map → chunk-GIU7BM3G.js.map} +0 -0
  151. /package/dist/chunks/{chunk-QL4O4UGZ.js.map → chunk-GMCOZ3CU.js.map} +0 -0
  152. /package/dist/chunks/{chunk-6CPT2ZBS.js.map → chunk-HBBB2CAC.js.map} +0 -0
  153. /package/dist/chunks/{chunk-HZBKWL42.js.map → chunk-HFJHHCTY.js.map} +0 -0
  154. /package/dist/chunks/{chunk-U6GZ7EW4.js.map → chunk-HQM2WSQT.js.map} +0 -0
  155. /package/dist/chunks/{chunk-NQT244I2.js.map → chunk-IAGWQHP3.js.map} +0 -0
  156. /package/dist/chunks/{chunk-YKLKHDZU.js.map → chunk-IQXCXWCU.js.map} +0 -0
  157. /package/dist/chunks/{chunk-WT6TFCPV.js.map → chunk-J72CRUNX.js.map} +0 -0
  158. /package/dist/chunks/{chunk-SB6UD3ED.js.map → chunk-JFZGL35C.js.map} +0 -0
  159. /package/dist/chunks/{chunk-ENGNEELC.js.map → chunk-JPPC4LJF.js.map} +0 -0
  160. /package/dist/chunks/{chunk-42ZK2AH4.js.map → chunk-K76WV7TN.js.map} +0 -0
  161. /package/dist/chunks/{chunk-NICLKFBG.js.map → chunk-KU3W6IHV.js.map} +0 -0
  162. /package/dist/chunks/{chunk-SMIDV4KH.js.map → chunk-LQMHASKR.js.map} +0 -0
  163. /package/dist/chunks/{chunk-OWH6QQY2.js.map → chunk-N5IF64K3.js.map} +0 -0
  164. /package/dist/chunks/{chunk-FOFGMP7O.js.map → chunk-NQY5P2EB.js.map} +0 -0
  165. /package/dist/chunks/{chunk-D67YBUO3.js.map → chunk-O7DBCVNY.js.map} +0 -0
  166. /package/dist/chunks/{chunk-YQEWD2EN.js.map → chunk-OLPOM3DR.js.map} +0 -0
  167. /package/dist/chunks/{chunk-6ZPODOJN.js.map → chunk-PPG2QL5X.js.map} +0 -0
  168. /package/dist/chunks/{chunk-W3UQMRYA.js.map → chunk-PYG7DZ2D.js.map} +0 -0
  169. /package/dist/chunks/{chunk-M3IAMIBJ.js.map → chunk-Q24K7536.js.map} +0 -0
  170. /package/dist/chunks/{chunk-NIPHHZ5G.js.map → chunk-Q5YM2GCX.js.map} +0 -0
  171. /package/dist/chunks/{chunk-IJEB77SH.js.map → chunk-Q7LRBZ67.js.map} +0 -0
  172. /package/dist/chunks/{chunk-W5KGCUP3.js.map → chunk-QRXCP5MM.js.map} +0 -0
  173. /package/dist/chunks/{chunk-YYQJIECC.js.map → chunk-RC6X3ZY6.js.map} +0 -0
  174. /package/dist/chunks/{chunk-I7HQR6ET.js.map → chunk-SRU3MDHZ.js.map} +0 -0
  175. /package/dist/chunks/{chunk-JNPDWME5.js.map → chunk-TBJUMXSA.js.map} +0 -0
  176. /package/dist/chunks/{chunk-DIHEHK7K.js.map → chunk-TIGWWAJI.js.map} +0 -0
  177. /package/dist/chunks/{chunk-BCZR2B3Y.js.map → chunk-UDBEU2FR.js.map} +0 -0
  178. /package/dist/chunks/{chunk-7KWGR2YA.js.map → chunk-UOOQPODR.js.map} +0 -0
  179. /package/dist/chunks/{chunk-MH6KUKVV.js.map → chunk-USLQDRVP.js.map} +0 -0
  180. /package/dist/chunks/{chunk-T4SB6AAF.js.map → chunk-UWWGSDZ5.js.map} +0 -0
  181. /package/dist/chunks/{chunk-U56QFYGA.js.map → chunk-V7TQR6AR.js.map} +0 -0
  182. /package/dist/chunks/{chunk-2RBYHHLM.js.map → chunk-WATMFOHB.js.map} +0 -0
  183. /package/dist/chunks/{chunk-N6SR54VC.js.map → chunk-WM2JEUGV.js.map} +0 -0
  184. /package/dist/chunks/{chunk-QEQZFG2X.js.map → chunk-WOXI3NI4.js.map} +0 -0
  185. /package/dist/chunks/{chunk-UFHNXZL2.js.map → chunk-ZKEWE6K4.js.map} +0 -0
  186. /package/dist/chunks/{chunk-UDDSFIMB.js.map → chunk-ZYQ2FPIX.js.map} +0 -0
  187. /package/dist/chunks/{cli-runtime-F4MBZ2UQ.js.map → cli-runtime-7YAOEJGS.js.map} +0 -0
  188. /package/dist/chunks/{commands-GMQGFTIY.js.map → commands-QPVRB3RK.js.map} +0 -0
  189. /package/dist/chunks/{crash-report-STOHSORG.js.map → crash-report-S3BTEPYR.js.map} +0 -0
  190. /package/dist/chunks/{dist-XTWYQHHN.js.map → dist-3GJFRS2X.js.map} +0 -0
  191. /package/dist/chunks/{dist-BGYRQ5BC.js.map → dist-BFC7XUCT.js.map} +0 -0
  192. /package/dist/chunks/{dist-OTTZ7WVD.js.map → dist-ERN5DRKK.js.map} +0 -0
  193. /package/dist/chunks/{dist-3AF2X4S5.js.map → dist-EY3OJBQH.js.map} +0 -0
  194. /package/dist/chunks/{dist-AZIMHV2B.js.map → dist-G42HPNIE.js.map} +0 -0
  195. /package/dist/chunks/{dist-R3I3ATSG.js.map → dist-SKRHHPUR.js.map} +0 -0
  196. /package/dist/chunks/{doctor-VXSB4Y4P.js.map → doctor-MHNGUWSL.js.map} +0 -0
  197. /package/dist/chunks/{drain-DXVICQBR.js.map → drain-CFT2X35J.js.map} +0 -0
  198. /package/dist/chunks/{eval-BMJQXDKA.js.map → eval-53UONRWR.js.map} +0 -0
  199. /package/dist/chunks/{exec-3T5ESZPH.js.map → exec-XSCDSOXL.js.map} +0 -0
  200. /package/dist/chunks/{home-ILHA7B6Z.js.map → home-QS7RBP34.js.map} +0 -0
  201. /package/dist/chunks/{host-queries-QCMWDZGS.js.map → host-queries-4YHIJFNQ.js.map} +0 -0
  202. /package/dist/chunks/{lifecycle-CB23VJI7.js.map → lifecycle-AVMQLK5O.js.map} +0 -0
  203. /package/dist/chunks/{list-N6WXZBMD.js.map → list-DQZU7NEF.js.map} +0 -0
  204. /package/dist/chunks/{login-26NCG6EQ.js.map → login-UQ2YJDH6.js.map} +0 -0
  205. /package/dist/chunks/{logs-V7SNM7LA.js.map → logs-KSG7SFAB.js.map} +0 -0
  206. /package/dist/chunks/{mcp-BTHCU5ZC.js.map → mcp-ZUCM4VTA.js.map} +0 -0
  207. /package/dist/chunks/{message-command-HMIOR52C.js.map → message-command-YC7JF64G.js.map} +0 -0
  208. /package/dist/chunks/{operator-tools-7LMWOHSN.js.map → operator-tools-LTPV3CH5.js.map} +0 -0
  209. /package/dist/chunks/{output-schema-XCONYVZ7.js.map → output-schema-UM3P5AOR.js.map} +0 -0
  210. /package/dist/chunks/{pal-YEUKHA6F.js.map → pal-HYTOWU72.js.map} +0 -0
  211. /package/dist/chunks/{providers-EI3FAKYB.js.map → providers-MZHUY6G6.js.map} +0 -0
  212. /package/dist/chunks/{resident-5ZY6OG6B.js.map → resident-UZKCH2RJ.js.map} +0 -0
  213. /package/dist/chunks/{resume-command-ONYRZIIA.js.map → resume-command-XZWGUXRK.js.map} +0 -0
  214. /package/dist/chunks/{schedule-6JPEO4NR.js.map → schedule-4WKULREU.js.map} +0 -0
  215. /package/dist/chunks/{service-WSW3M6K5.js.map → service-35Y6GXDG.js.map} +0 -0
  216. /package/dist/chunks/{session-step-2VZM3CCA.js.map → session-step-43UTOA63.js.map} +0 -0
  217. /package/dist/chunks/{skills-KAZJYGX5.js.map → skills-HV2MOBEW.js.map} +0 -0
  218. /package/dist/chunks/{state-263OUKQA.js.map → state-6HV3D3O4.js.map} +0 -0
  219. /package/dist/chunks/{store-3XLCJ7EL.js.map → store-6J2MUGON.js.map} +0 -0
  220. /package/dist/chunks/{store-KN65QI2M.js.map → store-GDP2EW27.js.map} +0 -0
  221. /package/dist/chunks/{store-X3TESBIN.js.map → store-VXNKMMNW.js.map} +0 -0
  222. /package/dist/chunks/{upgrade-BYM4MWBC.js.map → upgrade-MC5JB7DK.js.map} +0 -0
  223. /package/dist/chunks/{worktree-K3ZIPXRM.js.map → worktree-6YPRX6SU.js.map} +0 -0
@@ -2,26 +2,26 @@ import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
4
  reportCrash
5
- } from "./chunk-I7HQR6ET.js";
5
+ } from "./chunk-SRU3MDHZ.js";
6
6
  import {
7
7
  changesBlock,
8
8
  changesSinceConfirmed,
9
9
  confirmationView,
10
10
  describeChanges,
11
11
  permissionsChanged
12
- } from "./chunk-EVY4MVRE.js";
12
+ } from "./chunk-CRFXLKRC.js";
13
13
  import {
14
14
  visibleScheduleMessage
15
15
  } from "./chunk-NADQQMMG.js";
16
16
  import {
17
17
  settleAnsweredPark
18
- } from "./chunk-IJEB77SH.js";
18
+ } from "./chunk-Q7LRBZ67.js";
19
19
  import "./chunk-GWQEMJFS.js";
20
20
  import {
21
21
  DELIVERY_READ_LIMIT,
22
22
  readSourceDeliveryPage,
23
23
  takeSuppressedCount
24
- } from "./chunk-YKLKHDZU.js";
24
+ } from "./chunk-IQXCXWCU.js";
25
25
  import {
26
26
  DEFAULT_MAX_ITERATIONS,
27
27
  DEFAULT_TIMEOUT_MS,
@@ -34,7 +34,7 @@ import {
34
34
  runsPerDay,
35
35
  scriptShellUnavailableReason,
36
36
  verifyScheduledScript
37
- } from "./chunk-6ZPODOJN.js";
37
+ } from "./chunk-PPG2QL5X.js";
38
38
  import {
39
39
  callsCount
40
40
  } from "./chunk-E5VLANCO.js";
@@ -43,22 +43,22 @@ import {
43
43
  compileJobPolicy,
44
44
  compileScriptCheckPolicy,
45
45
  isPresetName
46
- } from "./chunk-MS3IYQ72.js";
46
+ } from "./chunk-EIYM6TY7.js";
47
47
  import {
48
48
  formatResumeShellCommand,
49
49
  parkedRunWords,
50
50
  resumeCommand
51
- } from "./chunk-U6GZ7EW4.js";
51
+ } from "./chunk-HQM2WSQT.js";
52
52
  import {
53
53
  appendHistory,
54
54
  nextFireOf,
55
55
  readHistory,
56
56
  readState
57
- } from "./chunk-WT6TFCPV.js";
58
- import "./chunk-BCZR2B3Y.js";
57
+ } from "./chunk-J72CRUNX.js";
58
+ import "./chunk-UDBEU2FR.js";
59
59
  import {
60
60
  setUserConfigValue
61
- } from "./chunk-T4SB6AAF.js";
61
+ } from "./chunk-UWWGSDZ5.js";
62
62
  import {
63
63
  callEndpoint,
64
64
  readEndpoint
@@ -93,10 +93,10 @@ import {
93
93
  turnLimitCommands,
94
94
  wrapBalancedText,
95
95
  wrapChoiceText
96
- } from "./chunk-OWH6QQY2.js";
96
+ } from "./chunk-N5IF64K3.js";
97
97
  import {
98
98
  handleTerminationSignals
99
- } from "./chunk-ZKVZNOUS.js";
99
+ } from "./chunk-7WJOQ6EA.js";
100
100
  import "./chunk-TBIX6JRE.js";
101
101
  import {
102
102
  describeAllCredentialsLogout,
@@ -117,20 +117,20 @@ import {
117
117
  sectionHeading,
118
118
  withDebugDetail,
119
119
  writeConversationExport
120
- } from "./chunk-JNPDWME5.js";
120
+ } from "./chunk-TBJUMXSA.js";
121
121
  import {
122
122
  tuiPalDefinition,
123
123
  tuiPalEnvironment,
124
124
  tuiPalOwner,
125
125
  tuiPalPreferences
126
- } from "./chunk-QL54XCF4.js";
127
- import "./chunk-AKKRZTPB.js";
128
- import "./chunk-UDDSFIMB.js";
129
- import "./chunk-2RBYHHLM.js";
126
+ } from "./chunk-FTL2OYRA.js";
127
+ import "./chunk-2NJ2XUXJ.js";
128
+ import "./chunk-ZYQ2FPIX.js";
129
+ import "./chunk-WATMFOHB.js";
130
130
  import {
131
131
  claimPalConversation,
132
132
  listPalConversations
133
- } from "./chunk-WY2WUTFR.js";
133
+ } from "./chunk-AIY4PCDR.js";
134
134
  import {
135
135
  DEFAULT_AGENT_PHASE,
136
136
  DEFAULT_AGENT_WORKFLOW,
@@ -165,20 +165,20 @@ import {
165
165
  webCallTitle,
166
166
  webLiveStatus,
167
167
  webSettledLine
168
- } from "./chunk-W5KGCUP3.js";
168
+ } from "./chunk-QRXCP5MM.js";
169
169
  import {
170
170
  openManagedWorktrees,
171
171
  worktreeOpenHint
172
- } from "./chunk-QL4O4UGZ.js";
172
+ } from "./chunk-GMCOZ3CU.js";
173
173
  import {
174
174
  describePlainInterruption,
175
175
  describeProviderWait
176
- } from "./chunk-NBH52WHS.js";
176
+ } from "./chunk-AN7FO7NS.js";
177
177
  import {
178
178
  describeBrowserStatus
179
179
  } from "./chunk-WHODOMXA.js";
180
- import "./chunk-7HCPD673.js";
181
- import "./chunk-SMIDV4KH.js";
180
+ import "./chunk-FXS3AG6B.js";
181
+ import "./chunk-LQMHASKR.js";
182
182
  import {
183
183
  SAVE_SKILL_TOOL_NAME,
184
184
  SKILL_CREATOR_SKILL,
@@ -187,15 +187,15 @@ import {
187
187
  learnSkillPrompt,
188
188
  newSkillPrompt,
189
189
  resolveTurnGuards
190
- } from "./chunk-W3UQMRYA.js";
190
+ } from "./chunk-PYG7DZ2D.js";
191
191
  import {
192
192
  openInBrowser
193
- } from "./chunk-QEQZFG2X.js";
193
+ } from "./chunk-WOXI3NI4.js";
194
194
  import {
195
195
  beginCodexDeviceLogin,
196
196
  beginSubscriptionLogin,
197
197
  parsePastedInput
198
- } from "./chunk-OWXJOD4H.js";
198
+ } from "./chunk-62AMOGEF.js";
199
199
  import {
200
200
  NO_SKILLS_FOUND,
201
201
  composeSkillsPrompt,
@@ -203,7 +203,7 @@ import {
203
203
  loadSkillBody,
204
204
  renderSkillRoster,
205
205
  skillTierLabel
206
- } from "./chunk-ENGNEELC.js";
206
+ } from "./chunk-JPPC4LJF.js";
207
207
  import "./chunk-ZWA2JRJV.js";
208
208
  import "./chunk-NUGPLXVK.js";
209
209
  import {
@@ -233,11 +233,11 @@ import {
233
233
  loadConfigWithProvenance,
234
234
  readPermissionLayers,
235
235
  resolveComposerTriggers
236
- } from "./chunk-YYQJIECC.js";
236
+ } from "./chunk-RC6X3ZY6.js";
237
237
  import "./chunk-KONYGNG6.js";
238
238
  import {
239
239
  formatConfigSource
240
- } from "./chunk-NICLKFBG.js";
240
+ } from "./chunk-KU3W6IHV.js";
241
241
  import "./chunk-HE7WUOX2.js";
242
242
  import {
243
243
  pinTrustedProjectPath,
@@ -246,7 +246,7 @@ import {
246
246
  import {
247
247
  debugRequested
248
248
  } from "./chunk-GNBMKISG.js";
249
- import "./chunk-42ZK2AH4.js";
249
+ import "./chunk-K76WV7TN.js";
250
250
  import {
251
251
  displayPath,
252
252
  formatSize,
@@ -270,7 +270,7 @@ import {
270
270
  primaryProvider,
271
271
  signedInSubscriptionProviders,
272
272
  writePreferences
273
- } from "./chunk-SB6UD3ED.js";
273
+ } from "./chunk-JFZGL35C.js";
274
274
  import {
275
275
  ALL_PROVIDER_IDS,
276
276
  PROVIDER_REGISTRY,
@@ -283,19 +283,19 @@ import {
283
283
  } from "./chunk-Y7B67G22.js";
284
284
  import {
285
285
  applyProviderFlags
286
- } from "./chunk-HZBKWL42.js";
286
+ } from "./chunk-HFJHHCTY.js";
287
287
  import "./chunk-XEUQN4JC.js";
288
- import "./chunk-NIPHHZ5G.js";
288
+ import "./chunk-Q5YM2GCX.js";
289
289
  import {
290
290
  PAUSED_TURN_LINES,
291
291
  currentTimeLine,
292
292
  describeTurnStop,
293
293
  handoffContinuationNote
294
- } from "./chunk-N6SR54VC.js";
294
+ } from "./chunk-WM2JEUGV.js";
295
295
  import {
296
296
  contextLogging,
297
297
  installCliLogging
298
- } from "./chunk-6CPT2ZBS.js";
298
+ } from "./chunk-HBBB2CAC.js";
299
299
  import {
300
300
  terminalDisplayText
301
301
  } from "./chunk-EEDZOGV4.js";
@@ -303,7 +303,7 @@ import {
303
303
  effectivePermissionMode,
304
304
  permissionModeDescription,
305
305
  permissionModeLabel
306
- } from "./chunk-YEMJX2DS.js";
306
+ } from "./chunk-5GRV6P5C.js";
307
307
  import "./chunk-LXB3S4IC.js";
308
308
  import "./chunk-OH6TB27S.js";
309
309
  import "./chunk-AHIDYIRB.js";
@@ -325,14 +325,14 @@ import {
325
325
  startConversation,
326
326
  titleOf,
327
327
  unarchiveConversation
328
- } from "./chunk-DIHEHK7K.js";
328
+ } from "./chunk-TIGWWAJI.js";
329
329
  import "./chunk-H6B6AROX.js";
330
- import "./chunk-N3ZEXVSS.js";
331
- import "./chunk-YQEWD2EN.js";
330
+ import "./chunk-A5UXODFL.js";
331
+ import "./chunk-OLPOM3DR.js";
332
332
  import {
333
333
  isTrusted,
334
334
  trustDir
335
- } from "./chunk-FJNDNNNQ.js";
335
+ } from "./chunk-CG65NUSJ.js";
336
336
  import "./chunk-JORONMD3.js";
337
337
  import {
338
338
  clearAllStoredCredentials,
@@ -346,8 +346,8 @@ import {
346
346
  readStoredSubscriptionCredential,
347
347
  restrictToOwner,
348
348
  writeStoredGeminiApiKey
349
- } from "./chunk-M3IAMIBJ.js";
350
- import "./chunk-FOFGMP7O.js";
349
+ } from "./chunk-Q24K7536.js";
350
+ import "./chunk-NQY5P2EB.js";
351
351
  import {
352
352
  DECLINED_TOOL_CALL_FEEDBACK,
353
353
  DEFAULT_MAX_GOAL_ROUNDS,
@@ -398,7 +398,7 @@ import {
398
398
  upcomingFireTimes,
399
399
  validateTimeZone,
400
400
  writePeerRecord
401
- } from "./chunk-K5HARZ7G.js";
401
+ } from "./chunk-EWKJGHRO.js";
402
402
  import {
403
403
  __commonJS,
404
404
  __export,
@@ -35224,11 +35224,11 @@ var use_window_size_default = useWindowSize;
35224
35224
  var import_react33 = __toESM(require_react(), 1);
35225
35225
 
35226
35226
  // src/tui/index.tsx
35227
- var import_react49 = __toESM(require_react(), 1);
35227
+ var import_react50 = __toESM(require_react(), 1);
35228
35228
 
35229
35229
  // src/tui/App.tsx
35230
35230
  import { join as join7, relative as relative3 } from "node:path";
35231
- var import_react48 = __toESM(require_react(), 1);
35231
+ var import_react49 = __toESM(require_react(), 1);
35232
35232
 
35233
35233
  // src/integrations/peers/runtime.ts
35234
35234
  import { createHash, randomBytes } from "node:crypto";
@@ -36299,13 +36299,13 @@ function BackgroundJobsPanel({
36299
36299
  const innerColumns = Math.max(1, columns - 6);
36300
36300
  const narrow = columns < 56;
36301
36301
  if (!detailJobId || !detailed) {
36302
- const pageSize2 = backgroundJobsPageSize(rows);
36302
+ const pageSize3 = backgroundJobsPageSize(rows);
36303
36303
  const selectedIndex = selected ? jobs.findIndex((job) => job.id === selected.id) : 0;
36304
36304
  const start2 = Math.max(
36305
36305
  0,
36306
- Math.min(selectedIndex - Math.floor(pageSize2 / 2), jobs.length - pageSize2)
36306
+ Math.min(selectedIndex - Math.floor(pageSize3 / 2), jobs.length - pageSize3)
36307
36307
  );
36308
- const shown = jobs.slice(start2, start2 + pageSize2);
36308
+ const shown = jobs.slice(start2, start2 + pageSize3);
36309
36309
  const stop = selected?.status === "running" && !busyJobId ? " \xB7 x stop" : "";
36310
36310
  const listHint = jobs.length === 0 ? "esc close" : fitClosingHint(
36311
36311
  [
@@ -36339,7 +36339,7 @@ function BackgroundJobsPanel({
36339
36339
  job.id
36340
36340
  );
36341
36341
  }),
36342
- jobs.length > pageSize2 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: theme.text.muted, wrap: "truncate-end", children: `${start2 + 1}\u2013${Math.min(start2 + pageSize2, jobs.length)}/${jobs.length}` }) : null,
36342
+ jobs.length > pageSize3 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: theme.text.muted, wrap: "truncate-end", children: `${start2 + 1}\u2013${Math.min(start2 + pageSize3, jobs.length)}/${jobs.length}` }) : null,
36343
36343
  notice ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: theme.status.warn, wrap: "truncate-end", children: truncateChoiceText(notice, innerColumns) }) : null,
36344
36344
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: theme.text.muted, wrap: "truncate-end", children: listHint })
36345
36345
  ]
@@ -36348,11 +36348,11 @@ function BackgroundJobsPanel({
36348
36348
  }
36349
36349
  const output = readOutput(readJob, detailed.id);
36350
36350
  const outputRows = backgroundJobOutputRows(output, columns);
36351
- const pageSize = backgroundJobOutputPageSize(rows);
36352
- const maxOffset = Math.max(0, outputRows.length - pageSize);
36351
+ const pageSize2 = backgroundJobOutputPageSize(rows);
36352
+ const maxOffset = Math.max(0, outputRows.length - pageSize2);
36353
36353
  const offset = Math.max(0, Math.min(tailOffset, maxOffset));
36354
36354
  const end = outputRows.length - offset;
36355
- const start = Math.max(0, end - pageSize);
36355
+ const start = Math.max(0, end - pageSize2);
36356
36356
  const allCommandRows = permissionReviewRows(
36357
36357
  terminalDisplayText(detailed.command).replace(/\t/gu, " "),
36358
36358
  columns
@@ -36843,9 +36843,9 @@ function ToolOutputViewer({
36843
36843
  onNext
36844
36844
  }) {
36845
36845
  const wrapped = (0, import_react35.useMemo)(() => permissionReviewRows(lines.join("\n"), columns), [lines, columns]);
36846
- const pageSize = Math.max(1, (rows ?? 24) - 10);
36846
+ const pageSize2 = Math.max(1, (rows ?? 24) - 10);
36847
36847
  const [offset, setOffset] = (0, import_react35.useState)(0);
36848
- const last = Math.max(0, wrapped.length - pageSize);
36848
+ const last = Math.max(0, wrapped.length - pageSize2);
36849
36849
  const start = Math.min(offset, last);
36850
36850
  use_input_default((input, key) => {
36851
36851
  if (key.escape || input === "q" || key.ctrl && (input === "o" || input === "c")) {
@@ -36856,8 +36856,8 @@ function ToolOutputViewer({
36856
36856
  if (key.rightArrow) onNext?.();
36857
36857
  if (key.upArrow) setOffset(Math.max(0, start - 1));
36858
36858
  if (key.downArrow) setOffset(Math.min(last, start + 1));
36859
- if (key.pageUp) setOffset(Math.max(0, start - pageSize));
36860
- if (key.pageDown || input === " ") setOffset(Math.min(last, start + pageSize));
36859
+ if (key.pageUp) setOffset(Math.max(0, start - pageSize2));
36860
+ if (key.pageDown || input === " ") setOffset(Math.min(last, start + pageSize2));
36861
36861
  if (input === "g") setOffset(0);
36862
36862
  if (input === "G") setOffset(last);
36863
36863
  });
@@ -36866,7 +36866,7 @@ function ToolOutputViewer({
36866
36866
  "Tool output \xB7 ",
36867
36867
  terminalDisplayText(title).split("\n")[0]
36868
36868
  ] }),
36869
- wrapped.slice(start, start + pageSize).map((row) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
36869
+ wrapped.slice(start, start + pageSize2).map((row) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
36870
36870
  Text,
36871
36871
  {
36872
36872
  wrap: "truncate-end",
@@ -36878,7 +36878,7 @@ function ToolOutputViewer({
36878
36878
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: theme.text.muted, wrap: "truncate-end", children: fitHints(
36879
36879
  [
36880
36880
  {
36881
- text: `${start + 1}\u2013${Math.min(start + pageSize, wrapped.length)}/${wrapped.length}`,
36881
+ text: `${start + 1}\u2013${Math.min(start + pageSize2, wrapped.length)}/${wrapped.length}`,
36882
36882
  rank: 5
36883
36883
  },
36884
36884
  { text: "\u2190\u2192 outputs", rank: 3 },
@@ -37129,7 +37129,7 @@ __name(waitingLine, "waitingLine");
37129
37129
 
37130
37130
  // src/tui/selection-window.ts
37131
37131
  var SELECTION_WINDOW_SIZE = 7;
37132
- function moveSelection(selected, itemCount, movement, pageSize = SELECTION_WINDOW_SIZE) {
37132
+ function moveSelection(selected, itemCount, movement, pageSize2 = SELECTION_WINDOW_SIZE) {
37133
37133
  if (itemCount <= 0) return 0;
37134
37134
  const current = Math.max(0, Math.min(selected, itemCount - 1));
37135
37135
  switch (movement) {
@@ -37138,9 +37138,9 @@ function moveSelection(selected, itemCount, movement, pageSize = SELECTION_WINDO
37138
37138
  case "next":
37139
37139
  return Math.min(itemCount - 1, current + 1);
37140
37140
  case "previous-page":
37141
- return Math.max(0, current - Math.max(1, pageSize));
37141
+ return Math.max(0, current - Math.max(1, pageSize2));
37142
37142
  case "next-page":
37143
- return Math.min(itemCount - 1, current + Math.max(1, pageSize));
37143
+ return Math.min(itemCount - 1, current + Math.max(1, pageSize2));
37144
37144
  case "first":
37145
37145
  return 0;
37146
37146
  case "last":
@@ -37186,7 +37186,7 @@ function AgentTaskPanel({
37186
37186
  }) {
37187
37187
  const now = useLiveNow(true);
37188
37188
  const activityLines = agentTaskPanelShowsActivity(terminalRows);
37189
- const pageSize = agentTaskPanelPageSize(terminalRows);
37189
+ const pageSize2 = agentTaskPanelPageSize(terminalRows);
37190
37190
  const active = agents.filter((agent) => !isTerminalStatus(agent.status)).length;
37191
37191
  const workflows = [...new Set(agents.map((agent) => agent.workflow))];
37192
37192
  const workflowLabel = workflows.length === 1 ? workflows[0] : void 0;
@@ -37201,7 +37201,7 @@ function AgentTaskPanel({
37201
37201
  phase: phased ? phase : void 0,
37202
37202
  agents: [...phase.agents]
37203
37203
  }));
37204
- let budget = compact ? 0 : pageSize;
37204
+ let budget = compact ? 0 : pageSize2;
37205
37205
  const drawn = groups.map((group) => {
37206
37206
  const settled = group.phase !== void 0 && isTerminalStatus(group.phase.status);
37207
37207
  if (settled) return { ...group, settled, visible: [] };
@@ -37532,12 +37532,12 @@ function PhasePane({
37532
37532
  phases,
37533
37533
  selected,
37534
37534
  focused,
37535
- pageSize,
37535
+ pageSize: pageSize2,
37536
37536
  paneWidth,
37537
37537
  showDetail,
37538
37538
  now
37539
37539
  }) {
37540
- const { start, items } = selectionWindow(phases, selected, pageSize);
37540
+ const { start, items } = selectionWindow(phases, selected, pageSize2);
37541
37541
  const showElapsed = paneWidth >= 28;
37542
37542
  const focusedPhase = phases[selected];
37543
37543
  const detailLines = showDetail && focusedPhase?.detail ? wrapPhaseDetailLines(focusedPhase.detail, paneWidth).slice(0, PHASE_DETAIL_LINE_BUDGET) : [];
@@ -37591,13 +37591,13 @@ function AgentPane({
37591
37591
  phaseName,
37592
37592
  selected,
37593
37593
  focused,
37594
- pageSize,
37594
+ pageSize: pageSize2,
37595
37595
  now,
37596
37596
  wide,
37597
37597
  terminalColumns,
37598
37598
  detailWidth
37599
37599
  }) {
37600
- const { start, items } = selectionWindow(agents, selected, pageSize);
37600
+ const { start, items } = selectionWindow(agents, selected, pageSize2);
37601
37601
  const showModel = wide;
37602
37602
  const showCounters = wide && terminalColumns >= 120;
37603
37603
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
@@ -37612,7 +37612,7 @@ function AgentPane({
37612
37612
  agents.length,
37613
37613
  " ",
37614
37614
  agents.length === 1 ? "agent" : "agents",
37615
- agents.length > pageSize ? ` \xB7 ${selected + 1}/${agents.length}` : ""
37615
+ agents.length > pageSize2 ? ` \xB7 ${selected + 1}/${agents.length}` : ""
37616
37616
  ]
37617
37617
  }
37618
37618
  ),
@@ -37838,15 +37838,15 @@ function maxAgentTranscriptTailOffset(agent, terminalRows, terminalColumns) {
37838
37838
  }
37839
37839
  __name(maxAgentTranscriptTailOffset, "maxAgentTranscriptTailOffset");
37840
37840
  function agentTranscriptPage(agent, tailOffset, terminalRows, terminalColumns) {
37841
- const pageSize = agentTranscriptPageSize(terminalRows, transcriptBannerRows(agent));
37841
+ const pageSize2 = agentTranscriptPageSize(terminalRows, transcriptBannerRows(agent));
37842
37842
  const rows = agentTranscriptRows(agent, terminalColumns);
37843
37843
  const total = rows.length;
37844
- const offset = Math.min(Math.max(0, tailOffset), Math.max(0, total - pageSize));
37844
+ const offset = Math.min(Math.max(0, tailOffset), Math.max(0, total - pageSize2));
37845
37845
  const end = Math.max(0, total - offset);
37846
- const start = Math.max(0, end - pageSize);
37846
+ const start = Math.max(0, end - pageSize2);
37847
37847
  return {
37848
37848
  rows: rows.slice(start, end),
37849
- pageSize,
37849
+ pageSize: pageSize2,
37850
37850
  first: total === 0 ? 0 : start + 1,
37851
37851
  last: end,
37852
37852
  total
@@ -39665,6 +39665,7 @@ function Composer({
39665
39665
  onDraftRestored,
39666
39666
  onDraftPresenceChange,
39667
39667
  onOpenAgentPanel,
39668
+ onScrollTranscript,
39668
39669
  onRecallQueued,
39669
39670
  onCycleMode,
39670
39671
  triggers,
@@ -40099,6 +40100,10 @@ function Composer({
40099
40100
  setCursorState(next);
40100
40101
  return;
40101
40102
  }
40103
+ if (key.pageUp && !hasLiveSuggestions && onScrollTranscript) {
40104
+ onScrollTranscript();
40105
+ return;
40106
+ }
40102
40107
  if (hasLiveSuggestions && (key.home || key.end || key.pageUp || key.pageDown)) {
40103
40108
  if (key.home) setSelectedIndex(0);
40104
40109
  else if (key.end) setSelectedIndex(liveSuggestionCount - 1);
@@ -40575,8 +40580,8 @@ function filterChoiceOptions(options, query) {
40575
40580
  });
40576
40581
  }
40577
40582
  __name(filterChoiceOptions, "filterChoiceOptions");
40578
- function moveChoiceSelection(options, selected, movement, pageSize = SELECTION_WINDOW_SIZE) {
40579
- const candidate = moveSelection(selected, options.length, movement, pageSize);
40583
+ function moveChoiceSelection(options, selected, movement, pageSize2 = SELECTION_WINDOW_SIZE) {
40584
+ const candidate = moveSelection(selected, options.length, movement, pageSize2);
40580
40585
  const direction = movement === "previous" || movement === "previous-page" || movement === "last" ? -1 : 1;
40581
40586
  for (let index = candidate; index >= 0 && index < options.length; index += direction) {
40582
40587
  if (!options[index]?.disabledReason) return index;
@@ -40626,7 +40631,7 @@ function ChoicePicker({
40626
40631
  (option) => Boolean(option.selectedDescription || option.disabledReason)
40627
40632
  );
40628
40633
  const hasRule = options.some((option) => option.ruleBefore);
40629
- const pageSize = choicePickerWindowSize({
40634
+ const pageSize2 = choicePickerWindowSize({
40630
40635
  rows: terminal.rows,
40631
40636
  columns,
40632
40637
  searchable: query !== void 0,
@@ -40635,7 +40640,7 @@ function ChoicePicker({
40635
40640
  rule: hasRule,
40636
40641
  windowSize
40637
40642
  });
40638
- const { start, items: visible } = selectionWindow(options, selected, pageSize);
40643
+ const { start, items: visible } = selectionWindow(options, selected, pageSize2);
40639
40644
  const count2 = `${selectedOption ? selected + 1 : 0}/${options.length}`;
40640
40645
  const markerFor = /* @__PURE__ */ __name((option) => [
40641
40646
  option.current ? "[current]" : "",
@@ -44837,8 +44842,179 @@ function contentColorForRole(role) {
44837
44842
  }
44838
44843
  __name(contentColorForRole, "contentColorForRole");
44839
44844
 
44840
- // src/tui/TrustPrompt.tsx
44845
+ // src/tui/TranscriptScrollView.tsx
44846
+ var import_react48 = __toESM(require_react(), 1);
44847
+
44848
+ // src/tui/transcript-scroll.ts
44849
+ var GUTTER = 2;
44850
+ function transcriptScrollRows(messages, pending, pendingAt, columns) {
44851
+ const at = Math.min(Math.max(pendingAt ?? messages.length, 0), messages.length);
44852
+ const ordered = pending ? [...messages.slice(0, at), pending, ...messages.slice(at)] : messages;
44853
+ const width = Math.max(4, Math.floor(columns) - GUTTER);
44854
+ const rows = [];
44855
+ ordered.forEach((message, index) => {
44856
+ const prev = index > 0 ? ordered[index - 1] : void 0;
44857
+ const glyph = message.glyph ?? glyphForRole(message.role);
44858
+ const glyphColor = message.glyphColor ?? (glyph === "\u23BF" ? theme.text.muted : glyphColorForRole(message.role));
44859
+ const color = contentColorForRole(message.role);
44860
+ const joined = message.statusRows ? message.statusRows.map(([label, value]) => `${label} ${value}`).join("\n") : `${message.content.length > 0 ? message.content : message.pending ? "\u2026" : ""}${message.meta ? ` \xB7 ${terminalDisplayText(message.meta)}` : ""}`;
44861
+ const body = wrapChoiceText(joined, width);
44862
+ const detail = message.statusRows ? [] : renderedDetailLines(message).flatMap(
44863
+ (line) => wrapChoiceText(line.length > 0 ? line : " ", width + GUTTER).map((part) => part)
44864
+ );
44865
+ const gap = !prev || glyph === "\u23BF" ? 0 : 1;
44866
+ if (rows.length > 0 && gap === 1) rows.push({ glyph: " ", glyphColor, text: "", color });
44867
+ body.forEach((text, i) => {
44868
+ rows.push({ glyph: i === 0 ? glyph : " ", glyphColor, text, color });
44869
+ });
44870
+ for (const text of detail) {
44871
+ rows.push({
44872
+ glyph: " ",
44873
+ glyphColor,
44874
+ text: text.trimStart() ? text : "",
44875
+ color: theme.text.muted
44876
+ });
44877
+ }
44878
+ });
44879
+ return rows;
44880
+ }
44881
+ __name(transcriptScrollRows, "transcriptScrollRows");
44882
+ function lastTop(total, height) {
44883
+ return Math.max(0, total - height);
44884
+ }
44885
+ __name(lastTop, "lastTop");
44886
+ function endSignature(rows) {
44887
+ const last = rows.at(-1);
44888
+ return `${rows.length}:${last?.text ?? ""}`;
44889
+ }
44890
+ __name(endSignature, "endSignature");
44891
+ function openScroll(rows, height) {
44892
+ const total = rows.length;
44893
+ if (total <= height) return null;
44894
+ return {
44895
+ top: Math.max(0, lastTop(total, height) - pageSize(height)),
44896
+ unseen: false,
44897
+ signature: endSignature(rows)
44898
+ };
44899
+ }
44900
+ __name(openScroll, "openScroll");
44901
+ function pageSize(height) {
44902
+ return Math.max(1, height - 1);
44903
+ }
44904
+ __name(pageSize, "pageSize");
44905
+ function moveScroll(state, move, total, height) {
44906
+ const max = lastTop(total, height);
44907
+ const page = pageSize(height);
44908
+ let top = state.top;
44909
+ switch (move) {
44910
+ case "page-up":
44911
+ top -= page;
44912
+ break;
44913
+ case "page-down":
44914
+ top += page;
44915
+ break;
44916
+ case "line-up":
44917
+ top -= 1;
44918
+ break;
44919
+ case "line-down":
44920
+ top += 1;
44921
+ break;
44922
+ case "top":
44923
+ top = 0;
44924
+ break;
44925
+ case "bottom":
44926
+ return "latest";
44927
+ }
44928
+ if (top >= max) return "latest";
44929
+ return { ...state, top: Math.max(0, top) };
44930
+ }
44931
+ __name(moveScroll, "moveScroll");
44932
+ function syncScroll(state, rows, height) {
44933
+ const total = rows.length;
44934
+ const max = lastTop(total, height);
44935
+ if (state.top >= max) return "latest";
44936
+ const signature = endSignature(rows);
44937
+ return {
44938
+ top: state.top,
44939
+ unseen: state.unseen || signature !== state.signature,
44940
+ signature
44941
+ };
44942
+ }
44943
+ __name(syncScroll, "syncScroll");
44944
+ var HINT_IDLE = ["\u2193 Back to bottom \xB7 esc", "\u2193 Bottom \xB7 esc", "\u2193 Bottom", "\u2193"];
44945
+ var HINT_UNSEEN = [
44946
+ "New activity \xB7 \u2193 Back to bottom \xB7 esc",
44947
+ "New activity \xB7 \u2193 Bottom \xB7 esc",
44948
+ "New \xB7 \u2193 Bottom",
44949
+ "\u2193 Bottom",
44950
+ "\u2193"
44951
+ ];
44952
+ function followHint(columns, unseen) {
44953
+ const ladder = unseen ? HINT_UNSEEN : HINT_IDLE;
44954
+ return ladder.find((label) => choiceDisplayWidth(label) <= columns) ?? null;
44955
+ }
44956
+ __name(followHint, "followHint");
44957
+
44958
+ // src/tui/TranscriptScrollView.tsx
44841
44959
  var import_jsx_runtime27 = (
44960
+ // biome-ignore lint/suspicious/noArrayIndexKey: a window of rows has no identity beyond its position.
44961
+ __toESM(require_jsx_runtime(), 1)
44962
+ );
44963
+ function TranscriptScrollView({
44964
+ messages,
44965
+ pending,
44966
+ pendingAt,
44967
+ height,
44968
+ columns,
44969
+ onClose
44970
+ }) {
44971
+ const rows = (0, import_react48.useMemo)(
44972
+ () => transcriptScrollRows(messages, pending, pendingAt, columns),
44973
+ [messages, pending, pendingAt, columns]
44974
+ );
44975
+ const [state, setState] = (0, import_react48.useState)(() => openScroll(rows, height));
44976
+ const view = state === null ? "latest" : syncScroll(state, rows, height);
44977
+ (0, import_react48.useEffect)(() => {
44978
+ if (view === "latest") {
44979
+ onClose();
44980
+ return;
44981
+ }
44982
+ if (state && (view.unseen !== state.unseen || view.signature !== state.signature))
44983
+ setState(view);
44984
+ }, [view, state, onClose]);
44985
+ use_input_default((input, key) => {
44986
+ if (view === "latest") return;
44987
+ if (key.escape || key.ctrl && input === "c") {
44988
+ onClose();
44989
+ return;
44990
+ }
44991
+ let move = null;
44992
+ if (key.pageUp) move = "page-up";
44993
+ else if (key.pageDown || input === " ") move = "page-down";
44994
+ else if (key.upArrow || input === "k") move = "line-up";
44995
+ else if (key.downArrow || input === "j") move = "line-down";
44996
+ else if (key.home || input === "g") move = "top";
44997
+ else if (key.end || input === "G") move = "bottom";
44998
+ if (!move) return;
44999
+ const next = moveScroll(view, move, rows.length, height);
45000
+ if (next === "latest") onClose();
45001
+ else setState(next);
45002
+ });
45003
+ if (view === "latest") return null;
45004
+ const shown = rows.slice(view.top, view.top + height);
45005
+ const hint = followHint(columns, view.unseen);
45006
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "column", children: [
45007
+ shown.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Box_default, { flexDirection: "row", children: [
45008
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { width: 2, flexShrink: 0, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: row.glyphColor, bold: true, children: row.glyph }) }),
45009
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: row.color, wrap: "truncate-end", children: row.text.length > 0 ? row.text : " " })
45010
+ ] }, `${view.top + i}`)),
45011
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: view.unseen ? theme.text.secondary : theme.text.muted, wrap: "truncate-end", children: hint ?? " " }) })
45012
+ ] });
45013
+ }
45014
+ __name(TranscriptScrollView, "TranscriptScrollView");
45015
+
45016
+ // src/tui/TrustPrompt.tsx
45017
+ var import_jsx_runtime28 = (
44842
45018
  // biome-ignore lint/suspicious/noArrayIndexKey: the words of a fixed label have no identity beyond their order.
44843
45019
  __toESM(require_jsx_runtime(), 1)
44844
45020
  );
@@ -44874,7 +45050,7 @@ __name(trustChoiceRows, "trustChoiceRows");
44874
45050
  function choice(text) {
44875
45051
  return text.split(" ").map((word, at) => {
44876
45052
  const color = word === "y" ? theme.status.ok : KEYS.has(word) ? theme.status.error : void 0;
44877
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color, bold: color !== void 0, children: [
45053
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color, bold: color !== void 0, children: [
44878
45054
  at > 0 ? " " : "",
44879
45055
  word
44880
45056
  ] }, at);
@@ -44884,7 +45060,7 @@ __name(choice, "choice");
44884
45060
  function TrustPrompt({ cwd: cwd2 }) {
44885
45061
  const terminal = use_window_size_default();
44886
45062
  const choices2 = trustChoiceRows(terminal.columns);
44887
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
45063
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
44888
45064
  Box_default,
44889
45065
  {
44890
45066
  flexDirection: "column",
@@ -44893,15 +45069,15 @@ function TrustPrompt({ cwd: cwd2 }) {
44893
45069
  paddingX: PADDING_X,
44894
45070
  paddingY: 1,
44895
45071
  children: [
44896
- trustTitleLines(terminal.columns).map((line) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme.status.warn, bold: true, children: line }, line)),
44897
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme.accent.user, children: displayPath(cwd2, trustPathWidth(terminal.columns)) }) }),
44898
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: trustSentenceLines(terminal.columns).flatMap(
45072
+ trustTitleLines(terminal.columns).map((line) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.status.warn, bold: true, children: line }, line)),
45073
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.accent.user, children: displayPath(cwd2, trustPathWidth(terminal.columns)) }) }),
45074
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: trustSentenceLines(terminal.columns).flatMap(
44899
45075
  (lines, sentence) => lines.map((line, at) => (
44900
45076
  // biome-ignore lint/suspicious/noArrayIndexKey: wrapped lines have no identity beyond their order.
44901
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { color: theme.text.secondary, children: line }, `${sentence}-${at}`)
45077
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { color: theme.text.secondary, children: line }, `${sentence}-${at}`)
44902
45078
  ))
44903
45079
  ) }),
44904
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: choices2.map(([yes, no]) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Text, { color: theme.text.muted, children: [
45080
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { marginTop: 1, flexDirection: "column", children: choices2.map(([yes, no]) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Text, { color: theme.text.muted, children: [
44905
45081
  yes ? choice(yes) : null,
44906
45082
  yes && no ? " \xB7 " : null,
44907
45083
  no ? choice(no) : null
@@ -44913,7 +45089,7 @@ function TrustPrompt({ cwd: cwd2 }) {
44913
45089
  __name(TrustPrompt, "TrustPrompt");
44914
45090
 
44915
45091
  // src/tui/ViewportBound.tsx
44916
- var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
45092
+ var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
44917
45093
  function liveRegionCap(rows) {
44918
45094
  if (rows === void 0 || !Number.isFinite(rows) || rows < 3) return void 0;
44919
45095
  return Math.floor(rows) - 1;
@@ -44922,9 +45098,9 @@ __name(liveRegionCap, "liveRegionCap");
44922
45098
  function ViewportBound({ rows, display = "flex", children }) {
44923
45099
  const cap = liveRegionCap(rows);
44924
45100
  if (cap === void 0) {
44925
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", display, children });
45101
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", display, children });
44926
45102
  }
44927
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
45103
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
44928
45104
  Box_default,
44929
45105
  {
44930
45106
  flexDirection: "column",
@@ -44932,7 +45108,7 @@ function ViewportBound({ rows, display = "flex", children }) {
44932
45108
  maxHeight: cap,
44933
45109
  overflowY: "hidden",
44934
45110
  justifyContent: "flex-end",
44935
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Box_default, { flexDirection: "column", flexShrink: 0, children })
45111
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", flexShrink: 0, children })
44936
45112
  }
44937
45113
  );
44938
45114
  }
@@ -48396,7 +48572,7 @@ async function reviewMergeBase(cwd2, branch) {
48396
48572
  __name(reviewMergeBase, "reviewMergeBase");
48397
48573
 
48398
48574
  // src/tui/App.tsx
48399
- var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
48575
+ var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
48400
48576
  var SESSION_CLOSE_ON_EXIT_MS = 5e3;
48401
48577
  var FREE_TEXT_ANSWER = "__free_text__";
48402
48578
  var STREAM_RELEASE_MS = 250;
@@ -48533,6 +48709,7 @@ function goalRoundPrompt(authority) {
48533
48709
  ].join("\n");
48534
48710
  }
48535
48711
  __name(goalRoundPrompt, "goalRoundPrompt");
48712
+ var SCROLL_VIEW_RESERVED_ROWS = 9;
48536
48713
  var LIVE_FURNITURE_ROWS = 10;
48537
48714
  var defaultExternalEditor = /* @__PURE__ */ __name(({ seed, cwd: cwd2, signal }) => editDraftInExternalEditor(seed, { cwd: cwd2, signal }), "defaultExternalEditor");
48538
48715
  function App2({
@@ -48541,10 +48718,10 @@ function App2({
48541
48718
  externalEditor = defaultExternalEditor,
48542
48719
  terminationExit
48543
48720
  }) {
48544
- const trustedCwdRef = (0, import_react48.useRef)(pinTrustedProjectPath(initialCtx, initialCtx.cwd));
48545
- const [ctx, setCtx] = (0, import_react48.useState)(initialCtx);
48546
- const ctxRef = (0, import_react48.useRef)(initialCtx);
48547
- const activateTrustedProject = (0, import_react48.useCallback)(() => {
48721
+ const trustedCwdRef = (0, import_react49.useRef)(pinTrustedProjectPath(initialCtx, initialCtx.cwd));
48722
+ const [ctx, setCtx] = (0, import_react49.useState)(initialCtx);
48723
+ const ctxRef = (0, import_react49.useRef)(initialCtx);
48724
+ const activateTrustedProject = (0, import_react49.useCallback)(() => {
48548
48725
  const resolved = resolveTrustedProjectContext(initialCtx, trustedCwdRef.current);
48549
48726
  ctxRef.current = resolved;
48550
48727
  setCtx(resolved);
@@ -48554,39 +48731,40 @@ function App2({
48554
48731
  const { stdout, write: writeStdout } = use_stdout_default();
48555
48732
  const terminal = use_window_size_default();
48556
48733
  const hyperlinks = terminalSupportsHyperlinks(process.env, stdout.isTTY === true);
48557
- const lastAssistantMessage = (0, import_react48.useRef)(null);
48558
- const lastCompletedOutputRef = (0, import_react48.useRef)(null);
48559
- const [messages, setMessages] = (0, import_react48.useState)([]);
48560
- const [rawOutput, setRawOutput] = (0, import_react48.useState)(false);
48561
- const [outputViewer, setOutputViewer] = (0, import_react48.useState)(null);
48562
- const modelHistoryRef = (0, import_react48.useRef)([]);
48563
- const initialConversationIdRef = (0, import_react48.useRef)(initialCtx.initialConversationId);
48564
- const palDefinitionRef = (0, import_react48.useRef)(null);
48565
- const palRouteSessionRef = (0, import_react48.useRef)(null);
48566
- const palDefaultPreferencesRef = (0, import_react48.useRef)(null);
48567
- const [history, setHistory] = (0, import_react48.useState)([]);
48568
- const [state, setState] = (0, import_react48.useState)("idle");
48569
- const stateRef = (0, import_react48.useRef)(state);
48734
+ const lastAssistantMessage = (0, import_react49.useRef)(null);
48735
+ const lastCompletedOutputRef = (0, import_react49.useRef)(null);
48736
+ const [messages, setMessages] = (0, import_react49.useState)([]);
48737
+ const [rawOutput, setRawOutput] = (0, import_react49.useState)(false);
48738
+ const [outputViewer, setOutputViewer] = (0, import_react49.useState)(null);
48739
+ const [scrollOpen, setScrollOpen] = (0, import_react49.useState)(false);
48740
+ const modelHistoryRef = (0, import_react49.useRef)([]);
48741
+ const initialConversationIdRef = (0, import_react49.useRef)(initialCtx.initialConversationId);
48742
+ const palDefinitionRef = (0, import_react49.useRef)(null);
48743
+ const palRouteSessionRef = (0, import_react49.useRef)(null);
48744
+ const palDefaultPreferencesRef = (0, import_react49.useRef)(null);
48745
+ const [history, setHistory] = (0, import_react49.useState)([]);
48746
+ const [state, setState] = (0, import_react49.useState)("idle");
48747
+ const stateRef = (0, import_react49.useRef)(state);
48570
48748
  stateRef.current = state;
48571
- const [phase, setPhase] = (0, import_react48.useState)("probing");
48572
- const [startupExplained, setStartupExplained] = (0, import_react48.useState)(false);
48573
- const phaseRef = (0, import_react48.useRef)(phase);
48749
+ const [phase, setPhase] = (0, import_react49.useState)("probing");
48750
+ const [startupExplained, setStartupExplained] = (0, import_react49.useState)(false);
48751
+ const phaseRef = (0, import_react49.useRef)(phase);
48574
48752
  phaseRef.current = phase;
48575
- const [session, setSession] = (0, import_react48.useState)(null);
48576
- const [transcriptOwned, setTranscriptOwned] = (0, import_react48.useState)(false);
48577
- const [detected, setDetected] = (0, import_react48.useState)([]);
48578
- const [currentProvider, setCurrentProvider] = (0, import_react48.useState)(null);
48579
- const [keyEntryFor, setKeyEntryFor] = (0, import_react48.useState)(null);
48580
- const [pickerInitialView, setPickerInitialView] = (0, import_react48.useState)("providers");
48581
- const [pickerDetected, setPickerDetected] = (0, import_react48.useState)(null);
48582
- const [pickerSelectionKind, setPickerSelectionKind] = (0, import_react48.useState)("provider-and-model");
48583
- const savedPrefsRef = (0, import_react48.useRef)(null);
48584
- const launchModelPendingRef = (0, import_react48.useRef)(choosesModel(initialCtx.launchSettings));
48585
- const launchEffortPendingRef = (0, import_react48.useRef)(initialCtx.launchSettings?.effort);
48586
- const [pickerNotice, setPickerNotice] = (0, import_react48.useState)(null);
48587
- const [permission, setPermission] = (0, import_react48.useState)(null);
48588
- const questionRef = (0, import_react48.useRef)(null);
48589
- const resolveQuestion = (0, import_react48.useCallback)((answer) => {
48753
+ const [session, setSession] = (0, import_react49.useState)(null);
48754
+ const [transcriptOwned, setTranscriptOwned] = (0, import_react49.useState)(false);
48755
+ const [detected, setDetected] = (0, import_react49.useState)([]);
48756
+ const [currentProvider, setCurrentProvider] = (0, import_react49.useState)(null);
48757
+ const [keyEntryFor, setKeyEntryFor] = (0, import_react49.useState)(null);
48758
+ const [pickerInitialView, setPickerInitialView] = (0, import_react49.useState)("providers");
48759
+ const [pickerDetected, setPickerDetected] = (0, import_react49.useState)(null);
48760
+ const [pickerSelectionKind, setPickerSelectionKind] = (0, import_react49.useState)("provider-and-model");
48761
+ const savedPrefsRef = (0, import_react49.useRef)(null);
48762
+ const launchModelPendingRef = (0, import_react49.useRef)(choosesModel(initialCtx.launchSettings));
48763
+ const launchEffortPendingRef = (0, import_react49.useRef)(initialCtx.launchSettings?.effort);
48764
+ const [pickerNotice, setPickerNotice] = (0, import_react49.useState)(null);
48765
+ const [permission, setPermission] = (0, import_react49.useState)(null);
48766
+ const questionRef = (0, import_react49.useRef)(null);
48767
+ const resolveQuestion = (0, import_react49.useCallback)((answer) => {
48590
48768
  const pending = questionRef.current;
48591
48769
  if (!pending?.resolve) return;
48592
48770
  const resolve6 = pending.resolve;
@@ -48594,61 +48772,61 @@ function App2({
48594
48772
  questionRef.current = null;
48595
48773
  resolve6(answer);
48596
48774
  }, []);
48597
- const [permissionReviewOffset, setPermissionReviewOffsetState] = (0, import_react48.useState)(0);
48598
- const permissionReviewOffsetRef = (0, import_react48.useRef)(0);
48599
- const [permissionDetailsOpen, setPermissionDetailsOpenState] = (0, import_react48.useState)(false);
48600
- const permissionDetailsOpenRef = (0, import_react48.useRef)(false);
48601
- const setPermissionDetailsOpen = (0, import_react48.useCallback)((next) => {
48775
+ const [permissionReviewOffset, setPermissionReviewOffsetState] = (0, import_react49.useState)(0);
48776
+ const permissionReviewOffsetRef = (0, import_react49.useRef)(0);
48777
+ const [permissionDetailsOpen, setPermissionDetailsOpenState] = (0, import_react49.useState)(false);
48778
+ const permissionDetailsOpenRef = (0, import_react49.useRef)(false);
48779
+ const setPermissionDetailsOpen = (0, import_react49.useCallback)((next) => {
48602
48780
  permissionDetailsOpenRef.current = next;
48603
48781
  setPermissionDetailsOpenState(next);
48604
48782
  }, []);
48605
- const setPermissionReviewOffset = (0, import_react48.useCallback)((next) => {
48783
+ const setPermissionReviewOffset = (0, import_react49.useCallback)((next) => {
48606
48784
  permissionReviewOffsetRef.current = next;
48607
48785
  setPermissionReviewOffsetState(next);
48608
48786
  }, []);
48609
- const [permissionChoice, setPermissionChoiceState] = (0, import_react48.useState)(0);
48610
- const permissionChoiceRef = (0, import_react48.useRef)(0);
48611
- const setPermissionChoice = (0, import_react48.useCallback)((next) => {
48787
+ const [permissionChoice, setPermissionChoiceState] = (0, import_react49.useState)(0);
48788
+ const permissionChoiceRef = (0, import_react49.useRef)(0);
48789
+ const setPermissionChoice = (0, import_react49.useCallback)((next) => {
48612
48790
  permissionChoiceRef.current = next;
48613
48791
  setPermissionChoiceState(next);
48614
48792
  }, []);
48615
48793
  const launchPermissionMode = ctx.palId ? void 0 : ctx.launchSettings?.permissionMode;
48616
- const [permissionMode, setPermissionModeState] = (0, import_react48.useState)(
48794
+ const [permissionMode, setPermissionModeState] = (0, import_react49.useState)(
48617
48795
  launchPermissionMode ?? (ctx.skipPermissions === true || ctx.palId ? "auto" : "prompt")
48618
48796
  );
48619
- const permissionModeRef = (0, import_react48.useRef)(permissionMode);
48620
- const permissionModeSourceRef = (0, import_react48.useRef)(
48797
+ const permissionModeRef = (0, import_react49.useRef)(permissionMode);
48798
+ const permissionModeSourceRef = (0, import_react49.useRef)(
48621
48799
  launchPermissionMode ? "launch-flag" : ctx.skipPermissions === true ? "launch-bypass" : "default"
48622
48800
  );
48623
- const [reasoningEffort, setReasoningEffortState] = (0, import_react48.useState)();
48624
- const reasoningEffortRef = (0, import_react48.useRef)(void 0);
48625
- const turnLimitsOverrideRef = (0, import_react48.useRef)({});
48626
- const setReasoningEffort = (0, import_react48.useCallback)((next) => {
48801
+ const [reasoningEffort, setReasoningEffortState] = (0, import_react49.useState)();
48802
+ const reasoningEffortRef = (0, import_react49.useRef)(void 0);
48803
+ const turnLimitsOverrideRef = (0, import_react49.useRef)({});
48804
+ const setReasoningEffort = (0, import_react49.useCallback)((next) => {
48627
48805
  reasoningEffortRef.current = next;
48628
48806
  setReasoningEffortState(next);
48629
48807
  }, []);
48630
- const [hypermode, setHypermodeState] = (0, import_react48.useState)(false);
48631
- const hypermodeRef = (0, import_react48.useRef)(false);
48632
- const [hypermodeActivation, setHypermodeActivation] = (0, import_react48.useState)(0);
48633
- const setHypermode = (0, import_react48.useCallback)((next) => {
48808
+ const [hypermode, setHypermodeState] = (0, import_react49.useState)(false);
48809
+ const hypermodeRef = (0, import_react49.useRef)(false);
48810
+ const [hypermodeActivation, setHypermodeActivation] = (0, import_react49.useState)(0);
48811
+ const setHypermode = (0, import_react49.useCallback)((next) => {
48634
48812
  hypermodeRef.current = next;
48635
48813
  setHypermodeState(next);
48636
48814
  }, []);
48637
- const [activeSkills, setActiveSkills] = (0, import_react48.useState)(
48815
+ const [activeSkills, setActiveSkills] = (0, import_react49.useState)(
48638
48816
  []
48639
48817
  );
48640
- const [userCommands, setUserCommands] = (0, import_react48.useState)([]);
48641
- const [mentionCandidates, setMentionCandidates] = (0, import_react48.useState)([]);
48642
- const mentionLoadOwnerRef = (0, import_react48.useRef)(null);
48643
- const [compactionTally, setCompactionTally] = (0, import_react48.useState)({
48818
+ const [userCommands, setUserCommands] = (0, import_react49.useState)([]);
48819
+ const [mentionCandidates, setMentionCandidates] = (0, import_react49.useState)([]);
48820
+ const mentionLoadOwnerRef = (0, import_react49.useRef)(null);
48821
+ const [compactionTally, setCompactionTally] = (0, import_react49.useState)({
48644
48822
  passes: 0,
48645
48823
  clearedResults: 0,
48646
48824
  stubbedNarrations: 0,
48647
48825
  summaries: 0,
48648
48826
  reclaimedTokens: 0
48649
48827
  });
48650
- const idleJobNoticesRef = (0, import_react48.useRef)({ ownerSession: null, pending: /* @__PURE__ */ new Map(), delivered: /* @__PURE__ */ new Set(), shown: /* @__PURE__ */ new Set() });
48651
- const [jobSnapshot, setJobSnapshot] = (0, import_react48.useState)({ ownerSession: null, jobs: [] });
48828
+ const idleJobNoticesRef = (0, import_react49.useRef)({ ownerSession: null, pending: /* @__PURE__ */ new Map(), delivered: /* @__PURE__ */ new Set(), shown: /* @__PURE__ */ new Set() });
48829
+ const [jobSnapshot, setJobSnapshot] = (0, import_react49.useState)({ ownerSession: null, jobs: [] });
48652
48830
  const backgroundJobs = jobSnapshot.ownerSession === session ? jobSnapshot.jobs : [];
48653
48831
  const snapshotIdleJobNotices = /* @__PURE__ */ __name(() => {
48654
48832
  if (idleJobNoticesRef.current.ownerSession !== session) return { ids: [] };
@@ -48661,7 +48839,7 @@ function App2({
48661
48839
  ${lines.map((l) => `- ${l}`).join("\n")}`
48662
48840
  };
48663
48841
  }, "snapshotIdleJobNotices");
48664
- const operatorShellRef = (0, import_react48.useRef)([]);
48842
+ const operatorShellRef = (0, import_react49.useRef)([]);
48665
48843
  const drainOperatorShell = /* @__PURE__ */ __name(() => {
48666
48844
  if (operatorShellRef.current.length === 0) return void 0;
48667
48845
  const blocks = operatorShellRef.current;
@@ -48670,7 +48848,7 @@ ${lines.map((l) => `- ${l}`).join("\n")}`
48670
48848
 
48671
48849
  ${blocks.join("\n\n")}`;
48672
48850
  }, "drainOperatorShell");
48673
- (0, import_react48.useEffect)(() => {
48851
+ (0, import_react49.useEffect)(() => {
48674
48852
  const notices = {
48675
48853
  ownerSession: session,
48676
48854
  pending: /* @__PURE__ */ new Map(),
@@ -48697,153 +48875,153 @@ ${blocks.join("\n\n")}`;
48697
48875
  }
48698
48876
  });
48699
48877
  }, [session]);
48700
- const [usage2, setUsage] = (0, import_react48.useState)(null);
48701
- const [thinking, setThinking] = (0, import_react48.useState)(null);
48702
- const [providerWaitNotice, setProviderWaitNotice] = (0, import_react48.useState)(null);
48703
- const providerWaitNoticeRef = (0, import_react48.useRef)(null);
48704
- const [turnTokens, setTurnTokens] = (0, import_react48.useState)(0);
48705
- const turnTokensShownAt = (0, import_react48.useRef)(0);
48706
- const turnTokensTimer = (0, import_react48.useRef)(void 0);
48707
- (0, import_react48.useEffect)(
48878
+ const [usage2, setUsage] = (0, import_react49.useState)(null);
48879
+ const [thinking, setThinking] = (0, import_react49.useState)(null);
48880
+ const [providerWaitNotice, setProviderWaitNotice] = (0, import_react49.useState)(null);
48881
+ const providerWaitNoticeRef = (0, import_react49.useRef)(null);
48882
+ const [turnTokens, setTurnTokens] = (0, import_react49.useState)(0);
48883
+ const turnTokensShownAt = (0, import_react49.useRef)(0);
48884
+ const turnTokensTimer = (0, import_react49.useRef)(void 0);
48885
+ (0, import_react49.useEffect)(
48708
48886
  () => () => {
48709
48887
  if (turnTokensTimer.current) clearTimeout(turnTokensTimer.current);
48710
48888
  },
48711
48889
  []
48712
48890
  );
48713
- const [activeTools, setActiveTools] = (0, import_react48.useState)([]);
48714
- const [tasks, setTasks] = (0, import_react48.useState)([]);
48715
- const tasksRef = (0, import_react48.useRef)([]);
48716
- const [resetKey, setResetKey] = (0, import_react48.useState)(0);
48717
- const settledRef = (0, import_react48.useRef)(0);
48718
- const [queued, setQueued] = (0, import_react48.useState)([]);
48719
- const [queueSettleVersion, setQueueSettleVersion] = (0, import_react48.useState)(0);
48720
- const [pendingSteers, setPendingSteers] = (0, import_react48.useState)([]);
48721
- const queuedRef = (0, import_react48.useRef)([]);
48722
- const [queuePause, setQueuePauseState] = (0, import_react48.useState)(null);
48723
- const queuePauseRef = (0, import_react48.useRef)(null);
48724
- const setQueuePause = (0, import_react48.useCallback)((next) => {
48891
+ const [activeTools, setActiveTools] = (0, import_react49.useState)([]);
48892
+ const [tasks, setTasks] = (0, import_react49.useState)([]);
48893
+ const tasksRef = (0, import_react49.useRef)([]);
48894
+ const [resetKey, setResetKey] = (0, import_react49.useState)(0);
48895
+ const settledRef = (0, import_react49.useRef)(0);
48896
+ const [queued, setQueued] = (0, import_react49.useState)([]);
48897
+ const [queueSettleVersion, setQueueSettleVersion] = (0, import_react49.useState)(0);
48898
+ const [pendingSteers, setPendingSteers] = (0, import_react49.useState)([]);
48899
+ const queuedRef = (0, import_react49.useRef)([]);
48900
+ const [queuePause, setQueuePauseState] = (0, import_react49.useState)(null);
48901
+ const queuePauseRef = (0, import_react49.useRef)(null);
48902
+ const setQueuePause = (0, import_react49.useCallback)((next) => {
48725
48903
  queuePauseRef.current = next;
48726
48904
  setQueuePauseState(next);
48727
48905
  }, []);
48728
- const queueContinuationEpochRef = (0, import_react48.useRef)(0);
48729
- const advanceQueueContinuation = (0, import_react48.useCallback)(() => {
48906
+ const queueContinuationEpochRef = (0, import_react49.useRef)(0);
48907
+ const advanceQueueContinuation = (0, import_react49.useCallback)(() => {
48730
48908
  queueContinuationEpochRef.current += 1;
48731
48909
  setQueuePause(null);
48732
48910
  }, [setQueuePause]);
48733
- const replaceQueued = (0, import_react48.useCallback)((next) => {
48911
+ const replaceQueued = (0, import_react49.useCallback)((next) => {
48734
48912
  queuedRef.current = next;
48735
48913
  setQueued(next);
48736
48914
  }, []);
48737
- const discardQueued = (0, import_react48.useCallback)(() => {
48915
+ const discardQueued = (0, import_react49.useCallback)(() => {
48738
48916
  replaceQueued([]);
48739
48917
  setQueuePause(null);
48740
48918
  }, [replaceQueued, setQueuePause]);
48741
- const enqueueQueued = (0, import_react48.useCallback)(
48919
+ const enqueueQueued = (0, import_react49.useCallback)(
48742
48920
  (prompt) => replaceQueued([...queuedRef.current, prompt]),
48743
48921
  [replaceQueued]
48744
48922
  );
48745
- const dequeueQueued = (0, import_react48.useCallback)(() => {
48923
+ const dequeueQueued = (0, import_react49.useCallback)(() => {
48746
48924
  const [next, ...rest] = queuedRef.current;
48747
48925
  if (next !== void 0) replaceQueued(rest);
48748
48926
  return next;
48749
48927
  }, [replaceQueued]);
48750
- const compactingRef = (0, import_react48.useRef)(false);
48751
- const [compacting, setCompacting] = (0, import_react48.useState)(false);
48752
- const [resumeList, setResumeList] = (0, import_react48.useState)([]);
48928
+ const compactingRef = (0, import_react49.useRef)(false);
48929
+ const [compacting, setCompacting] = (0, import_react49.useState)(false);
48930
+ const [resumeList, setResumeList] = (0, import_react49.useState)([]);
48753
48931
  const {
48754
48932
  selection: selectedResume,
48755
48933
  selectionRef: selectedResumeRef,
48756
48934
  setSelection: setSelectedResume
48757
48935
  } = useSelectionIndex(0);
48758
- const [editList, setEditList] = (0, import_react48.useState)([]);
48936
+ const [editList, setEditList] = (0, import_react49.useState)([]);
48759
48937
  const {
48760
48938
  selection: selectedEdit,
48761
48939
  selectionRef: selectedEditRef,
48762
48940
  setSelection: setSelectedEdit
48763
48941
  } = useSelectionIndex(0);
48764
- const editCommittedRef = (0, import_react48.useRef)(false);
48765
- const [copyPicker, setCopyPickerState] = (0, import_react48.useState)(null);
48766
- const copyPickerRef = (0, import_react48.useRef)(null);
48767
- const copyPickerCommittedRef = (0, import_react48.useRef)(null);
48942
+ const editCommittedRef = (0, import_react49.useRef)(false);
48943
+ const [copyPicker, setCopyPickerState] = (0, import_react49.useState)(null);
48944
+ const copyPickerRef = (0, import_react49.useRef)(null);
48945
+ const copyPickerCommittedRef = (0, import_react49.useRef)(null);
48768
48946
  const {
48769
48947
  selection: selectedCopy,
48770
48948
  selectionRef: selectedCopyRef,
48771
48949
  setSelection: setSelectedCopy
48772
48950
  } = useSelectionIndex(0);
48773
- const setCopyPicker = (0, import_react48.useCallback)((next) => {
48951
+ const setCopyPicker = (0, import_react49.useCallback)((next) => {
48774
48952
  copyPickerRef.current = next;
48775
48953
  if (next === null) copyPickerCommittedRef.current = null;
48776
48954
  setCopyPickerState(next);
48777
48955
  }, []);
48778
- (0, import_react48.useEffect)(() => {
48956
+ (0, import_react49.useEffect)(() => {
48779
48957
  copyPickerCommittedRef.current = copyPicker;
48780
48958
  }, [copyPicker]);
48781
- const [providerSetup, setProviderSetup] = (0, import_react48.useState)(false);
48782
- const [choicePicker, setChoicePickerState] = (0, import_react48.useState)(null);
48783
- const choicePickerRef = (0, import_react48.useRef)(null);
48784
- const [choiceQuery, setChoiceQuery] = (0, import_react48.useState)("");
48785
- const choiceQueryRef = (0, import_react48.useRef)("");
48786
- const choicePickerCommittedRef = (0, import_react48.useRef)(null);
48787
- const commandPickerSubmitRef = (0, import_react48.useRef)(() => {
48959
+ const [providerSetup, setProviderSetup] = (0, import_react49.useState)(false);
48960
+ const [choicePicker, setChoicePickerState] = (0, import_react49.useState)(null);
48961
+ const choicePickerRef = (0, import_react49.useRef)(null);
48962
+ const [choiceQuery, setChoiceQuery] = (0, import_react49.useState)("");
48963
+ const choiceQueryRef = (0, import_react49.useRef)("");
48964
+ const choicePickerCommittedRef = (0, import_react49.useRef)(null);
48965
+ const commandPickerSubmitRef = (0, import_react49.useRef)(() => {
48788
48966
  });
48789
48967
  const {
48790
48968
  selection: selectedChoice,
48791
48969
  selectionRef: selectedChoiceRef,
48792
48970
  setSelection: setSelectedChoice
48793
48971
  } = useSelectionIndex(0);
48794
- const setChoicePicker = (0, import_react48.useCallback)((next) => {
48972
+ const setChoicePicker = (0, import_react49.useCallback)((next) => {
48795
48973
  choicePickerRef.current = next;
48796
48974
  choiceQueryRef.current = "";
48797
48975
  setChoiceQuery("");
48798
48976
  if (next === null) choicePickerCommittedRef.current = null;
48799
48977
  setChoicePickerState(next);
48800
48978
  }, []);
48801
- (0, import_react48.useLayoutEffect)(() => {
48979
+ (0, import_react49.useLayoutEffect)(() => {
48802
48980
  choicePickerCommittedRef.current = choicePicker;
48803
48981
  }, [choicePicker]);
48804
- const [textPrompt, setTextPromptState] = (0, import_react48.useState)(null);
48805
- const textPromptRef = (0, import_react48.useRef)(null);
48806
- const textPromptTokenRef = (0, import_react48.useRef)(0);
48807
- const setTextPrompt = (0, import_react48.useCallback)((next) => {
48982
+ const [textPrompt, setTextPromptState] = (0, import_react49.useState)(null);
48983
+ const textPromptRef = (0, import_react49.useRef)(null);
48984
+ const textPromptTokenRef = (0, import_react49.useRef)(0);
48985
+ const setTextPrompt = (0, import_react49.useCallback)((next) => {
48808
48986
  textPromptRef.current = next;
48809
48987
  setTextPromptState(next);
48810
48988
  }, []);
48811
- const [composerDraft, setComposerDraft] = (0, import_react48.useState)(null);
48812
- const [composerHasDraft, setComposerHasDraft] = (0, import_react48.useState)(false);
48813
- const liveStreamRef = (0, import_react48.useRef)(null);
48814
- const [handoffPark, setHandoffParkState] = (0, import_react48.useState)(null);
48815
- const handoffParkRef = (0, import_react48.useRef)(null);
48816
- const setHandoffPark = (0, import_react48.useCallback)(
48989
+ const [composerDraft, setComposerDraft] = (0, import_react49.useState)(null);
48990
+ const [composerHasDraft, setComposerHasDraft] = (0, import_react49.useState)(false);
48991
+ const liveStreamRef = (0, import_react49.useRef)(null);
48992
+ const [handoffPark, setHandoffParkState] = (0, import_react49.useState)(null);
48993
+ const handoffParkRef = (0, import_react49.useRef)(null);
48994
+ const setHandoffPark = (0, import_react49.useCallback)(
48817
48995
  (value) => {
48818
48996
  handoffParkRef.current = value;
48819
48997
  setHandoffParkState(value);
48820
48998
  },
48821
48999
  []
48822
49000
  );
48823
- const composerDraftTokenRef = (0, import_react48.useRef)(0);
48824
- const [subagents, setSubagentsState] = (0, import_react48.useState)([]);
48825
- const subagentsRef = (0, import_react48.useRef)([]);
48826
- const [narration, setNarration] = (0, import_react48.useState)([]);
48827
- const [agentSurface, setAgentSurfaceState] = (0, import_react48.useState)(null);
48828
- const [jobSurfaceState, setJobSurfaceState] = (0, import_react48.useState)(null);
49001
+ const composerDraftTokenRef = (0, import_react49.useRef)(0);
49002
+ const [subagents, setSubagentsState] = (0, import_react49.useState)([]);
49003
+ const subagentsRef = (0, import_react49.useRef)([]);
49004
+ const [narration, setNarration] = (0, import_react49.useState)([]);
49005
+ const [agentSurface, setAgentSurfaceState] = (0, import_react49.useState)(null);
49006
+ const [jobSurfaceState, setJobSurfaceState] = (0, import_react49.useState)(null);
48829
49007
  const jobSurface = jobSurfaceState?.ownerSession === session ? jobSurfaceState : null;
48830
- const jobSurfaceRef = (0, import_react48.useRef)(null);
48831
- const jobSurfaceCommittedRef = (0, import_react48.useRef)(null);
48832
- const setJobSurface = (0, import_react48.useCallback)((next) => {
49008
+ const jobSurfaceRef = (0, import_react49.useRef)(null);
49009
+ const jobSurfaceCommittedRef = (0, import_react49.useRef)(null);
49010
+ const setJobSurface = (0, import_react49.useCallback)((next) => {
48833
49011
  const wasVisible = jobSurfaceCommittedRef.current !== null;
48834
49012
  jobSurfaceRef.current = next;
48835
49013
  if (next === null) jobSurfaceCommittedRef.current = null;
48836
49014
  else if (wasVisible) jobSurfaceCommittedRef.current = next;
48837
49015
  setJobSurfaceState(next);
48838
49016
  }, []);
48839
- (0, import_react48.useLayoutEffect)(() => {
49017
+ (0, import_react49.useLayoutEffect)(() => {
48840
49018
  jobSurfaceCommittedRef.current = jobSurface;
48841
49019
  }, [jobSurface]);
48842
- (0, import_react48.useEffect)(() => setJobSurface(null), [session, setJobSurface]);
48843
- const [jobClock, setJobClock] = (0, import_react48.useState)(Date.now());
49020
+ (0, import_react49.useEffect)(() => setJobSurface(null), [session, setJobSurface]);
49021
+ const [jobClock, setJobClock] = (0, import_react49.useState)(Date.now());
48844
49022
  const hasRunningBackgroundJob = backgroundJobs.some((job) => job.status === "running");
48845
49023
  const jobSurfaceOpen = jobSurface !== null;
48846
- (0, import_react48.useEffect)(() => {
49024
+ (0, import_react49.useEffect)(() => {
48847
49025
  if (!jobSurfaceOpen || !hasRunningBackgroundJob) return;
48848
49026
  const timer = setInterval(() => {
48849
49027
  setJobClock(Date.now());
@@ -48851,25 +49029,25 @@ ${blocks.join("\n\n")}`;
48851
49029
  }, 1e3);
48852
49030
  return () => clearInterval(timer);
48853
49031
  }, [jobSurfaceOpen, hasRunningBackgroundJob, session]);
48854
- const agentSurfaceRef = (0, import_react48.useRef)(null);
48855
- const agentSurfaceCommittedRef = (0, import_react48.useRef)(null);
48856
- const childDraftsRef = (0, import_react48.useRef)(/* @__PURE__ */ new Map());
48857
- const childMessageLifetimeRef = (0, import_react48.useRef)(new AbortController());
48858
- const directChildNoticesRef = (0, import_react48.useRef)(/* @__PURE__ */ new Map());
48859
- const directChildNoticeIdRef = (0, import_react48.useRef)(0);
48860
- const setAgentSurface = (0, import_react48.useCallback)((next) => {
49032
+ const agentSurfaceRef = (0, import_react49.useRef)(null);
49033
+ const agentSurfaceCommittedRef = (0, import_react49.useRef)(null);
49034
+ const childDraftsRef = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
49035
+ const childMessageLifetimeRef = (0, import_react49.useRef)(new AbortController());
49036
+ const directChildNoticesRef = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
49037
+ const directChildNoticeIdRef = (0, import_react49.useRef)(0);
49038
+ const setAgentSurface = (0, import_react49.useCallback)((next) => {
48861
49039
  const wasVisible = agentSurfaceCommittedRef.current !== null;
48862
49040
  agentSurfaceRef.current = next;
48863
49041
  if (next === null) agentSurfaceCommittedRef.current = null;
48864
49042
  else if (wasVisible) agentSurfaceCommittedRef.current = next;
48865
49043
  setAgentSurfaceState(next);
48866
49044
  }, []);
48867
- (0, import_react48.useEffect)(() => {
49045
+ (0, import_react49.useEffect)(() => {
48868
49046
  agentSurfaceCommittedRef.current = agentSurface;
48869
49047
  }, [agentSurface]);
48870
- const savedSubagentsRef = (0, import_react48.useRef)([]);
48871
- const savedSubagentsTokenRef = (0, import_react48.useRef)(0);
48872
- const withSavedSubagents = (0, import_react48.useCallback)(
49048
+ const savedSubagentsRef = (0, import_react49.useRef)([]);
49049
+ const savedSubagentsTokenRef = (0, import_react49.useRef)(0);
49050
+ const withSavedSubagents = (0, import_react49.useCallback)(
48873
49051
  (live) => {
48874
49052
  const saved = savedSubagentsRef.current;
48875
49053
  if (saved.length === 0) return live;
@@ -48883,7 +49061,7 @@ ${blocks.join("\n\n")}`;
48883
49061
  },
48884
49062
  []
48885
49063
  );
48886
- const replaceSubagents = (0, import_react48.useCallback)(
49064
+ const replaceSubagents = (0, import_react49.useCallback)(
48887
49065
  (incoming) => {
48888
49066
  const next = withSavedSubagents(incoming);
48889
49067
  const previous = subagentsRef.current;
@@ -48922,7 +49100,7 @@ ${blocks.join("\n\n")}`;
48922
49100
  },
48923
49101
  [setAgentSurface, withSavedSubagents]
48924
49102
  );
48925
- const hydrateSavedChildren = (0, import_react48.useCallback)(async () => {
49103
+ const hydrateSavedChildren = (0, import_react49.useCallback)(async () => {
48926
49104
  const read = session?.savedChildren;
48927
49105
  if (!read) return;
48928
49106
  const token = ++savedSubagentsTokenRef.current;
@@ -48936,7 +49114,7 @@ ${blocks.join("\n\n")}`;
48936
49114
  savedSubagentsRef.current = saved;
48937
49115
  replaceSubagents(session?.subagents?.getSnapshot() ?? []);
48938
49116
  }, [replaceSubagents, session]);
48939
- const openCockpitFromCurrentRows = (0, import_react48.useCallback)(() => {
49117
+ const openCockpitFromCurrentRows = (0, import_react49.useCallback)(() => {
48940
49118
  const agents = subagentsRef.current;
48941
49119
  const workflows = agentWorkflows(agents);
48942
49120
  const currentWorkflow = [...workflows].reverse().find(
@@ -48956,8 +49134,8 @@ ${blocks.join("\n\n")}`;
48956
49134
  });
48957
49135
  return true;
48958
49136
  }, [setAgentSurface]);
48959
- const cockpitOpenTokenRef = (0, import_react48.useRef)(0);
48960
- const openAgentCockpit = (0, import_react48.useCallback)(async () => {
49137
+ const cockpitOpenTokenRef = (0, import_react49.useRef)(0);
49138
+ const openAgentCockpit = (0, import_react49.useCallback)(async () => {
48961
49139
  if (openCockpitFromCurrentRows()) {
48962
49140
  void hydrateSavedChildren();
48963
49141
  return true;
@@ -48967,14 +49145,14 @@ ${blocks.join("\n\n")}`;
48967
49145
  if (token !== cockpitOpenTokenRef.current) return true;
48968
49146
  return openCockpitFromCurrentRows();
48969
49147
  }, [hydrateSavedChildren, openCockpitFromCurrentRows]);
48970
- const reviewChoiceInFlightRef = (0, import_react48.useRef)(null);
48971
- const exitArmedRef = (0, import_react48.useRef)(false);
48972
- const abortRef = (0, import_react48.useRef)(null);
48973
- const admissionRef = (0, import_react48.useRef)(null);
48974
- const activeTurnTokenRef = (0, import_react48.useRef)(null);
48975
- const pendingModelSwitchRef = (0, import_react48.useRef)(null);
48976
- const [modelSwitchVersion, setModelSwitchVersion] = (0, import_react48.useState)(0);
48977
- const cancelPendingModelSwitch = (0, import_react48.useCallback)(() => {
49148
+ const reviewChoiceInFlightRef = (0, import_react49.useRef)(null);
49149
+ const exitArmedRef = (0, import_react49.useRef)(false);
49150
+ const abortRef = (0, import_react49.useRef)(null);
49151
+ const admissionRef = (0, import_react49.useRef)(null);
49152
+ const activeTurnTokenRef = (0, import_react49.useRef)(null);
49153
+ const pendingModelSwitchRef = (0, import_react49.useRef)(null);
49154
+ const [modelSwitchVersion, setModelSwitchVersion] = (0, import_react49.useState)(0);
49155
+ const cancelPendingModelSwitch = (0, import_react49.useCallback)(() => {
48978
49156
  const pending = pendingModelSwitchRef.current;
48979
49157
  if (!pending) return false;
48980
49158
  pendingModelSwitchRef.current = null;
@@ -48982,14 +49160,14 @@ ${blocks.join("\n\n")}`;
48982
49160
  setModelSwitchVersion((version) => version + 1);
48983
49161
  return true;
48984
49162
  }, []);
48985
- const activeTurnInboxRef = (0, import_react48.useRef)(null);
48986
- const notificationFailureShownRef = (0, import_react48.useRef)(false);
48987
- const loginRef = (0, import_react48.useRef)(null);
48988
- const codexLoginRef = (0, import_react48.useRef)(null);
48989
- const loginAbortCleanupRef = (0, import_react48.useRef)(null);
48990
- const [appLifetime] = (0, import_react48.useState)(() => new AbortController());
48991
- (0, import_react48.useEffect)(() => () => appLifetime.abort(new Error("The Namzu TUI was closed.")), [appLifetime]);
48992
- const cancelPendingLogin = (0, import_react48.useCallback)(() => {
49163
+ const activeTurnInboxRef = (0, import_react49.useRef)(null);
49164
+ const notificationFailureShownRef = (0, import_react49.useRef)(false);
49165
+ const loginRef = (0, import_react49.useRef)(null);
49166
+ const codexLoginRef = (0, import_react49.useRef)(null);
49167
+ const loginAbortCleanupRef = (0, import_react49.useRef)(null);
49168
+ const [appLifetime] = (0, import_react49.useState)(() => new AbortController());
49169
+ (0, import_react49.useEffect)(() => () => appLifetime.abort(new Error("The Namzu TUI was closed.")), [appLifetime]);
49170
+ const cancelPendingLogin = (0, import_react49.useCallback)(() => {
48993
49171
  loginAbortCleanupRef.current?.();
48994
49172
  loginAbortCleanupRef.current = null;
48995
49173
  loginRef.current?.cancel();
@@ -48997,18 +49175,18 @@ ${blocks.join("\n\n")}`;
48997
49175
  codexLoginRef.current?.cancel();
48998
49176
  codexLoginRef.current = null;
48999
49177
  }, []);
49000
- const runProbeRef = (0, import_react48.useRef)(null);
49001
- (0, import_react48.useEffect)(() => cancelPendingLogin, [cancelPendingLogin]);
49002
- const previousSessionRef = (0, import_react48.useRef)(null);
49003
- const [, setReasoningVersion] = (0, import_react48.useState)(0);
49004
- const browserProfileRef = (0, import_react48.useRef)(void 0);
49005
- const browserControlRef = (0, import_react48.useRef)(void 0);
49006
- const reviewSessionRef = (0, import_react48.useRef)(null);
49007
- (0, import_react48.useEffect)(() => {
49178
+ const runProbeRef = (0, import_react49.useRef)(null);
49179
+ (0, import_react49.useEffect)(() => cancelPendingLogin, [cancelPendingLogin]);
49180
+ const previousSessionRef = (0, import_react49.useRef)(null);
49181
+ const [, setReasoningVersion] = (0, import_react49.useState)(0);
49182
+ const browserProfileRef = (0, import_react49.useRef)(void 0);
49183
+ const browserControlRef = (0, import_react49.useRef)(void 0);
49184
+ const reviewSessionRef = (0, import_react49.useRef)(null);
49185
+ (0, import_react49.useEffect)(() => {
49008
49186
  browserControlRef.current = session?.browser;
49009
49187
  reviewSessionRef.current = session;
49010
49188
  }, [session]);
49011
- (0, import_react48.useEffect)(() => {
49189
+ (0, import_react49.useEffect)(() => {
49012
49190
  const source = session?.subagents;
49013
49191
  childMessageLifetimeRef.current.abort(new Error("The conversation changed."));
49014
49192
  childMessageLifetimeRef.current = new AbortController();
@@ -49029,7 +49207,7 @@ ${blocks.join("\n\n")}`;
49029
49207
  refresh();
49030
49208
  return source.subscribe(refresh);
49031
49209
  }, [hydrateSavedChildren, replaceSubagents, session, setAgentSurface]);
49032
- const resetSubagentActivity = (0, import_react48.useCallback)(() => {
49210
+ const resetSubagentActivity = (0, import_react49.useCallback)(() => {
49033
49211
  childMessageLifetimeRef.current.abort(new Error("The owning conversation changed."));
49034
49212
  childMessageLifetimeRef.current = new AbortController();
49035
49213
  childDraftsRef.current.clear();
@@ -49041,15 +49219,15 @@ ${blocks.join("\n\n")}`;
49041
49219
  savedSubagentsRef.current = [];
49042
49220
  replaceSubagents([]);
49043
49221
  }, [replaceSubagents, session, setAgentSurface]);
49044
- const activeToolsRef = (0, import_react48.useRef)([]);
49045
- const clearActiveTools = (0, import_react48.useCallback)(() => {
49222
+ const activeToolsRef = (0, import_react49.useRef)([]);
49223
+ const clearActiveTools = (0, import_react49.useCallback)(() => {
49046
49224
  activeToolsRef.current = [];
49047
49225
  setActiveTools([]);
49048
49226
  }, []);
49049
- const permissionResolveRef = (0, import_react48.useRef)(null);
49050
- const permissionQueueRef = (0, import_react48.useRef)([]);
49051
- const [queuedPermissionCount, setQueuedPermissionCount] = (0, import_react48.useState)(0);
49052
- (0, import_react48.useEffect)(
49227
+ const permissionResolveRef = (0, import_react49.useRef)(null);
49228
+ const permissionQueueRef = (0, import_react49.useRef)([]);
49229
+ const [queuedPermissionCount, setQueuedPermissionCount] = (0, import_react49.useState)(0);
49230
+ (0, import_react49.useEffect)(
49053
49231
  () => () => {
49054
49232
  const decision = {
49055
49233
  kind: "reject",
@@ -49061,18 +49239,18 @@ ${blocks.join("\n\n")}`;
49061
49239
  },
49062
49240
  []
49063
49241
  );
49064
- const permissionOpenedAtRef = (0, import_react48.useRef)(null);
49065
- const trustShownAtRef = (0, import_react48.useRef)(null);
49066
- const sessionsRef = (0, import_react48.useRef)(null);
49067
- const scopeRef = (0, import_react48.useRef)(null);
49068
- const scheduleLiveRef = (0, import_react48.useRef)(null);
49069
- const scheduleRef = (0, import_react48.useRef)(null);
49070
- const sourceDeliveryViewRef = (0, import_react48.useRef)(null);
49242
+ const permissionOpenedAtRef = (0, import_react49.useRef)(null);
49243
+ const trustShownAtRef = (0, import_react49.useRef)(null);
49244
+ const sessionsRef = (0, import_react49.useRef)(null);
49245
+ const scopeRef = (0, import_react49.useRef)(null);
49246
+ const scheduleLiveRef = (0, import_react49.useRef)(null);
49247
+ const scheduleRef = (0, import_react49.useRef)(null);
49248
+ const sourceDeliveryViewRef = (0, import_react49.useRef)(null);
49071
49249
  if (sourceDeliveryViewRef.current === null)
49072
49250
  sourceDeliveryViewRef.current = new SourceDeliveryView();
49073
- const sourceDeliveryPollRef = (0, import_react48.useRef)(() => {
49251
+ const sourceDeliveryPollRef = (0, import_react49.useRef)(() => {
49074
49252
  });
49075
- const sourceDeliveryIssueRef = (0, import_react48.useRef)(null);
49253
+ const sourceDeliveryIssueRef = (0, import_react49.useRef)(null);
49076
49254
  if (scheduleRef.current === null) {
49077
49255
  scheduleRef.current = createScheduleIntegration({
49078
49256
  home: /* @__PURE__ */ __name(() => sessionsRef.current?.root ?? resolveNamzuHome(), "home"),
@@ -49104,9 +49282,9 @@ ${blocks.join("\n\n")}`;
49104
49282
  submit: /* @__PURE__ */ __name((text, createdBy) => scheduleLiveRef.current?.submit(text, createdBy), "submit")
49105
49283
  });
49106
49284
  }
49107
- const [saveSkillPrompt, setSaveSkillPromptState] = (0, import_react48.useState)(null);
49108
- const saveSkillPromptRef = (0, import_react48.useRef)(null);
49109
- const setSaveSkillPrompt = (0, import_react48.useCallback)(
49285
+ const [saveSkillPrompt, setSaveSkillPromptState] = (0, import_react49.useState)(null);
49286
+ const saveSkillPromptRef = (0, import_react49.useRef)(null);
49287
+ const setSaveSkillPrompt = (0, import_react49.useCallback)(
49110
49288
  (next) => {
49111
49289
  if (next) setJobSurface(null);
49112
49290
  saveSkillPromptRef.current = next;
@@ -49114,10 +49292,10 @@ ${blocks.join("\n\n")}`;
49114
49292
  },
49115
49293
  [setJobSurface]
49116
49294
  );
49117
- const [scheduleReviewPrompt, setScheduleReviewPromptState] = (0, import_react48.useState)(null);
49118
- const scheduleReviewTokenRef = (0, import_react48.useRef)(0);
49119
- const scheduleReviewPromptRef = (0, import_react48.useRef)(null);
49120
- const setScheduleReviewPrompt = (0, import_react48.useCallback)(
49295
+ const [scheduleReviewPrompt, setScheduleReviewPromptState] = (0, import_react49.useState)(null);
49296
+ const scheduleReviewTokenRef = (0, import_react49.useRef)(0);
49297
+ const scheduleReviewPromptRef = (0, import_react49.useRef)(null);
49298
+ const setScheduleReviewPrompt = (0, import_react49.useCallback)(
49121
49299
  (next) => {
49122
49300
  if (next) setJobSurface(null);
49123
49301
  scheduleReviewPromptRef.current = next;
@@ -49125,8 +49303,8 @@ ${blocks.join("\n\n")}`;
49125
49303
  },
49126
49304
  [setJobSurface]
49127
49305
  );
49128
- const saveSkillNotifyRef = (0, import_react48.useRef)(null);
49129
- const saveSkillToolRef = (0, import_react48.useRef)(null);
49306
+ const saveSkillNotifyRef = (0, import_react49.useRef)(null);
49307
+ const saveSkillToolRef = (0, import_react49.useRef)(null);
49130
49308
  if (saveSkillToolRef.current === null) {
49131
49309
  saveSkillToolRef.current = buildSaveSkillTool({
49132
49310
  cwd: /* @__PURE__ */ __name(() => ctxRef.current.cwd, "cwd"),
@@ -49157,9 +49335,9 @@ ${blocks.join("\n\n")}`;
49157
49335
  ), "saved")
49158
49336
  });
49159
49337
  }
49160
- const conversationMaterializedRef = (0, import_react48.useRef)(false);
49161
- const materializationRef = (0, import_react48.useRef)(null);
49162
- const closeAndExit = (0, import_react48.useCallback)(() => {
49338
+ const conversationMaterializedRef = (0, import_react49.useRef)(false);
49339
+ const materializationRef = (0, import_react49.useRef)(null);
49340
+ const closeAndExit = (0, import_react49.useCallback)(() => {
49163
49341
  cancelPendingModelSwitch();
49164
49342
  peersRef.current?.setEnabled(false);
49165
49343
  const closing = Promise.all([session?.close(), peersRef.current?.close()]);
@@ -49169,49 +49347,49 @@ ${blocks.join("\n\n")}`;
49169
49347
  ]);
49170
49348
  void bounded.catch(() => void 0).finally(() => exit());
49171
49349
  }, [cancelPendingModelSwitch, exit, session]);
49172
- const exitWithSummary = (0, import_react48.useCallback)(() => {
49350
+ const exitWithSummary = (0, import_react49.useCallback)(() => {
49173
49351
  onExitSummary?.({
49174
49352
  ...palDefinitionRef.current ? { palId: palDefinitionRef.current.id } : {},
49175
49353
  ...conversationMaterializedRef.current && scopeRef.current?.sessionId ? { conversationId: scopeRef.current.sessionId } : {}
49176
49354
  });
49177
49355
  closeAndExit();
49178
49356
  }, [closeAndExit, onExitSummary]);
49179
- const [goalActivation] = (0, import_react48.useState)(() => new SessionGoalActivation());
49180
- const goalDriveInFlightRef = (0, import_react48.useRef)(false);
49181
- const [goalDriveVersion, setGoalDriveVersion] = (0, import_react48.useState)(0);
49182
- const [goalStatus, setGoalStatus] = (0, import_react48.useState)(null);
49183
- const pendingGoalResumeRef = (0, import_react48.useRef)(null);
49184
- const pendingScheduledResumeRef = (0, import_react48.useRef)(null);
49185
- const wakeGoalDriver = (0, import_react48.useCallback)(() => setGoalDriveVersion((version) => version + 1), []);
49186
- const persistenceTailRef = (0, import_react48.useRef)(Promise.resolve());
49187
- const conversationGenRef = (0, import_react48.useRef)(0);
49188
- const peersRef = (0, import_react48.useRef)(null);
49189
- const peersStartingRef = (0, import_react48.useRef)(false);
49190
- const [peerVersion, wakePeers] = (0, import_react48.useState)(0);
49191
- const peerTools = (0, import_react48.useMemo)(() => buildPeerTools(() => peersRef.current), []);
49192
- const unsettledTurnGenerationsRef = (0, import_react48.useRef)(/* @__PURE__ */ new Map());
49193
- const hasUnsettledTurn = (0, import_react48.useCallback)(
49357
+ const [goalActivation] = (0, import_react49.useState)(() => new SessionGoalActivation());
49358
+ const goalDriveInFlightRef = (0, import_react49.useRef)(false);
49359
+ const [goalDriveVersion, setGoalDriveVersion] = (0, import_react49.useState)(0);
49360
+ const [goalStatus, setGoalStatus] = (0, import_react49.useState)(null);
49361
+ const pendingGoalResumeRef = (0, import_react49.useRef)(null);
49362
+ const pendingScheduledResumeRef = (0, import_react49.useRef)(null);
49363
+ const wakeGoalDriver = (0, import_react49.useCallback)(() => setGoalDriveVersion((version) => version + 1), []);
49364
+ const persistenceTailRef = (0, import_react49.useRef)(Promise.resolve());
49365
+ const conversationGenRef = (0, import_react49.useRef)(0);
49366
+ const peersRef = (0, import_react49.useRef)(null);
49367
+ const peersStartingRef = (0, import_react49.useRef)(false);
49368
+ const [peerVersion, wakePeers] = (0, import_react49.useState)(0);
49369
+ const peerTools = (0, import_react49.useMemo)(() => buildPeerTools(() => peersRef.current), []);
49370
+ const unsettledTurnGenerationsRef = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
49371
+ const hasUnsettledTurn = (0, import_react49.useCallback)(
49194
49372
  (generation = conversationGenRef.current) => [...unsettledTurnGenerationsRef.current.values()].some((g) => g === generation),
49195
49373
  []
49196
49374
  );
49197
- const conversationMutationRef = (0, import_react48.useRef)(null);
49198
- const [conversationMutation, setConversationMutation] = (0, import_react48.useState)(
49375
+ const conversationMutationRef = (0, import_react49.useRef)(null);
49376
+ const [conversationMutation, setConversationMutation] = (0, import_react49.useState)(
49199
49377
  null
49200
49378
  );
49201
- const [externalEditorRequest, setExternalEditorRequest] = (0, import_react48.useState)(
49379
+ const [externalEditorRequest, setExternalEditorRequest] = (0, import_react49.useState)(
49202
49380
  null
49203
49381
  );
49204
- const externalEditorRequestRef = (0, import_react48.useRef)(null);
49205
- const externalEditorStartedRef = (0, import_react48.useRef)(null);
49206
- const exportingRef = (0, import_react48.useRef)(false);
49207
- const goalCommandInFlightRef = (0, import_react48.useRef)(false);
49208
- const resumeCommittedRef = (0, import_react48.useRef)(false);
49209
- const idRef = (0, import_react48.useRef)(0);
49210
- const nextId = (0, import_react48.useCallback)(() => {
49382
+ const externalEditorRequestRef = (0, import_react49.useRef)(null);
49383
+ const externalEditorStartedRef = (0, import_react49.useRef)(null);
49384
+ const exportingRef = (0, import_react49.useRef)(false);
49385
+ const goalCommandInFlightRef = (0, import_react49.useRef)(false);
49386
+ const resumeCommittedRef = (0, import_react49.useRef)(false);
49387
+ const idRef = (0, import_react49.useRef)(0);
49388
+ const nextId = (0, import_react49.useCallback)(() => {
49211
49389
  idRef.current += 1;
49212
49390
  return `m${idRef.current}`;
49213
49391
  }, []);
49214
- const resetTranscript = (0, import_react48.useCallback)(
49392
+ const resetTranscript = (0, import_react49.useCallback)(
49215
49393
  (options = {}) => {
49216
49394
  if (stdout.isTTY) writeStdout("\x1B[2J\x1B[3J\x1B[H");
49217
49395
  if (!options.preserveOutputViewer) setOutputViewer(null);
@@ -49220,15 +49398,21 @@ ${blocks.join("\n\n")}`;
49220
49398
  },
49221
49399
  [stdout.isTTY, writeStdout]
49222
49400
  );
49223
- const previousTerminalRef = (0, import_react48.useRef)(terminal);
49224
- (0, import_react48.useEffect)(() => {
49401
+ const scrollWasOpenRef = (0, import_react49.useRef)(false);
49402
+ (0, import_react49.useEffect)(() => {
49403
+ const wasOpen = scrollWasOpenRef.current;
49404
+ scrollWasOpenRef.current = scrollOpen;
49405
+ if (wasOpen && !scrollOpen) resetTranscript({ preserveOutputViewer: true });
49406
+ }, [scrollOpen, resetTranscript]);
49407
+ const previousTerminalRef = (0, import_react49.useRef)(terminal);
49408
+ (0, import_react49.useEffect)(() => {
49225
49409
  const previous = previousTerminalRef.current;
49226
49410
  previousTerminalRef.current = terminal;
49227
49411
  if (externalEditorRequestRef.current === null && (terminal.columns !== previous.columns || terminal.rows < previous.rows)) {
49228
49412
  resetTranscript({ preserveOutputViewer: true });
49229
49413
  }
49230
49414
  }, [terminal, resetTranscript]);
49231
- const requestExternalEditor = (0, import_react48.useCallback)(
49415
+ const requestExternalEditor = (0, import_react49.useCallback)(
49232
49416
  (seed) => {
49233
49417
  if (phase !== "ready" || state !== "idle" || abortRef.current !== null || hasUnsettledTurn() || queuedRef.current.length > 0 || compactingRef.current || conversationMutationRef.current !== null) {
49234
49418
  return Promise.reject(
@@ -49252,7 +49436,7 @@ ${blocks.join("\n\n")}`;
49252
49436
  },
49253
49437
  [hasUnsettledTurn, phase, state]
49254
49438
  );
49255
- (0, import_react48.useEffect)(() => {
49439
+ (0, import_react49.useEffect)(() => {
49256
49440
  const request = externalEditorRequest;
49257
49441
  if (!request || externalEditorStartedRef.current === request.token) return;
49258
49442
  externalEditorStartedRef.current = request.token;
@@ -49281,7 +49465,7 @@ ${blocks.join("\n\n")}`;
49281
49465
  else request.resolve(edited ?? "");
49282
49466
  })();
49283
49467
  }, [externalEditor, externalEditorRequest, resetTranscript, stdout.isTTY, writeStdout]);
49284
- (0, import_react48.useEffect)(
49468
+ (0, import_react49.useEffect)(
49285
49469
  () => () => {
49286
49470
  const request = externalEditorRequestRef.current;
49287
49471
  if (!request) return;
@@ -49290,7 +49474,7 @@ ${blocks.join("\n\n")}`;
49290
49474
  },
49291
49475
  []
49292
49476
  );
49293
- const pushMessage = (0, import_react48.useCallback)(
49477
+ const pushMessage = (0, import_react49.useCallback)(
49294
49478
  (role, content, pending = false, glyph, detail, glyphColor, meta, activity, sourceDelivery) => {
49295
49479
  const id = nextId();
49296
49480
  const candidate = { role, content, pending, glyph, detail, activity };
@@ -49332,7 +49516,7 @@ ${blocks.join("\n\n")}`;
49332
49516
  },
49333
49517
  [nextId]
49334
49518
  );
49335
- (0, import_react48.useEffect)(
49519
+ (0, import_react49.useEffect)(
49336
49520
  () => session?.onSubagentReport?.((report) => {
49337
49521
  if (previousSessionRef.current !== session || scopeRef.current?.sessionId !== report.parentSessionId)
49338
49522
  return;
@@ -49347,7 +49531,7 @@ ${blocks.join("\n\n")}`;
49347
49531
  }),
49348
49532
  [pushMessage, session]
49349
49533
  );
49350
- const recallQueuedPrompt = (0, import_react48.useCallback)(() => {
49534
+ const recallQueuedPrompt = (0, import_react49.useCallback)(() => {
49351
49535
  const pending = queuedRef.current;
49352
49536
  let index = pending.length - 1;
49353
49537
  while (index >= 0 && !isRecallableHumanPrompt(pending[index])) index -= 1;
@@ -49366,14 +49550,14 @@ ${blocks.join("\n\n")}`;
49366
49550
  ...prompt.triggers ? { triggers: prompt.triggers } : {}
49367
49551
  };
49368
49552
  }, [pushMessage, replaceQueued, setQueuePause]);
49369
- const learningRef = (0, import_react48.useRef)({ generation: -1, proposed: false, skillUsed: false });
49370
- const skillSuggestOverrideRef = (0, import_react48.useRef)(void 0);
49371
- const [composerTriggersOverride, setComposerTriggersOverride] = (0, import_react48.useState)();
49372
- const composerTriggerSettings = (0, import_react48.useMemo)(
49553
+ const learningRef = (0, import_react49.useRef)({ generation: -1, proposed: false, skillUsed: false });
49554
+ const skillSuggestOverrideRef = (0, import_react49.useRef)(void 0);
49555
+ const [composerTriggersOverride, setComposerTriggersOverride] = (0, import_react49.useState)();
49556
+ const composerTriggerSettings = (0, import_react49.useMemo)(
49373
49557
  () => resolveComposerTriggers(ctx.composerTriggers),
49374
49558
  [ctx.composerTriggers]
49375
49559
  );
49376
- const composerTriggerRegistry = (0, import_react48.useMemo)(
49560
+ const composerTriggerRegistry = (0, import_react49.useMemo)(
49377
49561
  () => compileRegistry(BUILTIN_TRIGGERS, {
49378
49562
  arming: composerTriggerSettings.arming,
49379
49563
  locales: composerTriggerSettings.languages
@@ -49381,7 +49565,7 @@ ${blocks.join("\n\n")}`;
49381
49565
  [composerTriggerSettings]
49382
49566
  );
49383
49567
  const composerTriggersOn = composerTriggersOverride ?? composerTriggerSettings.enabled;
49384
- const readSkillCreator = (0, import_react48.useCallback)(() => {
49568
+ const readSkillCreator = (0, import_react49.useCallback)(() => {
49385
49569
  try {
49386
49570
  const creator = discoverSkills({
49387
49571
  cwd: ctx.cwd,
@@ -49392,8 +49576,8 @@ ${blocks.join("\n\n")}`;
49392
49576
  return false;
49393
49577
  }
49394
49578
  }, [ctx.cwd, ctx.skills]);
49395
- const skillCreatorAvailable = (0, import_react48.useMemo)(() => readSkillCreator(), [readSkillCreator]);
49396
- const triggerContextNow = (0, import_react48.useCallback)(
49579
+ const skillCreatorAvailable = (0, import_react49.useMemo)(() => readSkillCreator(), [readSkillCreator]);
49580
+ const triggerContextNow = (0, import_react49.useCallback)(
49397
49581
  () => ({
49398
49582
  permissionMode: permissionModeRef.current,
49399
49583
  sessionHypermode: hypermodeRef.current,
@@ -49407,8 +49591,8 @@ ${blocks.join("\n\n")}`;
49407
49591
  }),
49408
49592
  [readSkillCreator, session]
49409
49593
  );
49410
- const triggerFollowUpsRef = (0, import_react48.useRef)(null);
49411
- const conversationLearning = (0, import_react48.useCallback)(() => {
49594
+ const triggerFollowUpsRef = (0, import_react49.useRef)(null);
49595
+ const conversationLearning = (0, import_react49.useCallback)(() => {
49412
49596
  if (learningRef.current.generation !== conversationGenRef.current) {
49413
49597
  learningRef.current = {
49414
49598
  generation: conversationGenRef.current,
@@ -49418,7 +49602,7 @@ ${blocks.join("\n\n")}`;
49418
49602
  }
49419
49603
  return learningRef.current;
49420
49604
  }, []);
49421
- const offerSkillSuggestion = (0, import_react48.useCallback)(
49605
+ const offerSkillSuggestion = (0, import_react49.useCallback)(
49422
49606
  (st) => {
49423
49607
  if (!st.learning) return;
49424
49608
  const conversation = conversationLearning();
@@ -49448,7 +49632,7 @@ ${blocks.join("\n\n")}`;
49448
49632
  },
49449
49633
  [conversationLearning, pushMessage]
49450
49634
  );
49451
- const runAgentsCommand = (0, import_react48.useCallback)(
49635
+ const runAgentsCommand = (0, import_react49.useCallback)(
49452
49636
  (args, openCockpit, listAvailable) => {
49453
49637
  const wantsBatches = args.length === 1 && args[0] === "batches";
49454
49638
  const pending = wantsBatches ? {
@@ -49500,7 +49684,7 @@ ${blocks.join("\n\n")}`;
49500
49684
  },
49501
49685
  [appLifetime, pushMessage, session, setChoicePicker, setSelectedChoice]
49502
49686
  );
49503
- const openBatch = (0, import_react48.useCallback)(
49687
+ const openBatch = (0, import_react49.useCallback)(
49504
49688
  async (batch) => {
49505
49689
  if (!batch.live) await hydrateSavedChildren();
49506
49690
  const workflow = agentWorkflows(subagentsRef.current).find(
@@ -49525,16 +49709,16 @@ ${blocks.join("\n\n")}`;
49525
49709
  },
49526
49710
  [hydrateSavedChildren, pushMessage, setAgentSurface]
49527
49711
  );
49528
- const reportedAgentsRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
49529
- const reportedBatchesRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
49530
- const batchSeenAtRef = (0, import_react48.useRef)(/* @__PURE__ */ new Map());
49531
- const [receiptTick, setReceiptTick] = (0, import_react48.useState)(0);
49532
- (0, import_react48.useEffect)(() => {
49712
+ const reportedAgentsRef = (0, import_react49.useRef)(/* @__PURE__ */ new Set());
49713
+ const reportedBatchesRef = (0, import_react49.useRef)(/* @__PURE__ */ new Set());
49714
+ const batchSeenAtRef = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
49715
+ const [receiptTick, setReceiptTick] = (0, import_react49.useState)(0);
49716
+ (0, import_react49.useEffect)(() => {
49533
49717
  reportedAgentsRef.current.clear();
49534
49718
  reportedBatchesRef.current.clear();
49535
49719
  batchSeenAtRef.current.clear();
49536
49720
  }, [session]);
49537
- (0, import_react48.useEffect)(() => {
49721
+ (0, import_react49.useEffect)(() => {
49538
49722
  void receiptTick;
49539
49723
  const current = session?.subagents?.getSnapshot() ?? [];
49540
49724
  const now = Date.now();
@@ -49612,11 +49796,11 @@ ${blocks.join("\n\n")}`;
49612
49796
  const timer = setTimeout(() => setReceiptTick((tick) => tick + 1), retryIn);
49613
49797
  return () => clearTimeout(timer);
49614
49798
  }, [subagents, activeTools, pushMessage, session, receiptTick]);
49615
- const reportedCorrectionsRef = (0, import_react48.useRef)(/* @__PURE__ */ new Set());
49616
- (0, import_react48.useEffect)(() => {
49799
+ const reportedCorrectionsRef = (0, import_react49.useRef)(/* @__PURE__ */ new Set());
49800
+ (0, import_react49.useEffect)(() => {
49617
49801
  reportedCorrectionsRef.current.clear();
49618
49802
  }, [session]);
49619
- (0, import_react48.useEffect)(() => {
49803
+ (0, import_react49.useEffect)(() => {
49620
49804
  const current = session?.subagents?.getSnapshot() ?? [];
49621
49805
  for (const agent of subagents) {
49622
49806
  const live = current.find(
@@ -49632,7 +49816,7 @@ ${blocks.join("\n\n")}`;
49632
49816
  }
49633
49817
  }
49634
49818
  }, [subagents, pushMessage, session]);
49635
- const applyPermissionMode = (0, import_react48.useCallback)(
49819
+ const applyPermissionMode = (0, import_react49.useCallback)(
49636
49820
  (mode, announce = true) => {
49637
49821
  if (!session?.hasProvider) {
49638
49822
  pushMessage("system", "Choose a model before changing permissions.");
@@ -49659,7 +49843,7 @@ ${blocks.join("\n\n")}`;
49659
49843
  },
49660
49844
  [pushMessage, session]
49661
49845
  );
49662
- const applyReasoningEffort = (0, import_react48.useCallback)(
49846
+ const applyReasoningEffort = (0, import_react49.useCallback)(
49663
49847
  (effort, selectedSession) => {
49664
49848
  if (!session?.hasProvider) {
49665
49849
  pushMessage(
@@ -49699,8 +49883,8 @@ ${blocks.join("\n\n")}`;
49699
49883
  },
49700
49884
  [hasUnsettledTurn, pushMessage, session, setReasoningEffort, state]
49701
49885
  );
49702
- const hypermodePinRef = (0, import_react48.useRef)(null);
49703
- const applyHypermode = (0, import_react48.useCallback)(
49886
+ const hypermodePinRef = (0, import_react49.useRef)(null);
49887
+ const applyHypermode = (0, import_react49.useCallback)(
49704
49888
  (enabled, selectedSession) => {
49705
49889
  if (!session?.hasProvider) {
49706
49890
  pushMessage(
@@ -49778,7 +49962,7 @@ ${blocks.join("\n\n")}`;
49778
49962
  },
49779
49963
  [appLifetime, hasUnsettledTurn, pushMessage, session, setHypermode, setReasoningEffort, state]
49780
49964
  );
49781
- const stepReasoningEffort = (0, import_react48.useCallback)(
49965
+ const stepReasoningEffort = (0, import_react49.useCallback)(
49782
49966
  (direction) => {
49783
49967
  const levels = session?.reasoningEffortLevels;
49784
49968
  if (!session?.hasProvider || levels === void 0 || levels.length === 0) {
@@ -49817,7 +50001,7 @@ ${blocks.join("\n\n")}`;
49817
50001
  },
49818
50002
  [applyReasoningEffort, pushMessage, session]
49819
50003
  );
49820
- const recordFeedback = (0, import_react48.useCallback)(
50004
+ const recordFeedback = (0, import_react49.useCallback)(
49821
50005
  (sessionId, messageIdValue, rating, note) => {
49822
50006
  const sessions = sessionsRef.current;
49823
50007
  if (!sessions) {
@@ -49846,7 +50030,7 @@ ${blocks.join("\n\n")}`;
49846
50030
  },
49847
50031
  [pushMessage]
49848
50032
  );
49849
- const activateSkill = (0, import_react48.useCallback)(
50033
+ const activateSkill = (0, import_react49.useCallback)(
49850
50034
  (name) => {
49851
50035
  const info = discoverSkills({
49852
50036
  cwd: ctx.cwd,
@@ -49870,7 +50054,7 @@ ${blocks.join("\n\n")}`;
49870
50054
  },
49871
50055
  [conversationLearning, ctx.cwd, ctx.skills, pushMessage]
49872
50056
  );
49873
- const removeStoredCredential = (0, import_react48.useCallback)(
50057
+ const removeStoredCredential = (0, import_react49.useCallback)(
49874
50058
  (target) => {
49875
50059
  const path = target === "google" ? googleApiKeyPath() : credentialsPath();
49876
50060
  const hadClaude = readStoredSubscriptionCredential() !== null;
@@ -49924,7 +50108,7 @@ ${blocks.join("\n\n")}`;
49924
50108
  },
49925
50109
  [pushMessage]
49926
50110
  );
49927
- const archiveCurrentConversation = (0, import_react48.useCallback)(() => {
50111
+ const archiveCurrentConversation = (0, import_react49.useCallback)(() => {
49928
50112
  if (conversationMutationRef.current) return;
49929
50113
  const sessions = sessionsRef.current;
49930
50114
  const sessionId = scopeRef.current?.sessionId;
@@ -49970,7 +50154,7 @@ ${blocks.join("\n\n")}`;
49970
50154
  }
49971
50155
  })();
49972
50156
  }, [exit, goalActivation, hasUnsettledTurn, onExitSummary, pushMessage, state]);
49973
- const stableExportSource = (0, import_react48.useCallback)(() => {
50157
+ const stableExportSource = (0, import_react49.useCallback)(() => {
49974
50158
  const sessions = sessionsRef.current;
49975
50159
  const sessionId = scopeRef.current?.sessionId;
49976
50160
  if (!sessions || !sessionId || !conversationMaterializedRef.current) {
@@ -49989,12 +50173,12 @@ ${blocks.join("\n\n")}`;
49989
50173
  }
49990
50174
  return { sessions, sessionId };
49991
50175
  }, [hasUnsettledTurn, pushMessage, state]);
49992
- const cyclePermissionMode = (0, import_react48.useCallback)(() => {
50176
+ const cyclePermissionMode = (0, import_react49.useCallback)(() => {
49993
50177
  const current = permissionModeRef.current;
49994
50178
  const next = current === "prompt" ? "accept-edits" : current === "accept-edits" ? "plan" : "prompt";
49995
50179
  applyPermissionMode(next, false);
49996
50180
  }, [applyPermissionMode]);
49997
- const runConversationExport = (0, import_react48.useCallback)(
50181
+ const runConversationExport = (0, import_react49.useCallback)(
49998
50182
  (destination) => {
49999
50183
  const source = stableExportSource();
50000
50184
  if (!source) return;
@@ -50063,7 +50247,7 @@ ${blocks.join("\n\n")}`;
50063
50247
  },
50064
50248
  [ctx.cwd, pushMessage, stableExportSource, stdout.isTTY, writeStdout]
50065
50249
  );
50066
- const applyChoiceSelection = (0, import_react48.useCallback)(
50250
+ const applyChoiceSelection = (0, import_react49.useCallback)(
50067
50251
  (index) => {
50068
50252
  const picker = choicePickerRef.current;
50069
50253
  if (!picker) return;
@@ -50399,7 +50583,7 @@ ${blocks.join("\n\n")}`;
50399
50583
  permission
50400
50584
  ]
50401
50585
  );
50402
- const sendCopyRequest = (0, import_react48.useCallback)(
50586
+ const sendCopyRequest = (0, import_react49.useCallback)(
50403
50587
  (index) => {
50404
50588
  const picker = copyPickerRef.current;
50405
50589
  const target = picker?.targets[index];
@@ -50441,7 +50625,7 @@ ${blocks.join("\n\n")}`;
50441
50625
  },
50442
50626
  [pushMessage, setCopyPicker, stdout.isTTY, writeStdout]
50443
50627
  );
50444
- const sendTerminalNotification = (0, import_react48.useCallback)(
50628
+ const sendTerminalNotification = (0, import_react49.useCallback)(
50445
50629
  (notification) => {
50446
50630
  if (!terminalNotificationEnabled(ctx.tui?.notifications, notification)) return;
50447
50631
  const result = writeTerminalNotification(
@@ -50458,10 +50642,10 @@ ${blocks.join("\n\n")}`;
50458
50642
  },
50459
50643
  [ctx.tui, pushMessage, stdout.isTTY, writeStdout]
50460
50644
  );
50461
- const appendToMessage = (0, import_react48.useCallback)((id, delta) => {
50645
+ const appendToMessage = (0, import_react49.useCallback)((id, delta) => {
50462
50646
  setMessages((prev) => prev.map((m) => m.id === id ? { ...m, content: m.content + delta } : m));
50463
50647
  }, []);
50464
- const flushStream = (0, import_react48.useCallback)(
50648
+ const flushStream = (0, import_react49.useCallback)(
50465
50649
  (st) => {
50466
50650
  if (st.releaseTimer) {
50467
50651
  clearTimeout(st.releaseTimer);
@@ -50476,7 +50660,7 @@ ${blocks.join("\n\n")}`;
50476
50660
  },
50477
50661
  [appendToMessage, pushMessage]
50478
50662
  );
50479
- const releaseStalled = (0, import_react48.useCallback)(
50663
+ const releaseStalled = (0, import_react49.useCallback)(
50480
50664
  (st) => {
50481
50665
  if (!st.pending || st.pending.length === 0) return;
50482
50666
  const { ready, rest } = splitSafeCut(st.pending);
@@ -50489,14 +50673,14 @@ ${blocks.join("\n\n")}`;
50489
50673
  },
50490
50674
  [appendToMessage, pushMessage]
50491
50675
  );
50492
- const finalizeMessage = (0, import_react48.useCallback)((id, finalContent) => {
50676
+ const finalizeMessage = (0, import_react49.useCallback)((id, finalContent) => {
50493
50677
  setMessages(
50494
50678
  (prev) => prev.map(
50495
50679
  (m) => m.id === id ? { ...m, content: finalContent ?? m.content, pending: false } : m
50496
50680
  )
50497
50681
  );
50498
50682
  }, []);
50499
- const closeLiveReply = (0, import_react48.useCallback)(() => {
50683
+ const closeLiveReply = (0, import_react49.useCallback)(() => {
50500
50684
  const st = liveStreamRef.current;
50501
50685
  if (!st) return;
50502
50686
  flushStream(st);
@@ -50505,7 +50689,7 @@ ${blocks.join("\n\n")}`;
50505
50689
  st.assistantId = null;
50506
50690
  }
50507
50691
  }, [finalizeMessage, flushStream]);
50508
- const ensureSessions = (0, import_react48.useCallback)(async () => {
50692
+ const ensureSessions = (0, import_react49.useCallback)(async () => {
50509
50693
  if (scopeRef.current) return scopeRef.current;
50510
50694
  const requestedConversationId = initialConversationIdRef.current;
50511
50695
  const owner = tuiPalOwner(ctxRef.current.cwd, ctxRef.current.palId);
@@ -50546,7 +50730,7 @@ ${blocks.join("\n\n")}`;
50546
50730
  if (conversationMaterializedRef.current) sourceDeliveryPollRef.current();
50547
50731
  return scopeRef.current;
50548
50732
  }, [nextId]);
50549
- const materializeConversation = (0, import_react48.useCallback)(async () => {
50733
+ const materializeConversation = (0, import_react49.useCallback)(async () => {
50550
50734
  const existing = await ensureSessions();
50551
50735
  if (!existing) return void 0;
50552
50736
  if (conversationMaterializedRef.current) return existing;
@@ -50578,7 +50762,7 @@ ${blocks.join("\n\n")}`;
50578
50762
  if (materializationRef.current === pending) materializationRef.current = null;
50579
50763
  }
50580
50764
  }, [ensureSessions]);
50581
- const hydrateSession = (0, import_react48.useCallback)(
50765
+ const hydrateSession = (0, import_react49.useCallback)(
50582
50766
  async (requestedPrefs, detectedNow, options = {}) => {
50583
50767
  const { signal, persistSelection = false, announce = false } = options;
50584
50768
  if (signal?.aborted) return;
@@ -50796,7 +50980,7 @@ ${blocks.join("\n\n")}`;
50796
50980
  setSelectedChoice
50797
50981
  ]
50798
50982
  );
50799
- const startOrFinishLogin = (0, import_react48.useCallback)(
50983
+ const startOrFinishLogin = (0, import_react49.useCallback)(
50800
50984
  async (pasted) => {
50801
50985
  if (pasted !== void 0) {
50802
50986
  const pending = loginRef.current;
@@ -50829,7 +51013,7 @@ ${blocks.join("\n\n")}`;
50829
51013
  },
50830
51014
  [cancelPendingLogin, pushMessage]
50831
51015
  );
50832
- const startLoginFromPicker = (0, import_react48.useCallback)(
51016
+ const startLoginFromPicker = (0, import_react49.useCallback)(
50833
51017
  async (provider, signal) => {
50834
51018
  if (signal.aborted) return "failed";
50835
51019
  cancelPendingLogin();
@@ -50902,7 +51086,7 @@ ${blocks.join("\n\n")}`;
50902
51086
  },
50903
51087
  [cancelPendingLogin]
50904
51088
  );
50905
- const finishLoginFromPicker = (0, import_react48.useCallback)(
51089
+ const finishLoginFromPicker = (0, import_react49.useCallback)(
50906
51090
  async (pasted, signal) => {
50907
51091
  const pending = loginRef.current;
50908
51092
  if (!pending) {
@@ -50930,7 +51114,7 @@ ${blocks.join("\n\n")}`;
50930
51114
  },
50931
51115
  []
50932
51116
  );
50933
- const runProbe = (0, import_react48.useCallback)(
51117
+ const runProbe = (0, import_react49.useCallback)(
50934
51118
  async (options = {}) => {
50935
51119
  const { signal, announce = false } = options;
50936
51120
  try {
@@ -51130,7 +51314,7 @@ ${blocks.join("\n\n")}`;
51130
51314
  [appLifetime.signal, ensureSessions, hydrateSession, pushMessage]
51131
51315
  );
51132
51316
  runProbeRef.current = runProbe;
51133
- (0, import_react48.useEffect)(() => {
51317
+ (0, import_react49.useEffect)(() => {
51134
51318
  if (isTrusted(trustedCwdRef.current)) {
51135
51319
  try {
51136
51320
  activateTrustedProject();
@@ -51144,10 +51328,10 @@ ${blocks.join("\n\n")}`;
51144
51328
  setPhase("trust");
51145
51329
  }
51146
51330
  }, [activateTrustedProject, pushMessage, runProbe]);
51147
- (0, import_react48.useEffect)(() => {
51331
+ (0, import_react49.useEffect)(() => {
51148
51332
  trustShownAtRef.current = phase === "trust" ? Date.now() : null;
51149
51333
  }, [phase]);
51150
- const acceptTrust = (0, import_react48.useCallback)(() => {
51334
+ const acceptTrust = (0, import_react49.useCallback)(() => {
51151
51335
  try {
51152
51336
  trustDir(trustedCwdRef.current);
51153
51337
  } catch {
@@ -51175,7 +51359,7 @@ ${blocks.join("\n\n")}`;
51175
51359
  }));
51176
51360
  const recallableQueued = queued.filter(isRecallableHumanPrompt).at(-1);
51177
51361
  const canRecallQueued = recallableQueued !== void 0;
51178
- const pendingInputVisible = phase === "ready" && agentSurface === null && outputViewer === null && jobSurface === null && permission === null && saveSkillPrompt === null && scheduleReviewPrompt === null && textPrompt === null && choicePicker === null && copyPicker === null;
51362
+ const pendingInputVisible = phase === "ready" && agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && permission === null && saveSkillPrompt === null && scheduleReviewPrompt === null && textPrompt === null && choicePicker === null && copyPicker === null;
51179
51363
  const pendingInputFurniture = pendingInputVisible ? pendingInputPanelRows({
51180
51364
  pendingSteers: pendingInputItems,
51181
51365
  queued: queuedInputItems,
@@ -51197,9 +51381,13 @@ ${blocks.join("\n\n")}`;
51197
51381
  const compactWork = LIVE_FURNITURE_ROWS + fullTaskFurniture + fullToolFurniture + shellFurniture + pendingInputFurniture >= terminal.rows;
51198
51382
  const taskFurniture = fullTaskFurniture;
51199
51383
  const toolFurniture = compactWork && fullToolFurniture > 0 ? 2 : fullToolFurniture;
51200
- (0, import_react48.useEffect)(() => {
51384
+ (0, import_react49.useEffect)(() => {
51201
51385
  if (permission !== null) setOutputViewer(null);
51202
51386
  }, [permission]);
51387
+ (0, import_react49.useEffect)(() => {
51388
+ if (permission !== null || saveSkillPrompt !== null || scheduleReviewPrompt !== null)
51389
+ setScrollOpen(false);
51390
+ }, [permission, saveSkillPrompt, scheduleReviewPrompt]);
51203
51391
  const window2 = liveWindow({
51204
51392
  messages: finalized,
51205
51393
  rows: terminal.rows,
@@ -51209,9 +51397,9 @@ ${blocks.join("\n\n")}`;
51209
51397
  raw: rawOutput
51210
51398
  });
51211
51399
  const nextSettled = settledBeforeStreaming(messages, window2.settled, settledRef.current);
51212
- if (agentSurface === null && outputViewer === null && jobSurface === null && scheduleReviewPrompt === null)
51400
+ if (agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && scheduleReviewPrompt === null)
51213
51401
  settledRef.current = nextSettled;
51214
- const renderedSettled = agentSurface === null && outputViewer === null && jobSurface === null && scheduleReviewPrompt === null ? nextSettled : settledRef.current;
51402
+ const renderedSettled = agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && scheduleReviewPrompt === null ? nextSettled : settledRef.current;
51215
51403
  const hostCommands = mergeHostCommands(kernelCommandDescriptors());
51216
51404
  const slashCtx = {
51217
51405
  cwd: ctx.cwd,
@@ -51272,7 +51460,7 @@ ${blocks.join("\n\n")}`;
51272
51460
  columns: terminal.columns,
51273
51461
  sessionId: scopeRef.current?.sessionId
51274
51462
  };
51275
- const abandonActiveTurn = (0, import_react48.useCallback)(
51463
+ const abandonActiveTurn = (0, import_react49.useCallback)(
51276
51464
  async (reason) => {
51277
51465
  const sessions = sessionsRef.current;
51278
51466
  const scope = scopeRef.current;
@@ -51305,8 +51493,8 @@ ${blocks.join("\n\n")}`;
51305
51493
  },
51306
51494
  [pushMessage, session, state]
51307
51495
  );
51308
- const applyEventRef = (0, import_react48.useRef)(null);
51309
- const resumeActiveTurn = (0, import_react48.useCallback)(
51496
+ const applyEventRef = (0, import_react49.useRef)(null);
51497
+ const resumeActiveTurn = (0, import_react49.useCallback)(
51310
51498
  async (resume) => {
51311
51499
  const sessions = sessionsRef.current;
51312
51500
  const scope = scopeRef.current;
@@ -51410,7 +51598,7 @@ ${blocks.join("\n\n")}`;
51410
51598
  state
51411
51599
  ]
51412
51600
  );
51413
- (0, import_react48.useEffect)(() => {
51601
+ (0, import_react49.useEffect)(() => {
51414
51602
  const requested = pendingScheduledResumeRef.current;
51415
51603
  if (!requested || phase !== "ready" || state !== "idle" || !session?.hasProvider) return;
51416
51604
  const sessions = sessionsRef.current;
@@ -51425,7 +51613,7 @@ ${blocks.join("\n\n")}`;
51425
51613
  await resumeActiveTurn();
51426
51614
  })();
51427
51615
  }, [phase, resumeActiveTurn, session, state]);
51428
- const doResume = (0, import_react48.useCallback)(async () => {
51616
+ const doResume = (0, import_react49.useCallback)(async () => {
51429
51617
  const sessions = sessionsRef.current ?? await ensureSessions().then(() => sessionsRef.current);
51430
51618
  if (!sessions) {
51431
51619
  pushMessage("system", "Conversation history is unavailable in this folder.");
@@ -51450,7 +51638,7 @@ ${blocks.join("\n\n")}`;
51450
51638
  pushMessage("system", explainFailure(err, "Could not list conversations."));
51451
51639
  }
51452
51640
  }, [ensureSessions, pushMessage, resumeActiveTurn]);
51453
- const doUnarchive = (0, import_react48.useCallback)(async () => {
51641
+ const doUnarchive = (0, import_react49.useCallback)(async () => {
51454
51642
  if (palDefinitionRef.current) {
51455
51643
  pushMessage(
51456
51644
  "system",
@@ -51483,7 +51671,7 @@ ${blocks.join("\n\n")}`;
51483
51671
  pushMessage("system", explainFailure(err, "Could not list archived conversations."));
51484
51672
  }
51485
51673
  }, [ensureSessions, hasUnsettledTurn, pushMessage, state]);
51486
- const resolvePermission = (0, import_react48.useCallback)(
51674
+ const resolvePermission = (0, import_react49.useCallback)(
51487
51675
  (decision) => {
51488
51676
  const resolve6 = permissionResolveRef.current;
51489
51677
  permissionResolveRef.current = null;
@@ -51517,7 +51705,7 @@ ${blocks.join("\n\n")}`;
51517
51705
  },
51518
51706
  [setPermissionDetailsOpen, setPermissionReviewOffset]
51519
51707
  );
51520
- const interruptTurn = (0, import_react48.useCallback)(
51708
+ const interruptTurn = (0, import_react49.useCallback)(
51521
51709
  (recoverInput = false) => {
51522
51710
  const cancelledSwitch = cancelPendingModelSwitch();
51523
51711
  for (const pending of permissionQueueRef.current.splice(0)) {
@@ -51576,7 +51764,7 @@ ${blocks.join("\n\n")}`;
51576
51764
  wakeGoalDriver
51577
51765
  ]
51578
51766
  );
51579
- (0, import_react48.useEffect)(() => {
51767
+ (0, import_react49.useEffect)(() => {
51580
51768
  if (!terminationExit) return;
51581
51769
  terminationExit.current = () => {
51582
51770
  interruptTurn();
@@ -51586,7 +51774,7 @@ ${blocks.join("\n\n")}`;
51586
51774
  terminationExit.current = null;
51587
51775
  };
51588
51776
  }, [terminationExit, interruptTurn, exitWithSummary]);
51589
- const resumeConversation = (0, import_react48.useCallback)(
51777
+ const resumeConversation = (0, import_react49.useCallback)(
51590
51778
  async (conv) => {
51591
51779
  const sessions = sessionsRef.current;
51592
51780
  const scope = scopeRef.current;
@@ -51687,7 +51875,7 @@ ${blocks.join("\n\n")}`;
51687
51875
  wakeGoalDriver
51688
51876
  ]
51689
51877
  );
51690
- const restoreArchivedConversation = (0, import_react48.useCallback)(
51878
+ const restoreArchivedConversation = (0, import_react49.useCallback)(
51691
51879
  async (conv) => {
51692
51880
  const sessions = sessionsRef.current;
51693
51881
  if (!sessions) {
@@ -51723,7 +51911,7 @@ ${blocks.join("\n\n")}`;
51723
51911
  },
51724
51912
  [hasUnsettledTurn, pushMessage, resumeConversation, state]
51725
51913
  );
51726
- const startFreshConversation = (0, import_react48.useCallback)(
51914
+ const startFreshConversation = (0, import_react49.useCallback)(
51727
51915
  async (clearScreen2) => {
51728
51916
  if (conversationMutationRef.current) return;
51729
51917
  if (palDefinitionRef.current && (abortRef.current || hasUnsettledTurn() || queuedRef.current.length > 0)) {
@@ -51836,7 +52024,7 @@ ${blocks.join("\n\n")}`;
51836
52024
  wakeGoalDriver
51837
52025
  ]
51838
52026
  );
51839
- const doTitle = (0, import_react48.useCallback)(
52027
+ const doTitle = (0, import_react49.useCallback)(
51840
52028
  async (title, clear) => {
51841
52029
  const scope = await materializeConversation();
51842
52030
  const sessions = sessionsRef.current;
@@ -51870,7 +52058,7 @@ ${blocks.join("\n\n")}`;
51870
52058
  },
51871
52059
  [materializeConversation, pushMessage, setTextPrompt]
51872
52060
  );
51873
- const submitTextPrompt = (0, import_react48.useCallback)(
52061
+ const submitTextPrompt = (0, import_react49.useCallback)(
51874
52062
  (value) => {
51875
52063
  const prompt = textPromptRef.current;
51876
52064
  if (!prompt) return;
@@ -51924,14 +52112,14 @@ ${blocks.join("\n\n")}`;
51924
52112
  },
51925
52113
  [pushMessage, runConversationExport, setTextPrompt]
51926
52114
  );
51927
- const cancelTextPrompt = (0, import_react48.useCallback)(() => {
52115
+ const cancelTextPrompt = (0, import_react49.useCallback)(() => {
51928
52116
  const prompt = textPromptRef.current;
51929
52117
  queueMicrotask(() => {
51930
52118
  if (textPromptRef.current === prompt) setTextPrompt(null);
51931
52119
  if (prompt?.kind === "user-question") resolveQuestion({ kind: "skip" });
51932
52120
  });
51933
52121
  }, [resolveQuestion, setTextPrompt]);
51934
- const doFork = (0, import_react48.useCallback)(async () => {
52122
+ const doFork = (0, import_react49.useCallback)(async () => {
51935
52123
  if (palDefinitionRef.current) {
51936
52124
  pushMessage(
51937
52125
  "system",
@@ -52003,7 +52191,7 @@ ${blocks.join("\n\n")}`;
52003
52191
  session,
52004
52192
  wakeGoalDriver
52005
52193
  ]);
52006
- const openPromptEditor = (0, import_react48.useCallback)(() => {
52194
+ const openPromptEditor = (0, import_react49.useCallback)(() => {
52007
52195
  if (palDefinitionRef.current) {
52008
52196
  pushMessage(
52009
52197
  "system",
@@ -52033,7 +52221,7 @@ ${blocks.join("\n\n")}`;
52033
52221
  editCommittedRef.current = false;
52034
52222
  setPhase("edit");
52035
52223
  }, [hasUnsettledTurn, messages, pushMessage, state]);
52036
- const doRestore = (0, import_react48.useCallback)(
52224
+ const doRestore = (0, import_react49.useCallback)(
52037
52225
  async (turn) => {
52038
52226
  const store = session?.checkpoints;
52039
52227
  if (!store) {
@@ -52069,7 +52257,7 @@ ${blocks.join("\n\n")}`;
52069
52257
  },
52070
52258
  [hasUnsettledTurn, pushMessage, session, state]
52071
52259
  );
52072
- const confirmPromptEdit = (0, import_react48.useCallback)(
52260
+ const confirmPromptEdit = (0, import_react49.useCallback)(
52073
52261
  async (target) => {
52074
52262
  if (editCommittedRef.current || conversationMutationRef.current) return;
52075
52263
  if (hasUnsettledTurn() || queuedRef.current.length > 0) {
@@ -52157,7 +52345,7 @@ ${blocks.join("\n\n")}`;
52157
52345
  wakeGoalDriver
52158
52346
  ]
52159
52347
  );
52160
- const onPermission = (0, import_react48.useCallback)(
52348
+ const onPermission = (0, import_react49.useCallback)(
52161
52349
  (req) => {
52162
52350
  const review = buildPermissionReview(req.toolCalls);
52163
52351
  if (!review.ok) {
@@ -52190,7 +52378,7 @@ ${blocks.join("\n\n")}`;
52190
52378
  },
52191
52379
  [sendTerminalNotification, setPermissionDetailsOpen, setPermissionReviewOffset]
52192
52380
  );
52193
- const askQuestion = (0, import_react48.useCallback)(
52381
+ const askQuestion = (0, import_react49.useCallback)(
52194
52382
  (question, signal) => new Promise((resolve6) => {
52195
52383
  if (signal?.aborted) {
52196
52384
  resolve6({ kind: "abort" });
@@ -52237,7 +52425,7 @@ ${blocks.join("\n\n")}`;
52237
52425
  resolveQuestion
52238
52426
  ]
52239
52427
  );
52240
- const submitChildMessage = (0, import_react48.useCallback)(
52428
+ const submitChildMessage = (0, import_react49.useCallback)(
52241
52429
  async (viewId, text) => {
52242
52430
  const ownerSession = session;
52243
52431
  const child = subagentsRef.current.find((candidate) => candidate.viewId === viewId);
@@ -52283,7 +52471,7 @@ ${blocks.join("\n\n")}`;
52283
52471
  },
52284
52472
  [activeSkills, appLifetime.signal, onPermission, pushMessage, session]
52285
52473
  );
52286
- const reviewSchedule = (0, import_react48.useCallback)(
52474
+ const reviewSchedule = (0, import_react49.useCallback)(
52287
52475
  (request, signal) => new Promise((resolve6) => {
52288
52476
  if (signal?.aborted) {
52289
52477
  resolve6("cancel");
@@ -52312,7 +52500,7 @@ ${blocks.join("\n\n")}`;
52312
52500
  }),
52313
52501
  [closeLiveReply, sendTerminalNotification, setScheduleReviewPrompt]
52314
52502
  );
52315
- const writeTaskBlock = (0, import_react48.useCallback)(
52503
+ const writeTaskBlock = (0, import_react49.useCallback)(
52316
52504
  (st, operation, checklist) => {
52317
52505
  st.taskBlockKey ??= nextId();
52318
52506
  const key = st.taskBlockKey;
@@ -52330,7 +52518,7 @@ ${blocks.join("\n\n")}`;
52330
52518
  },
52331
52519
  [nextId]
52332
52520
  );
52333
- const applyEvent = (0, import_react48.useCallback)(
52521
+ const applyEvent = (0, import_react49.useCallback)(
52334
52522
  (event, st) => {
52335
52523
  if (st.learning) observeTurnEvent(st.learning, event);
52336
52524
  if (event.kind === "provider-wait") {
@@ -52836,7 +53024,7 @@ When that is done, press Enter to continue \xB7 Esc to stop.`,
52836
53024
  ]
52837
53025
  );
52838
53026
  applyEventRef.current = applyEvent;
52839
- const runTurn = (0, import_react48.useCallback)(
53027
+ const runTurn = (0, import_react49.useCallback)(
52840
53028
  async (prompt) => {
52841
53029
  const pendingAtAdmission = pendingModelSwitchRef.current;
52842
53030
  if (pendingAtAdmission || previousSessionRef.current !== session) {
@@ -53385,7 +53573,7 @@ When that is done, press Enter to continue \xB7 Esc to stop.`,
53385
53573
  wakeGoalDriver
53386
53574
  ]
53387
53575
  );
53388
- const selectModelIntent = (0, import_react48.useCallback)(
53576
+ const selectModelIntent = (0, import_react49.useCallback)(
53389
53577
  async (query) => {
53390
53578
  if (!session || !currentProvider || state !== "idle" || phase !== "ready" || abortRef.current || hasUnsettledTurn() || pendingModelSwitchRef.current || queuedRef.current.length > 0 || permissionResolveRef.current || compactingRef.current || conversationMutationRef.current || exportingRef.current || goalDriveInFlightRef.current) {
53391
53579
  pushMessage(
@@ -53477,7 +53665,7 @@ When that is done, press Enter to continue \xB7 Esc to stop.`,
53477
53665
  wakeGoalDriver
53478
53666
  ]
53479
53667
  );
53480
- const rememberProjectNote = (0, import_react48.useCallback)(
53668
+ const rememberProjectNote = (0, import_react49.useCallback)(
53481
53669
  async (note, type) => {
53482
53670
  try {
53483
53671
  if (session?.rememberNote) {
@@ -53492,7 +53680,7 @@ When that is done, press Enter to continue \xB7 Esc to stop.`,
53492
53680
  },
53493
53681
  [ctx.cwd, pushMessage, session]
53494
53682
  );
53495
- const bindSteeredTriggers = (0, import_react48.useCallback)(
53683
+ const bindSteeredTriggers = (0, import_react49.useCallback)(
53496
53684
  (ids) => {
53497
53685
  if (ids.length === 0) return;
53498
53686
  const live = liveStreamRef.current;
@@ -53518,7 +53706,7 @@ When that is done, press Enter to continue \xB7 Esc to stop.`,
53518
53706
  },
53519
53707
  [pushMessage]
53520
53708
  );
53521
- const handleSubmit = (0, import_react48.useCallback)(
53709
+ const handleSubmit = (0, import_react49.useCallback)(
53522
53710
  (value, attachments, mode, meta) => {
53523
53711
  if (goalCommandInFlightRef.current) {
53524
53712
  pushMessage(
@@ -54754,8 +54942,8 @@ ${plugins.map((plugin) => {
54754
54942
  terminal.rows
54755
54943
  ]
54756
54944
  );
54757
- const launchMessageRef = (0, import_react48.useRef)(initialCtx.launchSettings?.message);
54758
- (0, import_react48.useEffect)(() => {
54945
+ const launchMessageRef = (0, import_react49.useRef)(initialCtx.launchSettings?.message);
54946
+ (0, import_react49.useEffect)(() => {
54759
54947
  const message = launchMessageRef.current;
54760
54948
  if (message === void 0) return;
54761
54949
  if (phase !== "ready" || state !== "idle" || !session?.hasProvider || permission !== null || textPrompt !== null || choicePicker !== null)
@@ -54812,7 +55000,7 @@ ${plugins.map((plugin) => {
54812
55000
  source: createdBy === "operator" ? "operator-loop" : "model-loop"
54813
55001
  }), "submit")
54814
55002
  };
54815
- const pollSourceDeliveries = (0, import_react48.useCallback)(() => {
55003
+ const pollSourceDeliveries = (0, import_react49.useCallback)(() => {
54816
55004
  if (appLifetime.signal.aborted) return;
54817
55005
  const sessions = sessionsRef.current;
54818
55006
  const scope = scopeRef.current;
@@ -54847,12 +55035,12 @@ ${plugins.map((plugin) => {
54847
55035
  });
54848
55036
  }, [appLifetime.signal, pushMessage]);
54849
55037
  sourceDeliveryPollRef.current = pollSourceDeliveries;
54850
- (0, import_react48.useEffect)(() => {
55038
+ (0, import_react49.useEffect)(() => {
54851
55039
  pollSourceDeliveries();
54852
55040
  const timer = setInterval(pollSourceDeliveries, 15e3);
54853
55041
  return () => clearInterval(timer);
54854
55042
  }, [pollSourceDeliveries]);
54855
- (0, import_react48.useEffect)(() => {
55043
+ (0, import_react49.useEffect)(() => {
54856
55044
  const timer = setTimeout(() => {
54857
55045
  if (palDefinitionRef.current) return;
54858
55046
  const line = scheduleRef.current?.startupLine();
@@ -54863,14 +55051,14 @@ ${plugins.map((plugin) => {
54863
55051
  scheduleRef.current?.dispose();
54864
55052
  };
54865
55053
  }, []);
54866
- (0, import_react48.useEffect)(() => {
55054
+ (0, import_react49.useEffect)(() => {
54867
55055
  if (state !== "idle" || palDefinitionRef.current) return;
54868
55056
  try {
54869
55057
  scheduleRef.current?.loops.tick();
54870
55058
  } catch {
54871
55059
  }
54872
55060
  }, [state]);
54873
- (0, import_react48.useEffect)(() => {
55061
+ (0, import_react49.useEffect)(() => {
54874
55062
  void goalDriveVersion;
54875
55063
  const sessions = sessionsRef.current;
54876
55064
  const scope = scopeRef.current;
@@ -54916,7 +55104,7 @@ ${plugins.map((plugin) => {
54916
55104
  disposed = true;
54917
55105
  };
54918
55106
  }, [goalDriveVersion, phase, session, setChoicePicker]);
54919
- (0, import_react48.useEffect)(() => {
55107
+ (0, import_react49.useEffect)(() => {
54920
55108
  void goalDriveVersion;
54921
55109
  void conversationMutation;
54922
55110
  if (goalDriveInFlightRef.current || state !== "idle" || phase !== "ready" || !session?.hasProvider || queuedRef.current.length > 0 || abortRef.current || hasUnsettledTurn() || pendingModelSwitchRef.current || conversationMutationRef.current || exportingRef.current || compactingRef.current || textPromptRef.current || choicePickerRef.current || copyPickerRef.current || goalCommandInFlightRef.current) {
@@ -54991,7 +55179,7 @@ ${plugins.map((plugin) => {
54991
55179
  copyPicker,
54992
55180
  wakeGoalDriver
54993
55181
  ]);
54994
- (0, import_react48.useEffect)(() => {
55182
+ (0, import_react49.useEffect)(() => {
54995
55183
  if (state !== "idle" || phase !== "ready" || queuedRef.current.length === 0 || queuePauseRef.current !== null || abortRef.current || hasUnsettledTurn() || pendingModelSwitchRef.current || conversationMutationRef.current || exportingRef.current || compactingRef.current || textPromptRef.current || choicePickerRef.current || copyPickerRef.current || goalCommandInFlightRef.current)
54996
55184
  return;
54997
55185
  const next = dequeueQueued();
@@ -55010,7 +55198,7 @@ ${plugins.map((plugin) => {
55010
55198
  hasUnsettledTurn,
55011
55199
  runTurn
55012
55200
  ]);
55013
- (0, import_react48.useEffect)(() => {
55201
+ (0, import_react49.useEffect)(() => {
55014
55202
  if (phase !== "ready" || palDefinitionRef.current || peersRef.current || peersStartingRef.current)
55015
55203
  return;
55016
55204
  peersStartingRef.current = true;
@@ -55050,7 +55238,7 @@ ${plugins.map((plugin) => {
55050
55238
  if (!disposed) pushMessage("system", explainFailure(error, "Peer messaging unavailable."));
55051
55239
  });
55052
55240
  }, [phase, appLifetime.signal, pushMessage]);
55053
- (0, import_react48.useEffect)(() => {
55241
+ (0, import_react49.useEffect)(() => {
55054
55242
  const peers = peersRef.current;
55055
55243
  peers?.publish();
55056
55244
  if (!peers?.enabled || phase !== "ready" || state !== "idle" || abortRef.current || hasUnsettledTurn() || queuePauseRef.current || pendingModelSwitchRef.current || conversationMutationRef.current || textPromptRef.current || choicePickerRef.current || copyPickerRef.current || exportingRef.current || compactingRef.current || goalCommandInFlightRef.current)
@@ -55079,8 +55267,8 @@ ${plugins.map((plugin) => {
55079
55267
  enqueueQueued,
55080
55268
  hasUnsettledTurn
55081
55269
  ]);
55082
- const updateCheckedRef = (0, import_react48.useRef)(false);
55083
- (0, import_react48.useEffect)(() => {
55270
+ const updateCheckedRef = (0, import_react49.useRef)(false);
55271
+ (0, import_react49.useEffect)(() => {
55084
55272
  if (phase !== "ready" || updateCheckedRef.current) return;
55085
55273
  updateCheckedRef.current = true;
55086
55274
  void checkUpdates(ctx.version).then((ups) => {
@@ -55090,7 +55278,7 @@ ${plugins.map((plugin) => {
55090
55278
  ${lines.join("\n")}`);
55091
55279
  });
55092
55280
  }, [phase, ctx.version, pushMessage]);
55093
- const hydrateFromPicker = (0, import_react48.useCallback)(
55281
+ const hydrateFromPicker = (0, import_react49.useCallback)(
55094
55282
  async (prefs, detectedNow, signal, options = {}) => {
55095
55283
  try {
55096
55284
  await hydrateSession(prefs, detectedNow, {
@@ -55113,7 +55301,7 @@ ${lines.join("\n")}`);
55113
55301
  },
55114
55302
  [hydrateSession]
55115
55303
  );
55116
- const handleTypedCredential = (0, import_react48.useCallback)(
55304
+ const handleTypedCredential = (0, import_react49.useCallback)(
55117
55305
  (credential, disposition, signal) => {
55118
55306
  const next = [credential, ...detected.filter((d) => d.entry.id !== credential.entry.id)];
55119
55307
  setDetected(next);
@@ -55160,7 +55348,7 @@ ${lines.join("\n")}`);
55160
55348
  },
55161
55349
  [detected, hydrateFromPicker, pushMessage]
55162
55350
  );
55163
- const handlePickerSubmit = (0, import_react48.useCallback)(
55351
+ const handlePickerSubmit = (0, import_react49.useCallback)(
55164
55352
  (selection, signal) => {
55165
55353
  const prefs = selectPrimaryProvider(savedPrefsRef.current, {
55166
55354
  id: selection.provider,
@@ -55176,7 +55364,7 @@ ${lines.join("\n")}`);
55176
55364
  },
55177
55365
  [detected, hydrateFromPicker]
55178
55366
  );
55179
- const handlePickerCancel = (0, import_react48.useCallback)(() => {
55367
+ const handlePickerCancel = (0, import_react49.useCallback)(() => {
55180
55368
  setPickerInitialView("providers");
55181
55369
  setPickerDetected(null);
55182
55370
  setPickerSelectionKind("provider-and-model");
@@ -55188,7 +55376,7 @@ ${lines.join("\n")}`);
55188
55376
  }, [session, exitWithSummary]);
55189
55377
  use_input_default(
55190
55378
  (input, key) => {
55191
- if (outputViewer !== null) return;
55379
+ if (outputViewer !== null || scrollOpen && permission === null) return;
55192
55380
  if ((saveSkillPromptRef.current || scheduleReviewPromptRef.current) && permission === null)
55193
55381
  return;
55194
55382
  if (phase === "unhealthy") {
@@ -55588,7 +55776,7 @@ ${lines.join("\n")}`);
55588
55776
  return;
55589
55777
  }
55590
55778
  if (key.home || key.end || key.pageUp || key.pageDown) {
55591
- const pageSize = choicePickerWindowSize({
55779
+ const pageSize2 = choicePickerWindowSize({
55592
55780
  rows: terminal.rows,
55593
55781
  columns: Math.max(1, (terminal.columns ?? 80) - 2),
55594
55782
  searchable,
@@ -55603,7 +55791,7 @@ ${lines.join("\n")}`);
55603
55791
  options,
55604
55792
  index,
55605
55793
  key.home ? "first" : key.end ? "last" : key.pageUp ? "previous-page" : "next-page",
55606
- pageSize
55794
+ pageSize2
55607
55795
  )
55608
55796
  );
55609
55797
  return;
@@ -55773,7 +55961,7 @@ ${lines.join("\n")}`);
55773
55961
  const childComposerAvailable = Boolean(
55774
55962
  session?.messageSubagent && selectedSubagent && !selectedSubagent.replayed && agentSurface?.kind === "transcript"
55775
55963
  );
55776
- const lifecycleOwnsViewport = outputViewer !== null || jobSurface !== null || scheduleReviewPrompt !== null || phase === "trust" || phase === "resume" || phase === "unarchive" || phase === "edit" || phase === "picker" || agentSurface !== null;
55964
+ const lifecycleOwnsViewport = outputViewer !== null || scrollOpen || jobSurface !== null || scheduleReviewPrompt !== null || phase === "trust" || phase === "resume" || phase === "unarchive" || phase === "edit" || phase === "picker" || agentSurface !== null;
55777
55965
  const statusGoal = phase === "ready" && state === "idle" && conversationMutation === null && !compacting && permission === null && textPrompt === null && choicePicker === null && copyPicker === null && scheduleReviewPrompt === null && agentSurface === null && jobSurface === null ? goalStatusLabel(
55778
55966
  goalStatus,
55779
55967
  goalStatus ? goalActivation.isArmed(goalStatus.sessionId, goalStatus) : false
@@ -55812,8 +56000,8 @@ ${lines.join("\n")}`);
55812
56000
  return (
55813
56001
  // One row short of the terminal, always: see ViewportBound.tsx for the
55814
56002
  // renderer path a taller frame takes and the scrollback row it costs.
55815
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ViewportBound, { rows: terminal.rows, display: externalEditorRequest ? "none" : "flex", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
55816
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TranscriptFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56003
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ViewportBound, { rows: terminal.rows, display: externalEditorRequest ? "none" : "flex", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, children: [
56004
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TranscriptFrame, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55817
56005
  Transcript,
55818
56006
  {
55819
56007
  messages: finalized,
@@ -55826,10 +56014,10 @@ ${lines.join("\n")}`);
55826
56014
  hyperlinks,
55827
56015
  showLive: !lifecycleOwnsViewport,
55828
56016
  staticIndent: 1,
55829
- header: transcriptOwned ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(BrandHeader, { version: ctx.version, permissionMode: displayedPermissionMode }) : void 0
56017
+ header: transcriptOwned ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BrandHeader, { version: ctx.version, permissionMode: displayedPermissionMode }) : void 0
55830
56018
  }
55831
56019
  ) }),
55832
- providerSetup ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56020
+ providerSetup ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55833
56021
  ProviderSetup,
55834
56022
  {
55835
56023
  cwd: ctx.cwd,
@@ -55845,22 +56033,22 @@ ${lines.join("\n")}`);
55845
56033
  );
55846
56034
  }
55847
56035
  }
55848
- ) : phase === "trust" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TrustPrompt, { cwd: ctx.cwd }) : phase === "unhealthy" ? (
56036
+ ) : phase === "trust" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TrustPrompt, { cwd: ctx.cwd }) : phase === "unhealthy" ? (
55849
56037
  // The sentence above already says what to do when it is a complete
55850
56038
  // one; saying "resolve the error above" under it is the same advice
55851
56039
  // twice.
55852
- startupExplained ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
55853
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme.status.error, bold: true, children: "Startup stopped" }),
55854
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme.text.secondary, children: "Resolve the error above, then restart Namzu." })
56040
+ startupExplained ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
56041
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.status.error, bold: true, children: "Startup stopped" }),
56042
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.secondary, children: "Resolve the error above, then restart Namzu." })
55855
56043
  ] })
55856
- ) : phase === "resume" || phase === "unarchive" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56044
+ ) : phase === "resume" || phase === "unarchive" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55857
56045
  ResumePicker,
55858
56046
  {
55859
56047
  conversations: resumeList,
55860
56048
  selected: selectedResume,
55861
56049
  mode: phase === "unarchive" ? "restore" : "resume"
55862
56050
  }
55863
- ) : phase === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(EditPromptPicker, { prompts: editList, selected: selectedEdit }) : phase === "picker" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56051
+ ) : phase === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EditPromptPicker, { prompts: editList, selected: selectedEdit }) : phase === "picker" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55864
56052
  Picker,
55865
56053
  {
55866
56054
  detected: pickerDetected ?? detected,
@@ -55878,8 +56066,8 @@ ${lines.join("\n")}`);
55878
56066
  notice: pickerNotice,
55879
56067
  cancelExits: !session?.hasProvider
55880
56068
  }
55881
- ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
55882
- agentSurface === null && outputViewer === null && jobSurface === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56069
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
56070
+ agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55883
56071
  LiveActivity,
55884
56072
  {
55885
56073
  compact: compactWork,
@@ -55893,8 +56081,8 @@ ${lines.join("\n")}`);
55893
56081
  waitingForYou: choicePicker !== null || permission !== null || textPrompt !== null || saveSkillPrompt !== null || scheduleReviewPrompt !== null
55894
56082
  }
55895
56083
  ) : null,
55896
- agentSurface === null && outputViewer === null && jobSurface === null && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TaskList, { tasks: liveTasks }) : null,
55897
- permission ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56084
+ agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TaskList, { tasks: liveTasks }) : null,
56085
+ permission ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55898
56086
  PermissionOverlay,
55899
56087
  {
55900
56088
  toolCalls: permission.toolCalls,
@@ -55912,7 +56100,7 @@ ${lines.join("\n")}`);
55912
56100
  ...permission.screenConsent === true ? { screenConsent: { provider: session?.providerSummary ?? null } } : {}
55913
56101
  }
55914
56102
  ) : null,
55915
- saveSkillPrompt && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56103
+ saveSkillPrompt && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55916
56104
  SaveSkillOverlay,
55917
56105
  {
55918
56106
  request: saveSkillPrompt.request,
@@ -55923,7 +56111,7 @@ ${lines.join("\n")}`);
55923
56111
  },
55924
56112
  saveSkillPrompt.request.markdown
55925
56113
  ) : null,
55926
- scheduleReviewPrompt && permission === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56114
+ scheduleReviewPrompt && permission === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55927
56115
  ScheduleReviewOverlay,
55928
56116
  {
55929
56117
  request: scheduleReviewPrompt.request,
@@ -55933,7 +56121,7 @@ ${lines.join("\n")}`);
55933
56121
  },
55934
56122
  scheduleReviewPrompt.token
55935
56123
  ) : null,
55936
- textPrompt ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56124
+ textPrompt ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55937
56125
  TextPrompt,
55938
56126
  {
55939
56127
  columns: Math.max(1, (terminal.columns ?? 80) - 2),
@@ -55946,7 +56134,7 @@ ${lines.join("\n")}`);
55946
56134
  onCancel: cancelTextPrompt
55947
56135
  },
55948
56136
  textPrompt.token
55949
- ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && choicePicker?.kind === "reasoning-effort" && effortSlider ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56137
+ ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && choicePicker?.kind === "reasoning-effort" && effortSlider ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55950
56138
  EffortSlider,
55951
56139
  {
55952
56140
  title: choicePicker.title,
@@ -55956,7 +56144,7 @@ ${lines.join("\n")}`);
55956
56144
  layout: effortSlider,
55957
56145
  columns: Math.max(1, (terminal.columns ?? 80) - 2)
55958
56146
  }
55959
- ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && choicePicker ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56147
+ ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && choicePicker ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55960
56148
  ChoicePicker,
55961
56149
  {
55962
56150
  busy: "busy" in choicePicker && choicePicker.busy === true,
@@ -55968,8 +56156,19 @@ ${lines.join("\n")}`);
55968
56156
  selected: selectedChoice,
55969
56157
  windowSize: choicePicker.kind === "command" ? choicePicker.windowSize : void 0
55970
56158
  }
55971
- ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && copyPicker ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CopyPicker, { targets: copyPicker.targets, selected: selectedCopy }) : null,
55972
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
56159
+ ) : permission === null && scheduleReviewPrompt === null && !childSurfaceOpen && copyPicker ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CopyPicker, { targets: copyPicker.targets, selected: selectedCopy }) : null,
56160
+ scrollOpen && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56161
+ TranscriptScrollView,
56162
+ {
56163
+ messages: finalized,
56164
+ pending: messages.find((m) => m.pending) ?? null,
56165
+ pendingAt,
56166
+ height: Math.max(3, terminal.rows - SCROLL_VIEW_RESERVED_ROWS),
56167
+ columns: Math.max(4, terminal.columns - 2),
56168
+ onClose: () => setScrollOpen(false)
56169
+ }
56170
+ ) : null,
56171
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
55973
56172
  ComposerFrame,
55974
56173
  {
55975
56174
  columns: Math.max(2, (terminal.columns ?? 80) - 2),
@@ -55977,10 +56176,10 @@ ${lines.join("\n")}`);
55977
56176
  ...hypermode ? { mode: HYPERMODE } : {},
55978
56177
  activation: hypermodeActivation,
55979
56178
  animate: externalEditorRequest === null,
55980
- focus: phase === "ready" && state !== "awaiting-permission" && !compacting && externalEditorRequest === null && conversationMutation === null && textPrompt === null && choicePicker === null && copyPicker === null && saveSkillPrompt === null && scheduleReviewPrompt === null && !childSurfaceOpen,
56179
+ focus: phase === "ready" && state !== "awaiting-permission" && !compacting && externalEditorRequest === null && conversationMutation === null && textPrompt === null && choicePicker === null && copyPicker === null && saveSkillPrompt === null && scheduleReviewPrompt === null && !scrollOpen && !childSurfaceOpen,
55981
56180
  hidden: permission !== null || saveSkillPrompt !== null || scheduleReviewPrompt !== null || textPrompt !== null || choicePicker !== null || copyPicker !== null || childSurfaceOpen,
55982
56181
  children: [
55983
- pendingInputVisible ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56182
+ pendingInputVisible ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
55984
56183
  PendingInputPanel,
55985
56184
  {
55986
56185
  pendingSteers: pendingInputItems,
@@ -55998,12 +56197,12 @@ ${lines.join("\n")}`);
55998
56197
  held: queuePause
55999
56198
  }
56000
56199
  ) : null,
56001
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56200
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56002
56201
  Composer,
56003
56202
  {
56004
56203
  reasoningEffortLevels: session?.reasoningEffortLevels,
56005
56204
  onCycleMode: cyclePermissionMode,
56006
- disabled: outputViewer !== null || jobSurface !== null || phase !== "ready" || state === "awaiting-permission" || compacting || conversationMutation !== null || externalEditorRequest !== null || childSurfaceOpen,
56205
+ disabled: outputViewer !== null || scrollOpen || jobSurface !== null || phase !== "ready" || state === "awaiting-permission" || compacting || conversationMutation !== null || externalEditorRequest !== null || childSurfaceOpen,
56007
56206
  hidden: permission !== null || saveSkillPrompt !== null || scheduleReviewPrompt !== null || textPrompt !== null || choicePicker !== null || copyPicker !== null || childSurfaceOpen,
56008
56207
  escapeInterrupts: !compacting && (state === "thinking" || state === "tool" || pendingModelSwitchRef.current !== null) || handoffPark !== null && state === "idle",
56009
56208
  onSubmit: handleSubmit,
@@ -56015,6 +56214,7 @@ ${lines.join("\n")}`);
56015
56214
  onDraftRestored: (token) => setComposerDraft((draft) => draft?.token === token ? null : draft),
56016
56215
  onDraftPresenceChange: setComposerHasDraft,
56017
56216
  onOpenAgentPanel: openAgentCockpit,
56217
+ onScrollTranscript: () => setScrollOpen(true),
56018
56218
  onRecallQueued: recallQueuedPrompt,
56019
56219
  userCommands,
56020
56220
  builtins: hostCommands.map((command) => ({
@@ -56031,7 +56231,7 @@ ${lines.join("\n")}`);
56031
56231
  }
56032
56232
  )
56033
56233
  ] }),
56034
- phase === "trust" ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56234
+ phase === "trust" ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56035
56235
  StatusBar,
56036
56236
  {
56037
56237
  cwd: ctx.cwd,
@@ -56046,12 +56246,12 @@ ${lines.join("\n")}`);
56046
56246
  composerMounted: showComposerSurface
56047
56247
  }
56048
56248
  ),
56049
- showComposerSurface && !childSurfaceOpen && permission === null && scheduleReviewPrompt === null && runningShellCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: terminal.columns < 38 ? `${runningShellCount} shell${runningShellCount === 1 ? "" : "s"} \xB7 /jobs` : `${runningShellCount} shell${runningShellCount === 1 ? "" : "s"} running \xB7 /jobs to manage` }) }) : null,
56050
- showComposerSurface && permission === null && agentSurface === null && outputViewer === null && jobSurface === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(AgentNarrationBand, { lines: narration }) : null,
56051
- showComposerSurface && agentSurface === null && outputViewer === null && jobSurface === null && scheduleReviewPrompt === null && liveSubagents.length > 0 ? (
56249
+ showComposerSurface && !childSurfaceOpen && permission === null && scheduleReviewPrompt === null && runningShellCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text, { color: theme.text.secondary, wrap: "truncate-end", children: terminal.columns < 38 ? `${runningShellCount} shell${runningShellCount === 1 ? "" : "s"} \xB7 /jobs` : `${runningShellCount} shell${runningShellCount === 1 ? "" : "s"} running \xB7 /jobs to manage` }) }) : null,
56250
+ showComposerSurface && permission === null && agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AgentNarrationBand, { lines: narration }) : null,
56251
+ showComposerSurface && agentSurface === null && outputViewer === null && !scrollOpen && jobSurface === null && scheduleReviewPrompt === null && liveSubagents.length > 0 ? (
56052
56252
  // The active agents remain in memory while the schedule review
56053
56253
  // owns the available rows; the panel returns after the decision.
56054
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56254
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56055
56255
  AgentTaskPanel,
56056
56256
  {
56057
56257
  agents: liveSubagents,
@@ -56060,7 +56260,7 @@ ${lines.join("\n")}`);
56060
56260
  compact: permission !== null
56061
56261
  }
56062
56262
  )
56063
- ) : showComposerSurface && permission === null && scheduleReviewPrompt === null && agentSurface?.kind === "cockpit" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56263
+ ) : showComposerSurface && permission === null && scheduleReviewPrompt === null && agentSurface?.kind === "cockpit" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56064
56264
  AgentCockpit,
56065
56265
  {
56066
56266
  agents: subagents,
@@ -56070,7 +56270,7 @@ ${lines.join("\n")}`);
56070
56270
  terminalRows: terminal.rows,
56071
56271
  terminalColumns: terminal.columns
56072
56272
  }
56073
- ) : showComposerSurface && permission === null && scheduleReviewPrompt === null && agentSurface?.kind === "transcript" && selectedSubagent ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56273
+ ) : showComposerSurface && permission === null && scheduleReviewPrompt === null && agentSurface?.kind === "transcript" && selectedSubagent ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56074
56274
  AgentTranscript,
56075
56275
  {
56076
56276
  agent: selectedSubagent,
@@ -56089,7 +56289,7 @@ ${lines.join("\n")}`);
56089
56289
  ) : void 0
56090
56290
  }
56091
56291
  ) : null,
56092
- showComposerSurface && agentSurface?.kind === "transcript" && selectedSubagent && childComposerAvailable ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56292
+ showComposerSurface && agentSurface?.kind === "transcript" && selectedSubagent && childComposerAvailable ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56093
56293
  ChildComposer,
56094
56294
  {
56095
56295
  title: selectedSubagent.description || selectedSubagent.agentId,
@@ -56113,7 +56313,7 @@ ${lines.join("\n")}`);
56113
56313
  },
56114
56314
  `${conversationGenRef.current}:${selectedSubagent.viewId}`
56115
56315
  ) : null,
56116
- outputViewer && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56316
+ outputViewer && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56117
56317
  ToolOutputViewer,
56118
56318
  {
56119
56319
  onPrevious: () => {
@@ -56131,7 +56331,7 @@ ${lines.join("\n")}`);
56131
56331
  },
56132
56332
  outputViewer.id
56133
56333
  ) : null,
56134
- jobSurface && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
56334
+ jobSurface && permission === null && scheduleReviewPrompt === null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
56135
56335
  BackgroundJobsPanel,
56136
56336
  {
56137
56337
  jobs: backgroundJobs,
@@ -56166,7 +56366,7 @@ function describeJobExit(job) {
56166
56366
  }
56167
56367
  __name(describeJobExit, "describeJobExit");
56168
56368
  function TranscriptFrame({ children }) {
56169
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Box_default, { flexDirection: "column", children });
56369
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Box_default, { flexDirection: "column", children });
56170
56370
  }
56171
56371
  __name(TranscriptFrame, "TranscriptFrame");
56172
56372
  function formatToolCall(toolName, summary2, standalone = false) {
@@ -56543,7 +56743,7 @@ async function launchTui(ctx, options = {}) {
56543
56743
  const terminationExit = { current: null };
56544
56744
  let terminatedBy = null;
56545
56745
  const instance = render_default(
56546
- import_react49.default.createElement(App2, {
56746
+ import_react50.default.createElement(App2, {
56547
56747
  ctx,
56548
56748
  onExitSummary: /* @__PURE__ */ __name((summary2) => {
56549
56749
  exitSummary = summary2;
@@ -56700,4 +56900,4 @@ react/cjs/react-jsx-runtime.development.js:
56700
56900
  * LICENSE file in the root directory of this source tree.
56701
56901
  *)
56702
56902
  */
56703
- //# sourceMappingURL=tui-5MU7JBXX.js.map
56903
+ //# sourceMappingURL=tui-TW4Y2UBB.js.map