@namzu/cli 42.0.0 → 43.0.0

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 (285) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-ADQ2PRAY.js → acp-GKYFK7VQ.js} +38 -38
  4. package/dist/chunks/{activity-command-JROQLBPA.js → activity-command-TOTM3MOY.js} +12 -12
  5. package/dist/chunks/{add-ILLLF6YP.js → add-4GRA6X5I.js} +14 -14
  6. package/dist/chunks/{agent-YQI5KOPV.js → agent-KEI53I7S.js} +29 -29
  7. package/dist/chunks/agent-session-4IF5H4YO.js +58 -0
  8. package/dist/chunks/{archive-55KJKGJB.js → archive-OOQMVBUH.js} +10 -10
  9. package/dist/chunks/{bin-main-332F5KRZ.js → bin-main-L67SJQV2.js} +4 -4
  10. package/dist/chunks/{browser-C6AOJ3CH.js → browser-GDIYUWKT.js} +6 -6
  11. package/dist/chunks/{chat-45H5F3KI.js → chat-FUQOCA7Q.js} +15 -15
  12. package/dist/chunks/{chunk-SRYIMLOK.js → chunk-2C5QF5ZM.js} +2 -2
  13. package/dist/chunks/{chunk-BRKD6FMO.js → chunk-2R44UHEU.js} +2 -2
  14. package/dist/chunks/{chunk-URJ7TITR.js → chunk-2S4VEEVB.js} +8 -8
  15. package/dist/chunks/{chunk-F6WVRMVY.js → chunk-3SQVE73V.js} +261 -91
  16. package/dist/chunks/chunk-3SQVE73V.js.map +6 -0
  17. package/dist/chunks/{chunk-6GBZAUYW.js → chunk-4V2V2FMP.js} +2 -2
  18. package/dist/chunks/{chunk-ESZ7X37S.js → chunk-54TFQUPM.js} +4 -4
  19. package/dist/chunks/{chunk-R2LYGFCI.js → chunk-5QCBUBKO.js} +4 -4
  20. package/dist/chunks/{chunk-FMEGRBJP.js → chunk-6G3XZZRF.js} +2 -2
  21. package/dist/chunks/{chunk-XMOKHCPV.js → chunk-6WK7YVAX.js} +30 -30
  22. package/dist/chunks/{chunk-5XWMKWQQ.js → chunk-752S5IP3.js} +3 -3
  23. package/dist/chunks/{chunk-J4IES4SO.js → chunk-7WQS7BP2.js} +2 -2
  24. package/dist/chunks/{chunk-IQQ6TY4W.js → chunk-AEZ7YTIJ.js} +3 -3
  25. package/dist/chunks/{chunk-HOIDWHGC.js → chunk-B4I264HC.js} +6 -6
  26. package/dist/chunks/{chunk-Y2DZ27P6.js → chunk-BBERAGUX.js} +4 -4
  27. package/dist/chunks/{chunk-4IIEEOCA.js → chunk-BHW43OKH.js} +3 -3
  28. package/dist/chunks/{chunk-JXT47VT6.js → chunk-BNYTG2ZC.js} +501 -23
  29. package/dist/chunks/chunk-BNYTG2ZC.js.map +6 -0
  30. package/dist/chunks/{chunk-M46GKTOI.js → chunk-CD5X75DB.js} +2 -2
  31. package/dist/chunks/{chunk-L3QW53QL.js → chunk-DABNNT6R.js} +6 -6
  32. package/dist/chunks/{chunk-K6LLMOB2.js → chunk-DXTK4EMM.js} +2 -2
  33. package/dist/chunks/{chunk-BDLDDNNO.js → chunk-EADX2OKC.js} +2 -2
  34. package/dist/chunks/{chunk-3LNTQLQ4.js → chunk-EDP5FDN4.js} +7 -7
  35. package/dist/chunks/{chunk-6PNBIMWH.js → chunk-EM5AM5BR.js} +3 -3
  36. package/dist/chunks/{chunk-WHOSI6UQ.js → chunk-FFXSL2SL.js} +2 -2
  37. package/dist/chunks/{chunk-7E3V7NNN.js → chunk-GNG6HJIV.js} +609 -225
  38. package/dist/chunks/chunk-GNG6HJIV.js.map +6 -0
  39. package/dist/chunks/{chunk-W2PJ6ZHY.js → chunk-GURZ2GEB.js} +3 -3
  40. package/dist/chunks/{chunk-RVSVVL6O.js → chunk-HAAL3DME.js} +3 -3
  41. package/dist/chunks/{chunk-S4KDR6G5.js → chunk-I7FY5SK5.js} +4 -4
  42. package/dist/chunks/{chunk-YVIM3MXU.js → chunk-IJUCXVG5.js} +2 -2
  43. package/dist/chunks/{chunk-QWBR6FBY.js → chunk-IY7XWRXE.js} +5 -5
  44. package/dist/chunks/{chunk-6LVWHXT6.js → chunk-LAQTQNQE.js} +8 -8
  45. package/dist/chunks/{chunk-YPHXWFKQ.js → chunk-LCVRXUEV.js} +2 -2
  46. package/dist/chunks/{chunk-QUELENQP.js → chunk-LWPTVYRU.js} +4 -4
  47. package/dist/chunks/{chunk-TW5BCDA5.js → chunk-M3RKXXZE.js} +3 -3
  48. package/dist/chunks/{chunk-N56FVHCU.js → chunk-MJRLJDNK.js} +2 -2
  49. package/dist/chunks/{chunk-SNC5D5UG.js → chunk-N4DS6G4I.js} +13 -13
  50. package/dist/chunks/{chunk-35VTE7V5.js → chunk-NJ6P3WPZ.js} +2 -2
  51. package/dist/chunks/{chunk-EWSIGY2A.js → chunk-NOG4Z42R.js} +3 -3
  52. package/dist/chunks/{chunk-DLL2FPUY.js → chunk-NWW46AII.js} +2 -2
  53. package/dist/chunks/{chunk-YM4DUQ3P.js → chunk-NXM3BLL4.js} +3 -3
  54. package/dist/chunks/{chunk-GOGBOZKO.js → chunk-ODOM3I7B.js} +9 -5
  55. package/dist/chunks/{chunk-GOGBOZKO.js.map → chunk-ODOM3I7B.js.map} +1 -1
  56. package/dist/chunks/{chunk-23NRJ2RC.js → chunk-OIOA7BRC.js} +5 -5
  57. package/dist/chunks/{chunk-FSKJ3EZC.js → chunk-OK4UNUNI.js} +2 -2
  58. package/dist/chunks/{chunk-AZPS37AQ.js → chunk-OUGL6FI2.js} +2 -2
  59. package/dist/chunks/{chunk-SIWZZF4M.js → chunk-P73IFAYM.js} +12 -12
  60. package/dist/chunks/{chunk-Y74CPWYC.js → chunk-PXSTTFI7.js} +13 -13
  61. package/dist/chunks/{chunk-HO2ZUI5Y.js → chunk-RHT52Z5X.js} +2 -2
  62. package/dist/chunks/{chunk-4NO5XFK2.js → chunk-SM377CLQ.js} +2 -2
  63. package/dist/chunks/{chunk-XXUL6HHM.js → chunk-TAAAO6PM.js} +2 -2
  64. package/dist/chunks/{chunk-RGVJHSMU.js → chunk-TIBFEO2R.js} +2 -2
  65. package/dist/chunks/{chunk-XGVCAMNT.js → chunk-TYMIKXOD.js} +2 -2
  66. package/dist/chunks/{chunk-CW2N2QS2.js → chunk-TZQT5JL3.js} +4 -4
  67. package/dist/chunks/{chunk-Y3I7AAD6.js → chunk-UB5YVQJM.js} +4 -4
  68. package/dist/chunks/{chunk-6S4R2USK.js → chunk-UPXD4LJ5.js} +3 -3
  69. package/dist/chunks/{chunk-N3C5X6BW.js → chunk-V5YIGRUD.js} +5 -5
  70. package/dist/chunks/{chunk-QT6KYBCC.js → chunk-VNFXDLKD.js} +3 -3
  71. package/dist/chunks/{chunk-HXAWIWOZ.js → chunk-VNK6EA2D.js} +2 -2
  72. package/dist/chunks/{chunk-JD2HLKFO.js → chunk-VRUEY647.js} +2 -2
  73. package/dist/chunks/{chunk-HQZ3GBQI.js → chunk-VTU23NBS.js} +6 -6
  74. package/dist/chunks/{chunk-QRGO6R2O.js → chunk-VWNLO4OM.js} +3 -3
  75. package/dist/chunks/{chunk-YP7AINGL.js → chunk-W6Z7RNVL.js} +9 -9
  76. package/dist/chunks/{chunk-4TS6ZPOZ.js → chunk-W6ZZLT64.js} +3 -3
  77. package/dist/chunks/{chunk-XCMCPWMB.js → chunk-WQDMDSPW.js} +4 -4
  78. package/dist/chunks/{chunk-A3AF5WXZ.js → chunk-XGOM2KHV.js} +6 -6
  79. package/dist/chunks/{chunk-A4CKLHKM.js → chunk-XV3FGIHS.js} +212 -86
  80. package/dist/chunks/chunk-XV3FGIHS.js.map +6 -0
  81. package/dist/chunks/{chunk-N4OY22M2.js → chunk-XZPLOQBA.js} +2 -2
  82. package/dist/chunks/{chunk-HOY7BUGW.js → chunk-Z3VSDOCX.js} +3 -3
  83. package/dist/chunks/{cli-runtime-HW6GQKC6.js → cli-runtime-Y6RGQSMF.js} +9 -9
  84. package/dist/chunks/{commands-JZT6JJY5.js → commands-4ZTQFX2X.js} +5 -5
  85. package/dist/chunks/{crash-report-TWMWHNKY.js → crash-report-Y6U6CH73.js} +6 -6
  86. package/dist/chunks/{dist-POSMI3PI.js → dist-3YHUITAK.js} +2 -2
  87. package/dist/chunks/{dist-AZ5T257L.js → dist-GTK2JZSU.js} +2 -2
  88. package/dist/chunks/{dist-MVLQAON2.js → dist-J36EH26G.js} +2 -2
  89. package/dist/chunks/{dist-K5JIOWIQ.js → dist-OKRQSUWC.js} +2 -2
  90. package/dist/chunks/{dist-4EGZFRWY.js → dist-TKVIIUPJ.js} +2 -2
  91. package/dist/chunks/{dist-6ORFQIRV.js → dist-XP72U44M.js} +2 -2
  92. package/dist/chunks/{dist-CLKFY67B.js → dist-ZNMZHP7A.js} +2 -2
  93. package/dist/chunks/{doctor-UVZBNUNF.js → doctor-WKZ7BGFC.js} +12 -12
  94. package/dist/chunks/{drain-27E6XUNK.js → drain-VOM6IT3C.js} +10 -10
  95. package/dist/chunks/{eval-NRRIWDET.js → eval-7MDLH5UR.js} +2 -2
  96. package/dist/chunks/{exec-KX46LZ36.js → exec-YBTNNBSS.js} +28 -28
  97. package/dist/chunks/{home-RT2I6VTQ.js → home-UID64VNR.js} +3 -3
  98. package/dist/chunks/{host-queries-ZXGOA6ZL.js → host-queries-A3XQQHI4.js} +15 -15
  99. package/dist/chunks/{learn-5KKZ4ZFX.js → learn-N2FNKNCW.js} +13 -13
  100. package/dist/chunks/{learn-builtin-MSUF4MEJ.js → learn-builtin-3SQNWE77.js} +16 -16
  101. package/dist/chunks/{lifecycle-TZU6D46R.js → lifecycle-TIEMDICJ.js} +23 -23
  102. package/dist/chunks/{list-QCWNMQED.js → list-HGGKMHPQ.js} +10 -10
  103. package/dist/chunks/{live-V7HRF5KR.js → live-JHNWMJIE.js} +11 -11
  104. package/dist/chunks/{login-QFP3PIXG.js → login-CLFAZ2WB.js} +8 -8
  105. package/dist/chunks/{logs-XTXMS4JF.js → logs-A5HZQ3XA.js} +4 -4
  106. package/dist/chunks/{mcp-WQFJJ4NO.js → mcp-V27XPHVU.js} +15 -15
  107. package/dist/chunks/{message-command-QVNUJN47.js → message-command-HBTDJ6WS.js} +35 -35
  108. package/dist/chunks/{operator-tools-2OYRNPCH.js → operator-tools-7YJWXVYR.js} +13 -13
  109. package/dist/chunks/{output-schema-ETVPLUXE.js → output-schema-NEJ27MH6.js} +3 -3
  110. package/dist/chunks/{pal-BYFZCLE2.js → pal-LX2FA7N2.js} +11 -11
  111. package/dist/chunks/{plain-report-73WHPLHX.js → plain-report-IOYN4O6N.js} +10 -2
  112. package/dist/chunks/{plain-report-73WHPLHX.js.map → plain-report-IOYN4O6N.js.map} +2 -2
  113. package/dist/chunks/{providers-KP5JHTTK.js → providers-XRDUL4OO.js} +6 -6
  114. package/dist/chunks/{resident-BROBTK35.js → resident-T6QB5MX7.js} +23 -23
  115. package/dist/chunks/resume-YPKHTYLO.js +23 -0
  116. package/dist/chunks/{resume-command-OKJ2MJPB.js → resume-command-VSFQAVVN.js} +4 -4
  117. package/dist/chunks/{schedule-TVR3FE32.js → schedule-GCBVV54F.js} +8 -8
  118. package/dist/chunks/{service-6A3TOQKV.js → service-UQPEAJKT.js} +22 -22
  119. package/dist/chunks/{session-step-N4GHA2YE.js → session-step-OKCO6S7R.js} +15 -15
  120. package/dist/chunks/{skills-WXYSPDKL.js → skills-LCTXKJCR.js} +8 -8
  121. package/dist/chunks/{start-check-BUCN5MCU.js → start-check-NAACA6IE.js} +2 -2
  122. package/dist/chunks/{state-PVAVIXHK.js → state-GNWJY3F2.js} +2 -2
  123. package/dist/chunks/{store-D3XUEEAF.js → store-44ZZJVF3.js} +6 -6
  124. package/dist/chunks/{store-NB3KR4XA.js → store-7ZXMZ6ES.js} +10 -10
  125. package/dist/chunks/{store-O3KC2PPZ.js → store-KGH5U7KF.js} +4 -4
  126. package/dist/chunks/{tui-2XOSCALL.js → tui-TNCMJCJJ.js} +387 -161
  127. package/dist/chunks/tui-TNCMJCJJ.js.map +6 -0
  128. package/dist/chunks/{upgrade-FY5ULZQF.js → upgrade-DU4I5ACF.js} +6 -6
  129. package/dist/chunks/{worktree-MVW62U5G.js → worktree-XGJCKZQJ.js} +12 -12
  130. package/dist/config/load.d.ts.map +1 -1
  131. package/dist/config/schema.d.ts +7 -0
  132. package/dist/config/schema.d.ts.map +1 -1
  133. package/dist/index.js +15 -15
  134. package/dist/integrations/mcp/servers.d.ts +37 -2
  135. package/dist/integrations/mcp/servers.d.ts.map +1 -1
  136. package/dist/integrations/resident/runner-worker.js +20 -20
  137. package/dist/integrations/small-model/side-model.d.ts +13 -0
  138. package/dist/integrations/small-model/side-model.d.ts.map +1 -1
  139. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  140. package/dist/integrations/subagents/failure-words.d.ts +2 -0
  141. package/dist/integrations/subagents/failure-words.d.ts.map +1 -0
  142. package/dist/integrations/subagents/fork.d.ts +29 -0
  143. package/dist/integrations/subagents/fork.d.ts.map +1 -0
  144. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  145. package/dist/tui/App.d.ts +2 -0
  146. package/dist/tui/App.d.ts.map +1 -1
  147. package/dist/tui/Composer.d.ts +14 -4
  148. package/dist/tui/Composer.d.ts.map +1 -1
  149. package/dist/tui/ResumePicker.d.ts.map +1 -1
  150. package/dist/tui/agent.d.ts +15 -0
  151. package/dist/tui/agent.d.ts.map +1 -1
  152. package/dist/tui/composer-undo.d.ts +31 -0
  153. package/dist/tui/composer-undo.d.ts.map +1 -0
  154. package/dist/tui/external-editor.d.ts +5 -1
  155. package/dist/tui/external-editor.d.ts.map +1 -1
  156. package/dist/tui/keymap.d.ts +152 -0
  157. package/dist/tui/keymap.d.ts.map +1 -0
  158. package/dist/tui/self-mending-pause-row.d.ts +17 -0
  159. package/dist/tui/self-mending-pause-row.d.ts.map +1 -0
  160. package/dist/tui/slashCommands.d.ts +2 -0
  161. package/dist/tui/slashCommands.d.ts.map +1 -1
  162. package/dist/tui/tool-server-rows.d.ts +23 -0
  163. package/dist/tui/tool-server-rows.d.ts.map +1 -0
  164. package/dist/user-commands/store.d.ts.map +1 -1
  165. package/package.json +3 -3
  166. package/dist/chunks/agent-session-3MUZCWQ4.js +0 -58
  167. package/dist/chunks/chunk-7E3V7NNN.js.map +0 -6
  168. package/dist/chunks/chunk-A4CKLHKM.js.map +0 -6
  169. package/dist/chunks/chunk-F6WVRMVY.js.map +0 -6
  170. package/dist/chunks/chunk-JXT47VT6.js.map +0 -6
  171. package/dist/chunks/resume-7V44GSEU.js +0 -23
  172. package/dist/chunks/tui-2XOSCALL.js.map +0 -6
  173. /package/dist/chunks/{acp-ADQ2PRAY.js.map → acp-GKYFK7VQ.js.map} +0 -0
  174. /package/dist/chunks/{activity-command-JROQLBPA.js.map → activity-command-TOTM3MOY.js.map} +0 -0
  175. /package/dist/chunks/{add-ILLLF6YP.js.map → add-4GRA6X5I.js.map} +0 -0
  176. /package/dist/chunks/{agent-YQI5KOPV.js.map → agent-KEI53I7S.js.map} +0 -0
  177. /package/dist/chunks/{agent-session-3MUZCWQ4.js.map → agent-session-4IF5H4YO.js.map} +0 -0
  178. /package/dist/chunks/{archive-55KJKGJB.js.map → archive-OOQMVBUH.js.map} +0 -0
  179. /package/dist/chunks/{bin-main-332F5KRZ.js.map → bin-main-L67SJQV2.js.map} +0 -0
  180. /package/dist/chunks/{browser-C6AOJ3CH.js.map → browser-GDIYUWKT.js.map} +0 -0
  181. /package/dist/chunks/{chat-45H5F3KI.js.map → chat-FUQOCA7Q.js.map} +0 -0
  182. /package/dist/chunks/{chunk-SRYIMLOK.js.map → chunk-2C5QF5ZM.js.map} +0 -0
  183. /package/dist/chunks/{chunk-BRKD6FMO.js.map → chunk-2R44UHEU.js.map} +0 -0
  184. /package/dist/chunks/{chunk-URJ7TITR.js.map → chunk-2S4VEEVB.js.map} +0 -0
  185. /package/dist/chunks/{chunk-6GBZAUYW.js.map → chunk-4V2V2FMP.js.map} +0 -0
  186. /package/dist/chunks/{chunk-ESZ7X37S.js.map → chunk-54TFQUPM.js.map} +0 -0
  187. /package/dist/chunks/{chunk-R2LYGFCI.js.map → chunk-5QCBUBKO.js.map} +0 -0
  188. /package/dist/chunks/{chunk-FMEGRBJP.js.map → chunk-6G3XZZRF.js.map} +0 -0
  189. /package/dist/chunks/{chunk-XMOKHCPV.js.map → chunk-6WK7YVAX.js.map} +0 -0
  190. /package/dist/chunks/{chunk-5XWMKWQQ.js.map → chunk-752S5IP3.js.map} +0 -0
  191. /package/dist/chunks/{chunk-J4IES4SO.js.map → chunk-7WQS7BP2.js.map} +0 -0
  192. /package/dist/chunks/{chunk-IQQ6TY4W.js.map → chunk-AEZ7YTIJ.js.map} +0 -0
  193. /package/dist/chunks/{chunk-HOIDWHGC.js.map → chunk-B4I264HC.js.map} +0 -0
  194. /package/dist/chunks/{chunk-Y2DZ27P6.js.map → chunk-BBERAGUX.js.map} +0 -0
  195. /package/dist/chunks/{chunk-4IIEEOCA.js.map → chunk-BHW43OKH.js.map} +0 -0
  196. /package/dist/chunks/{chunk-M46GKTOI.js.map → chunk-CD5X75DB.js.map} +0 -0
  197. /package/dist/chunks/{chunk-L3QW53QL.js.map → chunk-DABNNT6R.js.map} +0 -0
  198. /package/dist/chunks/{chunk-K6LLMOB2.js.map → chunk-DXTK4EMM.js.map} +0 -0
  199. /package/dist/chunks/{chunk-BDLDDNNO.js.map → chunk-EADX2OKC.js.map} +0 -0
  200. /package/dist/chunks/{chunk-3LNTQLQ4.js.map → chunk-EDP5FDN4.js.map} +0 -0
  201. /package/dist/chunks/{chunk-6PNBIMWH.js.map → chunk-EM5AM5BR.js.map} +0 -0
  202. /package/dist/chunks/{chunk-WHOSI6UQ.js.map → chunk-FFXSL2SL.js.map} +0 -0
  203. /package/dist/chunks/{chunk-W2PJ6ZHY.js.map → chunk-GURZ2GEB.js.map} +0 -0
  204. /package/dist/chunks/{chunk-RVSVVL6O.js.map → chunk-HAAL3DME.js.map} +0 -0
  205. /package/dist/chunks/{chunk-S4KDR6G5.js.map → chunk-I7FY5SK5.js.map} +0 -0
  206. /package/dist/chunks/{chunk-YVIM3MXU.js.map → chunk-IJUCXVG5.js.map} +0 -0
  207. /package/dist/chunks/{chunk-QWBR6FBY.js.map → chunk-IY7XWRXE.js.map} +0 -0
  208. /package/dist/chunks/{chunk-6LVWHXT6.js.map → chunk-LAQTQNQE.js.map} +0 -0
  209. /package/dist/chunks/{chunk-YPHXWFKQ.js.map → chunk-LCVRXUEV.js.map} +0 -0
  210. /package/dist/chunks/{chunk-QUELENQP.js.map → chunk-LWPTVYRU.js.map} +0 -0
  211. /package/dist/chunks/{chunk-TW5BCDA5.js.map → chunk-M3RKXXZE.js.map} +0 -0
  212. /package/dist/chunks/{chunk-N56FVHCU.js.map → chunk-MJRLJDNK.js.map} +0 -0
  213. /package/dist/chunks/{chunk-SNC5D5UG.js.map → chunk-N4DS6G4I.js.map} +0 -0
  214. /package/dist/chunks/{chunk-35VTE7V5.js.map → chunk-NJ6P3WPZ.js.map} +0 -0
  215. /package/dist/chunks/{chunk-EWSIGY2A.js.map → chunk-NOG4Z42R.js.map} +0 -0
  216. /package/dist/chunks/{chunk-DLL2FPUY.js.map → chunk-NWW46AII.js.map} +0 -0
  217. /package/dist/chunks/{chunk-YM4DUQ3P.js.map → chunk-NXM3BLL4.js.map} +0 -0
  218. /package/dist/chunks/{chunk-23NRJ2RC.js.map → chunk-OIOA7BRC.js.map} +0 -0
  219. /package/dist/chunks/{chunk-FSKJ3EZC.js.map → chunk-OK4UNUNI.js.map} +0 -0
  220. /package/dist/chunks/{chunk-AZPS37AQ.js.map → chunk-OUGL6FI2.js.map} +0 -0
  221. /package/dist/chunks/{chunk-SIWZZF4M.js.map → chunk-P73IFAYM.js.map} +0 -0
  222. /package/dist/chunks/{chunk-Y74CPWYC.js.map → chunk-PXSTTFI7.js.map} +0 -0
  223. /package/dist/chunks/{chunk-HO2ZUI5Y.js.map → chunk-RHT52Z5X.js.map} +0 -0
  224. /package/dist/chunks/{chunk-4NO5XFK2.js.map → chunk-SM377CLQ.js.map} +0 -0
  225. /package/dist/chunks/{chunk-XXUL6HHM.js.map → chunk-TAAAO6PM.js.map} +0 -0
  226. /package/dist/chunks/{chunk-RGVJHSMU.js.map → chunk-TIBFEO2R.js.map} +0 -0
  227. /package/dist/chunks/{chunk-XGVCAMNT.js.map → chunk-TYMIKXOD.js.map} +0 -0
  228. /package/dist/chunks/{chunk-CW2N2QS2.js.map → chunk-TZQT5JL3.js.map} +0 -0
  229. /package/dist/chunks/{chunk-Y3I7AAD6.js.map → chunk-UB5YVQJM.js.map} +0 -0
  230. /package/dist/chunks/{chunk-6S4R2USK.js.map → chunk-UPXD4LJ5.js.map} +0 -0
  231. /package/dist/chunks/{chunk-N3C5X6BW.js.map → chunk-V5YIGRUD.js.map} +0 -0
  232. /package/dist/chunks/{chunk-QT6KYBCC.js.map → chunk-VNFXDLKD.js.map} +0 -0
  233. /package/dist/chunks/{chunk-HXAWIWOZ.js.map → chunk-VNK6EA2D.js.map} +0 -0
  234. /package/dist/chunks/{chunk-JD2HLKFO.js.map → chunk-VRUEY647.js.map} +0 -0
  235. /package/dist/chunks/{chunk-HQZ3GBQI.js.map → chunk-VTU23NBS.js.map} +0 -0
  236. /package/dist/chunks/{chunk-QRGO6R2O.js.map → chunk-VWNLO4OM.js.map} +0 -0
  237. /package/dist/chunks/{chunk-YP7AINGL.js.map → chunk-W6Z7RNVL.js.map} +0 -0
  238. /package/dist/chunks/{chunk-4TS6ZPOZ.js.map → chunk-W6ZZLT64.js.map} +0 -0
  239. /package/dist/chunks/{chunk-XCMCPWMB.js.map → chunk-WQDMDSPW.js.map} +0 -0
  240. /package/dist/chunks/{chunk-A3AF5WXZ.js.map → chunk-XGOM2KHV.js.map} +0 -0
  241. /package/dist/chunks/{chunk-N4OY22M2.js.map → chunk-XZPLOQBA.js.map} +0 -0
  242. /package/dist/chunks/{chunk-HOY7BUGW.js.map → chunk-Z3VSDOCX.js.map} +0 -0
  243. /package/dist/chunks/{cli-runtime-HW6GQKC6.js.map → cli-runtime-Y6RGQSMF.js.map} +0 -0
  244. /package/dist/chunks/{commands-JZT6JJY5.js.map → commands-4ZTQFX2X.js.map} +0 -0
  245. /package/dist/chunks/{crash-report-TWMWHNKY.js.map → crash-report-Y6U6CH73.js.map} +0 -0
  246. /package/dist/chunks/{dist-POSMI3PI.js.map → dist-3YHUITAK.js.map} +0 -0
  247. /package/dist/chunks/{dist-AZ5T257L.js.map → dist-GTK2JZSU.js.map} +0 -0
  248. /package/dist/chunks/{dist-MVLQAON2.js.map → dist-J36EH26G.js.map} +0 -0
  249. /package/dist/chunks/{dist-K5JIOWIQ.js.map → dist-OKRQSUWC.js.map} +0 -0
  250. /package/dist/chunks/{dist-4EGZFRWY.js.map → dist-TKVIIUPJ.js.map} +0 -0
  251. /package/dist/chunks/{dist-6ORFQIRV.js.map → dist-XP72U44M.js.map} +0 -0
  252. /package/dist/chunks/{dist-CLKFY67B.js.map → dist-ZNMZHP7A.js.map} +0 -0
  253. /package/dist/chunks/{doctor-UVZBNUNF.js.map → doctor-WKZ7BGFC.js.map} +0 -0
  254. /package/dist/chunks/{drain-27E6XUNK.js.map → drain-VOM6IT3C.js.map} +0 -0
  255. /package/dist/chunks/{eval-NRRIWDET.js.map → eval-7MDLH5UR.js.map} +0 -0
  256. /package/dist/chunks/{exec-KX46LZ36.js.map → exec-YBTNNBSS.js.map} +0 -0
  257. /package/dist/chunks/{home-RT2I6VTQ.js.map → home-UID64VNR.js.map} +0 -0
  258. /package/dist/chunks/{host-queries-ZXGOA6ZL.js.map → host-queries-A3XQQHI4.js.map} +0 -0
  259. /package/dist/chunks/{learn-5KKZ4ZFX.js.map → learn-N2FNKNCW.js.map} +0 -0
  260. /package/dist/chunks/{learn-builtin-MSUF4MEJ.js.map → learn-builtin-3SQNWE77.js.map} +0 -0
  261. /package/dist/chunks/{lifecycle-TZU6D46R.js.map → lifecycle-TIEMDICJ.js.map} +0 -0
  262. /package/dist/chunks/{list-QCWNMQED.js.map → list-HGGKMHPQ.js.map} +0 -0
  263. /package/dist/chunks/{live-V7HRF5KR.js.map → live-JHNWMJIE.js.map} +0 -0
  264. /package/dist/chunks/{login-QFP3PIXG.js.map → login-CLFAZ2WB.js.map} +0 -0
  265. /package/dist/chunks/{logs-XTXMS4JF.js.map → logs-A5HZQ3XA.js.map} +0 -0
  266. /package/dist/chunks/{mcp-WQFJJ4NO.js.map → mcp-V27XPHVU.js.map} +0 -0
  267. /package/dist/chunks/{message-command-QVNUJN47.js.map → message-command-HBTDJ6WS.js.map} +0 -0
  268. /package/dist/chunks/{operator-tools-2OYRNPCH.js.map → operator-tools-7YJWXVYR.js.map} +0 -0
  269. /package/dist/chunks/{output-schema-ETVPLUXE.js.map → output-schema-NEJ27MH6.js.map} +0 -0
  270. /package/dist/chunks/{pal-BYFZCLE2.js.map → pal-LX2FA7N2.js.map} +0 -0
  271. /package/dist/chunks/{providers-KP5JHTTK.js.map → providers-XRDUL4OO.js.map} +0 -0
  272. /package/dist/chunks/{resident-BROBTK35.js.map → resident-T6QB5MX7.js.map} +0 -0
  273. /package/dist/chunks/{resume-7V44GSEU.js.map → resume-YPKHTYLO.js.map} +0 -0
  274. /package/dist/chunks/{resume-command-OKJ2MJPB.js.map → resume-command-VSFQAVVN.js.map} +0 -0
  275. /package/dist/chunks/{schedule-TVR3FE32.js.map → schedule-GCBVV54F.js.map} +0 -0
  276. /package/dist/chunks/{service-6A3TOQKV.js.map → service-UQPEAJKT.js.map} +0 -0
  277. /package/dist/chunks/{session-step-N4GHA2YE.js.map → session-step-OKCO6S7R.js.map} +0 -0
  278. /package/dist/chunks/{skills-WXYSPDKL.js.map → skills-LCTXKJCR.js.map} +0 -0
  279. /package/dist/chunks/{start-check-BUCN5MCU.js.map → start-check-NAACA6IE.js.map} +0 -0
  280. /package/dist/chunks/{state-PVAVIXHK.js.map → state-GNWJY3F2.js.map} +0 -0
  281. /package/dist/chunks/{store-D3XUEEAF.js.map → store-44ZZJVF3.js.map} +0 -0
  282. /package/dist/chunks/{store-NB3KR4XA.js.map → store-7ZXMZ6ES.js.map} +0 -0
  283. /package/dist/chunks/{store-O3KC2PPZ.js.map → store-KGH5U7KF.js.map} +0 -0
  284. /package/dist/chunks/{upgrade-FY5ULZQF.js.map → upgrade-DU4I5ACF.js.map} +0 -0
  285. /package/dist/chunks/{worktree-MVW62U5G.js.map → worktree-XGJCKZQJ.js.map} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  confirmationView,
