@machina.ai/cell-cli 1.33.0-rc1 → 1.38.1-rc1

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 (2022) hide show
  1. package/dist/index.js +14 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +7 -7
  4. package/dist/src/acp/acpClient.d.ts +56 -0
  5. package/dist/src/{zed-integration/zedIntegration.js → acp/acpClient.js} +765 -121
  6. package/dist/src/acp/acpClient.js.map +1 -0
  7. package/dist/src/acp/acpClient.test.js +1787 -0
  8. package/dist/src/acp/acpClient.test.js.map +1 -0
  9. package/dist/src/{zed-integration → acp}/acpErrors.js +2 -0
  10. package/dist/src/acp/acpErrors.js.map +1 -0
  11. package/dist/src/acp/acpErrors.test.js.map +1 -0
  12. package/dist/src/{zed-integration → acp}/acpResume.test.js +83 -8
  13. package/dist/src/acp/acpResume.test.js.map +1 -0
  14. package/dist/src/acp/commandHandler.d.ts +26 -0
  15. package/dist/src/acp/commandHandler.js +106 -0
  16. package/dist/src/acp/commandHandler.js.map +1 -0
  17. package/dist/src/acp/commandHandler.test.js +29 -0
  18. package/dist/src/acp/commandHandler.test.js.map +1 -0
  19. package/dist/src/acp/commands/about.d.ts +11 -0
  20. package/dist/src/acp/commands/about.js +53 -0
  21. package/dist/src/acp/commands/about.js.map +1 -0
  22. package/dist/src/acp/commands/commandRegistry.d.ts +12 -0
  23. package/dist/src/acp/commands/commandRegistry.js +26 -0
  24. package/dist/src/acp/commands/commandRegistry.js.map +1 -0
  25. package/dist/src/acp/commands/extensions.d.ts +57 -0
  26. package/dist/src/acp/commands/extensions.js +331 -0
  27. package/dist/src/acp/commands/extensions.js.map +1 -0
  28. package/dist/src/acp/commands/help.d.ts +14 -0
  29. package/dist/src/acp/commands/help.js +35 -0
  30. package/dist/src/acp/commands/help.js.map +1 -0
  31. package/dist/src/acp/commands/help.test.js +40 -0
  32. package/dist/src/acp/commands/help.test.js.map +1 -0
  33. package/dist/src/acp/commands/init.d.ts +12 -0
  34. package/dist/src/acp/commands/init.js +47 -0
  35. package/dist/src/acp/commands/init.js.map +1 -0
  36. package/dist/src/acp/commands/memory.d.ts +34 -0
  37. package/dist/src/acp/commands/memory.js +86 -0
  38. package/dist/src/acp/commands/memory.js.map +1 -0
  39. package/dist/src/acp/commands/restore.d.ts +18 -0
  40. package/dist/src/acp/commands/restore.js +141 -0
  41. package/dist/src/acp/commands/restore.js.map +1 -0
  42. package/dist/src/acp/commands/types.d.ts +31 -0
  43. package/dist/src/acp/commands/types.js +7 -0
  44. package/dist/src/acp/commands/types.js.map +1 -0
  45. package/dist/src/{zed-integration → acp}/fileSystemService.d.ts +6 -2
  46. package/dist/src/acp/fileSystemService.js +78 -0
  47. package/dist/src/acp/fileSystemService.js.map +1 -0
  48. package/dist/src/acp/fileSystemService.test.js +162 -0
  49. package/dist/src/acp/fileSystemService.test.js.map +1 -0
  50. package/dist/src/commands/extensions/disable.js +1 -2
  51. package/dist/src/commands/extensions/disable.js.map +1 -1
  52. package/dist/src/commands/extensions/disable.test.js +2 -2
  53. package/dist/src/commands/extensions/disable.test.js.map +1 -1
  54. package/dist/src/commands/extensions/examples/policies/README.md +41 -0
  55. package/dist/src/commands/extensions/examples/policies/gemini-extension.json +5 -0
  56. package/dist/src/commands/extensions/examples/policies/policies/policies.toml +28 -0
  57. package/dist/src/commands/extensions/examples/themes-example/README.md +8 -5
  58. package/dist/src/commands/extensions/examples/themes-example/gemini-extension.json +1 -1
  59. package/dist/src/commands/extensions/install.d.ts +1 -0
  60. package/dist/src/commands/extensions/install.js +86 -6
  61. package/dist/src/commands/extensions/install.js.map +1 -1
  62. package/dist/src/commands/extensions/install.test.js +199 -28
  63. package/dist/src/commands/extensions/install.test.js.map +1 -1
  64. package/dist/src/commands/extensions/link.js +1 -2
  65. package/dist/src/commands/extensions/link.js.map +1 -1
  66. package/dist/src/commands/extensions/link.test.js +6 -22
  67. package/dist/src/commands/extensions/link.test.js.map +1 -1
  68. package/dist/src/commands/extensions/list.js +1 -2
  69. package/dist/src/commands/extensions/list.js.map +1 -1
  70. package/dist/src/commands/extensions/list.test.js +9 -25
  71. package/dist/src/commands/extensions/list.test.js.map +1 -1
  72. package/dist/src/commands/extensions/new.js +1 -1
  73. package/dist/src/commands/extensions/new.js.map +1 -1
  74. package/dist/src/commands/extensions/uninstall.d.ts +2 -1
  75. package/dist/src/commands/extensions/uninstall.js +27 -6
  76. package/dist/src/commands/extensions/uninstall.js.map +1 -1
  77. package/dist/src/commands/extensions/uninstall.test.js +48 -7
  78. package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
  79. package/dist/src/commands/extensions/update.js +1 -2
  80. package/dist/src/commands/extensions/update.js.map +1 -1
  81. package/dist/src/commands/extensions/utils.js +1 -0
  82. package/dist/src/commands/extensions/utils.js.map +1 -1
  83. package/dist/src/commands/extensions/validate.js +1 -2
  84. package/dist/src/commands/extensions/validate.js.map +1 -1
  85. package/dist/src/commands/hooks/migrate.js +3 -0
  86. package/dist/src/commands/hooks/migrate.js.map +1 -1
  87. package/dist/src/commands/mcp/list.d.ts +3 -3
  88. package/dist/src/commands/mcp/list.js +68 -24
  89. package/dist/src/commands/mcp/list.js.map +1 -1
  90. package/dist/src/commands/mcp/list.test.js +69 -3
  91. package/dist/src/commands/mcp/list.test.js.map +1 -1
  92. package/dist/src/commands/mcp.test.js +2 -3
  93. package/dist/src/commands/mcp.test.js.map +1 -1
  94. package/dist/src/commands/skills/disable.test.js +4 -7
  95. package/dist/src/commands/skills/disable.test.js.map +1 -1
  96. package/dist/src/commands/skills/enable.test.js +4 -7
  97. package/dist/src/commands/skills/enable.test.js.map +1 -1
  98. package/dist/src/commands/skills/install.js +1 -2
  99. package/dist/src/commands/skills/install.js.map +1 -1
  100. package/dist/src/commands/skills/install.test.js +13 -9
  101. package/dist/src/commands/skills/install.test.js.map +1 -1
  102. package/dist/src/commands/skills/link.js +1 -2
  103. package/dist/src/commands/skills/link.js.map +1 -1
  104. package/dist/src/commands/skills/link.test.js +6 -2
  105. package/dist/src/commands/skills/link.test.js.map +1 -1
  106. package/dist/src/commands/skills/list.js +5 -8
  107. package/dist/src/commands/skills/list.js.map +1 -1
  108. package/dist/src/commands/skills/list.test.js +21 -30
  109. package/dist/src/commands/skills/list.test.js.map +1 -1
  110. package/dist/src/commands/skills/uninstall.js +1 -2
  111. package/dist/src/commands/skills/uninstall.js.map +1 -1
  112. package/dist/src/commands/skills/uninstall.test.js +10 -6
  113. package/dist/src/commands/skills/uninstall.test.js.map +1 -1
  114. package/dist/src/config/config.d.ts +18 -3
  115. package/dist/src/config/config.js +334 -136
  116. package/dist/src/config/config.js.map +1 -1
  117. package/dist/src/config/config.test.js +513 -61
  118. package/dist/src/config/config.test.js.map +1 -1
  119. package/dist/src/config/extension-manager-hydration.test.js +2 -2
  120. package/dist/src/config/extension-manager-hydration.test.js.map +1 -1
  121. package/dist/src/config/extension-manager-permissions.test.d.ts +6 -0
  122. package/dist/src/config/extension-manager-permissions.test.js +107 -0
  123. package/dist/src/config/extension-manager-permissions.test.js.map +1 -0
  124. package/dist/src/config/extension-manager-scope.test.js +1 -1
  125. package/dist/src/config/extension-manager-scope.test.js.map +1 -1
  126. package/dist/src/config/extension-manager-skills.test.js +9 -0
  127. package/dist/src/config/extension-manager-skills.test.js.map +1 -1
  128. package/dist/src/config/extension-manager-themes.spec.js +3 -1
  129. package/dist/src/config/extension-manager-themes.spec.js.map +1 -1
  130. package/dist/src/config/extension-manager.d.ts +16 -3
  131. package/dist/src/config/extension-manager.js +202 -54
  132. package/dist/src/config/extension-manager.js.map +1 -1
  133. package/dist/src/config/extension-manager.test.js +430 -0
  134. package/dist/src/config/extension-manager.test.js.map +1 -0
  135. package/dist/src/config/extension.d.ts +13 -0
  136. package/dist/src/config/extension.js +1 -1
  137. package/dist/src/config/extension.js.map +1 -1
  138. package/dist/src/config/extension.test.js +139 -30
  139. package/dist/src/config/extension.test.js.map +1 -1
  140. package/dist/src/config/extensionRegistryClient.d.ts +3 -1
  141. package/dist/src/config/extensionRegistryClient.js +29 -9
  142. package/dist/src/config/extensionRegistryClient.js.map +1 -1
  143. package/dist/src/config/extensionRegistryClient.test.js +81 -3
  144. package/dist/src/config/extensionRegistryClient.test.js.map +1 -1
  145. package/dist/src/config/extensions/consent.d.ts +11 -1
  146. package/dist/src/config/extensions/consent.js +27 -7
  147. package/dist/src/config/extensions/consent.js.map +1 -1
  148. package/dist/src/config/extensions/consent.test.js +43 -44
  149. package/dist/src/config/extensions/consent.test.js.map +1 -1
  150. package/dist/src/config/extensions/extensionEnablement.js +1 -0
  151. package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
  152. package/dist/src/config/extensions/extensionSettings.js +20 -3
  153. package/dist/src/config/extensions/extensionSettings.js.map +1 -1
  154. package/dist/src/config/extensions/extensionSettings.test.js +17 -1
  155. package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
  156. package/dist/src/config/extensions/extensionUpdates.test.js +74 -13
  157. package/dist/src/config/extensions/extensionUpdates.test.js.map +1 -1
  158. package/dist/src/config/extensions/github.js +13 -3
  159. package/dist/src/config/extensions/github.js.map +1 -1
  160. package/dist/src/config/extensions/github.test.js +14 -1
  161. package/dist/src/config/extensions/github.test.js.map +1 -1
  162. package/dist/src/config/extensions/update.js +25 -2
  163. package/dist/src/config/extensions/update.js.map +1 -1
  164. package/dist/src/config/extensions/update.test.js +68 -3
  165. package/dist/src/config/extensions/update.test.js.map +1 -1
  166. package/dist/src/config/extensions/variables.js +14 -2
  167. package/dist/src/config/extensions/variables.js.map +1 -1
  168. package/dist/src/config/extensions/variables.test.js +16 -0
  169. package/dist/src/config/extensions/variables.test.js.map +1 -1
  170. package/dist/src/config/footerItems.d.ts +62 -0
  171. package/dist/src/config/footerItems.js +128 -0
  172. package/dist/src/config/footerItems.js.map +1 -0
  173. package/dist/src/config/footerItems.test.d.ts +6 -0
  174. package/dist/src/config/footerItems.test.js +141 -0
  175. package/dist/src/config/footerItems.test.js.map +1 -0
  176. package/dist/src/config/mcp/mcpServerEnablement.test.js +1 -0
  177. package/dist/src/config/mcp/mcpServerEnablement.test.js.map +1 -1
  178. package/dist/src/config/policy-engine.integration.test.js +90 -51
  179. package/dist/src/config/policy-engine.integration.test.js.map +1 -1
  180. package/dist/src/config/policy.d.ts +35 -3
  181. package/dist/src/config/policy.js +82 -5
  182. package/dist/src/config/policy.js.map +1 -1
  183. package/dist/src/config/policy.test.js +199 -0
  184. package/dist/src/config/policy.test.js.map +1 -0
  185. package/dist/src/config/sandboxConfig.js +50 -7
  186. package/dist/src/config/sandboxConfig.js.map +1 -1
  187. package/dist/src/config/sandboxConfig.test.js +227 -10
  188. package/dist/src/config/sandboxConfig.test.js.map +1 -1
  189. package/dist/src/config/settings-validation.js +1 -1
  190. package/dist/src/config/settings-validation.js.map +1 -1
  191. package/dist/src/config/settings-validation.test.js +2 -3
  192. package/dist/src/config/settings-validation.test.js.map +1 -1
  193. package/dist/src/config/settings.d.ts +26 -2
  194. package/dist/src/config/settings.js +102 -31
  195. package/dist/src/config/settings.js.map +1 -1
  196. package/dist/src/config/settings.test.js +374 -146
  197. package/dist/src/config/settings.test.js.map +1 -1
  198. package/dist/src/config/settingsSchema.d.ts +838 -67
  199. package/dist/src/config/settingsSchema.js +988 -81
  200. package/dist/src/config/settingsSchema.js.map +1 -1
  201. package/dist/src/config/settingsSchema.test.js +128 -7
  202. package/dist/src/config/settingsSchema.test.js.map +1 -1
  203. package/dist/src/config/settings_repro.test.js +0 -1
  204. package/dist/src/config/settings_repro.test.js.map +1 -1
  205. package/dist/src/config/settings_validation_warning.test.js +2 -1
  206. package/dist/src/config/settings_validation_warning.test.js.map +1 -1
  207. package/dist/src/config/trustedFolders.test.js +4 -2
  208. package/dist/src/config/trustedFolders.test.js.map +1 -1
  209. package/dist/src/config/workspace-policy-cli.test.js +209 -0
  210. package/dist/src/config/workspace-policy-cli.test.js.map +1 -0
  211. package/dist/src/core/auth.d.ts +7 -2
  212. package/dist/src/core/auth.js +28 -6
  213. package/dist/src/core/auth.js.map +1 -1
  214. package/dist/src/core/auth.test.js +53 -7
  215. package/dist/src/core/auth.test.js.map +1 -1
  216. package/dist/src/core/initializer.d.ts +2 -0
  217. package/dist/src/core/initializer.js +12 -5
  218. package/dist/src/core/initializer.js.map +1 -1
  219. package/dist/src/core/initializer.test.js +12 -2
  220. package/dist/src/core/initializer.test.js.map +1 -1
  221. package/dist/src/deferred.test.js +1 -1
  222. package/dist/src/deferred.test.js.map +1 -1
  223. package/dist/src/gemini.d.ts +3 -3
  224. package/dist/src/gemini.js +120 -146
  225. package/dist/src/gemini.js.map +1 -1
  226. package/dist/src/gemini.test.js +220 -44
  227. package/dist/src/gemini.test.js.map +1 -1
  228. package/dist/src/gemini_cleanup.test.js +99 -30
  229. package/dist/src/gemini_cleanup.test.js.map +1 -1
  230. package/dist/src/generated/git-commit.d.ts +2 -2
  231. package/dist/src/generated/git-commit.js +2 -2
  232. package/dist/src/integration-tests/modelSteering.test.d.ts +6 -0
  233. package/dist/src/integration-tests/modelSteering.test.js +62 -0
  234. package/dist/src/integration-tests/modelSteering.test.js.map +1 -0
  235. package/dist/src/interactiveCli.d.ts +9 -0
  236. package/dist/src/interactiveCli.js +128 -0
  237. package/dist/src/interactiveCli.js.map +1 -0
  238. package/dist/src/nonInteractiveCli.d.ts +1 -1
  239. package/dist/src/nonInteractiveCli.js +15 -6
  240. package/dist/src/nonInteractiveCli.js.map +1 -1
  241. package/dist/src/nonInteractiveCli.test.js +20 -16
  242. package/dist/src/nonInteractiveCli.test.js.map +1 -1
  243. package/dist/src/nonInteractiveCliAgentSession.d.ts +16 -0
  244. package/dist/src/nonInteractiveCliAgentSession.js +484 -0
  245. package/dist/src/nonInteractiveCliAgentSession.js.map +1 -0
  246. package/dist/src/nonInteractiveCliAgentSession.test.js +1837 -0
  247. package/dist/src/nonInteractiveCliAgentSession.test.js.map +1 -0
  248. package/dist/src/nonInteractiveCliCommands.js +3 -3
  249. package/dist/src/nonInteractiveCliCommands.js.map +1 -1
  250. package/dist/src/services/BuiltinCommandLoader.js +41 -7
  251. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  252. package/dist/src/services/BuiltinCommandLoader.test.js +83 -6
  253. package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
  254. package/dist/src/services/CommandService.d.ts +25 -18
  255. package/dist/src/services/CommandService.js +51 -42
  256. package/dist/src/services/CommandService.js.map +1 -1
  257. package/dist/src/services/CommandService.test.js +44 -204
  258. package/dist/src/services/CommandService.test.js.map +1 -1
  259. package/dist/src/services/FileCommandLoader.d.ts +2 -1
  260. package/dist/src/services/FileCommandLoader.js +14 -6
  261. package/dist/src/services/FileCommandLoader.js.map +1 -1
  262. package/dist/src/services/FileCommandLoader.test.js.map +1 -1
  263. package/dist/src/services/McpPromptLoader.d.ts +2 -2
  264. package/dist/src/services/McpPromptLoader.js +3 -2
  265. package/dist/src/services/McpPromptLoader.js.map +1 -1
  266. package/dist/src/services/SkillCommandLoader.d.ts +23 -0
  267. package/dist/src/services/SkillCommandLoader.js +52 -0
  268. package/dist/src/services/SkillCommandLoader.js.map +1 -0
  269. package/dist/src/services/SkillCommandLoader.test.d.ts +6 -0
  270. package/dist/src/services/SkillCommandLoader.test.js +113 -0
  271. package/dist/src/services/SkillCommandLoader.test.js.map +1 -0
  272. package/dist/src/services/SlashCommandConflictHandler.d.ts +35 -0
  273. package/dist/src/services/SlashCommandConflictHandler.js +128 -0
  274. package/dist/src/services/SlashCommandConflictHandler.js.map +1 -0
  275. package/dist/src/services/SlashCommandConflictHandler.test.d.ts +6 -0
  276. package/dist/src/services/SlashCommandConflictHandler.test.js +144 -0
  277. package/dist/src/services/SlashCommandConflictHandler.test.js.map +1 -0
  278. package/dist/src/services/SlashCommandResolver.d.ts +53 -0
  279. package/dist/src/services/SlashCommandResolver.js +156 -0
  280. package/dist/src/services/SlashCommandResolver.js.map +1 -0
  281. package/dist/src/services/SlashCommandResolver.test.d.ts +6 -0
  282. package/dist/src/services/SlashCommandResolver.test.js +186 -0
  283. package/dist/src/services/SlashCommandResolver.test.js.map +1 -0
  284. package/dist/src/services/prompt-processors/atFileProcessor.js +1 -1
  285. package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -1
  286. package/dist/src/services/prompt-processors/atFileProcessor.test.js +6 -3
  287. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -1
  288. package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
  289. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
  290. package/dist/src/services/prompt-processors/shellProcessor.test.js +14 -4
  291. package/dist/src/services/prompt-processors/shellProcessor.test.js.map +1 -1
  292. package/dist/src/services/types.d.ts +8 -0
  293. package/dist/src/test-utils/AppRig.d.ts +83 -0
  294. package/dist/src/test-utils/AppRig.js +583 -0
  295. package/dist/src/test-utils/AppRig.js.map +1 -0
  296. package/dist/src/test-utils/AppRig.test.d.ts +6 -0
  297. package/dist/src/test-utils/AppRig.test.js +60 -0
  298. package/dist/src/test-utils/AppRig.test.js.map +1 -0
  299. package/dist/src/test-utils/MockShellExecutionService.d.ts +37 -0
  300. package/dist/src/test-utils/MockShellExecutionService.js +88 -0
  301. package/dist/src/test-utils/MockShellExecutionService.js.map +1 -0
  302. package/dist/src/test-utils/async.d.ts +1 -1
  303. package/dist/src/test-utils/async.js +1 -1
  304. package/dist/src/test-utils/async.js.map +1 -1
  305. package/dist/src/test-utils/customMatchers.d.ts +25 -5
  306. package/dist/src/test-utils/customMatchers.js +47 -2
  307. package/dist/src/test-utils/customMatchers.js.map +1 -1
  308. package/dist/src/test-utils/mockCommandContext.js +2 -5
  309. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  310. package/dist/src/test-utils/mockCommandContext.test.js +4 -4
  311. package/dist/src/test-utils/mockCommandContext.test.js.map +1 -1
  312. package/dist/src/test-utils/mockConfig.d.ts +1 -1
  313. package/dist/src/test-utils/mockConfig.js +41 -12
  314. package/dist/src/test-utils/mockConfig.js.map +1 -1
  315. package/dist/src/test-utils/mockDebugLogger.d.ts +35 -0
  316. package/dist/src/test-utils/mockDebugLogger.js +68 -0
  317. package/dist/src/test-utils/mockDebugLogger.js.map +1 -0
  318. package/dist/src/test-utils/mockSpinner.d.ts +6 -0
  319. package/dist/src/test-utils/mockSpinner.js +21 -0
  320. package/dist/src/test-utils/mockSpinner.js.map +1 -0
  321. package/dist/src/test-utils/render.d.ts +109 -14
  322. package/dist/src/test-utils/render.js +393 -95
  323. package/dist/src/test-utils/render.js.map +1 -1
  324. package/dist/src/test-utils/render.test.js +34 -30
  325. package/dist/src/test-utils/render.test.js.map +1 -1
  326. package/dist/src/test-utils/settings.js +2 -11
  327. package/dist/src/test-utils/settings.js.map +1 -1
  328. package/dist/src/test-utils/svg.d.ts +7 -0
  329. package/dist/src/test-utils/svg.js +182 -0
  330. package/dist/src/test-utils/svg.js.map +1 -0
  331. package/dist/src/ui/App.test.js +64 -36
  332. package/dist/src/ui/App.test.js.map +1 -1
  333. package/dist/src/ui/AppContainer.d.ts +2 -2
  334. package/dist/src/ui/AppContainer.js +696 -301
  335. package/dist/src/ui/AppContainer.js.map +1 -1
  336. package/dist/src/ui/AppContainer.test.js +1155 -707
  337. package/dist/src/ui/AppContainer.test.js.map +1 -1
  338. package/dist/src/ui/IdeIntegrationNudge.js +1 -1
  339. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  340. package/dist/src/ui/IdeIntegrationNudge.test.js +27 -36
  341. package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -1
  342. package/dist/src/ui/ToolConfirmationFullFrame.test.d.ts +1 -0
  343. package/dist/src/ui/ToolConfirmationFullFrame.test.js +158 -0
  344. package/dist/src/ui/ToolConfirmationFullFrame.test.js.map +1 -0
  345. package/dist/src/ui/auth/ApiAuthDialog.js +4 -2
  346. package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
  347. package/dist/src/ui/auth/ApiAuthDialog.test.js +23 -13
  348. package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -1
  349. package/dist/src/ui/auth/AuthDialog.d.ts +1 -1
  350. package/dist/src/ui/auth/AuthDialog.js +10 -17
  351. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  352. package/dist/src/ui/auth/AuthDialog.test.js +69 -34
  353. package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
  354. package/dist/src/ui/auth/AuthInProgress.test.js +33 -15
  355. package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -1
  356. package/dist/src/ui/auth/BannedAccountDialog.d.ts +14 -0
  357. package/dist/src/ui/auth/BannedAccountDialog.js +66 -0
  358. package/dist/src/ui/auth/BannedAccountDialog.js.map +1 -0
  359. package/dist/src/ui/auth/BannedAccountDialog.test.d.ts +6 -0
  360. package/dist/src/ui/auth/BannedAccountDialog.test.js +140 -0
  361. package/dist/src/ui/auth/BannedAccountDialog.test.js.map +1 -0
  362. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js +4 -6
  363. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.js.map +1 -1
  364. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +10 -6
  365. package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +1 -1
  366. package/dist/src/ui/auth/useAuth.d.ts +4 -1
  367. package/dist/src/ui/auth/useAuth.js +22 -4
  368. package/dist/src/ui/auth/useAuth.js.map +1 -1
  369. package/dist/src/ui/auth/useAuth.test.js +83 -58
  370. package/dist/src/ui/auth/useAuth.test.js.map +1 -1
  371. package/dist/src/ui/colors.js +8 -2
  372. package/dist/src/ui/colors.js.map +1 -1
  373. package/dist/src/ui/commands/aboutCommand.d.ts +1 -1
  374. package/dist/src/ui/commands/aboutCommand.js +5 -4
  375. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  376. package/dist/src/ui/commands/aboutCommand.test.js +8 -6
  377. package/dist/src/ui/commands/aboutCommand.test.js.map +1 -1
  378. package/dist/src/ui/commands/agentsCommand.js +17 -13
  379. package/dist/src/ui/commands/agentsCommand.js.map +1 -1
  380. package/dist/src/ui/commands/agentsCommand.test.js +20 -13
  381. package/dist/src/ui/commands/agentsCommand.test.js.map +1 -1
  382. package/dist/src/ui/commands/authCommand.js +7 -5
  383. package/dist/src/ui/commands/authCommand.js.map +1 -1
  384. package/dist/src/ui/commands/authCommand.test.js +18 -13
  385. package/dist/src/ui/commands/authCommand.test.js.map +1 -1
  386. package/dist/src/ui/commands/bugCommand.js +4 -3
  387. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  388. package/dist/src/ui/commands/bugCommand.test.js +29 -23
  389. package/dist/src/ui/commands/bugCommand.test.js.map +1 -1
  390. package/dist/src/ui/commands/chatCommand.d.ts +2 -0
  391. package/dist/src/ui/commands/chatCommand.js +60 -26
  392. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  393. package/dist/src/ui/commands/chatCommand.test.js +22 -15
  394. package/dist/src/ui/commands/chatCommand.test.js.map +1 -1
  395. package/dist/src/ui/commands/clearCommand.d.ts +1 -1
  396. package/dist/src/ui/commands/clearCommand.js +16 -14
  397. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  398. package/dist/src/ui/commands/clearCommand.test.js +27 -17
  399. package/dist/src/ui/commands/clearCommand.test.js.map +1 -1
  400. package/dist/src/ui/commands/commandsCommand.d.ts +7 -0
  401. package/dist/src/ui/commands/commandsCommand.js +56 -0
  402. package/dist/src/ui/commands/commandsCommand.js.map +1 -0
  403. package/dist/src/ui/commands/commandsCommand.test.d.ts +6 -0
  404. package/dist/src/ui/commands/commandsCommand.test.js +42 -0
  405. package/dist/src/ui/commands/commandsCommand.test.js.map +1 -0
  406. package/dist/src/ui/commands/compressCommand.d.ts +1 -1
  407. package/dist/src/ui/commands/compressCommand.js +2 -4
  408. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  409. package/dist/src/ui/commands/compressCommand.test.js +10 -3
  410. package/dist/src/ui/commands/compressCommand.test.js.map +1 -1
  411. package/dist/src/ui/commands/copyCommand.d.ts +1 -1
  412. package/dist/src/ui/commands/copyCommand.js +4 -3
  413. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  414. package/dist/src/ui/commands/copyCommand.test.js +10 -8
  415. package/dist/src/ui/commands/copyCommand.test.js.map +1 -1
  416. package/dist/src/ui/commands/directoryCommand.d.ts +1 -1
  417. package/dist/src/ui/commands/directoryCommand.js +15 -15
  418. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  419. package/dist/src/ui/commands/directoryCommand.test.js +5 -2
  420. package/dist/src/ui/commands/directoryCommand.test.js.map +1 -1
  421. package/dist/src/ui/commands/extensionsCommand.js +110 -55
  422. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  423. package/dist/src/ui/commands/extensionsCommand.test.js +80 -33
  424. package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -1
  425. package/dist/src/ui/commands/footerCommand.d.ts +7 -0
  426. package/dist/src/ui/commands/footerCommand.js +20 -0
  427. package/dist/src/ui/commands/footerCommand.js.map +1 -0
  428. package/dist/src/ui/commands/helpCommand.d.ts +1 -1
  429. package/dist/src/ui/commands/helpCommand.js.map +1 -1
  430. package/dist/src/ui/commands/helpCommand.test.js +1 -2
  431. package/dist/src/ui/commands/helpCommand.test.js.map +1 -1
  432. package/dist/src/ui/commands/hooksCommand.js +26 -15
  433. package/dist/src/ui/commands/hooksCommand.js.map +1 -1
  434. package/dist/src/ui/commands/hooksCommand.test.js +23 -31
  435. package/dist/src/ui/commands/hooksCommand.test.js.map +1 -1
  436. package/dist/src/ui/commands/ideCommand.js +3 -3
  437. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  438. package/dist/src/ui/commands/ideCommand.test.js +7 -5
  439. package/dist/src/ui/commands/ideCommand.test.js.map +1 -1
  440. package/dist/src/ui/commands/initCommand.js +2 -2
  441. package/dist/src/ui/commands/initCommand.js.map +1 -1
  442. package/dist/src/ui/commands/initCommand.test.js +5 -3
  443. package/dist/src/ui/commands/initCommand.test.js.map +1 -1
  444. package/dist/src/ui/commands/mcpCommand.js +68 -28
  445. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  446. package/dist/src/ui/commands/mcpCommand.test.js +49 -8
  447. package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
  448. package/dist/src/ui/commands/memoryCommand.d.ts +1 -1
  449. package/dist/src/ui/commands/memoryCommand.js +9 -8
  450. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  451. package/dist/src/ui/commands/memoryCommand.test.js +39 -35
  452. package/dist/src/ui/commands/memoryCommand.test.js.map +1 -1
  453. package/dist/src/ui/commands/modelCommand.js +41 -4
  454. package/dist/src/ui/commands/modelCommand.js.map +1 -1
  455. package/dist/src/ui/commands/modelCommand.test.js +98 -4
  456. package/dist/src/ui/commands/modelCommand.test.js.map +1 -1
  457. package/dist/src/ui/commands/oncallCommand.js +4 -2
  458. package/dist/src/ui/commands/oncallCommand.js.map +1 -1
  459. package/dist/src/ui/commands/planCommand.js +44 -5
  460. package/dist/src/ui/commands/planCommand.js.map +1 -1
  461. package/dist/src/ui/commands/planCommand.test.js +73 -14
  462. package/dist/src/ui/commands/planCommand.test.js.map +1 -1
  463. package/dist/src/ui/commands/policiesCommand.js +7 -1
  464. package/dist/src/ui/commands/policiesCommand.js.map +1 -1
  465. package/dist/src/ui/commands/policiesCommand.test.js +50 -4
  466. package/dist/src/ui/commands/policiesCommand.test.js.map +1 -1
  467. package/dist/src/ui/commands/privacyCommand.d.ts +1 -1
  468. package/dist/src/ui/commands/privacyCommand.js +1 -1
  469. package/dist/src/ui/commands/privacyCommand.js.map +1 -1
  470. package/dist/src/ui/commands/restoreCommand.js +6 -6
  471. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  472. package/dist/src/ui/commands/restoreCommand.test.js +6 -3
  473. package/dist/src/ui/commands/restoreCommand.test.js.map +1 -1
  474. package/dist/src/ui/commands/resumeCommand.js +3 -1
  475. package/dist/src/ui/commands/resumeCommand.js.map +1 -1
  476. package/dist/src/ui/commands/resumeCommand.test.js +28 -0
  477. package/dist/src/ui/commands/resumeCommand.test.js.map +1 -0
  478. package/dist/src/ui/commands/rewindCommand.js +9 -5
  479. package/dist/src/ui/commands/rewindCommand.js.map +1 -1
  480. package/dist/src/ui/commands/rewindCommand.test.js +20 -9
  481. package/dist/src/ui/commands/rewindCommand.test.js.map +1 -1
  482. package/dist/src/ui/commands/settingsCommand.d.ts +1 -1
  483. package/dist/src/ui/commands/settingsCommand.js +2 -1
  484. package/dist/src/ui/commands/settingsCommand.js.map +1 -1
  485. package/dist/src/ui/commands/setupGithubCommand.d.ts +1 -1
  486. package/dist/src/ui/commands/setupGithubCommand.js +9 -7
  487. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  488. package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
  489. package/dist/src/ui/commands/shortcutsCommand.d.ts +1 -1
  490. package/dist/src/ui/commands/shortcutsCommand.js.map +1 -1
  491. package/dist/src/ui/commands/skillsCommand.js +23 -13
  492. package/dist/src/ui/commands/skillsCommand.js.map +1 -1
  493. package/dist/src/ui/commands/skillsCommand.test.js +19 -20
  494. package/dist/src/ui/commands/skillsCommand.test.js.map +1 -1
  495. package/dist/src/ui/commands/statsCommand.js +27 -14
  496. package/dist/src/ui/commands/statsCommand.js.map +1 -1
  497. package/dist/src/ui/commands/statsCommand.test.js +20 -4
  498. package/dist/src/ui/commands/statsCommand.test.js.map +1 -1
  499. package/dist/src/ui/commands/{shellsCommand.d.ts → tasksCommand.d.ts} +1 -1
  500. package/dist/src/ui/commands/{shellsCommand.js → tasksCommand.js} +6 -6
  501. package/dist/src/ui/commands/tasksCommand.js.map +1 -0
  502. package/dist/src/ui/commands/tasksCommand.test.js +30 -0
  503. package/dist/src/ui/commands/tasksCommand.test.js.map +1 -0
  504. package/dist/src/ui/commands/terminalSetupCommand.d.ts +1 -1
  505. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
  506. package/dist/src/ui/commands/themeCommand.d.ts +1 -1
  507. package/dist/src/ui/commands/themeCommand.js +1 -1
  508. package/dist/src/ui/commands/themeCommand.js.map +1 -1
  509. package/dist/src/ui/commands/toolsCommand.js +43 -27
  510. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  511. package/dist/src/ui/commands/toolsCommand.test.js +97 -10
  512. package/dist/src/ui/commands/toolsCommand.test.js.map +1 -1
  513. package/dist/src/ui/commands/types.d.ts +26 -5
  514. package/dist/src/ui/commands/types.js +4 -1
  515. package/dist/src/ui/commands/types.js.map +1 -1
  516. package/dist/src/ui/commands/upgradeCommand.d.ts +11 -0
  517. package/dist/src/ui/commands/upgradeCommand.js +58 -0
  518. package/dist/src/ui/commands/upgradeCommand.js.map +1 -0
  519. package/dist/src/ui/commands/upgradeCommand.test.d.ts +6 -0
  520. package/dist/src/ui/commands/upgradeCommand.test.js +102 -0
  521. package/dist/src/ui/commands/upgradeCommand.test.js.map +1 -0
  522. package/dist/src/ui/commands/vimCommand.d.ts +1 -1
  523. package/dist/src/ui/commands/vimCommand.js +1 -0
  524. package/dist/src/ui/commands/vimCommand.js.map +1 -1
  525. package/dist/src/ui/components/AboutBox.js +2 -2
  526. package/dist/src/ui/components/AboutBox.test.js +14 -10
  527. package/dist/src/ui/components/AboutBox.test.js.map +1 -1
  528. package/dist/src/ui/components/AdminSettingsChangedDialog.js +3 -1
  529. package/dist/src/ui/components/AdminSettingsChangedDialog.js.map +1 -1
  530. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +4 -4
  531. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +1 -1
  532. package/dist/src/ui/components/AgentConfigDialog.d.ts +4 -2
  533. package/dist/src/ui/components/AgentConfigDialog.js +25 -38
  534. package/dist/src/ui/components/AgentConfigDialog.js.map +1 -1
  535. package/dist/src/ui/components/AgentConfigDialog.test.js +52 -26
  536. package/dist/src/ui/components/AgentConfigDialog.test.js.map +1 -1
  537. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +2 -4
  538. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -1
  539. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +23 -18
  540. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -1
  541. package/dist/src/ui/components/AnsiOutput.js +7 -1
  542. package/dist/src/ui/components/AnsiOutput.js.map +1 -1
  543. package/dist/src/ui/components/AnsiOutput.test.js +40 -19
  544. package/dist/src/ui/components/AnsiOutput.test.js.map +1 -1
  545. package/dist/src/ui/components/AppHeader.d.ts +3 -2
  546. package/dist/src/ui/components/AppHeader.js +55 -8
  547. package/dist/src/ui/components/AppHeader.js.map +1 -1
  548. package/dist/src/ui/components/AppHeader.test.js +62 -40
  549. package/dist/src/ui/components/AppHeader.test.js.map +1 -1
  550. package/dist/src/ui/components/AppHeaderIcon.test.d.ts +6 -0
  551. package/dist/src/ui/components/AppHeaderIcon.test.js +39 -0
  552. package/dist/src/ui/components/AppHeaderIcon.test.js.map +1 -0
  553. package/dist/src/ui/components/ApprovalModeIndicator.d.ts +1 -1
  554. package/dist/src/ui/components/ApprovalModeIndicator.js +14 -10
  555. package/dist/src/ui/components/ApprovalModeIndicator.js.map +1 -1
  556. package/dist/src/ui/components/ApprovalModeIndicator.test.js +12 -12
  557. package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +1 -1
  558. package/dist/src/ui/components/AsciiArt.d.ts +9 -6
  559. package/dist/src/ui/components/AsciiArt.js +24 -6
  560. package/dist/src/ui/components/AsciiArt.js.map +1 -1
  561. package/dist/src/ui/components/AskUserDialog.d.ts +5 -1
  562. package/dist/src/ui/components/AskUserDialog.js +126 -54
  563. package/dist/src/ui/components/AskUserDialog.js.map +1 -1
  564. package/dist/src/ui/components/AskUserDialog.test.js +394 -96
  565. package/dist/src/ui/components/AskUserDialog.test.js.map +1 -1
  566. package/dist/src/ui/components/BackgroundTaskDisplay.d.ts +16 -0
  567. package/dist/src/ui/components/{BackgroundShellDisplay.js → BackgroundTaskDisplay.js} +36 -19
  568. package/dist/src/ui/components/BackgroundTaskDisplay.js.map +1 -0
  569. package/dist/src/ui/components/{BackgroundShellDisplay.test.js → BackgroundTaskDisplay.test.js} +54 -66
  570. package/dist/src/ui/components/BackgroundTaskDisplay.test.js.map +1 -0
  571. package/dist/src/ui/components/Banner.js +4 -4
  572. package/dist/src/ui/components/Banner.js.map +1 -1
  573. package/dist/src/ui/components/Banner.test.js +12 -7
  574. package/dist/src/ui/components/Banner.test.js.map +1 -1
  575. package/dist/src/ui/components/BubblingRegression.test.js +3 -1
  576. package/dist/src/ui/components/BubblingRegression.test.js.map +1 -1
  577. package/dist/src/ui/components/Checklist.js +1 -1
  578. package/dist/src/ui/components/Checklist.js.map +1 -1
  579. package/dist/src/ui/components/Checklist.test.js +12 -12
  580. package/dist/src/ui/components/Checklist.test.js.map +1 -1
  581. package/dist/src/ui/components/ChecklistItem.d.ts +1 -1
  582. package/dist/src/ui/components/ChecklistItem.js +3 -0
  583. package/dist/src/ui/components/ChecklistItem.js.map +1 -1
  584. package/dist/src/ui/components/ChecklistItem.test.js +7 -6
  585. package/dist/src/ui/components/ChecklistItem.test.js.map +1 -1
  586. package/dist/src/ui/components/CliSpinner.test.js +8 -5
  587. package/dist/src/ui/components/CliSpinner.test.js.map +1 -1
  588. package/dist/src/ui/components/ColorsDisplay.d.ts +12 -0
  589. package/dist/src/ui/components/ColorsDisplay.js +119 -0
  590. package/dist/src/ui/components/ColorsDisplay.js.map +1 -0
  591. package/dist/src/ui/components/ColorsDisplay.test.d.ts +6 -0
  592. package/dist/src/ui/components/ColorsDisplay.test.js +107 -0
  593. package/dist/src/ui/components/ColorsDisplay.test.js.map +1 -0
  594. package/dist/src/ui/components/Composer.d.ts +1 -1
  595. package/dist/src/ui/components/Composer.js +53 -58
  596. package/dist/src/ui/components/Composer.js.map +1 -1
  597. package/dist/src/ui/components/Composer.test.js +436 -108
  598. package/dist/src/ui/components/Composer.test.js.map +1 -1
  599. package/dist/src/ui/components/ConfigExtensionDialog.js +2 -2
  600. package/dist/src/ui/components/ConfigExtensionDialog.js.map +1 -1
  601. package/dist/src/ui/components/ConfigInitDisplay.js +4 -4
  602. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
  603. package/dist/src/ui/components/ConfigInitDisplay.test.js +7 -7
  604. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -1
  605. package/dist/src/ui/components/ConsentPrompt.js +5 -4
  606. package/dist/src/ui/components/ConsentPrompt.js.map +1 -1
  607. package/dist/src/ui/components/ConsentPrompt.test.js +10 -8
  608. package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -1
  609. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +7 -5
  610. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -1
  611. package/dist/src/ui/components/ContextSummaryDisplay.js +5 -10
  612. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  613. package/dist/src/ui/components/ContextSummaryDisplay.test.js +9 -30
  614. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -1
  615. package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
  616. package/dist/src/ui/components/ContextUsageDisplay.js +17 -5
  617. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
  618. package/dist/src/ui/components/ContextUsageDisplay.test.js +26 -19
  619. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -1
  620. package/dist/src/ui/components/CopyModeWarning.js +3 -6
  621. package/dist/src/ui/components/CopyModeWarning.js.map +1 -1
  622. package/dist/src/ui/components/CopyModeWarning.test.js +14 -12
  623. package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -1
  624. package/dist/src/ui/components/DebugProfiler.js +12 -0
  625. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  626. package/dist/src/ui/components/DebugProfiler.test.js +13 -14
  627. package/dist/src/ui/components/DebugProfiler.test.js.map +1 -1
  628. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -2
  629. package/dist/src/ui/components/DetailedMessagesDisplay.js +12 -7
  630. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
  631. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +50 -9
  632. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -1
  633. package/dist/src/ui/components/DialogManager.js +25 -9
  634. package/dist/src/ui/components/DialogManager.js.map +1 -1
  635. package/dist/src/ui/components/DialogManager.test.js +11 -5
  636. package/dist/src/ui/components/DialogManager.test.js.map +1 -1
  637. package/dist/src/ui/components/EditorSettingsDialog.d.ts +1 -1
  638. package/dist/src/ui/components/EditorSettingsDialog.js +2 -3
  639. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  640. package/dist/src/ui/components/EditorSettingsDialog.test.js +13 -11
  641. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -1
  642. package/dist/src/ui/components/EmptyWalletDialog.d.ts +22 -0
  643. package/dist/src/ui/components/EmptyWalletDialog.js +33 -0
  644. package/dist/src/ui/components/EmptyWalletDialog.js.map +1 -0
  645. package/dist/src/ui/components/EmptyWalletDialog.test.d.ts +6 -0
  646. package/dist/src/ui/components/EmptyWalletDialog.test.js +116 -0
  647. package/dist/src/ui/components/EmptyWalletDialog.test.js.map +1 -0
  648. package/dist/src/ui/components/ExitPlanModeDialog.d.ts +2 -1
  649. package/dist/src/ui/components/ExitPlanModeDialog.js +49 -9
  650. package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
  651. package/dist/src/ui/components/ExitPlanModeDialog.test.js +81 -37
  652. package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +1 -1
  653. package/dist/src/ui/components/ExitWarning.test.js +14 -10
  654. package/dist/src/ui/components/ExitWarning.test.js.map +1 -1
  655. package/dist/src/ui/components/FolderTrustDialog.d.ts +2 -0
  656. package/dist/src/ui/components/FolderTrustDialog.js +52 -7
  657. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  658. package/dist/src/ui/components/FolderTrustDialog.test.js +256 -23
  659. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
  660. package/dist/src/ui/components/Footer.d.ts +13 -0
  661. package/dist/src/ui/components/Footer.js +228 -14
  662. package/dist/src/ui/components/Footer.js.map +1 -1
  663. package/dist/src/ui/components/Footer.test.js +547 -109
  664. package/dist/src/ui/components/Footer.test.js.map +1 -1
  665. package/dist/src/ui/components/FooterConfigDialog.d.ts +11 -0
  666. package/dist/src/ui/components/FooterConfigDialog.js +214 -0
  667. package/dist/src/ui/components/FooterConfigDialog.js.map +1 -0
  668. package/dist/src/ui/components/FooterConfigDialog.test.d.ts +6 -0
  669. package/dist/src/ui/components/FooterConfigDialog.test.js +191 -0
  670. package/dist/src/ui/components/FooterConfigDialog.test.js.map +1 -0
  671. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +6 -5
  672. package/dist/src/ui/components/GeminiRespondingSpinner.js +6 -35
  673. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
  674. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +23 -19
  675. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -1
  676. package/dist/src/ui/components/GeminiSpinner.d.ts +13 -0
  677. package/dist/src/ui/components/GeminiSpinner.js +35 -0
  678. package/dist/src/ui/components/GeminiSpinner.js.map +1 -0
  679. package/dist/src/ui/components/GradientRegression.test.js +22 -11
  680. package/dist/src/ui/components/GradientRegression.test.js.map +1 -1
  681. package/dist/src/ui/components/Header.test.js +16 -12
  682. package/dist/src/ui/components/Header.test.js.map +1 -1
  683. package/dist/src/ui/components/Help.js +3 -3
  684. package/dist/src/ui/components/Help.js.map +1 -1
  685. package/dist/src/ui/components/Help.test.js +8 -8
  686. package/dist/src/ui/components/Help.test.js.map +1 -1
  687. package/dist/src/ui/components/HistoryItemDisplay.d.ts +5 -3
  688. package/dist/src/ui/components/HistoryItemDisplay.js +15 -12
  689. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  690. package/dist/src/ui/components/HistoryItemDisplay.test.js +95 -44
  691. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
  692. package/dist/src/ui/components/HookStatusDisplay.js +18 -11
  693. package/dist/src/ui/components/HookStatusDisplay.js.map +1 -1
  694. package/dist/src/ui/components/HookStatusDisplay.test.js +35 -9
  695. package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -1
  696. package/dist/src/ui/components/HooksDialog.d.ts +36 -0
  697. package/dist/src/ui/components/HooksDialog.js +83 -0
  698. package/dist/src/ui/components/HooksDialog.js.map +1 -0
  699. package/dist/src/ui/components/HooksDialog.test.d.ts +6 -0
  700. package/dist/src/ui/components/HooksDialog.test.js +175 -0
  701. package/dist/src/ui/components/HooksDialog.test.js.map +1 -0
  702. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +39 -19
  703. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -1
  704. package/dist/src/ui/components/InputPrompt.d.ts +12 -8
  705. package/dist/src/ui/components/InputPrompt.js +383 -180
  706. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  707. package/dist/src/ui/components/InputPrompt.test.d.ts +12 -1
  708. package/dist/src/ui/components/InputPrompt.test.js +701 -239
  709. package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
  710. package/dist/src/ui/components/LoadingIndicator.d.ts +7 -0
  711. package/dist/src/ui/components/LoadingIndicator.js +18 -13
  712. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  713. package/dist/src/ui/components/LoadingIndicator.test.js +170 -60
  714. package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
  715. package/dist/src/ui/components/LogoutConfirmationDialog.js +3 -3
  716. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -1
  717. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +23 -12
  718. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -1
  719. package/dist/src/ui/components/LoopDetectionConfirmation.js +1 -1
  720. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
  721. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +7 -5
  722. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -1
  723. package/dist/src/ui/components/MainContent.d.ts +1 -1
  724. package/dist/src/ui/components/MainContent.js +144 -29
  725. package/dist/src/ui/components/MainContent.js.map +1 -1
  726. package/dist/src/ui/components/MainContent.test.js +558 -27
  727. package/dist/src/ui/components/MainContent.test.js.map +1 -1
  728. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +4 -1
  729. package/dist/src/ui/components/MemoryUsageDisplay.js +10 -9
  730. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
  731. package/dist/src/ui/components/MemoryUsageDisplay.test.js +6 -3
  732. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -1
  733. package/dist/src/ui/components/ModelDialog.js +131 -21
  734. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  735. package/dist/src/ui/components/ModelDialog.test.js +148 -35
  736. package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
  737. package/dist/src/ui/components/ModelQuotaDisplay.d.ts +18 -0
  738. package/dist/src/ui/components/ModelQuotaDisplay.js +104 -0
  739. package/dist/src/ui/components/ModelQuotaDisplay.js.map +1 -0
  740. package/dist/src/ui/components/ModelQuotaDisplay.test.d.ts +6 -0
  741. package/dist/src/ui/components/ModelQuotaDisplay.test.js +62 -0
  742. package/dist/src/ui/components/ModelQuotaDisplay.test.js.map +1 -0
  743. package/dist/src/ui/components/ModelStatsDisplay.js +56 -4
  744. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
  745. package/dist/src/ui/components/ModelStatsDisplay.test.js +212 -20
  746. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -1
  747. package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +1 -1
  748. package/dist/src/ui/components/MultiFolderTrustDialog.js +2 -1
  749. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
  750. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +24 -9
  751. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -1
  752. package/dist/src/ui/components/NewAgentsNotification.d.ts +1 -1
  753. package/dist/src/ui/components/NewAgentsNotification.js +17 -1
  754. package/dist/src/ui/components/NewAgentsNotification.js.map +1 -1
  755. package/dist/src/ui/components/NewAgentsNotification.test.js +39 -4
  756. package/dist/src/ui/components/NewAgentsNotification.test.js.map +1 -1
  757. package/dist/src/ui/components/Notifications.js +50 -4
  758. package/dist/src/ui/components/Notifications.js.map +1 -1
  759. package/dist/src/ui/components/Notifications.test.js +160 -36
  760. package/dist/src/ui/components/Notifications.test.js.map +1 -1
  761. package/dist/src/ui/components/OverageMenuDialog.d.ts +22 -0
  762. package/dist/src/ui/components/OverageMenuDialog.js +32 -0
  763. package/dist/src/ui/components/OverageMenuDialog.js.map +1 -0
  764. package/dist/src/ui/components/OverageMenuDialog.test.d.ts +6 -0
  765. package/dist/src/ui/components/OverageMenuDialog.test.js +118 -0
  766. package/dist/src/ui/components/OverageMenuDialog.test.js.map +1 -0
  767. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +31 -12
  768. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
  769. package/dist/src/ui/components/PolicyUpdateDialog.d.ts +18 -0
  770. package/dist/src/ui/components/PolicyUpdateDialog.js +61 -0
  771. package/dist/src/ui/components/PolicyUpdateDialog.js.map +1 -0
  772. package/dist/src/ui/components/PolicyUpdateDialog.test.d.ts +6 -0
  773. package/dist/src/ui/components/PolicyUpdateDialog.test.js +92 -0
  774. package/dist/src/ui/components/PolicyUpdateDialog.test.js.map +1 -0
  775. package/dist/src/ui/components/ProQuotaDialog.d.ts +4 -1
  776. package/dist/src/ui/components/ProQuotaDialog.js +13 -6
  777. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  778. package/dist/src/ui/components/ProQuotaDialog.test.js +53 -22
  779. package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -1
  780. package/dist/src/ui/components/ProgressBar.d.ts +13 -0
  781. package/dist/src/ui/components/ProgressBar.js +17 -0
  782. package/dist/src/ui/components/ProgressBar.js.map +1 -0
  783. package/dist/src/ui/components/ProgressBar.test.d.ts +6 -0
  784. package/dist/src/ui/components/ProgressBar.test.js +28 -0
  785. package/dist/src/ui/components/ProgressBar.test.js.map +1 -0
  786. package/dist/src/ui/components/QueuedMessageDisplay.test.js +11 -11
  787. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -1
  788. package/dist/src/ui/components/QuittingDisplay.test.js +7 -5
  789. package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -1
  790. package/dist/src/ui/components/QuotaDisplay.d.ts +2 -0
  791. package/dist/src/ui/components/QuotaDisplay.js +23 -14
  792. package/dist/src/ui/components/QuotaDisplay.js.map +1 -1
  793. package/dist/src/ui/components/QuotaDisplay.test.js +41 -23
  794. package/dist/src/ui/components/QuotaDisplay.test.js.map +1 -1
  795. package/dist/src/ui/components/QuotaStatsInfo.js +13 -9
  796. package/dist/src/ui/components/QuotaStatsInfo.js.map +1 -1
  797. package/dist/src/ui/components/RatingWidget.js +2 -2
  798. package/dist/src/ui/components/RatingWidget.js.map +1 -1
  799. package/dist/src/ui/components/RawMarkdownIndicator.js +3 -1
  800. package/dist/src/ui/components/RawMarkdownIndicator.js.map +1 -1
  801. package/dist/src/ui/components/RawMarkdownIndicator.test.js +11 -7
  802. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -1
  803. package/dist/src/ui/components/RewindConfirmation.js +11 -3
  804. package/dist/src/ui/components/RewindConfirmation.js.map +1 -1
  805. package/dist/src/ui/components/RewindConfirmation.test.js +11 -7
  806. package/dist/src/ui/components/RewindConfirmation.test.js.map +1 -1
  807. package/dist/src/ui/components/RewindViewer.js +32 -9
  808. package/dist/src/ui/components/RewindViewer.js.map +1 -1
  809. package/dist/src/ui/components/RewindViewer.test.js +90 -18
  810. package/dist/src/ui/components/RewindViewer.test.js.map +1 -1
  811. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.d.ts +10 -0
  812. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.js +8 -0
  813. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.js.map +1 -0
  814. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.d.ts +13 -0
  815. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.js +8 -0
  816. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.js.map +1 -0
  817. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.d.ts +10 -0
  818. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.js +8 -0
  819. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.js.map +1 -0
  820. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.d.ts +23 -0
  821. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.js +17 -0
  822. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.js.map +1 -0
  823. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.d.ts +6 -0
  824. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js +47 -0
  825. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js.map +1 -0
  826. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.d.ts +6 -0
  827. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js +27 -0
  828. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js.map +1 -0
  829. package/dist/src/ui/components/SessionBrowser/SessionListHeader.d.ts +13 -0
  830. package/dist/src/ui/components/SessionBrowser/SessionListHeader.js +8 -0
  831. package/dist/src/ui/components/SessionBrowser/SessionListHeader.js.map +1 -0
  832. package/dist/src/ui/components/SessionBrowser/utils.d.ts +33 -0
  833. package/dist/src/ui/components/SessionBrowser/utils.js +100 -0
  834. package/dist/src/ui/components/SessionBrowser/utils.js.map +1 -0
  835. package/dist/src/ui/components/SessionBrowser/utils.test.d.ts +6 -0
  836. package/dist/src/ui/components/SessionBrowser/utils.test.js +108 -0
  837. package/dist/src/ui/components/SessionBrowser/utils.test.js.map +1 -0
  838. package/dist/src/ui/components/SessionBrowser.js +13 -128
  839. package/dist/src/ui/components/SessionBrowser.js.map +1 -1
  840. package/dist/src/ui/components/SessionBrowser.test.js +22 -13
  841. package/dist/src/ui/components/SessionBrowser.test.js.map +1 -1
  842. package/dist/src/ui/components/SessionSummaryDisplay.js +17 -1
  843. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
  844. package/dist/src/ui/components/SessionSummaryDisplay.test.js +118 -20
  845. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -1
  846. package/dist/src/ui/components/SettingsDialog.d.ts +1 -5
  847. package/dist/src/ui/components/SettingsDialog.js +120 -329
  848. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  849. package/dist/src/ui/components/SettingsDialog.test.js +366 -212
  850. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
  851. package/dist/src/ui/components/ShellInputPrompt.js +11 -3
  852. package/dist/src/ui/components/ShellInputPrompt.js.map +1 -1
  853. package/dist/src/ui/components/ShellInputPrompt.test.js +111 -67
  854. package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -1
  855. package/dist/src/ui/components/ShellModeIndicator.test.js +3 -2
  856. package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -1
  857. package/dist/src/ui/components/ShortcutsHelp.js +46 -17
  858. package/dist/src/ui/components/ShortcutsHelp.js.map +1 -1
  859. package/dist/src/ui/components/ShortcutsHelp.test.js +11 -3
  860. package/dist/src/ui/components/ShortcutsHelp.test.js.map +1 -1
  861. package/dist/src/ui/components/ShowMoreLines.d.ts +2 -1
  862. package/dist/src/ui/components/ShowMoreLines.js +7 -5
  863. package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
  864. package/dist/src/ui/components/ShowMoreLines.test.js +42 -7
  865. package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -1
  866. package/dist/src/ui/components/ShowMoreLinesLayout.test.d.ts +1 -0
  867. package/dist/src/ui/components/ShowMoreLinesLayout.test.js +67 -0
  868. package/dist/src/ui/components/ShowMoreLinesLayout.test.js.map +1 -0
  869. package/dist/src/ui/components/StatsDisplay.d.ts +4 -2
  870. package/dist/src/ui/components/StatsDisplay.js +58 -88
  871. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  872. package/dist/src/ui/components/StatsDisplay.test.js +109 -166
  873. package/dist/src/ui/components/StatsDisplay.test.js.map +1 -1
  874. package/dist/src/ui/components/StatusDisplay.d.ts +1 -2
  875. package/dist/src/ui/components/StatusDisplay.js +1 -6
  876. package/dist/src/ui/components/StatusDisplay.js.map +1 -1
  877. package/dist/src/ui/components/StatusDisplay.test.js +37 -24
  878. package/dist/src/ui/components/StatusDisplay.test.js.map +1 -1
  879. package/dist/src/ui/components/StatusRow.d.ts +32 -0
  880. package/dist/src/ui/components/StatusRow.js +180 -0
  881. package/dist/src/ui/components/StatusRow.js.map +1 -0
  882. package/dist/src/ui/components/StatusRow.test.d.ts +6 -0
  883. package/dist/src/ui/components/StatusRow.test.js +99 -0
  884. package/dist/src/ui/components/StatusRow.test.js.map +1 -0
  885. package/dist/src/ui/components/StickyHeader.test.js +3 -2
  886. package/dist/src/ui/components/StickyHeader.test.js.map +1 -1
  887. package/dist/src/ui/components/SuggestionsDisplay.d.ts +3 -0
  888. package/dist/src/ui/components/SuggestionsDisplay.js +9 -5
  889. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  890. package/dist/src/ui/components/SuggestionsDisplay.test.js +39 -13
  891. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -1
  892. package/dist/src/ui/components/Table.test.js +26 -8
  893. package/dist/src/ui/components/Table.test.js.map +1 -1
  894. package/dist/src/ui/components/ThemeDialog.d.ts +1 -1
  895. package/dist/src/ui/components/ThemeDialog.js +31 -32
  896. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  897. package/dist/src/ui/components/ThemeDialog.test.js +48 -24
  898. package/dist/src/ui/components/ThemeDialog.test.js.map +1 -1
  899. package/dist/src/ui/components/ThemedGradient.test.js +7 -2
  900. package/dist/src/ui/components/ThemedGradient.test.js.map +1 -1
  901. package/dist/src/ui/components/Tips.d.ts +1 -1
  902. package/dist/src/ui/components/Tips.js +1 -1
  903. package/dist/src/ui/components/Tips.js.map +1 -1
  904. package/dist/src/ui/components/Tips.test.d.ts +1 -1
  905. package/dist/src/ui/components/Tips.test.js +8 -8
  906. package/dist/src/ui/components/Tips.test.js.map +1 -1
  907. package/dist/src/ui/components/ToastDisplay.d.ts +2 -1
  908. package/dist/src/ui/components/ToastDisplay.js +13 -6
  909. package/dist/src/ui/components/ToastDisplay.js.map +1 -1
  910. package/dist/src/ui/components/ToastDisplay.test.js +69 -34
  911. package/dist/src/ui/components/ToastDisplay.test.js.map +1 -1
  912. package/dist/src/ui/components/ToolConfirmationQueue.js +34 -19
  913. package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
  914. package/dist/src/ui/components/ToolConfirmationQueue.test.js +276 -50
  915. package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +1 -1
  916. package/dist/src/ui/components/ToolStatsDisplay.test.js +19 -12
  917. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -1
  918. package/dist/src/ui/components/UpdateNotification.test.js +3 -2
  919. package/dist/src/ui/components/UpdateNotification.test.js.map +1 -1
  920. package/dist/src/ui/components/UserIdentity.d.ts +1 -1
  921. package/dist/src/ui/components/UserIdentity.js +14 -11
  922. package/dist/src/ui/components/UserIdentity.js.map +1 -1
  923. package/dist/src/ui/components/UserIdentity.test.d.ts +1 -1
  924. package/dist/src/ui/components/UserIdentity.test.js +60 -17
  925. package/dist/src/ui/components/UserIdentity.test.js.map +1 -1
  926. package/dist/src/ui/components/ValidationDialog.js +4 -2
  927. package/dist/src/ui/components/ValidationDialog.js.map +1 -1
  928. package/dist/src/ui/components/ValidationDialog.test.js +25 -16
  929. package/dist/src/ui/components/ValidationDialog.test.js.map +1 -1
  930. package/dist/src/ui/components/messages/CompressionMessage.test.js +91 -102
  931. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -1
  932. package/dist/src/ui/components/messages/DenseToolMessage.d.ts +13 -0
  933. package/dist/src/ui/components/messages/DenseToolMessage.js +270 -0
  934. package/dist/src/ui/components/messages/DenseToolMessage.js.map +1 -0
  935. package/dist/src/ui/components/messages/DenseToolMessage.test.d.ts +6 -0
  936. package/dist/src/ui/components/messages/DenseToolMessage.test.js +383 -0
  937. package/dist/src/ui/components/messages/DenseToolMessage.test.js.map +1 -0
  938. package/dist/src/ui/components/messages/DiffRenderer.d.ts +18 -0
  939. package/dist/src/ui/components/messages/DiffRenderer.js +55 -35
  940. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  941. package/dist/src/ui/components/messages/DiffRenderer.test.js +46 -17
  942. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
  943. package/dist/src/ui/components/messages/ErrorMessage.test.js +6 -4
  944. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -1
  945. package/dist/src/ui/components/messages/GeminiMessage.js +3 -6
  946. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
  947. package/dist/src/ui/components/messages/GeminiMessage.test.js +15 -4
  948. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -1
  949. package/dist/src/ui/components/messages/GeminiMessageContent.js +4 -7
  950. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -1
  951. package/dist/src/ui/components/messages/HintMessage.d.ts +11 -0
  952. package/dist/src/ui/components/messages/HintMessage.js +14 -0
  953. package/dist/src/ui/components/messages/HintMessage.js.map +1 -0
  954. package/dist/src/ui/components/messages/InfoMessage.d.ts +3 -0
  955. package/dist/src/ui/components/messages/InfoMessage.js +2 -2
  956. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  957. package/dist/src/ui/components/messages/InfoMessage.test.js +9 -6
  958. package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -1
  959. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +6 -4
  960. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +1 -1
  961. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +2 -3
  962. package/dist/src/ui/components/messages/ShellToolMessage.js +37 -29
  963. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
  964. package/dist/src/ui/components/messages/ShellToolMessage.test.js +140 -55
  965. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -1
  966. package/dist/src/ui/components/messages/SubagentGroupDisplay.d.ts +17 -0
  967. package/dist/src/ui/components/messages/SubagentGroupDisplay.js +139 -0
  968. package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +1 -0
  969. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.d.ts +1 -0
  970. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js +91 -0
  971. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js.map +1 -0
  972. package/dist/src/ui/components/messages/SubagentHistoryMessage.d.ts +13 -0
  973. package/dist/src/ui/components/messages/SubagentHistoryMessage.js +4 -0
  974. package/dist/src/ui/components/messages/SubagentHistoryMessage.js.map +1 -0
  975. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.d.ts +6 -0
  976. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js +68 -0
  977. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js.map +1 -0
  978. package/dist/src/ui/components/messages/SubagentProgressDisplay.d.ts +14 -0
  979. package/dist/src/ui/components/messages/SubagentProgressDisplay.js +79 -0
  980. package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +1 -0
  981. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js +163 -0
  982. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js.map +1 -0
  983. package/dist/src/ui/components/messages/ThinkingMessage.d.ts +2 -0
  984. package/dist/src/ui/components/messages/ThinkingMessage.js +26 -25
  985. package/dist/src/ui/components/messages/ThinkingMessage.js.map +1 -1
  986. package/dist/src/ui/components/messages/ThinkingMessage.test.js +81 -22
  987. package/dist/src/ui/components/messages/ThinkingMessage.test.js.map +1 -1
  988. package/dist/src/ui/components/messages/Todo.js +5 -3
  989. package/dist/src/ui/components/messages/Todo.js.map +1 -1
  990. package/dist/src/ui/components/messages/Todo.test.js +35 -21
  991. package/dist/src/ui/components/messages/Todo.test.js.map +1 -1
  992. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +4 -2
  993. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +357 -81
  994. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  995. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +296 -31
  996. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
  997. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.d.ts +6 -0
  998. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js +147 -0
  999. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js.map +1 -0
  1000. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +6 -5
  1001. package/dist/src/ui/components/messages/ToolGroupMessage.js +275 -86
  1002. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  1003. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +495 -293
  1004. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
  1005. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.d.ts +6 -0
  1006. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js +101 -0
  1007. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js.map +1 -0
  1008. package/dist/src/ui/components/messages/ToolMessage.js +7 -4
  1009. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
  1010. package/dist/src/ui/components/messages/ToolMessage.test.js +158 -43
  1011. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
  1012. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +15 -8
  1013. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +1 -1
  1014. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +15 -5
  1015. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -1
  1016. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.d.ts +6 -0
  1017. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +88 -0
  1018. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +1 -0
  1019. package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +1 -0
  1020. package/dist/src/ui/components/messages/ToolResultDisplay.js +108 -88
  1021. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
  1022. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +193 -55
  1023. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -1
  1024. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +63 -39
  1025. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +1 -1
  1026. package/dist/src/ui/components/messages/ToolShared.d.ts +15 -6
  1027. package/dist/src/ui/components/messages/ToolShared.js +45 -26
  1028. package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
  1029. package/dist/src/ui/components/messages/ToolShared.test.d.ts +6 -0
  1030. package/dist/src/ui/components/messages/ToolShared.test.js +47 -0
  1031. package/dist/src/ui/components/messages/ToolShared.test.js.map +1 -0
  1032. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +17 -10
  1033. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -1
  1034. package/dist/src/ui/components/messages/TopicMessage.d.ts +15 -0
  1035. package/dist/src/ui/components/messages/TopicMessage.js +56 -0
  1036. package/dist/src/ui/components/messages/TopicMessage.js.map +1 -0
  1037. package/dist/src/ui/components/messages/TopicMessage.test.d.ts +6 -0
  1038. package/dist/src/ui/components/messages/TopicMessage.test.js +77 -0
  1039. package/dist/src/ui/components/messages/TopicMessage.test.js.map +1 -0
  1040. package/dist/src/ui/components/messages/UserMessage.js +2 -3
  1041. package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
  1042. package/dist/src/ui/components/messages/UserMessage.test.js +12 -8
  1043. package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -1
  1044. package/dist/src/ui/components/messages/UserShellMessage.js +1 -2
  1045. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -1
  1046. package/dist/src/ui/components/messages/WarningMessage.test.js +6 -4
  1047. package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -1
  1048. package/dist/src/ui/components/shared/BaseSelectionList.d.ts +3 -2
  1049. package/dist/src/ui/components/shared/BaseSelectionList.js +25 -20
  1050. package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -1
  1051. package/dist/src/ui/components/shared/BaseSelectionList.test.js +140 -113
  1052. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
  1053. package/dist/src/ui/components/shared/BaseSettingsDialog.d.ts +16 -5
  1054. package/dist/src/ui/components/shared/BaseSettingsDialog.js +130 -170
  1055. package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
  1056. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +244 -48
  1057. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +1 -1
  1058. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +16 -6
  1059. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -1
  1060. package/dist/src/ui/components/shared/DialogFooter.d.ts +3 -1
  1061. package/dist/src/ui/components/shared/DialogFooter.js +2 -1
  1062. package/dist/src/ui/components/shared/DialogFooter.js.map +1 -1
  1063. package/dist/src/ui/components/shared/EnumSelector.js +0 -5
  1064. package/dist/src/ui/components/shared/EnumSelector.js.map +1 -1
  1065. package/dist/src/ui/components/shared/EnumSelector.test.js +33 -20
  1066. package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -1
  1067. package/dist/src/ui/components/shared/ExpandableText.test.js +28 -23
  1068. package/dist/src/ui/components/shared/ExpandableText.test.js.map +1 -1
  1069. package/dist/src/ui/components/shared/HalfLinePaddedBox.js +3 -2
  1070. package/dist/src/ui/components/shared/HalfLinePaddedBox.js.map +1 -1
  1071. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +4 -4
  1072. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +1 -1
  1073. package/dist/src/ui/components/shared/HorizontalLine.d.ts +1 -0
  1074. package/dist/src/ui/components/shared/HorizontalLine.js +1 -1
  1075. package/dist/src/ui/components/shared/HorizontalLine.js.map +1 -1
  1076. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +2 -2
  1077. package/dist/src/ui/components/shared/MaxSizedBox.js +18 -6
  1078. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
  1079. package/dist/src/ui/components/shared/MaxSizedBox.test.js +90 -32
  1080. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -1
  1081. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +1 -0
  1082. package/dist/src/ui/components/shared/RadioButtonSelect.js +2 -2
  1083. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
  1084. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +22 -11
  1085. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -1
  1086. package/dist/src/ui/components/shared/Scrollable.d.ts +5 -1
  1087. package/dist/src/ui/components/shared/Scrollable.js +103 -45
  1088. package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
  1089. package/dist/src/ui/components/shared/Scrollable.test.js +41 -36
  1090. package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -1
  1091. package/dist/src/ui/components/shared/ScrollableList.d.ts +9 -12
  1092. package/dist/src/ui/components/shared/ScrollableList.js +20 -13
  1093. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
  1094. package/dist/src/ui/components/shared/ScrollableList.test.js +213 -22
  1095. package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -1
  1096. package/dist/src/ui/components/shared/SearchableList.d.ts +61 -0
  1097. package/dist/src/ui/components/shared/SearchableList.js +86 -0
  1098. package/dist/src/ui/components/shared/SearchableList.js.map +1 -0
  1099. package/dist/src/ui/components/shared/SearchableList.test.js +169 -0
  1100. package/dist/src/ui/components/shared/SearchableList.test.js.map +1 -0
  1101. package/dist/src/ui/components/shared/SectionHeader.d.ts +1 -0
  1102. package/dist/src/ui/components/shared/SectionHeader.js +1 -1
  1103. package/dist/src/ui/components/shared/SectionHeader.js.map +1 -1
  1104. package/dist/src/ui/components/shared/SectionHeader.test.js +8 -2
  1105. package/dist/src/ui/components/shared/SectionHeader.test.js.map +1 -1
  1106. package/dist/src/ui/components/shared/SlicingMaxSizedBox.d.ts +18 -0
  1107. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js +75 -0
  1108. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js.map +1 -0
  1109. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.d.ts +6 -0
  1110. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js +53 -0
  1111. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js.map +1 -0
  1112. package/dist/src/ui/components/shared/TabHeader.js +1 -1
  1113. package/dist/src/ui/components/shared/TabHeader.js.map +1 -1
  1114. package/dist/src/ui/components/shared/TabHeader.test.js +52 -25
  1115. package/dist/src/ui/components/shared/TabHeader.test.js.map +1 -1
  1116. package/dist/src/ui/components/shared/TextInput.d.ts +1 -1
  1117. package/dist/src/ui/components/shared/TextInput.js +7 -3
  1118. package/dist/src/ui/components/shared/TextInput.js.map +1 -1
  1119. package/dist/src/ui/components/shared/TextInput.test.js +144 -66
  1120. package/dist/src/ui/components/shared/TextInput.test.js.map +1 -1
  1121. package/dist/src/ui/components/shared/VirtualizedList.d.ts +13 -1
  1122. package/dist/src/ui/components/shared/VirtualizedList.js +269 -113
  1123. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
  1124. package/dist/src/ui/components/shared/VirtualizedList.test.js +30 -51
  1125. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -1
  1126. package/dist/src/ui/components/shared/performance.test.js +4 -4
  1127. package/dist/src/ui/components/shared/performance.test.js.map +1 -1
  1128. package/dist/src/ui/components/shared/text-buffer.d.ts +172 -2
  1129. package/dist/src/ui/components/shared/text-buffer.js +228 -64
  1130. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  1131. package/dist/src/ui/components/shared/text-buffer.test.js +382 -275
  1132. package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
  1133. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +42 -0
  1134. package/dist/src/ui/components/shared/vim-buffer-actions.js +673 -32
  1135. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
  1136. package/dist/src/ui/components/shared/vim-buffer-actions.test.js +1296 -42
  1137. package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -1
  1138. package/dist/src/ui/components/triage/TriageDuplicates.d.ts +1 -1
  1139. package/dist/src/ui/components/triage/TriageDuplicates.js +6 -2
  1140. package/dist/src/ui/components/triage/TriageDuplicates.js.map +1 -1
  1141. package/dist/src/ui/components/triage/TriageIssues.d.ts +1 -1
  1142. package/dist/src/ui/components/triage/TriageIssues.js +6 -2
  1143. package/dist/src/ui/components/triage/TriageIssues.js.map +1 -1
  1144. package/dist/src/ui/components/views/ChatList.test.js +6 -6
  1145. package/dist/src/ui/components/views/ChatList.test.js.map +1 -1
  1146. package/dist/src/ui/components/views/ExtensionDetails.d.ts +18 -0
  1147. package/dist/src/ui/components/views/ExtensionDetails.js +85 -0
  1148. package/dist/src/ui/components/views/ExtensionDetails.js.map +1 -0
  1149. package/dist/src/ui/components/views/ExtensionDetails.test.d.ts +6 -0
  1150. package/dist/src/ui/components/views/ExtensionDetails.test.js +154 -0
  1151. package/dist/src/ui/components/views/ExtensionDetails.test.js.map +1 -0
  1152. package/dist/src/ui/components/views/ExtensionRegistryView.d.ts +15 -0
  1153. package/dist/src/ui/components/views/ExtensionRegistryView.js +97 -0
  1154. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -0
  1155. package/dist/src/ui/components/views/ExtensionRegistryView.test.d.ts +6 -0
  1156. package/dist/src/ui/components/views/ExtensionRegistryView.test.js +222 -0
  1157. package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +1 -0
  1158. package/dist/src/ui/components/views/ExtensionsList.test.js +16 -19
  1159. package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -1
  1160. package/dist/src/ui/components/views/McpStatus.d.ts +2 -2
  1161. package/dist/src/ui/components/views/McpStatus.js +8 -3
  1162. package/dist/src/ui/components/views/McpStatus.js.map +1 -1
  1163. package/dist/src/ui/components/views/McpStatus.test.js +47 -26
  1164. package/dist/src/ui/components/views/McpStatus.test.js.map +1 -1
  1165. package/dist/src/ui/components/views/SkillsList.js +2 -1
  1166. package/dist/src/ui/components/views/SkillsList.js.map +1 -1
  1167. package/dist/src/ui/components/views/SkillsList.test.js +15 -13
  1168. package/dist/src/ui/components/views/SkillsList.test.js.map +1 -1
  1169. package/dist/src/ui/components/views/ToolsList.test.js +6 -6
  1170. package/dist/src/ui/components/views/ToolsList.test.js.map +1 -1
  1171. package/dist/src/ui/constants/tips.js +81 -82
  1172. package/dist/src/ui/constants/tips.js.map +1 -1
  1173. package/dist/src/ui/constants/wittyPhrases.js +107 -107
  1174. package/dist/src/ui/constants/wittyPhrases.js.map +1 -1
  1175. package/dist/src/ui/constants.d.ts +14 -1
  1176. package/dist/src/ui/constants.js +24 -1
  1177. package/dist/src/ui/constants.js.map +1 -1
  1178. package/dist/src/ui/contexts/AppContext.d.ts +2 -1
  1179. package/dist/src/ui/contexts/AppContext.js.map +1 -1
  1180. package/dist/src/ui/contexts/InputContext.d.ts +17 -0
  1181. package/dist/src/ui/contexts/InputContext.js +15 -0
  1182. package/dist/src/ui/contexts/InputContext.js.map +1 -0
  1183. package/dist/src/ui/contexts/KeypressContext.d.ts +8 -3
  1184. package/dist/src/ui/contexts/KeypressContext.js +196 -45
  1185. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  1186. package/dist/src/ui/contexts/KeypressContext.test.js +200 -76
  1187. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  1188. package/dist/src/ui/contexts/MouseContext.d.ts +1 -2
  1189. package/dist/src/ui/contexts/MouseContext.js +7 -3
  1190. package/dist/src/ui/contexts/MouseContext.js.map +1 -1
  1191. package/dist/src/ui/contexts/MouseContext.test.js +32 -21
  1192. package/dist/src/ui/contexts/MouseContext.test.js.map +1 -1
  1193. package/dist/src/ui/contexts/OverflowContext.d.ts +3 -3
  1194. package/dist/src/ui/contexts/OverflowContext.js +49 -20
  1195. package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
  1196. package/dist/src/ui/contexts/ScrollProvider.drag.test.js +6 -6
  1197. package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +1 -1
  1198. package/dist/src/ui/contexts/ScrollProvider.js +25 -3
  1199. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -1
  1200. package/dist/src/ui/contexts/ScrollProvider.test.js +111 -11
  1201. package/dist/src/ui/contexts/ScrollProvider.test.js.map +1 -1
  1202. package/dist/src/ui/contexts/SessionContext.d.ts +2 -2
  1203. package/dist/src/ui/contexts/SessionContext.js +10 -0
  1204. package/dist/src/ui/contexts/SessionContext.js.map +1 -1
  1205. package/dist/src/ui/contexts/SessionContext.test.js +26 -11
  1206. package/dist/src/ui/contexts/SessionContext.test.js.map +1 -1
  1207. package/dist/src/ui/contexts/SettingsContext.d.ts +9 -1
  1208. package/dist/src/ui/contexts/SettingsContext.js +34 -1
  1209. package/dist/src/ui/contexts/SettingsContext.js.map +1 -1
  1210. package/dist/src/ui/contexts/SettingsContext.test.d.ts +6 -0
  1211. package/dist/src/ui/contexts/SettingsContext.test.js +106 -0
  1212. package/dist/src/ui/contexts/SettingsContext.test.js.map +1 -0
  1213. package/dist/src/ui/contexts/TerminalContext.d.ts +1 -0
  1214. package/dist/src/ui/contexts/TerminalContext.js +15 -2
  1215. package/dist/src/ui/contexts/TerminalContext.js.map +1 -1
  1216. package/dist/src/ui/contexts/TerminalContext.test.js +24 -10
  1217. package/dist/src/ui/contexts/TerminalContext.test.js.map +1 -1
  1218. package/dist/src/ui/contexts/ToolActionsContext.d.ts +6 -0
  1219. package/dist/src/ui/contexts/ToolActionsContext.js +28 -18
  1220. package/dist/src/ui/contexts/ToolActionsContext.js.map +1 -1
  1221. package/dist/src/ui/contexts/ToolActionsContext.test.js +136 -56
  1222. package/dist/src/ui/contexts/ToolActionsContext.test.js.map +1 -1
  1223. package/dist/src/ui/contexts/UIActionsContext.d.ts +20 -5
  1224. package/dist/src/ui/contexts/UIActionsContext.js +1 -1
  1225. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  1226. package/dist/src/ui/contexts/UIStateContext.d.ts +51 -19
  1227. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  1228. package/dist/src/ui/contexts/VimModeContext.d.ts +1 -3
  1229. package/dist/src/ui/contexts/VimModeContext.js +7 -16
  1230. package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
  1231. package/dist/src/ui/hooks/atCommandProcessor.d.ts +15 -5
  1232. package/dist/src/ui/hooks/atCommandProcessor.js +47 -18
  1233. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  1234. package/dist/src/ui/hooks/atCommandProcessor.test.js +92 -14
  1235. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  1236. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +2 -1
  1237. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +1 -1
  1238. package/dist/src/ui/hooks/creditsFlowHandler.d.ts +35 -0
  1239. package/dist/src/ui/hooks/creditsFlowHandler.js +158 -0
  1240. package/dist/src/ui/hooks/creditsFlowHandler.js.map +1 -0
  1241. package/dist/src/ui/hooks/creditsFlowHandler.test.d.ts +6 -0
  1242. package/dist/src/ui/hooks/creditsFlowHandler.test.js +211 -0
  1243. package/dist/src/ui/hooks/creditsFlowHandler.test.js.map +1 -0
  1244. package/dist/src/ui/hooks/shell-completions/gitProvider.d.ts +7 -0
  1245. package/dist/src/ui/hooks/shell-completions/gitProvider.js +73 -0
  1246. package/dist/src/ui/hooks/shell-completions/gitProvider.js.map +1 -0
  1247. package/dist/src/ui/hooks/shell-completions/gitProvider.test.d.ts +6 -0
  1248. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js +73 -0
  1249. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js.map +1 -0
  1250. package/dist/src/ui/hooks/shell-completions/index.d.ts +7 -0
  1251. package/dist/src/ui/hooks/shell-completions/index.js +16 -0
  1252. package/dist/src/ui/hooks/shell-completions/index.js.map +1 -0
  1253. package/dist/src/ui/hooks/shell-completions/npmProvider.d.ts +7 -0
  1254. package/dist/src/ui/hooks/shell-completions/npmProvider.js +67 -0
  1255. package/dist/src/ui/hooks/shell-completions/npmProvider.js.map +1 -0
  1256. package/dist/src/ui/hooks/shell-completions/npmProvider.test.d.ts +6 -0
  1257. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js +69 -0
  1258. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js.map +1 -0
  1259. package/dist/src/ui/hooks/shell-completions/types.d.ts +16 -0
  1260. package/dist/src/ui/hooks/shell-completions/types.js +7 -0
  1261. package/dist/src/ui/hooks/shell-completions/types.js.map +1 -0
  1262. package/dist/src/ui/hooks/shellReducer.d.ts +12 -10
  1263. package/dist/src/ui/hooks/shellReducer.js +67 -37
  1264. package/dist/src/ui/hooks/shellReducer.js.map +1 -1
  1265. package/dist/src/ui/hooks/shellReducer.test.js +207 -36
  1266. package/dist/src/ui/hooks/shellReducer.test.js.map +1 -1
  1267. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
  1268. package/dist/src/ui/hooks/slashCommandProcessor.js +38 -17
  1269. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  1270. package/dist/src/ui/hooks/slashCommandProcessor.test.js +39 -83
  1271. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
  1272. package/dist/src/ui/hooks/toolMapping.d.ts +4 -3
  1273. package/dist/src/ui/hooks/toolMapping.js +34 -32
  1274. package/dist/src/ui/hooks/toolMapping.js.map +1 -1
  1275. package/dist/src/ui/hooks/toolMapping.test.js +94 -27
  1276. package/dist/src/ui/hooks/toolMapping.test.js.map +1 -1
  1277. package/dist/src/ui/hooks/useAlternateBuffer.d.ts +2 -2
  1278. package/dist/src/ui/hooks/useAlternateBuffer.js +10 -4
  1279. package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -1
  1280. package/dist/src/ui/hooks/useAlternateBuffer.test.d.ts +6 -0
  1281. package/dist/src/ui/hooks/useAlternateBuffer.test.js +62 -0
  1282. package/dist/src/ui/hooks/useAlternateBuffer.test.js.map +1 -0
  1283. package/dist/src/ui/hooks/useAnimatedScrollbar.js +15 -5
  1284. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
  1285. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +12 -12
  1286. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +1 -1
  1287. package/dist/src/ui/hooks/useApprovalModeIndicator.d.ts +3 -2
  1288. package/dist/src/ui/hooks/useApprovalModeIndicator.js +5 -3
  1289. package/dist/src/ui/hooks/useApprovalModeIndicator.js.map +1 -1
  1290. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +66 -63
  1291. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +1 -1
  1292. package/dist/src/ui/hooks/useAtCompletion.d.ts +2 -2
  1293. package/dist/src/ui/hooks/useAtCompletion.js +76 -24
  1294. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  1295. package/dist/src/ui/hooks/useAtCompletion.test.js +152 -31
  1296. package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -1
  1297. package/dist/src/ui/hooks/useAtCompletion_agents.test.js +2 -2
  1298. package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +1 -1
  1299. package/dist/src/ui/hooks/useBackgroundTaskManager.d.ts +22 -0
  1300. package/dist/src/ui/hooks/useBackgroundTaskManager.js +58 -0
  1301. package/dist/src/ui/hooks/useBackgroundTaskManager.js.map +1 -0
  1302. package/dist/src/ui/hooks/useBackgroundTaskManager.test.d.ts +6 -0
  1303. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js +168 -0
  1304. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js.map +1 -0
  1305. package/dist/src/ui/hooks/useBanner.d.ts +1 -0
  1306. package/dist/src/ui/hooks/useBanner.js +16 -9
  1307. package/dist/src/ui/hooks/useBanner.js.map +1 -1
  1308. package/dist/src/ui/hooks/useBanner.test.js +19 -13
  1309. package/dist/src/ui/hooks/useBanner.test.js.map +1 -1
  1310. package/dist/src/ui/hooks/useBatchedScroll.js +2 -2
  1311. package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -1
  1312. package/dist/src/ui/hooks/useBatchedScroll.test.js +14 -14
  1313. package/dist/src/ui/hooks/useBatchedScroll.test.js.map +1 -1
  1314. package/dist/src/ui/hooks/useCommandCompletion.d.ts +8 -3
  1315. package/dist/src/ui/hooks/useCommandCompletion.js +110 -15
  1316. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  1317. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +1 -1
  1318. package/dist/src/ui/hooks/useCommandCompletion.test.js +275 -55
  1319. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -1
  1320. package/dist/src/ui/hooks/useCompletion.d.ts +1 -1
  1321. package/dist/src/ui/hooks/useCompletion.js +1 -1
  1322. package/dist/src/ui/hooks/useCompletion.js.map +1 -1
  1323. package/dist/src/ui/hooks/useComposerStatus.d.ts +21 -0
  1324. package/dist/src/ui/hooks/useComposerStatus.js +78 -0
  1325. package/dist/src/ui/hooks/useComposerStatus.js.map +1 -0
  1326. package/dist/src/ui/hooks/useConfirmingTool.d.ts +2 -6
  1327. package/dist/src/ui/hooks/useConfirmingTool.js +2 -22
  1328. package/dist/src/ui/hooks/useConfirmingTool.js.map +1 -1
  1329. package/dist/src/ui/hooks/useConsoleMessages.d.ts +20 -4
  1330. package/dist/src/ui/hooks/useConsoleMessages.js +126 -87
  1331. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  1332. package/dist/src/ui/hooks/useConsoleMessages.test.js +106 -64
  1333. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -1
  1334. package/dist/src/ui/hooks/useEditorSettings.test.js +20 -20
  1335. package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
  1336. package/dist/src/ui/hooks/useExecutionLifecycle.d.ts +28 -0
  1337. package/dist/src/ui/hooks/{shellCommandProcessor.js → useExecutionLifecycle.js} +152 -70
  1338. package/dist/src/ui/hooks/useExecutionLifecycle.js.map +1 -0
  1339. package/dist/src/ui/hooks/useExecutionLifecycle.test.d.ts +6 -0
  1340. package/dist/src/ui/hooks/{shellCommandProcessor.test.js → useExecutionLifecycle.test.js} +172 -124
  1341. package/dist/src/ui/hooks/useExecutionLifecycle.test.js.map +1 -0
  1342. package/dist/src/ui/hooks/useExtensionRegistry.d.ts +13 -0
  1343. package/dist/src/ui/hooks/useExtensionRegistry.js +70 -0
  1344. package/dist/src/ui/hooks/useExtensionRegistry.js.map +1 -0
  1345. package/dist/src/ui/hooks/useExtensionUpdates.js +10 -9
  1346. package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
  1347. package/dist/src/ui/hooks/useExtensionUpdates.test.js +7 -6
  1348. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -1
  1349. package/dist/src/ui/hooks/useFlickerDetector.test.js +12 -13
  1350. package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -1
  1351. package/dist/src/ui/hooks/useFocus.d.ts +4 -1
  1352. package/dist/src/ui/hooks/useFocus.js +7 -1
  1353. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  1354. package/dist/src/ui/hooks/useFocus.test.js +35 -27
  1355. package/dist/src/ui/hooks/useFocus.test.js.map +1 -1
  1356. package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -0
  1357. package/dist/src/ui/hooks/useFolderTrust.js +16 -4
  1358. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  1359. package/dist/src/ui/hooks/useFolderTrust.test.js +23 -20
  1360. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -1
  1361. package/dist/src/ui/hooks/useGeminiStream.d.ts +7 -7
  1362. package/dist/src/ui/hooks/useGeminiStream.js +468 -125
  1363. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  1364. package/dist/src/ui/hooks/useGeminiStream.test.js +832 -230
  1365. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
  1366. package/dist/src/ui/hooks/useGitBranchName.js +2 -2
  1367. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
  1368. package/dist/src/ui/hooks/useGitBranchName.test.js +63 -60
  1369. package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
  1370. package/dist/src/ui/hooks/useHistoryManager.js +9 -5
  1371. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
  1372. package/dist/src/ui/hooks/useHistoryManager.test.js +63 -24
  1373. package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -1
  1374. package/dist/src/ui/hooks/useHookDisplayState.js +1 -0
  1375. package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -1
  1376. package/dist/src/ui/hooks/useHookDisplayState.test.js +12 -12
  1377. package/dist/src/ui/hooks/useHookDisplayState.test.js.map +1 -1
  1378. package/dist/src/ui/hooks/useIdeTrustListener.test.js +17 -6
  1379. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -1
  1380. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +10 -10
  1381. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -1
  1382. package/dist/src/ui/hooks/useInlineEditBuffer.d.ts +43 -0
  1383. package/dist/src/ui/hooks/useInlineEditBuffer.js +113 -0
  1384. package/dist/src/ui/hooks/useInlineEditBuffer.js.map +1 -0
  1385. package/dist/src/ui/hooks/useInlineEditBuffer.test.d.ts +6 -0
  1386. package/dist/src/ui/hooks/useInlineEditBuffer.test.js +112 -0
  1387. package/dist/src/ui/hooks/useInlineEditBuffer.test.js.map +1 -0
  1388. package/dist/src/ui/hooks/useInputHistory.test.js +28 -28
  1389. package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -1
  1390. package/dist/src/ui/hooks/useInputHistoryStore.test.js +20 -20
  1391. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -1
  1392. package/dist/src/ui/hooks/useKeyMatchers.d.ts +17 -0
  1393. package/dist/src/ui/hooks/useKeyMatchers.js +13 -0
  1394. package/dist/src/ui/hooks/useKeyMatchers.js.map +1 -0
  1395. package/dist/src/ui/hooks/useKeypress.d.ts +4 -4
  1396. package/dist/src/ui/hooks/useKeypress.js +3 -3
  1397. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  1398. package/dist/src/ui/hooks/useKeypress.test.js +23 -31
  1399. package/dist/src/ui/hooks/useKeypress.test.js.map +1 -1
  1400. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +7 -1
  1401. package/dist/src/ui/hooks/useLoadingIndicator.js +12 -5
  1402. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  1403. package/dist/src/ui/hooks/useLoadingIndicator.test.js +67 -35
  1404. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -1
  1405. package/dist/src/ui/hooks/useLogger.d.ts +1 -2
  1406. package/dist/src/ui/hooks/useLogger.js +7 -4
  1407. package/dist/src/ui/hooks/useLogger.js.map +1 -1
  1408. package/dist/src/ui/hooks/useLogger.test.d.ts +6 -0
  1409. package/dist/src/ui/hooks/useLogger.test.js +57 -0
  1410. package/dist/src/ui/hooks/useLogger.test.js.map +1 -0
  1411. package/dist/src/ui/hooks/useMcpStatus.test.js +10 -10
  1412. package/dist/src/ui/hooks/useMcpStatus.test.js.map +1 -1
  1413. package/dist/src/ui/hooks/useMemoryMonitor.test.js +6 -6
  1414. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -1
  1415. package/dist/src/ui/hooks/useMessageQueue.test.js +29 -29
  1416. package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -1
  1417. package/dist/src/ui/hooks/useModelCommand.test.js +6 -6
  1418. package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -1
  1419. package/dist/src/ui/hooks/useMouse.d.ts +1 -1
  1420. package/dist/src/ui/hooks/useMouse.js +1 -1
  1421. package/dist/src/ui/hooks/useMouse.js.map +1 -1
  1422. package/dist/src/ui/hooks/useMouse.test.js +11 -16
  1423. package/dist/src/ui/hooks/useMouse.test.js.map +1 -1
  1424. package/dist/src/ui/hooks/useMouseClick.test.js +15 -7
  1425. package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -1
  1426. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +2 -2
  1427. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
  1428. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +19 -19
  1429. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -1
  1430. package/dist/src/ui/hooks/usePhraseCycler.d.ts +11 -4
  1431. package/dist/src/ui/hooks/usePhraseCycler.js +116 -55
  1432. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  1433. package/dist/src/ui/hooks/usePhraseCycler.test.js +104 -126
  1434. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -1
  1435. package/dist/src/ui/hooks/usePrivacySettings.js +9 -3
  1436. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
  1437. package/dist/src/ui/hooks/usePrivacySettings.test.js +20 -11
  1438. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -1
  1439. package/dist/src/ui/hooks/usePromptCompletion.d.ts +2 -3
  1440. package/dist/src/ui/hooks/usePromptCompletion.js +4 -4
  1441. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
  1442. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +11 -3
  1443. package/dist/src/ui/hooks/useQuotaAndFallback.js +95 -19
  1444. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
  1445. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +328 -38
  1446. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
  1447. package/dist/src/ui/hooks/useRegistrySearch.d.ts +19 -0
  1448. package/dist/src/ui/hooks/useRegistrySearch.js +35 -0
  1449. package/dist/src/ui/hooks/useRegistrySearch.js.map +1 -0
  1450. package/dist/src/ui/hooks/useRepeatedKeyPress.d.ts +15 -0
  1451. package/dist/src/ui/hooks/useRepeatedKeyPress.js +50 -0
  1452. package/dist/src/ui/hooks/useRepeatedKeyPress.js.map +1 -0
  1453. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +20 -20
  1454. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -1
  1455. package/dist/src/ui/hooks/useRewind.test.js +10 -10
  1456. package/dist/src/ui/hooks/useRewind.test.js.map +1 -1
  1457. package/dist/src/ui/hooks/useRunEventNotifications.d.ts +22 -0
  1458. package/dist/src/ui/hooks/useRunEventNotifications.js +93 -0
  1459. package/dist/src/ui/hooks/useRunEventNotifications.js.map +1 -0
  1460. package/dist/src/ui/hooks/useSearchBuffer.d.ts +11 -0
  1461. package/dist/src/ui/hooks/useSearchBuffer.js +24 -0
  1462. package/dist/src/ui/hooks/useSearchBuffer.js.map +1 -0
  1463. package/dist/src/ui/hooks/useSelectionList.js +5 -4
  1464. package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
  1465. package/dist/src/ui/hooks/useSelectionList.test.js +162 -50
  1466. package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
  1467. package/dist/src/ui/hooks/useSessionBrowser.d.ts +3 -4
  1468. package/dist/src/ui/hooks/useSessionBrowser.js +7 -5
  1469. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  1470. package/dist/src/ui/hooks/useSessionBrowser.test.js +60 -17
  1471. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -1
  1472. package/dist/src/ui/hooks/useSessionResume.js +2 -2
  1473. package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
  1474. package/dist/src/ui/hooks/useSessionResume.test.js +20 -20
  1475. package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -1
  1476. package/dist/src/ui/hooks/useSettingsNavigation.d.ts +18 -0
  1477. package/dist/src/ui/hooks/useSettingsNavigation.js +72 -0
  1478. package/dist/src/ui/hooks/useSettingsNavigation.js.map +1 -0
  1479. package/dist/src/ui/hooks/useSettingsNavigation.test.d.ts +6 -0
  1480. package/dist/src/ui/hooks/useSettingsNavigation.test.js +87 -0
  1481. package/dist/src/ui/hooks/useSettingsNavigation.test.js.map +1 -0
  1482. package/dist/src/ui/hooks/useShellCompletion.d.ts +50 -0
  1483. package/dist/src/ui/hooks/useShellCompletion.js +502 -0
  1484. package/dist/src/ui/hooks/useShellCompletion.js.map +1 -0
  1485. package/dist/src/ui/hooks/useShellCompletion.test.d.ts +6 -0
  1486. package/dist/src/ui/hooks/useShellCompletion.test.js +354 -0
  1487. package/dist/src/ui/hooks/useShellCompletion.test.js.map +1 -0
  1488. package/dist/src/ui/hooks/useShellHistory.test.js +7 -7
  1489. package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -1
  1490. package/dist/src/ui/hooks/useShellInactivityStatus.d.ts +1 -1
  1491. package/dist/src/ui/hooks/useShellInactivityStatus.js +1 -1
  1492. package/dist/src/ui/hooks/useShellInactivityStatus.js.map +1 -1
  1493. package/dist/src/ui/hooks/useShellInactivityStatus.test.js +4 -4
  1494. package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +1 -1
  1495. package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
  1496. package/dist/src/ui/hooks/useSlashCompletion.js +67 -33
  1497. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  1498. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +2 -1
  1499. package/dist/src/ui/hooks/useSlashCompletion.test.js +254 -162
  1500. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
  1501. package/dist/src/ui/hooks/useSnowfall.js +1 -1
  1502. package/dist/src/ui/hooks/useSnowfall.js.map +1 -1
  1503. package/dist/src/ui/hooks/useSnowfall.test.js +15 -11
  1504. package/dist/src/ui/hooks/useSnowfall.test.js.map +1 -1
  1505. package/dist/src/ui/hooks/useStateAndRef.js +1 -0
  1506. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
  1507. package/dist/src/ui/hooks/useSuspend.d.ts +16 -0
  1508. package/dist/src/ui/hooks/useSuspend.js +116 -0
  1509. package/dist/src/ui/hooks/useSuspend.js.map +1 -0
  1510. package/dist/src/ui/hooks/useSuspend.test.d.ts +6 -0
  1511. package/dist/src/ui/hooks/useSuspend.test.js +150 -0
  1512. package/dist/src/ui/hooks/useSuspend.test.js.map +1 -0
  1513. package/dist/src/ui/hooks/useTabbedNavigation.js +4 -1
  1514. package/dist/src/ui/hooks/useTabbedNavigation.js.map +1 -1
  1515. package/dist/src/ui/hooks/useTabbedNavigation.test.js +49 -63
  1516. package/dist/src/ui/hooks/useTabbedNavigation.test.js.map +1 -1
  1517. package/dist/src/ui/hooks/useTerminalTheme.d.ts +1 -1
  1518. package/dist/src/ui/hooks/useTerminalTheme.js +24 -9
  1519. package/dist/src/ui/hooks/useTerminalTheme.js.map +1 -1
  1520. package/dist/src/ui/hooks/useTerminalTheme.test.js +79 -38
  1521. package/dist/src/ui/hooks/useTerminalTheme.test.js.map +1 -1
  1522. package/dist/src/ui/hooks/useThemeCommand.d.ts +2 -2
  1523. package/dist/src/ui/hooks/useThemeCommand.js +12 -5
  1524. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  1525. package/dist/src/ui/hooks/useTimedMessage.d.ts +1 -1
  1526. package/dist/src/ui/hooks/useTimedMessage.js +5 -3
  1527. package/dist/src/ui/hooks/useTimedMessage.js.map +1 -1
  1528. package/dist/src/ui/hooks/useTimer.test.js +18 -18
  1529. package/dist/src/ui/hooks/useTimer.test.js.map +1 -1
  1530. package/dist/src/ui/hooks/useTips.test.js +6 -6
  1531. package/dist/src/ui/hooks/useTips.test.js.map +1 -1
  1532. package/dist/src/ui/hooks/useToolScheduler.d.ts +34 -10
  1533. package/dist/src/ui/hooks/useToolScheduler.js +202 -4
  1534. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
  1535. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +1 -1
  1536. package/dist/src/ui/hooks/useToolScheduler.test.js +462 -809
  1537. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  1538. package/dist/src/ui/hooks/useTurnActivityMonitor.d.ts +1 -1
  1539. package/dist/src/ui/hooks/useTurnActivityMonitor.js +1 -1
  1540. package/dist/src/ui/hooks/useTurnActivityMonitor.js.map +1 -1
  1541. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +14 -12
  1542. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +1 -1
  1543. package/dist/src/ui/hooks/useVisibilityToggle.d.ts +12 -0
  1544. package/dist/src/ui/hooks/useVisibilityToggle.js +60 -0
  1545. package/dist/src/ui/hooks/useVisibilityToggle.js.map +1 -0
  1546. package/dist/src/ui/hooks/vim-passthrough.test.js +2 -2
  1547. package/dist/src/ui/hooks/vim-passthrough.test.js.map +1 -1
  1548. package/dist/src/ui/hooks/vim.js +587 -27
  1549. package/dist/src/ui/hooks/vim.js.map +1 -1
  1550. package/dist/src/ui/hooks/vim.test.js +734 -183
  1551. package/dist/src/ui/hooks/vim.test.js.map +1 -1
  1552. package/dist/src/{config → ui/key}/keyBindings.d.ts +40 -26
  1553. package/dist/src/ui/key/keyBindings.js +698 -0
  1554. package/dist/src/ui/key/keyBindings.js.map +1 -0
  1555. package/dist/src/ui/key/keyBindings.test.d.ts +6 -0
  1556. package/dist/src/ui/key/keyBindings.test.js +214 -0
  1557. package/dist/src/ui/key/keyBindings.test.js.map +1 -0
  1558. package/dist/src/ui/{keyMatchers.d.ts → key/keyMatchers.d.ts} +11 -4
  1559. package/dist/src/ui/key/keyMatchers.js +43 -0
  1560. package/dist/src/ui/key/keyMatchers.js.map +1 -0
  1561. package/dist/src/ui/key/keyMatchers.test.d.ts +6 -0
  1562. package/dist/src/ui/{keyMatchers.test.js → key/keyMatchers.test.js} +149 -66
  1563. package/dist/src/ui/key/keyMatchers.test.js.map +1 -0
  1564. package/dist/src/ui/key/keyToAnsi.js +46 -0
  1565. package/dist/src/ui/key/keyToAnsi.js.map +1 -0
  1566. package/dist/src/ui/{utils → key}/keybindingUtils.d.ts +3 -3
  1567. package/dist/src/ui/key/keybindingUtils.js +87 -0
  1568. package/dist/src/ui/key/keybindingUtils.js.map +1 -0
  1569. package/dist/src/ui/key/keybindingUtils.test.d.ts +6 -0
  1570. package/dist/src/ui/key/keybindingUtils.test.js +121 -0
  1571. package/dist/src/ui/key/keybindingUtils.test.js.map +1 -0
  1572. package/dist/src/ui/layouts/DefaultAppLayout.js +8 -6
  1573. package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -1
  1574. package/dist/src/ui/layouts/DefaultAppLayout.test.js +34 -26
  1575. package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +1 -1
  1576. package/dist/src/ui/noninteractive/nonInteractiveUi.js +15 -2
  1577. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
  1578. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +21 -8
  1579. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -1
  1580. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +14 -5
  1581. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -1
  1582. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +14 -5
  1583. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -1
  1584. package/dist/src/ui/privacy/PrivacyNotice.test.js +3 -2
  1585. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -1
  1586. package/dist/src/ui/textConstants.d.ts +2 -1
  1587. package/dist/src/ui/textConstants.js +2 -1
  1588. package/dist/src/ui/textConstants.js.map +1 -1
  1589. package/dist/src/ui/themes/{ansi.d.ts → builtin/dark/ansi-dark.d.ts} +2 -2
  1590. package/dist/src/ui/themes/{ansi.js → builtin/dark/ansi-dark.js} +5 -4
  1591. package/dist/src/ui/themes/builtin/dark/ansi-dark.js.map +1 -0
  1592. package/dist/src/ui/themes/{atom-one-dark.d.ts → builtin/dark/atom-one-dark.d.ts} +2 -2
  1593. package/dist/src/ui/themes/{atom-one-dark.js → builtin/dark/atom-one-dark.js} +3 -3
  1594. package/dist/src/ui/themes/builtin/dark/atom-one-dark.js.map +1 -0
  1595. package/dist/src/ui/themes/{ayu.d.ts → builtin/dark/ayu-dark.d.ts} +2 -2
  1596. package/dist/src/ui/themes/{ayu.js → builtin/dark/ayu-dark.js} +4 -4
  1597. package/dist/src/ui/themes/builtin/dark/ayu-dark.js.map +1 -0
  1598. package/dist/src/ui/themes/{default.d.ts → builtin/dark/default-dark.d.ts} +2 -2
  1599. package/dist/src/ui/themes/{default.js → builtin/dark/default-dark.js} +3 -3
  1600. package/dist/src/ui/themes/builtin/dark/default-dark.js.map +1 -0
  1601. package/dist/src/ui/themes/{dracula.d.ts → builtin/dark/dracula-dark.d.ts} +2 -2
  1602. package/dist/src/ui/themes/{dracula.js → builtin/dark/dracula-dark.js} +4 -4
  1603. package/dist/src/ui/themes/builtin/dark/dracula-dark.js.map +1 -0
  1604. package/dist/src/ui/themes/{github-dark.d.ts → builtin/dark/github-dark.d.ts} +2 -2
  1605. package/dist/src/ui/themes/{github-dark.js → builtin/dark/github-dark.js} +3 -3
  1606. package/dist/src/ui/themes/builtin/dark/github-dark.js.map +1 -0
  1607. package/dist/src/ui/themes/{holiday.d.ts → builtin/dark/holiday-dark.d.ts} +2 -2
  1608. package/dist/src/ui/themes/{holiday.js → builtin/dark/holiday-dark.js} +5 -4
  1609. package/dist/src/ui/themes/{holiday.js.map → builtin/dark/holiday-dark.js.map} +1 -1
  1610. package/dist/src/ui/themes/{shades-of-purple.d.ts → builtin/dark/shades-of-purple-dark.d.ts} +2 -2
  1611. package/dist/src/ui/themes/{shades-of-purple.js → builtin/dark/shades-of-purple-dark.js} +4 -4
  1612. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js.map +1 -0
  1613. package/dist/src/ui/themes/builtin/dark/solarized-dark.d.ts +7 -0
  1614. package/dist/src/ui/themes/builtin/dark/solarized-dark.js +198 -0
  1615. package/dist/src/ui/themes/builtin/dark/solarized-dark.js.map +1 -0
  1616. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.d.ts +7 -0
  1617. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js +147 -0
  1618. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js.map +1 -0
  1619. package/dist/src/ui/themes/{ansi-light.d.ts → builtin/light/ansi-light.d.ts} +2 -2
  1620. package/dist/src/ui/themes/{ansi-light.js → builtin/light/ansi-light.js} +3 -3
  1621. package/dist/src/ui/themes/builtin/light/ansi-light.js.map +1 -0
  1622. package/dist/src/ui/themes/{ayu-light.d.ts → builtin/light/ayu-light.d.ts} +2 -2
  1623. package/dist/src/ui/themes/{ayu-light.js → builtin/light/ayu-light.js} +3 -3
  1624. package/dist/src/ui/themes/builtin/light/ayu-light.js.map +1 -0
  1625. package/dist/src/ui/themes/{default-light.d.ts → builtin/light/default-light.d.ts} +2 -2
  1626. package/dist/src/ui/themes/{default-light.js → builtin/light/default-light.js} +2 -2
  1627. package/dist/src/ui/themes/builtin/light/default-light.js.map +1 -0
  1628. package/dist/src/ui/themes/{github-light.d.ts → builtin/light/github-light.d.ts} +2 -2
  1629. package/dist/src/ui/themes/{github-light.js → builtin/light/github-light.js} +4 -3
  1630. package/dist/src/ui/themes/builtin/light/github-light.js.map +1 -0
  1631. package/dist/src/ui/themes/{googlecode.d.ts → builtin/light/googlecode-light.d.ts} +2 -2
  1632. package/dist/src/ui/themes/{googlecode.js → builtin/light/googlecode-light.js} +4 -4
  1633. package/dist/src/ui/themes/builtin/light/googlecode-light.js.map +1 -0
  1634. package/dist/src/ui/themes/builtin/light/solarized-light.d.ts +7 -0
  1635. package/dist/src/ui/themes/builtin/light/solarized-light.js +198 -0
  1636. package/dist/src/ui/themes/builtin/light/solarized-light.js.map +1 -0
  1637. package/dist/src/ui/themes/{xcode.d.ts → builtin/light/xcode-light.d.ts} +2 -2
  1638. package/dist/src/ui/themes/{xcode.js → builtin/light/xcode-light.js} +5 -4
  1639. package/dist/src/ui/themes/builtin/light/xcode-light.js.map +1 -0
  1640. package/dist/src/ui/themes/{no-color.d.ts → builtin/no-color.d.ts} +2 -2
  1641. package/dist/src/ui/themes/{no-color.js → builtin/no-color.js} +10 -3
  1642. package/dist/src/ui/themes/builtin/no-color.js.map +1 -0
  1643. package/dist/src/ui/themes/color-utils.d.ts +2 -18
  1644. package/dist/src/ui/themes/color-utils.js +2 -231
  1645. package/dist/src/ui/themes/color-utils.js.map +1 -1
  1646. package/dist/src/ui/themes/semantic-tokens.d.ts +5 -1
  1647. package/dist/src/ui/themes/semantic-tokens.js +12 -4
  1648. package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
  1649. package/dist/src/ui/themes/theme-manager.d.ts +47 -7
  1650. package/dist/src/ui/themes/theme-manager.js +171 -27
  1651. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  1652. package/dist/src/ui/themes/theme-manager.test.js +86 -2
  1653. package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
  1654. package/dist/src/ui/themes/theme.d.ts +25 -0
  1655. package/dist/src/ui/themes/theme.js +178 -36
  1656. package/dist/src/ui/themes/theme.js.map +1 -1
  1657. package/dist/src/ui/themes/theme.test.js +7 -7
  1658. package/dist/src/ui/themes/theme.test.js.map +1 -1
  1659. package/dist/src/ui/types.d.ts +48 -23
  1660. package/dist/src/ui/types.js +31 -1
  1661. package/dist/src/ui/types.js.map +1 -1
  1662. package/dist/src/ui/utils/CodeColorizer.d.ts +10 -2
  1663. package/dist/src/ui/utils/CodeColorizer.js +37 -32
  1664. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  1665. package/dist/src/ui/utils/CodeColorizer.test.js +38 -2
  1666. package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -1
  1667. package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -0
  1668. package/dist/src/ui/utils/ConsolePatcher.js +12 -5
  1669. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  1670. package/dist/src/ui/utils/ConsolePatcher.test.d.ts +6 -0
  1671. package/dist/src/ui/utils/ConsolePatcher.test.js +199 -0
  1672. package/dist/src/ui/utils/ConsolePatcher.test.js.map +1 -0
  1673. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -5
  1674. package/dist/src/ui/utils/InlineMarkdownRenderer.js +7 -103
  1675. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
  1676. package/dist/src/ui/utils/MarkdownDisplay.js +3 -2
  1677. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  1678. package/dist/src/ui/utils/MarkdownDisplay.test.js +51 -35
  1679. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
  1680. package/dist/src/ui/utils/TableRenderer.js +124 -56
  1681. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  1682. package/dist/src/ui/utils/TableRenderer.test.js +344 -6
  1683. package/dist/src/ui/utils/TableRenderer.test.js.map +1 -1
  1684. package/dist/src/ui/utils/borderStyles.d.ts +18 -0
  1685. package/dist/src/ui/utils/borderStyles.js +83 -0
  1686. package/dist/src/ui/utils/borderStyles.js.map +1 -0
  1687. package/dist/src/ui/utils/borderStyles.test.d.ts +6 -0
  1688. package/dist/src/ui/utils/borderStyles.test.js +171 -0
  1689. package/dist/src/ui/utils/borderStyles.test.js.map +1 -0
  1690. package/dist/src/ui/utils/clipboardUtils.d.ts +23 -11
  1691. package/dist/src/ui/utils/clipboardUtils.js +79 -49
  1692. package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
  1693. package/dist/src/ui/utils/clipboardUtils.test.js +168 -120
  1694. package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -1
  1695. package/dist/src/ui/utils/commandUtils.d.ts +8 -3
  1696. package/dist/src/ui/utils/commandUtils.js +20 -8
  1697. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  1698. package/dist/src/ui/utils/commandUtils.test.js +39 -7
  1699. package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
  1700. package/dist/src/ui/utils/computeStats.test.js +8 -0
  1701. package/dist/src/ui/utils/computeStats.test.js.map +1 -1
  1702. package/dist/src/ui/utils/confirmingTool.d.ts +15 -0
  1703. package/dist/src/ui/utils/confirmingTool.js +26 -0
  1704. package/dist/src/ui/utils/confirmingTool.js.map +1 -0
  1705. package/dist/src/ui/utils/contextUsage.d.ts +7 -0
  1706. package/dist/src/ui/utils/contextUsage.js +20 -0
  1707. package/dist/src/ui/utils/contextUsage.js.map +1 -0
  1708. package/dist/src/ui/utils/directoryUtils.js +1 -1
  1709. package/dist/src/ui/utils/directoryUtils.js.map +1 -1
  1710. package/dist/src/ui/utils/displayUtils.d.ts +9 -0
  1711. package/dist/src/ui/utils/displayUtils.js +14 -0
  1712. package/dist/src/ui/utils/displayUtils.js.map +1 -1
  1713. package/dist/src/ui/utils/editorUtils.d.ts +17 -0
  1714. package/dist/src/ui/utils/editorUtils.js +104 -0
  1715. package/dist/src/ui/utils/editorUtils.js.map +1 -0
  1716. package/dist/src/ui/utils/fileUtils.d.ts +10 -0
  1717. package/dist/src/ui/utils/fileUtils.js +17 -0
  1718. package/dist/src/ui/utils/fileUtils.js.map +1 -0
  1719. package/dist/src/ui/utils/formatters.d.ts +1 -1
  1720. package/dist/src/ui/utils/formatters.js +38 -12
  1721. package/dist/src/ui/utils/formatters.js.map +1 -1
  1722. package/dist/src/ui/utils/formatters.test.js +29 -1
  1723. package/dist/src/ui/utils/formatters.test.js.map +1 -1
  1724. package/dist/src/ui/utils/highlight.js +1 -1
  1725. package/dist/src/ui/utils/highlight.js.map +1 -1
  1726. package/dist/src/ui/utils/historyExportUtils.d.ts +2 -2
  1727. package/dist/src/ui/utils/historyExportUtils.js.map +1 -1
  1728. package/dist/src/ui/utils/historyUtils.d.ts +10 -0
  1729. package/dist/src/ui/utils/historyUtils.js +56 -0
  1730. package/dist/src/ui/utils/historyUtils.js.map +1 -0
  1731. package/dist/src/ui/utils/markdownParsingUtils.d.ts +10 -0
  1732. package/dist/src/ui/utils/markdownParsingUtils.js +150 -0
  1733. package/dist/src/ui/utils/markdownParsingUtils.js.map +1 -0
  1734. package/dist/src/ui/utils/markdownParsingUtils.test.d.ts +6 -0
  1735. package/dist/src/ui/utils/markdownParsingUtils.test.js +166 -0
  1736. package/dist/src/ui/utils/markdownParsingUtils.test.js.map +1 -0
  1737. package/dist/src/ui/utils/pendingAttentionNotification.d.ts +12 -0
  1738. package/dist/src/ui/utils/pendingAttentionNotification.js +101 -0
  1739. package/dist/src/ui/utils/pendingAttentionNotification.js.map +1 -0
  1740. package/dist/src/ui/utils/pendingAttentionNotification.test.d.ts +6 -0
  1741. package/dist/src/ui/utils/pendingAttentionNotification.test.js +79 -0
  1742. package/dist/src/ui/utils/pendingAttentionNotification.test.js.map +1 -0
  1743. package/dist/src/ui/utils/shortcutsHelp.d.ts +7 -0
  1744. package/dist/src/ui/utils/shortcutsHelp.js +12 -0
  1745. package/dist/src/ui/utils/shortcutsHelp.js.map +1 -0
  1746. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +14 -1
  1747. package/dist/src/ui/utils/terminalCapabilityManager.js +73 -18
  1748. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
  1749. package/dist/src/ui/utils/terminalCapabilityManager.test.js +126 -0
  1750. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -1
  1751. package/dist/src/ui/utils/terminalSetup.d.ts +24 -0
  1752. package/dist/src/ui/utils/terminalSetup.js +130 -34
  1753. package/dist/src/ui/utils/terminalSetup.js.map +1 -1
  1754. package/dist/src/ui/utils/terminalSetup.test.js +35 -1
  1755. package/dist/src/ui/utils/terminalSetup.test.js.map +1 -1
  1756. package/dist/src/ui/utils/textOutput.test.js +1 -0
  1757. package/dist/src/ui/utils/textOutput.test.js.map +1 -1
  1758. package/dist/src/ui/utils/textUtils.d.ts +4 -0
  1759. package/dist/src/ui/utils/textUtils.js +10 -1
  1760. package/dist/src/ui/utils/textUtils.js.map +1 -1
  1761. package/dist/src/ui/utils/textUtils.test.js +28 -7
  1762. package/dist/src/ui/utils/textUtils.test.js.map +1 -1
  1763. package/dist/src/ui/utils/toolLayoutUtils.d.ts +49 -0
  1764. package/dist/src/ui/utils/toolLayoutUtils.js +80 -0
  1765. package/dist/src/ui/utils/toolLayoutUtils.js.map +1 -0
  1766. package/dist/src/ui/utils/toolLayoutUtils.test.d.ts +6 -0
  1767. package/dist/src/ui/utils/toolLayoutUtils.test.js +187 -0
  1768. package/dist/src/ui/utils/toolLayoutUtils.test.js.map +1 -0
  1769. package/dist/src/ui/utils/ui-sizing.d.ts +2 -2
  1770. package/dist/src/ui/utils/ui-sizing.js +2 -3
  1771. package/dist/src/ui/utils/ui-sizing.js.map +1 -1
  1772. package/dist/src/ui/utils/ui-sizing.test.js +6 -19
  1773. package/dist/src/ui/utils/ui-sizing.test.js.map +1 -1
  1774. package/dist/src/ui/utils/updateCheck.d.ts +1 -0
  1775. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  1776. package/dist/src/ui/utils/urlSecurityUtils.d.ts +32 -0
  1777. package/dist/src/ui/utils/urlSecurityUtils.js +71 -0
  1778. package/dist/src/ui/utils/urlSecurityUtils.js.map +1 -0
  1779. package/dist/src/ui/utils/urlSecurityUtils.test.d.ts +6 -0
  1780. package/dist/src/ui/utils/urlSecurityUtils.test.js +49 -0
  1781. package/dist/src/ui/utils/urlSecurityUtils.test.js.map +1 -0
  1782. package/dist/src/utils/activityLogger.js +113 -24
  1783. package/dist/src/utils/activityLogger.js.map +1 -1
  1784. package/dist/src/utils/agentSettings.d.ts +7 -14
  1785. package/dist/src/utils/agentSettings.js +27 -84
  1786. package/dist/src/utils/agentSettings.js.map +1 -1
  1787. package/dist/src/utils/agentSettings.test.d.ts +6 -0
  1788. package/dist/src/utils/agentSettings.test.js +111 -0
  1789. package/dist/src/utils/agentSettings.test.js.map +1 -0
  1790. package/dist/src/utils/cleanup.d.ts +2 -0
  1791. package/dist/src/utils/cleanup.js +63 -6
  1792. package/dist/src/utils/cleanup.js.map +1 -1
  1793. package/dist/src/utils/cleanup.test.js +165 -2
  1794. package/dist/src/utils/cleanup.test.js.map +1 -1
  1795. package/dist/src/utils/commands.js +15 -0
  1796. package/dist/src/utils/commands.js.map +1 -1
  1797. package/dist/src/utils/commands.test.js +80 -1
  1798. package/dist/src/utils/commands.test.js.map +1 -1
  1799. package/dist/src/utils/deepMerge.js +1 -1
  1800. package/dist/src/utils/deepMerge.js.map +1 -1
  1801. package/dist/src/utils/deepMerge.test.js +13 -3
  1802. package/dist/src/utils/deepMerge.test.js.map +1 -1
  1803. package/dist/src/utils/devtoolsService.d.ts +11 -1
  1804. package/dist/src/utils/devtoolsService.js +36 -2
  1805. package/dist/src/utils/devtoolsService.js.map +1 -1
  1806. package/dist/src/utils/devtoolsService.test.js +74 -2
  1807. package/dist/src/utils/devtoolsService.test.js.map +1 -1
  1808. package/dist/src/utils/dialogScopeUtils.d.ts +6 -2
  1809. package/dist/src/utils/dialogScopeUtils.js +4 -4
  1810. package/dist/src/utils/dialogScopeUtils.js.map +1 -1
  1811. package/dist/src/utils/dialogScopeUtils.test.js +5 -5
  1812. package/dist/src/utils/dialogScopeUtils.test.js.map +1 -1
  1813. package/dist/src/utils/envVarResolver.d.ts +5 -2
  1814. package/dist/src/utils/envVarResolver.js +18 -6
  1815. package/dist/src/utils/envVarResolver.js.map +1 -1
  1816. package/dist/src/utils/envVarResolver.test.js +41 -24
  1817. package/dist/src/utils/envVarResolver.test.js.map +1 -1
  1818. package/dist/src/utils/errors.d.ts +0 -1
  1819. package/dist/src/utils/errors.js +4 -10
  1820. package/dist/src/utils/errors.js.map +1 -1
  1821. package/dist/src/utils/errors.test.js +2 -17
  1822. package/dist/src/utils/errors.test.js.map +1 -1
  1823. package/dist/src/utils/events.d.ts +3 -1
  1824. package/dist/src/utils/events.js +1 -0
  1825. package/dist/src/utils/events.js.map +1 -1
  1826. package/dist/src/utils/featureToggleUtils.d.ts +55 -0
  1827. package/dist/src/utils/featureToggleUtils.js +95 -0
  1828. package/dist/src/utils/featureToggleUtils.js.map +1 -0
  1829. package/dist/src/utils/featureToggleUtils.test.d.ts +6 -0
  1830. package/dist/src/utils/featureToggleUtils.test.js +126 -0
  1831. package/dist/src/utils/featureToggleUtils.test.js.map +1 -0
  1832. package/dist/src/utils/gitUtils.js +6 -4
  1833. package/dist/src/utils/gitUtils.js.map +1 -1
  1834. package/dist/src/utils/handleAutoUpdate.d.ts +8 -1
  1835. package/dist/src/utils/handleAutoUpdate.js +56 -3
  1836. package/dist/src/utils/handleAutoUpdate.js.map +1 -1
  1837. package/dist/src/utils/handleAutoUpdate.test.js +67 -5
  1838. package/dist/src/utils/handleAutoUpdate.test.js.map +1 -1
  1839. package/dist/src/utils/installationInfo.d.ts +1 -0
  1840. package/dist/src/utils/installationInfo.js +10 -1
  1841. package/dist/src/utils/installationInfo.js.map +1 -1
  1842. package/dist/src/utils/installationInfo.test.js +10 -0
  1843. package/dist/src/utils/installationInfo.test.js.map +1 -1
  1844. package/dist/src/utils/jsonoutput.js +3 -1
  1845. package/dist/src/utils/jsonoutput.js.map +1 -1
  1846. package/dist/src/utils/logCleanup.d.ts +12 -0
  1847. package/dist/src/utils/logCleanup.js +58 -0
  1848. package/dist/src/utils/logCleanup.js.map +1 -0
  1849. package/dist/src/utils/logCleanup.test.d.ts +6 -0
  1850. package/dist/src/utils/logCleanup.test.js +87 -0
  1851. package/dist/src/utils/logCleanup.test.js.map +1 -0
  1852. package/dist/src/utils/persistentState.d.ts +3 -0
  1853. package/dist/src/utils/persistentState.js +1 -0
  1854. package/dist/src/utils/persistentState.js.map +1 -1
  1855. package/dist/src/utils/processUtils.d.ts +2 -3
  1856. package/dist/src/utils/processUtils.js +10 -0
  1857. package/dist/src/utils/processUtils.js.map +1 -1
  1858. package/dist/src/utils/processUtils.test.js +11 -2
  1859. package/dist/src/utils/processUtils.test.js.map +1 -1
  1860. package/dist/src/utils/readStdin.js +1 -0
  1861. package/dist/src/utils/readStdin.js.map +1 -1
  1862. package/dist/src/utils/relaunch.test.js.map +1 -1
  1863. package/dist/src/utils/{sandbox-macos-restrictive-closed.sb → sandbox-macos-strict-open.sb} +41 -3
  1864. package/dist/src/utils/sandbox-macos-strict-proxied.sb +133 -0
  1865. package/dist/src/utils/sandbox.js +277 -20
  1866. package/dist/src/utils/sandbox.js.map +1 -1
  1867. package/dist/src/utils/sandbox.test.js +198 -17
  1868. package/dist/src/utils/sandbox.test.js.map +1 -1
  1869. package/dist/src/utils/sandboxUtils.js +3 -3
  1870. package/dist/src/utils/sandboxUtils.js.map +1 -1
  1871. package/dist/src/utils/sessionCleanup.d.ts +6 -1
  1872. package/dist/src/utils/sessionCleanup.integration.test.js +94 -0
  1873. package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -1
  1874. package/dist/src/utils/sessionCleanup.js +107 -38
  1875. package/dist/src/utils/sessionCleanup.js.map +1 -1
  1876. package/dist/src/utils/sessionCleanup.test.js +545 -1089
  1877. package/dist/src/utils/sessionCleanup.test.js.map +1 -1
  1878. package/dist/src/utils/sessionUtils.d.ts +2 -7
  1879. package/dist/src/utils/sessionUtils.js +39 -115
  1880. package/dist/src/utils/sessionUtils.js.map +1 -1
  1881. package/dist/src/utils/sessionUtils.test.js +269 -3
  1882. package/dist/src/utils/sessionUtils.test.js.map +1 -1
  1883. package/dist/src/utils/sessions.js +1 -1
  1884. package/dist/src/utils/sessions.js.map +1 -1
  1885. package/dist/src/utils/sessions.test.js +3 -1
  1886. package/dist/src/utils/sessions.test.js.map +1 -1
  1887. package/dist/src/utils/settingsUtils.d.ts +20 -93
  1888. package/dist/src/utils/settingsUtils.js +135 -207
  1889. package/dist/src/utils/settingsUtils.js.map +1 -1
  1890. package/dist/src/utils/settingsUtils.test.js +129 -264
  1891. package/dist/src/utils/settingsUtils.test.js.map +1 -1
  1892. package/dist/src/utils/skillSettings.d.ts +4 -14
  1893. package/dist/src/utils/skillSettings.js +32 -81
  1894. package/dist/src/utils/skillSettings.js.map +1 -1
  1895. package/dist/src/utils/skillSettings.test.d.ts +6 -0
  1896. package/dist/src/utils/skillSettings.test.js +142 -0
  1897. package/dist/src/utils/skillSettings.test.js.map +1 -0
  1898. package/dist/src/utils/skillUtils.js +24 -7
  1899. package/dist/src/utils/skillUtils.js.map +1 -1
  1900. package/dist/src/utils/skillUtils.test.js +52 -4
  1901. package/dist/src/utils/skillUtils.test.js.map +1 -1
  1902. package/dist/src/utils/terminalNotifications.d.ts +25 -0
  1903. package/dist/src/utils/terminalNotifications.js +75 -0
  1904. package/dist/src/utils/terminalNotifications.js.map +1 -0
  1905. package/dist/src/utils/terminalNotifications.test.d.ts +6 -0
  1906. package/dist/src/utils/terminalNotifications.test.js +125 -0
  1907. package/dist/src/utils/terminalNotifications.test.js.map +1 -0
  1908. package/dist/src/utils/terminalTheme.js +3 -4
  1909. package/dist/src/utils/terminalTheme.js.map +1 -1
  1910. package/dist/src/utils/tierUtils.d.ts +12 -0
  1911. package/dist/src/utils/tierUtils.js +15 -0
  1912. package/dist/src/utils/tierUtils.js.map +1 -0
  1913. package/dist/src/utils/tierUtils.test.d.ts +6 -0
  1914. package/dist/src/utils/tierUtils.test.js +25 -0
  1915. package/dist/src/utils/tierUtils.test.js.map +1 -0
  1916. package/dist/src/utils/userStartupWarnings.d.ts +4 -1
  1917. package/dist/src/utils/userStartupWarnings.js +24 -6
  1918. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  1919. package/dist/src/utils/userStartupWarnings.test.js +53 -11
  1920. package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
  1921. package/dist/src/utils/worktreeSetup.d.ts +14 -0
  1922. package/dist/src/utils/worktreeSetup.js +32 -0
  1923. package/dist/src/utils/worktreeSetup.js.map +1 -0
  1924. package/dist/src/utils/worktreeSetup.test.d.ts +6 -0
  1925. package/dist/src/utils/worktreeSetup.test.js +89 -0
  1926. package/dist/src/utils/worktreeSetup.test.js.map +1 -0
  1927. package/dist/src/validateNonInterActiveAuth.d.ts +1 -2
  1928. package/dist/src/validateNonInterActiveAuth.js +1 -14
  1929. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  1930. package/dist/tsconfig.tsbuildinfo +1 -1
  1931. package/package.json +9 -8
  1932. package/dist/src/config/keyBindings.js +0 -460
  1933. package/dist/src/config/keyBindings.js.map +0 -1
  1934. package/dist/src/config/keyBindings.test.js +0 -108
  1935. package/dist/src/config/keyBindings.test.js.map +0 -1
  1936. package/dist/src/ui/commands/shellsCommand.js.map +0 -1
  1937. package/dist/src/ui/commands/shellsCommand.test.js +0 -29
  1938. package/dist/src/ui/commands/shellsCommand.test.js.map +0 -1
  1939. package/dist/src/ui/components/BackgroundShellDisplay.d.ts +0 -16
  1940. package/dist/src/ui/components/BackgroundShellDisplay.js.map +0 -1
  1941. package/dist/src/ui/components/BackgroundShellDisplay.test.js.map +0 -1
  1942. package/dist/src/ui/components/ShortcutsHint.d.ts +0 -7
  1943. package/dist/src/ui/components/ShortcutsHint.js +0 -12
  1944. package/dist/src/ui/components/ShortcutsHint.js.map +0 -1
  1945. package/dist/src/ui/components/messages/ToolConfirmationMessageOverflow.test.js +0 -93
  1946. package/dist/src/ui/components/messages/ToolConfirmationMessageOverflow.test.js.map +0 -1
  1947. package/dist/src/ui/components/views/HooksList.d.ts +0 -24
  1948. package/dist/src/ui/components/views/HooksList.js +0 -28
  1949. package/dist/src/ui/components/views/HooksList.js.map +0 -1
  1950. package/dist/src/ui/hooks/keyToAnsi.js +0 -67
  1951. package/dist/src/ui/hooks/keyToAnsi.js.map +0 -1
  1952. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -28
  1953. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  1954. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
  1955. package/dist/src/ui/hooks/useBackgroundShellManager.d.ts +0 -22
  1956. package/dist/src/ui/hooks/useBackgroundShellManager.js +0 -58
  1957. package/dist/src/ui/hooks/useBackgroundShellManager.js.map +0 -1
  1958. package/dist/src/ui/hooks/useBackgroundShellManager.test.js +0 -168
  1959. package/dist/src/ui/hooks/useBackgroundShellManager.test.js.map +0 -1
  1960. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -42
  1961. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -106
  1962. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  1963. package/dist/src/ui/hooks/useReactToolScheduler.test.js +0 -58
  1964. package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +0 -1
  1965. package/dist/src/ui/hooks/useToolExecutionScheduler.d.ts +0 -30
  1966. package/dist/src/ui/hooks/useToolExecutionScheduler.js +0 -149
  1967. package/dist/src/ui/hooks/useToolExecutionScheduler.js.map +0 -1
  1968. package/dist/src/ui/hooks/useToolExecutionScheduler.test.js +0 -376
  1969. package/dist/src/ui/hooks/useToolExecutionScheduler.test.js.map +0 -1
  1970. package/dist/src/ui/keyMatchers.js +0 -46
  1971. package/dist/src/ui/keyMatchers.js.map +0 -1
  1972. package/dist/src/ui/keyMatchers.test.js.map +0 -1
  1973. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  1974. package/dist/src/ui/themes/ansi.js.map +0 -1
  1975. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  1976. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  1977. package/dist/src/ui/themes/ayu.js.map +0 -1
  1978. package/dist/src/ui/themes/default-light.js.map +0 -1
  1979. package/dist/src/ui/themes/default.js.map +0 -1
  1980. package/dist/src/ui/themes/dracula.js.map +0 -1
  1981. package/dist/src/ui/themes/github-dark.js.map +0 -1
  1982. package/dist/src/ui/themes/github-light.js.map +0 -1
  1983. package/dist/src/ui/themes/googlecode.js.map +0 -1
  1984. package/dist/src/ui/themes/no-color.js.map +0 -1
  1985. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  1986. package/dist/src/ui/themes/xcode.js.map +0 -1
  1987. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +0 -21
  1988. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +0 -1
  1989. package/dist/src/ui/utils/keybindingUtils.js +0 -54
  1990. package/dist/src/ui/utils/keybindingUtils.js.map +0 -1
  1991. package/dist/src/ui/utils/keybindingUtils.test.js +0 -44
  1992. package/dist/src/ui/utils/keybindingUtils.test.js.map +0 -1
  1993. package/dist/src/utils/sandbox-macos-permissive-closed.sb +0 -32
  1994. package/dist/src/zed-integration/acpErrors.js.map +0 -1
  1995. package/dist/src/zed-integration/acpErrors.test.js.map +0 -1
  1996. package/dist/src/zed-integration/acpResume.test.js.map +0 -1
  1997. package/dist/src/zed-integration/fileSystemService.js +0 -41
  1998. package/dist/src/zed-integration/fileSystemService.js.map +0 -1
  1999. package/dist/src/zed-integration/fileSystemService.test.js +0 -88
  2000. package/dist/src/zed-integration/fileSystemService.test.js.map +0 -1
  2001. package/dist/src/zed-integration/zedIntegration.d.ts +0 -42
  2002. package/dist/src/zed-integration/zedIntegration.js.map +0 -1
  2003. package/dist/src/zed-integration/zedIntegration.test.js +0 -664
  2004. package/dist/src/zed-integration/zedIntegration.test.js.map +0 -1
  2005. /package/dist/src/{config/keyBindings.test.d.ts → acp/acpClient.test.d.ts} +0 -0
  2006. /package/dist/src/{zed-integration → acp}/acpErrors.d.ts +0 -0
  2007. /package/dist/src/{zed-integration → acp}/acpErrors.test.d.ts +0 -0
  2008. /package/dist/src/{zed-integration → acp}/acpErrors.test.js +0 -0
  2009. /package/dist/src/{zed-integration → acp}/acpResume.test.d.ts +0 -0
  2010. /package/dist/src/{ui/components/messages/ToolConfirmationMessageOverflow.test.d.ts → acp/commandHandler.test.d.ts} +0 -0
  2011. /package/dist/src/{ui/hooks/useToolExecutionScheduler.test.d.ts → acp/commands/help.test.d.ts} +0 -0
  2012. /package/dist/src/{zed-integration → acp}/fileSystemService.test.d.ts +0 -0
  2013. /package/dist/src/{ui/commands/shellsCommand.test.d.ts → config/extension-manager.test.d.ts} +0 -0
  2014. /package/dist/src/{ui/components/BackgroundShellDisplay.test.d.ts → config/policy.test.d.ts} +0 -0
  2015. /package/dist/src/{ui/hooks/shellCommandProcessor.test.d.ts → config/workspace-policy-cli.test.d.ts} +0 -0
  2016. /package/dist/src/{ui/hooks/useBackgroundShellManager.test.d.ts → nonInteractiveCliAgentSession.test.d.ts} +0 -0
  2017. /package/dist/src/ui/{hooks/useReactToolScheduler.test.d.ts → commands/resumeCommand.test.d.ts} +0 -0
  2018. /package/dist/src/ui/{keyMatchers.test.d.ts → commands/tasksCommand.test.d.ts} +0 -0
  2019. /package/dist/src/ui/{utils/InlineMarkdownRenderer.test.d.ts → components/BackgroundTaskDisplay.test.d.ts} +0 -0
  2020. /package/dist/src/ui/{utils/keybindingUtils.test.d.ts → components/messages/SubagentProgressDisplay.test.d.ts} +0 -0
  2021. /package/dist/src/{zed-integration/zedIntegration.test.d.ts → ui/components/shared/SearchableList.test.d.ts} +0 -0
  2022. /package/dist/src/ui/{hooks → key}/keyToAnsi.d.ts +0 -0
