@machina.ai/cell-cli 1.36.0-rc1 → 1.38.1-rc2

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 (580) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/package.json +4 -4
  4. package/dist/src/acp/acpClient.js +297 -32
  5. package/dist/src/acp/acpClient.js.map +1 -1
  6. package/dist/src/acp/acpClient.test.js +419 -19
  7. package/dist/src/acp/acpClient.test.js.map +1 -1
  8. package/dist/src/acp/acpResume.test.js +8 -0
  9. package/dist/src/acp/acpResume.test.js.map +1 -1
  10. package/dist/src/acp/commandHandler.js +4 -0
  11. package/dist/src/acp/commandHandler.js.map +1 -1
  12. package/dist/src/acp/commandHandler.test.js +4 -0
  13. package/dist/src/acp/commandHandler.test.js.map +1 -1
  14. package/dist/src/acp/commands/about.d.ts +11 -0
  15. package/dist/src/acp/commands/about.js +53 -0
  16. package/dist/src/acp/commands/about.js.map +1 -0
  17. package/dist/src/acp/commands/extensions.js +1 -1
  18. package/dist/src/acp/commands/extensions.js.map +1 -1
  19. package/dist/src/acp/commands/help.d.ts +14 -0
  20. package/dist/src/acp/commands/help.js +35 -0
  21. package/dist/src/acp/commands/help.js.map +1 -0
  22. package/dist/src/acp/commands/help.test.d.ts +6 -0
  23. package/dist/src/acp/commands/help.test.js +40 -0
  24. package/dist/src/acp/commands/help.test.js.map +1 -0
  25. package/dist/src/acp/commands/restore.js +2 -2
  26. package/dist/src/acp/commands/restore.js.map +1 -1
  27. package/dist/src/commands/extensions/new.js +1 -1
  28. package/dist/src/commands/extensions/new.js.map +1 -1
  29. package/dist/src/commands/mcp/list.js +2 -2
  30. package/dist/src/commands/mcp/list.js.map +1 -1
  31. package/dist/src/commands/mcp.test.js +1 -1
  32. package/dist/src/commands/mcp.test.js.map +1 -1
  33. package/dist/src/commands/skills/list.js +5 -8
  34. package/dist/src/commands/skills/list.js.map +1 -1
  35. package/dist/src/commands/skills/list.test.js +17 -13
  36. package/dist/src/commands/skills/list.test.js.map +1 -1
  37. package/dist/src/config/config.js +22 -9
  38. package/dist/src/config/config.js.map +1 -1
  39. package/dist/src/config/config.test.js +121 -36
  40. package/dist/src/config/config.test.js.map +1 -1
  41. package/dist/src/config/extension-manager-permissions.test.js +1 -1
  42. package/dist/src/config/extension-manager-permissions.test.js.map +1 -1
  43. package/dist/src/config/extension-manager-themes.spec.js +1 -0
  44. package/dist/src/config/extension-manager-themes.spec.js.map +1 -1
  45. package/dist/src/config/extension-manager.test.js +1 -1
  46. package/dist/src/config/extension-manager.test.js.map +1 -1
  47. package/dist/src/config/extension.js +1 -1
  48. package/dist/src/config/extension.js.map +1 -1
  49. package/dist/src/config/extensions/github.js +1 -1
  50. package/dist/src/config/extensions/github.js.map +1 -1
  51. package/dist/src/config/footerItems.d.ts +4 -0
  52. package/dist/src/config/footerItems.js +12 -2
  53. package/dist/src/config/footerItems.js.map +1 -1
  54. package/dist/src/config/footerItems.test.js +129 -72
  55. package/dist/src/config/footerItems.test.js.map +1 -1
  56. package/dist/src/config/policy-engine.integration.test.js +1 -3
  57. package/dist/src/config/policy-engine.integration.test.js.map +1 -1
  58. package/dist/src/config/policy.d.ts +1 -1
  59. package/dist/src/config/policy.js +2 -2
  60. package/dist/src/config/policy.js.map +1 -1
  61. package/dist/src/config/settings.js +19 -3
  62. package/dist/src/config/settings.js.map +1 -1
  63. package/dist/src/config/settingsSchema.d.ts +272 -53
  64. package/dist/src/config/settingsSchema.js +262 -48
  65. package/dist/src/config/settingsSchema.js.map +1 -1
  66. package/dist/src/config/settingsSchema.test.js +22 -4
  67. package/dist/src/config/settingsSchema.test.js.map +1 -1
  68. package/dist/src/config/workspace-policy-cli.test.js +7 -7
  69. package/dist/src/config/workspace-policy-cli.test.js.map +1 -1
  70. package/dist/src/gemini.js +24 -7
  71. package/dist/src/gemini.js.map +1 -1
  72. package/dist/src/gemini.test.js +74 -4
  73. package/dist/src/gemini.test.js.map +1 -1
  74. package/dist/src/gemini_cleanup.test.js +69 -4
  75. package/dist/src/gemini_cleanup.test.js.map +1 -1
  76. package/dist/src/generated/git-commit.d.ts +2 -2
  77. package/dist/src/generated/git-commit.js +2 -2
  78. package/dist/src/integration-tests/modelSteering.test.js +1 -1
  79. package/dist/src/integration-tests/modelSteering.test.js.map +1 -1
  80. package/dist/src/interactiveCli.js +4 -2
  81. package/dist/src/interactiveCli.js.map +1 -1
  82. package/dist/src/nonInteractiveCli.d.ts +1 -1
  83. package/dist/src/nonInteractiveCli.js +11 -2
  84. package/dist/src/nonInteractiveCli.js.map +1 -1
  85. package/dist/src/nonInteractiveCli.test.js +4 -2
  86. package/dist/src/nonInteractiveCli.test.js.map +1 -1
  87. package/dist/src/nonInteractiveCliAgentSession.d.ts +16 -0
  88. package/dist/src/nonInteractiveCliAgentSession.js +484 -0
  89. package/dist/src/nonInteractiveCliAgentSession.js.map +1 -0
  90. package/dist/src/nonInteractiveCliAgentSession.test.js +1837 -0
  91. package/dist/src/nonInteractiveCliAgentSession.test.js.map +1 -0
  92. package/dist/src/services/BuiltinCommandLoader.js +4 -2
  93. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  94. package/dist/src/test-utils/mockCommandContext.js +1 -0
  95. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  96. package/dist/src/test-utils/mockConfig.js +16 -0
  97. package/dist/src/test-utils/mockConfig.js.map +1 -1
  98. package/dist/src/test-utils/mockSpinner.d.ts +6 -0
  99. package/dist/src/test-utils/mockSpinner.js +21 -0
  100. package/dist/src/test-utils/mockSpinner.js.map +1 -0
  101. package/dist/src/test-utils/render.d.ts +8 -1
  102. package/dist/src/test-utils/render.js +37 -11
  103. package/dist/src/test-utils/render.js.map +1 -1
  104. package/dist/src/ui/App.test.js +1 -1
  105. package/dist/src/ui/App.test.js.map +1 -1
  106. package/dist/src/ui/AppContainer.js +225 -99
  107. package/dist/src/ui/AppContainer.js.map +1 -1
  108. package/dist/src/ui/AppContainer.test.js +50 -38
  109. package/dist/src/ui/AppContainer.test.js.map +1 -1
  110. package/dist/src/ui/commands/chatCommand.js +15 -5
  111. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  112. package/dist/src/ui/commands/clearCommand.js +3 -1
  113. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  114. package/dist/src/ui/commands/directoryCommand.js +1 -1
  115. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  116. package/dist/src/ui/commands/extensionsCommand.js +22 -11
  117. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  118. package/dist/src/ui/commands/marketplaceCommand.d.ts +7 -0
  119. package/dist/src/ui/commands/marketplaceCommand.js +135 -0
  120. package/dist/src/ui/commands/marketplaceCommand.js.map +1 -0
  121. package/dist/src/ui/commands/mcpCommand.js +26 -7
  122. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  123. package/dist/src/ui/commands/mcpCommand.test.js +26 -0
  124. package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
  125. package/dist/src/ui/commands/planCommand.js +9 -0
  126. package/dist/src/ui/commands/planCommand.js.map +1 -1
  127. package/dist/src/ui/commands/planCommand.test.js +29 -0
  128. package/dist/src/ui/commands/planCommand.test.js.map +1 -1
  129. package/dist/src/ui/commands/restoreCommand.js +1 -1
  130. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  131. package/dist/src/ui/commands/rewindCommand.js +3 -1
  132. package/dist/src/ui/commands/rewindCommand.js.map +1 -1
  133. package/dist/src/ui/commands/rewindCommand.test.js +1 -1
  134. package/dist/src/ui/commands/rewindCommand.test.js.map +1 -1
  135. package/dist/src/ui/commands/setupGithubCommand.js +5 -5
  136. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  137. package/dist/src/ui/commands/skillsCommand.js +11 -1
  138. package/dist/src/ui/commands/skillsCommand.js.map +1 -1
  139. package/dist/src/ui/commands/skillsCommand.test.js +1 -0
  140. package/dist/src/ui/commands/skillsCommand.test.js.map +1 -1
  141. package/dist/src/ui/commands/{shellsCommand.d.ts → tasksCommand.d.ts} +1 -1
  142. package/dist/src/ui/commands/{shellsCommand.js → tasksCommand.js} +6 -6
  143. package/dist/src/ui/commands/tasksCommand.js.map +1 -0
  144. package/dist/src/ui/commands/tasksCommand.test.js +30 -0
  145. package/dist/src/ui/commands/tasksCommand.test.js.map +1 -0
  146. package/dist/src/ui/commands/types.d.ts +9 -1
  147. package/dist/src/ui/components/AnsiOutput.js +7 -5
  148. package/dist/src/ui/components/AnsiOutput.js.map +1 -1
  149. package/dist/src/ui/components/AnsiOutput.test.js +13 -0
  150. package/dist/src/ui/components/AnsiOutput.test.js.map +1 -1
  151. package/dist/src/ui/components/AppHeader.js +11 -11
  152. package/dist/src/ui/components/AppHeader.js.map +1 -1
  153. package/dist/src/ui/components/AppHeader.test.js +6 -2
  154. package/dist/src/ui/components/AppHeader.test.js.map +1 -1
  155. package/dist/src/ui/components/AsciiArt.d.ts +6 -6
  156. package/dist/src/ui/components/AsciiArt.js +6 -6
  157. package/dist/src/ui/components/AskUserDialog.js +13 -13
  158. package/dist/src/ui/components/AskUserDialog.js.map +1 -1
  159. package/dist/src/ui/components/AskUserDialog.test.js +31 -0
  160. package/dist/src/ui/components/AskUserDialog.test.js.map +1 -1
  161. package/dist/src/ui/components/BackgroundTaskDisplay.d.ts +16 -0
  162. package/dist/src/ui/components/{BackgroundShellDisplay.js → BackgroundTaskDisplay.js} +12 -12
  163. package/dist/src/ui/components/BackgroundTaskDisplay.js.map +1 -0
  164. package/dist/src/ui/components/{BackgroundShellDisplay.test.js → BackgroundTaskDisplay.test.js} +26 -26
  165. package/dist/src/ui/components/BackgroundTaskDisplay.test.js.map +1 -0
  166. package/dist/src/ui/components/Composer.js +20 -208
  167. package/dist/src/ui/components/Composer.js.map +1 -1
  168. package/dist/src/ui/components/Composer.test.js +22 -17
  169. package/dist/src/ui/components/Composer.test.js.map +1 -1
  170. package/dist/src/ui/components/ContextSummaryDisplay.js +3 -1
  171. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  172. package/dist/src/ui/components/CopyModeWarning.js +3 -6
  173. package/dist/src/ui/components/CopyModeWarning.js.map +1 -1
  174. package/dist/src/ui/components/CopyModeWarning.test.js +7 -8
  175. package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -1
  176. package/dist/src/ui/components/ExitPlanModeDialog.js +9 -0
  177. package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
  178. package/dist/src/ui/components/ExitPlanModeDialog.test.js +15 -3
  179. package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +1 -1
  180. package/dist/src/ui/components/FolderTrustDialog.test.js +7 -8
  181. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
  182. package/dist/src/ui/components/Footer.js +36 -9
  183. package/dist/src/ui/components/Footer.js.map +1 -1
  184. package/dist/src/ui/components/Footer.test.js +85 -6
  185. package/dist/src/ui/components/Footer.test.js.map +1 -1
  186. package/dist/src/ui/components/FooterConfigDialog.js +1 -0
  187. package/dist/src/ui/components/FooterConfigDialog.js.map +1 -1
  188. package/dist/src/ui/components/FooterConfigDialog.test.js +1 -1
  189. package/dist/src/ui/components/Help.test.js +1 -1
  190. package/dist/src/ui/components/Help.test.js.map +1 -1
  191. package/dist/src/ui/components/HistoryItemDisplay.d.ts +2 -0
  192. package/dist/src/ui/components/HistoryItemDisplay.js +14 -12
  193. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  194. package/dist/src/ui/components/InputPrompt.d.ts +10 -5
  195. package/dist/src/ui/components/InputPrompt.js +195 -90
  196. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  197. package/dist/src/ui/components/InputPrompt.test.d.ts +12 -1
  198. package/dist/src/ui/components/InputPrompt.test.js +370 -160
  199. package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
  200. package/dist/src/ui/components/LoadingIndicator.js +1 -2
  201. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  202. package/dist/src/ui/components/LoadingIndicator.test.js +7 -0
  203. package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
  204. package/dist/src/ui/components/MainContent.d.ts +1 -1
  205. package/dist/src/ui/components/MainContent.js +105 -34
  206. package/dist/src/ui/components/MainContent.js.map +1 -1
  207. package/dist/src/ui/components/MainContent.test.js +12 -9
  208. package/dist/src/ui/components/MainContent.test.js.map +1 -1
  209. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +1 -0
  210. package/dist/src/ui/components/MemoryUsageDisplay.js +5 -2
  211. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
  212. package/dist/src/ui/components/ModelDialog.js +50 -72
  213. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  214. package/dist/src/ui/components/ModelDialog.test.js +1 -0
  215. package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
  216. package/dist/src/ui/components/ModelQuotaDisplay.d.ts +18 -0
  217. package/dist/src/ui/components/ModelQuotaDisplay.js +104 -0
  218. package/dist/src/ui/components/ModelQuotaDisplay.js.map +1 -0
  219. package/dist/src/ui/components/ModelQuotaDisplay.test.d.ts +6 -0
  220. package/dist/src/ui/components/ModelQuotaDisplay.test.js +62 -0
  221. package/dist/src/ui/components/ModelQuotaDisplay.test.js.map +1 -0
  222. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +1 -1
  223. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
  224. package/dist/src/ui/components/ProgressBar.d.ts +13 -0
  225. package/dist/src/ui/components/ProgressBar.js +17 -0
  226. package/dist/src/ui/components/ProgressBar.js.map +1 -0
  227. package/dist/src/ui/components/ProgressBar.test.d.ts +6 -0
  228. package/dist/src/ui/components/ProgressBar.test.js +28 -0
  229. package/dist/src/ui/components/ProgressBar.test.js.map +1 -0
  230. package/dist/src/ui/components/StatsDisplay.d.ts +2 -2
  231. package/dist/src/ui/components/StatsDisplay.js +47 -128
  232. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  233. package/dist/src/ui/components/StatsDisplay.test.js +65 -136
  234. package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
  235. package/dist/src/ui/components/StatusDisplay.js +1 -1
  236. package/dist/src/ui/components/StatusDisplay.js.map +1 -1
  237. package/dist/src/ui/components/StatusDisplay.test.js +3 -3
  238. package/dist/src/ui/components/StatusDisplay.test.js.map +1 -1
  239. package/dist/src/ui/components/StatusRow.d.ts +32 -0
  240. package/dist/src/ui/components/StatusRow.js +180 -0
  241. package/dist/src/ui/components/StatusRow.js.map +1 -0
  242. package/dist/src/ui/components/StatusRow.test.d.ts +6 -0
  243. package/dist/src/ui/components/StatusRow.test.js +99 -0
  244. package/dist/src/ui/components/StatusRow.test.js.map +1 -0
  245. package/dist/src/ui/components/ToastDisplay.d.ts +2 -1
  246. package/dist/src/ui/components/ToastDisplay.js +7 -5
  247. package/dist/src/ui/components/ToastDisplay.js.map +1 -1
  248. package/dist/src/ui/components/ToastDisplay.test.js +34 -20
  249. package/dist/src/ui/components/ToastDisplay.test.js.map +1 -1
  250. package/dist/src/ui/components/ToolConfirmationQueue.js +24 -9
  251. package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
  252. package/dist/src/ui/components/ToolConfirmationQueue.test.js +4 -6
  253. package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +1 -1
  254. package/dist/src/ui/components/UserIdentity.js +8 -5
  255. package/dist/src/ui/components/UserIdentity.js.map +1 -1
  256. package/dist/src/ui/components/messages/DenseToolMessage.d.ts +13 -0
  257. package/dist/src/ui/components/messages/DenseToolMessage.js +270 -0
  258. package/dist/src/ui/components/messages/DenseToolMessage.js.map +1 -0
  259. package/dist/src/ui/components/messages/DenseToolMessage.test.d.ts +6 -0
  260. package/dist/src/ui/components/messages/DenseToolMessage.test.js +383 -0
  261. package/dist/src/ui/components/messages/DenseToolMessage.test.js.map +1 -0
  262. package/dist/src/ui/components/messages/DiffRenderer.d.ts +18 -0
  263. package/dist/src/ui/components/messages/DiffRenderer.js +54 -34
  264. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  265. package/dist/src/ui/components/messages/DiffRenderer.test.js +12 -6
  266. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
  267. package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -0
  268. package/dist/src/ui/components/messages/InfoMessage.js +2 -2
  269. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  270. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +1 -1
  271. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +1 -1
  272. package/dist/src/ui/components/messages/ShellToolMessage.test.js +44 -33
  273. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -1
  274. package/dist/src/ui/components/messages/SubagentGroupDisplay.js +3 -2
  275. package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +1 -1
  276. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js +1 -1
  277. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js.map +1 -1
  278. package/dist/src/ui/components/messages/SubagentHistoryMessage.d.ts +13 -0
  279. package/dist/src/ui/components/messages/SubagentHistoryMessage.js +4 -0
  280. package/dist/src/ui/components/messages/SubagentHistoryMessage.js.map +1 -0
  281. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.d.ts +6 -0
  282. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js +68 -0
  283. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js.map +1 -0
  284. package/dist/src/ui/components/messages/SubagentProgressDisplay.d.ts +2 -1
  285. package/dist/src/ui/components/messages/SubagentProgressDisplay.js +2 -2
  286. package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +1 -1
  287. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js +0 -4
  288. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js.map +1 -1
  289. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +1 -0
  290. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +108 -70
  291. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  292. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +40 -25
  293. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
  294. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.d.ts +6 -0
  295. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js +147 -0
  296. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js.map +1 -0
  297. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +3 -0
  298. package/dist/src/ui/components/messages/ToolGroupMessage.js +219 -52
  299. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  300. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +55 -3
  301. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
  302. package/dist/src/ui/components/messages/ToolMessage.test.js +8 -7
  303. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
  304. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +1 -1
  305. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +1 -1
  306. package/dist/src/ui/components/messages/ToolResultDisplay.js +57 -15
  307. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
  308. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +66 -3
  309. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
  310. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +5 -4
  311. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +1 -1
  312. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +3 -3
  313. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -1
  314. package/dist/src/ui/components/messages/TopicMessage.d.ts +15 -0
  315. package/dist/src/ui/components/messages/TopicMessage.js +56 -0
  316. package/dist/src/ui/components/messages/TopicMessage.js.map +1 -0
  317. package/dist/src/ui/components/messages/TopicMessage.test.d.ts +6 -0
  318. package/dist/src/ui/components/messages/TopicMessage.test.js +77 -0
  319. package/dist/src/ui/components/messages/TopicMessage.test.js.map +1 -0
  320. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +1 -0
  321. package/dist/src/ui/components/shared/MaxSizedBox.js +10 -7
  322. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
  323. package/dist/src/ui/components/shared/Scrollable.d.ts +3 -0
  324. package/dist/src/ui/components/shared/Scrollable.js +6 -2
  325. package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
  326. package/dist/src/ui/components/shared/ScrollableList.d.ts +9 -12
  327. package/dist/src/ui/components/shared/ScrollableList.js +2 -2
  328. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
  329. package/dist/src/ui/components/shared/VirtualizedList.d.ts +13 -1
  330. package/dist/src/ui/components/shared/VirtualizedList.js +148 -37
  331. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
  332. package/dist/src/ui/components/shared/VirtualizedList.test.js +1 -10
  333. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -1
  334. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
  335. package/dist/src/ui/components/shared/text-buffer.js +19 -21
  336. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  337. package/dist/src/ui/components/views/ExtensionDetails.d.ts +4 -1
  338. package/dist/src/ui/components/views/ExtensionDetails.js +14 -4
  339. package/dist/src/ui/components/views/ExtensionDetails.js.map +1 -1
  340. package/dist/src/ui/components/views/ExtensionDetails.test.js +25 -1
  341. package/dist/src/ui/components/views/ExtensionDetails.test.js.map +1 -1
  342. package/dist/src/ui/components/views/ExtensionRegistryView.js +19 -5
  343. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -1
  344. package/dist/src/ui/components/views/ExtensionRegistryView.test.js +38 -0
  345. package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +1 -1
  346. package/dist/src/ui/components/views/SkillsList.js +2 -1
  347. package/dist/src/ui/components/views/SkillsList.js.map +1 -1
  348. package/dist/src/ui/components/views/SkillsList.test.js +3 -1
  349. package/dist/src/ui/components/views/SkillsList.test.js.map +1 -1
  350. package/dist/src/ui/constants/tips.js +2 -2
  351. package/dist/src/ui/constants/tips.js.map +1 -1
  352. package/dist/src/ui/constants.d.ts +6 -0
  353. package/dist/src/ui/constants.js +15 -0
  354. package/dist/src/ui/constants.js.map +1 -1
  355. package/dist/src/ui/contexts/InputContext.d.ts +17 -0
  356. package/dist/src/ui/contexts/InputContext.js +15 -0
  357. package/dist/src/ui/contexts/InputContext.js.map +1 -0
  358. package/dist/src/ui/contexts/KeypressContext.js +1 -1
  359. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  360. package/dist/src/ui/contexts/KeypressContext.test.js +25 -1
  361. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  362. package/dist/src/ui/contexts/ScrollProvider.js +25 -3
  363. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -1
  364. package/dist/src/ui/contexts/ScrollProvider.test.js +100 -0
  365. package/dist/src/ui/contexts/ScrollProvider.test.js.map +1 -1
  366. package/dist/src/ui/contexts/SessionContext.d.ts +2 -2
  367. package/dist/src/ui/contexts/SessionContext.js.map +1 -1
  368. package/dist/src/ui/contexts/ToolActionsContext.d.ts +6 -0
  369. package/dist/src/ui/contexts/ToolActionsContext.js +19 -11
  370. package/dist/src/ui/contexts/ToolActionsContext.js.map +1 -1
  371. package/dist/src/ui/contexts/ToolActionsContext.test.js +90 -7
  372. package/dist/src/ui/contexts/ToolActionsContext.test.js.map +1 -1
  373. package/dist/src/ui/contexts/UIActionsContext.d.ts +4 -3
  374. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  375. package/dist/src/ui/contexts/UIStateContext.d.ts +10 -16
  376. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  377. package/dist/src/ui/hooks/atCommandProcessor.test.js +2 -1
  378. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  379. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +2 -1
  380. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +1 -1
  381. package/dist/src/ui/hooks/shellReducer.d.ts +12 -10
  382. package/dist/src/ui/hooks/shellReducer.js +67 -37
  383. package/dist/src/ui/hooks/shellReducer.js.map +1 -1
  384. package/dist/src/ui/hooks/shellReducer.test.js +207 -36
  385. package/dist/src/ui/hooks/shellReducer.test.js.map +1 -1
  386. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
  387. package/dist/src/ui/hooks/slashCommandProcessor.js +1 -1
  388. package/dist/src/ui/hooks/slashCommandProcessor.test.js +1 -1
  389. package/dist/src/ui/hooks/toolMapping.js +7 -0
  390. package/dist/src/ui/hooks/toolMapping.js.map +1 -1
  391. package/dist/src/ui/hooks/useAlternateBuffer.js +6 -1
  392. package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -1
  393. package/dist/src/ui/hooks/useAlternateBuffer.test.js +5 -0
  394. package/dist/src/ui/hooks/useAlternateBuffer.test.js.map +1 -1
  395. package/dist/src/ui/hooks/useAnimatedScrollbar.js +2 -2
  396. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
  397. package/dist/src/ui/hooks/useAtCompletion.js +1 -1
  398. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  399. package/dist/src/ui/hooks/useBackgroundTaskManager.d.ts +22 -0
  400. package/dist/src/ui/hooks/useBackgroundTaskManager.js +58 -0
  401. package/dist/src/ui/hooks/useBackgroundTaskManager.js.map +1 -0
  402. package/dist/src/ui/hooks/{useBackgroundShellManager.test.js → useBackgroundTaskManager.test.js} +50 -50
  403. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js.map +1 -0
  404. package/dist/src/ui/hooks/useBanner.d.ts +1 -0
  405. package/dist/src/ui/hooks/useBanner.js +16 -9
  406. package/dist/src/ui/hooks/useBanner.js.map +1 -1
  407. package/dist/src/ui/hooks/useBanner.test.js +7 -4
  408. package/dist/src/ui/hooks/useBanner.test.js.map +1 -1
  409. package/dist/src/ui/hooks/useBatchedScroll.js +2 -2
  410. package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -1
  411. package/dist/src/ui/hooks/useCommandCompletion.d.ts +2 -1
  412. package/dist/src/ui/hooks/useCommandCompletion.js +13 -3
  413. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  414. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +1 -1
  415. package/dist/src/ui/hooks/useCommandCompletion.test.js +82 -6
  416. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
  417. package/dist/src/ui/hooks/useComposerStatus.d.ts +21 -0
  418. package/dist/src/ui/hooks/useComposerStatus.js +78 -0
  419. package/dist/src/ui/hooks/useComposerStatus.js.map +1 -0
  420. package/dist/src/ui/hooks/useConsoleMessages.test.js +2 -2
  421. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -1
  422. package/dist/src/ui/hooks/useExecutionLifecycle.d.ts +28 -0
  423. package/dist/src/ui/hooks/{shellCommandProcessor.js → useExecutionLifecycle.js} +140 -58
  424. package/dist/src/ui/hooks/useExecutionLifecycle.js.map +1 -0
  425. package/dist/src/ui/hooks/useExecutionLifecycle.test.d.ts +6 -0
  426. package/dist/src/ui/hooks/{shellCommandProcessor.test.js → useExecutionLifecycle.test.js} +123 -81
  427. package/dist/src/ui/hooks/useExecutionLifecycle.test.js.map +1 -0
  428. package/dist/src/ui/hooks/useFolderTrust.js +1 -1
  429. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  430. package/dist/src/ui/hooks/useFolderTrust.test.js +1 -1
  431. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
  432. package/dist/src/ui/hooks/useGeminiStream.d.ts +6 -6
  433. package/dist/src/ui/hooks/useGeminiStream.js +140 -38
  434. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  435. package/dist/src/ui/hooks/useGeminiStream.test.js +176 -22
  436. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
  437. package/dist/src/ui/hooks/useGitBranchName.js +2 -2
  438. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
  439. package/dist/src/ui/hooks/useLoadingIndicator.js +1 -1
  440. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  441. package/dist/src/ui/hooks/useLoadingIndicator.test.js +10 -0
  442. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
  443. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +2 -2
  444. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
  445. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +1 -1
  446. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
  447. package/dist/src/ui/hooks/usePhraseCycler.js +4 -2
  448. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  449. package/dist/src/ui/hooks/useSessionBrowser.d.ts +1 -1
  450. package/dist/src/ui/hooks/useSessionBrowser.js +2 -2
  451. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  452. package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
  453. package/dist/src/ui/hooks/useSlashCompletion.js +37 -63
  454. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  455. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +1 -1
  456. package/dist/src/ui/hooks/useSlashCompletion.test.js +57 -47
  457. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
  458. package/dist/src/ui/hooks/useToolScheduler.d.ts +2 -1
  459. package/dist/src/ui/hooks/useToolScheduler.js +55 -1
  460. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
  461. package/dist/src/ui/hooks/useToolScheduler.test.js +107 -9
  462. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  463. package/dist/src/ui/key/keyBindings.d.ts +9 -1
  464. package/dist/src/ui/key/keyBindings.js +40 -3
  465. package/dist/src/ui/key/keyBindings.js.map +1 -1
  466. package/dist/src/ui/key/keyMatchers.test.js +12 -2
  467. package/dist/src/ui/key/keyMatchers.test.js.map +1 -1
  468. package/dist/src/ui/layouts/DefaultAppLayout.js +8 -6
  469. package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -1
  470. package/dist/src/ui/layouts/DefaultAppLayout.test.js +27 -22
  471. package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +1 -1
  472. package/dist/src/ui/noninteractive/nonInteractiveUi.js +1 -1
  473. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.d.ts +7 -0
  474. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js +147 -0
  475. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js.map +1 -0
  476. package/dist/src/ui/themes/theme-manager.js +2 -0
  477. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  478. package/dist/src/ui/themes/theme.js +1 -1
  479. package/dist/src/ui/themes/theme.js.map +1 -1
  480. package/dist/src/ui/types.d.ts +10 -2
  481. package/dist/src/ui/types.js.map +1 -1
  482. package/dist/src/ui/utils/CodeColorizer.d.ts +1 -0
  483. package/dist/src/ui/utils/CodeColorizer.js +17 -18
  484. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  485. package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -0
  486. package/dist/src/ui/utils/ConsolePatcher.js +12 -5
  487. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  488. package/dist/src/ui/utils/ConsolePatcher.test.d.ts +6 -0
  489. package/dist/src/ui/utils/ConsolePatcher.test.js +199 -0
  490. package/dist/src/ui/utils/ConsolePatcher.test.js.map +1 -0
  491. package/dist/src/ui/utils/TableRenderer.js +3 -3
  492. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  493. package/dist/src/ui/utils/borderStyles.d.ts +2 -2
  494. package/dist/src/ui/utils/borderStyles.js +2 -2
  495. package/dist/src/ui/utils/borderStyles.js.map +1 -1
  496. package/dist/src/ui/utils/directoryUtils.js +1 -1
  497. package/dist/src/ui/utils/directoryUtils.js.map +1 -1
  498. package/dist/src/ui/utils/fileUtils.d.ts +10 -0
  499. package/dist/src/ui/utils/fileUtils.js +17 -0
  500. package/dist/src/ui/utils/fileUtils.js.map +1 -0
  501. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +1 -0
  502. package/dist/src/ui/utils/terminalCapabilityManager.js +8 -0
  503. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
  504. package/dist/src/ui/utils/terminalCapabilityManager.test.js +38 -0
  505. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -1
  506. package/dist/src/ui/utils/toolLayoutUtils.d.ts +1 -1
  507. package/dist/src/ui/utils/toolLayoutUtils.js +1 -1
  508. package/dist/src/ui/utils/ui-sizing.test.js +1 -0
  509. package/dist/src/ui/utils/ui-sizing.test.js.map +1 -1
  510. package/dist/src/ui/utils/updateCheck.d.ts +1 -0
  511. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  512. package/dist/src/utils/activityLogger.js +16 -0
  513. package/dist/src/utils/activityLogger.js.map +1 -1
  514. package/dist/src/utils/cleanup.js +12 -5
  515. package/dist/src/utils/cleanup.js.map +1 -1
  516. package/dist/src/utils/commands.js +15 -0
  517. package/dist/src/utils/commands.js.map +1 -1
  518. package/dist/src/utils/commands.test.js +79 -0
  519. package/dist/src/utils/commands.test.js.map +1 -1
  520. package/dist/src/utils/envVarResolver.d.ts +5 -2
  521. package/dist/src/utils/envVarResolver.js +15 -6
  522. package/dist/src/utils/envVarResolver.js.map +1 -1
  523. package/dist/src/utils/envVarResolver.test.js +41 -24
  524. package/dist/src/utils/envVarResolver.test.js.map +1 -1
  525. package/dist/src/utils/errors.js +4 -4
  526. package/dist/src/utils/errors.js.map +1 -1
  527. package/dist/src/utils/events.d.ts +3 -1
  528. package/dist/src/utils/events.js +1 -0
  529. package/dist/src/utils/events.js.map +1 -1
  530. package/dist/src/utils/gitUtils.js +4 -4
  531. package/dist/src/utils/gitUtils.js.map +1 -1
  532. package/dist/src/utils/handleAutoUpdate.js +10 -3
  533. package/dist/src/utils/handleAutoUpdate.js.map +1 -1
  534. package/dist/src/utils/handleAutoUpdate.test.js +8 -2
  535. package/dist/src/utils/handleAutoUpdate.test.js.map +1 -1
  536. package/dist/src/utils/installationInfo.js +1 -1
  537. package/dist/src/utils/installationInfo.js.map +1 -1
  538. package/dist/src/utils/jsonoutput.js +1 -1
  539. package/dist/src/utils/jsonoutput.js.map +1 -1
  540. package/dist/src/utils/sandboxUtils.js +1 -1
  541. package/dist/src/utils/sandboxUtils.js.map +1 -1
  542. package/dist/src/utils/sessionCleanup.js +7 -30
  543. package/dist/src/utils/sessionCleanup.js.map +1 -1
  544. package/dist/src/utils/sessionCleanup.test.js +3 -0
  545. package/dist/src/utils/sessionCleanup.test.js.map +1 -1
  546. package/dist/src/utils/sessionUtils.js +1 -0
  547. package/dist/src/utils/sessionUtils.js.map +1 -1
  548. package/dist/src/utils/sessionUtils.test.js +179 -3
  549. package/dist/src/utils/sessionUtils.test.js.map +1 -1
  550. package/dist/src/utils/sessions.js +1 -1
  551. package/dist/src/utils/sessions.js.map +1 -1
  552. package/dist/src/utils/skillUtils.js +3 -1
  553. package/dist/src/utils/skillUtils.js.map +1 -1
  554. package/dist/src/utils/skillUtils.test.js +4 -6
  555. package/dist/src/utils/skillUtils.test.js.map +1 -1
  556. package/dist/src/utils/terminalNotifications.js +2 -4
  557. package/dist/src/utils/terminalNotifications.js.map +1 -1
  558. package/dist/src/utils/terminalNotifications.test.js +5 -3
  559. package/dist/src/utils/terminalNotifications.test.js.map +1 -1
  560. package/dist/src/utils/userStartupWarnings.js +2 -2
  561. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  562. package/dist/tsconfig.tsbuildinfo +1 -1
  563. package/package.json +4 -4
  564. package/dist/src/ui/commands/shellsCommand.js.map +0 -1
  565. package/dist/src/ui/commands/shellsCommand.test.js +0 -29
  566. package/dist/src/ui/commands/shellsCommand.test.js.map +0 -1
  567. package/dist/src/ui/components/BackgroundShellDisplay.d.ts +0 -16
  568. package/dist/src/ui/components/BackgroundShellDisplay.js.map +0 -1
  569. package/dist/src/ui/components/BackgroundShellDisplay.test.js.map +0 -1
  570. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -28
  571. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  572. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
  573. package/dist/src/ui/hooks/useBackgroundShellManager.d.ts +0 -22
  574. package/dist/src/ui/hooks/useBackgroundShellManager.js +0 -58
  575. package/dist/src/ui/hooks/useBackgroundShellManager.js.map +0 -1
  576. package/dist/src/ui/hooks/useBackgroundShellManager.test.js.map +0 -1
  577. /package/dist/src/{ui/commands/shellsCommand.test.d.ts → nonInteractiveCliAgentSession.test.d.ts} +0 -0
  578. /package/dist/src/ui/{components/BackgroundShellDisplay.test.d.ts → commands/tasksCommand.test.d.ts} +0 -0
  579. /package/dist/src/ui/{hooks/shellCommandProcessor.test.d.ts → components/BackgroundTaskDisplay.test.d.ts} +0 -0
  580. /package/dist/src/ui/hooks/{useBackgroundShellManager.test.d.ts → useBackgroundTaskManager.test.d.ts} +0 -0
