@shareai-lab/kode 2.1.0 → 2.1.2

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 (205) hide show
  1. package/dist/chunks/{Doctor-AES5ON33.js → Doctor-TWRIVOVW.js} +13 -13
  2. package/dist/chunks/{LogList-PQJEJHHE.js → LogList-PUTPM24L.js} +10 -10
  3. package/dist/chunks/REPL-YGIR5VXC.js +78 -0
  4. package/dist/chunks/{ResumeConversation-OWQ3DB4M.js → ResumeConversation-IJMKQXBU.js} +44 -44
  5. package/dist/chunks/{ScreenFrame-AGLR6B4D.js → ScreenFrame-PQJRZ5DQ.js} +2 -2
  6. package/dist/chunks/{agentLoader-BMWB4UKI.js → agentLoader-GOYNJTAO.js} +5 -5
  7. package/dist/chunks/{agentsValidate-LSMJSFYW.js → agentsValidate-R26AKPAA.js} +6 -6
  8. package/dist/chunks/{ask-3TSZR6AJ.js → ask-6SYVJONJ.js} +18 -18
  9. package/dist/chunks/{autoUpdater-MEPC7LJF.js → autoUpdater-SDLJ5QSH.js} +4 -4
  10. package/dist/chunks/{chunk-NC3RX5AB.js → chunk-2B2TR2S3.js} +4 -4
  11. package/dist/chunks/{chunk-HDEYMVIJ.js → chunk-437YGKVA.js} +2 -2
  12. package/dist/chunks/{chunk-WGMKKKS2.js → chunk-4BBWDSDC.js} +1 -1
  13. package/dist/chunks/{chunk-KKOES3YK.js → chunk-4T5LR4P5.js} +55 -116
  14. package/dist/chunks/chunk-4T5LR4P5.js.map +7 -0
  15. package/dist/chunks/{chunk-PMC3BZ3M.js → chunk-5HZWM4JB.js} +1 -1
  16. package/dist/chunks/{chunk-REQTXUXO.js → chunk-5LBRVQT5.js} +1 -1
  17. package/dist/chunks/{chunk-BEDQTC44.js → chunk-5LL33G6X.js} +2 -2
  18. package/dist/chunks/{chunk-YUXYJB45.js → chunk-5RCVEFJS.js} +19 -8
  19. package/dist/chunks/chunk-5RCVEFJS.js.map +7 -0
  20. package/dist/chunks/{chunk-MDCOIZVX.js → chunk-6C6VNA2D.js} +2 -2
  21. package/dist/chunks/{chunk-P77NF36M.js → chunk-6CAQXUDY.js} +1 -1
  22. package/dist/chunks/{chunk-DPQE5NA4.js → chunk-7SRIFZDJ.js} +1 -1
  23. package/dist/chunks/{chunk-TI2CTTMA.js → chunk-7ZC22R33.js} +1 -1
  24. package/dist/chunks/{chunk-EV56PDOI.js → chunk-AX3VXMUS.js} +1 -1
  25. package/dist/chunks/{chunk-5MVUCX6O.js → chunk-AZHJLRRP.js} +1 -1
  26. package/dist/chunks/{chunk-LIBZWJEW.js → chunk-BNSPVA24.js} +11 -10
  27. package/dist/chunks/chunk-BNSPVA24.js.map +7 -0
  28. package/dist/chunks/{chunk-Z3J3WJ2K.js → chunk-BPMYW5DT.js} +415 -414
  29. package/dist/chunks/chunk-BPMYW5DT.js.map +7 -0
  30. package/dist/chunks/{chunk-QBW7VU7C.js → chunk-DWKF6SQH.js} +3 -3
  31. package/dist/chunks/{chunk-4RVYYLN7.js → chunk-E4C4N7OV.js} +1 -1
  32. package/dist/chunks/{chunk-4RVYYLN7.js.map → chunk-E4C4N7OV.js.map} +1 -1
  33. package/dist/chunks/chunk-ESRGV7DC.js +34 -0
  34. package/dist/chunks/chunk-ESRGV7DC.js.map +7 -0
  35. package/dist/chunks/{chunk-VSKGDU73.js → chunk-FKWFR23G.js} +2 -2
  36. package/dist/chunks/{chunk-E6BU32L2.js → chunk-H5F7M5D3.js} +2 -2
  37. package/dist/chunks/{chunk-DZPD6H7A.js → chunk-JXYXMP2Q.js} +2 -2
  38. package/dist/chunks/{chunk-65FLXXMH.js → chunk-KA543BHH.js} +8 -8
  39. package/dist/chunks/{chunk-MEQ7TAT7.js → chunk-KHMXPPO7.js} +4 -4
  40. package/dist/chunks/{chunk-G5ET7GFB.js → chunk-KQV5FGSS.js} +5 -5
  41. package/dist/chunks/{chunk-DPVCHIF7.js → chunk-KRBZO255.js} +1 -1
  42. package/dist/chunks/{chunk-Y33AS3MY.js → chunk-L2LWCVUF.js} +21 -7
  43. package/dist/chunks/chunk-L2LWCVUF.js.map +7 -0
  44. package/dist/chunks/{chunk-EKXQ7ZWV.js → chunk-L5ZJIOEF.js} +4 -4
  45. package/dist/chunks/{chunk-UUJN5ZCN.js → chunk-LBHVWSUP.js} +2 -2
  46. package/dist/chunks/{chunk-GL6HUBBX.js → chunk-LKDMUCWA.js} +6 -6
  47. package/dist/chunks/{chunk-HJCYE2AS.js → chunk-LUZMHHQF.js} +10 -10
  48. package/dist/chunks/{chunk-MXFN7OSL.js → chunk-MOGUUWKG.js} +1 -1
  49. package/dist/chunks/{chunk-4UDKRYWZ.js → chunk-N4772IDQ.js} +3 -3
  50. package/dist/chunks/{chunk-TJMA65RL.js → chunk-N5AH66UG.js} +168 -23
  51. package/dist/chunks/chunk-N5AH66UG.js.map +7 -0
  52. package/dist/chunks/{chunk-JJ67KF6A.js → chunk-PTIAF6KF.js} +4 -4
  53. package/dist/chunks/{chunk-YUJB4WDK.js → chunk-PVMCLI36.js} +1 -1
  54. package/dist/chunks/{chunk-3TLVYEGW.js → chunk-RTGKCKD3.js} +1 -1
  55. package/dist/chunks/{chunk-AKC4BUW5.js → chunk-SOBWNYOW.js} +7 -6
  56. package/dist/chunks/chunk-SOBWNYOW.js.map +7 -0
  57. package/dist/chunks/{chunk-3DBNJOZI.js → chunk-SUNG5KP5.js} +1 -1
  58. package/dist/chunks/{chunk-VBGSHKHX.js → chunk-SVRXO73D.js} +16 -13
  59. package/dist/chunks/chunk-SVRXO73D.js.map +7 -0
  60. package/dist/chunks/{chunk-Q55CB4Y4.js → chunk-WE7CQGRG.js} +2 -2
  61. package/dist/chunks/{chunk-V3IXG64X.js → chunk-WOMV4RCI.js} +404 -446
  62. package/dist/chunks/chunk-WOMV4RCI.js.map +7 -0
  63. package/dist/chunks/{chunk-ZAT5BSQI.js → chunk-WVJMXIKQ.js} +12 -12
  64. package/dist/chunks/{chunk-ZAT5BSQI.js.map → chunk-WVJMXIKQ.js.map} +1 -1
  65. package/dist/chunks/{chunk-DELUVYKS.js → chunk-XVNEJVZC.js} +2 -2
  66. package/dist/chunks/{chunk-KDY7XYYS.js → chunk-YQ3YJSMI.js} +1 -1
  67. package/dist/chunks/{chunk-6CNJ3CYQ.js → chunk-YUZBVKVH.js} +3 -3
  68. package/dist/chunks/{chunk-VJ2QSQ3E.js → chunk-ZXOTOID7.js} +2 -2
  69. package/dist/chunks/{client-OWTJ7TPE.js → client-QUCHWMEW.js} +5 -5
  70. package/dist/chunks/{customCommands-FA6HRXXV.js → customCommands-S6YGRUED.js} +5 -5
  71. package/dist/chunks/{engine-UBCAVO7E.js → engine-FRDEQVDF.js} +17 -17
  72. package/dist/chunks/{env-JIMGBRE2.js → env-YH77MILU.js} +3 -3
  73. package/dist/chunks/{kodeAgentSessionLoad-BZRTCPMB.js → kodeAgentSessionLoad-TBPU4TWU.js} +3 -3
  74. package/dist/chunks/{kodeAgentSessionResume-V3WB3OWQ.js → kodeAgentSessionResume-3CNE5T6N.js} +3 -3
  75. package/dist/chunks/{kodeHooks-R3YHG4ZI.js → kodeHooks-6SWQE5W7.js} +4 -4
  76. package/dist/chunks/{llm-C4F2Q7I2.js → llm-PONI6QWH.js} +47 -20
  77. package/dist/chunks/llm-PONI6QWH.js.map +7 -0
  78. package/dist/chunks/{llmLazy-IBED5LIH.js → llmLazy-O4T62IIT.js} +1 -1
  79. package/dist/chunks/{mcpCli-A744Z3FL.js → mcpCli-HIA4I4GG.js} +5 -5
  80. package/dist/chunks/{mentionProcessor-VV6DN2LJ.js → mentionProcessor-HH4EF7BE.js} +6 -6
  81. package/dist/chunks/{messages-ZR64JVON.js → messages-WKWCZBGM.js} +1 -1
  82. package/dist/chunks/{model-NPMMYL2U.js → model-4EIFU5QN.js} +5 -5
  83. package/dist/chunks/{openai-FEBNBOGM.js → openai-KTBJ2KNZ.js} +5 -5
  84. package/dist/chunks/{permissions-34CRWMCH.js → permissions-C3N4DKS2.js} +7 -7
  85. package/dist/chunks/{pluginRuntime-7YBUMVFI.js → pluginRuntime-2FKZLVA5.js} +3 -3
  86. package/dist/chunks/{pluginValidation-NZ4LOT3Q.js → pluginValidation-X5NZZCFA.js} +7 -7
  87. package/dist/chunks/registry-3UVW32YF.js +68 -0
  88. package/dist/chunks/{responsesStreaming-JNGE2P3D.js → responsesStreaming-LB4THIUM.js} +2 -2
  89. package/dist/chunks/{ripgrep-KGHLK4RO.js → ripgrep-N7O6M4IE.js} +4 -4
  90. package/dist/chunks/{runNonTextPrintMode-U3TKEYYN.js → runNonTextPrintMode-YFWCUTWZ.js} +12 -12
  91. package/dist/chunks/server-3CICV7EL.js +59 -0
  92. package/dist/chunks/server-FRP7OT4H.js +61 -0
  93. package/dist/chunks/{skillMarketplace-PPPUBC4N.js → skillMarketplace-4Y2H4JFK.js} +4 -4
  94. package/dist/chunks/{src-TVS6YABL.js → src-IETAWKYR.js} +30 -30
  95. package/dist/chunks/{src-QST7UD2A.js → src-OB2HE3RX.js} +27 -27
  96. package/dist/chunks/{src-DB7GKD4L.js → src-Y2IM2VKU.js} +78 -78
  97. package/dist/chunks/{thinking-O7LIIMFW.js → thinking-XG3FB4HO.js} +6 -6
  98. package/dist/chunks/{toolPermissionContext-UWGATCUZ.js → toolPermissionContext-RFYFDINH.js} +1 -1
  99. package/dist/chunks/{toolPermissionSettings-WD7CB37T.js → toolPermissionSettings-EEFURGBO.js} +5 -5
  100. package/dist/chunks/{useScreenLayout-PKLCMNZD.js → useScreenLayout-OUGQRR4I.js} +2 -2
  101. package/dist/chunks/{webOnlyMode-GJ6PQCPU.js → webOnlyMode-FRQBIAXG.js} +1 -1
  102. package/dist/entrypoints/cli.js +1 -1
  103. package/dist/entrypoints/daemon.js +1 -1
  104. package/dist/entrypoints/mcp.js +28 -28
  105. package/dist/index.js +5 -5
  106. package/dist/sdk/core.cjs +93 -34
  107. package/dist/sdk/core.cjs.map +3 -3
  108. package/dist/sdk/core.js +96 -37
  109. package/dist/sdk/core.js.map +4 -4
  110. package/dist/sdk/tools.cjs +1787 -1748
  111. package/dist/sdk/tools.cjs.map +4 -4
  112. package/dist/sdk/tools.js +1611 -1572
  113. package/dist/sdk/tools.js.map +4 -4
  114. package/package.json +1 -1
  115. package/dist/chunks/REPL-KD7YOSI5.js +0 -78
  116. package/dist/chunks/chunk-AKC4BUW5.js.map +0 -7
  117. package/dist/chunks/chunk-KKOES3YK.js.map +0 -7
  118. package/dist/chunks/chunk-LIBZWJEW.js.map +0 -7
  119. package/dist/chunks/chunk-LOCXPQNJ.js +0 -20
  120. package/dist/chunks/chunk-LOCXPQNJ.js.map +0 -7
  121. package/dist/chunks/chunk-TJMA65RL.js.map +0 -7
  122. package/dist/chunks/chunk-V3IXG64X.js.map +0 -7
  123. package/dist/chunks/chunk-VBGSHKHX.js.map +0 -7
  124. package/dist/chunks/chunk-Y33AS3MY.js.map +0 -7
  125. package/dist/chunks/chunk-YUXYJB45.js.map +0 -7
  126. package/dist/chunks/chunk-Z3J3WJ2K.js.map +0 -7
  127. package/dist/chunks/llm-C4F2Q7I2.js.map +0 -7
  128. package/dist/chunks/registry-FHPZ36EO.js +0 -68
  129. package/dist/chunks/server-Y42VR6YJ.js +0 -59
  130. package/dist/chunks/server-ZSC5G3TU.js +0 -61
  131. /package/dist/chunks/{Doctor-AES5ON33.js.map → Doctor-TWRIVOVW.js.map} +0 -0
  132. /package/dist/chunks/{LogList-PQJEJHHE.js.map → LogList-PUTPM24L.js.map} +0 -0
  133. /package/dist/chunks/{REPL-KD7YOSI5.js.map → REPL-YGIR5VXC.js.map} +0 -0
  134. /package/dist/chunks/{ResumeConversation-OWQ3DB4M.js.map → ResumeConversation-IJMKQXBU.js.map} +0 -0
  135. /package/dist/chunks/{ScreenFrame-AGLR6B4D.js.map → ScreenFrame-PQJRZ5DQ.js.map} +0 -0
  136. /package/dist/chunks/{agentLoader-BMWB4UKI.js.map → agentLoader-GOYNJTAO.js.map} +0 -0
  137. /package/dist/chunks/{agentsValidate-LSMJSFYW.js.map → agentsValidate-R26AKPAA.js.map} +0 -0
  138. /package/dist/chunks/{ask-3TSZR6AJ.js.map → ask-6SYVJONJ.js.map} +0 -0
  139. /package/dist/chunks/{autoUpdater-MEPC7LJF.js.map → autoUpdater-SDLJ5QSH.js.map} +0 -0
  140. /package/dist/chunks/{chunk-NC3RX5AB.js.map → chunk-2B2TR2S3.js.map} +0 -0
  141. /package/dist/chunks/{chunk-HDEYMVIJ.js.map → chunk-437YGKVA.js.map} +0 -0
  142. /package/dist/chunks/{chunk-WGMKKKS2.js.map → chunk-4BBWDSDC.js.map} +0 -0
  143. /package/dist/chunks/{chunk-PMC3BZ3M.js.map → chunk-5HZWM4JB.js.map} +0 -0
  144. /package/dist/chunks/{chunk-REQTXUXO.js.map → chunk-5LBRVQT5.js.map} +0 -0
  145. /package/dist/chunks/{chunk-BEDQTC44.js.map → chunk-5LL33G6X.js.map} +0 -0
  146. /package/dist/chunks/{chunk-MDCOIZVX.js.map → chunk-6C6VNA2D.js.map} +0 -0
  147. /package/dist/chunks/{chunk-P77NF36M.js.map → chunk-6CAQXUDY.js.map} +0 -0
  148. /package/dist/chunks/{chunk-DPQE5NA4.js.map → chunk-7SRIFZDJ.js.map} +0 -0
  149. /package/dist/chunks/{chunk-TI2CTTMA.js.map → chunk-7ZC22R33.js.map} +0 -0
  150. /package/dist/chunks/{chunk-EV56PDOI.js.map → chunk-AX3VXMUS.js.map} +0 -0
  151. /package/dist/chunks/{chunk-5MVUCX6O.js.map → chunk-AZHJLRRP.js.map} +0 -0
  152. /package/dist/chunks/{chunk-QBW7VU7C.js.map → chunk-DWKF6SQH.js.map} +0 -0
  153. /package/dist/chunks/{chunk-VSKGDU73.js.map → chunk-FKWFR23G.js.map} +0 -0
  154. /package/dist/chunks/{chunk-E6BU32L2.js.map → chunk-H5F7M5D3.js.map} +0 -0
  155. /package/dist/chunks/{chunk-DZPD6H7A.js.map → chunk-JXYXMP2Q.js.map} +0 -0
  156. /package/dist/chunks/{chunk-65FLXXMH.js.map → chunk-KA543BHH.js.map} +0 -0
  157. /package/dist/chunks/{chunk-MEQ7TAT7.js.map → chunk-KHMXPPO7.js.map} +0 -0
  158. /package/dist/chunks/{chunk-G5ET7GFB.js.map → chunk-KQV5FGSS.js.map} +0 -0
  159. /package/dist/chunks/{chunk-DPVCHIF7.js.map → chunk-KRBZO255.js.map} +0 -0
  160. /package/dist/chunks/{chunk-EKXQ7ZWV.js.map → chunk-L5ZJIOEF.js.map} +0 -0
  161. /package/dist/chunks/{chunk-UUJN5ZCN.js.map → chunk-LBHVWSUP.js.map} +0 -0
  162. /package/dist/chunks/{chunk-GL6HUBBX.js.map → chunk-LKDMUCWA.js.map} +0 -0
  163. /package/dist/chunks/{chunk-HJCYE2AS.js.map → chunk-LUZMHHQF.js.map} +0 -0
  164. /package/dist/chunks/{chunk-MXFN7OSL.js.map → chunk-MOGUUWKG.js.map} +0 -0
  165. /package/dist/chunks/{chunk-4UDKRYWZ.js.map → chunk-N4772IDQ.js.map} +0 -0
  166. /package/dist/chunks/{chunk-JJ67KF6A.js.map → chunk-PTIAF6KF.js.map} +0 -0
  167. /package/dist/chunks/{chunk-YUJB4WDK.js.map → chunk-PVMCLI36.js.map} +0 -0
  168. /package/dist/chunks/{chunk-3TLVYEGW.js.map → chunk-RTGKCKD3.js.map} +0 -0
  169. /package/dist/chunks/{chunk-3DBNJOZI.js.map → chunk-SUNG5KP5.js.map} +0 -0
  170. /package/dist/chunks/{chunk-Q55CB4Y4.js.map → chunk-WE7CQGRG.js.map} +0 -0
  171. /package/dist/chunks/{chunk-DELUVYKS.js.map → chunk-XVNEJVZC.js.map} +0 -0
  172. /package/dist/chunks/{chunk-KDY7XYYS.js.map → chunk-YQ3YJSMI.js.map} +0 -0
  173. /package/dist/chunks/{chunk-6CNJ3CYQ.js.map → chunk-YUZBVKVH.js.map} +0 -0
  174. /package/dist/chunks/{chunk-VJ2QSQ3E.js.map → chunk-ZXOTOID7.js.map} +0 -0
  175. /package/dist/chunks/{client-OWTJ7TPE.js.map → client-QUCHWMEW.js.map} +0 -0
  176. /package/dist/chunks/{customCommands-FA6HRXXV.js.map → customCommands-S6YGRUED.js.map} +0 -0
  177. /package/dist/chunks/{engine-UBCAVO7E.js.map → engine-FRDEQVDF.js.map} +0 -0
  178. /package/dist/chunks/{env-JIMGBRE2.js.map → env-YH77MILU.js.map} +0 -0
  179. /package/dist/chunks/{kodeAgentSessionLoad-BZRTCPMB.js.map → kodeAgentSessionLoad-TBPU4TWU.js.map} +0 -0
  180. /package/dist/chunks/{kodeAgentSessionResume-V3WB3OWQ.js.map → kodeAgentSessionResume-3CNE5T6N.js.map} +0 -0
  181. /package/dist/chunks/{kodeHooks-R3YHG4ZI.js.map → kodeHooks-6SWQE5W7.js.map} +0 -0
  182. /package/dist/chunks/{llmLazy-IBED5LIH.js.map → llmLazy-O4T62IIT.js.map} +0 -0
  183. /package/dist/chunks/{mcpCli-A744Z3FL.js.map → mcpCli-HIA4I4GG.js.map} +0 -0
  184. /package/dist/chunks/{mentionProcessor-VV6DN2LJ.js.map → mentionProcessor-HH4EF7BE.js.map} +0 -0
  185. /package/dist/chunks/{messages-ZR64JVON.js.map → messages-WKWCZBGM.js.map} +0 -0
  186. /package/dist/chunks/{model-NPMMYL2U.js.map → model-4EIFU5QN.js.map} +0 -0
  187. /package/dist/chunks/{openai-FEBNBOGM.js.map → openai-KTBJ2KNZ.js.map} +0 -0
  188. /package/dist/chunks/{permissions-34CRWMCH.js.map → permissions-C3N4DKS2.js.map} +0 -0
  189. /package/dist/chunks/{pluginRuntime-7YBUMVFI.js.map → pluginRuntime-2FKZLVA5.js.map} +0 -0
  190. /package/dist/chunks/{pluginValidation-NZ4LOT3Q.js.map → pluginValidation-X5NZZCFA.js.map} +0 -0
  191. /package/dist/chunks/{registry-FHPZ36EO.js.map → registry-3UVW32YF.js.map} +0 -0
  192. /package/dist/chunks/{responsesStreaming-JNGE2P3D.js.map → responsesStreaming-LB4THIUM.js.map} +0 -0
  193. /package/dist/chunks/{ripgrep-KGHLK4RO.js.map → ripgrep-N7O6M4IE.js.map} +0 -0
  194. /package/dist/chunks/{runNonTextPrintMode-U3TKEYYN.js.map → runNonTextPrintMode-YFWCUTWZ.js.map} +0 -0
  195. /package/dist/chunks/{server-Y42VR6YJ.js.map → server-3CICV7EL.js.map} +0 -0
  196. /package/dist/chunks/{server-ZSC5G3TU.js.map → server-FRP7OT4H.js.map} +0 -0
  197. /package/dist/chunks/{skillMarketplace-PPPUBC4N.js.map → skillMarketplace-4Y2H4JFK.js.map} +0 -0
  198. /package/dist/chunks/{src-TVS6YABL.js.map → src-IETAWKYR.js.map} +0 -0
  199. /package/dist/chunks/{src-QST7UD2A.js.map → src-OB2HE3RX.js.map} +0 -0
  200. /package/dist/chunks/{src-DB7GKD4L.js.map → src-Y2IM2VKU.js.map} +0 -0
  201. /package/dist/chunks/{thinking-O7LIIMFW.js.map → thinking-XG3FB4HO.js.map} +0 -0
  202. /package/dist/chunks/{toolPermissionContext-UWGATCUZ.js.map → toolPermissionContext-RFYFDINH.js.map} +0 -0
  203. /package/dist/chunks/{toolPermissionSettings-WD7CB37T.js.map → toolPermissionSettings-EEFURGBO.js.map} +0 -0
  204. /package/dist/chunks/{useScreenLayout-PKLCMNZD.js.map → useScreenLayout-OUGQRR4I.js.map} +0 -0
  205. /package/dist/chunks/{webOnlyMode-GJ6PQCPU.js.map → webOnlyMode-FRQBIAXG.js.map} +0 -0