@@ -12,6 +12,7 @@ import * as os from 'node:os';
12
12
  import { renderHook, renderHookWithProviders, } from '../../../test-utils/render.js';
13
13
  import { useTextBuffer, offsetToLogicalPos, logicalPosToOffset, textBufferReducer, findWordEndInLine, findNextWordStartInLine, findNextBigWordStartInLine, findPrevBigWordStartInLine, findBigWordEndInLine, isWordCharStrict, calculateTransformationsForLine, calculateTransformedLine, getTransformUnderCursor, getTransformedImagePath, } from './text-buffer.js';
14
14
  import { cpLen } from '../../utils/textUtils.js';
15
+ import { escapePath } from '@google/gemini-cli-core';
15
16
  const defaultVisualLayout = {
16
17
  visualLines: [''],
17
18
  logicalToVisualMap: [[[0, 0]]],
@@ -34,6 +35,7 @@ const initialState = {
34
35
  visualLayout: defaultVisualLayout,
35
36
  pastedContent: {},
36
37
  expandedPaste: null,
38
+ yankRegister: null,
37
39
  };
38
40
  /**
39
41
  * Helper to create a TextBufferState with properly calculated transformations.
@@ -49,7 +51,7 @@ describe('textBufferReducer', () => {
49
51
  afterEach(() => {
50
52
  vi.restoreAllMocks();
51
53
  });
52
- it('should return the initial state if state is undefined', () => {
54
+ it('should return the initial state if state is undefined', async () => {
53
55
  const action = { type: 'unknown_action' };
54
56
  const state = textBufferReducer(initialState, action);
55
57
  expect(state).toHaveOnlyValidCharacters();
@@ -57,7 +59,7 @@ describe('textBufferReducer', () => {
57
59
  });
58
60
  describe('Big Word Navigation Helpers', () => {
59
61
  describe('findNextBigWordStartInLine (W)', () => {
60
- it('should skip non-whitespace and then whitespace', () => {
62
+ it('should skip non-whitespace and then whitespace', async () => {
61
63
  expect(findNextBigWordStartInLine('hello world', 0)).toBe(6);
62
64
  expect(findNextBigWordStartInLine('hello.world test', 0)).toBe(12);
63
65
  expect(findNextBigWordStartInLine(' test', 0)).toBe(3);
@@ -65,7 +67,7 @@ describe('textBufferReducer', () => {
65
67
  });
66
68
  });
67
69
  describe('findPrevBigWordStartInLine (B)', () => {
68
- it('should skip whitespace backwards then non-whitespace', () => {
70
+ it('should skip whitespace backwards then non-whitespace', async () => {
69
71
  expect(findPrevBigWordStartInLine('hello world', 6)).toBe(0);
70
72
  expect(findPrevBigWordStartInLine('hello.world test', 12)).toBe(0);
71
73
  expect(findPrevBigWordStartInLine(' test', 3)).toBe(null); // At start of word
@@ -74,21 +76,21 @@ describe('textBufferReducer', () => {
74
76
  });
75
77
  });
76
78
  describe('findBigWordEndInLine (E)', () => {
77
- it('should find end of current big word', () => {
79
+ it('should find end of current big word', async () => {
78
80
  expect(findBigWordEndInLine('hello world', 0)).toBe(4);
79
81
  expect(findBigWordEndInLine('hello.world test', 0)).toBe(10);
80
82
  expect(findBigWordEndInLine('hello.world test', 11)).toBe(15);
81
83
  });
82
- it('should skip whitespace if currently on whitespace', () => {
84
+ it('should skip whitespace if currently on whitespace', async () => {
83
85
  expect(findBigWordEndInLine('hello world', 5)).toBe(12);
84
86
  });
85
- it('should find next big word end if at end of current', () => {
87
+ it('should find next big word end if at end of current', async () => {
86
88
  expect(findBigWordEndInLine('hello world', 4)).toBe(10);
87
89
  });
88
90
  });
89
91
  });
90
92
  describe('set_text action', () => {
91
- it('should set new text and move cursor to the end', () => {
93
+ it('should set new text and move cursor to the end', async () => {
92
94
  const action = {
93
95
  type: 'set_text',
94
96
  payload: 'hello\nworld',
@@ -100,7 +102,7 @@ describe('textBufferReducer', () => {
100
102
  expect(state.cursorCol).toBe(5);
101
103
  expect(state.undoStack.length).toBe(1);
102
104
  });
103
- it('should not create an undo snapshot if pushToUndo is false', () => {
105
+ it('should not create an undo snapshot if pushToUndo is false', async () => {
104
106
  const action = {
105
107
  type: 'set_text',
106
108
  payload: 'no undo',
@@ -113,14 +115,14 @@ describe('textBufferReducer', () => {
113
115
  });
114
116
  });
115
117
  describe('insert action', () => {
116
- it('should insert a character', () => {
118
+ it('should insert a character', async () => {
117
119
  const action = { type: 'insert', payload: 'a' };
118
120
  const state = textBufferReducer(initialState, action);
119
121
  expect(state).toHaveOnlyValidCharacters();
120
122
  expect(state.lines).toEqual(['a']);
121
123
  expect(state.cursorCol).toBe(1);
122
124
  });
123
- it('should insert a newline', () => {
125
+ it('should insert a newline', async () => {
124
126
  const stateWithText = { ...initialState, lines: ['hello'] };
125
127
  const action = { type: 'insert', payload: '\n' };
126
128
  const state = textBufferReducer(stateWithText, action);
@@ -131,7 +133,7 @@ describe('textBufferReducer', () => {
131
133
  });
132
134
  });
133
135
  describe('insert action with options', () => {
134
- it('should filter input using inputFilter option', () => {
136
+ it('should filter input using inputFilter option', async () => {
135
137
  const action = { type: 'insert', payload: 'a1b2c3' };
136
138
  const options = {
137
139
  inputFilter: (text) => text.replace(/[0-9]/g, ''),
@@ -140,7 +142,7 @@ describe('textBufferReducer', () => {
140
142
  expect(state.lines).toEqual(['abc']);
141
143
  expect(state.cursorCol).toBe(3);
142
144
  });
143
- it('should strip newlines when singleLine option is true', () => {
145
+ it('should strip newlines when singleLine option is true', async () => {
144
146
  const action = {
145
147
  type: 'insert',
146
148
  payload: 'hello\nworld',
@@ -150,7 +152,7 @@ describe('textBufferReducer', () => {
150
152
  expect(state.lines).toEqual(['helloworld']);
151
153
  expect(state.cursorCol).toBe(10);
152
154
  });
153
- it('should apply both inputFilter and singleLine options', () => {
155
+ it('should apply both inputFilter and singleLine options', async () => {
154
156
  const action = {
155
157
  type: 'insert',
156
158
  payload: 'h\ne\nl\nl\no\n1\n2\n3',
@@ -165,7 +167,7 @@ describe('textBufferReducer', () => {
165
167
  });
166
168
  });
167
169
  describe('add_pasted_content action', () => {
168
- it('should add content to pastedContent Record', () => {
170
+ it('should add content to pastedContent Record', async () => {
169
171
  const action = {
170
172
  type: 'add_pasted_content',
171
173
  payload: { id: '[Pasted Text: 6 lines]', text: 'large content' },
@@ -177,7 +179,7 @@ describe('textBufferReducer', () => {
177
179
  });
178
180
  });
179
181
  describe('backspace action', () => {
180
- it('should remove a character', () => {
182
+ it('should remove a character', async () => {
181
183
  const stateWithText = {
182
184
  ...initialState,
183
185
  lines: ['a'],
@@ -190,7 +192,7 @@ describe('textBufferReducer', () => {
190
192
  expect(state.lines).toEqual(['']);
191
193
  expect(state.cursorCol).toBe(0);
192
194
  });
193
- it('should join lines if at the beginning of a line', () => {
195
+ it('should join lines if at the beginning of a line', async () => {
194
196
  const stateWithText = {
195
197
  ...initialState,
196
198
  lines: ['hello', 'world'],
@@ -207,7 +209,7 @@ describe('textBufferReducer', () => {
207
209
  });
208
210
  describe('atomic placeholder deletion', () => {
209
211
  describe('paste placeholders', () => {
210
- it('backspace at end of paste placeholder removes entire placeholder', () => {
212
+ it('backspace at end of paste placeholder removes entire placeholder', async () => {
211
213
  const placeholder = '[Pasted Text: 6 lines]';
212
214
  const stateWithPlaceholder = createStateWithTransformations({
213
215
  lines: [placeholder],
@@ -225,7 +227,7 @@ describe('textBufferReducer', () => {
225
227
  // pastedContent should be cleaned up
226
228
  expect(state.pastedContent[placeholder]).toBeUndefined();
227
229
  });
228
- it('delete at start of paste placeholder removes entire placeholder', () => {
230
+ it('delete at start of paste placeholder removes entire placeholder', async () => {
229
231
  const placeholder = '[Pasted Text: 6 lines]';
230
232
  const stateWithPlaceholder = createStateWithTransformations({
231
233
  lines: [placeholder],
@@ -243,7 +245,7 @@ describe('textBufferReducer', () => {
243
245
  // pastedContent should be cleaned up
244
246
  expect(state.pastedContent[placeholder]).toBeUndefined();
245
247
  });
246
- it('backspace inside paste placeholder does normal deletion', () => {
248
+ it('backspace inside paste placeholder does normal deletion', async () => {
247
249
  const placeholder = '[Pasted Text: 6 lines]';
248
250
  const stateWithPlaceholder = createStateWithTransformations({
249
251
  lines: [placeholder],
@@ -264,7 +266,7 @@ describe('textBufferReducer', () => {
264
266
  });
265
267
  });
266
268
  describe('image placeholders', () => {
267
- it('backspace at end of image path removes entire path', () => {
269
+ it('backspace at end of image path removes entire path', async () => {
268
270
  const imagePath = '@test.png';
269
271
  const stateWithImage = createStateWithTransformations({
270
272
  lines: [imagePath],
@@ -277,7 +279,7 @@ describe('textBufferReducer', () => {
277
279
  expect(state.lines).toEqual(['']);
278
280
  expect(state.cursorCol).toBe(0);
279
281
  });
280
- it('delete at start of image path removes entire path', () => {
282
+ it('delete at start of image path removes entire path', async () => {
281
283
  const imagePath = '@test.png';
282
284
  const stateWithImage = createStateWithTransformations({
283
285
  lines: [imagePath],
@@ -290,7 +292,7 @@ describe('textBufferReducer', () => {
290
292
  expect(state.lines).toEqual(['']);
291
293
  expect(state.cursorCol).toBe(0);
292
294
  });
293
- it('backspace inside image path does normal deletion', () => {
295
+ it('backspace inside image path does normal deletion', async () => {
294
296
  const imagePath = '@test.png';
295
297
  const stateWithImage = createStateWithTransformations({
296
298
  lines: [imagePath],
@@ -306,7 +308,7 @@ describe('textBufferReducer', () => {
306
308
  });
307
309
  });
308
310
  describe('undo behavior', () => {
309
- it('undo after placeholder deletion restores everything', () => {
311
+ it('undo after placeholder deletion restores everything', async () => {
310
312
  const placeholder = '[Pasted Text: 6 lines]';
311
313
  const pasteContent = 'line1\nline2\nline3\nline4\nline5\nline6';
312
314
  const stateWithPlaceholder = createStateWithTransformations({
@@ -330,7 +332,7 @@ describe('textBufferReducer', () => {
330
332
  });
331
333
  });
332
334
  describe('undo/redo actions', () => {
333
- it('should undo and redo a change', () => {
335
+ it('should undo and redo a change', async () => {
334
336
  // 1. Insert text
335
337
  const insertAction = {
336
338
  type: 'insert',
@@ -357,7 +359,7 @@ describe('textBufferReducer', () => {
357
359
  });
358
360
  });
359
361
  describe('create_undo_snapshot action', () => {
360
- it('should create a snapshot without changing state', () => {
362
+ it('should create a snapshot without changing state', async () => {
361
363
  const stateWithText = {
362
364
  ...initialState,
363
365
  lines: ['hello'],
@@ -410,7 +412,7 @@ describe('textBufferReducer', () => {
410
412
  expect(state.lines).toEqual(expectedLines);
411
413
  expect(state.cursorCol).toBe(expectedCol);
412
414
  });
413
- it('should act like backspace at the beginning of a line', () => {
415
+ it('should act like backspace at the beginning of a line', async () => {
414
416
  const stateWithText = {
415
417
  ...initialState,
416
418
  lines: ['hello', 'world'],
@@ -452,7 +454,7 @@ describe('textBufferReducer', () => {
452
454
  expect(state.lines).toEqual(expectedLines);
453
455
  expect(state.cursorCol).toBe(expectedCol);
454
456
  });
455
- it('should delete path segments progressively', () => {
457
+ it('should delete path segments progressively', async () => {
456
458
  const stateWithText = {
457
459
  ...initialState,
458
460
  lines: ['path/to/file'],
@@ -466,7 +468,7 @@ describe('textBufferReducer', () => {
466
468
  state = textBufferReducer(state, { type: 'delete_word_right' });
467
469
  expect(state.lines).toEqual(['to/file']);
468
470
  });
469
- it('should act like delete at the end of a line', () => {
471
+ it('should act like delete at the end of a line', async () => {
470
472
  const stateWithText = {
471
473
  ...initialState,
472
474
  lines: ['hello', 'world'],
@@ -481,10 +483,45 @@ describe('textBufferReducer', () => {
481
483
  expect(state.cursorCol).toBe(5);
482
484
  });
483
485
  });
486
+ describe('kill_line_left action', () => {
487
+ it('should clean up pastedContent when deleting a placeholder line-left', async () => {
488
+ const placeholder = '[Pasted Text: 6 lines]';
489
+ const stateWithPlaceholder = createStateWithTransformations({
490
+ lines: [placeholder],
491
+ cursorRow: 0,
492
+ cursorCol: cpLen(placeholder),
493
+ pastedContent: {
494
+ [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
495
+ },
496
+ });
497
+ const state = textBufferReducer(stateWithPlaceholder, {
498
+ type: 'kill_line_left',
499
+ });
500
+ expect(state.lines).toEqual(['']);
501
+ expect(state.cursorCol).toBe(0);
502
+ expect(Object.keys(state.pastedContent)).toHaveLength(0);
503
+ });
504
+ });
505
+ describe('kill_line_right action', () => {
506
+ it('should reset preferredCol when deleting to end of line', async () => {
507
+ const stateWithText = {
508
+ ...initialState,
509
+ lines: ['hello world'],
510
+ cursorRow: 0,
511
+ cursorCol: 5,
512
+ preferredCol: 9,
513
+ };
514
+ const state = textBufferReducer(stateWithText, {
515
+ type: 'kill_line_right',
516
+ });
517
+ expect(state.lines).toEqual(['hello']);
518
+ expect(state.preferredCol).toBe(null);
519
+ });
520
+ });
484
521
  describe('toggle_paste_expansion action', () => {
485
522
  const placeholder = '[Pasted Text: 6 lines]';
486
523
  const content = 'line1\nline2\nline3\nline4\nline5\nline6';
487
- it('should expand a placeholder correctly', () => {
524
+ it('should expand a placeholder correctly', async () => {
488
525
  const stateWithPlaceholder = createStateWithTransformations({
489
526
  lines: ['prefix ' + placeholder + ' suffix'],
490
527
  cursorRow: 0,
@@ -517,7 +554,7 @@ describe('textBufferReducer', () => {
517
554
  expect(state.cursorRow).toBe(5);
518
555
  expect(state.cursorCol).toBe(5); // length of 'line6'
519
556
  });
520
- it('should collapse an expanded placeholder correctly', () => {
557
+ it('should collapse an expanded placeholder correctly', async () => {
521
558
  const expandedState = createStateWithTransformations({
522
559
  lines: [
523
560
  'prefix line1',
@@ -549,7 +586,7 @@ describe('textBufferReducer', () => {
549
586
  expect(state.cursorRow).toBe(0);
550
587
  expect(state.cursorCol).toBe(('prefix ' + placeholder).length);
551
588
  });
552
- it('should expand single-line content correctly', () => {
589
+ it('should expand single-line content correctly', async () => {
553
590
  const singleLinePlaceholder = '[Pasted Text: 10 chars]';
554
591
  const singleLineContent = 'some text';
555
592
  const stateWithPlaceholder = createStateWithTransformations({
@@ -566,7 +603,7 @@ describe('textBufferReducer', () => {
566
603
  expect(state.cursorRow).toBe(0);
567
604
  expect(state.cursorCol).toBe(9);
568
605
  });
569
- it('should return current state if placeholder ID not found in pastedContent', () => {
606
+ it('should return current state if placeholder ID not found in pastedContent', async () => {
570
607
  const action = {
571
608
  type: 'toggle_paste_expansion',
572
609
  payload: { id: 'unknown', row: 0, col: 0 },
@@ -574,7 +611,7 @@ describe('textBufferReducer', () => {
574
611
  const state = textBufferReducer(initialState, action);
575
612
  expect(state).toBe(initialState);
576
613
  });
577
- it('should preserve expandedPaste when lines change from edits outside the region', () => {
614
+ it('should preserve expandedPaste when lines change from edits outside the region', async () => {
578
615
  // Start with an expanded paste at line 0 (3 lines long)
579
616
  const placeholder = '[Pasted Text: 3 lines]';
580
617
  const expandedState = createStateWithTransformations({
@@ -624,8 +661,8 @@ describe('useTextBuffer', () => {
624
661
  vi.restoreAllMocks();
625
662
  });
626
663
  describe('Initialization', () => {
627
- it('should initialize with empty text and cursor at (0,0) by default', () => {
628
- const { result } = renderHook(() => useTextBuffer({ viewport }));
664
+ it('should initialize with empty text and cursor at (0,0) by default', async () => {
665
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
629
666
  const state = getBufferState(result);
630
667
  expect(state.text).toBe('');
631
668
  expect(state.lines).toEqual(['']);
@@ -635,8 +672,8 @@ describe('useTextBuffer', () => {
635
672
  expect(state.visualCursor).toEqual([0, 0]);
636
673
  expect(state.visualScrollRow).toBe(0);
637
674
  });
638
- it('should initialize with provided initialText', () => {
639
- const { result } = renderHook(() => useTextBuffer({
675
+ it('should initialize with provided initialText', async () => {
676
+ const { result } = await renderHook(() => useTextBuffer({
640
677
  initialText: 'hello',
641
678
  viewport,
642
679
  }));
@@ -648,8 +685,8 @@ describe('useTextBuffer', () => {
648
685
  expect(state.viewportVisualLines).toEqual(['hello']);
649
686
  expect(state.visualCursor).toEqual([0, 0]);
650
687
  });
651
- it('should initialize with initialText and initialCursorOffset', () => {
652
- const { result } = renderHook(() => useTextBuffer({
688
+ it('should initialize with initialText and initialCursorOffset', async () => {
689
+ const { result } = await renderHook(() => useTextBuffer({
653
690
  initialText: 'hello\nworld',
654
691
  initialCursorOffset: 7, // Should be at 'o' in 'world'
655
692
  viewport,
@@ -663,8 +700,8 @@ describe('useTextBuffer', () => {
663
700
  expect(state.visualCursor[0]).toBe(1); // On the second visual line
664
701
  expect(state.visualCursor[1]).toBe(1); // At 'o' in "world"
665
702
  });
666
- it('should wrap visual lines', () => {
667
- const { result } = renderHook(() => useTextBuffer({
703
+ it('should wrap visual lines', async () => {
704
+ const { result } = await renderHook(() => useTextBuffer({
668
705
  initialText: 'The quick brown fox jumps over the lazy dog.',
669
706
  initialCursorOffset: 2, // After '好'
670
707
  viewport: { width: 15, height: 4 },
@@ -677,8 +714,8 @@ describe('useTextBuffer', () => {
677
714
  'lazy dog.',
678
715
  ]);
679
716
  });
680
- it('should wrap visual lines with multiple spaces', () => {
681
- const { result } = renderHook(() => useTextBuffer({
717
+ it('should wrap visual lines with multiple spaces', async () => {
718
+ const { result } = await renderHook(() => useTextBuffer({
682
719
  initialText: 'The quick brown fox jumps over the lazy dog.',
683
720
  viewport: { width: 15, height: 4 },
684
721
  }));
@@ -693,8 +730,8 @@ describe('useTextBuffer', () => {
693
730
  'lazy dog.',
694
731
  ]);
695
732
  });
696
- it('should wrap visual lines even without spaces', () => {
697
- const { result } = renderHook(() => useTextBuffer({
733
+ it('should wrap visual lines even without spaces', async () => {
734
+ const { result } = await renderHook(() => useTextBuffer({
698
735
  initialText: '123456789012345ABCDEFG', // 4 chars, 12 bytes
699
736
  viewport: { width: 15, height: 2 },
700
737
  }));
@@ -704,8 +741,8 @@ describe('useTextBuffer', () => {
704
741
  // the spaces as needed.
705
742
  expect(state.allVisualLines).toEqual(['123456789012345', 'ABCDEFG']);
706
743
  });
707
- it('should initialize with multi-byte unicode characters and correct cursor offset', () => {
708
- const { result } = renderHook(() => useTextBuffer({
744
+ it('should initialize with multi-byte unicode characters and correct cursor offset', async () => {
745
+ const { result } = await renderHook(() => useTextBuffer({
709
746
  initialText: '你好世界', // 4 chars, 12 bytes
710
747
  initialCursorOffset: 2, // After '好'
711
748
  viewport: { width: 5, height: 2 },
@@ -720,8 +757,8 @@ describe('useTextBuffer', () => {
720
757
  });
721
758
  });
722
759
  describe('Basic Editing', () => {
723
- it('insert: should insert a character and update cursor', () => {
724
- const { result } = renderHook(() => useTextBuffer({ viewport }));
760
+ it('insert: should insert a character and update cursor', async () => {
761
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
725
762
  act(() => result.current.insert('a'));
726
763
  let state = getBufferState(result);
727
764
  expect(state.text).toBe('a');
@@ -733,8 +770,8 @@ describe('useTextBuffer', () => {
733
770
  expect(state.cursor).toEqual([0, 2]);
734
771
  expect(state.visualCursor).toEqual([0, 2]);
735
772
  });
736
- it('insert: should insert text in the middle of a line', () => {
737
- const { result } = renderHook(() => useTextBuffer({
773
+ it('insert: should insert text in the middle of a line', async () => {
774
+ const { result } = await renderHook(() => useTextBuffer({
738
775
  initialText: 'abc',
739
776
  viewport,
740
777
  }));
@@ -744,23 +781,23 @@ describe('useTextBuffer', () => {
744
781
  expect(state.text).toBe('a-NEW-bc');
745
782
  expect(state.cursor).toEqual([0, 6]);
746
783
  });
747
- it('insert: should use placeholder for large text paste', () => {
748
- const { result } = renderHook(() => useTextBuffer({ viewport }));
784
+ it('insert: should use placeholder for large text paste', async () => {
785
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
749
786
  const largeText = '1\n2\n3\n4\n5\n6';
750
787
  act(() => result.current.insert(largeText, { paste: true }));
751
788
  const state = getBufferState(result);
752
789
  expect(state.text).toBe('[Pasted Text: 6 lines]');
753
790
  expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
754
791
  });
755
- it('insert: should NOT use placeholder for large text if NOT a paste', () => {
756
- const { result } = renderHook(() => useTextBuffer({ viewport }));
792
+ it('insert: should NOT use placeholder for large text if NOT a paste', async () => {
793
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
757
794
  const largeText = '1\n2\n3\n4\n5\n6';
758
795
  act(() => result.current.insert(largeText, { paste: false }));
759
796
  const state = getBufferState(result);
760
797
  expect(state.text).toBe(largeText);
761
798
  });
762
- it('insert: should clean up pastedContent when placeholder is deleted', () => {
763
- const { result } = renderHook(() => useTextBuffer({ viewport }));
799
+ it('insert: should clean up pastedContent when placeholder is deleted', async () => {
800
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
764
801
  const largeText = '1\n2\n3\n4\n5\n6';
765
802
  act(() => result.current.insert(largeText, { paste: true }));
766
803
  expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
@@ -768,8 +805,8 @@ describe('useTextBuffer', () => {
768
805
  act(() => result.current.setText(''));
769
806
  expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
770
807
  });
771
- it('insert: should clean up pastedContent when placeholder is removed via atomic backspace', () => {
772
- const { result } = renderHook(() => useTextBuffer({ viewport }));
808
+ it('insert: should clean up pastedContent when placeholder is removed via atomic backspace', async () => {
809
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
773
810
  const largeText = '1\n2\n3\n4\n5\n6';
774
811
  act(() => result.current.insert(largeText, { paste: true }));
775
812
  expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
@@ -781,8 +818,75 @@ describe('useTextBuffer', () => {
781
818
  // pastedContent is cleaned up when placeholder is deleted atomically
782
819
  expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
783
820
  });
784
- it('newline: should create a new line and move cursor', () => {
785
- const { result } = renderHook(() => useTextBuffer({
821
+ it('deleteWordLeft: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
822
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
823
+ const largeText = '1\n2\n3\n4\n5\n6';
824
+ act(() => result.current.insert(largeText, { paste: true }));
825
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
826
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
827
+ act(() => {
828
+ for (let i = 0; i < 12; i++) {
829
+ result.current.deleteWordLeft();
830
+ }
831
+ });
832
+ expect(getBufferState(result).text).toBe('');
833
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
834
+ act(() => result.current.insert(largeText, { paste: true }));
835
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
836
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
837
+ });
838
+ it('deleteWordRight: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
839
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
840
+ const largeText = '1\n2\n3\n4\n5\n6';
841
+ act(() => result.current.insert(largeText, { paste: true }));
842
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
843
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
844
+ act(() => result.current.move('home'));
845
+ act(() => {
846
+ for (let i = 0; i < 12; i++) {
847
+ result.current.deleteWordRight();
848
+ }
849
+ });
850
+ expect(getBufferState(result).text).not.toContain('[Pasted Text: 6 lines]');
851
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
852
+ act(() => result.current.insert(largeText, { paste: true }));
853
+ expect(getBufferState(result).text).toContain('[Pasted Text: 6 lines]');
854
+ expect(getBufferState(result).text).not.toContain('#2');
855
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
856
+ });
857
+ it('killLineLeft: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
858
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
859
+ const largeText = '1\n2\n3\n4\n5\n6';
860
+ act(() => result.current.insert(largeText, { paste: true }));
861
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
862
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
863
+ act(() => result.current.killLineLeft());
864
+ expect(getBufferState(result).text).toBe('');
865
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
866
+ act(() => result.current.insert(largeText, { paste: true }));
867
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
868
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
869
+ });
870
+ it('killLineRight: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
871
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
872
+ const largeText = '1\n2\n3\n4\n5\n6';
873
+ act(() => result.current.insert(largeText, { paste: true }));
874
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
875
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
876
+ act(() => {
877
+ for (let i = 0; i < 40; i++) {
878
+ result.current.move('left');
879
+ }
880
+ });
881
+ act(() => result.current.killLineRight());
882
+ expect(getBufferState(result).text).toBe('');
883
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
884
+ act(() => result.current.insert(largeText, { paste: true }));
885
+ expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
886
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
887
+ });
888
+ it('newline: should create a new line and move cursor', async () => {
889
+ const { result } = await renderHook(() => useTextBuffer({
786
890
  initialText: 'ab',
787
891
  viewport,
788
892
  }));
@@ -796,8 +900,8 @@ describe('useTextBuffer', () => {
796
900
  expect(state.viewportVisualLines).toEqual(['ab', '']); // viewport height 3
797
901
  expect(state.visualCursor).toEqual([1, 0]); // On the new visual line
798
902
  });
799
- it('backspace: should delete char to the left or merge lines', () => {
800
- const { result } = renderHook(() => useTextBuffer({
903
+ it('backspace: should delete char to the left or merge lines', async () => {
904
+ const { result } = await renderHook(() => useTextBuffer({
801
905
  initialText: 'a\nb',
802
906
  viewport,
803
907
  }));
@@ -819,8 +923,8 @@ describe('useTextBuffer', () => {
819
923
  expect(state.viewportVisualLines).toEqual(['a']);
820
924
  expect(state.visualCursor).toEqual([0, 1]);
821
925
  });
822
- it('del: should delete char to the right or merge lines', () => {
823
- const { result } = renderHook(() => useTextBuffer({
926
+ it('del: should delete char to the right or merge lines', async () => {
927
+ const { result } = await renderHook(() => useTextBuffer({
824
928
  initialText: 'a\nb',
825
929
  viewport,
826
930
  }));
@@ -846,72 +950,70 @@ describe('useTextBuffer', () => {
846
950
  afterEach(() => {
847
951
  fs.rmSync(tempDir, { recursive: true, force: true });
848
952
  });
849
- it('should prepend @ to a valid file path on insert', () => {
953
+ it('should prepend @ to a valid file path on insert', async () => {
850
954
  const filePath = path.join(tempDir, 'file.txt');
851
955
  fs.writeFileSync(filePath, '');
852
- const { result } = renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
956
+ const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
853
957
  act(() => result.current.insert(filePath, { paste: true }));
854
- expect(getBufferState(result).text).toBe(`@${filePath} `);
958
+ expect(getBufferState(result).text).toBe(`@${escapePath(filePath)} `);
855
959
  });
856
- it('should not prepend @ to an invalid file path on insert', () => {
857
- const { result } = renderHook(() => useTextBuffer({ viewport }));
960
+ it('should not prepend @ to an invalid file path on insert', async () => {
961
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
858
962
  const notAPath = path.join(tempDir, 'non_existent.txt');
859
963
  act(() => result.current.insert(notAPath, { paste: true }));
860
964
  expect(getBufferState(result).text).toBe(notAPath);
861
965
  });
862
- it('should handle quoted paths', () => {
966
+ it('should handle quoted paths', async () => {
863
967
  const filePath = path.join(tempDir, 'file.txt');
864
968
  fs.writeFileSync(filePath, '');
865
- const { result } = renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
969
+ const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
866
970
  const quotedPath = `'${filePath}'`;
867
971
  act(() => result.current.insert(quotedPath, { paste: true }));
868
- expect(getBufferState(result).text).toBe(`@${filePath} `);
972
+ expect(getBufferState(result).text).toBe(`@${escapePath(filePath)} `);
869
973
  });
870
- it('should not prepend @ to short text that is not a path', () => {
871
- const { result } = renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
974
+ it('should not prepend @ to short text that is not a path', async () => {
975
+ const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
872
976
  const shortText = 'ab';
873
977
  act(() => result.current.insert(shortText, { paste: true }));
874
978
  expect(getBufferState(result).text).toBe(shortText);
875
979
  });
876
- it('should prepend @ to multiple valid file paths on insert', () => {
980
+ it('should prepend @ to multiple valid file paths on insert', async () => {
877
981
  const file1 = path.join(tempDir, 'file1.txt');
878
982
  const file2 = path.join(tempDir, 'file2.txt');
879
983
  fs.writeFileSync(file1, '');
880
984
  fs.writeFileSync(file2, '');
881
- const { result } = renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
882
- const filePaths = `${file1} ${file2}`;
985
+ const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
986
+ const filePaths = `${escapePath(file1)} ${escapePath(file2)}`;
883
987
  act(() => result.current.insert(filePaths, { paste: true }));
884
- expect(getBufferState(result).text).toBe(`@${file1} @${file2} `);
988
+ expect(getBufferState(result).text).toBe(`@${escapePath(file1)} @${escapePath(file2)} `);
885
989
  });
886
- it('should handle multiple paths with escaped spaces', () => {
990
+ it('should handle multiple paths with escaped spaces', async () => {
887
991
  const file1 = path.join(tempDir, 'my file.txt');
888
992
  const file2 = path.join(tempDir, 'other.txt');
889
993
  fs.writeFileSync(file1, '');
890
994
  fs.writeFileSync(file2, '');
891
- const { result } = renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
892
- // Construct escaped path string: "/path/to/my\ file.txt /path/to/other.txt"
893
- const escapedFile1 = file1.replace(/ /g, '\\ ');
894
- const filePaths = `${escapedFile1} ${file2}`;
995
+ const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
996
+ const filePaths = `${escapePath(file1)} ${escapePath(file2)}`;
895
997
  act(() => result.current.insert(filePaths, { paste: true }));
896
- expect(getBufferState(result).text).toBe(`@${escapedFile1} @${file2} `);
998
+ expect(getBufferState(result).text).toBe(`@${escapePath(file1)} @${escapePath(file2)} `);
897
999
  });
898
- it('should only prepend @ to valid paths in multi-path paste', () => {
1000
+ it('should not prepend @ unless all paths are valid', async () => {
899
1001
  const validFile = path.join(tempDir, 'valid.txt');
900
1002
  const invalidFile = path.join(tempDir, 'invalid.jpg');
901
1003
  fs.writeFileSync(validFile, '');
902
1004
  // Do not create invalidFile
903
- const { result } = renderHook(() => useTextBuffer({
1005
+ const { result } = await renderHook(() => useTextBuffer({
904
1006
  viewport,
905
1007
  escapePastedPaths: true,
906
1008
  }));
907
1009
  const filePaths = `${validFile} ${invalidFile}`;
908
1010
  act(() => result.current.insert(filePaths, { paste: true }));
909
- expect(getBufferState(result).text).toBe(`@${validFile} ${invalidFile} `);
1011
+ expect(getBufferState(result).text).toBe(`${validFile} ${invalidFile}`);
910
1012
  });
911
1013
  });
912
1014
  describe('Shell Mode Behavior', () => {
913
- it('should not prepend @ to valid file paths when shellModeActive is true', () => {
914
- const { result } = renderHook(() => useTextBuffer({
1015
+ it('should not prepend @ to valid file paths when shellModeActive is true', async () => {
1016
+ const { result } = await renderHook(() => useTextBuffer({
915
1017
  viewport,
916
1018
  escapePastedPaths: true,
917
1019
  shellModeActive: true,
@@ -920,8 +1022,8 @@ describe('useTextBuffer', () => {
920
1022
  act(() => result.current.insert(filePath, { paste: true }));
921
1023
  expect(getBufferState(result).text).toBe(filePath); // No @ prefix
922
1024
  });
923
- it('should not prepend @ to quoted paths when shellModeActive is true', () => {
924
- const { result } = renderHook(() => useTextBuffer({
1025
+ it('should not prepend @ to quoted paths when shellModeActive is true', async () => {
1026
+ const { result } = await renderHook(() => useTextBuffer({
925
1027
  viewport,
926
1028
  escapePastedPaths: true,
927
1029
  shellModeActive: true,
@@ -930,8 +1032,8 @@ describe('useTextBuffer', () => {
930
1032
  act(() => result.current.insert(quotedFilePath, { paste: true }));
931
1033
  expect(getBufferState(result).text).toBe(quotedFilePath); // No @ prefix, keeps quotes
932
1034
  });
933
- it('should behave normally with invalid paths when shellModeActive is true', () => {
934
- const { result } = renderHook(() => useTextBuffer({
1035
+ it('should behave normally with invalid paths when shellModeActive is true', async () => {
1036
+ const { result } = await renderHook(() => useTextBuffer({
935
1037
  viewport,
936
1038
  shellModeActive: true,
937
1039
  }));
@@ -939,8 +1041,8 @@ describe('useTextBuffer', () => {
939
1041
  act(() => result.current.insert(notAPath, { paste: true }));
940
1042
  expect(getBufferState(result).text).toBe(notAPath);
941
1043
  });
942
- it('should behave normally with short text when shellModeActive is true', () => {
943
- const { result } = renderHook(() => useTextBuffer({
1044
+ it('should behave normally with short text when shellModeActive is true', async () => {
1045
+ const { result } = await renderHook(() => useTextBuffer({
944
1046
  viewport,
945
1047
  escapePastedPaths: true,
946
1048
  shellModeActive: true,
@@ -951,14 +1053,14 @@ describe('useTextBuffer', () => {
951
1053
  });
952
1054
  });
953
1055
  describe('Cursor Movement', () => {
954
- it('move: left/right should work within and across visual lines (due to wrapping)', () => {
1056
+ it('move: left/right should work within and across visual lines (due to wrapping)', async () => {
955
1057
  // Text: "long line1next line2" (20 chars)
956
1058
  // Viewport width 5. Word wrapping should produce:
957
1059
  // "long " (5)
958
1060
  // "line1" (5)
959
1061
  // "next " (5)
960
1062
  // "line2" (5)
961
- const { result } = renderHook(() => useTextBuffer({
1063
+ const { result } = await renderHook(() => useTextBuffer({
962
1064
  initialText: 'long line1next line2', // Corrected: was 'long line1next line2'
963
1065
  viewport: { width: 5, height: 4 },
964
1066
  }));
@@ -976,9 +1078,9 @@ describe('useTextBuffer', () => {
976
1078
  expect(getBufferState(result).visualCursor).toEqual([0, 4]);
977
1079
  expect(getBufferState(result).cursor).toEqual([0, 4]); // logical cursor
978
1080
  });
979
- it('move: up/down should preserve preferred visual column', () => {
1081
+ it('move: up/down should preserve preferred visual column', async () => {
980
1082
  const text = 'abcde\nxy\n12345';
981
- const { result } = renderHook(() => useTextBuffer({
1083
+ const { result } = await renderHook(() => useTextBuffer({
982
1084
  initialText: text,
983
1085
  viewport,
984
1086
  }));
@@ -1011,9 +1113,9 @@ describe('useTextBuffer', () => {
1011
1113
  state = getBufferState(result);
1012
1114
  expect(state.preferredCol).toBe(null);
1013
1115
  });
1014
- it('move: home/end should go to visual line start/end', () => {
1116
+ it('move: home/end should go to visual line start/end', async () => {
1015
1117
  const initialText = 'line one\nsecond line';
1016
- const { result } = renderHook(() => useTextBuffer({
1118
+ const { result } = await renderHook(() => useTextBuffer({
1017
1119
  initialText,
1018
1120
  viewport: { width: 5, height: 5 },
1019
1121
  }));
@@ -1035,8 +1137,8 @@ describe('useTextBuffer', () => {
1035
1137
  });
1036
1138
  });
1037
1139
  describe('Visual Layout & Viewport', () => {
1038
- it('should wrap long lines correctly into visualLines', () => {
1039
- const { result } = renderHook(() => useTextBuffer({
1140
+ it('should wrap long lines correctly into visualLines', async () => {
1141
+ const { result } = await renderHook(() => useTextBuffer({
1040
1142
  initialText: 'This is a very long line of text.', // 33 chars
1041
1143
  viewport: { width: 10, height: 5 },
1042
1144
  }));
@@ -1052,8 +1154,8 @@ describe('useTextBuffer', () => {
1052
1154
  expect(state.allVisualLines[2]).toBe('line of');
1053
1155
  expect(state.allVisualLines[3]).toBe('text.');
1054
1156
  });
1055
- it('should update visualScrollRow when visualCursor moves out of viewport', () => {
1056
- const { result } = renderHook(() => useTextBuffer({
1157
+ it('should update visualScrollRow when visualCursor moves out of viewport', async () => {
1158
+ const { result } = await renderHook(() => useTextBuffer({
1057
1159
  initialText: 'l1\nl2\nl3\nl4\nl5',
1058
1160
  viewport: { width: 5, height: 3 }, // Can show 3 visual lines
1059
1161
  }));
@@ -1094,8 +1196,8 @@ describe('useTextBuffer', () => {
1094
1196
  });
1095
1197
  });
1096
1198
  describe('Undo/Redo', () => {
1097
- it('should undo and redo an insert operation', () => {
1098
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1199
+ it('should undo and redo an insert operation', async () => {
1200
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1099
1201
  act(() => result.current.insert('a'));
1100
1202
  expect(getBufferState(result).text).toBe('a');
1101
1203
  act(() => result.current.undo());
@@ -1105,8 +1207,8 @@ describe('useTextBuffer', () => {
1105
1207
  expect(getBufferState(result).text).toBe('a');
1106
1208
  expect(getBufferState(result).cursor).toEqual([0, 1]);
1107
1209
  });
1108
- it('should undo and redo a newline operation', () => {
1109
- const { result } = renderHook(() => useTextBuffer({
1210
+ it('should undo and redo a newline operation', async () => {
1211
+ const { result } = await renderHook(() => useTextBuffer({
1110
1212
  initialText: 'test',
1111
1213
  viewport,
1112
1214
  }));
@@ -1122,16 +1224,16 @@ describe('useTextBuffer', () => {
1122
1224
  });
1123
1225
  });
1124
1226
  describe('Unicode Handling', () => {
1125
- it('insert: should correctly handle multi-byte unicode characters', () => {
1126
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1227
+ it('insert: should correctly handle multi-byte unicode characters', async () => {
1228
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1127
1229
  act(() => result.current.insert('你好'));
1128
1230
  const state = getBufferState(result);
1129
1231
  expect(state.text).toBe('你好');
1130
1232
  expect(state.cursor).toEqual([0, 2]); // Cursor is 2 (char count)
1131
1233
  expect(state.visualCursor).toEqual([0, 2]);
1132
1234
  });
1133
- it('backspace: should correctly delete multi-byte unicode characters', () => {
1134
- const { result } = renderHook(() => useTextBuffer({
1235
+ it('backspace: should correctly delete multi-byte unicode characters', async () => {
1236
+ const { result } = await renderHook(() => useTextBuffer({
1135
1237
  initialText: '你好',
1136
1238
  viewport,
1137
1239
  }));
@@ -1145,8 +1247,8 @@ describe('useTextBuffer', () => {
1145
1247
  expect(state.text).toBe('');
1146
1248
  expect(state.cursor).toEqual([0, 0]);
1147
1249
  });
1148
- it('move: left/right should treat multi-byte chars as single units for visual cursor', () => {
1149
- const { result } = renderHook(() => useTextBuffer({
1250
+ it('move: left/right should treat multi-byte chars as single units for visual cursor', async () => {
1251
+ const { result } = await renderHook(() => useTextBuffer({
1150
1252
  initialText: '🐶🐱',
1151
1253
  viewport: { width: 5, height: 1 },
1152
1254
  }));
@@ -1164,12 +1266,12 @@ describe('useTextBuffer', () => {
1164
1266
  expect(state.cursor).toEqual([0, 1]);
1165
1267
  expect(state.visualCursor).toEqual([0, 1]);
1166
1268
  });
1167
- it('move: up/down should work on wrapped lines (regression test)', () => {
1269
+ it('move: up/down should work on wrapped lines (regression test)', async () => {
1168
1270
  // Line that wraps into two visual lines
1169
1271
  // Viewport width 10. "0123456789ABCDE" (15 chars)
1170
1272
  // Visual Line 0: "0123456789"
1171
1273
  // Visual Line 1: "ABCDE"
1172
- const { result } = renderHook(() => useTextBuffer({
1274
+ const { result } = await renderHook(() => useTextBuffer({
1173
1275
  viewport: { width: 10, height: 5 },
1174
1276
  }));
1175
1277
  act(() => {
@@ -1211,8 +1313,8 @@ describe('useTextBuffer', () => {
1211
1313
  expect(handledDown).toBe(true);
1212
1314
  expect(getBufferState(result).visualCursor[0]).toBe(1);
1213
1315
  });
1214
- it('moveToVisualPosition: should correctly handle wide characters (Chinese)', () => {
1215
- const { result } = renderHook(() => useTextBuffer({
1316
+ it('moveToVisualPosition: should correctly handle wide characters (Chinese)', async () => {
1317
+ const { result } = await renderHook(() => useTextBuffer({
1216
1318
  initialText: '你好', // 2 chars, width 4
1217
1319
  viewport: { width: 10, height: 1 },
1218
1320
  }));
@@ -1232,8 +1334,8 @@ describe('useTextBuffer', () => {
1232
1334
  });
1233
1335
  });
1234
1336
  describe('handleInput', () => {
1235
- it('should insert printable characters', () => {
1236
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1337
+ it('should insert printable characters', async () => {
1338
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1237
1339
  act(() => {
1238
1340
  result.current.handleInput({
1239
1341
  name: 'h',
@@ -1256,11 +1358,11 @@ describe('useTextBuffer', () => {
1256
1358
  }));
1257
1359
  expect(getBufferState(result).text).toBe('hi');
1258
1360
  });
1259
- it('should handle "Enter" key as newline', () => {
1260
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1361
+ it('should handle "Enter" key as newline', async () => {
1362
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1261
1363
  act(() => {
1262
1364
  result.current.handleInput({
1263
- name: 'return',
1365
+ name: 'enter',
1264
1366
  shift: false,
1265
1367
  alt: false,
1266
1368
  ctrl: false,
@@ -1271,8 +1373,8 @@ describe('useTextBuffer', () => {
1271
1373
  });
1272
1374
  expect(getBufferState(result).lines).toEqual(['', '']);
1273
1375
  });
1274
- it('should handle Ctrl+J as newline', () => {
1275
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1376
+ it('should handle Ctrl+J as newline', async () => {
1377
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1276
1378
  act(() => {
1277
1379
  result.current.handleInput({
1278
1380
  name: 'j',
@@ -1286,8 +1388,8 @@ describe('useTextBuffer', () => {
1286
1388
  });
1287
1389
  expect(getBufferState(result).lines).toEqual(['', '']);
1288
1390
  });
1289
- it('should do nothing for a tab key press', () => {
1290
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1391
+ it('should do nothing for a tab key press', async () => {
1392
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1291
1393
  act(() => {
1292
1394
  result.current.handleInput({
1293
1395
  name: 'tab',
@@ -1301,8 +1403,8 @@ describe('useTextBuffer', () => {
1301
1403
  });
1302
1404
  expect(getBufferState(result).text).toBe('');
1303
1405
  });
1304
- it('should do nothing for a shift tab key press', () => {
1305
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1406
+ it('should do nothing for a shift tab key press', async () => {
1407
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1306
1408
  act(() => {
1307
1409
  result.current.handleInput({
1308
1410
  name: 'tab',
@@ -1316,8 +1418,8 @@ describe('useTextBuffer', () => {
1316
1418
  });
1317
1419
  expect(getBufferState(result).text).toBe('');
1318
1420
  });
1319
- it('should handle CLEAR_INPUT (Ctrl+C)', () => {
1320
- const { result } = renderHook(() => useTextBuffer({
1421
+ it('should handle CLEAR_INPUT (Ctrl+C)', async () => {
1422
+ const { result } = await renderHook(() => useTextBuffer({
1321
1423
  initialText: 'hello',
1322
1424
  viewport,
1323
1425
  }));
@@ -1337,8 +1439,8 @@ describe('useTextBuffer', () => {
1337
1439
  expect(handled).toBe(true);
1338
1440
  expect(getBufferState(result).text).toBe('');
1339
1441
  });
1340
- it('should NOT handle CLEAR_INPUT if buffer is empty', () => {
1341
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1442
+ it('should NOT handle CLEAR_INPUT if buffer is empty', async () => {
1443
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1342
1444
  let handled = true;
1343
1445
  act(() => {
1344
1446
  handled = result.current.handleInput({
@@ -1353,8 +1455,8 @@ describe('useTextBuffer', () => {
1353
1455
  });
1354
1456
  expect(handled).toBe(false);
1355
1457
  });
1356
- it('should handle "Backspace" key', () => {
1357
- const { result } = renderHook(() => useTextBuffer({
1458
+ it('should handle "Backspace" key', async () => {
1459
+ const { result } = await renderHook(() => useTextBuffer({
1358
1460
  initialText: 'a',
1359
1461
  viewport,
1360
1462
  }));
@@ -1372,8 +1474,8 @@ describe('useTextBuffer', () => {
1372
1474
  });
1373
1475
  expect(getBufferState(result).text).toBe('');
1374
1476
  });
1375
- it('should handle multiple delete characters in one input', () => {
1376
- const { result } = renderHook(() => useTextBuffer({
1477
+ it('should handle multiple delete characters in one input', async () => {
1478
+ const { result } = await renderHook(() => useTextBuffer({
1377
1479
  initialText: 'abcde',
1378
1480
  viewport,
1379
1481
  }));
@@ -1411,8 +1513,8 @@ describe('useTextBuffer', () => {
1411
1513
  expect(getBufferState(result).text).toBe('ab');
1412
1514
  expect(getBufferState(result).cursor).toEqual([0, 2]);
1413
1515
  });
1414
- it('should handle inserts that contain delete characters', () => {
1415
- const { result } = renderHook(() => useTextBuffer({
1516
+ it('should handle inserts that contain delete characters', async () => {
1517
+ const { result } = await renderHook(() => useTextBuffer({
1416
1518
  initialText: 'abcde',
1417
1519
  viewport,
1418
1520
  }));
@@ -1424,8 +1526,8 @@ describe('useTextBuffer', () => {
1424
1526
  expect(getBufferState(result).text).toBe('ab');
1425
1527
  expect(getBufferState(result).cursor).toEqual([0, 2]);
1426
1528
  });
1427
- it('should handle inserts with a mix of regular and delete characters', () => {
1428
- const { result } = renderHook(() => useTextBuffer({
1529
+ it('should handle inserts with a mix of regular and delete characters', async () => {
1530
+ const { result } = await renderHook(() => useTextBuffer({
1429
1531
  initialText: 'abcde',
1430
1532
  viewport,
1431
1533
  }));
@@ -1437,8 +1539,8 @@ describe('useTextBuffer', () => {
1437
1539
  expect(getBufferState(result).text).toBe('abcNEW');
1438
1540
  expect(getBufferState(result).cursor).toEqual([0, 6]);
1439
1541
  });
1440
- it('should handle arrow keys for movement', () => {
1441
- const { result } = renderHook(() => useTextBuffer({
1542
+ it('should handle arrow keys for movement', async () => {
1543
+ const { result } = await renderHook(() => useTextBuffer({
1442
1544
  initialText: 'ab',
1443
1545
  viewport,
1444
1546
  }));
@@ -1468,8 +1570,8 @@ describe('useTextBuffer', () => {
1468
1570
  });
1469
1571
  expect(getBufferState(result).cursor).toEqual([0, 2]);
1470
1572
  });
1471
- it('should strip ANSI escape codes when pasting text', () => {
1472
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1573
+ it('should strip ANSI escape codes when pasting text', async () => {
1574
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1473
1575
  const textWithAnsi = '\x1B[31mHello\x1B[0m \x1B[32mWorld\x1B[0m';
1474
1576
  // Simulate pasting by calling handleInput with a string longer than 1 char
1475
1577
  act(() => {
@@ -1485,11 +1587,11 @@ describe('useTextBuffer', () => {
1485
1587
  });
1486
1588
  expect(getBufferState(result).text).toBe('Hello World');
1487
1589
  });
1488
- it('should handle VSCode terminal Shift+Enter as newline', () => {
1489
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1590
+ it('should handle VSCode terminal Shift+Enter as newline', async () => {
1591
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1490
1592
  act(() => {
1491
1593
  result.current.handleInput({
1492
- name: 'return',
1594
+ name: 'enter',
1493
1595
  shift: true,
1494
1596
  alt: false,
1495
1597
  ctrl: false,
@@ -1500,7 +1602,7 @@ describe('useTextBuffer', () => {
1500
1602
  }); // Simulates Shift+Enter in VSCode terminal
1501
1603
  expect(getBufferState(result).lines).toEqual(['', '']);
1502
1604
  });
1503
- it('should correctly handle repeated pasting of long text', () => {
1605
+ it('should correctly handle repeated pasting of long text', async () => {
1504
1606
  const longText = `not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
1505
1607
 
1506
1608
  Why do we use it?
@@ -1509,7 +1611,7 @@ It is a long established fact that a reader will be distracted by the readable c
1509
1611
  Where does it come from?
1510
1612
  Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lore
1511
1613
  `;
1512
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1614
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1513
1615
  // Simulate pasting the long text multiple times
1514
1616
  act(() => {
1515
1617
  result.current.insert(longText, { paste: true });
@@ -1537,8 +1639,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1537
1639
  // - openInExternalEditor (heavy mocking of fs, child_process, os)
1538
1640
  // - All edge cases for visual scrolling and wrapping with different viewport sizes and text content.
1539
1641
  describe('replaceRange', () => {
1540
- it('should replace a single-line range with single-line text', () => {
1541
- const { result } = renderHook(() => useTextBuffer({
1642
+ it('should replace a single-line range with single-line text', async () => {
1643
+ const { result } = await renderHook(() => useTextBuffer({
1542
1644
  initialText: '@pac',
1543
1645
  viewport,
1544
1646
  }));
@@ -1547,8 +1649,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1547
1649
  expect(state.text).toBe('@packages');
1548
1650
  expect(state.cursor).toEqual([0, 9]); // cursor after 'typescript'
1549
1651
  });
1550
- it('should replace a multi-line range with single-line text', () => {
1551
- const { result } = renderHook(() => useTextBuffer({
1652
+ it('should replace a multi-line range with single-line text', async () => {
1653
+ const { result } = await renderHook(() => useTextBuffer({
1552
1654
  initialText: 'hello\nworld\nagain',
1553
1655
  viewport,
1554
1656
  }));
@@ -1557,8 +1659,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1557
1659
  expect(state.text).toBe('he new ld\nagain');
1558
1660
  expect(state.cursor).toEqual([0, 7]); // cursor after ' new '
1559
1661
  });
1560
- it('should delete a range when replacing with an empty string', () => {
1561
- const { result } = renderHook(() => useTextBuffer({
1662
+ it('should delete a range when replacing with an empty string', async () => {
1663
+ const { result } = await renderHook(() => useTextBuffer({
1562
1664
  initialText: 'hello world',
1563
1665
  viewport,
1564
1666
  }));
@@ -1567,8 +1669,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1567
1669
  expect(state.text).toBe('hello');
1568
1670
  expect(state.cursor).toEqual([0, 5]);
1569
1671
  });
1570
- it('should handle replacing at the beginning of the text', () => {
1571
- const { result } = renderHook(() => useTextBuffer({
1672
+ it('should handle replacing at the beginning of the text', async () => {
1673
+ const { result } = await renderHook(() => useTextBuffer({
1572
1674
  initialText: 'world',
1573
1675
  viewport,
1574
1676
  }));
@@ -1577,8 +1679,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1577
1679
  expect(state.text).toBe('hello world');
1578
1680
  expect(state.cursor).toEqual([0, 6]);
1579
1681
  });
1580
- it('should handle replacing at the end of the text', () => {
1581
- const { result } = renderHook(() => useTextBuffer({
1682
+ it('should handle replacing at the end of the text', async () => {
1683
+ const { result } = await renderHook(() => useTextBuffer({
1582
1684
  initialText: 'hello',
1583
1685
  viewport,
1584
1686
  }));
@@ -1587,8 +1689,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1587
1689
  expect(state.text).toBe('hello world');
1588
1690
  expect(state.cursor).toEqual([0, 11]);
1589
1691
  });
1590
- it('should handle replacing the entire buffer content', () => {
1591
- const { result } = renderHook(() => useTextBuffer({
1692
+ it('should handle replacing the entire buffer content', async () => {
1693
+ const { result } = await renderHook(() => useTextBuffer({
1592
1694
  initialText: 'old text',
1593
1695
  viewport,
1594
1696
  }));
@@ -1597,8 +1699,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1597
1699
  expect(state.text).toBe('new text');
1598
1700
  expect(state.cursor).toEqual([0, 8]);
1599
1701
  });
1600
- it('should correctly replace with unicode characters', () => {
1601
- const { result } = renderHook(() => useTextBuffer({
1702
+ it('should correctly replace with unicode characters', async () => {
1703
+ const { result } = await renderHook(() => useTextBuffer({
1602
1704
  initialText: 'hello *** world',
1603
1705
  viewport,
1604
1706
  }));
@@ -1607,8 +1709,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1607
1709
  expect(state.text).toBe('hello 你好 world');
1608
1710
  expect(state.cursor).toEqual([0, 8]); // after '你好'
1609
1711
  });
1610
- it('should handle invalid range by returning false and not changing text', () => {
1611
- const { result } = renderHook(() => useTextBuffer({
1712
+ it('should handle invalid range by returning false and not changing text', async () => {
1713
+ const { result } = await renderHook(() => useTextBuffer({
1612
1714
  initialText: 'test',
1613
1715
  viewport,
1614
1716
  }));
@@ -1621,8 +1723,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1621
1723
  });
1622
1724
  expect(getBufferState(result).text).toBe('test');
1623
1725
  });
1624
- it('replaceRange: multiple lines with a single character', () => {
1625
- const { result } = renderHook(() => useTextBuffer({
1726
+ it('replaceRange: multiple lines with a single character', async () => {
1727
+ const { result } = await renderHook(() => useTextBuffer({
1626
1728
  initialText: 'first\nsecond\nthird',
1627
1729
  viewport,
1628
1730
  }));
@@ -1631,8 +1733,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1631
1733
  expect(state.text).toBe('fiXrd');
1632
1734
  expect(state.cursor).toEqual([0, 3]); // After 'X'
1633
1735
  });
1634
- it('should replace a single-line range with multi-line text', () => {
1635
- const { result } = renderHook(() => useTextBuffer({
1736
+ it('should replace a single-line range with multi-line text', async () => {
1737
+ const { result } = await renderHook(() => useTextBuffer({
1636
1738
  initialText: 'one two three',
1637
1739
  viewport,
1638
1740
  }));
@@ -1675,23 +1777,23 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1675
1777
  expected: 'Pasted Text',
1676
1778
  desc: 'pasted text with ANSI',
1677
1779
  },
1678
- ])('should strip $desc from input', ({ input, expected }) => {
1679
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1780
+ ])('should strip $desc from input', async ({ input, expected }) => {
1781
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1680
1782
  act(() => {
1681
1783
  result.current.handleInput(createInput(input));
1682
1784
  });
1683
1785
  expect(getBufferState(result).text).toBe(expected);
1684
1786
  });
1685
- it('should not strip standard characters or newlines', () => {
1686
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1787
+ it('should not strip standard characters or newlines', async () => {
1788
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1687
1789
  const validText = 'Hello World\nThis is a test.';
1688
1790
  act(() => {
1689
1791
  result.current.handleInput(createInput(validText));
1690
1792
  });
1691
1793
  expect(getBufferState(result).text).toBe(validText);
1692
1794
  });
1693
- it('should sanitize large text (>5000 chars) and strip unsafe characters', () => {
1694
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1795
+ it('should sanitize large text (>5000 chars) and strip unsafe characters', async () => {
1796
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1695
1797
  const unsafeChars = '\x07\x08\x0B\x0C';
1696
1798
  const largeTextWithUnsafe = 'safe text'.repeat(600) + unsafeChars + 'more safe text';
1697
1799
  expect(largeTextWithUnsafe.length).toBeGreaterThan(5000);
@@ -1714,8 +1816,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1714
1816
  expect(resultText).toContain('safe text');
1715
1817
  expect(resultText).toContain('more safe text');
1716
1818
  });
1717
- it('should sanitize large ANSI text (>5000 chars) and strip escape codes', () => {
1718
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1819
+ it('should sanitize large ANSI text (>5000 chars) and strip escape codes', async () => {
1820
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1719
1821
  const largeTextWithAnsi = '\x1B[31m' +
1720
1822
  'red text'.repeat(800) +
1721
1823
  '\x1B[0m' +
@@ -1741,8 +1843,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1741
1843
  expect(resultText).toContain('red text');
1742
1844
  expect(resultText).toContain('green text');
1743
1845
  });
1744
- it('should not strip popular emojis', () => {
1745
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1846
+ it('should not strip popular emojis', async () => {
1847
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1746
1848
  const emojis = '🐍🐳🦀🦄';
1747
1849
  act(() => {
1748
1850
  result.current.handleInput({
@@ -1759,32 +1861,32 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1759
1861
  });
1760
1862
  });
1761
1863
  describe('inputFilter', () => {
1762
- it('should filter input based on the provided filter function', () => {
1763
- const { result } = renderHook(() => useTextBuffer({
1864
+ it('should filter input based on the provided filter function', async () => {
1865
+ const { result } = await renderHook(() => useTextBuffer({
1764
1866
  viewport,
1765
1867
  inputFilter: (text) => text.replace(/[^0-9]/g, ''),
1766
1868
  }));
1767
1869
  act(() => result.current.insert('a1b2c3'));
1768
1870
  expect(getBufferState(result).text).toBe('123');
1769
1871
  });
1770
- it('should handle empty result from filter', () => {
1771
- const { result } = renderHook(() => useTextBuffer({
1872
+ it('should handle empty result from filter', async () => {
1873
+ const { result } = await renderHook(() => useTextBuffer({
1772
1874
  viewport,
1773
1875
  inputFilter: (text) => text.replace(/[^0-9]/g, ''),
1774
1876
  }));
1775
1877
  act(() => result.current.insert('abc'));
1776
1878
  expect(getBufferState(result).text).toBe('');
1777
1879
  });
1778
- it('should filter pasted text', () => {
1779
- const { result } = renderHook(() => useTextBuffer({
1880
+ it('should filter pasted text', async () => {
1881
+ const { result } = await renderHook(() => useTextBuffer({
1780
1882
  viewport,
1781
1883
  inputFilter: (text) => text.toUpperCase(),
1782
1884
  }));
1783
1885
  act(() => result.current.insert('hello', { paste: true }));
1784
1886
  expect(getBufferState(result).text).toBe('HELLO');
1785
1887
  });
1786
- it('should not filter newlines if they are allowed by the filter', () => {
1787
- const { result } = renderHook(() => useTextBuffer({
1888
+ it('should not filter newlines if they are allowed by the filter', async () => {
1889
+ const { result } = await renderHook(() => useTextBuffer({
1788
1890
  viewport,
1789
1891
  inputFilter: (text) => text, // Allow everything including newlines
1790
1892
  }));
@@ -1793,8 +1895,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1793
1895
  // If the filter allows them, they should be handled correctly by the subsequent logic in insert.
1794
1896
  expect(getBufferState(result).text).toBe('a\nb');
1795
1897
  });
1796
- it('should filter before newline check in insert', () => {
1797
- const { result } = renderHook(() => useTextBuffer({
1898
+ it('should filter before newline check in insert', async () => {
1899
+ const { result } = await renderHook(() => useTextBuffer({
1798
1900
  viewport,
1799
1901
  inputFilter: (text) => text.replace(/\n/g, ''), // Filter out newlines
1800
1902
  }));
@@ -1803,25 +1905,25 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1803
1905
  });
1804
1906
  });
1805
1907
  describe('stripAnsi', () => {
1806
- it('should correctly strip ANSI escape codes', () => {
1908
+ it('should correctly strip ANSI escape codes', async () => {
1807
1909
  const textWithAnsi = '\x1B[31mHello\x1B[0m World';
1808
1910
  expect(stripAnsi(textWithAnsi)).toBe('Hello World');
1809
1911
  });
1810
- it('should handle multiple ANSI codes', () => {
1912
+ it('should handle multiple ANSI codes', async () => {
1811
1913
  const textWithMultipleAnsi = '\x1B[1m\x1B[34mBold Blue\x1B[0m Text';
1812
1914
  expect(stripAnsi(textWithMultipleAnsi)).toBe('Bold Blue Text');
1813
1915
  });
1814
- it('should not modify text without ANSI codes', () => {
1916
+ it('should not modify text without ANSI codes', async () => {
1815
1917
  const plainText = 'Plain text';
1816
1918
  expect(stripAnsi(plainText)).toBe('Plain text');
1817
1919
  });
1818
- it('should handle empty string', () => {
1920
+ it('should handle empty string', async () => {
1819
1921
  expect(stripAnsi('')).toBe('');
1820
1922
  });
1821
1923
  });
1822
1924
  describe('Memoization', () => {
1823
- it('should keep action references stable across re-renders', () => {
1824
- const { result, rerender } = renderHook(() => useTextBuffer({ viewport }));
1925
+ it('should keep action references stable across re-renders', async () => {
1926
+ const { result, rerender } = await renderHook(() => useTextBuffer({ viewport }));
1825
1927
  const initialInsert = result.current.insert;
1826
1928
  const initialBackspace = result.current.backspace;
1827
1929
  const initialMove = result.current.move;
@@ -1832,8 +1934,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1832
1934
  expect(result.current.move).toBe(initialMove);
1833
1935
  expect(result.current.handleInput).toBe(initialHandleInput);
1834
1936
  });
1835
- it('should have memoized actions that operate on the latest state', () => {
1836
- const { result } = renderHook(() => useTextBuffer({ viewport }));
1937
+ it('should have memoized actions that operate on the latest state', async () => {
1938
+ const { result } = await renderHook(() => useTextBuffer({ viewport }));
1837
1939
  // Store a reference to the memoized insert function.
1838
1940
  const memoizedInsert = result.current.insert;
1839
1941
  // Update the buffer state.
@@ -1850,8 +1952,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1850
1952
  });
1851
1953
  });
1852
1954
  describe('singleLine mode', () => {
1853
- it('should not insert a newline character when singleLine is true', () => {
1854
- const { result } = renderHook(() => useTextBuffer({
1955
+ it('should not insert a newline character when singleLine is true', async () => {
1956
+ const { result } = await renderHook(() => useTextBuffer({
1855
1957
  viewport,
1856
1958
  singleLine: true,
1857
1959
  }));
@@ -1860,8 +1962,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1860
1962
  expect(state.text).toBe('');
1861
1963
  expect(state.lines).toEqual(['']);
1862
1964
  });
1863
- it('should not create a new line when newline() is called and singleLine is true', () => {
1864
- const { result } = renderHook(() => useTextBuffer({
1965
+ it('should not create a new line when newline() is called and singleLine is true', async () => {
1966
+ const { result } = await renderHook(() => useTextBuffer({
1865
1967
  initialText: 'ab',
1866
1968
  viewport,
1867
1969
  singleLine: true,
@@ -1873,14 +1975,14 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1873
1975
  expect(state.lines).toEqual(['ab']);
1874
1976
  expect(state.cursor).toEqual([0, 2]);
1875
1977
  });
1876
- it('should not handle "Enter" key as newline when singleLine is true', () => {
1877
- const { result } = renderHook(() => useTextBuffer({
1978
+ it('should not handle "Enter" key as newline when singleLine is true', async () => {
1979
+ const { result } = await renderHook(() => useTextBuffer({
1878
1980
  viewport,
1879
1981
  singleLine: true,
1880
1982
  }));
1881
1983
  act(() => {
1882
1984
  result.current.handleInput({
1883
- name: 'return',
1985
+ name: 'enter',
1884
1986
  shift: false,
1885
1987
  alt: false,
1886
1988
  ctrl: false,
@@ -1891,8 +1993,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1891
1993
  });
1892
1994
  expect(getBufferState(result).lines).toEqual(['']);
1893
1995
  });
1894
- it('should not print anything for function keys when singleLine is true', () => {
1895
- const { result } = renderHook(() => useTextBuffer({
1996
+ it('should not print anything for function keys when singleLine is true', async () => {
1997
+ const { result } = await renderHook(() => useTextBuffer({
1896
1998
  viewport,
1897
1999
  singleLine: true,
1898
2000
  }));
@@ -1909,8 +2011,8 @@ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots
1909
2011
  });
1910
2012
  expect(getBufferState(result).lines).toEqual(['']);
1911
2013
  });
1912
- it('should strip newlines from pasted text when singleLine is true', () => {
1913
- const { result } = renderHook(() => useTextBuffer({
2014
+ it('should strip newlines from pasted text when singleLine is true', async () => {
2015
+ const { result } = await renderHook(() => useTextBuffer({
1914
2016
  viewport,
1915
2017
  singleLine: true,
1916
2018
  }));
@@ -2053,7 +2155,7 @@ describe('offsetToLogicalPos', () => {
2053
2155
  { text: '🐶🐱', offset: 0, expected: [0, 0], desc: 'emoji - start' },
2054
2156
  { text: '🐶🐱', offset: 1, expected: [0, 1], desc: 'emoji - middle' },
2055
2157
  { text: '🐶🐱', offset: 2, expected: [0, 2], desc: 'emoji - end' },
2056
- ])('should handle $desc', ({ text, offset, expected }) => {
2158
+ ])('should handle $desc', async ({ text, offset, expected }) => {
2057
2159
  expect(offsetToLogicalPos(text, offset)).toEqual(expected);
2058
2160
  });
2059
2161
  describe('multi-line text', () => {
@@ -2075,7 +2177,7 @@ describe('offsetToLogicalPos', () => {
2075
2177
  });
2076
2178
  });
2077
2179
  describe('logicalPosToOffset', () => {
2078
- it('should convert row/col position to offset correctly', () => {
2180
+ it('should convert row/col position to offset correctly', async () => {
2079
2181
  const lines = ['hello', 'world', '123'];
2080
2182
  // Line 0: "hello" (5 chars)
2081
2183
  expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // Start of 'hello'
@@ -2090,7 +2192,7 @@ describe('logicalPosToOffset', () => {
2090
2192
  expect(logicalPosToOffset(lines, 2, 1)).toBe(13); // '2' in '123'
2091
2193
  expect(logicalPosToOffset(lines, 2, 3)).toBe(15); // End of '123'
2092
2194
  });
2093
- it('should handle empty lines', () => {
2195
+ it('should handle empty lines', async () => {
2094
2196
  const lines = ['a', '', 'c'];
2095
2197
  expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // 'a'
2096
2198
  expect(logicalPosToOffset(lines, 0, 1)).toBe(1); // End of 'a'
@@ -2098,11 +2200,11 @@ describe('logicalPosToOffset', () => {
2098
2200
  expect(logicalPosToOffset(lines, 2, 0)).toBe(3); // 'c'
2099
2201
  expect(logicalPosToOffset(lines, 2, 1)).toBe(4); // End of 'c'
2100
2202
  });
2101
- it('should handle single empty line', () => {
2203
+ it('should handle single empty line', async () => {
2102
2204
  const lines = [''];
2103
2205
  expect(logicalPosToOffset(lines, 0, 0)).toBe(0);
2104
2206
  });
2105
- it('should be inverse of offsetToLogicalPos', () => {
2207
+ it('should be inverse of offsetToLogicalPos', async () => {
2106
2208
  const lines = ['hello', 'world', '123'];
2107
2209
  const text = lines.join('\n');
2108
2210
  // Test round-trip conversion
@@ -2112,7 +2214,7 @@ describe('logicalPosToOffset', () => {
2112
2214
  expect(convertedOffset).toBe(offset);
2113
2215
  }
2114
2216
  });
2115
- it('should handle out-of-bounds positions', () => {
2217
+ it('should handle out-of-bounds positions', async () => {
2116
2218
  const lines = ['hello'];
2117
2219
  // Beyond end of line
2118
2220
  expect(logicalPosToOffset(lines, 0, 10)).toBe(5); // Clamps to end of line
@@ -2139,7 +2241,7 @@ const createTestState = (lines, cursorRow, cursorCol, viewportWidth = 80) => {
2139
2241
  };
2140
2242
  describe('textBufferReducer vim operations', () => {
2141
2243
  describe('vim_delete_line', () => {
2142
- it('should delete a single line including newline in multi-line text', () => {
2244
+ it('should delete a single line including newline in multi-line text', async () => {
2143
2245
  const state = createTestState(['line1', 'line2', 'line3'], 1, 2);
2144
2246
  const action = {
2145
2247
  type: 'vim_delete_line',
@@ -2152,7 +2254,7 @@ describe('textBufferReducer vim operations', () => {
2152
2254
  expect(result.cursorRow).toBe(1);
2153
2255
  expect(result.cursorCol).toBe(0);
2154
2256
  });
2155
- it('should delete multiple lines when count > 1', () => {
2257
+ it('should delete multiple lines when count > 1', async () => {
2156
2258
  const state = createTestState(['line1', 'line2', 'line3', 'line4'], 1, 0);
2157
2259
  const action = {
2158
2260
  type: 'vim_delete_line',
@@ -2165,7 +2267,7 @@ describe('textBufferReducer vim operations', () => {
2165
2267
  expect(result.cursorRow).toBe(1);
2166
2268
  expect(result.cursorCol).toBe(0);
2167
2269
  });
2168
- it('should clear single line content when only one line exists', () => {
2270
+ it('should clear single line content when only one line exists', async () => {
2169
2271
  const state = createTestState(['only line'], 0, 5);
2170
2272
  const action = {
2171
2273
  type: 'vim_delete_line',
@@ -2178,7 +2280,7 @@ describe('textBufferReducer vim operations', () => {
2178
2280
  expect(result.cursorRow).toBe(0);
2179
2281
  expect(result.cursorCol).toBe(0);
2180
2282
  });
2181
- it('should handle deleting the last line properly', () => {
2283
+ it('should handle deleting the last line properly', async () => {
2182
2284
  const state = createTestState(['line1', 'line2'], 1, 0);
2183
2285
  const action = {
2184
2286
  type: 'vim_delete_line',
@@ -2191,7 +2293,7 @@ describe('textBufferReducer vim operations', () => {
2191
2293
  expect(result.cursorRow).toBe(0);
2192
2294
  expect(result.cursorCol).toBe(0);
2193
2295
  });
2194
- it('should handle deleting all lines and maintain valid state for subsequent paste', () => {
2296
+ it('should handle deleting all lines and maintain valid state for subsequent paste', async () => {
2195
2297
  const state = createTestState(['line1', 'line2', 'line3', 'line4'], 0, 0);
2196
2298
  // Delete all 4 lines with 4dd
2197
2299
  const deleteAction = {
@@ -2220,43 +2322,43 @@ describe('textBufferReducer vim operations', () => {
2220
2322
  });
2221
2323
  describe('Unicode helper functions', () => {
2222
2324
  describe('findWordEndInLine with Unicode', () => {
2223
- it('should handle combining characters', () => {
2325
+ it('should handle combining characters', async () => {
2224
2326
  // café with combining accent
2225
2327
  const cafeWithCombining = 'cafe\u0301';
2226
2328
  const result = findWordEndInLine(cafeWithCombining + ' test', 0);
2227
2329
  expect(result).toBe(3); // End of 'café' at base character 'e', not combining accent
2228
2330
  });
2229
- it('should handle precomposed characters with diacritics', () => {
2331
+ it('should handle precomposed characters with diacritics', async () => {
2230
2332
  // café with precomposed é (U+00E9)
2231
2333
  const cafePrecomposed = 'café';
2232
2334
  const result = findWordEndInLine(cafePrecomposed + ' test', 0);
2233
2335
  expect(result).toBe(3); // End of 'café' at precomposed character 'é'
2234
2336
  });
2235
- it('should return null when no word end found', () => {
2337
+ it('should return null when no word end found', async () => {
2236
2338
  const result = findWordEndInLine(' ', 0);
2237
2339
  expect(result).toBeNull(); // No word end found in whitespace-only string string
2238
2340
  });
2239
2341
  });
2240
2342
  describe('findNextWordStartInLine with Unicode', () => {
2241
- it('should handle right-to-left text', () => {
2343
+ it('should handle right-to-left text', async () => {
2242
2344
  const result = findNextWordStartInLine('hello مرحبا world', 0);
2243
2345
  expect(result).toBe(6); // Start of Arabic word
2244
2346
  });
2245
- it('should handle Chinese characters', () => {
2347
+ it('should handle Chinese characters', async () => {
2246
2348
  const result = findNextWordStartInLine('hello 你好 world', 0);
2247
2349
  expect(result).toBe(6); // Start of Chinese word
2248
2350
  });
2249
- it('should return null at end of line', () => {
2351
+ it('should return null at end of line', async () => {
2250
2352
  const result = findNextWordStartInLine('hello', 10);
2251
2353
  expect(result).toBeNull();
2252
2354
  });
2253
- it('should handle combining characters', () => {
2355
+ it('should handle combining characters', async () => {
2254
2356
  // café with combining accent + next word
2255
2357
  const textWithCombining = 'cafe\u0301 test';
2256
2358
  const result = findNextWordStartInLine(textWithCombining, 0);
2257
2359
  expect(result).toBe(6); // Start of 'test' after 'café ' (combining char makes string longer)
2258
2360
  });
2259
- it('should handle precomposed characters with diacritics', () => {
2361
+ it('should handle precomposed characters with diacritics', async () => {
2260
2362
  // café with precomposed é + next word
2261
2363
  const textPrecomposed = 'café test';
2262
2364
  const result = findNextWordStartInLine(textPrecomposed, 0);
@@ -2264,40 +2366,40 @@ describe('Unicode helper functions', () => {
2264
2366
  });
2265
2367
  });
2266
2368
  describe('isWordCharStrict with Unicode', () => {
2267
- it('should return true for ASCII word characters', () => {
2369
+ it('should return true for ASCII word characters', async () => {
2268
2370
  expect(isWordCharStrict('a')).toBe(true);
2269
2371
  expect(isWordCharStrict('Z')).toBe(true);
2270
2372
  expect(isWordCharStrict('0')).toBe(true);
2271
2373
  expect(isWordCharStrict('_')).toBe(true);
2272
2374
  });
2273
- it('should return false for punctuation', () => {
2375
+ it('should return false for punctuation', async () => {
2274
2376
  expect(isWordCharStrict('.')).toBe(false);
2275
2377
  expect(isWordCharStrict(',')).toBe(false);
2276
2378
  expect(isWordCharStrict('!')).toBe(false);
2277
2379
  });
2278
- it('should return true for non-Latin scripts', () => {
2380
+ it('should return true for non-Latin scripts', async () => {
2279
2381
  expect(isWordCharStrict('你')).toBe(true); // Chinese character
2280
2382
  expect(isWordCharStrict('م')).toBe(true); // Arabic character
2281
2383
  });
2282
- it('should return false for whitespace', () => {
2384
+ it('should return false for whitespace', async () => {
2283
2385
  expect(isWordCharStrict(' ')).toBe(false);
2284
2386
  expect(isWordCharStrict('\t')).toBe(false);
2285
2387
  });
2286
2388
  });
2287
2389
  describe('cpLen with Unicode', () => {
2288
- it('should handle combining characters', () => {
2390
+ it('should handle combining characters', async () => {
2289
2391
  expect(cpLen('é')).toBe(1); // Precomposed
2290
2392
  expect(cpLen('e\u0301')).toBe(2); // e + combining acute
2291
2393
  });
2292
- it('should handle Chinese and Arabic text', () => {
2394
+ it('should handle Chinese and Arabic text', async () => {
2293
2395
  expect(cpLen('hello 你好 world')).toBe(14); // 5 + 1 + 2 + 1 + 5 = 14
2294
2396
  expect(cpLen('hello مرحبا world')).toBe(17);
2295
2397
  });
2296
2398
  });
2297
2399
  describe('useTextBuffer CJK Navigation', () => {
2298
2400
  const viewport = { width: 80, height: 24 };
2299
- it('should navigate by word in Chinese', () => {
2300
- const { result } = renderHook(() => useTextBuffer({
2401
+ it('should navigate by word in Chinese', async () => {
2402
+ const { result } = await renderHook(() => useTextBuffer({
2301
2403
  initialText: '你好世界',
2302
2404
  initialCursorOffset: 4, // End of string
2303
2405
  viewport,
@@ -2340,8 +2442,8 @@ describe('Unicode helper functions', () => {
2340
2442
  });
2341
2443
  expect(result.current.cursor[1]).toBe(4);
2342
2444
  });
2343
- it('should navigate mixed English and Chinese', () => {
2344
- const { result } = renderHook(() => useTextBuffer({
2445
+ it('should navigate mixed English and Chinese', async () => {
2446
+ const { result } = await renderHook(() => useTextBuffer({
2345
2447
  initialText: 'Hello你好World',
2346
2448
  initialCursorOffset: 10, // End
2347
2449
  viewport,
@@ -2368,21 +2470,30 @@ describe('Unicode helper functions', () => {
2368
2470
  });
2369
2471
  });
2370
2472
  });
2473
+ const mockPlatform = (platform) => {
2474
+ vi.stubGlobal('process', Object.create(process, {
2475
+ platform: {
2476
+ get: () => platform,
2477
+ },
2478
+ }));
2479
+ };
2371
2480
  describe('Transformation Utilities', () => {
2372
2481
  afterEach(() => {
2373
2482
  vi.restoreAllMocks();
2483
+ vi.unstubAllGlobals();
2374
2484
  });
2375
2485
  describe('getTransformedImagePath', () => {
2376
- it('should transform a simple image path', () => {
2486
+ beforeEach(() => mockPlatform('linux'));
2487
+ it('should transform a simple image path', async () => {
2377
2488
  expect(getTransformedImagePath('@test.png')).toBe('[Image test.png]');
2378
2489
  });
2379
- it('should handle paths with directories', () => {
2490
+ it('should handle paths with directories', async () => {
2380
2491
  expect(getTransformedImagePath('@path/to/image.jpg')).toBe('[Image image.jpg]');
2381
2492
  });
2382
- it('should truncate long filenames', () => {
2493
+ it('should truncate long filenames', async () => {
2383
2494
  expect(getTransformedImagePath('@verylongfilename1234567890.png')).toBe('[Image ...1234567890.png]');
2384
2495
  });
2385
- it('should handle different image extensions', () => {
2496
+ it('should handle different image extensions', async () => {
2386
2497
  expect(getTransformedImagePath('@test.jpg')).toBe('[Image test.jpg]');
2387
2498
  expect(getTransformedImagePath('@test.jpeg')).toBe('[Image test.jpeg]');
2388
2499
  expect(getTransformedImagePath('@test.gif')).toBe('[Image test.gif]');
@@ -2390,21 +2501,17 @@ describe('Transformation Utilities', () => {
2390
2501
  expect(getTransformedImagePath('@test.svg')).toBe('[Image test.svg]');
2391
2502
  expect(getTransformedImagePath('@test.bmp')).toBe('[Image test.bmp]');
2392
2503
  });
2393
- it('should handle POSIX-style forward-slash paths on any platform', () => {
2504
+ it('should handle POSIX-style forward-slash paths on any platform', async () => {
2394
2505
  const input = '@C:/Users/foo/screenshots/image2x.png';
2395
2506
  expect(getTransformedImagePath(input)).toBe('[Image image2x.png]');
2396
2507
  });
2397
- it('should handle Windows-style backslash paths on any platform', () => {
2398
- const input = '@C:\\Users\\foo\\screenshots\\image2x.png';
2399
- expect(getTransformedImagePath(input)).toBe('[Image image2x.png]');
2400
- });
2401
- it('should handle escaped spaces in paths', () => {
2508
+ it('should handle escaped spaces in paths', async () => {
2402
2509
  const input = '@path/to/my\\ file.png';
2403
2510
  expect(getTransformedImagePath(input)).toBe('[Image my file.png]');
2404
2511
  });
2405
2512
  });
2406
2513
  describe('getTransformationsForLine', () => {
2407
- it('should find transformations in a line', () => {
2514
+ it('should find transformations in a line', async () => {
2408
2515
  const line = 'Check out @test.png and @another.jpg';
2409
2516
  const result = calculateTransformationsForLine(line);
2410
2517
  expect(result).toHaveLength(2);
@@ -2417,16 +2524,16 @@ describe('Transformation Utilities', () => {
2417
2524
  collapsedText: '[Image another.jpg]',
2418
2525
  });
2419
2526
  });
2420
- it('should handle no transformations', () => {
2527
+ it('should handle no transformations', async () => {
2421
2528
  const line = 'Just some regular text';
2422
2529
  const result = calculateTransformationsForLine(line);
2423
2530
  expect(result).toEqual([]);
2424
2531
  });
2425
- it('should handle empty line', () => {
2532
+ it('should handle empty line', async () => {
2426
2533
  const result = calculateTransformationsForLine('');
2427
2534
  expect(result).toEqual([]);
2428
2535
  });
2429
- it('should keep adjacent image paths as separate transformations', () => {
2536
+ it('should keep adjacent image paths as separate transformations', async () => {
2430
2537
  const line = '@a.png@b.png@c.png';
2431
2538
  const result = calculateTransformationsForLine(line);
2432
2539
  expect(result).toHaveLength(3);
@@ -2434,7 +2541,7 @@ describe('Transformation Utilities', () => {
2434
2541
  expect(result[1].logicalText).toBe('@b.png');
2435
2542
  expect(result[2].logicalText).toBe('@c.png');
2436
2543
  });
2437
- it('should handle multiple transformations in a row', () => {
2544
+ it('should handle multiple transformations in a row', async () => {
2438
2545
  const line = '@a.png @b.png @c.png';
2439
2546
  const result = calculateTransformationsForLine(line);
2440
2547
  expect(result).toHaveLength(3);
@@ -2457,27 +2564,27 @@ describe('Transformation Utilities', () => {
2457
2564
  type: 'image',
2458
2565
  },
2459
2566
  ];
2460
- it('should find transformation when cursor is inside it', () => {
2567
+ it('should find transformation when cursor is inside it', async () => {
2461
2568
  const result = getTransformUnderCursor(0, 7, [transformations]);
2462
2569
  expect(result).toEqual(transformations[0]);
2463
2570
  });
2464
- it('should find transformation when cursor is at start', () => {
2571
+ it('should find transformation when cursor is at start', async () => {
2465
2572
  const result = getTransformUnderCursor(0, 5, [transformations]);
2466
2573
  expect(result).toEqual(transformations[0]);
2467
2574
  });
2468
- it('should NOT find transformation when cursor is at end', () => {
2575
+ it('should NOT find transformation when cursor is at end', async () => {
2469
2576
  const result = getTransformUnderCursor(0, 14, [transformations]);
2470
2577
  expect(result).toBeNull();
2471
2578
  });
2472
- it('should return null when cursor is not on a transformation', () => {
2579
+ it('should return null when cursor is not on a transformation', async () => {
2473
2580
  const result = getTransformUnderCursor(0, 2, [transformations]);
2474
2581
  expect(result).toBeNull();
2475
2582
  });
2476
- it('should handle empty transformations array', () => {
2583
+ it('should handle empty transformations array', async () => {
2477
2584
  const result = getTransformUnderCursor(0, 5, []);
2478
2585
  expect(result).toBeNull();
2479
2586
  });
2480
- it('regression: should not find paste transformation when clicking one character after it', () => {
2587
+ it('regression: should not find paste transformation when clicking one character after it', async () => {
2481
2588
  const pasteId = '[Pasted Text: 5 lines]';
2482
2589
  const line = pasteId + ' suffix';
2483
2590
  const transformations = calculateTransformationsForLine(line);
@@ -2491,7 +2598,7 @@ describe('Transformation Utilities', () => {
2491
2598
  });
2492
2599
  });
2493
2600
  describe('calculateTransformedLine', () => {
2494
- it('should transform a line with one transformation', () => {
2601
+ it('should transform a line with one transformation', async () => {
2495
2602
  const line = 'Check out @test.png';
2496
2603
  const transformations = calculateTransformationsForLine(line);
2497
2604
  const result = calculateTransformedLine(line, 0, [0, 0], transformations);
@@ -2501,7 +2608,7 @@ describe('Transformation Utilities', () => {
2501
2608
  expect(result.transformedToLogMap[0]).toBe(0); // 'C'
2502
2609
  expect(result.transformedToLogMap[9]).toBe(9); // ' ' before transformation
2503
2610
  });
2504
- it('should handle cursor inside transformation', () => {
2611
+ it('should handle cursor inside transformation', async () => {
2505
2612
  const line = 'Check out @test.png';
2506
2613
  const transformations = calculateTransformationsForLine(line);
2507
2614
  // Cursor at '@' (position 10 in the line)
@@ -2511,7 +2618,7 @@ describe('Transformation Utilities', () => {
2511
2618
  // When expanded, each character maps to itself
2512
2619
  expect(result.transformedToLogMap[10]).toBe(10); // '@'
2513
2620
  });
2514
- it('should handle line with no transformations', () => {
2621
+ it('should handle line with no transformations', async () => {
2515
2622
  const line = 'Just some text';
2516
2623
  const result = calculateTransformedLine(line, 0, [0, 0], []);
2517
2624
  expect(result.transformedLine).toBe(line);
@@ -2521,7 +2628,7 @@ describe('Transformation Utilities', () => {
2521
2628
  expect(result.transformedToLogMap[13]).toBe(13);
2522
2629
  expect(result.transformedToLogMap[14]).toBe(14); // Trailing position
2523
2630
  });
2524
- it('should handle empty line', () => {
2631
+ it('should handle empty line', async () => {
2525
2632
  const result = calculateTransformedLine('', 0, [0, 0], []);
2526
2633
  expect(result.transformedLine).toBe('');
2527
2634
  expect(result.transformedToLogMap).toEqual([0]); // Just the trailing position
@@ -2539,9 +2646,9 @@ describe('Transformation Utilities', () => {
2539
2646
  actFn: (result) => result.current.replaceRange(0, 0, 0, 13, 'changed line'),
2540
2647
  expected: 'changed line',
2541
2648
  },
2542
- ])('should invalidate cache when line content changes $desc', ({ actFn, expected }) => {
2649
+ ])('should invalidate cache when line content changes $desc', async ({ actFn, expected }) => {
2543
2650
  const viewport = { width: 80, height: 24 };
2544
- const { result } = renderHookWithProviders(() => useTextBuffer({
2651
+ const { result } = await renderHookWithProviders(() => useTextBuffer({
2545
2652
  initialText: 'original line',
2546
2653
  viewport,
2547
2654
  escapePastedPaths: true,
@@ -2553,9 +2660,9 @@ describe('Transformation Utilities', () => {
2553
2660
  expect(result.current.visualLayout).not.toBe(originalLayout);
2554
2661
  expect(result.current.allVisualLines[0]).toBe(expected);
2555
2662
  });
2556
- it('should invalidate cache when viewport width changes', () => {
2663
+ it('should invalidate cache when viewport width changes', async () => {
2557
2664
  const viewport = { width: 80, height: 24 };
2558
- const { result, rerender } = renderHookWithProviders(({ vp }) => useTextBuffer({
2665
+ const { result, rerender } = await renderHookWithProviders(({ vp }) => useTextBuffer({
2559
2666
  initialText: 'a very long line that will wrap when the viewport is small',
2560
2667
  viewport: vp,
2561
2668
  escapePastedPaths: true,
@@ -2566,10 +2673,10 @@ describe('Transformation Utilities', () => {
2566
2673
  expect(result.current.visualLayout).not.toBe(originalLayout);
2567
2674
  expect(result.current.allVisualLines.length).toBeGreaterThan(1);
2568
2675
  });
2569
- it('should correctly handle cursor expansion/collapse in cached layout', () => {
2676
+ it('should correctly handle cursor expansion/collapse in cached layout', async () => {
2570
2677
  const viewport = { width: 80, height: 24 };
2571
2678
  const text = 'Check @image.png here';
2572
- const { result } = renderHookWithProviders(() => useTextBuffer({
2679
+ const { result } = await renderHookWithProviders(() => useTextBuffer({
2573
2680
  initialText: text,
2574
2681
  viewport,
2575
2682
  escapePastedPaths: true,
@@ -2591,10 +2698,10 @@ describe('Transformation Utilities', () => {
2591
2698
  });
2592
2699
  expect(result.current.allVisualLines[0]).toContain('[Image image.png]');
2593
2700
  });
2594
- it('should reuse cache for unchanged lines during editing', () => {
2701
+ it('should reuse cache for unchanged lines during editing', async () => {
2595
2702
  const viewport = { width: 80, height: 24 };
2596
2703
  const initialText = 'line 1\nline 2\nline 3';
2597
- const { result } = renderHookWithProviders(() => useTextBuffer({
2704
+ const { result } = await renderHookWithProviders(() => useTextBuffer({
2598
2705
  initialText,
2599
2706
  viewport,
2600
2707
  escapePastedPaths: true,
@@ -2615,10 +2722,10 @@ describe('Transformation Utilities', () => {
2615
2722
  });
2616
2723
  describe('Scroll Regressions', () => {
2617
2724
  const scrollViewport = { width: 80, height: 5 };
2618
- it('should not show empty viewport when collapsing a large paste that was scrolled', () => {
2725
+ it('should not show empty viewport when collapsing a large paste that was scrolled', async () => {
2619
2726
  const largeContent = 'line1\nline2\nline3\nline4\nline5\nline6\nline7\nline8\nline9\nline10';
2620
2727
  const placeholder = '[Pasted Text: 10 lines]';
2621
- const { result } = renderHook(() => useTextBuffer({
2728
+ const { result } = await renderHook(() => useTextBuffer({
2622
2729
  initialText: placeholder,
2623
2730
  viewport: scrollViewport,
2624
2731
  }));