@@ -1,11 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useState, useRef, useMemo } from 'react';
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState, useRef, useMemo, Fragment, } from 'react';
3
3
  import clipboardy from 'clipboardy';
4
4
  import { Box, Text, useStdout } from 'ink';
5
5
  import { SuggestionsDisplay, MAX_WIDTH } from './SuggestionsDisplay.js';
6
6
  import { theme } from '../semantic-colors.js';
7
7
  import { useInputHistory } from '../hooks/useInputHistory.js';
8
8
  import { escapeAtSymbols } from '../hooks/atCommandProcessor.js';
9
+ import { ScrollableList, } from './shared/ScrollableList.js';
9
10
  import { HalfLinePaddedBox } from './shared/HalfLinePaddedBox.js';
10
11
  import { logicalPosToOffset, expandPastePlaceholders, getTransformUnderCursor, LARGE_PASTE_LINE_THRESHOLD, LARGE_PASTE_CHAR_THRESHOLD, } from './shared/text-buffer.js';
11
12
  import { cpSlice, cpLen, toCodePoints, cpIndexToOffset, } from '../utils/textUtils.js';
@@ -29,6 +30,7 @@ import { getSafeLowColorBackground } from '../themes/color-utils.js';
29
30
  import { isLowColorDepth } from '../utils/terminalUtils.js';