12
12
  describeChanges,
13
13
  permissionsChanged
14
- } from "./chunk-K6LLMOB2.js";
14
+ } from "./chunk-DXTK4EMM.js";
15
15
  import {
16
16
  visibleScheduleMessage
17
17
  } from "./chunk-NADQQMMG.js";
@@ -27,11 +27,16 @@ import {
27
27
  describeReducedMotion,
28
28
  discoverUserCommands,
29
29
  hostCommandNames,
30
+ isAction,
31
+ isChordAction,
32
+ isChordLead,
30
33
  kernelCommandDescriptors,
31
34
  matchSlashCommands,
32
35
  mergeHostCommands,
33
36
  motionAllowed,
34
37
  parseSlash,
38
+ pressedKeyLabel,
39
+ primaryKeyLabel,
35
40
  queryTerminalBackground,
36
41
  reducedMotion,
37
42
  renderAgents,
@@ -47,19 +52,20 @@ import {
47
52
  setThemePreview,
48
53
  setThemeSetting,
49
54
  shownTheme,
55
+ toolServerRow,
50
56
  turnLimitCommands,
51
57
  useReducedMotion,
52
58
  useThemeEpoch,
53
59
  useThemeSubscription
54
- } from "./chunk-JXT47VT6.js";
60
+ } from "./chunk-BNYTG2ZC.js";
55
61
  import {
56
62
  handleTerminationSignals
57
- } from "./chunk-YPHXWFKQ.js";
63
+ } from "./chunk-LCVRXUEV.js";
58
64
  import "./chunk-TBIX6JRE.js";