@@ -6,8 +6,9 @@ import {
6
6
  import {
7
7
  buildSystemPromptForSession,
8
8
  runTurn
9
- } from "./chunk-Q55CB4Y4.js";
9
+ } from "./chunk-WE7CQGRG.js";
10
10
  import {
11
+ BashSpinner,
11
12
  ConfigScreen,
12
13
  ConsoleScreen,
13
14
  HelpScreen,
@@ -16,7 +17,6 @@ import {
16
17
  NotificationsScreen,
17
18
  OpenFileScreen,
18
19
  ProjectOnboarding,
19
- Spinner,
20
20
  TasksScreen,
21
21
  TodosScreen,
22
22
  TranscriptScreen,
@@ -28,7 +28,7 @@ import {
28
28
  markProjectOnboardingComplete,
29
29
  sendNotification,
30
30
  switchCwdForResume
31
- } from "./chunk-KKOES3YK.js";
31
+ } from "./chunk-4T5LR4P5.js";
32
32
  import {
33
33
  Cursor,
34
34
  Select,
@@ -36,18 +36,18 @@ import {
36
36
  TextInput,
37
37
  countWrappedLines,
38
38
  structuredDiffLines
39
- } from "./chunk-HJCYE2AS.js";
39
+ } from "./chunk-LUZMHHQF.js";
40
40
  import {
41
41
  getWindowedList
42
42
  } from "./chunk-YK3ZQM3C.js";
43
43
  import {
44
44
  useDoublePress,
45
45
  useExitOnCtrlCD
46
- } from "./chunk-5MVUCX6O.js";
46
+ } from "./chunk-AZHJLRRP.js";
47
47
  import {
48
48
  Doctor,
49
49
  KEYPRESS_PRIORITY
50
- } from "./chunk-JJ67KF6A.js";
50
+ } from "./chunk-PTIAF6KF.js";
51
51
  import {
52
52
  wrapLines
53
53
  } from "./chunk-7FPYAZAS.js";
@@ -58,7 +58,7 @@ import {
58
58
  setTerminalTitle,
59
59
  terminalCapabilityManager,
60
60
  useKeypress
61
- } from "./chunk-DELUVYKS.js";
61
+ } from "./chunk-XVNEJVZC.js";
62
62
  import {
63
63
  getCurrentOutputStyle,
64
64
  getCurrentOutputStyleDefinition,
@@ -66,44 +66,47 @@ import {
66
66
  } from "./chunk-OP5ZIKFR.js";
67
67
  import {
68
68
  subscribeCustomCommandReloads
69
- } from "./chunk-4UDKRYWZ.js";
69
+ } from "./chunk-N4772IDQ.js";
70
70
  import {
71
71
  Divider,
72
72
  ScreenFrame
73
- } from "./chunk-REQTXUXO.js";
73
+ } from "./chunk-5LBRVQT5.js";
74
74
  import {
75
75
  useScreenLayout
76
- } from "./chunk-DPQE5NA4.js";
76
+ } from "./chunk-7SRIFZDJ.js";
77
77
  import {
78
78
  useTerminalSize
79
- } from "./chunk-YUXYJB45.js";
79
+ } from "./chunk-5RCVEFJS.js";
80
80
  import {
81
81
  lastX
82
82
  } from "./chunk-QAXE37B5.js";
83
83
  import {
84
84
  AskUserQuestionTool,
85
- BLACK_CIRCLE,
86
85
  BashTool,
87
86
  BashToolResultMessage_default,
87
+ CHECKMARK,
88
+ CROSS,
89
+ DIAMOND_HOLLOW,
88
90
  ExitPlanModeTool,
89
91
  FileEditTool,
90
92
  GlobTool,
91
93
  GrepTool,
92
94
  MaxSizedText,
93
95
  NotebookEditTool,
96
+ RECORD_CIRCLE,
94
97
  SkillTool,
95
98
  SlashCommandTool,
96
99
  WebFetchTool,
97
100
  applyMarkdown,
98
101
  inputSchema,
99
102
  maybeTruncateVerboseToolOutput
100
- } from "./chunk-V3IXG64X.js";
103
+ } from "./chunk-WOMV4RCI.js";
101
104
  import {
102
105
  countTokens,
103
106
  getBinaryFeedbackResultForChoice,
104
107
  logBinaryFeedbackEvent,
105
108
  resolveToolNameAlias
106
- } from "./chunk-VBGSHKHX.js";
109
+ } from "./chunk-SVRXO73D.js";
107
110
  import {
108
111
  FileReadTool,
109
112
  FileWriteTool,
@@ -114,7 +117,7 @@ import {
114
117
  listBackgroundAgentTaskSnapshots,
115
118
  normalizeLineEndings,
116
119
  shouldTreatAsSpecialPaste
117
- } from "./chunk-LIBZWJEW.js";
120
+ } from "./chunk-BNSPVA24.js";
118
121
  import {
119
122
  detectFileEncoding,
120
123
  getMessagesSetter,
@@ -123,7 +126,7 @@ import {
123
126
  setMessagesSetter,
124
127
  setModelConfigChangeHandler,
125
128
  triggerModelConfigChange
126
- } from "./chunk-EKXQ7ZWV.js";
129
+ } from "./chunk-L5ZJIOEF.js";
127
130
  import {
128
131
  getCachedStringWidth
129
132
  } from "./chunk-UKNILZCN.js";
@@ -131,42 +134,45 @@ import {
131
134
  getActiveAgents,
132
135
  getAgentByType,
133
136
  subscribeAgentReloads
134
- } from "./chunk-HDEYMVIJ.js";
137
+ } from "./chunk-437YGKVA.js";
135
138
  import {
136
139
  AbortError,
140
+ MODE_CONFIGS,
137
141
  MalformedCommandError,
138
142
  applyToolPermissionContextUpdateForConversationKey,
139
143
  describeToolPermissionRuleSource,
140
144
  findUnreachablePermissionRules,
141
145
  getCommandSubcommandPrefix,
146
+ getNextPermissionMode,
142
147
  getToolPermissionContextForConversationKey,
143
148
  hasPermissionsToUseTool,
144
149
  isPathInWorkingDirectories,
145
150
  isUnsafeCompoundCommand,
151
+ normalizePermissionMode,
146
152
  savePermission,
147
153
  setPermissionModeForConversationKey,
148
154
  setToolPermissionContextForConversationKey,
149
155
  subscribeToolPermissionContextUpdates,
150
156
  toAbsolutePath
151
- } from "./chunk-TJMA65RL.js";
157
+ } from "./chunk-N5AH66UG.js";
152
158
  import {
153
159
  resolveToolDescription
154
- } from "./chunk-QBW7VU7C.js";
160
+ } from "./chunk-DWKF6SQH.js";
155
161
  import {
156
162
  getCodeStyle,
157
163
  getContext
158
- } from "./chunk-MEQ7TAT7.js";
164
+ } from "./chunk-KHMXPPO7.js";
159
165
  import {
160
166
  resetReminderSession
161
- } from "./chunk-DZPD6H7A.js";
167
+ } from "./chunk-JXYXMP2Q.js";
162
168
  import {
163
169
  getRequestStatus,
164
170
  subscribeRequestStatus
165
- } from "./chunk-LOCXPQNJ.js";
171
+ } from "./chunk-ESRGV7DC.js";
166
172
  import {
167
173
  applyToolPermissionContextUpdate,
168
174
  createDefaultToolPermissionContext
169
- } from "./chunk-4RVYYLN7.js";
175
+ } from "./chunk-E4C4N7OV.js";
170
176
  import {
171
177
  API_ERROR_MESSAGE_PREFIX,
172
178
  CANCEL_MESSAGE,
@@ -192,7 +198,7 @@ import {
192
198
  normalizeMessages,
193
199
  reorderMessages,
194
200
  stripSystemMessages
195
- } from "./chunk-Y33AS3MY.js";
201
+ } from "./chunk-L2LWCVUF.js";
196
202
  import {
197
203
  getTheme
198
204
  } from "./chunk-HDVL5VTM.js";
@@ -204,16 +210,16 @@ import {
204
210
  } from "./chunk-GJYXZ5IL.js";
205
211
  import {
206
212
  getDisableAllHooksState
207
- } from "./chunk-BEDQTC44.js";
213
+ } from "./chunk-5LL33G6X.js";
208
214
  import {
209
215
  getMaxThinkingTokens
210
- } from "./chunk-3DBNJOZI.js";
216
+ } from "./chunk-SUNG5KP5.js";
211
217
  import {
212
218
  getModelManager
213
- } from "./chunk-VSKGDU73.js";
219
+ } from "./chunk-FKWFR23G.js";
214
220
  import {
215
221
  debug
216
- } from "./chunk-KDY7XYYS.js";
222
+ } from "./chunk-YQ3YJSMI.js";
217
223
  import {
218
224
  PRODUCT_NAME,
219
225
  enterPlanModeForConversationKey,
@@ -227,14 +233,14 @@ import {
227
233
  overwriteLog,
228
234
  readPlanFile,
229
235
  setActivePlanConversationKey
230
- } from "./chunk-AKC4BUW5.js";
236
+ } from "./chunk-SOBWNYOW.js";
231
237
  import {
232
238
  getCwd,
233
239
  getOriginalCwd
234
240
  } from "./chunk-5ARRC2T2.js";
235
241
  import {
236
242
  MACRO
237
- } from "./chunk-P77NF36M.js";
243
+ } from "./chunk-6CAQXUDY.js";
238
244
  import {
239
245
  getKodeAgentSessionId
240
246
  } from "./chunk-SWQV4KSY.js";
@@ -259,7 +265,12 @@ import * as React80 from "react";
259
265
  // apps/cli/src/ui/screens/REPL/REPLView.tsx