30
31
  import { useShellFocusState } from '../contexts/ShellFocusContext.js';
31
32
  import { useUIState } from '../contexts/UIStateContext.js';
33
+ import { useInputState } from '../contexts/InputContext.js';
32
34
  import { appEvents, AppEvent, TransientMessageType, } from '../../utils/events.js';
33
35
  import { useSettings } from '../contexts/SettingsContext.js';
34
36
  import { StreamingState } from '../types.js';
@@ -100,7 +102,9 @@ export function tryTogglePasteExpansion(buffer) {
100
102
  });
101
103
  return true;
102
104
  }
103
- export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, config, slashCommands, commandContext, placeholder = ' Type your message or @path/to/file', focus = true, inputWidth, suggestionsWidth, shellModeActive, setShellModeActive, approvalMode, onEscapePromptChange, onSuggestionsVisibilityChange, vimHandleInput, isEmbeddedShellFocused, setQueueErrorMessage, streamingState, popAllMessages, suggestionsPosition = 'below', setBannerVisible, }) => {
105
+ export const InputPrompt = ({ onSubmit, onClearScreen, config, slashCommands, commandContext, placeholder = ' Type your message or @path/to/file', focus = true, setShellModeActive, approvalMode, onEscapePromptChange, onSuggestionsVisibilityChange, vimHandleInput, isEmbeddedShellFocused, setQueueErrorMessage, streamingState, popAllMessages, onQueueMessage, suggestionsPosition = 'below', setBannerVisible, }) => {
106
+ const inputState = useInputState();
107
+ const { buffer, userMessages, shellModeActive, copyModeEnabled, inputWidth, suggestionsWidth, } = inputState;
104
108
  const isHelpDismissKey = useIsHelpDismissKey();
105
109
  const keyMatchers = useKeyMatchers();
106
110
  const { stdout } = useStdout();
@@ -108,7 +112,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
108
112
  const kittyProtocol = useKittyKeyboardProtocol();
109
113
  const isShellFocused = useShellFocusState();
110
114
  const { setEmbeddedShellFocused, setShortcutsHelpVisible, toggleCleanUiDetailsVisible, } = useUIActions();
111
- const { terminalWidth, activePtyId, history, backgroundShells, backgroundShellHeight, shortcutsHelpVisible, } = useUIState();
115
+ const { terminalWidth, activePtyId, history, backgroundTasks, backgroundTaskHeight, shortcutsHelpVisible, } = useUIState();
112
116
  const [suppressCompletion, setSuppressCompletion] = useState(false);
113
117
  const { handlePress: registerPlainTabPress, resetCount: resetPlainTabPress } = useRepeatedKeyPress({
114
118
  windowMs: DOUBLE_TAB_CLEAN_UI_TOGGLE_WINDOW_MS,
@@ -140,6 +144,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
140
144
  const pasteTimeoutRef = useRef(null);
141
145
  const innerBoxRef = useRef(null);
142
146
  const hasUserNavigatedSuggestions = useRef(false);
147
+ const listRef = useRef(null);
143
148
  const [reverseSearchActive, setReverseSearchActive] = useState(false);
144
149
  const [commandSearchActive, setCommandSearchActive] = useState(false);
145
150
  const [textBeforeReverseSearch, setTextBeforeReverseSearch] = useState('');
@@ -181,7 +186,10 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
181
186
  const activeCompletion = getActiveCompletion();
182
187
  const shouldShowSuggestions = activeCompletion.showSuggestions;
183
188
  const { forceShowShellSuggestions, setForceShowShellSuggestions, isShellSuggestionsVisible, } = completion;
184
- const showCursor = focus && isShellFocused && !isEmbeddedShellFocused;
189
+ const showCursor = focus && isShellFocused && !isEmbeddedShellFocused && !copyModeEnabled;
190
+ useEffect(() => {
191
+ appEvents.emit(AppEvent.ScrollToBottom);
192
+ }, [buffer.text, buffer.cursor]);
185
193
  // Notify parent component about escape prompt state changes
186
194
  useEffect(() => {
187
195
  if (onEscapePromptChange) {
@@ -239,7 +247,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
239
247
  if (isSlash) {
240
248
  const { commandToExecute } = parseSlashCommand(trimmedMessage, slashCommands);
241
249
  if (commandToExecute?.isSafeConcurrent) {
242
- inputHistory.handleSubmit(trimmedMessage);
250
+ handleSubmitAndClear(trimmedMessage);
243
251
  return;
244
252
  }
245
253
  }
@@ -253,6 +261,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
253
261
  streamingState,
254
262
  setQueueErrorMessage,
255
263
  slashCommands,
264
+ handleSubmitAndClear,
256
265
  ]);
257
266
  // Effect to reset completion if history navigation just occurred and set the text
258
267
  useEffect(() => {
@@ -354,7 +363,8 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
354
363
  if (isEmbeddedShellFocused) {
355
364
  setEmbeddedShellFocused(false);
356
365
  }
357
- const visualRow = buffer.visualScrollRow + relY;
366
+ const currentScrollTop = Math.round(listRef.current?.getScrollState().scrollTop ?? buffer.visualScrollRow);
367
+ const visualRow = currentScrollTop + relY;
358
368
  buffer.moveToVisualPosition(visualRow, relX);
359
369
  }, { isActive: focus });
360
370
  const isAlternateBuffer = useAlternateBuffer();
@@ -362,14 +372,15 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
362
372
  useMouseClick(innerBoxRef, (_event, relX, relY) => {
363
373
  if (!isAlternateBuffer)
364
374
  return;
365
- const visualLine = buffer.viewportVisualLines[relY];
375
+ const currentScrollTop = Math.round(listRef.current?.getScrollState().scrollTop ?? buffer.visualScrollRow);
376
+ const visualLine = buffer.allVisualLines[currentScrollTop + relY];
366
377
  if (!visualLine)
367
378
  return;
368
379
  // Even if we click past the end of the line, we might want to collapse an expanded paste
369
380
  const isPastEndOfLine = relX >= stringWidth(visualLine);
370
381
  const logicalPos = isPastEndOfLine
371
382
  ? null
372
- : buffer.getLogicalPositionFromVisual(buffer.visualScrollRow + relY, relX);
383
+ : buffer.getLogicalPositionFromVisual(currentScrollTop + relY, relX);
373
384
  // Check for paste placeholder (collapsed state)
374
385
  if (logicalPos) {
375
386
  const transform = getTransformUnderCursor(logicalPos.row, logicalPos.col, buffer.transformationsByLine, { includeEdge: true });
@@ -380,7 +391,9 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
380
391
  }
381
392
  // If we didn't click a placeholder to expand, check if we are inside or after
382
393
  // an expanded paste region and collapse it.
383
- const row = buffer.visualScrollRow + relY;
394
+ const visualRow = currentScrollTop + relY;
395
+ const mapEntry = buffer.visualToLogicalMap[visualRow];
396
+ const row = mapEntry ? mapEntry[0] : visualRow;
384
397
  const expandedId = buffer.getExpandedPasteAtLine(row);
385
398
  if (expandedId) {
386
399
  buffer.togglePasteExpansion(expandedId, row, logicalPos?.col ?? relX);
@@ -444,16 +457,32 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
444
457
  setShortcutsHelpVisible(false);
445
458
  return true;
446
459
  }
447
- if (key.name === 'escape' &&
448
- (streamingState === StreamingState.Responding ||
449
- streamingState === StreamingState.WaitingForConfirmation)) {
450
- return false;
451
- }
460
+ const isGenerating = streamingState === StreamingState.Responding ||
461
+ streamingState === StreamingState.WaitingForConfirmation;
462
+ const isQueueMessageKey = keyMatchers[Command.QUEUE_MESSAGE](key);
452
463
  const isPlainTab = key.name === 'tab' && !key.shift && !key.alt && !key.ctrl && !key.cmd;
453
464
  const hasTabCompletionInteraction = (completion.showSuggestions && isShellSuggestionsVisible) ||
454
465
  Boolean(completion.promptCompletion.text) ||
455
466
  reverseSearchActive ||
456
467
  commandSearchActive;
468
+ if (isGenerating &&
469
+ isQueueMessageKey &&
470
+ !hasTabCompletionInteraction &&
471
+ buffer.text.trim().length > 0) {
472
+ const trimmedMessage = buffer.text.trim();
473
+ const isSlash = isSlashCommand(trimmedMessage);
474
+ if (isSlash || shellModeActive) {
475
+ setQueueErrorMessage(`${shellModeActive ? 'Shell' : 'Slash'} commands cannot be queued`);
476
+ }
477
+ else if (onQueueMessage) {
478
+ onQueueMessage(buffer.text);
479
+ buffer.setText('');
480
+ resetCompletionState();
481
+ resetReverseSearchCompletionState();
482
+ }
483
+ resetPlainTabPress();
484
+ return true;
485
+ }
457
486
  if (isPlainTab && shellModeActive) {
458
487
  resetPlainTabPress();
459
488
  if (!shouldShowSuggestions) {
@@ -600,6 +629,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
600
629
  resetEscapeState();
601
630
  return true;
602
631
  }
632
+ // If we're generating and no local overlay consumed Escape, let it
633
+ // propagate to the global cancellation handler.
634
+ if (isGenerating) {
635
+ return false;
636
+ }
603
637
  handleEscPress();
604
638
  return true;
605
639
  }
@@ -886,6 +920,14 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
886
920
  buffer.openInExternalEditor();
887
921
  return true;
888
922
  }
923
+ if (keyMatchers[Command.DEPRECATED_OPEN_EXTERNAL_EDITOR](key)) {
924
+ const cmdKey = formatCommand(Command.OPEN_EXTERNAL_EDITOR);
925
+ appEvents.emit(AppEvent.TransientMessage, {
926
+ message: `Use ${cmdKey} to open the external editor.`,
927
+ type: TransientMessageType.Hint,
928
+ });
929
+ return true;
930
+ }
889
931
  // Ctrl+V for clipboard paste
890
932
  if (keyMatchers[Command.PASTE_CLIPBOARD](key)) {
891
933
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
@@ -897,7 +939,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
897
939
  }
898
940
  if (keyMatchers[Command.FOCUS_SHELL_INPUT](key)) {
899
941
  if (activePtyId ||
900
- (backgroundShells.size > 0 && backgroundShellHeight > 0)) {
942
+ (backgroundTasks.size > 0 && backgroundTaskHeight > 0)) {
901
943
  setEmbeddedShellFocused(true);
902
944
  return true;
903
945
  }
@@ -947,11 +989,14 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
947
989
  shortcutsHelpVisible,
948
990
  setShortcutsHelpVisible,
949
991
  tryLoadQueuedMessages,
992
+ onQueueMessage,
993
+ setQueueErrorMessage,
994
+ resetReverseSearchCompletionState,
950
995
  setBannerVisible,
951
996
  activePtyId,
952
997
  setEmbeddedShellFocused,
953
- backgroundShells.size,
954
- backgroundShellHeight,
998
+ backgroundTasks.size,
999
+ backgroundTaskHeight,
955
1000
  streamingState,
956
1001
  handleEscPress,
957
1002
  registerPlainTabPress,
@@ -965,12 +1010,10 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
965
1010
  settings,
966
1011
  ]);
967
1012
  useKeypress(handleInput, {
968
- isActive: !isEmbeddedShellFocused,
1013
+ isActive: !isEmbeddedShellFocused && !copyModeEnabled,
969
1014
  priority: true,
970
1015
  });
971
- const linesToRender = buffer.viewportVisualLines;
972
1016
  const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = buffer.visualCursor;
973
- const scrollVisualRow = buffer.visualScrollRow;
974
1017
  const getGhostTextLines = useCallback(() => {
975
1018
  if (!completion.promptCompletion.text ||
976
1019
  !buffer.text ||
@@ -1068,6 +1111,94 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
1068
1111
  inputWidth,
1069
1112
  ]);
1070
1113
  const { inlineGhost, additionalLines } = getGhostTextLines();
1114
+ const scrollableData = useMemo(() => {
1115
+ const items = buffer.allVisualLines.map((lineText, index) => ({
1116
+ type: 'visualLine',
1117
+ lineText,
1118
+ absoluteVisualIdx: index,
1119
+ }));
1120
+ additionalLines.forEach((ghostLine, index) => {
1121
+ items.push({
1122
+ type: 'ghostLine',
1123
+ ghostLine,
1124
+ index,
1125
+ });
1126
+ });
1127
+ return items;
1128
+ }, [buffer.allVisualLines, additionalLines]);
1129
+ const renderItem = useCallback(({ item }) => {
1130
+ if (item.type === 'ghostLine') {
1131
+ const padding = Math.max(0, inputWidth - stringWidth(item.ghostLine));
1132
+ return (_jsx(Box, { height: 1, children: _jsxs(Text, { color: theme.text.secondary, children: [item.ghostLine, ' '.repeat(padding)] }) }));
1133
+ }
1134
+ const { lineText, absoluteVisualIdx } = item;
1135
+ // console.log('renderItem called with:', lineText);
1136
+ const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
1137
+ if (!mapEntry)
1138
+ return _jsx(Text, { children: " " });
1139
+ const isOnCursorLine = focus && absoluteVisualIdx === cursorVisualRowAbsolute;
1140
+ const renderedLine = [];
1141
+ const [logicalLineIdx] = mapEntry;
1142
+ const logicalLine = buffer.lines[logicalLineIdx] || '';
1143
+ const transformations = buffer.transformationsByLine[logicalLineIdx] ?? [];
1144
+ const tokens = parseInputForHighlighting(logicalLine, logicalLineIdx, transformations, ...(focus && buffer.cursor[0] === logicalLineIdx
1145
+ ? [buffer.cursor[1]]
1146
+ : []));
1147
+ const visualStartCol = buffer.visualToTransformedMap[absoluteVisualIdx] ?? 0;
1148
+ const visualEndCol = visualStartCol + cpLen(lineText);
1149
+ const segments = parseSegmentsFromTokens(tokens, visualStartCol, visualEndCol);
1150
+ let charCount = 0;
1151
+ segments.forEach((seg, segIdx) => {
1152
+ const segLen = cpLen(seg.text);
1153
+ let display = seg.text;
1154
+ if (isOnCursorLine) {
1155
+ const relCol = cursorVisualColAbsolute;
1156
+ const segStart = charCount;
1157
+ const segEnd = segStart + segLen;
1158
+ if (relCol >= segStart && relCol < segEnd) {
1159
+ const charToHighlight = cpSlice(display, relCol - segStart, relCol - segStart + 1);
1160
+ const highlighted = showCursor
1161
+ ? chalk.inverse(charToHighlight)
1162
+ : charToHighlight;
1163
+ display =
1164
+ cpSlice(display, 0, relCol - segStart) +
1165
+ highlighted +
1166
+ cpSlice(display, relCol - segStart + 1);
1167
+ }
1168
+ charCount = segEnd;
1169
+ }
1170
+ else {
1171
+ charCount += segLen;
1172
+ }
1173
+ const color = seg.type === 'command' || seg.type === 'file' || seg.type === 'paste'
1174
+ ? theme.text.accent
1175
+ : theme.text.primary;
1176
+ renderedLine.push(_jsx(Text, { color: color, children: display }, `token-${segIdx}`));
1177
+ });
1178
+ const currentLineGhost = isOnCursorLine ? inlineGhost : '';
1179
+ if (isOnCursorLine &&
1180
+ cursorVisualColAbsolute === cpLen(lineText) &&
1181
+ !currentLineGhost) {
1182
+ renderedLine.push(_jsx(Text, { children: showCursor ? chalk.inverse(' ') : ' ' }, `cursor-end-${cursorVisualColAbsolute}`));
1183
+ }
1184
+ const showCursorBeforeGhost = focus &&
1185
+ isOnCursorLine &&
1186
+ cursorVisualColAbsolute === cpLen(lineText) &&
1187
+ currentLineGhost;
1188
+ return (_jsx(Box, { height: 1, children: _jsxs(Text, { terminalCursorFocus: showCursor && isOnCursorLine, terminalCursorPosition: cpIndexToOffset(lineText, cursorVisualColAbsolute), children: [renderedLine, showCursorBeforeGhost && (showCursor ? chalk.inverse(' ') : ' '), currentLineGhost && (_jsx(Text, { color: theme.text.secondary, children: currentLineGhost }))] }) }));
1189
+ }, [
1190
+ buffer.visualToLogicalMap,
1191
+ buffer.lines,
1192
+ buffer.transformationsByLine,
1193
+ buffer.cursor,
1194
+ buffer.visualToTransformedMap,
1195
+ focus,
1196
+ cursorVisualRowAbsolute,
1197
+ cursorVisualColAbsolute,
1198
+ showCursor,
1199
+ inlineGhost,
1200
+ inputWidth,
1201
+ ]);
1071
1202
  const useBackgroundColor = config.getUseBackgroundColor();
1072
1203
  const isLowColor = isLowColorDepth();
1073
1204
  const terminalBg = theme.background.primary || 'black';
@@ -1083,6 +1214,38 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
1083
1214
  }
1084
1215
  return false;
1085
1216
  }, [useBackgroundColor, isLowColor, terminalBg]);
1217
+ const prevCursorRef = useRef(buffer.visualCursor);
1218
+ const prevTextRef = useRef(buffer.text);
1219
+ // Effect to ensure cursor remains visible after interactions
1220
+ useEffect(() => {
1221
+ const cursorChanged = prevCursorRef.current !== buffer.visualCursor;
1222
+ const textChanged = prevTextRef.current !== buffer.text;
1223
+ prevCursorRef.current = buffer.visualCursor;
1224
+ prevTextRef.current = buffer.text;
1225
+ if (!cursorChanged && !textChanged)
1226
+ return;
1227
+ if (!listRef.current || !focus)
1228
+ return;
1229
+ const { scrollTop, innerHeight } = listRef.current.getScrollState();
1230
+ if (innerHeight === 0)
1231
+ return;
1232
+ const cursorVisualRow = buffer.visualCursor[0];
1233
+ const actualScrollTop = Math.round(scrollTop);
1234
+ // If cursor is out of the currently visible viewport...
1235
+ if (cursorVisualRow < actualScrollTop ||
1236
+ cursorVisualRow >= actualScrollTop + innerHeight) {
1237
+ // Calculate minimal scroll to make it visible
1238
+ let newScrollTop = actualScrollTop;
1239
+ if (cursorVisualRow < actualScrollTop) {
1240
+ newScrollTop = cursorVisualRow;
1241
+ }
1242
+ else if (cursorVisualRow >= actualScrollTop + innerHeight) {
1243
+ newScrollTop = cursorVisualRow - innerHeight + 1;
1244
+ }
1245
+ listRef.current.scrollToIndex({ index: newScrollTop });
1246
+ }
1247
+ }, [buffer.visualCursor, buffer.text, focus]);
1248
+ const listBackgroundColor = useLineFallback || !useBackgroundColor ? undefined : theme.background.input;
1086
1249
  useEffect(() => {
1087
1250
  if (onSuggestionsVisibilityChange) {
1088
1251
  onSuggestionsVisibilityChange(shouldShowSuggestions);
@@ -1120,74 +1283,16 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
1120
1283
  const borderColor = isShellFocused && !isEmbeddedShellFocused
1121
1284
  ? (statusColor ?? theme.ui.focus)
1122
1285
  : theme.border.default;
1123
- return (_jsxs(_Fragment, { children: [suggestionsPosition === 'above' && suggestionsNode, useLineFallback ? (_jsx(Box, { borderStyle: "round", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: borderColor, width: terminalWidth, flexDirection: "row", alignItems: "flex-start", height: 0 })) : null, _jsx(HalfLinePaddedBox, { backgroundBaseColor: theme.background.input, backgroundOpacity: 1, useBackgroundColor: useBackgroundColor, children: _jsxs(Box, { flexGrow: 1, flexDirection: "row", paddingX: 1, borderColor: borderColor, borderStyle: useLineFallback ? 'round' : undefined, borderTop: false, borderBottom: false, borderLeft: !useBackgroundColor, borderRight: !useBackgroundColor, children: [_jsxs(Text, { color: statusColor ?? theme.text.accent, "aria-label": statusText || undefined, children: [shellModeActive ? (reverseSearchActive ? (_jsxs(Text, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: ["(r:)", ' '] })) : ('!')) : commandSearchActive ? (_jsx(Text, { color: theme.text.accent, children: "(r:) " })) : showYoloStyling ? ('*') : ('>'), ' '] }), _jsx(Box, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: buffer.text.length === 0 && placeholder ? (showCursor ? (_jsxs(Text, { terminalCursorFocus: showCursor, terminalCursorPosition: 0, children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (linesToRender
1124
- .map((lineText, visualIdxInRenderedSet) => {
1125
- const absoluteVisualIdx = scrollVisualRow + visualIdxInRenderedSet;
1126
- const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
1127
- if (!mapEntry)
1128
- return null;
1129
- const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
1130
- const isOnCursorLine = focus && visualIdxInRenderedSet === cursorVisualRow;
1131
- const renderedLine = [];
1132
- const [logicalLineIdx] = mapEntry;
1133
- const logicalLine = buffer.lines[logicalLineIdx] || '';
1134
- const transformations = buffer.transformationsByLine[logicalLineIdx] ?? [];
1135
- const tokens = parseInputForHighlighting(logicalLine, logicalLineIdx, transformations, ...(focus && buffer.cursor[0] === logicalLineIdx
1136
- ? [buffer.cursor[1]]
1137
- : []));
1138
- const startColInTransformed = buffer.visualToTransformedMap[absoluteVisualIdx] ?? 0;
1139
- const visualStartCol = startColInTransformed;
1140
- const visualEndCol = visualStartCol + cpLen(lineText);
1141
- const segments = parseSegmentsFromTokens(tokens, visualStartCol, visualEndCol);
1142
- let charCount = 0;
1143
- segments.forEach((seg, segIdx) => {
1144
- const segLen = cpLen(seg.text);
1145
- let display = seg.text;
1146
- if (isOnCursorLine) {
1147
- const relativeVisualColForHighlight = cursorVisualColAbsolute;
1148
- const segStart = charCount;
1149
- const segEnd = segStart + segLen;
1150
- if (relativeVisualColForHighlight >= segStart &&
1151
- relativeVisualColForHighlight < segEnd) {
1152
- const charToHighlight = cpSlice(display, relativeVisualColForHighlight - segStart, relativeVisualColForHighlight - segStart + 1);
1153
- const highlighted = showCursor
1154
- ? chalk.inverse(charToHighlight)
1155
- : charToHighlight;
1156
- display =
1157
- cpSlice(display, 0, relativeVisualColForHighlight - segStart) +
1158
- highlighted +
1159
- cpSlice(display, relativeVisualColForHighlight - segStart + 1);
1160
- }
1161
- charCount = segEnd;
1162
- }
1163
- else {
1164
- // Advance the running counter even when not on cursor line
1165
- charCount += segLen;
1166
- }
1167
- const color = seg.type === 'command' ||
1168
- seg.type === 'file' ||
1169
- seg.type === 'paste'
1170
- ? theme.text.accent
1171
- : theme.text.primary;
1172
- renderedLine.push(_jsx(Text, { color: color, children: display }, `token-${segIdx}`));
1173
- });
1174
- const currentLineGhost = isOnCursorLine ? inlineGhost : '';
1175
- if (isOnCursorLine &&
1176
- cursorVisualColAbsolute === cpLen(lineText)) {
1177
- if (!currentLineGhost) {
1178
- renderedLine.push(_jsx(Text, { children: showCursor ? chalk.inverse(' ') : ' ' }, `cursor-end-${cursorVisualColAbsolute}`));
1179
- }
1180
- }
1181
- const showCursorBeforeGhost = focus &&
1182
- isOnCursorLine &&
1183
- cursorVisualColAbsolute === cpLen(lineText) &&
1184
- currentLineGhost;
1185
- return (_jsx(Box, { height: 1, children: _jsxs(Text, { terminalCursorFocus: showCursor && isOnCursorLine, terminalCursorPosition: cpIndexToOffset(lineText, cursorVisualColAbsolute), children: [renderedLine, showCursorBeforeGhost &&
1186
- (showCursor ? chalk.inverse(' ') : ' '), currentLineGhost && (_jsx(Text, { color: theme.text.secondary, children: currentLineGhost }))] }) }, `line-${visualIdxInRenderedSet}`));
1187
- })
1188
- .concat(additionalLines.map((ghostLine, index) => {
1189
- const padding = Math.max(0, inputWidth - stringWidth(ghostLine));
1190
- return (_jsxs(Text, { color: theme.text.secondary, children: [ghostLine, ' '.repeat(padding)] }, `ghost-line-${index}`));
1191
- }))) })] }) }), useLineFallback ? (_jsx(Box, { borderStyle: "round", borderTop: false, borderBottom: true, borderLeft: false, borderRight: false, borderColor: borderColor, width: terminalWidth, flexDirection: "row", alignItems: "flex-start", height: 0 })) : null, suggestionsPosition === 'below' && suggestionsNode] }));
1286
+ return (_jsxs(_Fragment, { children: [suggestionsPosition === 'above' && suggestionsNode, useLineFallback ? (_jsx(Box, { borderStyle: "round", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: borderColor, width: terminalWidth, flexDirection: "row", alignItems: "flex-start", height: 0 })) : null, _jsx(HalfLinePaddedBox, { backgroundBaseColor: theme.background.input, backgroundOpacity: 1, useBackgroundColor: useBackgroundColor, children: _jsxs(Box, { flexGrow: 1, flexDirection: "row", paddingX: 1, borderColor: borderColor, borderStyle: useLineFallback ? 'round' : undefined, borderTop: false, borderBottom: false, borderLeft: !useBackgroundColor, borderRight: !useBackgroundColor, children: [_jsxs(Text, { color: statusColor ?? theme.text.accent, "aria-label": statusText || undefined, children: [shellModeActive ? (reverseSearchActive ? (_jsxs(Text, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: ["(r:)", ' '] })) : ('!')) : commandSearchActive ? (_jsx(Text, { color: theme.text.accent, children: "(r:) " })) : showYoloStyling ? ('*') : ('>'), ' '] }), _jsx(Box, { flexGrow: 1, flexDirection: "column", ref: innerBoxRef, children: buffer.text.length === 0 && placeholder ? (showCursor ? (_jsxs(Text, { terminalCursorFocus: showCursor, terminalCursorPosition: 0, children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (_jsx(Box, { flexDirection: "column", height: Math.min(buffer.viewportHeight, scrollableData.length), width: "100%", children: isAlternateBuffer ? (_jsx(ScrollableList, { ref: listRef, hasFocus: focus, data: scrollableData, renderItem: renderItem, estimatedItemHeight: () => 1, fixedItemHeight: true, keyExtractor: (item) => item.type === 'visualLine'
1287
+ ? `line-${item.absoluteVisualIdx}`
1288
+ : `ghost-${item.index}`, width: inputWidth, backgroundColor: listBackgroundColor, containerHeight: Math.min(buffer.viewportHeight, scrollableData.length) })) : (scrollableData
1289
+ .slice(buffer.visualScrollRow, buffer.visualScrollRow + buffer.viewportHeight)
1290
+ .map((item, index) => {
1291
+ const actualIndex = buffer.visualScrollRow + index;
1292
+ const key = item.type === 'visualLine'
1293
+ ? `line-${item.absoluteVisualIdx}`
1294
+ : `ghost-${item.index}`;
1295
+ return (_jsx(Fragment, { children: renderItem({ item, index: actualIndex }) }, key));
1296
+ })) })) })] }) }), useLineFallback ? (_jsx(Box, { borderStyle: "round", borderTop: false, borderBottom: true, borderLeft: false, borderRight: false, borderColor: borderColor, width: terminalWidth, flexDirection: "row", alignItems: "flex-start", height: 0 })) : null, suggestionsPosition === 'below' && suggestionsNode] }));
1192
1297
  };
1193
1298
  //# sourceMappingURL=InputPrompt.js.map