59
65
  import {
60
66
  deleteUserConfigValue,
61
67
  setUserConfigValue
62
- } from "./chunk-EWSIGY2A.js";
68
+ } from "./chunk-NOG4Z42R.js";
63
69
  import {
64
70
  describeAllCredentialsLogout,
65
71
  describeCodexDeviceLoginStart,
@@ -69,13 +75,13 @@ import {
69
75
  } from "./chunk-JV3LONAU.js";
70
76
  import {
71
77
  settleAnsweredPark
72
- } from "./chunk-3LNTQLQ4.js";
78
+ } from "./chunk-EDP5FDN4.js";
73
79
  import "./chunk-GWQEMJFS.js";
74
80
  import {
75
81
  DELIVERY_READ_LIMIT,
76
82
  readSourceDeliveryPage,
77
83
  takeSuppressedCount
78
- } from "./chunk-SNC5D5UG.js";
84
+ } from "./chunk-N4DS6G4I.js";
79
85
  import {
80
86
  DEFAULT_MAX_ITERATIONS,
81
87
  DEFAULT_TIMEOUT_MS,
@@ -88,7 +94,7 @@ import {
88
94
  runsPerDay,
89
95
  scriptShellUnavailableReason,
90
96
  verifyScheduledScript
91
- } from "./chunk-XCMCPWMB.js";
97
+ } from "./chunk-WQDMDSPW.js";
92
98
  import {
93
99
  callsCount
94
100
  } from "./chunk-E5VLANCO.js";
@@ -97,32 +103,32 @@ import {
97
103
  compileJobPolicy,
98
104
  compileScriptCheckPolicy,
99
105
  isPresetName
100
- } from "./chunk-R2LYGFCI.js";
101
- import "./chunk-AZPS37AQ.js";
106
+ } from "./chunk-5QCBUBKO.js";
107
+ import "./chunk-OUGL6FI2.js";
102
108
  import {
103
109
  formatResumeShellCommand,
104
110
  parkedRunWords,
105
111
  resumeCommand
106
- } from "./chunk-FSKJ3EZC.js";
112
+ } from "./chunk-OK4UNUNI.js";
107
113
  import {
108
114
  appendHistory,
109
115
  nextFireOf,
110
116
  readHistory,
111
117
  readState
112
- } from "./chunk-6GBZAUYW.js";
118
+ } from "./chunk-4V2V2FMP.js";
113
119
  import {
114
120
  callEndpoint,
115
121
  readEndpoint
116
122
  } from "./chunk-6YG7D7U4.js";
117
123
  import {
118
124
  reportCrash
119
- } from "./chunk-RGVJHSMU.js";
125
+ } from "./chunk-TIBFEO2R.js";
120
126
  import {
121
127
  BYPASS_CONSENT_BODY,
122
128
  BYPASS_CONSENT_TITLE,
123
129
  acknowledgeBypass,
124
130
  hasAcknowledgedBypass
125
- } from "./chunk-35VTE7V5.js";
131
+ } from "./chunk-NJ6P3WPZ.js";
126
132
  import {
127
133
  applyFallbackFlag,
128
134
  capChoiceLines,
@@ -147,18 +153,18 @@ import {
147
153
  sectionHeading,
148
154
  withAutoChoice,
149
155
  writeConversationExport
150
- } from "./chunk-W2PJ6ZHY.js";
156
+ } from "./chunk-GURZ2GEB.js";
151
157
  import {
152
158
  tuiPalDefinition,
153
159
  tuiPalEnvironment,
154
160
  tuiPalOwner,
155
161
  tuiPalPreferences
156
- } from "./chunk-23NRJ2RC.js";
162
+ } from "./chunk-OIOA7BRC.js";
157
163
  import {
158
164
  isModelOnlyContext,
159
165
  runtimeContextLabel
160
166
  } from "./chunk-3F3V2PB7.js";