260
266
  import { Box as Box53, Static, Text as Text56, measureElement as measureElement2 } from "ink";
261
267
  import * as React70 from "react";
262
- import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo25, useRef as useRef12, useState as useState21 } from "react";
268
+ import {
269
+ useLayoutEffect as useLayoutEffect2,
270
+ useMemo as useMemo24,
271
+ useRef as useRef12,
272
+ useState as useState22
273
+ } from "react";
263
274
 
264
275
  // apps/cli/src/ui/components/permissions/PermissionRequest.tsx
265
276
  import * as React19 from "react";
@@ -334,7 +345,6 @@ import * as React2 from "react";
334
345
  import { existsSync, readFileSync } from "fs";
335
346
  import { useMemo } from "react";
336
347
  import { Box as Box2, Text as Text2 } from "ink";
337
- import { relative } from "path";
338
348
  import figures from "figures";
339
349
  function FileEditToolDiff({
340
350
  file_path,
@@ -423,7 +433,7 @@ function FileEditToolDiff({
423
433
  );
424
434
  const topIndicator = window.showUpIndicator ? `${figures.arrowUp} More` : " ";
425
435
  const bottomIndicator = window.showDownIndicator ? `${figures.arrowDown} More` : " ";
426
- return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, wrap: "truncate-end" }, verbose ? file_path : relative(getCwd(), file_path)), enableScrolling ? /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, "PgUp/PgDn scroll \xB7 Home/End") : null, /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, topIndicator), diffLines.slice(window.start, window.end).map((line, idx) => /* @__PURE__ */ React2.createElement(Box2, { key: `${window.start + idx}` }, line)), /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, bottomIndicator)));
436
+ return /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column" }, /* @__PURE__ */ React2.createElement(Text2, { bold: true, wrap: "truncate-end" }, file_path), enableScrolling ? /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, "PgUp/PgDn scroll \xB7 Home/End") : null, /* @__PURE__ */ React2.createElement(Box2, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, topIndicator), diffLines.slice(window.start, window.end).map((line, idx) => /* @__PURE__ */ React2.createElement(Box2, { key: `${window.start + idx}` }, line)), /* @__PURE__ */ React2.createElement(Text2, { dimColor: true, wrap: "truncate-end" }, bottomIndicator)));
427
437
  }
428
438
 
429
439
  // apps/cli/src/ui/utils/permissionModeCycleShortcut.ts
@@ -475,107 +485,6 @@ import React3, {
475
485
  useRef
476
486
  } from "react";
477
487
 
478
- // packages/core/src/types/PermissionMode.ts
479
- var MODE_CONFIGS = {
480
- default: {
481
- name: "default",
482
- label: "Default",
483
- icon: "",
484
- color: "blue",
485
- description: "Standard permission checking",
486
- allowedTools: ["*"],
487
- restrictions: {
488
- readOnly: false,
489
- requireConfirmation: true,
490
- bypassValidation: false
491
- }
492
- },
493
- acceptEdits: {
494
- name: "acceptEdits",
495
- label: "Accept edits",
496
- icon: "\u23F5\u23F5",
497
- color: "green",
498
- description: "Auto-approve edit operations",
499
- allowedTools: ["*"],
500
- restrictions: {
501
- readOnly: false,
502
- requireConfirmation: false,
503
- bypassValidation: false
504
- }
505
- },
506
- plan: {
507
- name: "plan",
508
- label: "Plan Mode",
509
- icon: "\u23F8",
510
- color: "yellow",
511
- description: "Research and planning - read-only tools only",
512
- allowedTools: [
513
- "Read",
514
- "Grep",
515
- "Glob",
516
- "WebSearch",
517
- "WebFetch",
518
- "AskUserQuestion",
519
- "TodoWrite",
520
- "Write",
521
- "Edit",
522
- "ExitPlanMode",
523
- "KillShell",
524
- "TaskOutput",
525
- "ListMcpResourcesTool",
526
- "ReadMcpResourceTool",
527
- "mcp"
528
- ],
529
- restrictions: {
530
- readOnly: true,
531
- requireConfirmation: true,
532
- bypassValidation: false
533
- }
534
- },
535
- bypassPermissions: {
536
- name: "bypassPermissions",
537
- label: "Bypass Permissions",
538
- icon: "\u23F5\u23F5",
539
- color: "red",
540
- description: "All permissions bypassed",
541
- allowedTools: ["*"],
542
- restrictions: {
543
- readOnly: false,
544
- requireConfirmation: false,
545
- bypassValidation: true
546
- }
547
- },
548
- dontAsk: {
549
- name: "dontAsk",
550
- label: "Don't Ask",
551
- icon: "\u23F5\u23F5",
552
- color: "red",
553
- description: "Auto-deny permission prompts",
554
- allowedTools: ["*"],
555
- restrictions: {
556
- readOnly: false,
557
- requireConfirmation: true,
558
- bypassValidation: false
559
- }
560
- }
561
- };
562
- function getNextPermissionMode(currentMode, isBypassAvailable = true) {
563
- switch (currentMode) {
564
- case "default":
565
- return "acceptEdits";
566
- case "acceptEdits":
567
- return "plan";
568
- case "plan":
569
- return isBypassAvailable ? "bypassPermissions" : "default";
570
- case "bypassPermissions":
571
- return "default";
572
- case "dontAsk":
573
- return "default";
574
- default:
575
- return "default";
576
- }
577
- }
578
-
579
488
  // apps/cli/src/ui/contexts/permissionModeSideEffects.ts
580
489
  function __applyPermissionModeSideEffectsForTests(args) {
581
490
  const now = args.now ?? Date.now;
@@ -1391,7 +1300,7 @@ import * as React8 from "react";
1391
1300
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
1392
1301
  import { useMemo as useMemo6 } from "react";
1393
1302
  import { Box as Box7, Text as Text7 } from "ink";
1394
- import { extname as extname2, relative as relative2 } from "path";
1303
+ import { extname as extname2 } from "path";
1395
1304
  import figures2 from "figures";
1396
1305
  import wrapAnsi from "wrap-ansi";
1397
1306
  import { highlight, supportsLanguage } from "cli-highlight";
@@ -1511,7 +1420,7 @@ function FileWriteToolDiff({
1511
1420
  );
1512
1421
  const topIndicator = window.showUpIndicator ? `${figures2.arrowUp} More` : " ";
1513
1422
  const bottomIndicator = window.showDownIndicator ? `${figures2.arrowDown} More` : " ";
1514
- return /* @__PURE__ */ React8.createElement(Box7, { flexDirection: "column" }, /* @__PURE__ */ React8.createElement(Text7, { bold: true, wrap: "truncate-end" }, verbose ? file_path : relative2(getCwd(), file_path)), enableScrolling ? /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, "PgUp/PgDn scroll \xB7 Home/End") : null, /* @__PURE__ */ React8.createElement(Box7, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, topIndicator), previewLines.slice(window.start, window.end).map((line, idx) => /* @__PURE__ */ React8.createElement(Box7, { key: `${window.start + idx}` }, line)), /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, bottomIndicator)));
1423
+ return /* @__PURE__ */ React8.createElement(Box7, { flexDirection: "column" }, /* @__PURE__ */ React8.createElement(Text7, { bold: true, wrap: "truncate-end" }, file_path), enableScrolling ? /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, "PgUp/PgDn scroll \xB7 Home/End") : null, /* @__PURE__ */ React8.createElement(Box7, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, topIndicator), previewLines.slice(window.start, window.end).map((line, idx) => /* @__PURE__ */ React8.createElement(Box7, { key: `${window.start + idx}` }, line)), /* @__PURE__ */ React8.createElement(Text7, { dimColor: true, wrap: "truncate-end" }, bottomIndicator)));
1515
1424
  }
1516
1425
 
1517
1426
  // apps/cli/src/ui/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.tsx
@@ -3489,10 +3398,14 @@ function useStatusLine(input) {
3489
3398
  };
3490
3399
  tick().catch(() => {
3491
3400
  });
3401
+ const intervalId = setInterval(() => {
3402
+ tickRef.current?.();
3403
+ }, 1e3);
3492
3404
  return () => {
3493
3405
  alive = false;
3494
3406
  abortRef.current?.abort();
3495
3407
  tickRef.current = null;
3408
+ clearInterval(intervalId);
3496
3409
  };
3497
3410
  }, []);
3498
3411
  return state;
@@ -4884,25 +4797,19 @@ function useUnifiedCompletionNavigationKeys(args) {
4884
4797
  useKeypress(
4885
4798
  (inputChar, key) => {
4886
4799
  if (!args.isEnabled) return false;
4887
- const preferHistoryNavigation = !args.input.includes("\n") && !key.ctrl && !key.meta;
4800
+ const preferHistoryNavigation = !args.state.isActive && !args.input.includes("\n") && !key.ctrl && !key.meta;
4888
4801
  if (preferHistoryNavigation && (key.upArrow || key.downArrow)) {
4889
4802
  return false;
4890
4803
  }
4891
4804
  if (key.return && !key.shift && !key.meta && args.state.isActive && args.state.suggestions.length > 0) {
4892
- const selectedSuggestion = args.state.suggestions[args.state.selectedIndex];
4893
- if (selectedSuggestion && args.state.context) {
4894
- const preview = getPreviewText(selectedSuggestion, args.state.context);
4895
- const isDirectory = selectedSuggestion.value.endsWith("/");
4896
- const completion = `${preview}${isDirectory ? "" : " "}`;
4897
- const currentWord = args.input.slice(args.state.context.startPos);
4898
- const nextSpaceIndex = currentWord.indexOf(" ");
4899
- const actualEndPos = nextSpaceIndex === -1 ? args.input.length : args.state.context.startPos + nextSpaceIndex;
4900
- const newInput = args.input.slice(0, args.state.context.startPos) + completion + args.input.slice(actualEndPos);
4901
- args.onInputChange(newInput);
4902
- args.setCursorOffset(args.state.context.startPos + completion.length);
4805
+ if (args.state.preview?.isActive && args.state.context) {
4806
+ args.onInputChange(args.state.preview.originalInput);
4807
+ args.setCursorOffset(
4808
+ args.state.context.startPos + args.state.context.prefix.length
4809
+ );
4903
4810
  }
4904
4811
  args.resetCompletion();
4905
- return true;
4812
+ return false;
4906
4813
  }
4907
4814
  if (!args.state.isActive || args.state.suggestions.length === 0)
4908
4815
  return false;
@@ -5239,6 +5146,9 @@ function getPromptInputSpecialKeyAction(args) {
5239
5146
  if (args.inputChar === "\xA9" || optionOrMeta && (args.inputChar === "g" || args.inputChar === "G")) {
5240
5147
  return "externalEditor";
5241
5148
  }
5149
+ if (args.inputChar === "\xF7" || optionOrMeta && args.inputChar === "/" || args.key.tab && optionOrMeta && !args.key.shift) {
5150
+ return "bashModeToggle";
5151
+ }
5242
5152
  return null;
5243
5153
  }
5244
5154
 
@@ -5314,7 +5224,8 @@ function UserBashInputMessage({
5314
5224
  if (!input) {
5315
5225
  return null;
5316
5226
  }
5317
- return /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column", marginTop: addMargin ? 1 : 0, width: "100%" }, /* @__PURE__ */ React20.createElement(Box18, null, /* @__PURE__ */ React20.createElement(Text18, { color: getTheme().bashBorder }, "!"), /* @__PURE__ */ React20.createElement(Text18, { color: getTheme().secondaryText }, " ", input)));
5227
+ const theme = getTheme();
5228
+ return /* @__PURE__ */ React20.createElement(Box18, { flexDirection: "column", marginTop: addMargin ? 1 : 0, width: "100%" }, /* @__PURE__ */ React20.createElement(Box18, null, /* @__PURE__ */ React20.createElement(Text18, { color: theme.bashBorder, bold: true }, "$"), /* @__PURE__ */ React20.createElement(Text18, { bold: true }, " ", input)));
5318
5229
  }
5319
5230
 
5320
5231
  // apps/cli/src/ui/components/messages/UserBackgroundTaskInputMessage.tsx
@@ -5502,7 +5413,7 @@ async function processUserInput(input, mode, setToolJSX, context, pastedImages)
5502
5413
  type: "text"
5503
5414
  }
5504
5415
  }
5505
- ), /* @__PURE__ */ React22.createElement(Spinner, null)),
5416
+ ), /* @__PURE__ */ React22.createElement(BashSpinner, null)),
5506
5417
  shouldHidePromptInput: false
5507
5418
  });
5508
5419
  try {
@@ -5623,12 +5534,12 @@ async function processUserInput(input, mode, setToolJSX, context, pastedImages)
5623
5534
  ${input}` : input;
5624
5535
  if (processedInput.includes("!`") || processedInput.includes("@")) {
5625
5536
  try {
5626
- const { executeBashCommands } = await import("./customCommands-FA6HRXXV.js");
5537
+ const { executeBashCommands } = await import("./customCommands-S6YGRUED.js");
5627
5538
  if (processedInput.includes("!`")) {
5628
5539
  processedInput = await executeBashCommands(processedInput);
5629
5540
  }
5630
5541
  if (processedInput.includes("@")) {
5631
- const { processMentions } = await import("./mentionProcessor-VV6DN2LJ.js");
5542
+ const { processMentions } = await import("./mentionProcessor-HH4EF7BE.js");
5632
5543
  await processMentions(processedInput);
5633
5544
  }
5634
5545
  } catch (error) {
@@ -5809,7 +5720,7 @@ function extractMessageText(content) {
5809
5720
  }
5810
5721
  async function interpretHashCommand(input) {
5811
5722
  try {
5812
- const { queryQuick } = await import("./llm-C4F2Q7I2.js");
5723
+ const { queryQuick } = await import("./llm-PONI6QWH.js");
5813
5724
  const systemPrompt = [
5814
5725
  "You're helping the user structure notes that will be added to their AGENTS.md file.",
5815
5726
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -5972,6 +5883,11 @@ async function submitPrompt(args) {
5972
5883
  }
5973
5884
  }
5974
5885
 
5886
+ // apps/cli/src/ui/components/PromptInput/types.ts
5887
+ function toggleBashMode(current) {
5888
+ return current === "bash" ? "prompt" : "bash";
5889
+ }
5890
+
5975
5891
  // apps/cli/src/ui/components/PromptInput/PromptInputView.tsx
5976
5892
  import { Box as Box26, Text as Text25 } from "ink";
5977
5893
  import * as React29 from "react";
@@ -5980,72 +5896,77 @@ import * as React29 from "react";
5980
5896
  import React23 from "react";
5981
5897
  import { Box as Box21, Text as Text20 } from "ink";
5982
5898
  function __getModeIndicatorDisplayForTests(args) {
5983
- if (args.mode === "default") {
5984
- return {
5985
- shouldRender: false,
5986
- color: args.theme.text,
5987
- mainText: "",
5988
- shortcutHintText: ""
5989
- };
5990
- }
5991
- const icon = getModeIndicatorIcon(args.mode);
5992
- const label = getModeIndicatorLabel(args.mode).toLowerCase();
5993
- const color = getModeIndicatorColor(args.theme, args.mode);
5899
+ const normalized = normalizePermissionMode(args.mode);
5900
+ const icon = getModeIndicatorIcon(normalized);
5901
+ const label = getModeIndicatorLabel(normalized).toLowerCase();
5902
+ const color = getModeIndicatorColor(args.theme, normalized);
5994
5903
  return {
5995
5904
  shouldRender: true,
5996
5905
  color,
5997
- mainText: `${icon} ${label} on`,
5906
+ mainText: icon ? `${icon} ${label} mode` : `${label} mode`,
5998
5907
  shortcutHintText: ` (${args.shortcutDisplayText} to cycle)`
5999
5908
  };
6000
5909
  }
6001
5910
  function getModeIndicatorLabel(mode) {
6002
- switch (mode) {
6003
- case "default":
6004
- return "Default";
5911
+ switch (normalizePermissionMode(mode)) {
5912
+ case "yolo":
5913
+ return "YOLO";
5914
+ case "cautious":
5915
+ return "Ask";
6005
5916
  case "plan":
6006
- return "Plan Mode";
5917
+ return "Plan";
6007
5918
  case "acceptEdits":
6008
- return "Accept edits";
5919
+ return "Accept Edits";
6009
5920
  case "bypassPermissions":
6010
- return "Bypass Permissions";
5921
+ return "Bypass";
6011
5922
  case "dontAsk":
6012
5923
  return "Don't Ask";
5924
+ default:
5925
+ return "Unknown";
6013
5926
  }
6014
5927
  }
6015
5928
  function getModeIndicatorIcon(mode) {
6016
- switch (mode) {
6017
- case "default":
5929
+ switch (normalizePermissionMode(mode)) {
5930
+ case "yolo":
6018
5931
  return "";
5932
+ case "cautious":
5933
+ return "??";
6019
5934
  case "plan":
6020
- return "\u23F8";
5935
+ return "||";
6021
5936
  case "acceptEdits":
5937
+ return ">>";
6022
5938
  case "bypassPermissions":
5939
+ return "\u{1F680}";
6023
5940
  case "dontAsk":
6024
- return "\u23F5\u23F5";
5941
+ return "X";
5942
+ default:
5943
+ return "";
6025
5944
  }
6026
5945
  }
6027
5946
  function getModeIndicatorColor(theme, mode) {
6028
- switch (mode) {
6029
- case "default":
6030
- return theme.text;
5947
+ switch (normalizePermissionMode(mode)) {
5948
+ case "yolo":
5949
+ return theme.secondaryText;
5950
+ case "cautious":
5951
+ return theme.warning;
6031
5952
  case "plan":
6032
- return theme.planMode;
5953
+ return theme.success;
6033
5954
  case "acceptEdits":
6034
5955
  return theme.autoAccept;
6035
5956
  case "bypassPermissions":
6036
5957
  case "dontAsk":
6037
5958
  return theme.error;
5959
+ default:
5960
+ return theme.secondaryText;
6038
5961
  }
6039
5962
  }
6040
5963
  function CompactModeIndicator() {
6041
5964
  const { currentMode } = usePermissionContext();
6042
5965
  const theme = getTheme();
6043
5966
  const shortcut = getPermissionModeCycleShortcut();
6044
- if (currentMode === "default") {
6045
- return null;
6046
- }
5967
+ const normalized = normalizePermissionMode(currentMode);
6047
5968
  const indicator = __getModeIndicatorDisplayForTests({
6048
- mode: currentMode,
5969
+ mode: normalized,
6049
5970
  shortcutDisplayText: shortcut.displayText,
6050
5971
  theme
6051
5972
  });
@@ -6104,11 +6025,12 @@ var SuggestionItem = React26.memo(
6104
6025
  return /* @__PURE__ */ React26.createElement(Box23, { flexDirection: "row" }, /* @__PURE__ */ React26.createElement(
6105
6026
  Text22,
6106
6027
  {
6028
+ bold: true,
6107
6029
  color: displayColor,
6108
6030
  dimColor: !isSelected && !displayColor,
6109
6031
  wrap: "truncate-end"
6110
6032
  },
6111
- isSelected ? "\u25C6 " : " ",
6033
+ isSelected ? "> " : " ",
6112
6034
  suggestion.displayValue
6113
6035
  ));
6114
6036
  },
@@ -6454,7 +6376,7 @@ function PromptInputView({
6454
6376
  borderRight: false,
6455
6377
  borderColor: mode === "bash" || mode === "background" ? theme.bashBorder : mode === "koding" ? theme.notingBorder : theme.inputBorder,
6456
6378
  borderDimColor: false,
6457
- borderStyle: "classic",
6379
+ borderStyle: "single",
6458
6380
  width: "100%"
6459
6381
  },
6460
6382
  /* @__PURE__ */ React29.createElement(
@@ -6464,9 +6386,9 @@ function PromptInputView({
6464
6386
  alignSelf: "flex-start",
6465
6387
  flexWrap: "nowrap",
6466
6388
  justifyContent: "flex-start",
6467
- width: 3
6389
+ width: 2
6468
6390
  },
6469
- mode === "bash" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.bashBorder }, "\xA0!\xA0") : mode === "background" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.bashBorder }, "\xA0&\xA0") : mode === "koding" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.noting }, "\xA0#\xA0") : /* @__PURE__ */ React29.createElement(Text25, { color: isLoading ? theme.secondaryText : void 0 }, "K>\xA0")
6391
+ mode === "bash" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.bashBorder }, "$\xA0") : mode === "background" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.bashBorder }, "&\xA0") : mode === "koding" ? /* @__PURE__ */ React29.createElement(Text25, { color: theme.noting }, "#\xA0") : /* @__PURE__ */ React29.createElement(Text25, { color: isLoading ? theme.secondaryText : void 0 }, "\u276F", "\xA0")
6470
6392
  ),
6471
6393
  /* @__PURE__ */ React29.createElement(Box26, { paddingRight: 1 }, /* @__PURE__ */ React29.createElement(
6472
6394
  TextInput,
@@ -6600,18 +6522,6 @@ function exit() {
6600
6522
  setTerminalTitle("");
6601
6523
  process.exit(0);
6602
6524
  }
6603
- function toPromptMode(value) {
6604
- if (value.startsWith("!")) return { mode: "bash", text: value.slice(1) };
6605
- if (value.startsWith("&")) return { mode: "background", text: value.slice(1) };
6606
- if (value.startsWith("#")) return { mode: "koding", text: value.slice(1) };
6607
- return { mode: "prompt", text: value };
6608
- }
6609
- function __adjustCursorOffsetForPromptPrefixForTests(args) {
6610
- if (args.nextText === args.value) return args.previousOffset;
6611
- const removedChars = Math.max(0, args.value.length - args.nextText.length);
6612
- if (removedChars === 0) return args.previousOffset;
6613
- return Math.max(0, args.previousOffset - removedChars);
6614
- }
6615
6525
  function PromptInput({
6616
6526
  commands,
6617
6527
  forkNumber,
@@ -6714,18 +6624,21 @@ function PromptInput({
6714
6624
  const onChange = useCallback14(
6715
6625
  (value) => {
6716
6626
  onHistoryUserInputRef.current();
6717
- const next = toPromptMode(value);
6718
- if (next.mode !== mode) onModeChange(next.mode);
6719
- onInputChange(next.text);
6720
- if (next.text !== value) {
6721
- setCursorOffset(
6722
- (prev) => __adjustCursorOffsetForPromptPrefixForTests({
6723
- value,
6724
- nextText: next.text,
6725
- previousOffset: prev
6726
- })
6727
- );
6627
+ if (mode === "prompt") {
6628
+ if (value.startsWith("!") || value.startsWith("$")) {
6629
+ onModeChange("bash");
6630
+ return;
6631
+ }
6632
+ if (value.startsWith("&")) {
6633
+ onModeChange("background");
6634
+ return;
6635
+ }
6636
+ if (value.startsWith("#")) {
6637
+ onModeChange("koding");
6638
+ return;
6639
+ }
6728
6640
  }
6641
+ onInputChange(value);
6729
6642
  },
6730
6643
  [mode, onInputChange, onModeChange]
6731
6644
  );
@@ -6849,7 +6762,7 @@ function PromptInput({
6849
6762
  if (editorMode === "vim" && vimMode === "INSERT") {
6850
6763
  parts.push("-- INSERT --");
6851
6764
  } else if (mode === "bash") {
6852
- parts.push("! bash");
6765
+ parts.push("$ bash");
6853
6766
  } else if (mode === "background") {
6854
6767
  parts.push("& background");
6855
6768
  } else if (mode === "koding") {
@@ -7108,21 +7021,34 @@ function PromptInput({
7108
7021
  })
7109
7022
  });
7110
7023
  onHistoryUserInputRef.current = onUserInput;
7111
- const hasShownHistorySearchHintRef = useRef7(false);
7024
+ const historyHintTimeoutRef = useRef7(null);
7025
+ const lastHistoryHintTimeRef = useRef7(0);
7112
7026
  useEffect17(() => {
7113
- if (hasShownHistorySearchHintRef.current) return;
7114
7027
  if (historyIndex < 2) return;
7115
- hasShownHistorySearchHintRef.current = true;
7028
+ const now = Date.now();
7029
+ if (now - lastHistoryHintTimeRef.current < 1e4) return;
7030
+ if (historyHintTimeoutRef.current) {
7031
+ clearTimeout(historyHintTimeoutRef.current);
7032
+ historyHintTimeoutRef.current = null;
7033
+ }
7034
+ lastHistoryHintTimeRef.current = now;
7116
7035
  handleInlineMessage(true, "Tip: Ctrl+R to search history");
7117
- const timeoutId = setTimeout(() => {
7036
+ historyHintTimeoutRef.current = setTimeout(() => {
7118
7037
  setMessage((prev) => {
7119
7038
  if (!prev.show) return prev;
7120
7039
  if (prev.text !== "Tip: Ctrl+R to search history") return prev;
7121
7040
  return { show: false };
7122
7041
  });
7123
- }, 3e3);
7124
- return () => clearTimeout(timeoutId);
7042
+ historyHintTimeoutRef.current = null;
7043
+ }, 5e3);
7125
7044
  }, [handleInlineMessage, historyIndex]);
7045
+ useEffect17(() => {
7046
+ return () => {
7047
+ if (historyHintTimeoutRef.current) {
7048
+ clearTimeout(historyHintTimeoutRef.current);
7049
+ }
7050
+ };
7051
+ }, []);
7126
7052
  const handleHistoryUp = () => {
7127
7053
  if (completionActive) resetCompletion();
7128
7054
  onHistoryUp();
@@ -7164,6 +7090,10 @@ function PromptInput({
7164
7090
  cycleMode();
7165
7091
  return true;
7166
7092
  }
7093
+ if (action === "bashModeToggle") {
7094
+ onModeChange(toggleBashMode(mode));
7095
+ return true;
7096
+ }
7167
7097
  if (action === "modelSwitch") {
7168
7098
  handleQuickModelSwitch();
7169
7099
  return true;
@@ -7238,8 +7168,10 @@ function PromptInput({
7238
7168
  handleQuickModelSwitch,
7239
7169
  isEditingExternally,
7240
7170
  isLoading,
7171
+ mode,
7241
7172
  modeCycleShortcut,
7242
7173
  onInputChange,
7174
+ onModeChange,
7243
7175
  input,
7244
7176
  textInputColumns,
7245
7177
  vimMode
@@ -7486,16 +7418,9 @@ function PromptInput({
7486
7418
  setCursorOffset(snapshot.cursorOffset);
7487
7419
  return true;
7488
7420
  }
7489
- if ((mode === "bash" || mode === "background") && (key.backspace || key.delete)) {
7490
- if (input === "") onModeChange("prompt");
7491
- return;
7492
- }
7493
- if (mode === "koding" && (key.backspace || key.delete)) {
7494
- if (input === "") onModeChange("prompt");
7495
- return;
7496
- }
7497
- if (inputChar === "" && (key.escape || key.backspace || key.delete)) {
7421
+ if ((mode === "bash" || mode === "background" || mode === "koding") && input === "" && (key.backspace || key.delete || key.escape)) {
7498
7422
  onModeChange("prompt");
7423
+ return true;
7499
7424
  }
7500
7425
  if (key.escape && !isLoading && mode === "prompt" && !completionVisible && input.length === 0 && pastedTexts.length === 0 && pastedImages.length === 0) {
7501
7426
  setClearInputPending(false);
@@ -7566,38 +7491,66 @@ var PromptInput_default = memo2(PromptInput);
7566
7491
 
7567
7492
  // apps/cli/src/ui/components/RequestStatusIndicator.tsx
7568
7493
  import { Box as Box27, Text as Text26 } from "ink";
7569
- import React31, { useEffect as useEffect18, useMemo as useMemo18, useRef as useRef8, useState as useState16 } from "react";
7570
- var CHARACTERS = process.platform === "darwin" ? ["\xB7", "\u2722", "\u2733", "\u2217", "\u273B", "\u273D"] : ["\xB7", "\u2722", "*", "\u2217", "\u273B", "\u273D"];
7494
+ import React31, { useEffect as useEffect18, useRef as useRef8, useState as useState16 } from "react";
7495
+ var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
7571
7496
  function getLabel(status) {
7572
7497
  switch (status.kind) {
7573
7498
  case "thinking":
7574
- return "Thinking";
7499
+ return "Prefilling";
7575
7500
  case "streaming":
7576
- return "Streaming";
7577
- case "tool":
7578
- return status.detail ? `Running tool: ${status.detail}` : "Running tool";
7579
- case "idle":
7580
- return "Working";
7501
+ return "Decoding";
7502
+ default:
7503
+ return "";
7581
7504
  }
7582
7505
  }
7506
+ function formatDuration(seconds) {
7507
+ if (seconds < 60) {
7508
+ return `${seconds}s`;
7509
+ }
7510
+ if (seconds < 3600) {
7511
+ const minutes2 = Math.floor(seconds / 60);
7512
+ const secs2 = seconds % 60;
7513
+ return `${minutes2}m ${secs2}s`;
7514
+ }
7515
+ const hours = Math.floor(seconds / 3600);
7516
+ const minutes = Math.floor(seconds % 3600 / 60);
7517
+ const secs = seconds % 60;
7518
+ return `${hours}h ${minutes}m ${secs}s`;
7519
+ }
7520
+ function formatTokens(tokens) {
7521
+ if (tokens >= 1e3) {
7522
+ return `${(tokens / 1e3).toFixed(1)}k`;
7523
+ }
7524
+ return tokens.toString();
7525
+ }
7526
+ function getTokenDisplay(status) {
7527
+ if (status.kind === "thinking" && status.inputTokens) {
7528
+ return ` \xB7 \u2191 ${formatTokens(status.inputTokens)}`;
7529
+ }
7530
+ if (status.kind === "streaming" && status.outputTokens !== void 0) {
7531
+ return ` \xB7 \u2193 ${formatTokens(status.outputTokens)}`;
7532
+ }
7533
+ return "";
7534
+ }
7583
7535
  function RequestStatusIndicator() {
7584
- const frames = useMemo18(
7585
- () => [...CHARACTERS, ...[...CHARACTERS].reverse()],
7586
- []
7587
- );
7536
+ const frames = SPINNER_FRAMES;
7588
7537
  const theme = getTheme();
7589
7538
  const [frame, setFrame] = useState16(0);
7590
7539
  const [elapsedTime, setElapsedTime] = useState16(0);
7591
7540
  const [status, setStatus] = useState16(() => getRequestStatus());
7592
- const requestStartTime = useRef8(null);
7541
+ const requestStartTime = useRef8(Date.now());
7593
7542
  useEffect18(() => {
7543
+ const initialStatus = getRequestStatus();
7544
+ if (initialStatus.kind !== "idle") {
7545
+ requestStartTime.current = Date.now();
7546
+ }
7594
7547
  return subscribeRequestStatus((next) => {
7595
7548
  setStatus(next);
7596
- if (next.kind !== "idle" && requestStartTime.current === null) {
7597
- requestStartTime.current = Date.now();
7549
+ if (next.kind !== "idle") {
7550
+ setElapsedTime(Math.floor((Date.now() - requestStartTime.current) / 1e3));
7598
7551
  }
7599
7552
  if (next.kind === "idle") {
7600
- requestStartTime.current = null;
7553
+ requestStartTime.current = Date.now();
7601
7554
  setElapsedTime(0);
7602
7555
  }
7603
7556
  });
@@ -7605,20 +7558,19 @@ function RequestStatusIndicator() {
7605
7558
  useEffect18(() => {
7606
7559
  const timer = setInterval(() => {
7607
7560
  setFrame((f) => (f + 1) % frames.length);
7608
- }, 120);
7561
+ }, 80);
7609
7562
  return () => clearInterval(timer);
7610
7563
  }, [frames.length]);
7611
7564
  useEffect18(() => {
7612
7565
  const timer = setInterval(() => {
7613
- if (requestStartTime.current === null) {
7614
- setElapsedTime(0);
7615
- return;
7616
- }
7617
7566
  setElapsedTime(Math.floor((Date.now() - requestStartTime.current) / 1e3));
7618
- }, 250);
7567
+ }, 1e3);
7619
7568
  return () => clearInterval(timer);
7620
7569
  }, []);
7621
- return /* @__PURE__ */ React31.createElement(Box27, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React31.createElement(Box27, { flexWrap: "nowrap", height: 1, width: 2 }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.kode }, frames[frame])), /* @__PURE__ */ React31.createElement(Text26, { color: theme.kode }, getLabel(status), "\u2026 "), /* @__PURE__ */ React31.createElement(Text26, { color: theme.secondaryText }, "(", elapsedTime, "s \xB7 ", /* @__PURE__ */ React31.createElement(Text26, { bold: true }, "esc"), " to interrupt)"));
7570
+ if (status.kind === "tool" || status.kind === "idle") {
7571
+ return null;
7572
+ }
7573
+ return /* @__PURE__ */ React31.createElement(Box27, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React31.createElement(Text26, { color: theme.kode, bold: true }, frames[frame], " ", getLabel(status)), /* @__PURE__ */ React31.createElement(Text26, { color: theme.secondaryText }, " ", ":: ", formatDuration(elapsedTime), " (Esc to interrupt)", getTokenDisplay(status)));
7622
7574
  }
7623
7575
 
7624
7576
  // apps/cli/src/ui/components/CostThresholdDialog.tsx
@@ -7687,7 +7639,7 @@ import { default as React68, useCallback as useCallback16 } from "react";
7687
7639
  import chalk10 from "chalk";
7688
7640
  import { Box as Box51, Text as Text54 } from "ink";
7689
7641
  import Link2 from "ink-link";
7690
- import React67, { useState as useState19 } from "react";
7642
+ import React67, { useState as useState20 } from "react";
7691
7643
 
7692
7644
  // apps/cli/src/ui/components/Message.tsx
7693
7645
  import { Box as Box49 } from "ink";
@@ -7726,7 +7678,7 @@ function FallbackToolUseRejectedMessage() {
7726
7678
  }
7727
7679
 
7728
7680
  // apps/cli/src/ui/components/messages/UserToolResultMessage/utils.tsx
7729
- import { useMemo as useMemo19 } from "react";
7681
+ import { useMemo as useMemo18 } from "react";
7730
7682
  function asRecord3(value) {
7731
7683
  if (!value || typeof value !== "object") return null;
7732
7684
  if (Array.isArray(value)) return null;
@@ -7759,7 +7711,7 @@ function getToolUseFromMessages(toolUseID, messages) {
7759
7711
  return toolUse;
7760
7712
  }
7761
7713
  function useGetToolFromMessages(toolUseID, tools, messages) {
7762
- return useMemo19(() => {
7714
+ return useMemo18(() => {
7763
7715
  const toolUse = getToolUseFromMessages(toolUseID, messages);
7764
7716
  if (!toolUse) {
7765
7717
  throw new ReferenceError(
@@ -7846,7 +7798,7 @@ function renderTaskOutputToolResultMessage(output, { verbose }) {
7846
7798
  import { Box as Box35, Text as Text37 } from "ink";
7847
7799
  import * as React42 from "react";
7848
7800
  import { readFileSync as readFileSync4 } from "fs";
7849
- import { isAbsolute, relative as relative4, resolve as resolve3 } from "path";
7801
+ import { isAbsolute, resolve as resolve3 } from "path";
7850
7802
 
7851
7803
  // apps/cli/src/ui/components/FileEditToolUpdatedMessage.tsx
7852
7804
  import { Box as Box34, Text as Text36 } from "ink";
@@ -7858,7 +7810,6 @@ function intersperse(as, separator) {
7858
7810
  }
7859
7811
 
7860
7812
  // apps/cli/src/ui/components/FileEditToolUpdatedMessage.tsx
7861
- import { relative as relative3 } from "path";
7862
7813
  var MAX_HUNKS_TO_RENDER = 4;
7863
7814
  var MAX_DIFF_LINES_TO_RENDER = 200;
7864
7815
  function truncateHunks(hunks) {
@@ -7909,7 +7860,7 @@ function FileEditToolUpdatedMessage({
7909
7860
  0
7910
7861
  );
7911
7862
  const diff = React41.useMemo(() => truncateHunks(patches), [patches]);
7912
- return /* @__PURE__ */ React41.createElement(Box34, { flexDirection: "column" }, /* @__PURE__ */ React41.createElement(Text36, null, " ", "\u23BF Updated", " ", /* @__PURE__ */ React41.createElement(Text36, { bold: true }, verbose ? filePath : relative3(getCwd(), filePath)), numAdditions > 0 || numRemovals > 0 ? " with " : "", numAdditions > 0 ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Text36, { bold: true }, numAdditions), " ", numAdditions > 1 ? "additions" : "addition") : null, numAdditions > 0 && numRemovals > 0 ? " and " : null, numRemovals > 0 ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Text36, { bold: true }, numRemovals), " ", numRemovals > 1 ? "removals" : "removal") : null), verbose && diff.hunks.length > 0 && intersperse(
7863
+ return /* @__PURE__ */ React41.createElement(Box34, { flexDirection: "column" }, /* @__PURE__ */ React41.createElement(Text36, null, " ", "\u23BF Updated ", /* @__PURE__ */ React41.createElement(Text36, { bold: true }, filePath), numAdditions > 0 || numRemovals > 0 ? " with " : "", numAdditions > 0 ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Text36, { bold: true }, numAdditions), " ", numAdditions > 1 ? "additions" : "addition") : null, numAdditions > 0 && numRemovals > 0 ? " and " : null, numRemovals > 0 ? /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Text36, { bold: true }, numRemovals), " ", numRemovals > 1 ? "removals" : "removal") : null), verbose && diff.hunks.length > 0 && intersperse(
7913
7864
  diff.hunks.map((_) => /* @__PURE__ */ React41.createElement(Box34, { flexDirection: "column", paddingLeft: 5, key: _.newStart }, /* @__PURE__ */ React41.createElement(StructuredDiff, { patch: _, dim: false, width: columns - 12 }))),
7914
7865
  (i) => /* @__PURE__ */ React41.createElement(Box34, { paddingLeft: 5, key: `ellipsis-${i}` }, /* @__PURE__ */ React41.createElement(Text36, { color: getTheme().secondaryText }, "..."))
7915
7866
  ), verbose && diff.hiddenLines > 0 && /* @__PURE__ */ React41.createElement(Box34, { paddingLeft: 5, marginTop: 1 }, /* @__PURE__ */ React41.createElement(Text36, { color: getTheme().secondaryText }, "... (+", diff.hiddenLines, " more diff lines hidden)")));
@@ -7963,7 +7914,7 @@ function renderFileEditToolUseRejectedMessage(input = {}, options = {
7963
7914
  oldStr: originalFile,
7964
7915
  newStr: updatedFile
7965
7916
  });
7966
- return /* @__PURE__ */ React42.createElement(Box35, { flexDirection: "column" }, /* @__PURE__ */ React42.createElement(Text37, null, " ", "\u23BF", " ", /* @__PURE__ */ React42.createElement(Text37, { color: getTheme().error }, "User rejected ", old_string === "" ? "write" : "update", " to", " "), /* @__PURE__ */ React42.createElement(Text37, { bold: true }, verbose ? file_path : relative4(getCwd(), file_path))), intersperse(
7917
+ return /* @__PURE__ */ React42.createElement(Box35, { flexDirection: "column" }, /* @__PURE__ */ React42.createElement(Text37, null, " ", "\u23BF", " ", /* @__PURE__ */ React42.createElement(Text37, { color: getTheme().error }, "User rejected ", old_string === "" ? "write" : "update", " to", " "), /* @__PURE__ */ React42.createElement(Text37, { bold: true }, fullFilePath)), intersperse(
7967
7918
  patch.map((patch2) => /* @__PURE__ */ React42.createElement(Box35, { flexDirection: "column", paddingLeft: 5, key: patch2.newStart }, /* @__PURE__ */ React42.createElement(StructuredDiff, { patch: patch2, dim: true, width: columns - 12 }))),
7968
7919
  (i) => /* @__PURE__ */ React42.createElement(Box35, { paddingLeft: 5, key: `ellipsis-${i}` }, /* @__PURE__ */ React42.createElement(Text37, { color: getTheme().secondaryText }, "..."))
7969
7920
  ));
@@ -7978,14 +7929,14 @@ import { Box as Box36, Text as Text39 } from "ink";
7978
7929
  import * as React44 from "react";
7979
7930
  import { readFileSync as readFileSync5 } from "fs";
7980
7931
  import { EOL } from "os";
7981
- import { extname as extname4, isAbsolute as isAbsolute2, relative as relative5, resolve as resolve4 } from "path";
7932
+ import { extname as extname4, isAbsolute as isAbsolute2, relative as relative3, resolve as resolve4 } from "path";
7982
7933
 
7983
7934
  // apps/cli/src/ui/components/HighlightedCode.tsx
7984
7935
  import { highlight as highlight2, supportsLanguage as supportsLanguage2 } from "cli-highlight";
7985
7936
  import { Text as Text38 } from "ink";
7986
- import React43, { useMemo as useMemo21 } from "react";
7937
+ import React43, { useMemo as useMemo20 } from "react";
7987
7938
  function HighlightedCode({ code, language }) {
7988
- const highlightedCode = useMemo21(() => {
7939
+ const highlightedCode = useMemo20(() => {
7989
7940
  try {
7990
7941
  if (supportsLanguage2(language)) {
7991
7942
  return highlight2(code, { language });
@@ -8015,7 +7966,7 @@ function renderFileWriteToolResultMessage(output, options) {
8015
7966
  case "create": {
8016
7967
  const contentWithFallback = output.content || "(No content)";
8017
7968
  const numLines = output.content.split(EOL).length;
8018
- return /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column" }, /* @__PURE__ */ React44.createElement(Text39, null, " ", "\u23BF Wrote ", numLines, " lines to", " ", /* @__PURE__ */ React44.createElement(Text39, { bold: true }, verbose ? output.filePath : relative5(getCwd(), output.filePath))), /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column", paddingLeft: 5 }, /* @__PURE__ */ React44.createElement(
7969
+ return /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column" }, /* @__PURE__ */ React44.createElement(Text39, null, " ", "\u23BF Wrote ", numLines, " lines to", " ", /* @__PURE__ */ React44.createElement(Text39, { bold: true }, output.filePath)), /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column", paddingLeft: 5 }, /* @__PURE__ */ React44.createElement(
8019
7970
  HighlightedCode,
8020
7971
  {
8021
7972
  code: verbose ? contentWithFallback : contentWithFallback.split("\n").slice(0, MAX_LINES_TO_RENDER).filter((_) => _.trim() !== "").join("\n"),
@@ -8055,7 +8006,7 @@ function renderFileWriteToolUseRejectedMessage(input = {}, options = {
8055
8006
  oldStr: oldContent ?? "",
8056
8007
  newStr: content ?? ""
8057
8008
  });
8058
- return /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column" }, /* @__PURE__ */ React44.createElement(Text39, null, " ", "\u23BF", " ", /* @__PURE__ */ React44.createElement(Text39, { color: getTheme().error }, "User rejected ", type === "update" ? "update" : "write", " to", " "), /* @__PURE__ */ React44.createElement(Text39, { bold: true }, verbose ? file_path : relative5(getCwd(), file_path))), intersperse(
8009
+ return /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column" }, /* @__PURE__ */ React44.createElement(Text39, null, " ", "\u23BF", " ", /* @__PURE__ */ React44.createElement(Text39, { color: getTheme().error }, "User rejected ", type === "update" ? "update" : "write", " to", " "), /* @__PURE__ */ React44.createElement(Text39, { bold: true }, verbose ? file_path : relative3(getCwd(), file_path))), intersperse(
8059
8010
  patch.map((_) => /* @__PURE__ */ React44.createElement(Box36, { flexDirection: "column", paddingLeft: 5, key: _.newStart }, /* @__PURE__ */ React44.createElement(StructuredDiff, { patch: _, dim: true, width: columns - 12 }))),
8060
8011
  (i) => /* @__PURE__ */ React44.createElement(Box36, { paddingLeft: 5, key: `ellipsis-${i}` }, /* @__PURE__ */ React44.createElement(Text39, { color: getTheme().secondaryText }, "..."))
8061
8012
  ));
@@ -8234,20 +8185,30 @@ function useInterval(callback, delay) {
8234
8185
  }
8235
8186
 
8236
8187
  // apps/cli/src/ui/components/ToolUseLoader.tsx
8188
+ var SPINNER_FRAMES2 = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
8237
8189
  function ToolUseLoader({
8238
8190
  isError,
8239
8191
  isUnresolved,
8240
8192
  shouldAnimate
8241
8193
  }) {
8242
- const [isVisible, setIsVisible] = React49.useState(true);
8194
+ const [frameIndex, setFrameIndex] = React49.useState(0);
8243
8195
  useInterval(() => {
8244
8196
  if (!shouldAnimate) {
8245
8197
  return;
8246
8198
  }
8247
- setIsVisible((_) => !_);
8248
- }, 600);
8249
- const color = isUnresolved ? getTheme().secondaryText : isError ? getTheme().error : getTheme().success;
8250
- return /* @__PURE__ */ React49.createElement(Box38, { minWidth: 2 }, /* @__PURE__ */ React49.createElement(Text41, { color }, isVisible ? BLACK_CIRCLE : " "));
8199
+ setFrameIndex((i) => (i + 1) % SPINNER_FRAMES2.length);
8200
+ }, 80);
8201
+ const theme = getTheme();
8202
+ if (shouldAnimate) {
8203
+ return /* @__PURE__ */ React49.createElement(Box38, { minWidth: 2 }, /* @__PURE__ */ React49.createElement(Text41, { color: theme.kode }, SPINNER_FRAMES2[frameIndex], " "));
8204
+ }
8205
+ if (isError) {
8206
+ return /* @__PURE__ */ React49.createElement(Box38, { minWidth: 2 }, /* @__PURE__ */ React49.createElement(Text41, { color: theme.error }, CROSS, " "));
8207
+ }
8208
+ if (isUnresolved) {
8209
+ return /* @__PURE__ */ React49.createElement(Box38, { minWidth: 2 }, /* @__PURE__ */ React49.createElement(Text41, { color: theme.secondaryText }, DIAMOND_HOLLOW, " "));
8210
+ }
8211
+ return /* @__PURE__ */ React49.createElement(Box38, { minWidth: 2 }, /* @__PURE__ */ React49.createElement(Text41, { color: "green" }, CHECKMARK, " "));
8251
8212
  }
8252
8213
 
8253
8214
  // packages/tools/src/tools/ai/ThinkTool/ThinkTool.tsx
@@ -8301,12 +8262,21 @@ var ThinkTool = {
8301
8262
  };
8302
8263
 
8303
8264
  // apps/cli/src/ui/components/messages/AssistantThinkingMessage.tsx
8304
- import React51 from "react";
8265
+ import React51, { useState as useState17, useEffect as useEffect20 } from "react";
8305
8266
  import { Box as Box39, Text as Text43 } from "ink";
8267
+ var PROGRESS_FRAMES = ["/", "-", "\\", "|"];
8306
8268
  function AssistantThinkingMessage({
8307
8269
  param: { thinking },
8308
8270
  addMargin = false
8309
8271
  }) {
8272
+ const [progressFrame, setProgressFrame] = useState17(0);
8273
+ const theme = getTheme();
8274
+ useEffect20(() => {
8275
+ const timer = setInterval(() => {
8276
+ setProgressFrame((f) => (f + 1) % PROGRESS_FRAMES.length);
8277
+ }, 150);
8278
+ return () => clearInterval(timer);
8279
+ }, []);
8310
8280
  if (!thinking || thinking.trim().length === 0) {
8311
8281
  return null;
8312
8282
  }
@@ -8318,21 +8288,21 @@ function AssistantThinkingMessage({
8318
8288
  marginTop: addMargin ? 1 : 0,
8319
8289
  width: "100%"
8320
8290
  },
8321
- /* @__PURE__ */ React51.createElement(Text43, { color: getTheme().secondaryText, italic: true }, "\u273B Thinking\u2026"),
8322
- /* @__PURE__ */ React51.createElement(Box39, { paddingLeft: 2 }, /* @__PURE__ */ React51.createElement(Text43, { color: getTheme().secondaryText, italic: true }, applyMarkdown(thinking)))
8291
+ /* @__PURE__ */ React51.createElement(Text43, { color: theme.kode, bold: true }, "\u25C6", " [Thinking ", PROGRESS_FRAMES[progressFrame], "]"),
8292
+ /* @__PURE__ */ React51.createElement(Box39, { paddingLeft: 2 }, /* @__PURE__ */ React51.createElement(Text43, { color: theme.secondaryText, italic: true }, applyMarkdown(thinking)))
8323
8293
  );
8324
8294
  }
8325
8295
 
8326
8296
  // apps/cli/src/ui/components/messages/TaskToolMessage.tsx
8327
- import React52, { useEffect as useEffect20, useState as useState17, useMemo as useMemo22 } from "react";
8297
+ import React52, { useEffect as useEffect21, useState as useState18, useMemo as useMemo21 } from "react";
8328
8298
  import { Text as Text44 } from "ink";
8329
8299
  var agentConfigCache = /* @__PURE__ */ new Map();
8330
8300
  function TaskToolMessage({ agentType, children, bold = true }) {
8331
8301
  const theme = getTheme();
8332
- const [agentConfig, setAgentConfig] = useState17(() => {
8302
+ const [agentConfig, setAgentConfig] = useState18(() => {
8333
8303
  return agentConfigCache.get(agentType) || null;
8334
8304
  });
8335
- useEffect20(() => {
8305
+ useEffect21(() => {
8336
8306
  if (agentConfigCache.has(agentType)) {
8337
8307
  setAgentConfig(agentConfigCache.get(agentType));
8338
8308
  return;
@@ -8352,7 +8322,7 @@ function TaskToolMessage({ agentType, children, bold = true }) {
8352
8322
  mounted = false;
8353
8323
  };
8354
8324
  }, [agentType]);
8355
- const color = useMemo22(() => {
8325
+ const color = useMemo21(() => {
8356
8326
  return agentConfig?.color || theme.text;
8357
8327
  }, [agentConfig?.color, theme.text]);
8358
8328
  return /* @__PURE__ */ React52.createElement(Text44, { color, bold }, children);
@@ -8383,6 +8353,7 @@ function AssistantToolUseMessage({
8383
8353
  shouldAnimate,
8384
8354
  shouldShowDot
8385
8355
  }) {
8356
+ const theme = getTheme();
8386
8357
  const resolvedName = resolveToolNameAlias(param.name).resolvedName;
8387
8358
  const tool = tools.find((_) => _.name === resolvedName);
8388
8359
  if (!tool) {
@@ -8390,7 +8361,8 @@ function AssistantToolUseMessage({
8390
8361
  return null;
8391
8362
  }
8392
8363
  const isQueued = !inProgressToolUseIDs.has(param.id) && unresolvedToolUseIDs.has(param.id);
8393
- const color = isQueued ? getTheme().secondaryText : void 0;
8364
+ const isError = erroredToolUseIDs.has(param.id);
8365
+ const isInProgress = inProgressToolUseIDs.has(param.id);
8394
8366
  if (tool === ThinkTool) {
8395
8367
  const { thought } = ThinkTool.inputSchema.parse(param.input);
8396
8368
  return /* @__PURE__ */ React53.createElement(
@@ -8410,6 +8382,8 @@ function AssistantToolUseMessage({
8410
8382
  if (!hasToolName && !hasToolMessage) {
8411
8383
  return null;
8412
8384
  }
8385
+ const toolNameColor = isQueued ? theme.secondaryText : isError ? theme.error : theme.kode;
8386
+ const paramColor = theme.secondaryText;
8413
8387
  return /* @__PURE__ */ React53.createElement(
8414
8388
  Box40,
8415
8389
  {
@@ -8418,39 +8392,31 @@ function AssistantToolUseMessage({
8418
8392
  marginTop: addMargin ? 1 : 0,
8419
8393
  width: "100%"
8420
8394
  },
8421
- /* @__PURE__ */ React53.createElement(Box40, null, /* @__PURE__ */ React53.createElement(
8422
- Box40,
8395
+ /* @__PURE__ */ React53.createElement(Box40, null, /* @__PURE__ */ React53.createElement(Box40, { flexWrap: "nowrap" }, shouldShowDot && /* @__PURE__ */ React53.createElement(
8396
+ ToolUseLoader,
8423
8397
  {
8424
- flexWrap: "nowrap",
8425
- minWidth: userFacingToolName.length + (shouldShowDot ? 2 : 0)
8426
- },
8427
- shouldShowDot && (isQueued ? /* @__PURE__ */ React53.createElement(Box40, { minWidth: 2 }, /* @__PURE__ */ React53.createElement(Text45, { color }, BLACK_CIRCLE)) : /* @__PURE__ */ React53.createElement(
8428
- ToolUseLoader,
8429
- {
8430
- shouldAnimate,
8431
- isUnresolved: unresolvedToolUseIDs.has(param.id),
8432
- isError: erroredToolUseIDs.has(param.id)
8433
- }
8434
- )),
8435
- tool.name === "Task" && param.input ? /* @__PURE__ */ React53.createElement(
8436
- TaskToolMessage,
8437
- {
8438
- agentType: parsedInput.success ? getSubagentType(parsedInput.data) ?? "general-purpose" : "general-purpose",
8439
- bold: Boolean(!isQueued),
8440
- children: String(userFacingToolName || "")
8441
- }
8442
- ) : hasToolName && /* @__PURE__ */ React53.createElement(Text45, { color, bold: !isQueued, wrap: "truncate-end" }, userFacingToolName)
8443
- ), /* @__PURE__ */ React53.createElement(Box40, { flexWrap: "nowrap" }, hasToolMessage && (() => {
8398
+ shouldAnimate,
8399
+ isUnresolved: unresolvedToolUseIDs.has(param.id),
8400
+ isError
8401
+ }
8402
+ ), tool.name === "Task" && param.input ? /* @__PURE__ */ React53.createElement(
8403
+ TaskToolMessage,
8404
+ {
8405
+ agentType: parsedInput.success ? getSubagentType(parsedInput.data) ?? "general-purpose" : "general-purpose",
8406
+ bold: !isQueued,
8407
+ children: String(userFacingToolName || "")
8408
+ }
8409
+ ) : hasToolName && /* @__PURE__ */ React53.createElement(Text45, { color: toolNameColor, bold: !isQueued, wrap: "truncate-end" }, userFacingToolName)), /* @__PURE__ */ React53.createElement(Box40, { flexWrap: "nowrap" }, hasToolMessage && (() => {
8444
8410
  if (React53.isValidElement(toolMessage)) {
8445
8411
  if (!hasToolName) return toolMessage;
8446
- return /* @__PURE__ */ React53.createElement(Box40, { flexDirection: "row" }, /* @__PURE__ */ React53.createElement(Text45, { color }, "("), toolMessage, /* @__PURE__ */ React53.createElement(Text45, { color }, ")"));
8412
+ return /* @__PURE__ */ React53.createElement(Box40, { flexDirection: "row" }, /* @__PURE__ */ React53.createElement(Text45, { color: paramColor }, "("), toolMessage, /* @__PURE__ */ React53.createElement(Text45, { color: paramColor }, ")"));
8447
8413
  }
8448
8414
  if (typeof toolMessage !== "string") return null;
8449
8415
  if (!hasToolName) {
8450
- return /* @__PURE__ */ React53.createElement(Text45, { color, wrap: "truncate-end" }, toolMessage);
8416
+ return /* @__PURE__ */ React53.createElement(Text45, { color: paramColor, wrap: "truncate-end" }, toolMessage);
8451
8417
  }
8452
- return /* @__PURE__ */ React53.createElement(Text45, { color, wrap: "truncate-end" }, "(", toolMessage, ")");
8453
- })(), /* @__PURE__ */ React53.createElement(Text45, { color, wrap: "truncate-end" }, "\u2026"))),
8418
+ return /* @__PURE__ */ React53.createElement(Text45, { color: paramColor, wrap: "truncate-end" }, "(", toolMessage, ")");
8419
+ })(), isInProgress && /* @__PURE__ */ React53.createElement(Text45, { color: paramColor, wrap: "truncate-end" }, "..."))),
8454
8420
  /* @__PURE__ */ React53.createElement(Cost, { costUSD, durationMs, debug: debug2 })
8455
8421
  );
8456
8422
  }
@@ -8484,15 +8450,32 @@ function AssistantBashOutputMessage({
8484
8450
  // apps/cli/src/ui/components/messages/AssistantBackgroundTaskOutputMessage.tsx
8485
8451
  import { Box as Box41, Text as Text46 } from "ink";
8486
8452
  import * as React55 from "react";
8453
+ var MAX_RENDERED_LINES2 = 5;
8454
+ function renderTruncatedContent(lines, maxLines = MAX_RENDERED_LINES2) {
8455
+ if (lines.length <= maxLines) {
8456
+ return { lines, truncated: false, hiddenCount: 0 };
8457
+ }
8458
+ return {
8459
+ lines: lines.slice(-maxLines),
8460
+ truncated: true,
8461
+ hiddenCount: lines.length - maxLines
8462
+ };
8463
+ }
8487
8464
  function AssistantBackgroundTaskOutputMessage({
8488
- content
8465
+ content,
8466
+ verbose = false
8489
8467
  }) {
8490
8468
  const message = extractTag(content, "background-task-output");
8491
8469
  if (!message) {
8492
8470
  return null;
8493
8471
  }
8494
- const lines = message.split(/\r?\n/);
8495
- return /* @__PURE__ */ React55.createElement(Box41, { flexDirection: "column" }, lines.map((line, index) => /* @__PURE__ */ React55.createElement(Box41, { key: index, flexDirection: "row" }, /* @__PURE__ */ React55.createElement(Text46, null, "\xA0\xA0\u23BF \xA0", /* @__PURE__ */ React55.createElement(Text46, { color: getTheme().secondaryText }, line)))));
8472
+ const theme = getTheme();
8473
+ const allLines = message.split(/\r?\n/).filter((l) => l.trim().length > 0);
8474
+ if (allLines.length === 0) {
8475
+ return null;
8476
+ }
8477
+ const { lines, truncated, hiddenCount } = verbose ? { lines: allLines, truncated: false, hiddenCount: 0 } : renderTruncatedContent(allLines);
8478
+ return /* @__PURE__ */ React55.createElement(Box41, { flexDirection: "column" }, truncated && /* @__PURE__ */ React55.createElement(Box41, { flexDirection: "row" }, /* @__PURE__ */ React55.createElement(Text46, { color: theme.secondaryText }, "\xA0\xA0\u23BF \xA0... ", hiddenCount, " lines hidden, showing last", " ", MAX_RENDERED_LINES2, " lines")), lines.map((line, index) => /* @__PURE__ */ React55.createElement(Box41, { key: index, flexDirection: "row" }, /* @__PURE__ */ React55.createElement(Text46, null, "\xA0\xA0\u23BF \xA0", /* @__PURE__ */ React55.createElement(Text46, { color: theme.secondaryText }, line)))));
8496
8479
  }
8497
8480
 
8498
8481
  // apps/cli/src/ui/components/messages/AssistantLocalCommandOutputMessage.tsx
@@ -8545,7 +8528,7 @@ import { Box as Box43, Text as Text48 } from "ink";
8545
8528
 
8546
8529
  // apps/cli/src/ui/contexts/TransientViewportContext.tsx
8547
8530
  import * as React57 from "react";
8548
- import { useCallback as useCallback15, useMemo as useMemo23, useRef as useRef10 } from "react";
8531
+ import { useCallback as useCallback15, useMemo as useMemo22, useRef as useRef10 } from "react";
8549
8532
  var TransientViewportContext = React57.createContext({});
8550
8533
  function TransientViewportProvider({
8551
8534
  value,
@@ -8621,7 +8604,7 @@ function AssistantTextMessage({
8621
8604
  );
8622
8605
  }
8623
8606
  if (text.startsWith("<background-task-output")) {
8624
- return /* @__PURE__ */ React58.createElement(AssistantBackgroundTaskOutputMessage, { content: text });
8607
+ return /* @__PURE__ */ React58.createElement(AssistantBackgroundTaskOutputMessage, { content: text, verbose });
8625
8608
  }
8626
8609
  if (text.startsWith("<local-command-stdout") || text.startsWith("<local-command-stderr")) {
8627
8610
  return /* @__PURE__ */ React58.createElement(
@@ -8662,7 +8645,7 @@ function AssistantTextMessage({
8662
8645
  marginTop: addMargin ? 1 : 0,
8663
8646
  width: "100%"
8664
8647
  },
8665
- /* @__PURE__ */ React58.createElement(Box43, { flexDirection: "row" }, shouldShowDot && /* @__PURE__ */ React58.createElement(Box43, { minWidth: 2 }, /* @__PURE__ */ React58.createElement(Text48, { color: getTheme().text }, BLACK_CIRCLE)), /* @__PURE__ */ React58.createElement(Box43, { flexDirection: "column", width: contentWidth }, maxHeight ? /* @__PURE__ */ React58.createElement(
8648
+ /* @__PURE__ */ React58.createElement(Box43, { flexDirection: "row" }, shouldShowDot && /* @__PURE__ */ React58.createElement(Box43, { minWidth: 2 }, /* @__PURE__ */ React58.createElement(Text48, { color: getTheme().kode }, RECORD_CIRCLE)), /* @__PURE__ */ React58.createElement(Box43, { flexDirection: "column", width: contentWidth }, maxHeight ? /* @__PURE__ */ React58.createElement(
8666
8649
  MaxSizedText,
8667
8650
  {
8668
8651
  text: content,
@@ -8719,7 +8702,7 @@ function UserPromptMessage({
8719
8702
  return null;
8720
8703
  }
8721
8704
  const theme = getTheme();
8722
- return /* @__PURE__ */ React61.createElement(Box46, { flexDirection: "row", marginTop: addMargin ? 1 : 0, width: "100%" }, /* @__PURE__ */ React61.createElement(Box46, { minWidth: 2, width: 2 }, /* @__PURE__ */ React61.createElement(Text51, { color: theme.kode }, ">")), /* @__PURE__ */ React61.createElement(Box46, { flexDirection: "column", width: columns - 4 }, /* @__PURE__ */ React61.createElement(Text51, { color: theme.kode, wrap: "wrap" }, text)));
8705
+ return /* @__PURE__ */ React61.createElement(Box46, { flexDirection: "row", marginTop: addMargin ? 1 : 0, width: "100%" }, /* @__PURE__ */ React61.createElement(Box46, { minWidth: 2, width: 2 }, /* @__PURE__ */ React61.createElement(Text51, { color: theme.kode, bold: true }, "\u276F")), /* @__PURE__ */ React61.createElement(Box46, { flexDirection: "column", width: columns - 4 }, /* @__PURE__ */ React61.createElement(Text51, { color: theme.kode, bold: true, wrap: "wrap" }, text)));
8723
8706
  }
8724
8707
 
8725
8708
  // apps/cli/src/ui/components/messages/UserTextMessage.tsx
@@ -9060,8 +9043,8 @@ function BinaryFeedbackView({
9060
9043
  }) {
9061
9044
  const theme = getTheme();
9062
9045
  const { rows, columns } = useTerminalSize();
9063
- const [focused, setFocus] = useState19("no-preference");
9064
- const [focusValue, setFocusValue] = useState19(void 0);
9046
+ const [focused, setFocus] = useState20("no-preference");
9047
+ const [focusValue, setFocusValue] = useState20(void 0);
9065
9048
  const exitState = useExitOnCtrlCD(() => process.exit(1));
9066
9049
  const panelHeight = Math.max(1, rows - 2);
9067
9050
  useKeypress((_input, key) => {
@@ -9192,7 +9175,7 @@ function BinaryFeedback({
9192
9175
  // apps/cli/src/ui/components/MessageSelector.tsx
9193
9176
  import { Box as Box52, Text as Text55 } from "ink";
9194
9177
  import * as React69 from "react";
9195
- import { useEffect as useEffect21, useMemo as useMemo24, useState as useState20 } from "react";
9178
+ import { useEffect as useEffect22, useMemo as useMemo23, useState as useState21 } from "react";
9196
9179
  import figures8 from "figures";
9197
9180
  import { randomUUID } from "crypto";
9198
9181
  var MAX_VISIBLE_MESSAGES = 7;
@@ -9234,7 +9217,7 @@ function MessageSelector({
9234
9217
  onSelect,
9235
9218
  onEscape
9236
9219
  }) {
9237
- const currentUUID = useMemo24(() => randomUUID(), []);
9220
+ const currentUUID = useMemo23(() => randomUUID(), []);
9238
9221
  const { rows } = useTerminalSize();
9239
9222
  function handleSelect(message) {
9240
9223
  onSelect(message);
@@ -9242,7 +9225,7 @@ function MessageSelector({
9242
9225
  function handleEscape() {
9243
9226
  onEscape();
9244
9227
  }
9245
- const allItems = useMemo24(() => {
9228
+ const allItems = useMemo23(() => {
9246
9229
  const filtered = messages.filter(
9247
9230
  (message) => message.type === "user" && !isToolResultOnlyMessage(message)
9248
9231
  );
@@ -9251,8 +9234,8 @@ function MessageSelector({
9251
9234
  { ...createUserMessage(""), uuid: currentUUID }
9252
9235
  ];
9253
9236
  }, [messages, currentUUID]);
9254
- const [selectedIndex, setSelectedIndex] = useState20(allItems.length - 1);
9255
- useEffect21(() => {
9237
+ const [selectedIndex, setSelectedIndex] = useState21(allItems.length - 1);
9238
+ useEffect22(() => {
9256
9239
  setSelectedIndex((previous) => {
9257
9240
  if (allItems.length === 0) return 0;
9258
9241
  return Math.min(previous, allItems.length - 1);
@@ -9335,11 +9318,11 @@ function MessageSelector({
9335
9318
 
9336
9319
  // apps/cli/src/ui/hooks/useFlickerDetector.ts
9337
9320
  import { measureElement } from "ink";
9338
- import { useCallback as useCallback17, useEffect as useEffect22, useRef as useRef11 } from "react";
9321
+ import { useCallback as useCallback17, useEffect as useEffect23, useRef as useRef11 } from "react";
9339
9322
  var MIN_MEASURE_INTERVAL_MS = 100;
9340
9323
  function useFlickerDetector(rootUiRef, terminalHeight, enabled) {
9341
9324
  const lastMeasureRef = useRef11(0);
9342
- useEffect22(() => {
9325
+ useEffect23(() => {
9343
9326
  if (!enabled) return;
9344
9327
  if (!rootUiRef.current) return;
9345
9328
  if (!Number.isFinite(terminalHeight) || terminalHeight <= 0) return;
@@ -9405,8 +9388,8 @@ function REPLView({
9405
9388
  const hasToolUseConfirm = Boolean(toolUseConfirm);
9406
9389
  const hasBinaryFeedback = Boolean(binaryFeedbackContext);
9407
9390
  const hasToast = Boolean(toast);
9408
- const [mainControlsHeight, setMainControlsHeight] = useState21(0);
9409
- const [messageSelectorHeight, setMessageSelectorHeight] = useState21(0);
9391
+ const [mainControlsHeight, setMainControlsHeight] = useState22(0);
9392
+ const [messageSelectorHeight, setMessageSelectorHeight] = useState22(0);
9410
9393
  useLayoutEffect2(() => {
9411
9394
  if (rows <= 0 || columns <= 0) return;
9412
9395
  const measureKey = [
@@ -9459,7 +9442,7 @@ function REPLView({
9459
9442
  1,
9460
9443
  rows - mainControlsHeight - messageSelectorHeight - VIEWPORT_SAFE_MARGIN_ROWS
9461
9444
  );
9462
- const transientViewportValue = useMemo25(
9445
+ const transientViewportValue = useMemo24(
9463
9446
  () => ({ maxHeight: transientMaxHeight }),
9464
9447
  [transientMaxHeight]
9465
9448
  );
@@ -9469,7 +9452,7 @@ function REPLView({
9469
9452
  conversationKey,
9470
9453
  isBypassPermissionsModeAvailable: !safeMode
9471
9454
  },
9472
- isFullScreenToolView && toolJSX ? /* @__PURE__ */ React70.createElement(Box53, { ref: rootUiRef, flexDirection: "column", width: "100%" }, toolJSX.jsx) : /* @__PURE__ */ React70.createElement(Box53, { ref: rootUiRef, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React70.createElement(React70.Fragment, { key: `static-messages-${forkNumber}` }, /* @__PURE__ */ React70.createElement(Static, { items: staticItems, children: (item) => item.jsx })), /* @__PURE__ */ React70.createElement(Box53, { flexDirection: "column", width: "100%" }, transientItems.map((item) => item.jsx)), /* @__PURE__ */ React70.createElement(
9455
+ isFullScreenToolView && toolJSX ? /* @__PURE__ */ React70.createElement(Box53, { ref: rootUiRef, flexDirection: "column", width: "100%" }, toolJSX.jsx) : /* @__PURE__ */ React70.createElement(Box53, { ref: rootUiRef, flexDirection: "column", width: "100%" }, /* @__PURE__ */ React70.createElement(Static, { key: `static-${forkNumber}`, items: staticItems }, (item) => item.jsx), /* @__PURE__ */ React70.createElement(Box53, { flexDirection: "column", width: "100%" }, transientItems.map((item) => item.jsx), !toolJSX && !toolUseConfirm && !binaryFeedbackContext && isLoading && /* @__PURE__ */ React70.createElement(RequestStatusIndicator, null)), /* @__PURE__ */ React70.createElement(
9473
9456
  Box53,
9474
9457
  {
9475
9458
  ref: mainControlsRef,
@@ -9479,7 +9462,6 @@ function REPLView({
9479
9462
  width: "100%"
9480
9463
  },
9481
9464
  toast && !toolUseConfirm && !toolJSX && !binaryFeedbackContext && /* @__PURE__ */ React70.createElement(Box53, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React70.createElement(Text56, { color: "yellow", dimColor: true, wrap: "truncate-end" }, toast)),
9482
- !toolJSX && !toolUseConfirm && !binaryFeedbackContext && isLoading && /* @__PURE__ */ React70.createElement(RequestStatusIndicator, null),
9483
9465
  toolJSX ? toolJSX.jsx : null,
9484
9466
  !toolJSX && binaryFeedbackContext && !isMessageSelectorVisible && /* @__PURE__ */ React70.createElement(
9485
9467
  BinaryFeedback,
@@ -9532,13 +9514,13 @@ function REPLView({
9532
9514
  // apps/cli/src/ui/screens/REPL/useReplController.tsx
9533
9515
  import { Box as Box61 } from "ink";
9534
9516
  import * as React79 from "react";
9535
- import { useCallback as useCallback28, useEffect as useEffect28, useMemo as useMemo32, useRef as useRef17, useState as useState26 } from "react";
9517
+ import { useCallback as useCallback28, useEffect as useEffect29, useMemo as useMemo31, useRef as useRef17, useState as useState27 } from "react";
9536
9518
  import ReactReconciler from "react-reconciler";
9537
9519
 
9538
9520
  // apps/cli/src/ui/hooks/useCostSummary.ts
9539
- import { useEffect as useEffect23 } from "react";
9521
+ import { useEffect as useEffect24 } from "react";
9540
9522
  function useCostSummary() {
9541
- useEffect23(() => {
9523
+ useEffect24(() => {
9542
9524
  return registerCostSummaryOnExit();
9543
9525
  }, []);
9544
9526
  }
@@ -9687,9 +9669,9 @@ function useCanUseTool(setToolUseConfirm, options) {
9687
9669
  var useCanUseTool_default = useCanUseTool;
9688
9670
 
9689
9671
  // apps/cli/src/ui/hooks/useLogMessages.ts
9690
- import { useEffect as useEffect24 } from "react";
9672
+ import { useEffect as useEffect25 } from "react";
9691
9673
  function useLogMessages(messages, messageLogName, forkNumber) {
9692
- useEffect24(() => {
9674
+ useEffect25(() => {
9693
9675
  overwriteLog(
9694
9676
  getMessagesPath(messageLogName, forkNumber, 0),
9695
9677
  messages.filter((_) => _.type !== "progress"),
@@ -9699,7 +9681,7 @@ function useLogMessages(messages, messageLogName, forkNumber) {
9699
9681
  }
9700
9682
 
9701
9683
  // apps/cli/src/ui/screens/overlays/ShortcutsScreen.tsx
9702
- import React72, { useCallback as useCallback19, useMemo as useMemo26, useRef as useRef14 } from "react";
9684
+ import React72, { useCallback as useCallback19, useMemo as useMemo25, useRef as useRef14 } from "react";
9703
9685
  import { Box as Box54, Text as Text57 } from "ink";
9704
9686
  function ShortcutsScreen({ onDone }) {
9705
9687
  const theme = getTheme();
@@ -9711,7 +9693,7 @@ function ShortcutsScreen({ onDone }) {
9711
9693
  didDoneRef.current = true;
9712
9694
  onDone();
9713
9695
  }, [onDone]);
9714
- const modeCycleShortcut = useMemo26(() => getPermissionModeCycleShortcut(), []);
9696
+ const modeCycleShortcut = useMemo25(() => getPermissionModeCycleShortcut(), []);
9715
9697
  useKeypress((input, key) => {
9716
9698
  const inputChar = input.length === 1 ? input : "";
9717
9699
  if (key.escape || inputChar === "?" || key.ctrl && inputChar === "c") {
@@ -9735,7 +9717,7 @@ function ShortcutsScreen({ onDone }) {
9735
9717
  }
9736
9718
 
9737
9719
  // apps/cli/src/ui/screens/overlays/CommandPaletteScreen.tsx
9738
- import React73, { useCallback as useCallback20, useEffect as useEffect25, useMemo as useMemo27, useState as useState22 } from "react";
9720
+ import React73, { useCallback as useCallback20, useEffect as useEffect26, useMemo as useMemo26, useState as useState23 } from "react";
9739
9721
  import { Box as Box55, Text as Text58 } from "ink";
9740
9722
  import figures9 from "figures";
9741
9723
  var VIEWPORT_SAFE_MARGIN_ROWS2 = 1;
@@ -9797,17 +9779,17 @@ function CommandPaletteScreen({
9797
9779
  const paddingY = layout.paddingY;
9798
9780
  const gap = layout.gap;
9799
9781
  const paddingX = layout.paddingX;
9800
- const [query, setQuery] = useState22("");
9801
- const [cursorOffset, setCursorOffset] = useState22(0);
9802
- const [focusedIndex, setFocusedIndex] = useState22(0);
9803
- const [status, setStatus] = useState22(null);
9804
- const actions = useMemo27(() => getDefaultActions(), []);
9805
- const normalizedQuery = useMemo27(() => normalizeQuery(query), [query]);
9806
- const filtered = useMemo27(
9782
+ const [query, setQuery] = useState23("");
9783
+ const [cursorOffset, setCursorOffset] = useState23(0);
9784
+ const [focusedIndex, setFocusedIndex] = useState23(0);
9785
+ const [status, setStatus] = useState23(null);
9786
+ const actions = useMemo26(() => getDefaultActions(), []);
9787
+ const normalizedQuery = useMemo26(() => normalizeQuery(query), [query]);
9788
+ const filtered = useMemo26(
9807
9789
  () => actions.filter((action) => matchesQuery(action, normalizedQuery)),
9808
9790
  [actions, normalizedQuery]
9809
9791
  );
9810
- useEffect25(() => {
9792
+ useEffect26(() => {
9811
9793
  setFocusedIndex((prev) => clamp(prev, 0, Math.max(0, filtered.length - 1)));
9812
9794
  }, [filtered.length]);
9813
9795
  const headerRows = 4;
@@ -9892,7 +9874,7 @@ function CommandPaletteScreen({
9892
9874
  },
9893
9875
  [filtered.length, onDone, runSelection, visibleOptionCount]
9894
9876
  );
9895
- const visible = useMemo27(
9877
+ const visible = useMemo26(
9896
9878
  () => filtered.slice(start, end),
9897
9879
  [end, filtered, start]
9898
9880
  );
@@ -9945,7 +9927,7 @@ function CommandPaletteScreen({
9945
9927
  }
9946
9928
 
9947
9929
  // apps/cli/src/ui/screens/overlays/HistorySearchScreen.tsx
9948
- import React74, { useCallback as useCallback21, useMemo as useMemo28, useState as useState23 } from "react";
9930
+ import React74, { useCallback as useCallback21, useMemo as useMemo27, useState as useState24 } from "react";
9949
9931
  import { Box as Box56, Text as Text59 } from "ink";
9950
9932
  import figures10 from "figures";
9951
9933
  function normalizeQuery2(value) {
@@ -9964,13 +9946,13 @@ function HistorySearchScreen({
9964
9946
  const theme = getTheme();
9965
9947
  const layout = useScreenLayout();
9966
9948
  const exitState = { pending: false, keyName: null };
9967
- const [query, setQuery] = useState23("");
9968
- const [cursorOffset, setCursorOffset] = useState23(0);
9969
- const [selectedIndex, setSelectedIndex] = useState23(0);
9970
- const [status, setStatus] = useState23(null);
9971
- const normalizedQuery = useMemo28(() => normalizeQuery2(query), [query]);
9972
- const history = useMemo28(() => getGlobalHistoryWithPastes(), []);
9973
- const filtered = useMemo28(
9949
+ const [query, setQuery] = useState24("");
9950
+ const [cursorOffset, setCursorOffset] = useState24(0);
9951
+ const [selectedIndex, setSelectedIndex] = useState24(0);
9952
+ const [status, setStatus] = useState24(null);
9953
+ const normalizedQuery = useMemo27(() => normalizeQuery2(query), [query]);
9954
+ const history = useMemo27(() => getGlobalHistoryWithPastes(), []);
9955
+ const filtered = useMemo27(
9974
9956
  () => history.filter((item) => matchesQuery2(item.display, normalizedQuery)),
9975
9957
  [history, normalizedQuery]
9976
9958
  );
@@ -10117,7 +10099,7 @@ function HistorySearchScreen({
10117
10099
  }
10118
10100
 
10119
10101
  // apps/cli/src/ui/screens/overlays/ModelPickerScreen.tsx
10120
- import React75, { useCallback as useCallback22, useEffect as useEffect26, useMemo as useMemo29, useState as useState24 } from "react";
10102
+ import React75, { useCallback as useCallback22, useEffect as useEffect27, useMemo as useMemo28, useState as useState25 } from "react";
10121
10103
  import { Box as Box57, Text as Text60 } from "ink";
10122
10104
  import figures11 from "figures";
10123
10105
  function clamp3(value, min, max) {
@@ -10130,20 +10112,20 @@ function ModelPickerScreen({
10130
10112
  const theme = getTheme();
10131
10113
  const layout = useScreenLayout();
10132
10114
  const exitState = { pending: false, keyName: null };
10133
- const modelManager = useMemo29(() => getModelManager(), []);
10115
+ const modelManager = useMemo28(() => getModelManager(), []);
10134
10116
  const currentMainModelName = modelManager.getModelName("main");
10135
- const models = useMemo29(
10117
+ const models = useMemo28(
10136
10118
  () => modelManager.getAllConfiguredModels(),
10137
10119
  [modelManager]
10138
10120
  );
10139
- const initialIndex = useMemo29(() => {
10121
+ const initialIndex = useMemo28(() => {
10140
10122
  if (!currentMainModelName) return 0;
10141
10123
  const idx = models.findIndex((m) => m.modelName === currentMainModelName);
10142
10124
  return idx >= 0 ? idx : 0;
10143
10125
  }, [currentMainModelName, models]);
10144
- const [selectedIndex, setSelectedIndex] = useState24(initialIndex);
10145
- const [status, setStatus] = useState24(null);
10146
- useEffect26(() => {
10126
+ const [selectedIndex, setSelectedIndex] = useState25(initialIndex);
10127
+ const [status, setStatus] = useState25(null);
10128
+ useEffect27(() => {
10147
10129
  setSelectedIndex((prev) => clamp3(prev, 0, Math.max(0, models.length - 1)));
10148
10130
  }, [models.length]);
10149
10131
  const confirm = useCallback22(() => {
@@ -10214,7 +10196,7 @@ function ModelPickerScreen({
10214
10196
  }
10215
10197
 
10216
10198
  // apps/cli/src/ui/screens/overlays/ThinkingToggleScreen.tsx
10217
- import React76, { useCallback as useCallback23, useEffect as useEffect27, useMemo as useMemo30, useState as useState25 } from "react";
10199
+ import React76, { useCallback as useCallback23, useEffect as useEffect28, useMemo as useMemo29, useState as useState26 } from "react";
10218
10200
  import { Box as Box58, Text as Text61 } from "ink";
10219
10201
  import figures12 from "figures";
10220
10202
  function clamp4(value, min, max) {
@@ -10229,7 +10211,7 @@ function ThinkingToggleScreen({
10229
10211
  const theme = getTheme();
10230
10212
  const layout = useScreenLayout();
10231
10213
  const exitState = { pending: false, keyName: null };
10232
- const options = useMemo30(
10214
+ const options = useMemo29(
10233
10215
  () => [
10234
10216
  {
10235
10217
  value: true,
@@ -10245,8 +10227,8 @@ function ThinkingToggleScreen({
10245
10227
  []
10246
10228
  );
10247
10229
  const initialIndex = currentValue ? 0 : 1;
10248
- const [selectedIndex, setSelectedIndex] = useState25(initialIndex);
10249
- useEffect27(() => {
10230
+ const [selectedIndex, setSelectedIndex] = useState26(initialIndex);
10231
+ useEffect28(() => {
10250
10232
  setSelectedIndex((prev) => clamp4(prev, 0, Math.max(0, options.length - 1)));
10251
10233
  }, [options.length]);
10252
10234
  const confirm = useCallback23(() => {
@@ -10316,7 +10298,7 @@ function ThinkingToggleScreen({
10316
10298
  // apps/cli/src/ui/screens/REPL/useTranscriptItems.tsx
10317
10299
  import { Box as Box60 } from "ink";
10318
10300
  import * as React78 from "react";
10319
- import { useMemo as useMemo31, useRef as useRef16 } from "react";
10301
+ import { useMemo as useMemo30, useRef as useRef16 } from "react";
10320
10302
 
10321
10303
  // apps/cli/src/ui/components/MessageResponse.tsx
10322
10304
  import { Box as Box59, Text as Text62 } from "ink";
@@ -10458,19 +10440,19 @@ function splitTransientTextMessage(message, chunkState) {
10458
10440
  }
10459
10441
  function useTranscriptItems(args) {
10460
10442
  const chunkStateRef = useRef16(/* @__PURE__ */ new Map());
10461
- const normalizedMessages = useMemo31(
10443
+ const normalizedMessages = useMemo30(
10462
10444
  () => normalizeMessages(args.messages).filter(isNotEmptyMessage),
10463
10445
  [args.messages]
10464
10446
  );
10465
- const unresolvedToolUseIDs = useMemo31(
10447
+ const unresolvedToolUseIDs = useMemo30(
10466
10448
  () => getUnresolvedToolUseIDs(normalizedMessages),
10467
10449
  [normalizedMessages]
10468
10450
  );
10469
- const inProgressToolUseIDs = useMemo31(
10451
+ const inProgressToolUseIDs = useMemo30(
10470
10452
  () => getInProgressToolUseIDs(normalizedMessages),
10471
10453
  [normalizedMessages]
10472
10454
  );
10473
- const erroredToolUseIDs = useMemo31(
10455
+ const erroredToolUseIDs = useMemo30(
10474
10456
  () => new Set(
10475
10457
  getErroredToolUseMessages(normalizedMessages).map(
10476
10458
  (_) => _.message.content[0].id
@@ -10478,11 +10460,11 @@ function useTranscriptItems(args) {
10478
10460
  ),
10479
10461
  [normalizedMessages]
10480
10462
  );
10481
- const orderedMessages = useMemo31(
10463
+ const orderedMessages = useMemo30(
10482
10464
  () => reorderMessages(normalizedMessages),
10483
10465
  [normalizedMessages]
10484
10466
  );
10485
- const replStaticPrefixLength = useMemo31(
10467
+ const replStaticPrefixLength = useMemo30(
10486
10468
  () => getReplStaticPrefixLength(
10487
10469
  orderedMessages,
10488
10470
  normalizedMessages,
@@ -10490,7 +10472,7 @@ function useTranscriptItems(args) {
10490
10472
  ),
10491
10473
  [orderedMessages, normalizedMessages, unresolvedToolUseIDs]
10492
10474
  );
10493
- const chunked = useMemo31(() => {
10475
+ const chunked = useMemo30(() => {
10494
10476
  const chunkState = chunkStateRef.current;
10495
10477
  const activeIds = new Set(
10496
10478
  orderedMessages.map((message) => message.uuid)
@@ -10560,7 +10542,7 @@ function useTranscriptItems(args) {
10560
10542
  replStaticPrefixLength: replStaticPrefixLength + staticPrefixExtra
10561
10543
  };
10562
10544
  }, [orderedMessages, replStaticPrefixLength]);
10563
- const items = useMemo31(() => {
10545
+ const items = useMemo30(() => {
10564
10546
  return chunked.renderMessages.map(
10565
10547
  ({ message, key, isTransient }, index) => {
10566
10548
  const toolUseID = getToolUseID(message);
@@ -10949,22 +10931,22 @@ function useReplController(props) {
10949
10931
  const safeMode = Boolean(props.safeMode);
10950
10932
  const mcpClients = props.mcpClients ?? [];
10951
10933
  const isDefaultModel = props.isDefaultModel ?? true;
10952
- const [updateAvailableVersion, setUpdateAvailableVersion] = useState26(() => props.initialUpdateVersion ?? null);
10953
- const [updateCommands, setUpdateCommands] = useState26(
10934
+ const [updateAvailableVersion, setUpdateAvailableVersion] = useState27(() => props.initialUpdateVersion ?? null);
10935
+ const [updateCommands, setUpdateCommands] = useState27(
10954
10936
  () => props.initialUpdateCommands ? [...props.initialUpdateCommands] : null
10955
10937
  );
10956
- const [verbose, setVerbose] = useState26(() => {
10938
+ const [verbose, setVerbose] = useState27(() => {
10957
10939
  return props.verbose ?? getGlobalConfigCached().verbose;
10958
10940
  });
10959
- const [commands, setCommands] = useState26(() => props.commands);
10960
- useEffect28(() => {
10941
+ const [commands, setCommands] = useState27(() => props.commands);
10942
+ useEffect29(() => {
10961
10943
  if (process.env.NODE_ENV === "test") return;
10962
10944
  if (updateAvailableVersion || updateCommands) return;
10963
10945
  let cancelled = false;
10964
10946
  (async () => {
10965
10947
  try {
10966
10948
  const [{ getLatestVersion, getUpdateCommandSuggestions }, semverMod] = await Promise.all([
10967
- import("./autoUpdater-MEPC7LJF.js"),
10949
+ import("./autoUpdater-SDLJ5QSH.js"),
10968
10950
  import("semver")
10969
10951
  ]);
10970
10952
  const semverModule = semverMod;
@@ -10984,7 +10966,7 @@ function useReplController(props) {
10984
10966
  cancelled = true;
10985
10967
  };
10986
10968
  }, [updateAvailableVersion, updateCommands]);
10987
- const [forkNumber, setForkNumber] = useState26(
10969
+ const [forkNumber, setForkNumber] = useState27(
10988
10970
  getNextAvailableLogForkNumber(
10989
10971
  props.messageLogName,
10990
10972
  props.initialForkNumber ?? 0,
@@ -10992,11 +10974,11 @@ function useReplController(props) {
10992
10974
  )
10993
10975
  );
10994
10976
  const initialForkNumberRef = useRef17(forkNumber);
10995
- const [uiRefreshCounter, setUiRefreshCounter] = useState26(0);
10977
+ const [uiRefreshCounter, setUiRefreshCounter] = useState27(0);
10996
10978
  const [
10997
10979
  pendingForkConvoWithMessages,
10998
10980
  setPendingForkConvoWithMessages
10999
- ] = useState26(null);
10981
+ ] = useState27(null);
11000
10982
  const pendingForkConvoWithMessagesRef = useRef17(null);
11001
10983
  const setForkConvoWithMessagesOnTheNextRender = useCallback28((messages2, options) => {
11002
10984
  const request = { messages: messages2, options };
@@ -11015,20 +10997,20 @@ function useReplController(props) {
11015
10997
  },
11016
10998
  []
11017
10999
  );
11018
- const [abortController, setAbortController] = useState26(null);
11019
- const [isLoading, setIsLoading] = useState26(false);
11020
- const [toolViewStack, setToolViewStack] = useState26([]);
11000
+ const [abortController, setAbortController] = useState27(null);
11001
+ const [isLoading, setIsLoading] = useState27(false);
11002
+ const [toolViewStack, setToolViewStack] = useState27([]);
11021
11003
  const toolViewStackRef = useRef17(toolViewStack);
11022
- useEffect28(() => {
11004
+ useEffect29(() => {
11023
11005
  toolViewStackRef.current = toolViewStack;
11024
11006
  }, [toolViewStack]);
11025
11007
  const toolJSX = toolViewStack.length > 0 ? toolViewStack[toolViewStack.length - 1] : null;
11026
11008
  const toolJSXRef = useRef17(toolJSX);
11027
- useEffect28(() => {
11009
+ useEffect29(() => {
11028
11010
  toolJSXRef.current = toolJSX;
11029
11011
  }, [toolJSX]);
11030
11012
  const ephemeralFullscreenAltScreenRef = useRef17(false);
11031
- useEffect28(() => {
11013
+ useEffect29(() => {
11032
11014
  return () => {
11033
11015
  if (ephemeralFullscreenAltScreenRef.current) {
11034
11016
  ephemeralFullscreenAltScreenRef.current = false;
@@ -11113,25 +11095,25 @@ function useReplController(props) {
11113
11095
  },
11114
11096
  [setToolViewStackWithClear]
11115
11097
  );
11116
- const [toolUseConfirm, setToolUseConfirm] = useState26(
11098
+ const [toolUseConfirm, setToolUseConfirm] = useState27(
11117
11099
  null
11118
11100
  );
11119
- const [messages, setMessages] = useState26(
11101
+ const [messages, setMessages] = useState27(
11120
11102
  props.initialMessages ?? []
11121
11103
  );
11122
- const [inputValue, setInputValue] = useState26("");
11123
- const [inputMode, setInputMode] = useState26("prompt");
11124
- const [restorePastes, setRestorePastes] = useState26(void 0);
11125
- const [draftPastes, setDraftPastes] = useState26({ pastedTexts: [], pastedImages: [] });
11126
- const [sessionThinkingMode, setSessionThinkingMode] = useState26(null);
11127
- const [submitCount, setSubmitCount] = useState26(0);
11128
- const [isMessageSelectorVisible, setIsMessageSelectorVisible] = useState26(false);
11129
- const [showCostDialog, setShowCostDialog] = useState26(false);
11130
- const [haveShownCostDialog, setHaveShownCostDialog] = useState26(
11104
+ const [inputValue, setInputValue] = useState27("");
11105
+ const [inputMode, setInputMode] = useState27("prompt");
11106
+ const [restorePastes, setRestorePastes] = useState27(void 0);
11107
+ const [draftPastes, setDraftPastes] = useState27({ pastedTexts: [], pastedImages: [] });
11108
+ const [sessionThinkingMode, setSessionThinkingMode] = useState27(null);
11109
+ const [submitCount, setSubmitCount] = useState27(0);
11110
+ const [isMessageSelectorVisible, setIsMessageSelectorVisible] = useState27(false);
11111
+ const [showCostDialog, setShowCostDialog] = useState27(false);
11112
+ const [haveShownCostDialog, setHaveShownCostDialog] = useState27(
11131
11113
  getGlobalConfigCached().hasAcknowledgedCostThreshold
11132
11114
  );
11133
- const [binaryFeedbackContext, setBinaryFeedbackContext] = useState26(null);
11134
- const [toast, setToast] = useState26(null);
11115
+ const [binaryFeedbackContext, setBinaryFeedbackContext] = useState27(null);
11116
+ const [toast, setToast] = useState27(null);
11135
11117
  const toastTimeoutRef = useRef17(null);
11136
11118
  const dismissToolView = useCallback28(() => {
11137
11119
  const current = toolViewStackRef.current;
@@ -11495,7 +11477,7 @@ function useReplController(props) {
11495
11477
  ModelConfig,
11496
11478
  {
11497
11479
  onClose: () => {
11498
- import("./model-NPMMYL2U.js").then(
11480
+ import("./model-4EIFU5QN.js").then(
11499
11481
  ({ reloadModelManager }) => {
11500
11482
  reloadModelManager();
11501
11483
  triggerModelConfigChange();
@@ -11532,10 +11514,10 @@ function useReplController(props) {
11532
11514
  );
11533
11515
  const readFileTimestampsRef = useRef17({});
11534
11516
  const { status: apiKeyStatus, reverify } = useApiKeyVerification();
11535
- useEffect28(() => {
11517
+ useEffect29(() => {
11536
11518
  apiKeyStatusRef.current = apiKeyStatus;
11537
11519
  }, [apiKeyStatus]);
11538
- useEffect28(() => {
11520
+ useEffect29(() => {
11539
11521
  void ensureLspManagerInitialized().catch(() => {
11540
11522
  });
11541
11523
  }, []);
@@ -11559,7 +11541,7 @@ function useReplController(props) {
11559
11541
  isMessageSelectorVisible,
11560
11542
  abortController?.signal
11561
11543
  );
11562
- useEffect28(() => {
11544
+ useEffect29(() => {
11563
11545
  if (!pendingForkConvoWithMessages) return;
11564
11546
  if (toolJSX?.displayMode === "fullscreen") return;
11565
11547
  const request = pendingForkConvoWithMessages;
@@ -11584,7 +11566,7 @@ function useReplController(props) {
11584
11566
  applyStateUpdates();
11585
11567
  }
11586
11568
  }, [pendingForkConvoWithMessages, toolJSX?.displayMode]);
11587
- useEffect28(() => {
11569
+ useEffect29(() => {
11588
11570
  const totalCost = getTotalCost();
11589
11571
  if (totalCost >= 5 && !showCostDialog && !haveShownCostDialog) {
11590
11572
  setShowCostDialog(true);
@@ -11598,7 +11580,7 @@ function useReplController(props) {
11598
11580
  toastTimeoutRef.current = setTimeout(() => setToast(null), 6e3);
11599
11581
  }, []);
11600
11582
  const ultrathinkToastActiveRef = useRef17(false);
11601
- useEffect28(() => {
11583
+ useEffect29(() => {
11602
11584
  if (inputMode === "bash" || inputMode === "background") {
11603
11585
  ultrathinkToastActiveRef.current = false;
11604
11586
  return;
@@ -11610,7 +11592,7 @@ function useReplController(props) {
11610
11592
  }
11611
11593
  ultrathinkToastActiveRef.current = hasUltrathink;
11612
11594
  }, [inputMode, inputValue, sessionThinkingMode, showToast]);
11613
- useEffect28(() => {
11595
+ useEffect29(() => {
11614
11596
  return subscribeAgentReloads((event) => {
11615
11597
  const count = event.changedPaths.length;
11616
11598
  showToast(
@@ -11618,7 +11600,7 @@ function useReplController(props) {
11618
11600
  );
11619
11601
  });
11620
11602
  }, [showToast]);
11621
- useEffect28(() => {
11603
+ useEffect29(() => {
11622
11604
  let cancelled = false;
11623
11605
  const unsubscribe = subscribeCustomCommandReloads((event) => {
11624
11606
  const count = event.changedPaths.length;
@@ -11627,7 +11609,7 @@ function useReplController(props) {
11627
11609
  );
11628
11610
  void (async () => {
11629
11611
  try {
11630
- const { getCommands } = await import("./registry-FHPZ36EO.js");
11612
+ const { getCommands } = await import("./registry-3UVW32YF.js");
11631
11613
  const next = await getCommands();
11632
11614
  if (cancelled) return;
11633
11615
  setCommands(next);
@@ -11642,7 +11624,7 @@ function useReplController(props) {
11642
11624
  unsubscribe();
11643
11625
  };
11644
11626
  }, [showToast]);
11645
- useEffect28(() => {
11627
+ useEffect29(() => {
11646
11628
  return () => {
11647
11629
  if (toastTimeoutRef.current) {
11648
11630
  clearTimeout(toastTimeoutRef.current);
@@ -11686,7 +11668,7 @@ function useReplController(props) {
11686
11668
  setAbortController,
11687
11669
  setIsLoading
11688
11670
  });
11689
- useEffect28(() => {
11671
+ useEffect29(() => {
11690
11672
  onQueryRef.current = onQuery;
11691
11673
  }, [onQuery]);
11692
11674
  const onInit = useReplInit({
@@ -11709,16 +11691,16 @@ function useReplController(props) {
11709
11691
  onQuery
11710
11692
  });
11711
11693
  useCostSummary();
11712
- useEffect28(() => {
11694
+ useEffect29(() => {
11713
11695
  setMessagesGetter(() => messages);
11714
11696
  setMessagesSetter(setMessages);
11715
11697
  }, [messages]);
11716
- useEffect28(() => {
11698
+ useEffect29(() => {
11717
11699
  setModelConfigChangeHandler(() => setUiRefreshCounter((prev) => prev + 1));
11718
11700
  }, []);
11719
11701
  useLogMessages(messages, props.messageLogName, forkNumber);
11720
11702
  useLogStartupTime();
11721
- useEffect28(() => {
11703
+ useEffect29(() => {
11722
11704
  onInit();
11723
11705
  }, []);
11724
11706
  const transcript = useTranscriptItems({
@@ -11731,11 +11713,20 @@ function useReplController(props) {
11731
11713
  isMessageSelectorVisible,
11732
11714
  forkNumber
11733
11715
  });
11734
- const staticItems = useMemo32(() => {
11716
+ const staticItemsRef = useRef17([]);
11717
+ const printedKeysRef = useRef17(/* @__PURE__ */ new Set());
11718
+ const lastForkNumberRef = useRef17(forkNumber);
11719
+ const staticItems = useMemo31(() => {
11720
+ if (lastForkNumberRef.current !== forkNumber) {
11721
+ lastForkNumberRef.current = forkNumber;
11722
+ staticItemsRef.current = [];
11723
+ printedKeysRef.current = /* @__PURE__ */ new Set();
11724
+ }
11735
11725
  const items = [];
11726
+ const logoKey = `logo-${forkNumber}`;
11736
11727
  items.push({
11737
- key: `logo-${forkNumber}`,
11738
- jsx: /* @__PURE__ */ React79.createElement(Box61, { flexDirection: "column", key: `logo-${forkNumber}` }, /* @__PURE__ */ React79.createElement(
11728
+ key: logoKey,
11729
+ jsx: /* @__PURE__ */ React79.createElement(Box61, { flexDirection: "column", key: logoKey }, /* @__PURE__ */ React79.createElement(
11739
11730
  Logo,
11740
11731
  {
11741
11732
  mcpClients,
@@ -11746,7 +11737,17 @@ function useReplController(props) {
11746
11737
  ), /* @__PURE__ */ React79.createElement(ProjectOnboarding, { workspaceDir: getOriginalCwd() }))
11747
11738
  });
11748
11739
  items.push(...transcript.items.slice(0, transcript.replStaticPrefixLength));
11749
- return items;
11740
+ const newItems = [];
11741
+ for (const item of items) {
11742
+ if (!printedKeysRef.current.has(item.key)) {
11743
+ printedKeysRef.current.add(item.key);
11744
+ newItems.push(item);
11745
+ }
11746
+ }
11747
+ if (newItems.length > 0) {
11748
+ staticItemsRef.current = [...staticItemsRef.current, ...newItems];
11749
+ }
11750
+ return staticItemsRef.current;
11750
11751
  }, [
11751
11752
  forkNumber,
11752
11753
  isDefaultModel,
@@ -11756,7 +11757,7 @@ function useReplController(props) {
11756
11757
  updateAvailableVersion,
11757
11758
  updateCommands
11758
11759
  ]);
11759
- const transientItems = useMemo32(
11760
+ const transientItems = useMemo31(
11760
11761
  () => transcript.items.slice(transcript.replStaticPrefixLength),
11761
11762
  [transcript.items, transcript.replStaticPrefixLength]
11762
11763
  );