161
- import "./chunk-6LVWHXT6.js";
167
+ import "./chunk-LAQTQNQE.js";
162
168
  import {
163
169
  COMPACTED_HINT,
164
170
  COMPACTING_LABEL,
@@ -238,16 +244,16 @@ import {
238
244
  webLiveStatus,
239
245
  webSettledLine,
240
246
  withDebugDetail
241
- } from "./chunk-F6WVRMVY.js";
247
+ } from "./chunk-3SQVE73V.js";
242
248
  import {
243
249
  openManagedWorktrees,
244
250
  worktreeOpenHint
245
- } from "./chunk-Y3I7AAD6.js";
246
- import "./chunk-A4CKLHKM.js";
251
+ } from "./chunk-UB5YVQJM.js";
252
+ import "./chunk-XV3FGIHS.js";
247
253
  import {
248
254
  openInBrowser
249
- } from "./chunk-4NO5XFK2.js";
250
- import "./chunk-6S4R2USK.js";
255
+ } from "./chunk-SM377CLQ.js";
256
+ import "./chunk-UPXD4LJ5.js";
251
257
  import {
252
258
  SAVE_SKILL_TOOL_NAME,
253
259
  SKILL_CREATOR_SKILL,
@@ -272,9 +278,9 @@ import {
272
278
  settledElapsed,
273
279
  theme,
274
280
  tokenColor
275
- } from "./chunk-S4KDR6G5.js";
276
- import "./chunk-QT6KYBCC.js";
277
- import "./chunk-N3C5X6BW.js";
281
+ } from "./chunk-I7FY5SK5.js";
282
+ import "./chunk-VNFXDLKD.js";
283
+ import "./chunk-V5YIGRUD.js";
278
284
  import {
279
285
  describeBrowserStatus
280
286
  } from "./chunk-WHODOMXA.js";
@@ -283,13 +289,13 @@ import {
283
289
  describeProviderWait,
284
290
  describeProviderWaitClock,
285
291
  isSelfMending
286
- } from "./chunk-4IIEEOCA.js";
292
+ } from "./chunk-BHW43OKH.js";
287
293
  import "./chunk-NUGPLXVK.js";
288
294
  import {
289
295
  beginCodexDeviceLogin,
290
296
  beginSubscriptionLogin,
291
297
  parsePastedInput
292
- } from "./chunk-CW2N2QS2.js";
298
+ } from "./chunk-TZQT5JL3.js";
293
299
  import {
294
300
  NO_SKILLS_FOUND,
295
301
  composeSkillsPrompt,
@@ -297,24 +303,24 @@ import {
297
303
  loadSkillBody,
298
304
  renderSkillRoster,
299
305
  skillTierLabel
300
- } from "./chunk-QRGO6R2O.js";
301
- import "./chunk-RVSVVL6O.js";
302
- import "./chunk-HOIDWHGC.js";
306
+ } from "./chunk-VWNLO4OM.js";
307
+ import "./chunk-HAAL3DME.js";
308
+ import "./chunk-B4I264HC.js";
303
309
  import {
304
310
  claimPalConversation,
305
311
  listPalConversations
306
- } from "./chunk-QUELENQP.js";
312
+ } from "./chunk-LWPTVYRU.js";
307
313
  import "./chunk-ZWA2JRJV.js";
308
314
  import {
309
315
  startAutoUpdate
310
- } from "./chunk-4TS6ZPOZ.js";
316
+ } from "./chunk-W6ZZLT64.js";
311
317
  import {
312
318
  resolveNpmInvocation
313
- } from "./chunk-HO2ZUI5Y.js";
319
+ } from "./chunk-RHT52Z5X.js";
314
320
  import {
315
321
  readManifest
316
322
  } from "./chunk-AK2U3N2A.js";
317
- import "./chunk-YM4DUQ3P.js";
323
+ import "./chunk-NXM3BLL4.js";
318
324
  import {
319
325
  ScheduleConflictError,
320
326
  confirmationHolds,
@@ -336,7 +342,7 @@ import {
336
342
  describeCacheLifetime,
337
343
  promptCacheTtl,
338
344
  providerOffersCacheLifetime
339
- } from "./chunk-N56FVHCU.js";
345
+ } from "./chunk-MJRLJDNK.js";
340
346
  import {
341
347
  debugRequested
342
348
  } from "./chunk-GNBMKISG.js";
@@ -358,7 +364,7 @@ import {
358
364
  pendingServersMessage,
359
365
  readPermissionLayers,
360
366
  resolveComposerTriggers
361
- } from "./chunk-GOGBOZKO.js";
367
+ } from "./chunk-ODOM3I7B.js";
362
368
  import "./chunk-KONYGNG6.js";
363
369
  import "./chunk-LCGXWCVU.js";
364
370
  import {
@@ -386,7 +392,7 @@ import {
386
392
  primaryProvider,
387
393
  signedInSubscriptionProviders,
388
394
  writePreferences
389
- } from "./chunk-Y74CPWYC.js";
395
+ } from "./chunk-PXSTTFI7.js";
390
396
  import {
391
397
  ALL_PROVIDER_IDS,
392
398
  PROVIDER_REGISTRY,
@@ -396,22 +402,22 @@ import {
396
402
  } from "./chunk-6LLJQ3KY.js";
397
403
  import {
398
404
  applyProviderFlags
399
- } from "./chunk-5XWMKWQQ.js";
405
+ } from "./chunk-752S5IP3.js";
400
406
  import "./chunk-XEUQN4JC.js";
401
- import "./chunk-HQZ3GBQI.js";
407
+ import "./chunk-VTU23NBS.js";
402
408
  import {
403
409
  PAUSED_TURN_LINES,
404
410
  currentTimeLine,
405
411
  describeTurnStop,
406
412
  handoffContinuationNote
407
- } from "./chunk-BDLDDNNO.js";
413
+ } from "./chunk-EADX2OKC.js";
408
414
  import {
409
415
  autoAvailable,
410
416
  nextCycleMode,
411
417
  permissionModeDescription,
412
418
  permissionModeLabel,
413
419
  permissionModeName
414
- } from "./chunk-J4IES4SO.js";
420
+ } from "./chunk-7WQS7BP2.js";
415
421
  import {
416
422
  expandTabs,
417
423
  terminalDisplayText
@@ -440,23 +446,23 @@ import {
440
446
  typedTextOf,
441
447
  unansweredReviewPark,
442
448
  unarchiveConversation
443
- } from "./chunk-QWBR6FBY.js";
444
- import "./chunk-IQQ6TY4W.js";
449
+ } from "./chunk-IY7XWRXE.js";
450
+ import "./chunk-AEZ7YTIJ.js";
445
451
  import "./chunk-JQIBPPOL.js";
446
- import "./chunk-FMEGRBJP.js";
447
- import "./chunk-ESZ7X37S.js";
452
+ import "./chunk-6G3XZZRF.js";
453
+ import "./chunk-54TFQUPM.js";
448
454
  import {
449
455
  isTrusted,
450
456
  trustDir
451
- } from "./chunk-M46GKTOI.js";
457
+ } from "./chunk-CD5X75DB.js";
452
458
  import "./chunk-LXB3S4IC.js";
453
459
  import "./chunk-OH6TB27S.js";
454
- import "./chunk-HOY7BUGW.js";
460
+ import "./chunk-Z3VSDOCX.js";
455
461
  import "./chunk-WMEZTDLT.js";
456
462
  import {
457
463
  contextLogging,
458
464
  installCliLogging
459
- } from "./chunk-JD2HLKFO.js";
465
+ } from "./chunk-VRUEY647.js";
460
466
  import {
461
467
  PROJECT_MCP_FILE,
462
468
  parseMcpServerFile
@@ -469,7 +475,7 @@ import {
469
475
  } from "./chunk-U5UV2YRE.js";
470
476
  import "./chunk-IE5XIE4W.js";
471
477
  import "./chunk-B73OIFL6.js";
472
- import "./chunk-DLL2FPUY.js";
478
+ import "./chunk-NWW46AII.js";
473
479
  import "./chunk-JORONMD3.js";
474
480
  import {
475
481
  clearAllStoredCredentials,
@@ -483,10 +489,10 @@ import {
483
489
  readStoredSubscriptionCredential,
484
490
  restrictToOwner,
485
491
  writeStoredGeminiApiKey
486
- } from "./chunk-BRKD6FMO.js";
492
+ } from "./chunk-2R44UHEU.js";
487
493
  import {
488
494
  namzuHomePath
489
- } from "./chunk-YVIM3MXU.js";
495
+ } from "./chunk-IJUCXVG5.js";
490
496
  import {
491
497
  ACCEPT_EDITS_TOOLS,
492
498
  DECLINED_TOOL_CALL_FEEDBACK,
@@ -547,7 +553,7 @@ import {
547
553
  validateTimeZone,
548
554
  wrapUntrusted,
549
555
  writePeerRecord
550
- } from "./chunk-7E3V7NNN.js";
556
+ } from "./chunk-GNG6HJIV.js";
551
557
  import {
552
558
  __commonJS,
553
559
  __export,
@@ -40201,16 +40207,34 @@ function nextQueuedHintEpisode(previous, wanted) {
40201
40207
  }
40202
40208
  __name(nextQueuedHintEpisode, "nextQueuedHintEpisode");
40203
40209
 
40204
- // src/tui/foreground-handoff.ts
40205
- function backgroundHint(env3 = process.env) {
40206
- const inTmux = env3.TMUX !== void 0 && env3.TMUX !== "";
40207
- return inTmux ? "(ctrl+b ctrl+b (twice) to run in background)" : "(ctrl+b to run in background)";
40208
- }
40209
- __name(backgroundHint, "backgroundHint");
40210
- function isBackgroundChord(input, key) {
40211
- return key.ctrl && input === "b";
40210
+ // src/tui/composer-undo.ts
40211
+ var UNDO_LIMIT = 50;
40212
+ function createUndoStack(limit = UNDO_LIMIT) {
40213
+ const items = [];
40214
+ let runEnd = null;
40215
+ return {
40216
+ record(before, after, typed) {
40217
+ const continuesRun = typed !== null && runEnd === before.value && !/\s/u.test(typed);
40218
+ if (!continuesRun) {
40219
+ items.push(before);
40220
+ if (items.length > limit) items.shift();
40221
+ }
40222
+ runEnd = typed !== null && !/\s/u.test(typed) ? after : null;
40223
+ },
40224
+ undo() {
40225
+ runEnd = null;
40226
+ return items.pop();
40227
+ },
40228
+ clear() {
40229
+ items.length = 0;
40230
+ runEnd = null;
40231
+ },
40232
+ get size() {
40233
+ return items.length;
40234
+ }
40235
+ };
40212
40236
  }
40213
- __name(isBackgroundChord, "isBackgroundChord");
40237
+ __name(createUndoStack, "createUndoStack");
40214
40238
 
40215
40239
  // src/tui/mentions.ts
40216
40240
  import { execFile as execFile2 } from "node:child_process";
@@ -41524,6 +41548,9 @@ __name(overrideMap, "overrideMap");
41524
41548
  // src/tui/Composer.tsx
41525
41549
  var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
41526
41550
  var ESC_CLEAR_KEY = "escape-again-to-clear";
41551
+ var STASH_KEY = "draft-stash";
41552
+ var STASH_NOTICE_MS = 3e3;
41553
+ var STASH_RESTORED_NOTICE_MS = 5e3;
41527
41554
  var ESC_CLEAR_WINDOW_MS = 800;
41528
41555
  var ESC_CLEAR_NOTICE_MS = 1e3;
41529
41556
  var REWIND_DOUBLE_ESC_MS = 800;
@@ -41754,6 +41781,7 @@ function Composer({
41754
41781
  onClearedDraft,
41755
41782
  onStepReasoningEffort,
41756
41783
  onExternalEdit,
41784
+ onToggleThinking,
41757
41785
  onEditPrevious,
41758
41786
  draftToRestore = null,
41759
41787
  onDraftRestored,
@@ -41944,6 +41972,15 @@ function Composer({
41944
41972
  else if (nearest.state === "suggested") setOverride(nearest, "armed");
41945
41973
  else setOverride(nearest, "dropped");
41946
41974
  }, "toggleNearestTrigger");
41975
+ const undoRef = (0, import_react40.useRef)(createUndoStack());
41976
+ const stashRef = (0, import_react40.useRef)(null);
41977
+ const recordUndo = (0, import_react40.useCallback)((after, typed) => {
41978
+ undoRef.current.record(
41979
+ { value: valueRef.current, cursor: cursorRef.current, spans: spansRef.current },
41980
+ after,
41981
+ typed
41982
+ );
41983
+ }, []);
41947
41984
  const editBuffer = (0, import_react40.useCallback)(
41948
41985
  (nextValue, nextCursor = nextValue.length, origin = "typed") => {
41949
41986
  verticalColumnRef.current = null;
@@ -41951,14 +41988,20 @@ function Composer({
41951
41988
  setHistorySearch(null);
41952
41989
  setHistoryIndex(-1);
41953
41990
  const edit = diffEdit(valueRef.current, nextValue, cursorRef.current);
41991
+ const inserted = nextValue.slice(edit.start, edit.start + edit.insertLength);
41992
+ recordUndo(
41993
+ nextValue,
41994
+ origin === "typed" && edit.deleteEnd === edit.start && inserted.length > 0 ? inserted : null
41995
+ );
41954
41996
  const spans = applyEdit(spansRef.current, edit, origin);
41955
41997
  const overrides = shiftOverrides(overridesRef.current, edit);
41956
41998
  setBuffer(nextValue, nextCursor, origin, spans);
41957
41999
  overridesRef.current = overrides;
41958
42000
  },
41959
- [setBuffer, setHistoryIndex, setHistorySearch]
42001
+ [recordUndo, setBuffer, setHistoryIndex, setHistorySearch]
41960
42002
  );
41961
42003
  const reset = (0, import_react40.useCallback)(() => {
42004
+ undoRef.current.clear();
41962
42005
  verticalColumnRef.current = null;
41963
42006
  historyDraftRef.current = null;
41964
42007
  setHistorySearch(null);
@@ -42053,21 +42096,52 @@ function Composer({
42053
42096
  use_input_default(
42054
42097
  (input, key) => {
42055
42098
  if (disabled || hidden) return;
42099
+ const openExternalEditor = /* @__PURE__ */ __name((pressed) => {
42100
+ if (!onExternalEdit) {
42101
+ onNotice?.("External editor support is unavailable in this terminal.");
42102
+ return;
42103
+ }
42104
+ const seed = expandChips(valueRef.current, pasteStoreRef.current).trim();
42105
+ void onExternalEdit(seed, pressed).then((edited) => {
42106
+ let cleaned = edited.trimEnd();
42107
+ for (const attachment of attachmentsRef.current) {
42108
+ const chip = chipFor(attachment, idFor(attachment));
42109
+ if (!cleaned.includes(chip)) cleaned += `${cleaned ? " " : ""}${chip}`;
42110
+ }
42111
+ clearPastes();
42112
+ setHistoryIndex(-1);
42113
+ setHistorySearch(null);
42114
+ setSelectedIndex(0);
42115
+ historyDraftRef.current = null;
42116
+ verticalColumnRef.current = null;
42117
+ recordUndo(cleaned, null);
42118
+ setBuffer(cleaned, cleaned.length, "editor");
42119
+ }).catch((error) => {
42120
+ onNotice?.(
42121
+ // The editor module words its own refusals for a person ("set VISUAL or EDITOR…").
42122
+ error instanceof Error && error.name === "ExternalEditorError" ? `Cannot open your editor: ${error.message}.` : explainFailure(error, "Cannot open your editor.")
42123
+ );
42124
+ });
42125
+ }, "openExternalEditor");
42056
42126
  const chordArmed = sendNowChordRef.current;
42057
42127
  sendNowChordRef.current = false;
42058
- if (key.ctrl && input === "x") {
42128
+ if (isChordLead(input, key)) {
42059
42129
  sendNowChordRef.current = true;
42060
42130
  return;
42061
42131
  }
42062
- if (isBackgroundChord(input, key) && onBackgroundCommand?.()) return;
42063
- if (chordArmed && key.ctrl && input === "s" && onSendNow) {
42132
+ if (isAction("task:background", input, key) && onBackgroundCommand?.()) return;
42133
+ if (chordArmed && isChordAction("chat:sendNow", input, key) && onSendNow) {
42064
42134
  onSendNow();
42065
42135
  return;
42066
42136
  }
42067
- if (chordArmed && key.ctrl && input === "k" && onStopAllAgents) {
42137
+ if (chordArmed && isChordAction("chat:killAgents", input, key) && onStopAllAgents) {
42068
42138
  onStopAllAgents();
42069
42139
  return;
42070
42140
  }
42141
+ if (chordArmed && isChordAction("chat:externalEditor", input, key)) {
42142
+ openExternalEditor(pressedKeyLabel("chat:externalEditor", input, key, true));
42143
+ return;
42144
+ }
42071
42145
  if (queuedEdit) {
42072
42146
  const empty = valueRef.current.length === 0 && attachmentsRef.current.length === 0;
42073
42147
  if (empty && key.return && !key.shift && !key.meta) {
@@ -42122,7 +42196,7 @@ function Composer({
42122
42196
  }
42123
42197
  return false;
42124
42198
  }, "acceptSuggestion");
42125
- if (key.meta && key.upArrow && onRecallQueued) {
42199
+ if (isAction("chat:recallQueued", input, key) && onRecallQueued) {
42126
42200
  if (valueRef.current.length > 0 || attachmentsRef.current.length > 0) {
42127
42201
  onNotice?.("Send or clear the current draft before recalling a queued message.");
42128
42202
  return;
@@ -42131,11 +42205,11 @@ function Composer({
42131
42205
  if (recalled) restoreDraft(recalled);
42132
42206
  return;
42133
42207
  }
42134
- if (!hasLiveSuggestions && onStepReasoningEffort && (key.shift && key.downArrow || key.meta && input === ",")) {
42208
+ if (!hasLiveSuggestions && onStepReasoningEffort && isAction("chat:effortLower", input, key)) {
42135
42209
  onStepReasoningEffort("lower");
42136
42210
  return;
42137
42211
  }
42138
- if (!hasLiveSuggestions && onStepReasoningEffort && (key.shift && key.upArrow || key.meta && input === ".")) {
42212
+ if (!hasLiveSuggestions && onStepReasoningEffort && isAction("chat:effortRaise", input, key)) {
42139
42213
  onStepReasoningEffort("raise");
42140
42214
  return;
42141
42215
  }
@@ -42166,9 +42240,20 @@ function Composer({
42166
42240
  onlyTriggers: armed2.length > 0 && detection2.onlyTriggers && currentAttachments.length === 0
42167
42241
  });
42168
42242
  reset();
42243
+ const stashed = stashRef.current;
42244
+ if (stashed && !message.startsWith("/")) {
42245
+ stashRef.current = null;
42246
+ restoreDraft(stashed);
42247
+ onFooterNotice?.({
42248
+ key: STASH_KEY,
42249
+ text: "Draft restored",
42250
+ priority: "immediate",
42251
+ timeoutMs: STASH_RESTORED_NOTICE_MS
42252
+ });
42253
+ }
42169
42254
  return true;
42170
42255
  }, "submit");
42171
- if (key.return && (key.shift || key.meta) || input === "\n") {
42256
+ if (isAction("chat:newline", input, key) || input === "\n") {
42172
42257
  const position2 = cursorRef.current;
42173
42258
  editBuffer(
42174
42259
  valueRef.current.slice(0, position2) + "\n" + valueRef.current.slice(position2),
@@ -42176,7 +42261,64 @@ function Composer({
42176
42261
  );
42177
42262
  return;
42178
42263
  }
42179
- if (key.ctrl && (input === "r" || input === "s")) {
42264
+ if (isAction("chat:undo", input, key)) {
42265
+ const previous = undoRef.current.undo();
42266
+ if (!previous) return;
42267
+ verticalColumnRef.current = null;
42268
+ historyDraftRef.current = null;
42269
+ setHistorySearch(null);
42270
+ setHistoryIndex(-1);
42271
+ setSelectedIndex(0);
42272
+ setBuffer(previous.value, previous.cursor, "typed", previous.spans);
42273
+ return;
42274
+ }
42275
+ const typedDraft = /* @__PURE__ */ __name(() => {
42276
+ const text = expandChips(stripAttachmentChips(valueRef.current), pasteStoreRef.current);
42277
+ if (text.trim().length === 0 && attachmentsRef.current.length === 0) return void 0;
42278
+ return {
42279
+ text,
42280
+ ...attachmentsRef.current.length ? { attachments: attachmentsRef.current } : {}
42281
+ };
42282
+ }, "typedDraft");
42283
+ if (isAction("chat:modelPicker", input, key) && !plainText) {
42284
+ const draft = typedDraft();
42285
+ onSubmit("/model", void 0, "submit", {
42286
+ source: "keybinding",
42287
+ ...draft ? { draft } : {}
42288
+ });
42289
+ return;
42290
+ }
42291
+ if (isAction("chat:thinkingToggle", input, key) && !plainText) {
42292
+ onToggleThinking?.();
42293
+ return;
42294
+ }
42295
+ if (isAction("chat:stash", input, key) && historySearchRef.current === null && !plainText) {
42296
+ const empty = valueRef.current.trim().length === 0 && attachmentsRef.current.length === 0;
42297
+ if (empty) {
42298
+ const stashed = stashRef.current;
42299
+ if (!stashed) return;
42300
+ stashRef.current = null;
42301
+ onFooterNoticeRemove?.(STASH_KEY);
42302
+ restoreDraft(stashed);
42303
+ return;
42304
+ }
42305
+ const draft = expandChips(stripAttachmentChips(valueRef.current), pasteStoreRef.current);
42306
+ const earlier = stashRef.current;
42307
+ stashRef.current = {
42308
+ text: draft,
42309
+ ...attachmentsRef.current.length ? { attachments: attachmentsRef.current } : {}
42310
+ };
42311
+ reset();
42312
+ if (earlier) restoreDraft(earlier);
42313
+ onFooterNotice?.({
42314
+ key: STASH_KEY,
42315
+ text: earlier ? `Swapped with the draft set aside \xB7 ${primaryKeyLabel("chat:stash")} to swap back` : `Draft set aside \xB7 ${primaryKeyLabel("chat:stash")} to bring it back`,
42316
+ priority: "immediate",
42317
+ timeoutMs: STASH_NOTICE_MS
42318
+ });
42319
+ return;
42320
+ }
42321
+ if (isAction("history:search", input, key) || historySearchRef.current !== null && isAction("historySearch:newer", input, key)) {
42180
42322
  verticalColumnRef.current = null;
42181
42323
  const browsedHistoryDraft = historyDraftRef.current;
42182
42324
  historyDraftRef.current = null;
@@ -42196,7 +42338,7 @@ function Composer({
42196
42338
  position: -1
42197
42339
  };
42198
42340
  }
42199
- const position2 = input === "r" ? Math.min(search.position + 1, search.matches.length - 1) : Math.max(search.position - 1, -1);
42341
+ const position2 = isAction("history:search", input, key) ? Math.min(search.position + 1, search.matches.length - 1) : Math.max(search.position - 1, -1);
42200
42342
  const next = { ...search, position: position2 };
42201
42343
  setHistorySearch(next);
42202
42344
  if (position2 < 0) setBuffer(next.draft.value, next.draft.cursor, "typed", next.draft.spans);
@@ -42215,17 +42357,17 @@ function Composer({
42215
42357
  submit("submit");
42216
42358
  return;
42217
42359
  }
42218
- if (key.tab && key.shift) {
42360
+ if (isAction("chat:cycleMode", input, key)) {
42219
42361
  onCycleMode?.();
42220
42362
  return;
42221
42363
  }
42222
- if (key.tab) {
42364
+ if (isAction("chat:queue", input, key)) {
42223
42365
  if (plainText) return;
42224
42366
  if (acceptSuggestion()) return;
42225
42367
  submit("queue");
42226
42368
  return;
42227
42369
  }
42228
- if (key.escape) {
42370
+ if (isAction("chat:cancel", input, key)) {
42229
42371
  if (escapeInterrupts) return;
42230
42372
  const activeSearch = historySearchRef.current;
42231
42373
  if (activeSearch) {
@@ -42269,7 +42411,7 @@ function Composer({
42269
42411
  });
42270
42412
  return;
42271
42413
  }
42272
- if (key.backspace && (key.meta || key.ctrl)) {
42414
+ if (isAction("edit:deleteWordBack", input, key) && key.backspace) {
42273
42415
  const source = valueRef.current;
42274
42416
  const position2 = cursorRef.current;
42275
42417
  const start = previousWordBoundary(source, position2);
@@ -42303,20 +42445,20 @@ function Composer({
42303
42445
  editBuffer(valueRef.current.slice(0, previous) + valueRef.current.slice(position2), previous);
42304
42446
  return;
42305
42447
  }
42306
- if (key.delete || key.ctrl && input === "d") {
42448
+ if (isAction("edit:deleteForward", input, key)) {
42307
42449
  const position2 = cursorRef.current;
42308
42450
  const next = nextGraphemeBoundary(valueRef.current, position2);
42309
42451
  editBuffer(valueRef.current.slice(0, position2) + valueRef.current.slice(next), position2);
42310
42452
  return;
42311
42453
  }
42312
- if (key.leftArrow && (key.meta || key.ctrl) || key.meta && input === "b") {
42454
+ if (isAction("edit:wordLeft", input, key)) {
42313
42455
  verticalColumnRef.current = null;
42314
42456
  const previous = previousWordBoundary(valueRef.current, cursorRef.current);
42315
42457
  cursorRef.current = previous;
42316
42458
  setCursorState(previous);
42317
42459
  return;
42318
42460
  }
42319
- if (key.rightArrow && (key.meta || key.ctrl) || key.meta && input === "f") {
42461
+ if (isAction("edit:wordRight", input, key)) {
42320
42462
  verticalColumnRef.current = null;
42321
42463
  const next = nextWordBoundary(valueRef.current, cursorRef.current);
42322
42464
  cursorRef.current = next;
@@ -42327,14 +42469,14 @@ function Composer({
42327
42469
  onOpenAgents();
42328
42470
  return;
42329
42471
  }
42330
- if (key.leftArrow || key.ctrl && input === "b") {
42472
+ if (isAction("edit:charLeft", input, key)) {
42331
42473
  verticalColumnRef.current = null;
42332
42474
  const previous = previousGraphemeBoundary(valueRef.current, cursorRef.current);
42333
42475
  cursorRef.current = previous;
42334
42476
  setCursorState(previous);
42335
42477
  return;
42336
42478
  }
42337
- if (key.rightArrow || key.ctrl && input === "f") {
42479
+ if (isAction("edit:charRight", input, key)) {
42338
42480
  verticalColumnRef.current = null;
42339
42481
  const next = nextGraphemeBoundary(valueRef.current, cursorRef.current);
42340
42482
  cursorRef.current = next;
@@ -42353,21 +42495,21 @@ function Composer({
42353
42495
  setSelectedIndex((index) => Math.min(liveSuggestionCount - 1, index + suggestionWindow));
42354
42496
  return;
42355
42497
  }
42356
- if (key.home || key.ctrl && input === "a") {
42498
+ if (isAction("edit:lineStart", input, key)) {
42357
42499
  verticalColumnRef.current = null;
42358
42500
  const start = lineStart(valueRef.current, cursorRef.current);
42359
42501
  cursorRef.current = start;
42360
42502
  setCursorState(start);
42361
42503
  return;
42362
42504
  }
42363
- if (key.end || key.ctrl && input === "e") {
42505
+ if (isAction("edit:lineEnd", input, key)) {
42364
42506
  verticalColumnRef.current = null;
42365
42507
  const end = lineEnd(valueRef.current, cursorRef.current);
42366
42508
  cursorRef.current = end;
42367
42509
  setCursorState(end);
42368
42510
  return;
42369
42511
  }
42370
- if (key.upArrow || key.ctrl && input === "p") {
42512
+ if (isAction("edit:linePrevious", input, key)) {
42371
42513
  if (hasLiveSuggestions) {
42372
42514
  setSelectedIndex((i) => Math.max(0, i - 1));
42373
42515
  return;
@@ -42398,7 +42540,7 @@ function Composer({
42398
42540
  setBuffer(history[history.length - 1 - next] ?? "", void 0, "recalled");
42399
42541
  return;
42400
42542
  }
42401
- if (key.downArrow || key.ctrl && input === "n") {
42543
+ if (isAction("edit:lineNext", input, key)) {
42402
42544
  if (hasLiveSuggestions) {
42403
42545
  setSelectedIndex((i) => Math.min(liveSuggestionCount - 1, i + 1));
42404
42546
  return;
@@ -42434,34 +42576,11 @@ function Composer({
42434
42576
  setBuffer(history[history.length - 1 - next] ?? "", void 0, "recalled");
42435
42577
  return;
42436
42578
  }
42437
- if (key.ctrl && input === "g") {
42438
- if (!onExternalEdit) {
42439
- onNotice?.("External editor support is unavailable in this terminal.");
42440
- return;
42441
- }
42442
- const seed = expandChips(valueRef.current, pasteStoreRef.current).trim();
42443
- void onExternalEdit(seed).then((edited) => {
42444
- let cleaned = edited.trimEnd();
42445
- for (const attachment of attachmentsRef.current) {
42446
- const chip = chipFor(attachment, idFor(attachment));
42447
- if (!cleaned.includes(chip)) cleaned += `${cleaned ? " " : ""}${chip}`;
42448
- }
42449
- clearPastes();
42450
- setHistoryIndex(-1);
42451
- setHistorySearch(null);
42452
- setSelectedIndex(0);
42453
- historyDraftRef.current = null;
42454
- verticalColumnRef.current = null;
42455
- setBuffer(cleaned, cleaned.length, "editor");
42456
- }).catch((error) => {
42457
- onNotice?.(
42458
- // The editor module words its own refusals for a person ("set VISUAL or EDITOR…").
42459
- error instanceof Error && error.name === "ExternalEditorError" ? `Cannot open your editor: ${error.message}.` : explainFailure(error, "Cannot open your editor.")
42460
- );
42461
- });
42579
+ if (isAction("chat:externalEditor", input, key)) {
42580
+ openExternalEditor(pressedKeyLabel("chat:externalEditor", input, key));
42462
42581
  return;
42463
42582
  }
42464
- if ((key.ctrl || key.meta) && input === "v") {
42583
+ if (isAction("chat:imagePaste", input, key)) {
42465
42584
  if (plainText) {
42466
42585
  onNotice?.(
42467
42586
  "Messages to a child accept text. Paste text using the terminal paste command."
@@ -42485,7 +42604,7 @@ function Composer({
42485
42604
  }
42486
42605
  return;
42487
42606
  }
42488
- if (key.ctrl && input === "w") {
42607
+ if (isAction("edit:deleteWordBack", input, key)) {
42489
42608
  const source = valueRef.current;
42490
42609
  const position2 = cursorRef.current;
42491
42610
  const start = previousWordBoundary(source, position2);
@@ -42494,21 +42613,21 @@ function Composer({
42494
42613
  editBuffer(result.value, result.cursor);
42495
42614
  return;
42496
42615
  }
42497
- if (key.ctrl && input === "u") {
42616
+ if (isAction("edit:deleteToLineStart", input, key)) {
42498
42617
  const position2 = cursorRef.current;
42499
42618
  const start = lineStart(valueRef.current, position2);
42500
42619
  if (start < position2) killBufferRef.current = valueRef.current.slice(start, position2);
42501
42620
  editBuffer(valueRef.current.slice(0, start) + valueRef.current.slice(position2), start);
42502
42621
  return;
42503
42622
  }
42504
- if (key.ctrl && input === "k") {
42623
+ if (isAction("edit:deleteToLineEnd", input, key)) {
42505
42624
  const position2 = cursorRef.current;
42506
42625
  const end = lineEnd(valueRef.current, position2);
42507
42626
  if (position2 < end) killBufferRef.current = valueRef.current.slice(position2, end);
42508
42627
  editBuffer(valueRef.current.slice(0, position2) + valueRef.current.slice(end), position2);
42509
42628
  return;
42510
42629
  }
42511
- if (key.meta && input === "d") {
42630
+ if (isAction("edit:deleteWordForward", input, key)) {
42512
42631
  const source = valueRef.current;
42513
42632
  const position2 = cursorRef.current;
42514
42633
  const end = nextWordBoundary(source, position2);
@@ -42517,7 +42636,7 @@ function Composer({
42517
42636
  editBuffer(result.value, result.cursor);
42518
42637
  return;
42519
42638
  }
42520
- if (key.ctrl && input === "y") {
42639
+ if (isAction("edit:yank", input, key)) {
42521
42640
  const killed = killBufferRef.current;
42522
42641
  if (killed.length === 0) return;
42523
42642
  const position2 = cursorRef.current;
@@ -42528,7 +42647,7 @@ function Composer({
42528
42647
  );
42529
42648
  return;
42530
42649
  }
42531
- if (key.meta && input === "w") {
42650
+ if (isAction("chat:triggerToggle", input, key)) {
42532
42651
  toggleNearestTrigger();
42533
42652
  return;
42534
42653
  }
@@ -42979,6 +43098,13 @@ __name(wrapWords2, "wrapWords");
42979
43098
  // src/tui/LiveActivity.tsx
42980
43099
  var import_react42 = __toESM(require_react(), 1);
42981
43100
 
43101
+ // src/tui/foreground-handoff.ts
43102
+ function backgroundHint(env3 = process.env) {
43103
+ const inTmux = env3.TMUX !== void 0 && env3.TMUX !== "";
43104
+ return inTmux ? "(ctrl+b ctrl+b (twice) to run in background)" : "(ctrl+b to run in background)";
43105
+ }
43106
+ __name(backgroundHint, "backgroundHint");
43107
+
42982
43108
  // src/tui/stall-colour.ts
42983
43109
  var STALL_START_MS = 1e4;
42984
43110
  var STALL_FULL_MS = 2e4;
@@ -45927,9 +46053,11 @@ function ResumePicker({
45927
46053
  {
45928
46054
  text: scope === "all" ? "ctrl+a this folder" : "ctrl+a all folders",
45929
46055
  short: "ctrl+a",
45930
- rank: 4
46056
+ rank: 3
45931
46057
  },
45932
- { text: "ctrl+r rename", short: "ctrl+r", rank: 3 }
46058
+ // Outlasts the folder switch in a narrow terminal, and is never
46059
+ // cut down to a bare key: "ctrl+r" alone does not say what it does.
46060
+ { text: "ctrl+r rename", short: "ctrl+r name", rank: 4 }
45933
46061
  ] : [],
45934
46062
  { text: "PgUp/PgDn jump", rank: 1 },
45935
46063
  { text: "Home/End", rank: 1 },
@@ -48411,17 +48539,17 @@ function parseExternalEditorCommand(raw) {
48411
48539
  return result;
48412
48540
  }
48413
48541
  __name(parseExternalEditorCommand, "parseExternalEditorCommand");
48414
- function resolveExternalEditorCommand(env3 = process.env) {
48542
+ function resolveExternalEditorCommand(env3 = process.env, pressed = "the editor key") {
48415
48543
  const visual = env3.VISUAL?.trim();
48416
48544
  const editor = env3.EDITOR?.trim();
48417
48545
  const raw = visual || editor;
48418
- if (!raw) throw new ExternalEditorError("set VISUAL or EDITOR before pressing Ctrl+G");
48546
+ if (!raw) throw new ExternalEditorError(`set VISUAL or EDITOR before pressing ${pressed}`);
48419
48547
  return parseExternalEditorCommand(raw);
48420
48548
  }
48421
48549
  __name(resolveExternalEditorCommand, "resolveExternalEditorCommand");
48422
48550
  async function editDraftInExternalEditor(seed, options) {
48423
48551
  options.signal?.throwIfAborted();
48424
- const command = resolveExternalEditorCommand(options.env);
48552
+ const command = resolveExternalEditorCommand(options.env, options.pressed);
48425
48553
  const directory = await mkdtemp(join3(options.temporaryRoot ?? tmpdir2(), "namzu-editor-"));
48426
48554
  const draftPath = join3(directory, "draft.md");
48427
48555
  let edited;
@@ -51484,6 +51612,26 @@ var SourceDeliveryView = class {
51484
51612
  }
51485
51613
  };
51486
51614
 
51615
+ // src/tui/self-mending-pause-row.ts
51616
+ var SelfMendingPauseRow = class {
51617
+ static {
51618
+ __name(this, "SelfMendingPauseRow");
51619
+ }
51620
+ #id = null;
51621
+ /** The row to rewrite, or null when this try must push a new one. */
51622
+ reusable(attempt, rowIds) {
51623
+ if (this.#id === null || attempt <= 0) return null;
51624
+ return rowIds.has(this.#id) ? this.#id : null;
51625
+ }
51626
+ remember(id) {
51627
+ this.#id = id;
51628
+ }
51629
+ /** The run ended: the counter reset, or another kind of pause took over. */
51630
+ forget() {
51631
+ this.#id = null;
51632
+ }
51633
+ };
51634
+
51487
51635
  // src/tui/skills/learning.ts
51488
51636
  var DEFAULT_SUGGEST_MIN_TOOL_CALLS = 6;
51489
51637
  var SUGGEST_MIN_DISTINCT_TOOLS = 2;
@@ -54439,7 +54587,7 @@ function goalRoundPrompt(authority) {
54439
54587
  __name(goalRoundPrompt, "goalRoundPrompt");
54440
54588
  var SCROLL_VIEW_RESERVED_ROWS = 9;
54441
54589
  var LIVE_FURNITURE_ROWS = 10;
54442
- var defaultExternalEditor = /* @__PURE__ */ __name(({ seed, cwd: cwd2, signal }) => editDraftInExternalEditor(seed, { cwd: cwd2, signal }), "defaultExternalEditor");
54590
+ var defaultExternalEditor = /* @__PURE__ */ __name(({ seed, cwd: cwd2, signal, pressed }) => editDraftInExternalEditor(seed, { cwd: cwd2, signal, ...pressed !== void 0 ? { pressed } : {} }), "defaultExternalEditor");
54443
54591
  function App2(props) {
54444
54592
  const epoch = useThemeSubscription();
54445
54593
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ThemeEpochContext.Provider, { value: epoch, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AppBody, { ...props }) });
@@ -54564,6 +54712,9 @@ function AppBody({
54564
54712
  const [reasoningEffort, setReasoningEffortState] = (0, import_react59.useState)();
54565
54713
  const reasoningEffortRef = (0, import_react59.useRef)(void 0);
54566
54714
  const turnLimitsOverrideRef = (0, import_react59.useRef)({});
54715
+ const thinkingOffFromRef = (0, import_react59.useRef)(void 0);
54716
+ const keybindingDraftRef = (0, import_react59.useRef)(null);
54717
+ const chooserDraftRef = (0, import_react59.useRef)(null);
54567
54718
  const setReasoningEffort = (0, import_react59.useCallback)((next) => {
54568
54719
  reasoningEffortRef.current = next;
54569
54720
  setReasoningEffortState(next);
@@ -54850,8 +55001,16 @@ ${blocks.join("\n\n")}`;
54850
55001
  setHandoffParkState(value);
54851
55002
  }, []);
54852
55003
  const autoResumeAttemptRef = (0, import_react59.useRef)(0);
55004
+ const selfMendingPauseRowRef = (0, import_react59.useRef)(new SelfMendingPauseRow());
54853
55005
  const [, setAutoResumeTick] = (0, import_react59.useState)(0);
54854
55006
  const composerDraftTokenRef = (0, import_react59.useRef)(0);
55007
+ (0, import_react59.useEffect)(() => {
55008
+ const kept = chooserDraftRef.current;
55009
+ if (!kept || phase !== "ready" || choicePicker !== null) return;
55010
+ chooserDraftRef.current = null;
55011
+ composerDraftTokenRef.current += 1;
55012
+ setComposerDraft({ token: composerDraftTokenRef.current, ...kept });
55013
+ }, [phase, choicePicker]);
54855
55014
  const [subagents, setSubagentsState] = (0, import_react59.useState)([]);
54856
55015
  const subagentsRef = (0, import_react59.useRef)([]);
54857
55016
  const [workflowRuns, setWorkflowRuns] = (0, import_react59.useState)([]);
@@ -55530,7 +55689,7 @@ ${blocks.join("\n\n")}`;
55530
55689
  }
55531
55690
  }, [terminal, resetTranscript, scrollOpen, transcriptScreen]);
55532
55691
  const requestExternalEditor = (0, import_react59.useCallback)(
55533
- (seed) => {
55692
+ (seed, pressed) => {
55534
55693
  if (phase !== "ready" || state !== "idle" || abortRef.current !== null || hasUnsettledTurn() || queuedRef.current.length > 0 || compactingRef.current || conversationMutationRef.current !== null) {
55535
55694
  return Promise.reject(
55536
55695
  new ExternalEditorError("wait for the current reply and queued messages to finish")
@@ -55543,6 +55702,7 @@ ${blocks.join("\n\n")}`;
55543
55702
  const request = {
55544
55703
  token: {},
55545
55704
  seed,
55705
+ ...pressed !== void 0 ? { pressed } : {},
55546
55706
  controller: new AbortController(),
55547
55707
  resolve: resolve9,
55548
55708
  reject
@@ -55566,6 +55726,7 @@ ${blocks.join("\n\n")}`;
55566
55726
  try {
55567
55727
  edited = await externalEditor({
55568
55728
  seed: request.seed,
55729
+ ...request.pressed !== void 0 ? { pressed: request.pressed } : {},
55569
55730
  cwd: trustedCwdRef.current,
55570
55731
  signal: request.controller.signal
55571
55732
  });
@@ -56366,6 +56527,31 @@ ${blocks.join("\n\n")}`;
56366
56527
  },
56367
56528
  [hasUnsettledTurn, pushMessage, session, setHypermode, state]
56368
56529
  );
56530
+ const toggleThinking = (0, import_react59.useCallback)(() => {
56531
+ const note = /* @__PURE__ */ __name((text) => addNotice({ key: "thinking-toggle", text, priority: "immediate", timeoutMs: 4e3 }), "note");
56532
+ const levels = session?.reasoningEffortLevels;
56533
+ if (!session?.hasProvider || !levels?.length) {
56534
+ note("This model has no thinking setting");
56535
+ return;
56536
+ }
56537
+ if (!levels.includes("none")) {
56538
+ note("Thinking cannot be switched off for this model \xB7 /effort sets how much it thinks");
56539
+ return;
56540
+ }
56541
+ if (state !== "idle" || abortRef.current !== null || hasUnsettledTurn() || permissionResolveRef.current !== null || compactingRef.current) {
56542
+ note("Wait for the reply to finish before changing thinking");
56543
+ return;
56544
+ }
56545
+ if (reasoningEffortRef.current === "none") {
56546
+ setReasoningEffort(thinkingOffFromRef.current);
56547
+ thinkingOffFromRef.current = void 0;
56548
+ note("Thinking on");
56549
+ return;
56550
+ }
56551
+ thinkingOffFromRef.current = reasoningEffortRef.current;
56552
+ setReasoningEffort("none");
56553
+ note("Thinking off");
56554
+ }, [addNotice, hasUnsettledTurn, session, setReasoningEffort, state]);
56369
56555
  const stepReasoningEffort = (0, import_react59.useCallback)(
56370
56556
  (direction) => {
56371
56557
  const levels = session?.reasoningEffortLevels;
@@ -57331,6 +57517,8 @@ ${blocks.join("\n\n")}`;
57331
57517
  conversationSessions: sessionsRef.current
57332
57518
  } : {},
57333
57519
  ...activeCtx.mcpServers ? { mcpServers: activeCtx.mcpServers } : {},
57520
+ // The composer is ready at once; each server's tools join as it connects.
57521
+ toolServers: "background",
57334
57522
  ...activeCtx.plugins ? { plugins: activeCtx.plugins } : {},
57335
57523
  ...activeCtx.skills ? { skills: activeCtx.skills } : {},
57336
57524
  ...activeCtx.web ? { web: activeCtx.web } : {},
@@ -57478,12 +57666,22 @@ ${blocks.join("\n\n")}`;
57478
57666
  `Skipped ${relative3(activeCtx.cwd, skip.path) || skip.path}: ${skip.reason}`
57479
57667
  );
57480
57668
  }
57481
- for (const server of s.mcpConnected) {
57482
- pushMessage("system", `Tool server ${server.name} \xB7 ${server.toolCount} tools`);
57483
- }
57484
- for (const server of s.mcpFailed) {
57485
- pushMessage("system", `Tool server ${server.name} is not available: ${server.reason}`);
57486
- }
57669
+ const reportedToolServers = /* @__PURE__ */ new Set();
57670
+ const reportToolServer = /* @__PURE__ */ __name((name) => {
57671
+ if (reportedToolServers.has(name)) return;
57672
+ if (appLifetime.signal.aborted || previousSessionRef.current !== s) return;
57673
+ const row = toolServerRow(
57674
+ name,
57675
+ s.mcpStatus?.() ?? { connected: s.mcpConnected, failed: s.mcpFailed }
57676
+ );
57677
+ if (!row) return;
57678
+ reportedToolServers.add(name);
57679
+ if (row.level === "warning") pushSystem("warning", row.text);
57680
+ else pushMessage("system", row.text);
57681
+ }, "reportToolServer");
57682
+ s.onMcpSettled?.(reportToolServer);
57683
+ for (const server of s.mcpConnected) reportToolServer(server.name);
57684
+ for (const server of s.mcpFailed) reportToolServer(server.name);
57487
57685
  } else {
57488
57686
  setPhase("unhealthy");
57489
57687
  if (s.errorHint) pushMessage("system", s.errorHint, false, STARTUP_STOP_GLYPH);
@@ -58161,7 +58359,7 @@ ${blocks.join("\n\n")}`;
58161
58359
  `The browser uses the job\u2019s profile ${jobBrowser.profile} for this run, on its sites only.`
58162
58360
  );
58163
58361
  }
58164
- pushMessage("system", PAUSED_TURN_LINES.resuming);
58362
+ if (!resume?.automatic) pushMessage("system", PAUSED_TURN_LINES.resuming);
58165
58363
  for await (const event of session.resumePaused({
58166
58364
  turnId: active.turnId,
58167
58365
  signal: ac.signal,
@@ -58236,7 +58434,7 @@ ${blocks.join("\n\n")}`;
58236
58434
  const parked = handoffParkRef.current;
58237
58435
  void (async () => {
58238
58436
  try {
58239
- await resumeActiveTurn();
58437
+ await resumeActiveTurn({ automatic: true });
58240
58438
  } catch {
58241
58439
  }
58242
58440
  if (!parked || handoffParkRef.current !== parked) return;
@@ -58302,8 +58500,8 @@ ${blocks.join("\n\n")}`;
58302
58500
  doctorRunningRef.current = true;
58303
58501
  const progressId = pushMessage("system", "Checking\u2026");
58304
58502
  try {
58305
- const { runLiveDoctor } = await import("./live-V7HRF5KR.js");
58306
- const { describePlainDoctor } = await import("./plain-report-73WHPLHX.js");
58503
+ const { runLiveDoctor } = await import("./live-JHNWMJIE.js");
58504
+ const { describePlainDoctor } = await import("./plain-report-IOYN4O6N.js");
58307
58505
  const report = await runLiveDoctor({
58308
58506
  ...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
58309
58507
  });
@@ -58559,6 +58757,7 @@ ${blocks.join("\n\n")}`;
58559
58757
  conversationGenRef.current += 1;
58560
58758
  setHandoffPark(null);
58561
58759
  autoResumeAttemptRef.current = 0;
58760
+ selfMendingPauseRowRef.current.forget();
58562
58761
  resetSubagentActivity();
58563
58762
  session?.resetTaskStore?.();
58564
58763
  activeTurnTokenRef.current = null;
@@ -58696,6 +58895,7 @@ ${blocks.join("\n\n")}`;
58696
58895
  conversationGenRef.current += 1;
58697
58896
  setHandoffPark(null);
58698
58897
  autoResumeAttemptRef.current = 0;
58898
+ selfMendingPauseRowRef.current.forget();
58699
58899
  resetSubagentActivity();
58700
58900
  session?.resetTaskStore?.();
58701
58901
  activeTurnTokenRef.current = null;
@@ -59170,6 +59370,7 @@ ${blocks.join("\n\n")}`;
59170
59370
  conversationGenRef.current += 1;
59171
59371
  setHandoffPark(null);
59172
59372
  autoResumeAttemptRef.current = 0;
59373
+ selfMendingPauseRowRef.current.forget();
59173
59374
  resetSubagentActivity();
59174
59375
  session?.resetTaskStore?.();
59175
59376
  activeTurnTokenRef.current = null;
@@ -60013,6 +60214,7 @@ ${plain(err)}`
60013
60214
  break;
60014
60215
  case "done": {
60015
60216
  autoResumeAttemptRef.current = 0;
60217
+ selfMendingPauseRowRef.current.forget();
60016
60218
  setSummarising(false);
60017
60219
  if (event.text !== void 0) st.text = event.text;
60018
60220
  st.completed = event.stopReason === void 0 || event.stopReason === "end_turn";
@@ -60081,8 +60283,19 @@ ${plain(err)}`
60081
60283
  reason: event.handoff.reason
60082
60284
  });
60083
60285
  } else {
60084
- pushSystem("warning", describePlainInterruption(event, plainOptions()));
60286
+ const pauseText = describePlainInterruption(event, plainOptions());
60085
60287
  if (isSelfMending(event)) {
60288
+ const rowId = selfMendingPauseRowRef.current.reusable(
60289
+ autoResumeAttemptRef.current,
60290
+ new Set(messagesLiveRef.current.map((row) => row.id))
60291
+ );
60292
+ if (rowId !== null) {
60293
+ setMessages(
60294
+ (rows) => rows.map((row) => row.id === rowId ? { ...row, content: pauseText } : row)
60295
+ );
60296
+ } else {
60297
+ selfMendingPauseRowRef.current.remember(pushSystem("warning", pauseText));
60298
+ }
60086
60299
  const attempt = autoResumeAttemptRef.current + 1;
60087
60300
  autoResumeAttemptRef.current = attempt;
60088
60301
  setHandoffPark({
@@ -60090,6 +60303,8 @@ ${plain(err)}`
60090
60303
  autoResume: { attempt, at: Date.now() + autoResumeDelayMs(attempt) }
60091
60304
  });
60092
60305
  } else {
60306
+ selfMendingPauseRowRef.current.forget();
60307
+ pushSystem("warning", pauseText);
60093
60308
  setHandoffPark({ turnId: event.turnId });
60094
60309
  }
60095
60310
  }
@@ -61006,10 +61221,11 @@ ${[...workflowNoticeSnapshot.values()].join("\n\n")}` : void 0,
61006
61221
  const restore = /* @__PURE__ */ __name((notice) => {
61007
61222
  setViewNotice(notice);
61008
61223
  composerDraftTokenRef.current += 1;
61224
+ const kept = meta.source === "keybinding" ? meta.draft ?? { text: "" } : void 0;
61009
61225
  setComposerDraft({
61010
61226
  token: composerDraftTokenRef.current,
61011
- text: value,
61012
- ...attachments && attachments.length > 0 ? { attachments: [...attachments] } : {}
61227
+ text: kept ? kept.text : value,
61228
+ ...kept ? kept.attachments?.length ? { attachments: [...kept.attachments] } : {} : attachments && attachments.length > 0 ? { attachments: [...attachments] } : {}
61013
61229
  });
61014
61230
  }, "restore");
61015
61231
  const text = value.trim();
@@ -61057,8 +61273,10 @@ ${[...workflowNoticeSnapshot.values()].join("\n\n")}` : void 0,
61057
61273
  }
61058
61274
  setHandoffPark(null);
61059
61275
  autoResumeAttemptRef.current = 0;
61276
+ selfMendingPauseRowRef.current.forget();
61060
61277
  const fromLoop = meta.source === "operator-loop" || meta.source === "model-loop";
61061
- if (!fromLoop) setHistory((prev) => [...prev, value]);
61278
+ keybindingDraftRef.current = meta.source === "keybinding" ? meta.draft ?? null : null;
61279
+ if (!fromLoop && meta.source !== "keybinding") setHistory((prev) => [...prev, value]);
61062
61280
  const operatorText = meta.source !== "model-loop" && meta.source !== "launch-message";
61063
61281
  const selectionIntent = operatorText && !attachments?.length ? parseModelSelectionIntent(value) : void 0;
61064
61282
  if (selectionIntent) {
@@ -61584,6 +61802,7 @@ Available: ${agentIds.join(", ")}` : "\nNo agents are configured."}`
61584
61802
  setPickerDetected(null);
61585
61803
  setPickerSelectionKind("provider-and-model");
61586
61804
  setPickerInitialView("models");
61805
+ chooserDraftRef.current = keybindingDraftRef.current;
61587
61806
  setPhase("picker");
61588
61807
  return;
61589
61808
  case "permission-mode": {
@@ -61642,9 +61861,14 @@ Available: ${agentIds.join(", ")}` : "\nNo agents are configured."}`
61642
61861
  values.findIndex((value2) => value2 === current)
61643
61862
  )
61644
61863
  );
61645
- setChoicePicker(
61646
- reasoningEffortPicker(session, current, false, hypermodeRef.current) ?? null
61864
+ const effortChooser = reasoningEffortPicker(
61865
+ session,
61866
+ current,
61867
+ false,
61868
+ hypermodeRef.current
61647
61869
  );
61870
+ if (effortChooser) chooserDraftRef.current = keybindingDraftRef.current;
61871
+ setChoicePicker(effortChooser ?? null);
61648
61872
  return;
61649
61873
  }
61650
61874
  case "login":
@@ -63112,11 +63336,11 @@ ${plugins.map((plugin) => {
63112
63336
  if ((saveSkillPromptRef.current || planPromptRef.current || questionDialogRef.current || scheduleReviewPromptRef.current) && permission === null)
63113
63337
  return;
63114
63338
  if (phase === "unhealthy") {
63115
- if (key.escape || key.ctrl && input === "c") exitWithSummary();
63339
+ if (key.escape || isAction("app:interrupt", input, key)) exitWithSummary();
63116
63340
  return;
63117
63341
  }
63118
63342
  if (phase === "picker") {
63119
- if (key.ctrl && input === "c") exitWithSummary();
63343
+ if (isAction("app:interrupt", input, key)) exitWithSummary();
63120
63344
  return;
63121
63345
  }
63122
63346
  if (phase === "edit") {
@@ -63132,7 +63356,7 @@ ${plugins.map((plugin) => {
63132
63356
  closeRewind();
63133
63357
  return;
63134
63358
  }
63135
- if (key.ctrl && input === "c" && !view.state.busy) {
63359
+ if (isAction("app:interrupt", input, key) && !view.state.busy) {
63136
63360
  closeRewind();
63137
63361
  return;
63138
63362
  }
@@ -63153,7 +63377,7 @@ ${plugins.map((plugin) => {
63153
63377
  if (phase === "resume" || phase === "unarchive") {
63154
63378
  if (resumeCommittedRef.current) return;
63155
63379
  if (resumeRenaming !== null) {
63156
- if (key.escape || key.ctrl && input === "c") setResumeRenaming(null);
63380
+ if (key.escape || isAction("app:interrupt", input, key)) setResumeRenaming(null);
63157
63381
  else if (key.return) {
63158
63382
  const target = resumeList[selectedResumeRef.current];
63159
63383
  const value = resumeRenaming;
@@ -63202,7 +63426,7 @@ ${plugins.map((plugin) => {
63202
63426
  }
63203
63427
  if (conv)
63204
63428
  void (phase === "unarchive" ? restoreArchivedConversation(conv) : resumeConversation(conv));
63205
- } else if (key.escape || key.ctrl && input === "c") setPhase("ready");
63429
+ } else if (key.escape || isAction("app:interrupt", input, key)) setPhase("ready");
63206
63430
  else {
63207
63431
  const next = editLine(resumeQuery, { ...key, input });
63208
63432
  if (next !== null) {
@@ -63215,7 +63439,7 @@ ${plugins.map((plugin) => {
63215
63439
  }
63216
63440
  if (phase === "trust") {
63217
63441
  const ch = input.toLowerCase();
63218
- if (ch === "n" || key.escape || key.ctrl && input === "c") {
63442
+ if (ch === "n" || key.escape || isAction("app:interrupt", input, key)) {
63219
63443
  exitWithSummary();
63220
63444
  return;
63221
63445
  }
@@ -63228,7 +63452,7 @@ ${plugins.map((plugin) => {
63228
63452
  const ch = input.toLowerCase();
63229
63453
  const typing = permissionReasonRef.current;
63230
63454
  if (typing !== null) {
63231
- if (key.ctrl && input === "c") {
63455
+ if (isAction("app:interrupt", input, key)) {
63232
63456
  interruptTurn();
63233
63457
  return;
63234
63458
  }
@@ -63272,7 +63496,7 @@ ${plugins.map((plugin) => {
63272
63496
  setPermissionReviewOffset(next);
63273
63497
  return;
63274
63498
  }
63275
- if (key.ctrl && input === "c") {
63499
+ if (isAction("app:interrupt", input, key)) {
63276
63500
  if (permission && endsTurnOnNo(permission)) {
63277
63501
  resolvePermission(plainNo(true));
63278
63502
  return;
@@ -63315,7 +63539,7 @@ ${plugins.map((plugin) => {
63315
63539
  return;
63316
63540
  }
63317
63541
  if (jobSurfaceCommittedRef.current !== shellView) return;
63318
- if (key.ctrl && input === "c" || input.toLowerCase() === "q") {
63542
+ if (isAction("app:interrupt", input, key) || input.toLowerCase() === "q") {
63319
63543
  setJobSurface(null);
63320
63544
  return;
63321
63545
  }
@@ -63435,10 +63659,10 @@ ${plugins.map((plugin) => {
63435
63659
  } else if (key.escape) {
63436
63660
  setRailFocus(null);
63437
63661
  return;
63438
- } else if (key.ctrl && input === "x") {
63662
+ } else if (isChordLead(input, key)) {
63439
63663
  railChordRef.current = true;
63440
63664
  return;
63441
- } else if (key.ctrl && input === "k" && chordPending) {
63665
+ } else if (chordPending && isChordAction("chat:killAgents", input, key)) {
63442
63666
  requestStopAllAgents();
63443
63667
  return;
63444
63668
  } else if (key.upArrow || key.downArrow) {
@@ -63494,7 +63718,7 @@ ${plugins.map((plugin) => {
63494
63718
  setRailFocus(null);
63495
63719
  }
63496
63720
  }
63497
- if (key.ctrl && input === "t") {
63721
+ if (isAction("app:openAgents", input, key)) {
63498
63722
  if (agentSurfaceRef.current) {
63499
63723
  setAgentSurface(null);
63500
63724
  return;
@@ -63535,7 +63759,7 @@ ${plugins.map((plugin) => {
63535
63759
  return;
63536
63760
  }
63537
63761
  const hasPhaseLevel = workflow ? cockpitEntryFocus(workflow) === "phases" : false;
63538
- if (key.ctrl && input === "c" || input.toLowerCase() === "q") {
63762
+ if (isAction("app:interrupt", input, key) || input.toLowerCase() === "q") {
63539
63763
  setAgentSurface(null);
63540
63764
  return;
63541
63765
  }
@@ -63672,7 +63896,7 @@ ${plugins.map((plugin) => {
63672
63896
  setViewNotice(void 0);
63673
63897
  return;
63674
63898
  }
63675
- if (key.ctrl && input === "c") {
63899
+ if (isAction("app:interrupt", input, key)) {
63676
63900
  if (railActionFor(selected) === "stop") session?.stopSubagent?.(selected.viewId);
63677
63901
  setAgentSurface(null);
63678
63902
  setViewNotice(void 0);
@@ -63688,7 +63912,7 @@ ${plugins.map((plugin) => {
63688
63912
  return;
63689
63913
  }
63690
63914
  } else {
63691
- if (!agentView.composing && input.toLowerCase() === "q" || key.ctrl && input === "c") {
63915
+ if (!agentView.composing && input.toLowerCase() === "q" || isAction("app:interrupt", input, key)) {
63692
63916
  setAgentSurface(null);
63693
63917
  return;
63694
63918
  }
@@ -63733,7 +63957,7 @@ ${plugins.map((plugin) => {
63733
63957
  const option = options[index];
63734
63958
  if (option) applyChoiceSelection(picker.options.indexOf(option));
63735
63959
  }, "applyVisibleChoice");
63736
- if (key.escape || key.ctrl && input === "c") {
63960
+ if (key.escape || isAction("app:interrupt", input, key)) {
63737
63961
  reviewChoiceInFlightRef.current = null;
63738
63962
  setSelectedChoice(0);
63739
63963
  setChoicePicker(key.escape ? picker.back ?? null : null);
@@ -63812,7 +64036,7 @@ ${plugins.map((plugin) => {
63812
64036
  if (copyPickerRef.current) {
63813
64037
  if (copyPickerCommittedRef.current !== copyPickerRef.current) return;
63814
64038
  const targets = copyPickerRef.current.targets;
63815
- if (key.escape || key.ctrl && input === "c") {
64039
+ if (key.escape || isAction("app:interrupt", input, key)) {
63816
64040
  setCopyPicker(null);
63817
64041
  return;
63818
64042
  }
@@ -63844,7 +64068,7 @@ ${plugins.map((plugin) => {
63844
64068
  }
63845
64069
  return;
63846
64070
  }
63847
- if (key.ctrl && input === "l") {
64071
+ if (isAction("chat:clearScreen", input, key)) {
63848
64072
  if (state !== "idle" || abortRef.current || hasUnsettledTurn()) {
63849
64073
  pushMessage("system", "Ctrl+L is unavailable while a reply is in progress.");
63850
64074
  return;
@@ -63858,6 +64082,7 @@ ${plugins.map((plugin) => {
63858
64082
  setHandoffPark(null);
63859
64083
  if (key.return) {
63860
64084
  autoResumeAttemptRef.current = 0;
64085
+ selfMendingPauseRowRef.current.forget();
63861
64086
  void resumeActiveTurn({ handoffReason: parked.reason });
63862
64087
  } else void abandonActiveTurn("The operator stopped the turn a tool paused for them.");
63863
64088
  return;
@@ -63870,15 +64095,15 @@ ${plugins.map((plugin) => {
63870
64095
  interruptWithRow(true, { always: true });
63871
64096
  return;
63872
64097
  }
63873
- if (key.ctrl && input === "o") {
64098
+ if (isAction("app:toggleTranscript", input, key)) {
63874
64099
  setTranscriptScreen(true);
63875
64100
  return;
63876
64101
  }
63877
- if (key.ctrl && input === "d" && phase === "ready" && !composerHasDraft && permission === null && textPrompt === null && choicePickerRef.current === null && copyPicker === null) {
64102
+ if (isAction("app:exit", input, key) && phase === "ready" && !composerHasDraft && permission === null && textPrompt === null && choicePickerRef.current === null && copyPicker === null) {
63878
64103
  armExit("Ctrl-D");
63879
64104
  return;
63880
64105
  }
63881
- if (key.ctrl && input === "c") {
64106
+ if (isAction("app:interrupt", input, key)) {
63882
64107
  if (interruptWithRow(false)) return;
63883
64108
  const stoppable = stoppableBackgroundAgents(railRowsRef.current);
63884
64109
  if (stoppable.length > 0) {
@@ -64275,6 +64500,7 @@ ${plugins.map((plugin) => {
64275
64500
  onClearedDraft: (text) => setHistory((prev) => [...prev, text]),
64276
64501
  onStepReasoningEffort: stepReasoningEffort,
64277
64502
  onExternalEdit: requestExternalEditor,
64503
+ onToggleThinking: toggleThinking,
64278
64504
  onEditPrevious: openPromptEditor,
64279
64505
  draftToRestore: composerDraft,
64280
64506
  onDraftRestored: (token) => setComposerDraft((draft) => draft?.token === token ? null : draft),
@@ -65227,4 +65453,4 @@ react/cjs/react-jsx-runtime.development.js:
65227
65453
  * LICENSE file in the root directory of this source tree.
65228
65454
  *)
65229
65455
  */
65230
- //# sourceMappingURL=tui-2XOSCALL.js.map
65456
+ //# sourceMappingURL=tui-TNCMJCJJ.js.map