@terminai/cli 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2129) hide show
  1. package/dist/.last_build +0 -0
  2. package/dist/index.d.ts +8 -0
  3. package/dist/index.js +32 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/package.json +98 -0
  6. package/dist/src/commands/extensions/disable.d.ts +14 -0
  7. package/dist/src/commands/extensions/disable.js +70 -0
  8. package/dist/src/commands/extensions/disable.js.map +1 -0
  9. package/dist/src/commands/extensions/disable.test.d.ts +7 -0
  10. package/dist/src/commands/extensions/disable.test.js +170 -0
  11. package/dist/src/commands/extensions/disable.test.js.map +1 -0
  12. package/dist/src/commands/extensions/enable.d.ts +14 -0
  13. package/dist/src/commands/extensions/enable.js +72 -0
  14. package/dist/src/commands/extensions/enable.js.map +1 -0
  15. package/dist/src/commands/extensions/enable.test.d.ts +7 -0
  16. package/dist/src/commands/extensions/enable.test.js +151 -0
  17. package/dist/src/commands/extensions/enable.test.js.map +1 -0
  18. package/dist/src/commands/extensions/examples/context/gemini-extension.json +4 -0
  19. package/dist/src/commands/extensions/examples/context/terminaI.md +14 -0
  20. package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
  21. package/dist/src/commands/extensions/examples/custom-commands/gemini-extension.json +4 -0
  22. package/dist/src/commands/extensions/examples/exclude-tools/gemini-extension.json +5 -0
  23. package/dist/src/commands/extensions/examples/mcp-server/example.d.ts +7 -0
  24. package/dist/src/commands/extensions/examples/mcp-server/example.js +47 -0
  25. package/dist/src/commands/extensions/examples/mcp-server/example.js.map +1 -0
  26. package/dist/src/commands/extensions/examples/mcp-server/example.test.d.ts +7 -0
  27. package/dist/src/commands/extensions/examples/mcp-server/example.test.js +112 -0
  28. package/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +1 -0
  29. package/dist/src/commands/extensions/examples/mcp-server/example.test.ts +136 -0
  30. package/dist/src/commands/extensions/examples/mcp-server/example.ts +61 -0
  31. package/dist/src/commands/extensions/examples/mcp-server/gemini-extension.json +11 -0
  32. package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
  33. package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
  34. package/dist/src/commands/extensions/install.d.ts +17 -0
  35. package/dist/src/commands/extensions/install.js +112 -0
  36. package/dist/src/commands/extensions/install.js.map +1 -0
  37. package/dist/src/commands/extensions/install.test.d.ts +7 -0
  38. package/dist/src/commands/extensions/install.test.js +123 -0
  39. package/dist/src/commands/extensions/install.test.js.map +1 -0
  40. package/dist/src/commands/extensions/link.d.ts +14 -0
  41. package/dist/src/commands/extensions/link.js +65 -0
  42. package/dist/src/commands/extensions/link.js.map +1 -0
  43. package/dist/src/commands/extensions/link.test.d.ts +7 -0
  44. package/dist/src/commands/extensions/link.test.js +138 -0
  45. package/dist/src/commands/extensions/link.test.js.map +1 -0
  46. package/dist/src/commands/extensions/list.d.ts +9 -0
  47. package/dist/src/commands/extensions/list.js +46 -0
  48. package/dist/src/commands/extensions/list.js.map +1 -0
  49. package/dist/src/commands/extensions/list.test.d.ts +7 -0
  50. package/dist/src/commands/extensions/list.test.js +112 -0
  51. package/dist/src/commands/extensions/list.test.js.map +1 -0
  52. package/dist/src/commands/extensions/new.d.ts +8 -0
  53. package/dist/src/commands/extensions/new.js +87 -0
  54. package/dist/src/commands/extensions/new.js.map +1 -0
  55. package/dist/src/commands/extensions/new.test.d.ts +7 -0
  56. package/dist/src/commands/extensions/new.test.js +63 -0
  57. package/dist/src/commands/extensions/new.test.js.map +1 -0
  58. package/dist/src/commands/extensions/settings.d.ts +8 -0
  59. package/dist/src/commands/extensions/settings.js +112 -0
  60. package/dist/src/commands/extensions/settings.js.map +1 -0
  61. package/dist/src/commands/extensions/uninstall.d.ts +13 -0
  62. package/dist/src/commands/extensions/uninstall.js +68 -0
  63. package/dist/src/commands/extensions/uninstall.js.map +1 -0
  64. package/dist/src/commands/extensions/uninstall.test.d.ts +7 -0
  65. package/dist/src/commands/extensions/uninstall.test.js +200 -0
  66. package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
  67. package/dist/src/commands/extensions/update.d.ts +14 -0
  68. package/dist/src/commands/extensions/update.js +108 -0
  69. package/dist/src/commands/extensions/update.js.map +1 -0
  70. package/dist/src/commands/extensions/update.test.d.ts +7 -0
  71. package/dist/src/commands/extensions/update.test.js +171 -0
  72. package/dist/src/commands/extensions/update.test.js.map +1 -0
  73. package/dist/src/commands/extensions/utils.d.ts +14 -0
  74. package/dist/src/commands/extensions/utils.js +30 -0
  75. package/dist/src/commands/extensions/utils.js.map +1 -0
  76. package/dist/src/commands/extensions/validate.d.ts +13 -0
  77. package/dist/src/commands/extensions/validate.js +86 -0
  78. package/dist/src/commands/extensions/validate.js.map +1 -0
  79. package/dist/src/commands/extensions/validate.test.d.ts +7 -0
  80. package/dist/src/commands/extensions/validate.test.js +97 -0
  81. package/dist/src/commands/extensions/validate.test.js.map +1 -0
  82. package/dist/src/commands/extensions.d.ts +8 -0
  83. package/dist/src/commands/extensions.js +41 -0
  84. package/dist/src/commands/extensions.js.map +1 -0
  85. package/dist/src/commands/extensions.test.d.ts +7 -0
  86. package/dist/src/commands/extensions.test.js +68 -0
  87. package/dist/src/commands/extensions.test.js.map +1 -0
  88. package/dist/src/commands/hooks/migrate.d.ts +12 -0
  89. package/dist/src/commands/hooks/migrate.js +207 -0
  90. package/dist/src/commands/hooks/migrate.js.map +1 -0
  91. package/dist/src/commands/hooks/migrate.test.d.ts +7 -0
  92. package/dist/src/commands/hooks/migrate.test.js +390 -0
  93. package/dist/src/commands/hooks/migrate.test.js.map +1 -0
  94. package/dist/src/commands/hooks.d.ts +8 -0
  95. package/dist/src/commands/hooks.js +23 -0
  96. package/dist/src/commands/hooks.js.map +1 -0
  97. package/dist/src/commands/mcp/add.d.ts +8 -0
  98. package/dist/src/commands/mcp/add.js +179 -0
  99. package/dist/src/commands/mcp/add.js.map +1 -0
  100. package/dist/src/commands/mcp/add.test.d.ts +7 -0
  101. package/dist/src/commands/mcp/add.test.js +275 -0
  102. package/dist/src/commands/mcp/add.test.js.map +1 -0
  103. package/dist/src/commands/mcp/list.d.ts +9 -0
  104. package/dist/src/commands/mcp/list.js +123 -0
  105. package/dist/src/commands/mcp/list.js.map +1 -0
  106. package/dist/src/commands/mcp/list.test.d.ts +7 -0
  107. package/dist/src/commands/mcp/list.test.js +127 -0
  108. package/dist/src/commands/mcp/list.test.js.map +1 -0
  109. package/dist/src/commands/mcp/remove.d.ts +8 -0
  110. package/dist/src/commands/mcp/remove.js +48 -0
  111. package/dist/src/commands/mcp/remove.js.map +1 -0
  112. package/dist/src/commands/mcp/remove.test.d.ts +7 -0
  113. package/dist/src/commands/mcp/remove.test.js +190 -0
  114. package/dist/src/commands/mcp/remove.test.js.map +1 -0
  115. package/dist/src/commands/mcp.d.ts +8 -0
  116. package/dist/src/commands/mcp.js +26 -0
  117. package/dist/src/commands/mcp.js.map +1 -0
  118. package/dist/src/commands/mcp.test.d.ts +7 -0
  119. package/dist/src/commands/mcp.test.js +64 -0
  120. package/dist/src/commands/mcp.test.js.map +1 -0
  121. package/dist/src/commands/utils.d.ts +7 -0
  122. package/dist/src/commands/utils.js +12 -0
  123. package/dist/src/commands/utils.js.map +1 -0
  124. package/dist/src/commands/utils.test.d.ts +7 -0
  125. package/dist/src/commands/utils.test.js +36 -0
  126. package/dist/src/commands/utils.test.js.map +1 -0
  127. package/dist/src/commands/voice/install.d.ts +8 -0
  128. package/dist/src/commands/voice/install.js +214 -0
  129. package/dist/src/commands/voice/install.js.map +1 -0
  130. package/dist/src/commands/voice.d.ts +8 -0
  131. package/dist/src/commands/voice.js +19 -0
  132. package/dist/src/commands/voice.js.map +1 -0
  133. package/dist/src/config/auth.d.ts +7 -0
  134. package/dist/src/config/auth.js +41 -0
  135. package/dist/src/config/auth.js.map +1 -0
  136. package/dist/src/config/auth.test.d.ts +7 -0
  137. package/dist/src/config/auth.test.js +99 -0
  138. package/dist/src/config/auth.test.js.map +1 -0
  139. package/dist/src/config/config.d.ts +52 -0
  140. package/dist/src/config/config.integration.test.d.ts +7 -0
  141. package/dist/src/config/config.integration.test.js +222 -0
  142. package/dist/src/config/config.integration.test.js.map +1 -0
  143. package/dist/src/config/config.js +682 -0
  144. package/dist/src/config/config.js.map +1 -0
  145. package/dist/src/config/config.test.d.ts +7 -0
  146. package/dist/src/config/config.test.js +2143 -0
  147. package/dist/src/config/config.test.js.map +1 -0
  148. package/dist/src/config/extension-manager.d.ts +64 -0
  149. package/dist/src/config/extension-manager.js +519 -0
  150. package/dist/src/config/extension-manager.js.map +1 -0
  151. package/dist/src/config/extension.d.ts +29 -0
  152. package/dist/src/config/extension.js +21 -0
  153. package/dist/src/config/extension.js.map +1 -0
  154. package/dist/src/config/extension.test.d.ts +7 -0
  155. package/dist/src/config/extension.test.js +1543 -0
  156. package/dist/src/config/extension.test.js.map +1 -0
  157. package/dist/src/config/extensions/consent.d.ts +39 -0
  158. package/dist/src/config/extensions/consent.js +127 -0
  159. package/dist/src/config/extensions/consent.js.map +1 -0
  160. package/dist/src/config/extensions/consent.test.d.ts +7 -0
  161. package/dist/src/config/extensions/consent.test.js +163 -0
  162. package/dist/src/config/extensions/consent.test.js.map +1 -0
  163. package/dist/src/config/extensions/extensionEnablement.d.ts +48 -0
  164. package/dist/src/config/extensions/extensionEnablement.js +191 -0
  165. package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
  166. package/dist/src/config/extensions/extensionEnablement.test.d.ts +7 -0
  167. package/dist/src/config/extensions/extensionEnablement.test.js +405 -0
  168. package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
  169. package/dist/src/config/extensions/extensionSettings.d.ts +22 -0
  170. package/dist/src/config/extensions/extensionSettings.js +185 -0
  171. package/dist/src/config/extensions/extensionSettings.js.map +1 -0
  172. package/dist/src/config/extensions/extensionSettings.test.d.ts +7 -0
  173. package/dist/src/config/extensions/extensionSettings.test.js +494 -0
  174. package/dist/src/config/extensions/extensionSettings.test.js.map +1 -0
  175. package/dist/src/config/extensions/github.d.ts +51 -0
  176. package/dist/src/config/extensions/github.js +417 -0
  177. package/dist/src/config/extensions/github.js.map +1 -0
  178. package/dist/src/config/extensions/github.test.d.ts +7 -0
  179. package/dist/src/config/extensions/github.test.js +442 -0
  180. package/dist/src/config/extensions/github.test.js.map +1 -0
  181. package/dist/src/config/extensions/github_fetch.d.ts +8 -0
  182. package/dist/src/config/extensions/github_fetch.js +47 -0
  183. package/dist/src/config/extensions/github_fetch.js.map +1 -0
  184. package/dist/src/config/extensions/github_fetch.test.d.ts +7 -0
  185. package/dist/src/config/extensions/github_fetch.test.js +170 -0
  186. package/dist/src/config/extensions/github_fetch.test.js.map +1 -0
  187. package/dist/src/config/extensions/storage.d.ts +15 -0
  188. package/dist/src/config/extensions/storage.js +33 -0
  189. package/dist/src/config/extensions/storage.js.map +1 -0
  190. package/dist/src/config/extensions/storage.test.d.ts +7 -0
  191. package/dist/src/config/extensions/storage.test.js +65 -0
  192. package/dist/src/config/extensions/storage.test.js.map +1 -0
  193. package/dist/src/config/extensions/update.d.ts +21 -0
  194. package/dist/src/config/extensions/update.js +121 -0
  195. package/dist/src/config/extensions/update.js.map +1 -0
  196. package/dist/src/config/extensions/update.test.d.ts +7 -0
  197. package/dist/src/config/extensions/update.test.js +232 -0
  198. package/dist/src/config/extensions/update.test.js.map +1 -0
  199. package/dist/src/config/extensions/variableSchema.d.ts +33 -0
  200. package/dist/src/config/extensions/variableSchema.js +23 -0
  201. package/dist/src/config/extensions/variableSchema.js.map +1 -0
  202. package/dist/src/config/extensions/variables.d.ts +22 -0
  203. package/dist/src/config/extensions/variables.js +47 -0
  204. package/dist/src/config/extensions/variables.js.map +1 -0
  205. package/dist/src/config/extensions/variables.test.d.ts +7 -0
  206. package/dist/src/config/extensions/variables.test.js +104 -0
  207. package/dist/src/config/extensions/variables.test.js.map +1 -0
  208. package/dist/src/config/keyBindings.d.ts +94 -0
  209. package/dist/src/config/keyBindings.js +309 -0
  210. package/dist/src/config/keyBindings.js.map +1 -0
  211. package/dist/src/config/keyBindings.test.d.ts +7 -0
  212. package/dist/src/config/keyBindings.test.js +94 -0
  213. package/dist/src/config/keyBindings.test.js.map +1 -0
  214. package/dist/src/config/policy-engine.integration.test.d.ts +7 -0
  215. package/dist/src/config/policy-engine.integration.test.js +292 -0
  216. package/dist/src/config/policy-engine.integration.test.js.map +1 -0
  217. package/dist/src/config/policy.d.ts +11 -0
  218. package/dist/src/config/policy.js +25 -0
  219. package/dist/src/config/policy.js.map +1 -0
  220. package/dist/src/config/sandboxConfig.d.ts +13 -0
  221. package/dist/src/config/sandboxConfig.js +81 -0
  222. package/dist/src/config/sandboxConfig.js.map +1 -0
  223. package/dist/src/config/sandboxConfig.test.d.ts +7 -0
  224. package/dist/src/config/sandboxConfig.test.js +179 -0
  225. package/dist/src/config/sandboxConfig.test.js.map +1 -0
  226. package/dist/src/config/settingPaths.d.ts +11 -0
  227. package/dist/src/config/settingPaths.js +12 -0
  228. package/dist/src/config/settingPaths.js.map +1 -0
  229. package/dist/src/config/settingPaths.test.d.ts +7 -0
  230. package/dist/src/config/settingPaths.test.js +23 -0
  231. package/dist/src/config/settingPaths.test.js.map +1 -0
  232. package/dist/src/config/settings-validation.d.ts +24 -0
  233. package/dist/src/config/settings-validation.js +250 -0
  234. package/dist/src/config/settings-validation.js.map +1 -0
  235. package/dist/src/config/settings-validation.test.d.ts +7 -0
  236. package/dist/src/config/settings-validation.test.js +323 -0
  237. package/dist/src/config/settings-validation.test.js.map +1 -0
  238. package/dist/src/config/settings.d.ts +22 -0
  239. package/dist/src/config/settings.js +55 -0
  240. package/dist/src/config/settings.js.map +1 -0
  241. package/dist/src/config/settings.test.d.ts +7 -0
  242. package/dist/src/config/settings.test.js +1648 -0
  243. package/dist/src/config/settings.test.js.map +1 -0
  244. package/dist/src/config/settingsSchema.d.ts +2132 -0
  245. package/dist/src/config/settingsSchema.js +2340 -0
  246. package/dist/src/config/settingsSchema.js.map +1 -0
  247. package/dist/src/config/settingsSchema.test.d.ts +7 -0
  248. package/dist/src/config/settingsSchema.test.js +274 -0
  249. package/dist/src/config/settingsSchema.test.js.map +1 -0
  250. package/dist/src/config/settings_repro.test.d.ts +7 -0
  251. package/dist/src/config/settings_repro.test.js +162 -0
  252. package/dist/src/config/settings_repro.test.js.map +1 -0
  253. package/dist/src/config/trustedFolders.d.ts +57 -0
  254. package/dist/src/config/trustedFolders.js +192 -0
  255. package/dist/src/config/trustedFolders.js.map +1 -0
  256. package/dist/src/config/trustedFolders.test.d.ts +7 -0
  257. package/dist/src/config/trustedFolders.test.js +379 -0
  258. package/dist/src/config/trustedFolders.test.js.map +1 -0
  259. package/dist/src/core/auth.d.ts +14 -0
  260. package/dist/src/core/auth.js +28 -0
  261. package/dist/src/core/auth.js.map +1 -0
  262. package/dist/src/core/auth.test.d.ts +7 -0
  263. package/dist/src/core/auth.test.js +44 -0
  264. package/dist/src/core/auth.test.js.map +1 -0
  265. package/dist/src/core/initializer.d.ts +22 -0
  266. package/dist/src/core/initializer.js +45 -0
  267. package/dist/src/core/initializer.js.map +1 -0
  268. package/dist/src/core/initializer.test.d.ts +7 -0
  269. package/dist/src/core/initializer.test.js +102 -0
  270. package/dist/src/core/initializer.test.js.map +1 -0
  271. package/dist/src/core/theme.d.ts +13 -0
  272. package/dist/src/core/theme.js +21 -0
  273. package/dist/src/core/theme.js.map +1 -0
  274. package/dist/src/core/theme.test.d.ts +7 -0
  275. package/dist/src/core/theme.test.js +47 -0
  276. package/dist/src/core/theme.test.js.map +1 -0
  277. package/dist/src/gemini.d.ts +17 -0
  278. package/dist/src/gemini.js +694 -0
  279. package/dist/src/gemini.js.map +1 -0
  280. package/dist/src/gemini.test.d.ts +7 -0
  281. package/dist/src/gemini.test.js +1315 -0
  282. package/dist/src/gemini.test.js.map +1 -0
  283. package/dist/src/gemini_cleanup.test.d.ts +7 -0
  284. package/dist/src/gemini_cleanup.test.js +204 -0
  285. package/dist/src/gemini_cleanup.test.js.map +1 -0
  286. package/dist/src/generated/git-commit.d.ts +8 -0
  287. package/dist/src/generated/git-commit.js +11 -0
  288. package/dist/src/generated/git-commit.js.map +1 -0
  289. package/dist/src/nonInteractiveCli.d.ts +18 -0
  290. package/dist/src/nonInteractiveCli.js +443 -0
  291. package/dist/src/nonInteractiveCli.js.map +1 -0
  292. package/dist/src/nonInteractiveCli.test.d.ts +7 -0
  293. package/dist/src/nonInteractiveCli.test.js +1397 -0
  294. package/dist/src/nonInteractiveCli.test.js.map +1 -0
  295. package/dist/src/nonInteractiveCliCommands.d.ts +18 -0
  296. package/dist/src/nonInteractiveCliCommands.js +79 -0
  297. package/dist/src/nonInteractiveCliCommands.js.map +1 -0
  298. package/dist/src/patches/is-in-ci.d.ts +8 -0
  299. package/dist/src/patches/is-in-ci.js +16 -0
  300. package/dist/src/patches/is-in-ci.js.map +1 -0
  301. package/dist/src/services/BuiltinCommandLoader.d.ts +25 -0
  302. package/dist/src/services/BuiltinCommandLoader.js +111 -0
  303. package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
  304. package/dist/src/services/BuiltinCommandLoader.test.d.ts +7 -0
  305. package/dist/src/services/BuiltinCommandLoader.test.js +201 -0
  306. package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -0
  307. package/dist/src/services/CommandService.d.ts +56 -0
  308. package/dist/src/services/CommandService.js +92 -0
  309. package/dist/src/services/CommandService.js.map +1 -0
  310. package/dist/src/services/CommandService.test.d.ts +7 -0
  311. package/dist/src/services/CommandService.test.js +235 -0
  312. package/dist/src/services/CommandService.test.js.map +1 -0
  313. package/dist/src/services/FileCommandLoader.d.ts +52 -0
  314. package/dist/src/services/FileCommandLoader.js +231 -0
  315. package/dist/src/services/FileCommandLoader.js.map +1 -0
  316. package/dist/src/services/FileCommandLoader.test.d.ts +7 -0
  317. package/dist/src/services/FileCommandLoader.test.js +1047 -0
  318. package/dist/src/services/FileCommandLoader.test.js.map +1 -0
  319. package/dist/src/services/McpPromptLoader.d.ts +36 -0
  320. package/dist/src/services/McpPromptLoader.js +257 -0
  321. package/dist/src/services/McpPromptLoader.js.map +1 -0
  322. package/dist/src/services/McpPromptLoader.test.d.ts +7 -0
  323. package/dist/src/services/McpPromptLoader.test.js +412 -0
  324. package/dist/src/services/McpPromptLoader.test.js.map +1 -0
  325. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +17 -0
  326. package/dist/src/services/prompt-processors/argumentProcessor.js +22 -0
  327. package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
  328. package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +7 -0
  329. package/dist/src/services/prompt-processors/argumentProcessor.test.js +41 -0
  330. package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +1 -0
  331. package/dist/src/services/prompt-processors/atFileProcessor.d.ts +13 -0
  332. package/dist/src/services/prompt-processors/atFileProcessor.js +64 -0
  333. package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
  334. package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +7 -0
  335. package/dist/src/services/prompt-processors/atFileProcessor.test.js +175 -0
  336. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
  337. package/dist/src/services/prompt-processors/injectionParser.d.ts +30 -0
  338. package/dist/src/services/prompt-processors/injectionParser.js +61 -0
  339. package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
  340. package/dist/src/services/prompt-processors/injectionParser.test.d.ts +7 -0
  341. package/dist/src/services/prompt-processors/injectionParser.test.js +190 -0
  342. package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
  343. package/dist/src/services/prompt-processors/shellProcessor.d.ts +28 -0
  344. package/dist/src/services/prompt-processors/shellProcessor.js +129 -0
  345. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
  346. package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +7 -0
  347. package/dist/src/services/prompt-processors/shellProcessor.test.js +483 -0
  348. package/dist/src/services/prompt-processors/shellProcessor.test.js.map +1 -0
  349. package/dist/src/services/prompt-processors/types.d.ts +46 -0
  350. package/dist/src/services/prompt-processors/types.js +21 -0
  351. package/dist/src/services/prompt-processors/types.js.map +1 -0
  352. package/dist/src/services/types.d.ts +23 -0
  353. package/dist/src/services/types.js +8 -0
  354. package/dist/src/services/types.js.map +1 -0
  355. package/dist/src/test-utils/async.d.ts +10 -0
  356. package/dist/src/test-utils/async.js +30 -0
  357. package/dist/src/test-utils/async.js.map +1 -0
  358. package/dist/src/test-utils/createExtension.d.ts +18 -0
  359. package/dist/src/test-utils/createExtension.js +26 -0
  360. package/dist/src/test-utils/createExtension.js.map +1 -0
  361. package/dist/src/test-utils/customMatchers.d.ts +15 -0
  362. package/dist/src/test-utils/customMatchers.js +41 -0
  363. package/dist/src/test-utils/customMatchers.js.map +1 -0
  364. package/dist/src/test-utils/mockCommandContext.d.ts +19 -0
  365. package/dist/src/test-utils/mockCommandContext.js +89 -0
  366. package/dist/src/test-utils/mockCommandContext.js.map +1 -0
  367. package/dist/src/test-utils/mockCommandContext.test.d.ts +7 -0
  368. package/dist/src/test-utils/mockCommandContext.test.js +52 -0
  369. package/dist/src/test-utils/mockCommandContext.test.js.map +1 -0
  370. package/dist/src/test-utils/render.d.ts +59 -0
  371. package/dist/src/test-utils/render.js +230 -0
  372. package/dist/src/test-utils/render.js.map +1 -0
  373. package/dist/src/test-utils/render.test.d.ts +7 -0
  374. package/dist/src/test-utils/render.test.js +80 -0
  375. package/dist/src/test-utils/render.test.js.map +1 -0
  376. package/dist/src/ui/App.d.ts +7 -0
  377. package/dist/src/ui/App.js +30 -0
  378. package/dist/src/ui/App.js.map +1 -0
  379. package/dist/src/ui/App.test.d.ts +7 -0
  380. package/dist/src/ui/App.test.js +165 -0
  381. package/dist/src/ui/App.test.js.map +1 -0
  382. package/dist/src/ui/AppContainer.d.ts +25 -0
  383. package/dist/src/ui/AppContainer.js +1751 -0
  384. package/dist/src/ui/AppContainer.js.map +1 -0
  385. package/dist/src/ui/AppContainer.test.d.ts +7 -0
  386. package/dist/src/ui/AppContainer.test.js +1707 -0
  387. package/dist/src/ui/AppContainer.test.js.map +1 -0
  388. package/dist/src/ui/IdeIntegrationNudge.d.ts +17 -0
  389. package/dist/src/ui/IdeIntegrationNudge.js +50 -0
  390. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
  391. package/dist/src/ui/IdeIntegrationNudge.test.d.ts +7 -0
  392. package/dist/src/ui/IdeIntegrationNudge.test.js +148 -0
  393. package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -0
  394. package/dist/src/ui/Onboarding.d.ts +14 -0
  395. package/dist/src/ui/Onboarding.js +74 -0
  396. package/dist/src/ui/Onboarding.js.map +1 -0
  397. package/dist/src/ui/RemoteConsent.d.ts +17 -0
  398. package/dist/src/ui/RemoteConsent.js +30 -0
  399. package/dist/src/ui/RemoteConsent.js.map +1 -0
  400. package/dist/src/ui/auth/ApiAuthDialog.d.ts +15 -0
  401. package/dist/src/ui/auth/ApiAuthDialog.js +59 -0
  402. package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -0
  403. package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +7 -0
  404. package/dist/src/ui/auth/ApiAuthDialog.test.js +111 -0
  405. package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -0
  406. package/dist/src/ui/auth/AuthDialog.d.ts +19 -0
  407. package/dist/src/ui/auth/AuthDialog.js +135 -0
  408. package/dist/src/ui/auth/AuthDialog.js.map +1 -0
  409. package/dist/src/ui/auth/AuthDialog.test.d.ts +7 -0
  410. package/dist/src/ui/auth/AuthDialog.test.js +289 -0
  411. package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
  412. package/dist/src/ui/auth/AuthInProgress.d.ts +12 -0
  413. package/dist/src/ui/auth/AuthInProgress.js +23 -0
  414. package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
  415. package/dist/src/ui/auth/AuthInProgress.test.d.ts +7 -0
  416. package/dist/src/ui/auth/AuthInProgress.test.js +72 -0
  417. package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -0
  418. package/dist/src/ui/auth/OpenAICompatibleSetupDialog.d.ts +15 -0
  419. package/dist/src/ui/auth/OpenAICompatibleSetupDialog.js +114 -0
  420. package/dist/src/ui/auth/OpenAICompatibleSetupDialog.js.map +1 -0
  421. package/dist/src/ui/auth/ProviderWizard.d.ts +15 -0
  422. package/dist/src/ui/auth/ProviderWizard.js +53 -0
  423. package/dist/src/ui/auth/ProviderWizard.js.map +1 -0
  424. package/dist/src/ui/auth/ProviderWizard.test.d.ts +7 -0
  425. package/dist/src/ui/auth/ProviderWizard.test.js +54 -0
  426. package/dist/src/ui/auth/ProviderWizard.test.js.map +1 -0
  427. package/dist/src/ui/auth/useAuth.d.ts +18 -0
  428. package/dist/src/ui/auth/useAuth.js +115 -0
  429. package/dist/src/ui/auth/useAuth.js.map +1 -0
  430. package/dist/src/ui/auth/useAuth.test.d.ts +7 -0
  431. package/dist/src/ui/auth/useAuth.test.js +190 -0
  432. package/dist/src/ui/auth/useAuth.test.js.map +1 -0
  433. package/dist/src/ui/colors.d.ts +8 -0
  434. package/dist/src/ui/colors.js +58 -0
  435. package/dist/src/ui/colors.js.map +1 -0
  436. package/dist/src/ui/commands/aboutCommand.d.ts +8 -0
  437. package/dist/src/ui/commands/aboutCommand.js +82 -0
  438. package/dist/src/ui/commands/aboutCommand.js.map +1 -0
  439. package/dist/src/ui/commands/aboutCommand.test.d.ts +7 -0
  440. package/dist/src/ui/commands/aboutCommand.test.js +135 -0
  441. package/dist/src/ui/commands/aboutCommand.test.js.map +1 -0
  442. package/dist/src/ui/commands/auditCommand.d.ts +8 -0
  443. package/dist/src/ui/commands/auditCommand.js +99 -0
  444. package/dist/src/ui/commands/auditCommand.js.map +1 -0
  445. package/dist/src/ui/commands/auditCommand.test.d.ts +7 -0
  446. package/dist/src/ui/commands/auditCommand.test.js +103 -0
  447. package/dist/src/ui/commands/auditCommand.test.js.map +1 -0
  448. package/dist/src/ui/commands/authCommand.d.ts +8 -0
  449. package/dist/src/ui/commands/authCommand.js +45 -0
  450. package/dist/src/ui/commands/authCommand.js.map +1 -0
  451. package/dist/src/ui/commands/authCommand.test.d.ts +7 -0
  452. package/dist/src/ui/commands/authCommand.test.js +99 -0
  453. package/dist/src/ui/commands/authCommand.test.js.map +1 -0
  454. package/dist/src/ui/commands/bugCommand.d.ts +8 -0
  455. package/dist/src/ui/commands/bugCommand.js +86 -0
  456. package/dist/src/ui/commands/bugCommand.js.map +1 -0
  457. package/dist/src/ui/commands/bugCommand.test.d.ts +7 -0
  458. package/dist/src/ui/commands/bugCommand.test.js +119 -0
  459. package/dist/src/ui/commands/bugCommand.test.js.map +1 -0
  460. package/dist/src/ui/commands/chatCommand.d.ts +10 -0
  461. package/dist/src/ui/commands/chatCommand.js +319 -0
  462. package/dist/src/ui/commands/chatCommand.js.map +1 -0
  463. package/dist/src/ui/commands/chatCommand.test.d.ts +7 -0
  464. package/dist/src/ui/commands/chatCommand.test.js +594 -0
  465. package/dist/src/ui/commands/chatCommand.test.js.map +1 -0
  466. package/dist/src/ui/commands/clearCommand.d.ts +8 -0
  467. package/dist/src/ui/commands/clearCommand.js +58 -0
  468. package/dist/src/ui/commands/clearCommand.js.map +1 -0
  469. package/dist/src/ui/commands/clearCommand.test.d.ts +7 -0
  470. package/dist/src/ui/commands/clearCommand.test.js +84 -0
  471. package/dist/src/ui/commands/clearCommand.test.js.map +1 -0
  472. package/dist/src/ui/commands/compressCommand.d.ts +8 -0
  473. package/dist/src/ui/commands/compressCommand.js +68 -0
  474. package/dist/src/ui/commands/compressCommand.js.map +1 -0
  475. package/dist/src/ui/commands/compressCommand.test.d.ts +7 -0
  476. package/dist/src/ui/commands/compressCommand.test.js +99 -0
  477. package/dist/src/ui/commands/compressCommand.test.js.map +1 -0
  478. package/dist/src/ui/commands/copyCommand.d.ts +8 -0
  479. package/dist/src/ui/commands/copyCommand.js +62 -0
  480. package/dist/src/ui/commands/copyCommand.js.map +1 -0
  481. package/dist/src/ui/commands/copyCommand.test.d.ts +7 -0
  482. package/dist/src/ui/commands/copyCommand.test.js +243 -0
  483. package/dist/src/ui/commands/copyCommand.test.js.map +1 -0
  484. package/dist/src/ui/commands/corgiCommand.d.ts +8 -0
  485. package/dist/src/ui/commands/corgiCommand.js +18 -0
  486. package/dist/src/ui/commands/corgiCommand.js.map +1 -0
  487. package/dist/src/ui/commands/corgiCommand.test.d.ts +7 -0
  488. package/dist/src/ui/commands/corgiCommand.test.js +29 -0
  489. package/dist/src/ui/commands/corgiCommand.test.js.map +1 -0
  490. package/dist/src/ui/commands/directoryCommand.d.ts +8 -0
  491. package/dist/src/ui/commands/directoryCommand.js +190 -0
  492. package/dist/src/ui/commands/directoryCommand.js.map +1 -0
  493. package/dist/src/ui/commands/directoryCommand.test.d.ts +7 -0
  494. package/dist/src/ui/commands/directoryCommand.test.js +236 -0
  495. package/dist/src/ui/commands/directoryCommand.test.js.map +1 -0
  496. package/dist/src/ui/commands/docsCommand.d.ts +8 -0
  497. package/dist/src/ui/commands/docsCommand.js +33 -0
  498. package/dist/src/ui/commands/docsCommand.js.map +1 -0
  499. package/dist/src/ui/commands/docsCommand.test.d.ts +7 -0
  500. package/dist/src/ui/commands/docsCommand.test.js +73 -0
  501. package/dist/src/ui/commands/docsCommand.test.js.map +1 -0
  502. package/dist/src/ui/commands/editorCommand.d.ts +8 -0
  503. package/dist/src/ui/commands/editorCommand.js +18 -0
  504. package/dist/src/ui/commands/editorCommand.js.map +1 -0
  505. package/dist/src/ui/commands/editorCommand.test.d.ts +7 -0
  506. package/dist/src/ui/commands/editorCommand.test.js +28 -0
  507. package/dist/src/ui/commands/editorCommand.test.js.map +1 -0
  508. package/dist/src/ui/commands/evaluateCommand.d.ts +8 -0
  509. package/dist/src/ui/commands/evaluateCommand.js +98 -0
  510. package/dist/src/ui/commands/evaluateCommand.js.map +1 -0
  511. package/dist/src/ui/commands/extensionsCommand.d.ts +13 -0
  512. package/dist/src/ui/commands/extensionsCommand.js +404 -0
  513. package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
  514. package/dist/src/ui/commands/extensionsCommand.test.d.ts +7 -0
  515. package/dist/src/ui/commands/extensionsCommand.test.js +589 -0
  516. package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -0
  517. package/dist/src/ui/commands/helpCommand.d.ts +8 -0
  518. package/dist/src/ui/commands/helpCommand.js +23 -0
  519. package/dist/src/ui/commands/helpCommand.js.map +1 -0
  520. package/dist/src/ui/commands/helpCommand.test.d.ts +7 -0
  521. package/dist/src/ui/commands/helpCommand.test.js +43 -0
  522. package/dist/src/ui/commands/helpCommand.test.js.map +1 -0
  523. package/dist/src/ui/commands/hooksCommand.d.ts +8 -0
  524. package/dist/src/ui/commands/hooksCommand.js +208 -0
  525. package/dist/src/ui/commands/hooksCommand.js.map +1 -0
  526. package/dist/src/ui/commands/hooksCommand.test.d.ts +7 -0
  527. package/dist/src/ui/commands/hooksCommand.test.js +405 -0
  528. package/dist/src/ui/commands/hooksCommand.test.js.map +1 -0
  529. package/dist/src/ui/commands/ideCommand.d.ts +8 -0
  530. package/dist/src/ui/commands/ideCommand.js +234 -0
  531. package/dist/src/ui/commands/ideCommand.js.map +1 -0
  532. package/dist/src/ui/commands/ideCommand.test.d.ts +7 -0
  533. package/dist/src/ui/commands/ideCommand.test.js +204 -0
  534. package/dist/src/ui/commands/ideCommand.test.js.map +1 -0
  535. package/dist/src/ui/commands/initCommand.d.ts +8 -0
  536. package/dist/src/ui/commands/initCommand.js +38 -0
  537. package/dist/src/ui/commands/initCommand.js.map +1 -0
  538. package/dist/src/ui/commands/initCommand.test.d.ts +7 -0
  539. package/dist/src/ui/commands/initCommand.test.js +81 -0
  540. package/dist/src/ui/commands/initCommand.test.js.map +1 -0
  541. package/dist/src/ui/commands/mcpCommand.d.ts +8 -0
  542. package/dist/src/ui/commands/mcpCommand.js +286 -0
  543. package/dist/src/ui/commands/mcpCommand.js.map +1 -0
  544. package/dist/src/ui/commands/mcpCommand.test.d.ts +7 -0
  545. package/dist/src/ui/commands/mcpCommand.test.js +182 -0
  546. package/dist/src/ui/commands/mcpCommand.test.js.map +1 -0
  547. package/dist/src/ui/commands/memoryCommand.d.ts +8 -0
  548. package/dist/src/ui/commands/memoryCommand.js +120 -0
  549. package/dist/src/ui/commands/memoryCommand.js.map +1 -0
  550. package/dist/src/ui/commands/memoryCommand.test.d.ts +7 -0
  551. package/dist/src/ui/commands/memoryCommand.test.js +281 -0
  552. package/dist/src/ui/commands/memoryCommand.test.js.map +1 -0
  553. package/dist/src/ui/commands/modelCommand.d.ts +8 -0
  554. package/dist/src/ui/commands/modelCommand.js +23 -0
  555. package/dist/src/ui/commands/modelCommand.js.map +1 -0
  556. package/dist/src/ui/commands/modelCommand.test.d.ts +7 -0
  557. package/dist/src/ui/commands/modelCommand.test.js +42 -0
  558. package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
  559. package/dist/src/ui/commands/permissionsCommand.d.ts +8 -0
  560. package/dist/src/ui/commands/permissionsCommand.js +76 -0
  561. package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
  562. package/dist/src/ui/commands/permissionsCommand.test.d.ts +7 -0
  563. package/dist/src/ui/commands/permissionsCommand.test.js +87 -0
  564. package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
  565. package/dist/src/ui/commands/policiesCommand.d.ts +8 -0
  566. package/dist/src/ui/commands/policiesCommand.js +62 -0
  567. package/dist/src/ui/commands/policiesCommand.js.map +1 -0
  568. package/dist/src/ui/commands/policiesCommand.test.d.ts +7 -0
  569. package/dist/src/ui/commands/policiesCommand.test.js +84 -0
  570. package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
  571. package/dist/src/ui/commands/privacyCommand.d.ts +8 -0
  572. package/dist/src/ui/commands/privacyCommand.js +18 -0
  573. package/dist/src/ui/commands/privacyCommand.js.map +1 -0
  574. package/dist/src/ui/commands/privacyCommand.test.d.ts +7 -0
  575. package/dist/src/ui/commands/privacyCommand.test.js +33 -0
  576. package/dist/src/ui/commands/privacyCommand.test.js.map +1 -0
  577. package/dist/src/ui/commands/profileCommand.d.ts +8 -0
  578. package/dist/src/ui/commands/profileCommand.js +25 -0
  579. package/dist/src/ui/commands/profileCommand.js.map +1 -0
  580. package/dist/src/ui/commands/quitCommand.d.ts +8 -0
  581. package/dist/src/ui/commands/quitCommand.js +36 -0
  582. package/dist/src/ui/commands/quitCommand.js.map +1 -0
  583. package/dist/src/ui/commands/quitCommand.test.d.ts +7 -0
  584. package/dist/src/ui/commands/quitCommand.test.js +51 -0
  585. package/dist/src/ui/commands/quitCommand.test.js.map +1 -0
  586. package/dist/src/ui/commands/recipesCommand.d.ts +14 -0
  587. package/dist/src/ui/commands/recipesCommand.js +211 -0
  588. package/dist/src/ui/commands/recipesCommand.js.map +1 -0
  589. package/dist/src/ui/commands/recipesCommand.test.d.ts +7 -0
  590. package/dist/src/ui/commands/recipesCommand.test.js +108 -0
  591. package/dist/src/ui/commands/recipesCommand.test.js.map +1 -0
  592. package/dist/src/ui/commands/restoreCommand.d.ts +9 -0
  593. package/dist/src/ui/commands/restoreCommand.js +131 -0
  594. package/dist/src/ui/commands/restoreCommand.js.map +1 -0
  595. package/dist/src/ui/commands/restoreCommand.test.d.ts +7 -0
  596. package/dist/src/ui/commands/restoreCommand.test.js +191 -0
  597. package/dist/src/ui/commands/restoreCommand.test.js.map +1 -0
  598. package/dist/src/ui/commands/resumeCommand.d.ts +8 -0
  599. package/dist/src/ui/commands/resumeCommand.js +18 -0
  600. package/dist/src/ui/commands/resumeCommand.js.map +1 -0
  601. package/dist/src/ui/commands/sessionsCommand.d.ts +8 -0
  602. package/dist/src/ui/commands/sessionsCommand.js +104 -0
  603. package/dist/src/ui/commands/sessionsCommand.js.map +1 -0
  604. package/dist/src/ui/commands/sessionsCommand.test.d.ts +7 -0
  605. package/dist/src/ui/commands/sessionsCommand.test.js +52 -0
  606. package/dist/src/ui/commands/sessionsCommand.test.js.map +1 -0
  607. package/dist/src/ui/commands/settingsCommand.d.ts +8 -0
  608. package/dist/src/ui/commands/settingsCommand.js +18 -0
  609. package/dist/src/ui/commands/settingsCommand.js.map +1 -0
  610. package/dist/src/ui/commands/settingsCommand.test.d.ts +7 -0
  611. package/dist/src/ui/commands/settingsCommand.test.js +31 -0
  612. package/dist/src/ui/commands/settingsCommand.test.js.map +1 -0
  613. package/dist/src/ui/commands/setupGithubCommand.d.ts +11 -0
  614. package/dist/src/ui/commands/setupGithubCommand.js +196 -0
  615. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
  616. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +7 -0
  617. package/dist/src/ui/commands/setupGithubCommand.test.js +239 -0
  618. package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
  619. package/dist/src/ui/commands/statsCommand.d.ts +8 -0
  620. package/dist/src/ui/commands/statsCommand.js +76 -0
  621. package/dist/src/ui/commands/statsCommand.js.map +1 -0
  622. package/dist/src/ui/commands/statsCommand.test.d.ts +7 -0
  623. package/dist/src/ui/commands/statsCommand.test.js +71 -0
  624. package/dist/src/ui/commands/statsCommand.test.js.map +1 -0
  625. package/dist/src/ui/commands/terminalSetupCommand.d.ts +14 -0
  626. package/dist/src/ui/commands/terminalSetupCommand.js +44 -0
  627. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
  628. package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +7 -0
  629. package/dist/src/ui/commands/terminalSetupCommand.test.js +67 -0
  630. package/dist/src/ui/commands/terminalSetupCommand.test.js.map +1 -0
  631. package/dist/src/ui/commands/themeCommand.d.ts +8 -0
  632. package/dist/src/ui/commands/themeCommand.js +18 -0
  633. package/dist/src/ui/commands/themeCommand.js.map +1 -0
  634. package/dist/src/ui/commands/themeCommand.test.d.ts +7 -0
  635. package/dist/src/ui/commands/themeCommand.test.js +33 -0
  636. package/dist/src/ui/commands/themeCommand.test.js.map +1 -0
  637. package/dist/src/ui/commands/toolsCommand.d.ts +8 -0
  638. package/dist/src/ui/commands/toolsCommand.js +44 -0
  639. package/dist/src/ui/commands/toolsCommand.js.map +1 -0
  640. package/dist/src/ui/commands/toolsCommand.test.d.ts +7 -0
  641. package/dist/src/ui/commands/toolsCommand.test.js +101 -0
  642. package/dist/src/ui/commands/toolsCommand.test.js.map +1 -0
  643. package/dist/src/ui/commands/types.d.ts +141 -0
  644. package/dist/src/ui/commands/types.js +13 -0
  645. package/dist/src/ui/commands/types.js.map +1 -0
  646. package/dist/src/ui/commands/viewModeCommand.d.ts +8 -0
  647. package/dist/src/ui/commands/viewModeCommand.js +34 -0
  648. package/dist/src/ui/commands/viewModeCommand.js.map +1 -0
  649. package/dist/src/ui/commands/vimCommand.d.ts +8 -0
  650. package/dist/src/ui/commands/vimCommand.js +25 -0
  651. package/dist/src/ui/commands/vimCommand.js.map +1 -0
  652. package/dist/src/ui/components/AboutBox.d.ts +22 -0
  653. package/dist/src/ui/components/AboutBox.js +6 -0
  654. package/dist/src/ui/components/AboutBox.js.map +1 -0
  655. package/dist/src/ui/components/AboutBox.test.d.ts +7 -0
  656. package/dist/src/ui/components/AboutBox.test.js +58 -0
  657. package/dist/src/ui/components/AboutBox.test.js.map +1 -0
  658. package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +7 -0
  659. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +25 -0
  660. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -0
  661. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +7 -0
  662. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +162 -0
  663. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -0
  664. package/dist/src/ui/components/AnsiOutput.d.ts +15 -0
  665. package/dist/src/ui/components/AnsiOutput.js +12 -0
  666. package/dist/src/ui/components/AnsiOutput.js.map +1 -0
  667. package/dist/src/ui/components/AnsiOutput.test.d.ts +7 -0
  668. package/dist/src/ui/components/AnsiOutput.test.js +93 -0
  669. package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
  670. package/dist/src/ui/components/AppHeader.d.ts +11 -0
  671. package/dist/src/ui/components/AppHeader.js +27 -0
  672. package/dist/src/ui/components/AppHeader.js.map +1 -0
  673. package/dist/src/ui/components/AppHeader.test.d.ts +7 -0
  674. package/dist/src/ui/components/AppHeader.test.js +145 -0
  675. package/dist/src/ui/components/AppHeader.test.js.map +1 -0
  676. package/dist/src/ui/components/AsciiArt.d.ts +16 -0
  677. package/dist/src/ui/components/AsciiArt.js +23 -0
  678. package/dist/src/ui/components/AsciiArt.js.map +1 -0
  679. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +13 -0
  680. package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
  681. package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
  682. package/dist/src/ui/components/AutoAcceptIndicator.test.d.ts +7 -0
  683. package/dist/src/ui/components/AutoAcceptIndicator.test.js +32 -0
  684. package/dist/src/ui/components/AutoAcceptIndicator.test.js.map +1 -0
  685. package/dist/src/ui/components/Banner.d.ts +15 -0
  686. package/dist/src/ui/components/Banner.js +29 -0
  687. package/dist/src/ui/components/Banner.js.map +1 -0
  688. package/dist/src/ui/components/Banner.test.d.ts +7 -0
  689. package/dist/src/ui/components/Banner.test.js +25 -0
  690. package/dist/src/ui/components/Banner.test.js.map +1 -0
  691. package/dist/src/ui/components/CliSpinner.d.ts +10 -0
  692. package/dist/src/ui/components/CliSpinner.js +20 -0
  693. package/dist/src/ui/components/CliSpinner.js.map +1 -0
  694. package/dist/src/ui/components/CliSpinner.test.d.ts +7 -0
  695. package/dist/src/ui/components/CliSpinner.test.js +24 -0
  696. package/dist/src/ui/components/CliSpinner.test.js.map +1 -0
  697. package/dist/src/ui/components/Composer.d.ts +7 -0
  698. package/dist/src/ui/components/Composer.js +63 -0
  699. package/dist/src/ui/components/Composer.js.map +1 -0
  700. package/dist/src/ui/components/Composer.test.d.ts +7 -0
  701. package/dist/src/ui/components/Composer.test.js +356 -0
  702. package/dist/src/ui/components/Composer.test.js.map +1 -0
  703. package/dist/src/ui/components/ConfigInitDisplay.d.ts +7 -0
  704. package/dist/src/ui/components/ConfigInitDisplay.js +50 -0
  705. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
  706. package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +7 -0
  707. package/dist/src/ui/components/ConfigInitDisplay.test.js +134 -0
  708. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -0
  709. package/dist/src/ui/components/ConsentPrompt.d.ts +14 -0
  710. package/dist/src/ui/components/ConsentPrompt.js +20 -0
  711. package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
  712. package/dist/src/ui/components/ConsentPrompt.test.d.ts +7 -0
  713. package/dist/src/ui/components/ConsentPrompt.test.js +78 -0
  714. package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
  715. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +12 -0
  716. package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
  717. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
  718. package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +7 -0
  719. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +27 -0
  720. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -0
  721. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
  722. package/dist/src/ui/components/ContextSummaryDisplay.js +56 -0
  723. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
  724. package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +7 -0
  725. package/dist/src/ui/components/ContextSummaryDisplay.test.js +71 -0
  726. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -0
  727. package/dist/src/ui/components/ContextUsageDisplay.d.ts +11 -0
  728. package/dist/src/ui/components/ContextUsageDisplay.js +17 -0
  729. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
  730. package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +7 -0
  731. package/dist/src/ui/components/ContextUsageDisplay.test.js +40 -0
  732. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -0
  733. package/dist/src/ui/components/CopyModeWarning.d.ts +8 -0
  734. package/dist/src/ui/components/CopyModeWarning.js +12 -0
  735. package/dist/src/ui/components/CopyModeWarning.js.map +1 -0
  736. package/dist/src/ui/components/CopyModeWarning.test.d.ts +7 -0
  737. package/dist/src/ui/components/CopyModeWarning.test.js +34 -0
  738. package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -0
  739. package/dist/src/ui/components/DebugProfiler.d.ts +26 -0
  740. package/dist/src/ui/components/DebugProfiler.js +163 -0
  741. package/dist/src/ui/components/DebugProfiler.js.map +1 -0
  742. package/dist/src/ui/components/DebugProfiler.test.d.ts +7 -0
  743. package/dist/src/ui/components/DebugProfiler.test.js +202 -0
  744. package/dist/src/ui/components/DebugProfiler.test.js.map +1 -0
  745. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +16 -0
  746. package/dist/src/ui/components/DetailedMessagesDisplay.js +55 -0
  747. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
  748. package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +7 -0
  749. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +40 -0
  750. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -0
  751. package/dist/src/ui/components/DialogManager.d.ts +13 -0
  752. package/dist/src/ui/components/DialogManager.js +122 -0
  753. package/dist/src/ui/components/DialogManager.js.map +1 -0
  754. package/dist/src/ui/components/DialogManager.test.d.ts +7 -0
  755. package/dist/src/ui/components/DialogManager.test.js +168 -0
  756. package/dist/src/ui/components/DialogManager.test.js.map +1 -0
  757. package/dist/src/ui/components/EditorSettingsDialog.d.ts +16 -0
  758. package/dist/src/ui/components/EditorSettingsDialog.js +80 -0
  759. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
  760. package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +7 -0
  761. package/dist/src/ui/components/EditorSettingsDialog.test.js +119 -0
  762. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -0
  763. package/dist/src/ui/components/ExitWarning.d.ts +8 -0
  764. package/dist/src/ui/components/ExitWarning.js +9 -0
  765. package/dist/src/ui/components/ExitWarning.js.map +1 -0
  766. package/dist/src/ui/components/ExitWarning.test.d.ts +7 -0
  767. package/dist/src/ui/components/ExitWarning.test.js +55 -0
  768. package/dist/src/ui/components/ExitWarning.test.js.map +1 -0
  769. package/dist/src/ui/components/FolderTrustDialog.d.ts +18 -0
  770. package/dist/src/ui/components/FolderTrustDialog.js +67 -0
  771. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
  772. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +7 -0
  773. package/dist/src/ui/components/FolderTrustDialog.test.js +91 -0
  774. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
  775. package/dist/src/ui/components/Footer.d.ts +8 -0
  776. package/dist/src/ui/components/Footer.js +43 -0
  777. package/dist/src/ui/components/Footer.js.map +1 -0
  778. package/dist/src/ui/components/Footer.test.d.ts +7 -0
  779. package/dist/src/ui/components/Footer.test.js +315 -0
  780. package/dist/src/ui/components/Footer.test.js.map +1 -0
  781. package/dist/src/ui/components/FullScreenTerminalView.d.ts +26 -0
  782. package/dist/src/ui/components/FullScreenTerminalView.js +68 -0
  783. package/dist/src/ui/components/FullScreenTerminalView.js.map +1 -0
  784. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +23 -0
  785. package/dist/src/ui/components/GeminiRespondingSpinner.js +23 -0
  786. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
  787. package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +7 -0
  788. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +62 -0
  789. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -0
  790. package/dist/src/ui/components/GradientRegression.test.d.ts +7 -0
  791. package/dist/src/ui/components/GradientRegression.test.js +106 -0
  792. package/dist/src/ui/components/GradientRegression.test.js.map +1 -0
  793. package/dist/src/ui/components/Header.d.ts +14 -0
  794. package/dist/src/ui/components/Header.js +29 -0
  795. package/dist/src/ui/components/Header.js.map +1 -0
  796. package/dist/src/ui/components/Header.test.d.ts +7 -0
  797. package/dist/src/ui/components/Header.test.js +76 -0
  798. package/dist/src/ui/components/Header.test.js.map +1 -0
  799. package/dist/src/ui/components/Help.d.ts +13 -0
  800. package/dist/src/ui/components/Help.js +13 -0
  801. package/dist/src/ui/components/Help.js.map +1 -0
  802. package/dist/src/ui/components/Help.test.d.ts +7 -0
  803. package/dist/src/ui/components/Help.test.js +68 -0
  804. package/dist/src/ui/components/Help.test.js.map +1 -0
  805. package/dist/src/ui/components/HistoryItemDisplay.d.ts +22 -0
  806. package/dist/src/ui/components/HistoryItemDisplay.js +31 -0
  807. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
  808. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +7 -0
  809. package/dist/src/ui/components/HistoryItemDisplay.test.js +186 -0
  810. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
  811. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +12 -0
  812. package/dist/src/ui/components/IdeTrustChangeDialog.js +34 -0
  813. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
  814. package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +7 -0
  815. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +58 -0
  816. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
  817. package/dist/src/ui/components/InputPrompt.d.ts +51 -0
  818. package/dist/src/ui/components/InputPrompt.js +836 -0
  819. package/dist/src/ui/components/InputPrompt.js.map +1 -0
  820. package/dist/src/ui/components/InputPrompt.test.d.ts +7 -0
  821. package/dist/src/ui/components/InputPrompt.test.js +2174 -0
  822. package/dist/src/ui/components/InputPrompt.test.js.map +1 -0
  823. package/dist/src/ui/components/LoadingIndicator.d.ts +16 -0
  824. package/dist/src/ui/components/LoadingIndicator.js +30 -0
  825. package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
  826. package/dist/src/ui/components/LoadingIndicator.test.d.ts +7 -0
  827. package/dist/src/ui/components/LoadingIndicator.test.js +208 -0
  828. package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
  829. package/dist/src/ui/components/LogoutConfirmationDialog.d.ts +16 -0
  830. package/dist/src/ui/components/LogoutConfirmationDialog.js +38 -0
  831. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -0
  832. package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +7 -0
  833. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +60 -0
  834. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -0
  835. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +14 -0
  836. package/dist/src/ui/components/LoopDetectionConfirmation.js +38 -0
  837. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
  838. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +7 -0
  839. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +26 -0
  840. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
  841. package/dist/src/ui/components/MainContent.d.ts +7 -0
  842. package/dist/src/ui/components/MainContent.js +57 -0
  843. package/dist/src/ui/components/MainContent.js.map +1 -0
  844. package/dist/src/ui/components/MainContent.test.d.ts +7 -0
  845. package/dist/src/ui/components/MainContent.test.js +74 -0
  846. package/dist/src/ui/components/MainContent.test.js.map +1 -0
  847. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +8 -0
  848. package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
  849. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
  850. package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +7 -0
  851. package/dist/src/ui/components/MemoryUsageDisplay.test.js +50 -0
  852. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -0
  853. package/dist/src/ui/components/ModelDialog.d.ts +12 -0
  854. package/dist/src/ui/components/ModelDialog.js +186 -0
  855. package/dist/src/ui/components/ModelDialog.js.map +1 -0
  856. package/dist/src/ui/components/ModelDialog.test.d.ts +7 -0
  857. package/dist/src/ui/components/ModelDialog.test.js +200 -0
  858. package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
  859. package/dist/src/ui/components/ModelStatsDisplay.d.ts +8 -0
  860. package/dist/src/ui/components/ModelStatsDisplay.js +87 -0
  861. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
  862. package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +7 -0
  863. package/dist/src/ui/components/ModelStatsDisplay.test.js +344 -0
  864. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -0
  865. package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +24 -0
  866. package/dist/src/ui/components/MultiFolderTrustDialog.js +92 -0
  867. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -0
  868. package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +7 -0
  869. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +162 -0
  870. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -0
  871. package/dist/src/ui/components/Notifications.d.ts +7 -0
  872. package/dist/src/ui/components/Notifications.js +75 -0
  873. package/dist/src/ui/components/Notifications.js.map +1 -0
  874. package/dist/src/ui/components/Notifications.test.d.ts +7 -0
  875. package/dist/src/ui/components/Notifications.test.js +160 -0
  876. package/dist/src/ui/components/Notifications.test.js.map +1 -0
  877. package/dist/src/ui/components/PasswordInputModal.d.ts +23 -0
  878. package/dist/src/ui/components/PasswordInputModal.js +46 -0
  879. package/dist/src/ui/components/PasswordInputModal.js.map +1 -0
  880. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +17 -0
  881. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +59 -0
  882. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
  883. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +7 -0
  884. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +163 -0
  885. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
  886. package/dist/src/ui/components/PrepareLabel.d.ts +16 -0
  887. package/dist/src/ui/components/PrepareLabel.js +73 -0
  888. package/dist/src/ui/components/PrepareLabel.js.map +1 -0
  889. package/dist/src/ui/components/PrepareLabel.test.d.ts +7 -0
  890. package/dist/src/ui/components/PrepareLabel.test.js +78 -0
  891. package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
  892. package/dist/src/ui/components/ProQuotaDialog.d.ts +19 -0
  893. package/dist/src/ui/components/ProQuotaDialog.js +90 -0
  894. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
  895. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +7 -0
  896. package/dist/src/ui/components/ProQuotaDialog.test.js +172 -0
  897. package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
  898. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +10 -0
  899. package/dist/src/ui/components/QueuedMessageDisplay.js +21 -0
  900. package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
  901. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +7 -0
  902. package/dist/src/ui/components/QueuedMessageDisplay.test.js +66 -0
  903. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
  904. package/dist/src/ui/components/QuittingDisplay.d.ts +7 -0
  905. package/dist/src/ui/components/QuittingDisplay.js +21 -0
  906. package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
  907. package/dist/src/ui/components/QuittingDisplay.test.d.ts +7 -0
  908. package/dist/src/ui/components/QuittingDisplay.test.js +50 -0
  909. package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -0
  910. package/dist/src/ui/components/RawMarkdownIndicator.d.ts +8 -0
  911. package/dist/src/ui/components/RawMarkdownIndicator.js +8 -0
  912. package/dist/src/ui/components/RawMarkdownIndicator.js.map +1 -0
  913. package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +7 -0
  914. package/dist/src/ui/components/RawMarkdownIndicator.test.js +35 -0
  915. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -0
  916. package/dist/src/ui/components/RemoteIndicator.d.ts +13 -0
  917. package/dist/src/ui/components/RemoteIndicator.js +11 -0
  918. package/dist/src/ui/components/RemoteIndicator.js.map +1 -0
  919. package/dist/src/ui/components/ReplOutputPane.d.ts +19 -0
  920. package/dist/src/ui/components/ReplOutputPane.js +58 -0
  921. package/dist/src/ui/components/ReplOutputPane.js.map +1 -0
  922. package/dist/src/ui/components/SessionBrowser.d.ts +99 -0
  923. package/dist/src/ui/components/SessionBrowser.js +459 -0
  924. package/dist/src/ui/components/SessionBrowser.js.map +1 -0
  925. package/dist/src/ui/components/SessionBrowser.test.d.ts +7 -0
  926. package/dist/src/ui/components/SessionBrowser.test.js +251 -0
  927. package/dist/src/ui/components/SessionBrowser.test.js.map +1 -0
  928. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +12 -0
  929. package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
  930. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
  931. package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +7 -0
  932. package/dist/src/ui/components/SessionSummaryDisplay.test.js +76 -0
  933. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -0
  934. package/dist/src/ui/components/SettingsDialog.d.ts +19 -0
  935. package/dist/src/ui/components/SettingsDialog.js +705 -0
  936. package/dist/src/ui/components/SettingsDialog.js.map +1 -0
  937. package/dist/src/ui/components/SettingsDialog.test.d.ts +7 -0
  938. package/dist/src/ui/components/SettingsDialog.test.js +1134 -0
  939. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
  940. package/dist/src/ui/components/ShellConfirmationDialog.d.ts +16 -0
  941. package/dist/src/ui/components/ShellConfirmationDialog.js +50 -0
  942. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
  943. package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +7 -0
  944. package/dist/src/ui/components/ShellConfirmationDialog.test.js +41 -0
  945. package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -0
  946. package/dist/src/ui/components/ShellInputPrompt.d.ts +12 -0
  947. package/dist/src/ui/components/ShellInputPrompt.js +37 -0
  948. package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
  949. package/dist/src/ui/components/ShellInputPrompt.test.d.ts +7 -0
  950. package/dist/src/ui/components/ShellInputPrompt.test.js +83 -0
  951. package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -0
  952. package/dist/src/ui/components/ShellModeIndicator.d.ts +8 -0
  953. package/dist/src/ui/components/ShellModeIndicator.js +5 -0
  954. package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
  955. package/dist/src/ui/components/ShellModeIndicator.test.d.ts +7 -0
  956. package/dist/src/ui/components/ShellModeIndicator.test.js +18 -0
  957. package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -0
  958. package/dist/src/ui/components/ShowMoreLines.d.ts +11 -0
  959. package/dist/src/ui/components/ShowMoreLines.js +25 -0
  960. package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
  961. package/dist/src/ui/components/ShowMoreLines.test.d.ts +7 -0
  962. package/dist/src/ui/components/ShowMoreLines.test.js +41 -0
  963. package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -0
  964. package/dist/src/ui/components/SpotlightDialog.d.ts +7 -0
  965. package/dist/src/ui/components/SpotlightDialog.js +81 -0
  966. package/dist/src/ui/components/SpotlightDialog.js.map +1 -0
  967. package/dist/src/ui/components/StatsDisplay.d.ts +15 -0
  968. package/dist/src/ui/components/StatsDisplay.js +119 -0
  969. package/dist/src/ui/components/StatsDisplay.js.map +1 -0
  970. package/dist/src/ui/components/StatsDisplay.test.d.ts +7 -0
  971. package/dist/src/ui/components/StatsDisplay.test.js +439 -0
  972. package/dist/src/ui/components/StatsDisplay.test.js.map +1 -0
  973. package/dist/src/ui/components/StickyHeader.d.ts +15 -0
  974. package/dist/src/ui/components/StickyHeader.js +5 -0
  975. package/dist/src/ui/components/StickyHeader.js.map +1 -0
  976. package/dist/src/ui/components/StickyHeader.test.d.ts +7 -0
  977. package/dist/src/ui/components/StickyHeader.test.js +18 -0
  978. package/dist/src/ui/components/StickyHeader.test.js.map +1 -0
  979. package/dist/src/ui/components/SuggestionsDisplay.d.ts +28 -0
  980. package/dist/src/ui/components/SuggestionsDisplay.js +41 -0
  981. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
  982. package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +7 -0
  983. package/dist/src/ui/components/SuggestionsDisplay.test.js +57 -0
  984. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -0
  985. package/dist/src/ui/components/Table.d.ts +22 -0
  986. package/dist/src/ui/components/Table.js +7 -0
  987. package/dist/src/ui/components/Table.js.map +1 -0
  988. package/dist/src/ui/components/Table.test.d.ts +7 -0
  989. package/dist/src/ui/components/Table.test.js +54 -0
  990. package/dist/src/ui/components/Table.test.js.map +1 -0
  991. package/dist/src/ui/components/ThemeDialog.d.ts +22 -0
  992. package/dist/src/ui/components/ThemeDialog.js +181 -0
  993. package/dist/src/ui/components/ThemeDialog.js.map +1 -0
  994. package/dist/src/ui/components/ThemeDialog.test.d.ts +7 -0
  995. package/dist/src/ui/components/ThemeDialog.test.js +168 -0
  996. package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
  997. package/dist/src/ui/components/ThemedGradient.d.ts +9 -0
  998. package/dist/src/ui/components/ThemedGradient.js +16 -0
  999. package/dist/src/ui/components/ThemedGradient.js.map +1 -0
  1000. package/dist/src/ui/components/ThemedGradient.test.d.ts +7 -0
  1001. package/dist/src/ui/components/ThemedGradient.test.js +31 -0
  1002. package/dist/src/ui/components/ThemedGradient.test.js.map +1 -0
  1003. package/dist/src/ui/components/Tips.d.ts +13 -0
  1004. package/dist/src/ui/components/Tips.js +9 -0
  1005. package/dist/src/ui/components/Tips.js.map +1 -0
  1006. package/dist/src/ui/components/Tips.test.d.ts +7 -0
  1007. package/dist/src/ui/components/Tips.test.js +24 -0
  1008. package/dist/src/ui/components/Tips.test.js.map +1 -0
  1009. package/dist/src/ui/components/ToolStatsDisplay.d.ts +8 -0
  1010. package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
  1011. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
  1012. package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +7 -0
  1013. package/dist/src/ui/components/ToolStatsDisplay.test.js +228 -0
  1014. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -0
  1015. package/dist/src/ui/components/UpdateNotification.d.ts +11 -0
  1016. package/dist/src/ui/components/UpdateNotification.js +11 -0
  1017. package/dist/src/ui/components/UpdateNotification.js.map +1 -0
  1018. package/dist/src/ui/components/UpdateNotification.test.d.ts +7 -0
  1019. package/dist/src/ui/components/UpdateNotification.test.js +17 -0
  1020. package/dist/src/ui/components/UpdateNotification.test.js.map +1 -0
  1021. package/dist/src/ui/components/VoiceOrb.d.ts +8 -0
  1022. package/dist/src/ui/components/VoiceOrb.js +30 -0
  1023. package/dist/src/ui/components/VoiceOrb.js.map +1 -0
  1024. package/dist/src/ui/components/VoiceOrb.test.d.ts +7 -0
  1025. package/dist/src/ui/components/VoiceOrb.test.js +34 -0
  1026. package/dist/src/ui/components/VoiceOrb.test.js.map +1 -0
  1027. package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
  1028. package/dist/src/ui/components/messages/CompressionMessage.js +47 -0
  1029. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
  1030. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +7 -0
  1031. package/dist/src/ui/components/messages/CompressionMessage.test.js +169 -0
  1032. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
  1033. package/dist/src/ui/components/messages/DiffRenderer.d.ts +18 -0
  1034. package/dist/src/ui/components/messages/DiffRenderer.js +258 -0
  1035. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
  1036. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +7 -0
  1037. package/dist/src/ui/components/messages/DiffRenderer.test.js +232 -0
  1038. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
  1039. package/dist/src/ui/components/messages/ErrorMessage.d.ts +12 -0
  1040. package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
  1041. package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
  1042. package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +7 -0
  1043. package/dist/src/ui/components/messages/ErrorMessage.test.js +24 -0
  1044. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -0
  1045. package/dist/src/ui/components/messages/GeminiMessage.d.ts +15 -0
  1046. package/dist/src/ui/components/messages/GeminiMessage.js +15 -0
  1047. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
  1048. package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +7 -0
  1049. package/dist/src/ui/components/messages/GeminiMessage.test.js +36 -0
  1050. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -0
  1051. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +15 -0
  1052. package/dist/src/ui/components/messages/GeminiMessageContent.js +19 -0
  1053. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
  1054. package/dist/src/ui/components/messages/InfoMessage.d.ts +14 -0
  1055. package/dist/src/ui/components/messages/InfoMessage.js +11 -0
  1056. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
  1057. package/dist/src/ui/components/messages/InfoMessage.test.d.ts +7 -0
  1058. package/dist/src/ui/components/messages/InfoMessage.test.js +29 -0
  1059. package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -0
  1060. package/dist/src/ui/components/messages/ModelMessage.d.ts +12 -0
  1061. package/dist/src/ui/components/messages/ModelMessage.js +5 -0
  1062. package/dist/src/ui/components/messages/ModelMessage.js.map +1 -0
  1063. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +15 -0
  1064. package/dist/src/ui/components/messages/ShellToolMessage.js +77 -0
  1065. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -0
  1066. package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +7 -0
  1067. package/dist/src/ui/components/messages/ShellToolMessage.test.js +124 -0
  1068. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -0
  1069. package/dist/src/ui/components/messages/Todo.d.ts +8 -0
  1070. package/dist/src/ui/components/messages/Todo.js +91 -0
  1071. package/dist/src/ui/components/messages/Todo.js.map +1 -0
  1072. package/dist/src/ui/components/messages/Todo.test.d.ts +7 -0
  1073. package/dist/src/ui/components/messages/Todo.test.js +115 -0
  1074. package/dist/src/ui/components/messages/Todo.test.js.map +1 -0
  1075. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
  1076. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +294 -0
  1077. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
  1078. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +7 -0
  1079. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +150 -0
  1080. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
  1081. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +20 -0
  1082. package/dist/src/ui/components/messages/ToolGroupMessage.js +80 -0
  1083. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
  1084. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +7 -0
  1085. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +345 -0
  1086. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
  1087. package/dist/src/ui/components/messages/ToolMessage.d.ts +25 -0
  1088. package/dist/src/ui/components/messages/ToolMessage.js +36 -0
  1089. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
  1090. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +7 -0
  1091. package/dist/src/ui/components/messages/ToolMessage.test.js +154 -0
  1092. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
  1093. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +7 -0
  1094. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +62 -0
  1095. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -0
  1096. package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +14 -0
  1097. package/dist/src/ui/components/messages/ToolResultDisplay.js +55 -0
  1098. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -0
  1099. package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +7 -0
  1100. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +97 -0
  1101. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -0
  1102. package/dist/src/ui/components/messages/ToolShared.d.ts +24 -0
  1103. package/dist/src/ui/components/messages/ToolShared.js +41 -0
  1104. package/dist/src/ui/components/messages/ToolShared.js.map +1 -0
  1105. package/dist/src/ui/components/messages/UserMessage.d.ts +13 -0
  1106. package/dist/src/ui/components/messages/UserMessage.js +13 -0
  1107. package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
  1108. package/dist/src/ui/components/messages/UserMessage.test.d.ts +7 -0
  1109. package/dist/src/ui/components/messages/UserMessage.test.js +33 -0
  1110. package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -0
  1111. package/dist/src/ui/components/messages/UserShellMessage.d.ts +12 -0
  1112. package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
  1113. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
  1114. package/dist/src/ui/components/messages/WarningMessage.d.ts +12 -0
  1115. package/dist/src/ui/components/messages/WarningMessage.js +10 -0
  1116. package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
  1117. package/dist/src/ui/components/messages/WarningMessage.test.d.ts +7 -0
  1118. package/dist/src/ui/components/messages/WarningMessage.test.js +24 -0
  1119. package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -0
  1120. package/dist/src/ui/components/shared/BaseSelectionList.d.ts +39 -0
  1121. package/dist/src/ui/components/shared/BaseSelectionList.js +82 -0
  1122. package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
  1123. package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +7 -0
  1124. package/dist/src/ui/components/shared/BaseSelectionList.test.js +386 -0
  1125. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
  1126. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +36 -0
  1127. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
  1128. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
  1129. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +7 -0
  1130. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +80 -0
  1131. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
  1132. package/dist/src/ui/components/shared/EnumSelector.d.ts +19 -0
  1133. package/dist/src/ui/components/shared/EnumSelector.js +45 -0
  1134. package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
  1135. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +7 -0
  1136. package/dist/src/ui/components/shared/EnumSelector.test.js +71 -0
  1137. package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
  1138. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +62 -0
  1139. package/dist/src/ui/components/shared/MaxSizedBox.js +452 -0
  1140. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
  1141. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +7 -0
  1142. package/dist/src/ui/components/shared/MaxSizedBox.test.js +176 -0
  1143. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
  1144. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +49 -0
  1145. package/dist/src/ui/components/shared/RadioButtonSelect.js +22 -0
  1146. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
  1147. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +7 -0
  1148. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +135 -0
  1149. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
  1150. package/dist/src/ui/components/shared/ScopeSelector.d.ts +20 -0
  1151. package/dist/src/ui/components/shared/ScopeSelector.js +14 -0
  1152. package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
  1153. package/dist/src/ui/components/shared/Scrollable.d.ts +19 -0
  1154. package/dist/src/ui/components/shared/Scrollable.js +85 -0
  1155. package/dist/src/ui/components/shared/Scrollable.js.map +1 -0
  1156. package/dist/src/ui/components/shared/Scrollable.test.d.ts +7 -0
  1157. package/dist/src/ui/components/shared/Scrollable.test.js +75 -0
  1158. package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -0
  1159. package/dist/src/ui/components/shared/ScrollableList.d.ts +27 -0
  1160. package/dist/src/ui/components/shared/ScrollableList.js +153 -0
  1161. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -0
  1162. package/dist/src/ui/components/shared/ScrollableList.test.d.ts +7 -0
  1163. package/dist/src/ui/components/shared/ScrollableList.test.js +229 -0
  1164. package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -0
  1165. package/dist/src/ui/components/shared/TextInput.d.ts +16 -0
  1166. package/dist/src/ui/components/shared/TextInput.js +38 -0
  1167. package/dist/src/ui/components/shared/TextInput.js.map +1 -0
  1168. package/dist/src/ui/components/shared/TextInput.test.d.ts +7 -0
  1169. package/dist/src/ui/components/shared/TextInput.test.js +243 -0
  1170. package/dist/src/ui/components/shared/TextInput.test.js.map +1 -0
  1171. package/dist/src/ui/components/shared/VirtualizedList.d.ts +45 -0
  1172. package/dist/src/ui/components/shared/VirtualizedList.js +313 -0
  1173. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -0
  1174. package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +7 -0
  1175. package/dist/src/ui/components/shared/VirtualizedList.test.js +172 -0
  1176. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -0
  1177. package/dist/src/ui/components/shared/text-buffer.d.ts +493 -0
  1178. package/dist/src/ui/components/shared/text-buffer.js +1664 -0
  1179. package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
  1180. package/dist/src/ui/components/shared/text-buffer.test.d.ts +7 -0
  1181. package/dist/src/ui/components/shared/text-buffer.test.js +1917 -0
  1182. package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -0
  1183. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +73 -0
  1184. package/dist/src/ui/components/shared/vim-buffer-actions.js +553 -0
  1185. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
  1186. package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +7 -0
  1187. package/dist/src/ui/components/shared/vim-buffer-actions.test.js +952 -0
  1188. package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -0
  1189. package/dist/src/ui/components/views/ChatList.d.ts +13 -0
  1190. package/dist/src/ui/components/views/ChatList.js +17 -0
  1191. package/dist/src/ui/components/views/ChatList.js.map +1 -0
  1192. package/dist/src/ui/components/views/ChatList.test.d.ts +7 -0
  1193. package/dist/src/ui/components/views/ChatList.test.js +46 -0
  1194. package/dist/src/ui/components/views/ChatList.test.js.map +1 -0
  1195. package/dist/src/ui/components/views/ExtensionsList.d.ts +13 -0
  1196. package/dist/src/ui/components/views/ExtensionsList.js +44 -0
  1197. package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
  1198. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +7 -0
  1199. package/dist/src/ui/components/views/ExtensionsList.test.js +112 -0
  1200. package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
  1201. package/dist/src/ui/components/views/HooksList.d.ts +25 -0
  1202. package/dist/src/ui/components/views/HooksList.js +25 -0
  1203. package/dist/src/ui/components/views/HooksList.js.map +1 -0
  1204. package/dist/src/ui/components/views/McpStatus.d.ts +28 -0
  1205. package/dist/src/ui/components/views/McpStatus.js +87 -0
  1206. package/dist/src/ui/components/views/McpStatus.js.map +1 -0
  1207. package/dist/src/ui/components/views/McpStatus.test.d.ts +7 -0
  1208. package/dist/src/ui/components/views/McpStatus.test.js +137 -0
  1209. package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
  1210. package/dist/src/ui/components/views/ToolsList.d.ts +15 -0
  1211. package/dist/src/ui/components/views/ToolsList.js +7 -0
  1212. package/dist/src/ui/components/views/ToolsList.js.map +1 -0
  1213. package/dist/src/ui/components/views/ToolsList.test.d.ts +7 -0
  1214. package/dist/src/ui/components/views/ToolsList.test.js +46 -0
  1215. package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
  1216. package/dist/src/ui/constants/tips.d.ts +7 -0
  1217. package/dist/src/ui/constants/tips.js +166 -0
  1218. package/dist/src/ui/constants/tips.js.map +1 -0
  1219. package/dist/src/ui/constants/wittyPhrases.d.ts +7 -0
  1220. package/dist/src/ui/constants/wittyPhrases.js +138 -0
  1221. package/dist/src/ui/constants/wittyPhrases.js.map +1 -0
  1222. package/dist/src/ui/constants.d.ts +18 -0
  1223. package/dist/src/ui/constants.js +24 -0
  1224. package/dist/src/ui/constants.js.map +1 -0
  1225. package/dist/src/ui/contexts/AppContext.d.ts +12 -0
  1226. package/dist/src/ui/contexts/AppContext.js +16 -0
  1227. package/dist/src/ui/contexts/AppContext.js.map +1 -0
  1228. package/dist/src/ui/contexts/ConfigContext.d.ts +10 -0
  1229. package/dist/src/ui/contexts/ConfigContext.js +17 -0
  1230. package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
  1231. package/dist/src/ui/contexts/KeypressContext.d.ts +32 -0
  1232. package/dist/src/ui/contexts/KeypressContext.js +530 -0
  1233. package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
  1234. package/dist/src/ui/contexts/KeypressContext.test.d.ts +7 -0
  1235. package/dist/src/ui/contexts/KeypressContext.test.js +712 -0
  1236. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
  1237. package/dist/src/ui/contexts/MouseContext.d.ts +22 -0
  1238. package/dist/src/ui/contexts/MouseContext.js +105 -0
  1239. package/dist/src/ui/contexts/MouseContext.js.map +1 -0
  1240. package/dist/src/ui/contexts/MouseContext.test.d.ts +7 -0
  1241. package/dist/src/ui/contexts/MouseContext.test.js +199 -0
  1242. package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
  1243. package/dist/src/ui/contexts/OverflowContext.d.ts +20 -0
  1244. package/dist/src/ui/contexts/OverflowContext.js +38 -0
  1245. package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
  1246. package/dist/src/ui/contexts/ScrollProvider.d.ts +26 -0
  1247. package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +7 -0
  1248. package/dist/src/ui/contexts/ScrollProvider.drag.test.js +320 -0
  1249. package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +1 -0
  1250. package/dist/src/ui/contexts/ScrollProvider.js +242 -0
  1251. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -0
  1252. package/dist/src/ui/contexts/ScrollProvider.test.d.ts +7 -0
  1253. package/dist/src/ui/contexts/ScrollProvider.test.js +378 -0
  1254. package/dist/src/ui/contexts/ScrollProvider.test.js.map +1 -0
  1255. package/dist/src/ui/contexts/SessionContext.d.ts +47 -0
  1256. package/dist/src/ui/contexts/SessionContext.js +158 -0
  1257. package/dist/src/ui/contexts/SessionContext.js.map +1 -0
  1258. package/dist/src/ui/contexts/SessionContext.test.d.ts +7 -0
  1259. package/dist/src/ui/contexts/SessionContext.test.js +199 -0
  1260. package/dist/src/ui/contexts/SessionContext.test.js.map +1 -0
  1261. package/dist/src/ui/contexts/SettingsContext.d.ts +10 -0
  1262. package/dist/src/ui/contexts/SettingsContext.js +16 -0
  1263. package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
  1264. package/dist/src/ui/contexts/ShellFocusContext.d.ts +8 -0
  1265. package/dist/src/ui/contexts/ShellFocusContext.js +10 -0
  1266. package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
  1267. package/dist/src/ui/contexts/StreamingContext.d.ts +10 -0
  1268. package/dist/src/ui/contexts/StreamingContext.js +16 -0
  1269. package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
  1270. package/dist/src/ui/contexts/ThemeContext.d.ts +22 -0
  1271. package/dist/src/ui/contexts/ThemeContext.js +13 -0
  1272. package/dist/src/ui/contexts/ThemeContext.js.map +1 -0
  1273. package/dist/src/ui/contexts/UIActionsContext.d.ts +56 -0
  1274. package/dist/src/ui/contexts/UIActionsContext.js +22 -0
  1275. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
  1276. package/dist/src/ui/contexts/UIStateContext.d.ts +129 -0
  1277. package/dist/src/ui/contexts/UIStateContext.js +18 -0
  1278. package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
  1279. package/dist/src/ui/contexts/VimModeContext.d.ts +20 -0
  1280. package/dist/src/ui/contexts/VimModeContext.js +49 -0
  1281. package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
  1282. package/dist/src/ui/contexts/VoiceContext.d.ts +14 -0
  1283. package/dist/src/ui/contexts/VoiceContext.js +18 -0
  1284. package/dist/src/ui/contexts/VoiceContext.js.map +1 -0
  1285. package/dist/src/ui/debug.d.ts +9 -0
  1286. package/dist/src/ui/debug.js +12 -0
  1287. package/dist/src/ui/debug.js.map +1 -0
  1288. package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
  1289. package/dist/src/ui/editors/editorSettingsManager.js +38 -0
  1290. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
  1291. package/dist/src/ui/hooks/atCommandProcessor.d.ts +33 -0
  1292. package/dist/src/ui/hooks/atCommandProcessor.js +500 -0
  1293. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
  1294. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +7 -0
  1295. package/dist/src/ui/hooks/atCommandProcessor.test.js +1027 -0
  1296. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
  1297. package/dist/src/ui/hooks/keyToAnsi.d.ts +16 -0
  1298. package/dist/src/ui/hooks/keyToAnsi.js +68 -0
  1299. package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
  1300. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +23 -0
  1301. package/dist/src/ui/hooks/shellCommandProcessor.js +312 -0
  1302. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
  1303. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +7 -0
  1304. package/dist/src/ui/hooks/shellCommandProcessor.test.js +522 -0
  1305. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
  1306. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +51 -0
  1307. package/dist/src/ui/hooks/slashCommandProcessor.js +471 -0
  1308. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
  1309. package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +7 -0
  1310. package/dist/src/ui/hooks/slashCommandProcessor.test.js +846 -0
  1311. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -0
  1312. package/dist/src/ui/hooks/useAlternateBuffer.d.ts +9 -0
  1313. package/dist/src/ui/hooks/useAlternateBuffer.js +13 -0
  1314. package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -0
  1315. package/dist/src/ui/hooks/useAnimatedScrollbar.d.ts +11 -0
  1316. package/dist/src/ui/hooks/useAnimatedScrollbar.js +92 -0
  1317. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -0
  1318. package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +7 -0
  1319. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +86 -0
  1320. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +1 -0
  1321. package/dist/src/ui/hooks/useAtCompletion.d.ts +24 -0
  1322. package/dist/src/ui/hooks/useAtCompletion.js +230 -0
  1323. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
  1324. package/dist/src/ui/hooks/useAtCompletion.test.d.ts +7 -0
  1325. package/dist/src/ui/hooks/useAtCompletion.test.js +418 -0
  1326. package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -0
  1327. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +14 -0
  1328. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +61 -0
  1329. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
  1330. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +7 -0
  1331. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +411 -0
  1332. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
  1333. package/dist/src/ui/hooks/useBanner.d.ts +15 -0
  1334. package/dist/src/ui/hooks/useBanner.js +49 -0
  1335. package/dist/src/ui/hooks/useBanner.js.map +1 -0
  1336. package/dist/src/ui/hooks/useBanner.test.d.ts +7 -0
  1337. package/dist/src/ui/hooks/useBanner.test.js +93 -0
  1338. package/dist/src/ui/hooks/useBanner.test.js.map +1 -0
  1339. package/dist/src/ui/hooks/useBatchedScroll.d.ts +15 -0
  1340. package/dist/src/ui/hooks/useBatchedScroll.js +28 -0
  1341. package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -0
  1342. package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +7 -0
  1343. package/dist/src/ui/hooks/useBatchedScroll.test.js +63 -0
  1344. package/dist/src/ui/hooks/useBatchedScroll.test.js.map +1 -0
  1345. package/dist/src/ui/hooks/useBracketedPaste.d.ts +13 -0
  1346. package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
  1347. package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
  1348. package/dist/src/ui/hooks/useCommandCompletion.d.ts +42 -0
  1349. package/dist/src/ui/hooks/useCommandCompletion.js +233 -0
  1350. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
  1351. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +7 -0
  1352. package/dist/src/ui/hooks/useCommandCompletion.test.js +377 -0
  1353. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -0
  1354. package/dist/src/ui/hooks/useCompletion.d.ts +25 -0
  1355. package/dist/src/ui/hooks/useCompletion.js +89 -0
  1356. package/dist/src/ui/hooks/useCompletion.js.map +1 -0
  1357. package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
  1358. package/dist/src/ui/hooks/useConsoleMessages.js +102 -0
  1359. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
  1360. package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +7 -0
  1361. package/dist/src/ui/hooks/useConsoleMessages.test.js +160 -0
  1362. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -0
  1363. package/dist/src/ui/hooks/useEditorSettings.d.ts +17 -0
  1364. package/dist/src/ui/hooks/useEditorSettings.js +45 -0
  1365. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
  1366. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +7 -0
  1367. package/dist/src/ui/hooks/useEditorSettings.test.js +180 -0
  1368. package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
  1369. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +32 -0
  1370. package/dist/src/ui/hooks/useExtensionUpdates.js +176 -0
  1371. package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
  1372. package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +7 -0
  1373. package/dist/src/ui/hooks/useExtensionUpdates.test.js +264 -0
  1374. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
  1375. package/dist/src/ui/hooks/useFlickerDetector.d.ts +15 -0
  1376. package/dist/src/ui/hooks/useFlickerDetector.js +38 -0
  1377. package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -0
  1378. package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +7 -0
  1379. package/dist/src/ui/hooks/useFlickerDetector.test.js +107 -0
  1380. package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -0
  1381. package/dist/src/ui/hooks/useFocus.d.ts +11 -0
  1382. package/dist/src/ui/hooks/useFocus.js +52 -0
  1383. package/dist/src/ui/hooks/useFocus.js.map +1 -0
  1384. package/dist/src/ui/hooks/useFocus.test.d.ts +7 -0
  1385. package/dist/src/ui/hooks/useFocus.test.js +132 -0
  1386. package/dist/src/ui/hooks/useFocus.test.js.map +1 -0
  1387. package/dist/src/ui/hooks/useFolderTrust.d.ts +15 -0
  1388. package/dist/src/ui/hooks/useFolderTrust.js +82 -0
  1389. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
  1390. package/dist/src/ui/hooks/useFolderTrust.test.d.ts +7 -0
  1391. package/dist/src/ui/hooks/useFolderTrust.test.js +211 -0
  1392. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -0
  1393. package/dist/src/ui/hooks/useGeminiStream.d.ts +40 -0
  1394. package/dist/src/ui/hooks/useGeminiStream.js +860 -0
  1395. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
  1396. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +7 -0
  1397. package/dist/src/ui/hooks/useGeminiStream.test.js +1829 -0
  1398. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -0
  1399. package/dist/src/ui/hooks/useGitBranchName.d.ts +7 -0
  1400. package/dist/src/ui/hooks/useGitBranchName.js +66 -0
  1401. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
  1402. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +7 -0
  1403. package/dist/src/ui/hooks/useGitBranchName.test.js +183 -0
  1404. package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
  1405. package/dist/src/ui/hooks/useHistoryManager.d.ts +26 -0
  1406. package/dist/src/ui/hooks/useHistoryManager.js +109 -0
  1407. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
  1408. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +7 -0
  1409. package/dist/src/ui/hooks/useHistoryManager.test.js +173 -0
  1410. package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
  1411. package/dist/src/ui/hooks/useIdeTrustListener.d.ts +17 -0
  1412. package/dist/src/ui/hooks/useIdeTrustListener.js +68 -0
  1413. package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
  1414. package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +7 -0
  1415. package/dist/src/ui/hooks/useIdeTrustListener.test.js +215 -0
  1416. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
  1417. package/dist/src/ui/hooks/useInactivityTimer.d.ts +15 -0
  1418. package/dist/src/ui/hooks/useInactivityTimer.js +31 -0
  1419. package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -0
  1420. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +9 -0
  1421. package/dist/src/ui/hooks/useIncludeDirsTrust.js +122 -0
  1422. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -0
  1423. package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +7 -0
  1424. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +152 -0
  1425. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -0
  1426. package/dist/src/ui/hooks/useInputHistory.d.ts +20 -0
  1427. package/dist/src/ui/hooks/useInputHistory.js +85 -0
  1428. package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
  1429. package/dist/src/ui/hooks/useInputHistory.test.d.ts +7 -0
  1430. package/dist/src/ui/hooks/useInputHistory.test.js +209 -0
  1431. package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
  1432. package/dist/src/ui/hooks/useInputHistoryStore.d.ts +20 -0
  1433. package/dist/src/ui/hooks/useInputHistoryStore.js +83 -0
  1434. package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
  1435. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +7 -0
  1436. package/dist/src/ui/hooks/useInputHistoryStore.test.js +239 -0
  1437. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
  1438. package/dist/src/ui/hooks/useKeypress.d.ts +18 -0
  1439. package/dist/src/ui/hooks/useKeypress.js +28 -0
  1440. package/dist/src/ui/hooks/useKeypress.js.map +1 -0
  1441. package/dist/src/ui/hooks/useKeypress.test.d.ts +7 -0
  1442. package/dist/src/ui/hooks/useKeypress.test.js +201 -0
  1443. package/dist/src/ui/hooks/useKeypress.test.js.map +1 -0
  1444. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +15 -0
  1445. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
  1446. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
  1447. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +11 -0
  1448. package/dist/src/ui/hooks/useLoadingIndicator.js +45 -0
  1449. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
  1450. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +7 -0
  1451. package/dist/src/ui/hooks/useLoadingIndicator.test.js +128 -0
  1452. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
  1453. package/dist/src/ui/hooks/useLogger.d.ts +12 -0
  1454. package/dist/src/ui/hooks/useLogger.js +30 -0
  1455. package/dist/src/ui/hooks/useLogger.js.map +1 -0
  1456. package/dist/src/ui/hooks/useMemoryMonitor.d.ts +14 -0
  1457. package/dist/src/ui/hooks/useMemoryMonitor.js +29 -0
  1458. package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
  1459. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +7 -0
  1460. package/dist/src/ui/hooks/useMemoryMonitor.test.js +63 -0
  1461. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
  1462. package/dist/src/ui/hooks/useMessageQueue.d.ts +25 -0
  1463. package/dist/src/ui/hooks/useMessageQueue.js +62 -0
  1464. package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
  1465. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +7 -0
  1466. package/dist/src/ui/hooks/useMessageQueue.test.js +294 -0
  1467. package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
  1468. package/dist/src/ui/hooks/useModelCommand.d.ts +13 -0
  1469. package/dist/src/ui/hooks/useModelCommand.js +22 -0
  1470. package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
  1471. package/dist/src/ui/hooks/useModelCommand.test.d.ts +7 -0
  1472. package/dist/src/ui/hooks/useModelCommand.test.js +46 -0
  1473. package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
  1474. package/dist/src/ui/hooks/useMouse.d.ts +18 -0
  1475. package/dist/src/ui/hooks/useMouse.js +28 -0
  1476. package/dist/src/ui/hooks/useMouse.js.map +1 -0
  1477. package/dist/src/ui/hooks/useMouse.test.d.ts +7 -0
  1478. package/dist/src/ui/hooks/useMouse.test.js +58 -0
  1479. package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
  1480. package/dist/src/ui/hooks/useMouseClick.d.ts +13 -0
  1481. package/dist/src/ui/hooks/useMouseClick.js +29 -0
  1482. package/dist/src/ui/hooks/useMouseClick.js.map +1 -0
  1483. package/dist/src/ui/hooks/useMouseClick.test.d.ts +7 -0
  1484. package/dist/src/ui/hooks/useMouseClick.test.js +60 -0
  1485. package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -0
  1486. package/dist/src/ui/hooks/useMouseHover.d.ts +11 -0
  1487. package/dist/src/ui/hooks/useMouseHover.js +35 -0
  1488. package/dist/src/ui/hooks/useMouseHover.js.map +1 -0
  1489. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +18 -0
  1490. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +116 -0
  1491. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
  1492. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +7 -0
  1493. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +285 -0
  1494. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
  1495. package/dist/src/ui/hooks/usePhraseCycler.d.ts +17 -0
  1496. package/dist/src/ui/hooks/usePhraseCycler.js +92 -0
  1497. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
  1498. package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +7 -0
  1499. package/dist/src/ui/hooks/usePhraseCycler.test.js +238 -0
  1500. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -0
  1501. package/dist/src/ui/hooks/usePrivacySettings.d.ts +17 -0
  1502. package/dist/src/ui/hooks/usePrivacySettings.js +104 -0
  1503. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
  1504. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +7 -0
  1505. package/dist/src/ui/hooks/usePrivacySettings.test.js +105 -0
  1506. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -0
  1507. package/dist/src/ui/hooks/usePromptCompletion.d.ts +24 -0
  1508. package/dist/src/ui/hooks/usePromptCompletion.js +170 -0
  1509. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -0
  1510. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +20 -0
  1511. package/dist/src/ui/hooks/useQuotaAndFallback.js +112 -0
  1512. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
  1513. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +7 -0
  1514. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +333 -0
  1515. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
  1516. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +43 -0
  1517. package/dist/src/ui/hooks/useReactToolScheduler.js +224 -0
  1518. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
  1519. package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +7 -0
  1520. package/dist/src/ui/hooks/useReactToolScheduler.test.js +59 -0
  1521. package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -0
  1522. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +7 -0
  1523. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +8 -0
  1524. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
  1525. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +20 -0
  1526. package/dist/src/ui/hooks/useReverseSearchCompletion.js +104 -0
  1527. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
  1528. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +7 -0
  1529. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +170 -0
  1530. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
  1531. package/dist/src/ui/hooks/useSelectionList.d.ts +35 -0
  1532. package/dist/src/ui/hooks/useSelectionList.js +274 -0
  1533. package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
  1534. package/dist/src/ui/hooks/useSelectionList.test.d.ts +7 -0
  1535. package/dist/src/ui/hooks/useSelectionList.test.js +820 -0
  1536. package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
  1537. package/dist/src/ui/hooks/useSessionBrowser.d.ts +36 -0
  1538. package/dist/src/ui/hooks/useSessionBrowser.js +225 -0
  1539. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -0
  1540. package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +7 -0
  1541. package/dist/src/ui/hooks/useSessionBrowser.test.js +210 -0
  1542. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -0
  1543. package/dist/src/ui/hooks/useSessionResume.d.ts +31 -0
  1544. package/dist/src/ui/hooks/useSessionResume.js +58 -0
  1545. package/dist/src/ui/hooks/useSessionResume.js.map +1 -0
  1546. package/dist/src/ui/hooks/useSessionResume.test.d.ts +7 -0
  1547. package/dist/src/ui/hooks/useSessionResume.test.js +326 -0
  1548. package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -0
  1549. package/dist/src/ui/hooks/useSettingsCommand.d.ts +11 -0
  1550. package/dist/src/ui/hooks/useSettingsCommand.js +22 -0
  1551. package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
  1552. package/dist/src/ui/hooks/useShellHistory.d.ts +15 -0
  1553. package/dist/src/ui/hooks/useShellHistory.js +114 -0
  1554. package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
  1555. package/dist/src/ui/hooks/useShellHistory.test.d.ts +7 -0
  1556. package/dist/src/ui/hooks/useShellHistory.test.js +224 -0
  1557. package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
  1558. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +10 -0
  1559. package/dist/src/ui/hooks/useShowMemoryCommand.js +60 -0
  1560. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
  1561. package/dist/src/ui/hooks/useSlashCompletion.d.ts +24 -0
  1562. package/dist/src/ui/hooks/useSlashCompletion.js +395 -0
  1563. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
  1564. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +10 -0
  1565. package/dist/src/ui/hooks/useSlashCompletion.test.js +846 -0
  1566. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
  1567. package/dist/src/ui/hooks/useStateAndRef.d.ts +8 -0
  1568. package/dist/src/ui/hooks/useStateAndRef.js +27 -0
  1569. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
  1570. package/dist/src/ui/hooks/useTerminalSize.d.ts +10 -0
  1571. package/dist/src/ui/hooks/useTerminalSize.js +27 -0
  1572. package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
  1573. package/dist/src/ui/hooks/useThemeCommand.d.ts +17 -0
  1574. package/dist/src/ui/hooks/useThemeCommand.js +75 -0
  1575. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
  1576. package/dist/src/ui/hooks/useTimer.d.ts +13 -0
  1577. package/dist/src/ui/hooks/useTimer.js +59 -0
  1578. package/dist/src/ui/hooks/useTimer.js.map +1 -0
  1579. package/dist/src/ui/hooks/useTimer.test.d.ts +7 -0
  1580. package/dist/src/ui/hooks/useTimer.test.js +120 -0
  1581. package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
  1582. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +7 -0
  1583. package/dist/src/ui/hooks/useToolScheduler.test.js +858 -0
  1584. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
  1585. package/dist/src/ui/hooks/vim.d.ts +29 -0
  1586. package/dist/src/ui/hooks/vim.js +642 -0
  1587. package/dist/src/ui/hooks/vim.js.map +1 -0
  1588. package/dist/src/ui/hooks/vim.test.d.ts +7 -0
  1589. package/dist/src/ui/hooks/vim.test.js +1271 -0
  1590. package/dist/src/ui/hooks/vim.test.js.map +1 -0
  1591. package/dist/src/ui/keyMatchers.d.ts +28 -0
  1592. package/dist/src/ui/keyMatchers.js +69 -0
  1593. package/dist/src/ui/keyMatchers.js.map +1 -0
  1594. package/dist/src/ui/keyMatchers.test.d.ts +7 -0
  1595. package/dist/src/ui/keyMatchers.test.js +365 -0
  1596. package/dist/src/ui/keyMatchers.test.js.map +1 -0
  1597. package/dist/src/ui/kit/InteractiveBox.d.ts +17 -0
  1598. package/dist/src/ui/kit/InteractiveBox.js +34 -0
  1599. package/dist/src/ui/kit/InteractiveBox.js.map +1 -0
  1600. package/dist/src/ui/kit/InteractiveBox.test.d.ts +7 -0
  1601. package/dist/src/ui/kit/InteractiveBox.test.js +36 -0
  1602. package/dist/src/ui/kit/InteractiveBox.test.js.map +1 -0
  1603. package/dist/src/ui/kit/Theme.d.ts +29 -0
  1604. package/dist/src/ui/kit/Theme.js +30 -0
  1605. package/dist/src/ui/kit/Theme.js.map +1 -0
  1606. package/dist/src/ui/layouts/DefaultAppLayout.d.ts +8 -0
  1607. package/dist/src/ui/layouts/DefaultAppLayout.js +53 -0
  1608. package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
  1609. package/dist/src/ui/layouts/DialogLayer.d.ts +11 -0
  1610. package/dist/src/ui/layouts/DialogLayer.js +14 -0
  1611. package/dist/src/ui/layouts/DialogLayer.js.map +1 -0
  1612. package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +8 -0
  1613. package/dist/src/ui/layouts/ScreenReaderAppLayout.js +17 -0
  1614. package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
  1615. package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +13 -0
  1616. package/dist/src/ui/noninteractive/nonInteractiveUi.js +31 -0
  1617. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
  1618. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +13 -0
  1619. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +43 -0
  1620. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
  1621. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +7 -0
  1622. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +122 -0
  1623. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -0
  1624. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +11 -0
  1625. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +19 -0
  1626. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
  1627. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +7 -0
  1628. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +35 -0
  1629. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -0
  1630. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +11 -0
  1631. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +19 -0
  1632. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
  1633. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +7 -0
  1634. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +35 -0
  1635. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -0
  1636. package/dist/src/ui/privacy/PrivacyNotice.d.ts +13 -0
  1637. package/dist/src/ui/privacy/PrivacyNotice.js +26 -0
  1638. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
  1639. package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +7 -0
  1640. package/dist/src/ui/privacy/PrivacyNotice.test.js +63 -0
  1641. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -0
  1642. package/dist/src/ui/semantic-colors.d.ts +8 -0
  1643. package/dist/src/ui/semantic-colors.js +25 -0
  1644. package/dist/src/ui/semantic-colors.js.map +1 -0
  1645. package/dist/src/ui/state/extensions.d.ts +68 -0
  1646. package/dist/src/ui/state/extensions.js +98 -0
  1647. package/dist/src/ui/state/extensions.js.map +1 -0
  1648. package/dist/src/ui/state/extensions.test.d.ts +7 -0
  1649. package/dist/src/ui/state/extensions.test.js +220 -0
  1650. package/dist/src/ui/state/extensions.test.js.map +1 -0
  1651. package/dist/src/ui/textConstants.d.ts +10 -0
  1652. package/dist/src/ui/textConstants.js +11 -0
  1653. package/dist/src/ui/textConstants.js.map +1 -0
  1654. package/dist/src/ui/themes/ansi-light.d.ts +8 -0
  1655. package/dist/src/ui/themes/ansi-light.js +144 -0
  1656. package/dist/src/ui/themes/ansi-light.js.map +1 -0
  1657. package/dist/src/ui/themes/ansi.d.ts +8 -0
  1658. package/dist/src/ui/themes/ansi.js +154 -0
  1659. package/dist/src/ui/themes/ansi.js.map +1 -0
  1660. package/dist/src/ui/themes/atom-one-dark.d.ts +8 -0
  1661. package/dist/src/ui/themes/atom-one-dark.js +141 -0
  1662. package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
  1663. package/dist/src/ui/themes/ayu-light.d.ts +8 -0
  1664. package/dist/src/ui/themes/ayu-light.js +133 -0
  1665. package/dist/src/ui/themes/ayu-light.js.map +1 -0
  1666. package/dist/src/ui/themes/ayu.d.ts +8 -0
  1667. package/dist/src/ui/themes/ayu.js +107 -0
  1668. package/dist/src/ui/themes/ayu.js.map +1 -0
  1669. package/dist/src/ui/themes/color-utils.d.ts +24 -0
  1670. package/dist/src/ui/themes/color-utils.js +251 -0
  1671. package/dist/src/ui/themes/color-utils.js.map +1 -0
  1672. package/dist/src/ui/themes/color-utils.test.d.ts +7 -0
  1673. package/dist/src/ui/themes/color-utils.test.js +246 -0
  1674. package/dist/src/ui/themes/color-utils.test.js.map +1 -0
  1675. package/dist/src/ui/themes/default-light.d.ts +8 -0
  1676. package/dist/src/ui/themes/default-light.js +101 -0
  1677. package/dist/src/ui/themes/default-light.js.map +1 -0
  1678. package/dist/src/ui/themes/default.d.ts +8 -0
  1679. package/dist/src/ui/themes/default.js +144 -0
  1680. package/dist/src/ui/themes/default.js.map +1 -0
  1681. package/dist/src/ui/themes/dracula.d.ts +8 -0
  1682. package/dist/src/ui/themes/dracula.js +118 -0
  1683. package/dist/src/ui/themes/dracula.js.map +1 -0
  1684. package/dist/src/ui/themes/github-dark.d.ts +8 -0
  1685. package/dist/src/ui/themes/github-dark.js +141 -0
  1686. package/dist/src/ui/themes/github-dark.js.map +1 -0
  1687. package/dist/src/ui/themes/github-light.d.ts +8 -0
  1688. package/dist/src/ui/themes/github-light.js +143 -0
  1689. package/dist/src/ui/themes/github-light.js.map +1 -0
  1690. package/dist/src/ui/themes/googlecode.d.ts +8 -0
  1691. package/dist/src/ui/themes/googlecode.js +140 -0
  1692. package/dist/src/ui/themes/googlecode.js.map +1 -0
  1693. package/dist/src/ui/themes/holiday.d.ts +8 -0
  1694. package/dist/src/ui/themes/holiday.js +163 -0
  1695. package/dist/src/ui/themes/holiday.js.map +1 -0
  1696. package/dist/src/ui/themes/no-color.d.ts +8 -0
  1697. package/dist/src/ui/themes/no-color.js +119 -0
  1698. package/dist/src/ui/themes/no-color.js.map +1 -0
  1699. package/dist/src/ui/themes/semantic-tokens.d.ts +40 -0
  1700. package/dist/src/ui/themes/semantic-tokens.js +101 -0
  1701. package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
  1702. package/dist/src/ui/themes/shades-of-purple.d.ts +12 -0
  1703. package/dist/src/ui/themes/shades-of-purple.js +307 -0
  1704. package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
  1705. package/dist/src/ui/themes/termai-dark.d.ts +8 -0
  1706. package/dist/src/ui/themes/termai-dark.js +163 -0
  1707. package/dist/src/ui/themes/termai-dark.js.map +1 -0
  1708. package/dist/src/ui/themes/termai-light.d.ts +8 -0
  1709. package/dist/src/ui/themes/termai-light.js +120 -0
  1710. package/dist/src/ui/themes/termai-light.js.map +1 -0
  1711. package/dist/src/ui/themes/theme-manager.d.ts +72 -0
  1712. package/dist/src/ui/themes/theme-manager.js +277 -0
  1713. package/dist/src/ui/themes/theme-manager.js.map +1 -0
  1714. package/dist/src/ui/themes/theme-manager.test.d.ts +7 -0
  1715. package/dist/src/ui/themes/theme-manager.test.js +144 -0
  1716. package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
  1717. package/dist/src/ui/themes/theme.d.ts +146 -0
  1718. package/dist/src/ui/themes/theme.js +423 -0
  1719. package/dist/src/ui/themes/theme.js.map +1 -0
  1720. package/dist/src/ui/themes/theme.test.d.ts +7 -0
  1721. package/dist/src/ui/themes/theme.test.js +175 -0
  1722. package/dist/src/ui/themes/theme.test.js.map +1 -0
  1723. package/dist/src/ui/themes/xcode.d.ts +8 -0
  1724. package/dist/src/ui/themes/xcode.js +148 -0
  1725. package/dist/src/ui/themes/xcode.js.map +1 -0
  1726. package/dist/src/ui/types.d.ts +322 -0
  1727. package/dist/src/ui/types.js +72 -0
  1728. package/dist/src/ui/types.js.map +1 -0
  1729. package/dist/src/ui/utils/CodeColorizer.d.ts +26 -0
  1730. package/dist/src/ui/utils/CodeColorizer.js +124 -0
  1731. package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
  1732. package/dist/src/ui/utils/CodeColorizer.test.d.ts +7 -0
  1733. package/dist/src/ui/utils/CodeColorizer.test.js +39 -0
  1734. package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -0
  1735. package/dist/src/ui/utils/ConsolePatcher.d.ts +26 -0
  1736. package/dist/src/ui/utils/ConsolePatcher.js +50 -0
  1737. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
  1738. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +18 -0
  1739. package/dist/src/ui/utils/InlineMarkdownRenderer.js +113 -0
  1740. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
  1741. package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +7 -0
  1742. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +22 -0
  1743. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +1 -0
  1744. package/dist/src/ui/utils/MarkdownDisplay.d.ts +16 -0
  1745. package/dist/src/ui/utils/MarkdownDisplay.js +243 -0
  1746. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
  1747. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +7 -0
  1748. package/dist/src/ui/utils/MarkdownDisplay.test.js +160 -0
  1749. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
  1750. package/dist/src/ui/utils/TableRenderer.d.ts +18 -0
  1751. package/dist/src/ui/utils/TableRenderer.js +85 -0
  1752. package/dist/src/ui/utils/TableRenderer.js.map +1 -0
  1753. package/dist/src/ui/utils/bracketedPaste.d.ts +8 -0
  1754. package/dist/src/ui/utils/bracketedPaste.js +16 -0
  1755. package/dist/src/ui/utils/bracketedPaste.js.map +1 -0
  1756. package/dist/src/ui/utils/clipboardUtils.d.ts +48 -0
  1757. package/dist/src/ui/utils/clipboardUtils.js +259 -0
  1758. package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
  1759. package/dist/src/ui/utils/clipboardUtils.test.d.ts +7 -0
  1760. package/dist/src/ui/utils/clipboardUtils.test.js +188 -0
  1761. package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
  1762. package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +7 -0
  1763. package/dist/src/ui/utils/clipboardUtils.windows.test.js +53 -0
  1764. package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +1 -0
  1765. package/dist/src/ui/utils/commandUtils.d.ts +37 -0
  1766. package/dist/src/ui/utils/commandUtils.js +190 -0
  1767. package/dist/src/ui/utils/commandUtils.js.map +1 -0
  1768. package/dist/src/ui/utils/commandUtils.test.d.ts +7 -0
  1769. package/dist/src/ui/utils/commandUtils.test.js +310 -0
  1770. package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
  1771. package/dist/src/ui/utils/computeStats.d.ts +11 -0
  1772. package/dist/src/ui/utils/computeStats.js +63 -0
  1773. package/dist/src/ui/utils/computeStats.js.map +1 -0
  1774. package/dist/src/ui/utils/computeStats.test.d.ts +7 -0
  1775. package/dist/src/ui/utils/computeStats.test.js +272 -0
  1776. package/dist/src/ui/utils/computeStats.test.js.map +1 -0
  1777. package/dist/src/ui/utils/directoryUtils.d.ts +7 -0
  1778. package/dist/src/ui/utils/directoryUtils.js +22 -0
  1779. package/dist/src/ui/utils/directoryUtils.js.map +1 -0
  1780. package/dist/src/ui/utils/directoryUtils.test.d.ts +7 -0
  1781. package/dist/src/ui/utils/directoryUtils.test.js +53 -0
  1782. package/dist/src/ui/utils/directoryUtils.test.js.map +1 -0
  1783. package/dist/src/ui/utils/displayUtils.d.ts +19 -0
  1784. package/dist/src/ui/utils/displayUtils.js +28 -0
  1785. package/dist/src/ui/utils/displayUtils.js.map +1 -0
  1786. package/dist/src/ui/utils/displayUtils.test.d.ts +7 -0
  1787. package/dist/src/ui/utils/displayUtils.test.js +62 -0
  1788. package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
  1789. package/dist/src/ui/utils/formatters.d.ts +14 -0
  1790. package/dist/src/ui/utils/formatters.js +57 -0
  1791. package/dist/src/ui/utils/formatters.js.map +1 -0
  1792. package/dist/src/ui/utils/formatters.test.d.ts +7 -0
  1793. package/dist/src/ui/utils/formatters.test.js +57 -0
  1794. package/dist/src/ui/utils/formatters.test.js.map +1 -0
  1795. package/dist/src/ui/utils/highlight.d.ts +12 -0
  1796. package/dist/src/ui/utils/highlight.js +83 -0
  1797. package/dist/src/ui/utils/highlight.js.map +1 -0
  1798. package/dist/src/ui/utils/highlight.test.d.ts +7 -0
  1799. package/dist/src/ui/utils/highlight.test.js +121 -0
  1800. package/dist/src/ui/utils/highlight.test.js.map +1 -0
  1801. package/dist/src/ui/utils/input.d.ts +18 -0
  1802. package/dist/src/ui/utils/input.js +52 -0
  1803. package/dist/src/ui/utils/input.js.map +1 -0
  1804. package/dist/src/ui/utils/input.test.d.ts +7 -0
  1805. package/dist/src/ui/utils/input.test.js +45 -0
  1806. package/dist/src/ui/utils/input.test.js.map +1 -0
  1807. package/dist/src/ui/utils/isNarrowWidth.d.ts +7 -0
  1808. package/dist/src/ui/utils/isNarrowWidth.js +10 -0
  1809. package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
  1810. package/dist/src/ui/utils/markdownUtilities.d.ts +7 -0
  1811. package/dist/src/ui/utils/markdownUtilities.js +111 -0
  1812. package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
  1813. package/dist/src/ui/utils/markdownUtilities.test.d.ts +7 -0
  1814. package/dist/src/ui/utils/markdownUtilities.test.js +43 -0
  1815. package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
  1816. package/dist/src/ui/utils/mouse.d.ts +33 -0
  1817. package/dist/src/ui/utils/mouse.js +182 -0
  1818. package/dist/src/ui/utils/mouse.js.map +1 -0
  1819. package/dist/src/ui/utils/mouse.test.d.ts +7 -0
  1820. package/dist/src/ui/utils/mouse.test.js +137 -0
  1821. package/dist/src/ui/utils/mouse.test.js.map +1 -0
  1822. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +39 -0
  1823. package/dist/src/ui/utils/terminalCapabilityManager.js +191 -0
  1824. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -0
  1825. package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +7 -0
  1826. package/dist/src/ui/utils/terminalCapabilityManager.test.js +137 -0
  1827. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -0
  1828. package/dist/src/ui/utils/terminalSetup.d.ts +35 -0
  1829. package/dist/src/ui/utils/terminalSetup.js +291 -0
  1830. package/dist/src/ui/utils/terminalSetup.js.map +1 -0
  1831. package/dist/src/ui/utils/terminalSetup.test.d.ts +7 -0
  1832. package/dist/src/ui/utils/terminalSetup.test.js +139 -0
  1833. package/dist/src/ui/utils/terminalSetup.test.js.map +1 -0
  1834. package/dist/src/ui/utils/textOutput.d.ts +28 -0
  1835. package/dist/src/ui/utils/textOutput.js +54 -0
  1836. package/dist/src/ui/utils/textOutput.js.map +1 -0
  1837. package/dist/src/ui/utils/textOutput.test.d.ts +7 -0
  1838. package/dist/src/ui/utils/textOutput.test.js +80 -0
  1839. package/dist/src/ui/utils/textOutput.test.js.map +1 -0
  1840. package/dist/src/ui/utils/textUtils.d.ts +44 -0
  1841. package/dist/src/ui/utils/textUtils.js +187 -0
  1842. package/dist/src/ui/utils/textUtils.js.map +1 -0
  1843. package/dist/src/ui/utils/textUtils.test.d.ts +7 -0
  1844. package/dist/src/ui/utils/textUtils.test.js +139 -0
  1845. package/dist/src/ui/utils/textUtils.test.js.map +1 -0
  1846. package/dist/src/ui/utils/ui-sizing.d.ts +8 -0
  1847. package/dist/src/ui/utils/ui-sizing.js +31 -0
  1848. package/dist/src/ui/utils/ui-sizing.js.map +1 -0
  1849. package/dist/src/ui/utils/ui-sizing.test.d.ts +7 -0
  1850. package/dist/src/ui/utils/ui-sizing.test.js +57 -0
  1851. package/dist/src/ui/utils/ui-sizing.test.js.map +1 -0
  1852. package/dist/src/ui/utils/updateCheck.d.ts +19 -0
  1853. package/dist/src/ui/utils/updateCheck.js +12 -0
  1854. package/dist/src/ui/utils/updateCheck.js.map +1 -0
  1855. package/dist/src/ui/utils/updateCheck.test.d.ts +7 -0
  1856. package/dist/src/ui/utils/updateCheck.test.js +135 -0
  1857. package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
  1858. package/dist/src/ui/views/SessionView.d.ts +8 -0
  1859. package/dist/src/ui/views/SessionView.js +8 -0
  1860. package/dist/src/ui/views/SessionView.js.map +1 -0
  1861. package/dist/src/ui/views/ZenView.d.ts +11 -0
  1862. package/dist/src/ui/views/ZenView.js +66 -0
  1863. package/dist/src/ui/views/ZenView.js.map +1 -0
  1864. package/dist/src/utils/checks.d.ts +20 -0
  1865. package/dist/src/utils/checks.js +25 -0
  1866. package/dist/src/utils/checks.js.map +1 -0
  1867. package/dist/src/utils/checks.test.d.ts +7 -0
  1868. package/dist/src/utils/checks.test.js +30 -0
  1869. package/dist/src/utils/checks.test.js.map +1 -0
  1870. package/dist/src/utils/cleanup.d.ts +17 -0
  1871. package/dist/src/utils/cleanup.js +79 -0
  1872. package/dist/src/utils/cleanup.js.map +1 -0
  1873. package/dist/src/utils/cleanup.test.d.ts +7 -0
  1874. package/dist/src/utils/cleanup.test.js +103 -0
  1875. package/dist/src/utils/cleanup.test.js.map +1 -0
  1876. package/dist/src/utils/commands.d.ts +21 -0
  1877. package/dist/src/utils/commands.js +54 -0
  1878. package/dist/src/utils/commands.js.map +1 -0
  1879. package/dist/src/utils/commands.test.d.ts +7 -0
  1880. package/dist/src/utils/commands.test.js +116 -0
  1881. package/dist/src/utils/commands.test.js.map +1 -0
  1882. package/dist/src/utils/commentJson.d.ts +10 -0
  1883. package/dist/src/utils/commentJson.js +131 -0
  1884. package/dist/src/utils/commentJson.js.map +1 -0
  1885. package/dist/src/utils/commentJson.test.d.ts +7 -0
  1886. package/dist/src/utils/commentJson.test.js +309 -0
  1887. package/dist/src/utils/commentJson.test.js.map +1 -0
  1888. package/dist/src/utils/deepMerge.d.ts +10 -0
  1889. package/dist/src/utils/deepMerge.js +64 -0
  1890. package/dist/src/utils/deepMerge.js.map +1 -0
  1891. package/dist/src/utils/deepMerge.test.d.ts +7 -0
  1892. package/dist/src/utils/deepMerge.test.js +202 -0
  1893. package/dist/src/utils/deepMerge.test.js.map +1 -0
  1894. package/dist/src/utils/dialogScopeUtils.d.ts +26 -0
  1895. package/dist/src/utils/dialogScopeUtils.js +51 -0
  1896. package/dist/src/utils/dialogScopeUtils.js.map +1 -0
  1897. package/dist/src/utils/dialogScopeUtils.test.d.ts +7 -0
  1898. package/dist/src/utils/dialogScopeUtils.test.js +82 -0
  1899. package/dist/src/utils/dialogScopeUtils.test.js.map +1 -0
  1900. package/dist/src/utils/envAliases.d.ts +7 -0
  1901. package/dist/src/utils/envAliases.js +9 -0
  1902. package/dist/src/utils/envAliases.js.map +1 -0
  1903. package/dist/src/utils/envVarResolver.d.ts +40 -0
  1904. package/dist/src/utils/envVarResolver.js +101 -0
  1905. package/dist/src/utils/envVarResolver.js.map +1 -0
  1906. package/dist/src/utils/envVarResolver.test.d.ts +7 -0
  1907. package/dist/src/utils/envVarResolver.test.js +222 -0
  1908. package/dist/src/utils/envVarResolver.test.js.map +1 -0
  1909. package/dist/src/utils/errors.d.ts +34 -0
  1910. package/dist/src/utils/errors.js +187 -0
  1911. package/dist/src/utils/errors.js.map +1 -0
  1912. package/dist/src/utils/errors.test.d.ts +7 -0
  1913. package/dist/src/utils/errors.test.js +378 -0
  1914. package/dist/src/utils/errors.test.js.map +1 -0
  1915. package/dist/src/utils/events.d.ts +25 -0
  1916. package/dist/src/utils/events.js +18 -0
  1917. package/dist/src/utils/events.js.map +1 -0
  1918. package/dist/src/utils/events.test.d.ts +7 -0
  1919. package/dist/src/utils/events.test.js +25 -0
  1920. package/dist/src/utils/events.test.js.map +1 -0
  1921. package/dist/src/utils/firstRun.d.ts +8 -0
  1922. package/dist/src/utils/firstRun.js +32 -0
  1923. package/dist/src/utils/firstRun.js.map +1 -0
  1924. package/dist/src/utils/gitUtils.d.ts +31 -0
  1925. package/dist/src/utils/gitUtils.js +91 -0
  1926. package/dist/src/utils/gitUtils.js.map +1 -0
  1927. package/dist/src/utils/gitUtils.test.d.ts +7 -0
  1928. package/dist/src/utils/gitUtils.test.js +114 -0
  1929. package/dist/src/utils/gitUtils.test.js.map +1 -0
  1930. package/dist/src/utils/handleAutoUpdate.d.ts +12 -0
  1931. package/dist/src/utils/handleAutoUpdate.js +116 -0
  1932. package/dist/src/utils/handleAutoUpdate.js.map +1 -0
  1933. package/dist/src/utils/handleAutoUpdate.test.d.ts +7 -0
  1934. package/dist/src/utils/handleAutoUpdate.test.js +304 -0
  1935. package/dist/src/utils/handleAutoUpdate.test.js.map +1 -0
  1936. package/dist/src/utils/installationInfo.d.ts +25 -0
  1937. package/dist/src/utils/installationInfo.js +147 -0
  1938. package/dist/src/utils/installationInfo.js.map +1 -0
  1939. package/dist/src/utils/installationInfo.test.d.ts +7 -0
  1940. package/dist/src/utils/installationInfo.test.js +248 -0
  1941. package/dist/src/utils/installationInfo.test.js.map +1 -0
  1942. package/dist/src/utils/logCleanup.d.ts +11 -0
  1943. package/dist/src/utils/logCleanup.js +47 -0
  1944. package/dist/src/utils/logCleanup.js.map +1 -0
  1945. package/dist/src/utils/math.d.ts +14 -0
  1946. package/dist/src/utils/math.js +15 -0
  1947. package/dist/src/utils/math.js.map +1 -0
  1948. package/dist/src/utils/math.test.d.ts +7 -0
  1949. package/dist/src/utils/math.test.js +24 -0
  1950. package/dist/src/utils/math.test.js.map +1 -0
  1951. package/dist/src/utils/persistentState.d.ts +24 -0
  1952. package/dist/src/utils/persistentState.js +66 -0
  1953. package/dist/src/utils/persistentState.js.map +1 -0
  1954. package/dist/src/utils/persistentState.test.d.ts +7 -0
  1955. package/dist/src/utils/persistentState.test.js +69 -0
  1956. package/dist/src/utils/persistentState.test.js.map +1 -0
  1957. package/dist/src/utils/processUtils.d.ts +14 -0
  1958. package/dist/src/utils/processUtils.js +19 -0
  1959. package/dist/src/utils/processUtils.js.map +1 -0
  1960. package/dist/src/utils/processUtils.test.d.ts +7 -0
  1961. package/dist/src/utils/processUtils.test.js +21 -0
  1962. package/dist/src/utils/processUtils.test.js.map +1 -0
  1963. package/dist/src/utils/readStdin.d.ts +7 -0
  1964. package/dist/src/utils/readStdin.js +62 -0
  1965. package/dist/src/utils/readStdin.js.map +1 -0
  1966. package/dist/src/utils/readStdin.test.d.ts +7 -0
  1967. package/dist/src/utils/readStdin.test.js +114 -0
  1968. package/dist/src/utils/readStdin.test.js.map +1 -0
  1969. package/dist/src/utils/relaunch.d.ts +8 -0
  1970. package/dist/src/utils/relaunch.js +58 -0
  1971. package/dist/src/utils/relaunch.js.map +1 -0
  1972. package/dist/src/utils/relaunch.test.d.ts +7 -0
  1973. package/dist/src/utils/relaunch.test.js +274 -0
  1974. package/dist/src/utils/relaunch.test.js.map +1 -0
  1975. package/dist/src/utils/resolvePath.d.ts +7 -0
  1976. package/dist/src/utils/resolvePath.js +22 -0
  1977. package/dist/src/utils/resolvePath.js.map +1 -0
  1978. package/dist/src/utils/resolvePath.test.d.ts +7 -0
  1979. package/dist/src/utils/resolvePath.test.js +32 -0
  1980. package/dist/src/utils/resolvePath.test.js.map +1 -0
  1981. package/dist/src/utils/sandbox-macos-permissive-closed.sb +32 -0
  1982. package/dist/src/utils/sandbox-macos-permissive-open.sb +27 -0
  1983. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +37 -0
  1984. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +93 -0
  1985. package/dist/src/utils/sandbox-macos-restrictive-open.sb +96 -0
  1986. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +98 -0
  1987. package/dist/src/utils/sandbox.d.ts +8 -0
  1988. package/dist/src/utils/sandbox.js +617 -0
  1989. package/dist/src/utils/sandbox.js.map +1 -0
  1990. package/dist/src/utils/sandbox.test.d.ts +7 -0
  1991. package/dist/src/utils/sandbox.test.js +303 -0
  1992. package/dist/src/utils/sandbox.test.js.map +1 -0
  1993. package/dist/src/utils/sandboxUtils.d.ts +15 -0
  1994. package/dist/src/utils/sandboxUtils.js +122 -0
  1995. package/dist/src/utils/sandboxUtils.js.map +1 -0
  1996. package/dist/src/utils/sandboxUtils.test.d.ts +7 -0
  1997. package/dist/src/utils/sandboxUtils.test.js +123 -0
  1998. package/dist/src/utils/sandboxUtils.test.js.map +1 -0
  1999. package/dist/src/utils/sessionCleanup.d.ts +23 -0
  2000. package/dist/src/utils/sessionCleanup.integration.test.d.ts +7 -0
  2001. package/dist/src/utils/sessionCleanup.integration.test.js +183 -0
  2002. package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -0
  2003. package/dist/src/utils/sessionCleanup.js +215 -0
  2004. package/dist/src/utils/sessionCleanup.js.map +1 -0
  2005. package/dist/src/utils/sessionCleanup.test.d.ts +7 -0
  2006. package/dist/src/utils/sessionCleanup.test.js +1349 -0
  2007. package/dist/src/utils/sessionCleanup.test.js.map +1 -0
  2008. package/dist/src/utils/sessionUtils.d.ts +151 -0
  2009. package/dist/src/utils/sessionUtils.js +307 -0
  2010. package/dist/src/utils/sessionUtils.js.map +1 -0
  2011. package/dist/src/utils/sessionUtils.test.d.ts +7 -0
  2012. package/dist/src/utils/sessionUtils.test.js +504 -0
  2013. package/dist/src/utils/sessionUtils.test.js.map +1 -0
  2014. package/dist/src/utils/sessions.d.ts +9 -0
  2015. package/dist/src/utils/sessions.js +70 -0
  2016. package/dist/src/utils/sessions.js.map +1 -0
  2017. package/dist/src/utils/sessions.test.d.ts +7 -0
  2018. package/dist/src/utils/sessions.test.js +585 -0
  2019. package/dist/src/utils/sessions.test.js.map +1 -0
  2020. package/dist/src/utils/settingsUtils.d.ts +145 -0
  2021. package/dist/src/utils/settingsUtils.js +341 -0
  2022. package/dist/src/utils/settingsUtils.js.map +1 -0
  2023. package/dist/src/utils/settingsUtils.test.d.ts +7 -0
  2024. package/dist/src/utils/settingsUtils.test.js +809 -0
  2025. package/dist/src/utils/settingsUtils.test.js.map +1 -0
  2026. package/dist/src/utils/spawnWrapper.d.ts +8 -0
  2027. package/dist/src/utils/spawnWrapper.js +9 -0
  2028. package/dist/src/utils/spawnWrapper.js.map +1 -0
  2029. package/dist/src/utils/startupWarnings.d.ts +7 -0
  2030. package/dist/src/utils/startupWarnings.js +41 -0
  2031. package/dist/src/utils/startupWarnings.js.map +1 -0
  2032. package/dist/src/utils/startupWarnings.test.d.ts +7 -0
  2033. package/dist/src/utils/startupWarnings.test.js +62 -0
  2034. package/dist/src/utils/startupWarnings.test.js.map +1 -0
  2035. package/dist/src/utils/terminalTheme.d.ts +16 -0
  2036. package/dist/src/utils/terminalTheme.js +51 -0
  2037. package/dist/src/utils/terminalTheme.js.map +1 -0
  2038. package/dist/src/utils/updateEventEmitter.d.ts +12 -0
  2039. package/dist/src/utils/updateEventEmitter.js +13 -0
  2040. package/dist/src/utils/updateEventEmitter.js.map +1 -0
  2041. package/dist/src/utils/updateEventEmitter.test.d.ts +7 -0
  2042. package/dist/src/utils/updateEventEmitter.test.js +19 -0
  2043. package/dist/src/utils/updateEventEmitter.test.js.map +1 -0
  2044. package/dist/src/utils/userStartupWarnings.d.ts +7 -0
  2045. package/dist/src/utils/userStartupWarnings.js +33 -0
  2046. package/dist/src/utils/userStartupWarnings.js.map +1 -0
  2047. package/dist/src/utils/userStartupWarnings.test.d.ts +7 -0
  2048. package/dist/src/utils/userStartupWarnings.test.js +53 -0
  2049. package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
  2050. package/dist/src/utils/webRemoteConsent.d.ts +14 -0
  2051. package/dist/src/utils/webRemoteConsent.js +21 -0
  2052. package/dist/src/utils/webRemoteConsent.js.map +1 -0
  2053. package/dist/src/utils/webRemoteServer.d.ts +29 -0
  2054. package/dist/src/utils/webRemoteServer.js +124 -0
  2055. package/dist/src/utils/webRemoteServer.js.map +1 -0
  2056. package/dist/src/utils/webRemoteServer.test.d.ts +7 -0
  2057. package/dist/src/utils/webRemoteServer.test.js +113 -0
  2058. package/dist/src/utils/webRemoteServer.test.js.map +1 -0
  2059. package/dist/src/utils/windowTitle.d.ts +13 -0
  2060. package/dist/src/utils/windowTitle.js +20 -0
  2061. package/dist/src/utils/windowTitle.js.map +1 -0
  2062. package/dist/src/utils/windowTitle.test.d.ts +7 -0
  2063. package/dist/src/utils/windowTitle.test.js +50 -0
  2064. package/dist/src/utils/windowTitle.test.js.map +1 -0
  2065. package/dist/src/validateNonInterActiveAuth.d.ts +10 -0
  2066. package/dist/src/validateNonInterActiveAuth.js +60 -0
  2067. package/dist/src/validateNonInterActiveAuth.js.map +1 -0
  2068. package/dist/src/validateNonInterActiveAuth.test.d.ts +7 -0
  2069. package/dist/src/validateNonInterActiveAuth.test.js +338 -0
  2070. package/dist/src/validateNonInterActiveAuth.test.js.map +1 -0
  2071. package/dist/src/voice/AudioController.d.ts +27 -0
  2072. package/dist/src/voice/AudioController.js +121 -0
  2073. package/dist/src/voice/AudioController.js.map +1 -0
  2074. package/dist/src/voice/ConversationStack.d.ts +42 -0
  2075. package/dist/src/voice/ConversationStack.js +66 -0
  2076. package/dist/src/voice/ConversationStack.js.map +1 -0
  2077. package/dist/src/voice/ConversationStack.test.d.ts +7 -0
  2078. package/dist/src/voice/ConversationStack.test.js +47 -0
  2079. package/dist/src/voice/ConversationStack.test.js.map +1 -0
  2080. package/dist/src/voice/VoiceStateMachine.d.ts +32 -0
  2081. package/dist/src/voice/VoiceStateMachine.js +83 -0
  2082. package/dist/src/voice/VoiceStateMachine.js.map +1 -0
  2083. package/dist/src/voice/VoiceStateMachine.test.d.ts +7 -0
  2084. package/dist/src/voice/VoiceStateMachine.test.js +41 -0
  2085. package/dist/src/voice/VoiceStateMachine.test.js.map +1 -0
  2086. package/dist/src/voice/spokenReply.d.ts +11 -0
  2087. package/dist/src/voice/spokenReply.js +35 -0
  2088. package/dist/src/voice/spokenReply.js.map +1 -0
  2089. package/dist/src/voice/spokenReply.test.d.ts +7 -0
  2090. package/dist/src/voice/spokenReply.test.js +33 -0
  2091. package/dist/src/voice/spokenReply.test.js.map +1 -0
  2092. package/dist/src/voice/stt/AudioRecorder.d.ts +27 -0
  2093. package/dist/src/voice/stt/AudioRecorder.js +132 -0
  2094. package/dist/src/voice/stt/AudioRecorder.js.map +1 -0
  2095. package/dist/src/voice/stt/StreamingWhisper.d.ts +25 -0
  2096. package/dist/src/voice/stt/StreamingWhisper.js +88 -0
  2097. package/dist/src/voice/stt/StreamingWhisper.js.map +1 -0
  2098. package/dist/src/voice/stt/StreamingWhisper.test.d.ts +7 -0
  2099. package/dist/src/voice/stt/StreamingWhisper.test.js +62 -0
  2100. package/dist/src/voice/stt/StreamingWhisper.test.js.map +1 -0
  2101. package/dist/src/voice/tts/auto.d.ts +13 -0
  2102. package/dist/src/voice/tts/auto.js +87 -0
  2103. package/dist/src/voice/tts/auto.js.map +1 -0
  2104. package/dist/src/voice/tts/auto.test.d.ts +7 -0
  2105. package/dist/src/voice/tts/auto.test.js +39 -0
  2106. package/dist/src/voice/tts/auto.test.js.map +1 -0
  2107. package/dist/src/voice/tts/types.d.ts +15 -0
  2108. package/dist/src/voice/tts/types.js +8 -0
  2109. package/dist/src/voice/tts/types.js.map +1 -0
  2110. package/dist/src/voice/voiceController.d.ts +20 -0
  2111. package/dist/src/voice/voiceController.js +51 -0
  2112. package/dist/src/voice/voiceController.js.map +1 -0
  2113. package/dist/src/voice/voiceController.test.d.ts +7 -0
  2114. package/dist/src/voice/voiceController.test.js +36 -0
  2115. package/dist/src/voice/voiceController.test.js.map +1 -0
  2116. package/dist/src/zed-integration/fileSystemService.d.ts +20 -0
  2117. package/dist/src/zed-integration/fileSystemService.js +42 -0
  2118. package/dist/src/zed-integration/fileSystemService.js.map +1 -0
  2119. package/dist/src/zed-integration/fileSystemService.test.d.ts +7 -0
  2120. package/dist/src/zed-integration/fileSystemService.test.js +89 -0
  2121. package/dist/src/zed-integration/fileSystemService.test.js.map +1 -0
  2122. package/dist/src/zed-integration/zedIntegration.d.ts +40 -0
  2123. package/dist/src/zed-integration/zedIntegration.js +749 -0
  2124. package/dist/src/zed-integration/zedIntegration.js.map +1 -0
  2125. package/dist/src/zed-integration/zedIntegration.test.d.ts +7 -0
  2126. package/dist/src/zed-integration/zedIntegration.test.js +614 -0
  2127. package/dist/src/zed-integration/zedIntegration.test.js.map +1 -0
  2128. package/dist/tsconfig.tsbuildinfo +1 -0
  2129. package/package.json +98 -0
@@ -0,0 +1,2174 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google LLC
5
+ * Portions Copyright 2025 TerminaI Authors
6
+ * SPDX-License-Identifier: Apache-2.0
7
+ */
8
+ import { renderWithProviders } from '../../test-utils/render.js';
9
+ import { waitFor } from '../../test-utils/async.js';
10
+ import { act } from 'react';
11
+ import { InputPrompt } from './InputPrompt.js';
12
+ import { ApprovalMode } from '@terminai/core';
13
+ import * as path from 'node:path';
14
+ import { CommandKind } from '../commands/types.js';
15
+ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
16
+ import { useShellHistory } from '../hooks/useShellHistory.js';
17
+ import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
18
+ import { useInputHistory } from '../hooks/useInputHistory.js';
19
+ import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
20
+ import clipboardy from 'clipboardy';
21
+ import * as clipboardUtils from '../utils/clipboardUtils.js';
22
+ import { useKittyKeyboardProtocol } from '../hooks/useKittyKeyboardProtocol.js';
23
+ import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
24
+ import stripAnsi from 'strip-ansi';
25
+ import chalk from 'chalk';
26
+ import { StreamingState } from '../types.js';
27
+ vi.mock('../hooks/useShellHistory.js');
28
+ vi.mock('../hooks/useCommandCompletion.js');
29
+ vi.mock('../hooks/useInputHistory.js');
30
+ vi.mock('../hooks/useReverseSearchCompletion.js');
31
+ vi.mock('clipboardy');
32
+ vi.mock('../utils/clipboardUtils.js');
33
+ vi.mock('../hooks/useKittyKeyboardProtocol.js');
34
+ const mockSlashCommands = [
35
+ {
36
+ name: 'clear',
37
+ kind: CommandKind.BUILT_IN,
38
+ description: 'Clear screen',
39
+ action: vi.fn(),
40
+ },
41
+ {
42
+ name: 'memory',
43
+ kind: CommandKind.BUILT_IN,
44
+ description: 'Manage memory',
45
+ subCommands: [
46
+ {
47
+ name: 'show',
48
+ kind: CommandKind.BUILT_IN,
49
+ description: 'Show memory',
50
+ action: vi.fn(),
51
+ },
52
+ {
53
+ name: 'add',
54
+ kind: CommandKind.BUILT_IN,
55
+ description: 'Add to memory',
56
+ action: vi.fn(),
57
+ },
58
+ {
59
+ name: 'refresh',
60
+ kind: CommandKind.BUILT_IN,
61
+ description: 'Refresh memory',
62
+ action: vi.fn(),
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ name: 'chat',
68
+ description: 'Manage chats',
69
+ kind: CommandKind.BUILT_IN,
70
+ subCommands: [
71
+ {
72
+ name: 'resume',
73
+ description: 'Resume a chat',
74
+ kind: CommandKind.BUILT_IN,
75
+ action: vi.fn(),
76
+ completion: async () => ['fix-foo', 'fix-bar'],
77
+ },
78
+ ],
79
+ },
80
+ {
81
+ name: 'resume',
82
+ description: 'Browse and resume sessions',
83
+ kind: CommandKind.BUILT_IN,
84
+ action: vi.fn(),
85
+ },
86
+ ];
87
+ describe('InputPrompt', () => {
88
+ let props;
89
+ let mockShellHistory;
90
+ let mockCommandCompletion;
91
+ let mockInputHistory;
92
+ let mockReverseSearchCompletion;
93
+ let mockBuffer;
94
+ let mockCommandContext;
95
+ const mockedUseShellHistory = vi.mocked(useShellHistory);
96
+ const mockedUseCommandCompletion = vi.mocked(useCommandCompletion);
97
+ const mockedUseInputHistory = vi.mocked(useInputHistory);
98
+ const mockedUseReverseSearchCompletion = vi.mocked(useReverseSearchCompletion);
99
+ const mockedUseKittyKeyboardProtocol = vi.mocked(useKittyKeyboardProtocol);
100
+ const mockSetEmbeddedShellFocused = vi.fn();
101
+ const uiActions = {
102
+ setEmbeddedShellFocused: mockSetEmbeddedShellFocused,
103
+ };
104
+ beforeEach(() => {
105
+ vi.resetAllMocks();
106
+ mockCommandContext = createMockCommandContext();
107
+ mockBuffer = {
108
+ text: '',
109
+ cursor: [0, 0],
110
+ lines: [''],
111
+ setText: vi.fn((newText) => {
112
+ mockBuffer.text = newText;
113
+ mockBuffer.lines = [newText];
114
+ mockBuffer.cursor = [0, newText.length];
115
+ mockBuffer.viewportVisualLines = [newText];
116
+ mockBuffer.allVisualLines = [newText];
117
+ mockBuffer.visualToLogicalMap = [[0, 0]];
118
+ }),
119
+ replaceRangeByOffset: vi.fn(),
120
+ viewportVisualLines: [''],
121
+ allVisualLines: [''],
122
+ visualCursor: [0, 0],
123
+ visualScrollRow: 0,
124
+ handleInput: vi.fn(),
125
+ move: vi.fn(),
126
+ moveToOffset: vi.fn((offset) => {
127
+ mockBuffer.cursor = [0, offset];
128
+ }),
129
+ moveToVisualPosition: vi.fn(),
130
+ killLineRight: vi.fn(),
131
+ killLineLeft: vi.fn(),
132
+ openInExternalEditor: vi.fn(),
133
+ newline: vi.fn(),
134
+ undo: vi.fn(),
135
+ redo: vi.fn(),
136
+ backspace: vi.fn(),
137
+ preferredCol: null,
138
+ selectionAnchor: null,
139
+ insert: vi.fn(),
140
+ del: vi.fn(),
141
+ replaceRange: vi.fn(),
142
+ deleteWordLeft: vi.fn(),
143
+ deleteWordRight: vi.fn(),
144
+ visualToLogicalMap: [[0, 0]],
145
+ getOffset: vi.fn().mockReturnValue(0),
146
+ };
147
+ mockShellHistory = {
148
+ history: [],
149
+ addCommandToHistory: vi.fn(),
150
+ getPreviousCommand: vi.fn().mockReturnValue(null),
151
+ getNextCommand: vi.fn().mockReturnValue(null),
152
+ resetHistoryPosition: vi.fn(),
153
+ };
154
+ mockedUseShellHistory.mockReturnValue(mockShellHistory);
155
+ mockCommandCompletion = {
156
+ suggestions: [],
157
+ activeSuggestionIndex: -1,
158
+ isLoadingSuggestions: false,
159
+ showSuggestions: false,
160
+ visibleStartIndex: 0,
161
+ isPerfectMatch: false,
162
+ navigateUp: vi.fn(),
163
+ navigateDown: vi.fn(),
164
+ resetCompletionState: vi.fn(),
165
+ setActiveSuggestionIndex: vi.fn(),
166
+ setShowSuggestions: vi.fn(),
167
+ handleAutocomplete: vi.fn(),
168
+ promptCompletion: {
169
+ text: '',
170
+ accept: vi.fn(),
171
+ clear: vi.fn(),
172
+ isLoading: false,
173
+ isActive: false,
174
+ markSelected: vi.fn(),
175
+ },
176
+ getCommandFromSuggestion: vi.fn().mockReturnValue(undefined),
177
+ slashCompletionRange: {
178
+ completionStart: -1,
179
+ completionEnd: -1,
180
+ getCommandFromSuggestion: vi.fn().mockReturnValue(undefined),
181
+ isArgumentCompletion: false,
182
+ leafCommand: null,
183
+ },
184
+ getCompletedText: vi.fn().mockReturnValue(null),
185
+ };
186
+ mockedUseCommandCompletion.mockReturnValue(mockCommandCompletion);
187
+ mockInputHistory = {
188
+ navigateUp: vi.fn(),
189
+ navigateDown: vi.fn(),
190
+ handleSubmit: vi.fn(),
191
+ };
192
+ mockedUseInputHistory.mockReturnValue(mockInputHistory);
193
+ mockReverseSearchCompletion = {
194
+ suggestions: [],
195
+ activeSuggestionIndex: -1,
196
+ visibleStartIndex: 0,
197
+ showSuggestions: false,
198
+ isLoadingSuggestions: false,
199
+ navigateUp: vi.fn(),
200
+ navigateDown: vi.fn(),
201
+ handleAutocomplete: vi.fn(),
202
+ resetCompletionState: vi.fn(),
203
+ };
204
+ mockedUseReverseSearchCompletion.mockReturnValue(mockReverseSearchCompletion);
205
+ mockedUseKittyKeyboardProtocol.mockReturnValue({
206
+ enabled: false,
207
+ checking: false,
208
+ });
209
+ props = {
210
+ buffer: mockBuffer,
211
+ onSubmit: vi.fn(),
212
+ userMessages: [],
213
+ onClearScreen: vi.fn(),
214
+ config: {
215
+ getProjectRoot: () => path.join('test', 'project'),
216
+ getTargetDir: () => path.join('test', 'project', 'src'),
217
+ getVimMode: () => false,
218
+ getWorkspaceContext: () => ({
219
+ getDirectories: () => ['/test/project/src'],
220
+ }),
221
+ },
222
+ slashCommands: mockSlashCommands,
223
+ commandContext: mockCommandContext,
224
+ shellModeActive: false,
225
+ setShellModeActive: vi.fn(),
226
+ approvalMode: ApprovalMode.DEFAULT,
227
+ inputWidth: 80,
228
+ suggestionsWidth: 80,
229
+ focus: true,
230
+ setQueueErrorMessage: vi.fn(),
231
+ streamingState: StreamingState.Idle,
232
+ setBannerVisible: vi.fn(),
233
+ };
234
+ });
235
+ it('should call shellHistory.getPreviousCommand on up arrow in shell mode', async () => {
236
+ props.shellModeActive = true;
237
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
238
+ uiActions,
239
+ });
240
+ await act(async () => {
241
+ stdin.write('\u001B[A');
242
+ });
243
+ await waitFor(() => expect(mockShellHistory.getPreviousCommand).toHaveBeenCalled());
244
+ unmount();
245
+ });
246
+ it('should call shellHistory.getNextCommand on down arrow in shell mode', async () => {
247
+ props.shellModeActive = true;
248
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
249
+ uiActions,
250
+ });
251
+ await act(async () => {
252
+ stdin.write('\u001B[B');
253
+ await waitFor(() => expect(mockShellHistory.getNextCommand).toHaveBeenCalled());
254
+ });
255
+ unmount();
256
+ });
257
+ it('should set the buffer text when a shell history command is retrieved', async () => {
258
+ props.shellModeActive = true;
259
+ vi.mocked(mockShellHistory.getPreviousCommand).mockReturnValue('previous command');
260
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
261
+ uiActions,
262
+ });
263
+ await act(async () => {
264
+ stdin.write('\u001B[A');
265
+ });
266
+ await waitFor(() => {
267
+ expect(mockShellHistory.getPreviousCommand).toHaveBeenCalled();
268
+ expect(props.buffer.setText).toHaveBeenCalledWith('previous command');
269
+ });
270
+ unmount();
271
+ });
272
+ it('should call shellHistory.addCommandToHistory on submit in shell mode', async () => {
273
+ props.shellModeActive = true;
274
+ props.buffer.setText('ls -l');
275
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
276
+ uiActions,
277
+ });
278
+ await act(async () => {
279
+ stdin.write('\r');
280
+ });
281
+ await waitFor(() => {
282
+ expect(mockShellHistory.addCommandToHistory).toHaveBeenCalledWith('ls -l');
283
+ expect(props.onSubmit).toHaveBeenCalledWith('ls -l');
284
+ });
285
+ unmount();
286
+ });
287
+ it('should NOT call shell history methods when not in shell mode', async () => {
288
+ props.buffer.setText('some text');
289
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
290
+ uiActions,
291
+ });
292
+ await act(async () => {
293
+ stdin.write('\u001B[A'); // Up arrow
294
+ });
295
+ await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
296
+ await act(async () => {
297
+ stdin.write('\u001B[B'); // Down arrow
298
+ });
299
+ await waitFor(() => expect(mockInputHistory.navigateDown).toHaveBeenCalled());
300
+ await act(async () => {
301
+ stdin.write('\r'); // Enter
302
+ });
303
+ await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('some text'));
304
+ expect(mockShellHistory.getPreviousCommand).not.toHaveBeenCalled();
305
+ expect(mockShellHistory.getNextCommand).not.toHaveBeenCalled();
306
+ expect(mockShellHistory.addCommandToHistory).not.toHaveBeenCalled();
307
+ unmount();
308
+ });
309
+ it('should call completion.navigateUp for both up arrow and Ctrl+P when suggestions are showing', async () => {
310
+ mockedUseCommandCompletion.mockReturnValue({
311
+ ...mockCommandCompletion,
312
+ showSuggestions: true,
313
+ suggestions: [
314
+ { label: 'memory', value: 'memory' },
315
+ { label: 'memcache', value: 'memcache' },
316
+ ],
317
+ });
318
+ props.buffer.setText('/mem');
319
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
320
+ uiActions,
321
+ });
322
+ // Test up arrow
323
+ await act(async () => {
324
+ stdin.write('\u001B[A'); // Up arrow
325
+ });
326
+ await waitFor(() => expect(mockCommandCompletion.navigateUp).toHaveBeenCalledTimes(1));
327
+ await act(async () => {
328
+ stdin.write('\u0010'); // Ctrl+P
329
+ });
330
+ await waitFor(() => expect(mockCommandCompletion.navigateUp).toHaveBeenCalledTimes(2));
331
+ expect(mockCommandCompletion.navigateDown).not.toHaveBeenCalled();
332
+ unmount();
333
+ });
334
+ it('should call completion.navigateDown for both down arrow and Ctrl+N when suggestions are showing', async () => {
335
+ mockedUseCommandCompletion.mockReturnValue({
336
+ ...mockCommandCompletion,
337
+ showSuggestions: true,
338
+ suggestions: [
339
+ { label: 'memory', value: 'memory' },
340
+ { label: 'memcache', value: 'memcache' },
341
+ ],
342
+ });
343
+ props.buffer.setText('/mem');
344
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
345
+ uiActions,
346
+ });
347
+ // Test down arrow
348
+ await act(async () => {
349
+ stdin.write('\u001B[B'); // Down arrow
350
+ });
351
+ await waitFor(() => expect(mockCommandCompletion.navigateDown).toHaveBeenCalledTimes(1));
352
+ await act(async () => {
353
+ stdin.write('\u000E'); // Ctrl+N
354
+ });
355
+ await waitFor(() => expect(mockCommandCompletion.navigateDown).toHaveBeenCalledTimes(2));
356
+ expect(mockCommandCompletion.navigateUp).not.toHaveBeenCalled();
357
+ unmount();
358
+ });
359
+ it('should NOT call completion navigation when suggestions are not showing', async () => {
360
+ mockedUseCommandCompletion.mockReturnValue({
361
+ ...mockCommandCompletion,
362
+ showSuggestions: false,
363
+ });
364
+ props.buffer.setText('some text');
365
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
366
+ uiActions,
367
+ });
368
+ await act(async () => {
369
+ stdin.write('\u001B[A'); // Up arrow
370
+ });
371
+ await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
372
+ await act(async () => {
373
+ stdin.write('\u001B[B'); // Down arrow
374
+ });
375
+ await waitFor(() => expect(mockInputHistory.navigateDown).toHaveBeenCalled());
376
+ await act(async () => {
377
+ stdin.write('\u0010'); // Ctrl+P
378
+ });
379
+ await act(async () => {
380
+ stdin.write('\u000E'); // Ctrl+N
381
+ });
382
+ await waitFor(() => {
383
+ expect(mockCommandCompletion.navigateUp).not.toHaveBeenCalled();
384
+ expect(mockCommandCompletion.navigateDown).not.toHaveBeenCalled();
385
+ });
386
+ unmount();
387
+ });
388
+ describe('clipboard image paste', () => {
389
+ beforeEach(() => {
390
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
391
+ vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(null);
392
+ vi.mocked(clipboardUtils.cleanupOldClipboardImages).mockResolvedValue(undefined);
393
+ });
394
+ it('should handle Ctrl+V when clipboard has an image', async () => {
395
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
396
+ vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue('/test/.gemini-clipboard/clipboard-123.png');
397
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
398
+ // Send Ctrl+V
399
+ await act(async () => {
400
+ stdin.write('\x16'); // Ctrl+V
401
+ });
402
+ await waitFor(() => {
403
+ expect(clipboardUtils.clipboardHasImage).toHaveBeenCalled();
404
+ expect(clipboardUtils.saveClipboardImage).toHaveBeenCalledWith(props.config.getTargetDir());
405
+ expect(clipboardUtils.cleanupOldClipboardImages).toHaveBeenCalledWith(props.config.getTargetDir());
406
+ expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalled();
407
+ });
408
+ unmount();
409
+ });
410
+ it('should not insert anything when clipboard has no image', async () => {
411
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
412
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
413
+ await act(async () => {
414
+ stdin.write('\x16'); // Ctrl+V
415
+ });
416
+ await waitFor(() => {
417
+ expect(clipboardUtils.clipboardHasImage).toHaveBeenCalled();
418
+ });
419
+ expect(clipboardUtils.saveClipboardImage).not.toHaveBeenCalled();
420
+ expect(mockBuffer.setText).not.toHaveBeenCalled();
421
+ unmount();
422
+ });
423
+ it('should handle image save failure gracefully', async () => {
424
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
425
+ vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(null);
426
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
427
+ await act(async () => {
428
+ stdin.write('\x16'); // Ctrl+V
429
+ });
430
+ await waitFor(() => {
431
+ expect(clipboardUtils.saveClipboardImage).toHaveBeenCalled();
432
+ });
433
+ expect(mockBuffer.setText).not.toHaveBeenCalled();
434
+ unmount();
435
+ });
436
+ it('should insert image path at cursor position with proper spacing', async () => {
437
+ const imagePath = path.join('test', '.gemini-clipboard', 'clipboard-456.png');
438
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
439
+ vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(imagePath);
440
+ // Set initial text and cursor position
441
+ mockBuffer.text = 'Hello world';
442
+ mockBuffer.cursor = [0, 5]; // Cursor after "Hello"
443
+ vi.mocked(mockBuffer.getOffset).mockReturnValue(5);
444
+ mockBuffer.lines = ['Hello world'];
445
+ mockBuffer.replaceRangeByOffset = vi.fn();
446
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
447
+ await act(async () => {
448
+ stdin.write('\x16'); // Ctrl+V
449
+ });
450
+ await waitFor(() => {
451
+ // Should insert at cursor position with spaces
452
+ expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalled();
453
+ });
454
+ // Get the actual call to see what path was used
455
+ const actualCall = vi.mocked(mockBuffer.replaceRangeByOffset).mock
456
+ .calls[0];
457
+ expect(actualCall[0]).toBe(5); // start offset
458
+ expect(actualCall[1]).toBe(5); // end offset
459
+ expect(actualCall[2]).toBe(' @' + path.relative(path.join('test', 'project', 'src'), imagePath));
460
+ unmount();
461
+ });
462
+ it('should handle errors during clipboard operations', async () => {
463
+ const consoleErrorSpy = vi
464
+ .spyOn(console, 'error')
465
+ .mockImplementation(() => { });
466
+ vi.mocked(clipboardUtils.clipboardHasImage).mockRejectedValue(new Error('Clipboard error'));
467
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
468
+ await act(async () => {
469
+ stdin.write('\x16'); // Ctrl+V
470
+ });
471
+ await waitFor(() => {
472
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error handling clipboard image:', expect.any(Error));
473
+ });
474
+ expect(mockBuffer.setText).not.toHaveBeenCalled();
475
+ consoleErrorSpy.mockRestore();
476
+ unmount();
477
+ });
478
+ });
479
+ describe('clipboard text paste', () => {
480
+ it('should insert text from clipboard on Ctrl+V', async () => {
481
+ vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
482
+ vi.mocked(clipboardy.read).mockResolvedValue('pasted text');
483
+ vi.mocked(mockBuffer.replaceRangeByOffset).mockClear();
484
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
485
+ await act(async () => {
486
+ stdin.write('\x16'); // Ctrl+V
487
+ });
488
+ await waitFor(() => {
489
+ expect(clipboardy.read).toHaveBeenCalled();
490
+ expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalledWith(expect.any(Number), expect.any(Number), 'pasted text');
491
+ });
492
+ unmount();
493
+ });
494
+ });
495
+ it.each([
496
+ {
497
+ name: 'should complete a partial parent command',
498
+ bufferText: '/mem',
499
+ suggestions: [{ label: 'memory', value: 'memory', description: '...' }],
500
+ activeIndex: 0,
501
+ },
502
+ {
503
+ name: 'should append a sub-command when parent command is complete',
504
+ bufferText: '/memory ',
505
+ suggestions: [
506
+ { label: 'show', value: 'show' },
507
+ { label: 'add', value: 'add' },
508
+ ],
509
+ activeIndex: 1,
510
+ },
511
+ {
512
+ name: 'should handle the backspace edge case correctly',
513
+ bufferText: '/memory',
514
+ suggestions: [
515
+ { label: 'show', value: 'show' },
516
+ { label: 'add', value: 'add' },
517
+ ],
518
+ activeIndex: 0,
519
+ },
520
+ {
521
+ name: 'should complete a partial argument for a command',
522
+ bufferText: '/chat resume fi-',
523
+ suggestions: [{ label: 'fix-foo', value: 'fix-foo' }],
524
+ activeIndex: 0,
525
+ },
526
+ ])('$name', async ({ bufferText, suggestions, activeIndex }) => {
527
+ mockedUseCommandCompletion.mockReturnValue({
528
+ ...mockCommandCompletion,
529
+ showSuggestions: true,
530
+ suggestions,
531
+ activeSuggestionIndex: activeIndex,
532
+ });
533
+ props.buffer.setText(bufferText);
534
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
535
+ uiActions,
536
+ });
537
+ await act(async () => stdin.write('\t'));
538
+ await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(activeIndex));
539
+ unmount();
540
+ });
541
+ it('should autocomplete on Enter when suggestions are active, without submitting', async () => {
542
+ mockedUseCommandCompletion.mockReturnValue({
543
+ ...mockCommandCompletion,
544
+ showSuggestions: true,
545
+ suggestions: [{ label: 'memory', value: 'memory' }],
546
+ activeSuggestionIndex: 0,
547
+ });
548
+ props.buffer.setText('/mem');
549
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
550
+ uiActions,
551
+ });
552
+ await act(async () => {
553
+ stdin.write('\r');
554
+ });
555
+ await waitFor(() => {
556
+ // The app should autocomplete the text, NOT submit.
557
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
558
+ });
559
+ expect(props.onSubmit).not.toHaveBeenCalled();
560
+ unmount();
561
+ });
562
+ it('should complete a command based on its altNames', async () => {
563
+ props.slashCommands = [
564
+ {
565
+ name: 'help',
566
+ altNames: ['?'],
567
+ kind: CommandKind.BUILT_IN,
568
+ description: '...',
569
+ },
570
+ ];
571
+ mockedUseCommandCompletion.mockReturnValue({
572
+ ...mockCommandCompletion,
573
+ showSuggestions: true,
574
+ suggestions: [{ label: 'help', value: 'help' }],
575
+ activeSuggestionIndex: 0,
576
+ });
577
+ props.buffer.setText('/?');
578
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
579
+ uiActions,
580
+ });
581
+ await act(async () => {
582
+ stdin.write('\t'); // Press Tab for autocomplete
583
+ });
584
+ await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0));
585
+ unmount();
586
+ });
587
+ it('should not submit on Enter when the buffer is empty or only contains whitespace', async () => {
588
+ props.buffer.setText(' '); // Set buffer to whitespace
589
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
590
+ uiActions,
591
+ });
592
+ await act(async () => {
593
+ stdin.write('\r'); // Press Enter
594
+ });
595
+ await waitFor(() => {
596
+ expect(props.onSubmit).not.toHaveBeenCalled();
597
+ });
598
+ unmount();
599
+ });
600
+ it('should submit directly on Enter when isPerfectMatch is true', async () => {
601
+ mockedUseCommandCompletion.mockReturnValue({
602
+ ...mockCommandCompletion,
603
+ showSuggestions: false,
604
+ isPerfectMatch: true,
605
+ });
606
+ props.buffer.setText('/clear');
607
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
608
+ uiActions,
609
+ });
610
+ await act(async () => {
611
+ stdin.write('\r');
612
+ });
613
+ await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('/clear'));
614
+ unmount();
615
+ });
616
+ it('should execute perfect match on Enter even if suggestions are showing, if at first suggestion', async () => {
617
+ mockedUseCommandCompletion.mockReturnValue({
618
+ ...mockCommandCompletion,
619
+ showSuggestions: true,
620
+ suggestions: [
621
+ { label: 'review', value: 'review' }, // Match is now at index 0
622
+ { label: 'review-frontend', value: 'review-frontend' },
623
+ ],
624
+ activeSuggestionIndex: 0,
625
+ isPerfectMatch: true,
626
+ });
627
+ props.buffer.text = '/review';
628
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
629
+ uiActions,
630
+ });
631
+ await act(async () => {
632
+ stdin.write('\r');
633
+ });
634
+ await waitFor(() => {
635
+ expect(props.onSubmit).toHaveBeenCalledWith('/review');
636
+ });
637
+ unmount();
638
+ });
639
+ it('should autocomplete and NOT execute on Enter if a DIFFERENT suggestion is selected even if perfect match', async () => {
640
+ mockedUseCommandCompletion.mockReturnValue({
641
+ ...mockCommandCompletion,
642
+ showSuggestions: true,
643
+ suggestions: [
644
+ { label: 'review', value: 'review' },
645
+ { label: 'review-frontend', value: 'review-frontend' },
646
+ ],
647
+ activeSuggestionIndex: 1, // review-frontend selected (not the perfect match at 0)
648
+ isPerfectMatch: true, // /review is a perfect match
649
+ });
650
+ props.buffer.text = '/review';
651
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
652
+ uiActions,
653
+ });
654
+ await act(async () => {
655
+ stdin.write('\r');
656
+ });
657
+ await waitFor(() => {
658
+ // Should handle autocomplete for index 1
659
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(1);
660
+ // Should NOT submit
661
+ expect(props.onSubmit).not.toHaveBeenCalled();
662
+ });
663
+ unmount();
664
+ });
665
+ it('should submit directly on Enter when a complete leaf command is typed', async () => {
666
+ mockedUseCommandCompletion.mockReturnValue({
667
+ ...mockCommandCompletion,
668
+ showSuggestions: false,
669
+ isPerfectMatch: false, // Added explicit isPerfectMatch false
670
+ });
671
+ props.buffer.setText('/clear');
672
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
673
+ uiActions,
674
+ });
675
+ await act(async () => {
676
+ stdin.write('\r');
677
+ });
678
+ await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('/clear'));
679
+ unmount();
680
+ });
681
+ it('should auto-execute commands with autoExecute: true on Enter', async () => {
682
+ const aboutCommand = {
683
+ name: 'about',
684
+ kind: CommandKind.BUILT_IN,
685
+ description: 'About command',
686
+ action: vi.fn(),
687
+ autoExecute: true,
688
+ };
689
+ const suggestion = { label: 'about', value: 'about' };
690
+ mockedUseCommandCompletion.mockReturnValue({
691
+ ...mockCommandCompletion,
692
+ showSuggestions: true,
693
+ suggestions: [suggestion],
694
+ activeSuggestionIndex: 0,
695
+ getCommandFromSuggestion: vi.fn().mockReturnValue(aboutCommand),
696
+ getCompletedText: vi.fn().mockReturnValue('/about'),
697
+ slashCompletionRange: {
698
+ completionStart: 1,
699
+ completionEnd: 3, // "/ab" -> start at 1, end at 3
700
+ getCommandFromSuggestion: vi.fn(),
701
+ isArgumentCompletion: false,
702
+ leafCommand: null,
703
+ },
704
+ });
705
+ // User typed partial command
706
+ props.buffer.setText('/ab');
707
+ props.buffer.lines = ['/ab'];
708
+ props.buffer.cursor = [0, 3];
709
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
710
+ uiActions,
711
+ });
712
+ await act(async () => {
713
+ stdin.write('\r'); // Enter
714
+ });
715
+ await waitFor(() => {
716
+ // Should submit the full command constructed from buffer + suggestion
717
+ expect(props.onSubmit).toHaveBeenCalledWith('/about');
718
+ // Should NOT handle autocomplete (which just fills text)
719
+ expect(mockCommandCompletion.handleAutocomplete).not.toHaveBeenCalled();
720
+ });
721
+ unmount();
722
+ });
723
+ it('should autocomplete commands with autoExecute: false on Enter', async () => {
724
+ const shareCommand = {
725
+ name: 'share',
726
+ kind: CommandKind.BUILT_IN,
727
+ description: 'Share conversation to file',
728
+ action: vi.fn(),
729
+ autoExecute: false, // Explicitly set to false
730
+ };
731
+ const suggestion = { label: 'share', value: 'share' };
732
+ mockedUseCommandCompletion.mockReturnValue({
733
+ ...mockCommandCompletion,
734
+ showSuggestions: true,
735
+ suggestions: [suggestion],
736
+ activeSuggestionIndex: 0,
737
+ getCommandFromSuggestion: vi.fn().mockReturnValue(shareCommand),
738
+ getCompletedText: vi.fn().mockReturnValue('/share'),
739
+ });
740
+ props.buffer.setText('/sh');
741
+ props.buffer.lines = ['/sh'];
742
+ props.buffer.cursor = [0, 3];
743
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
744
+ uiActions,
745
+ });
746
+ await act(async () => {
747
+ stdin.write('\r'); // Enter
748
+ });
749
+ await waitFor(() => {
750
+ // Should autocomplete to allow adding file argument
751
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
752
+ expect(props.onSubmit).not.toHaveBeenCalled();
753
+ });
754
+ unmount();
755
+ });
756
+ it('should autocomplete on Tab, even for executable commands', async () => {
757
+ const executableCommand = {
758
+ name: 'about',
759
+ kind: CommandKind.BUILT_IN,
760
+ description: 'About info',
761
+ action: vi.fn(),
762
+ autoExecute: true,
763
+ };
764
+ const suggestion = { label: 'about', value: 'about' };
765
+ mockedUseCommandCompletion.mockReturnValue({
766
+ ...mockCommandCompletion,
767
+ showSuggestions: true,
768
+ suggestions: [suggestion],
769
+ activeSuggestionIndex: 0,
770
+ getCommandFromSuggestion: vi.fn().mockReturnValue(executableCommand),
771
+ getCompletedText: vi.fn().mockReturnValue('/about'),
772
+ });
773
+ props.buffer.setText('/ab');
774
+ props.buffer.lines = ['/ab'];
775
+ props.buffer.cursor = [0, 3];
776
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
777
+ uiActions,
778
+ });
779
+ await act(async () => {
780
+ stdin.write('\t'); // Tab
781
+ });
782
+ await waitFor(() => {
783
+ // Tab always autocompletes, never executes
784
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
785
+ expect(props.onSubmit).not.toHaveBeenCalled();
786
+ });
787
+ unmount();
788
+ });
789
+ it('should autocomplete custom commands from .toml files on Enter', async () => {
790
+ const customCommand = {
791
+ name: 'find-capital',
792
+ kind: CommandKind.FILE,
793
+ description: 'Find capital of a country',
794
+ action: vi.fn(),
795
+ // No autoExecute flag - custom commands default to undefined
796
+ };
797
+ const suggestion = { label: 'find-capital', value: 'find-capital' };
798
+ mockedUseCommandCompletion.mockReturnValue({
799
+ ...mockCommandCompletion,
800
+ showSuggestions: true,
801
+ suggestions: [suggestion],
802
+ activeSuggestionIndex: 0,
803
+ getCommandFromSuggestion: vi.fn().mockReturnValue(customCommand),
804
+ getCompletedText: vi.fn().mockReturnValue('/find-capital'),
805
+ });
806
+ props.buffer.setText('/find');
807
+ props.buffer.lines = ['/find'];
808
+ props.buffer.cursor = [0, 5];
809
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
810
+ uiActions,
811
+ });
812
+ await act(async () => {
813
+ stdin.write('\r'); // Enter
814
+ });
815
+ await waitFor(() => {
816
+ // Should autocomplete (not execute) since autoExecute is undefined
817
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
818
+ expect(props.onSubmit).not.toHaveBeenCalled();
819
+ });
820
+ unmount();
821
+ });
822
+ it('should auto-execute argument completion when command has autoExecute: true', async () => {
823
+ // Simulates: /mcp auth <server> where user selects a server from completions
824
+ const authCommand = {
825
+ name: 'auth',
826
+ kind: CommandKind.BUILT_IN,
827
+ description: 'Authenticate with MCP server',
828
+ action: vi.fn(),
829
+ autoExecute: true,
830
+ completion: vi.fn().mockResolvedValue(['server1', 'server2']),
831
+ };
832
+ const suggestion = { label: 'server1', value: 'server1' };
833
+ mockedUseCommandCompletion.mockReturnValue({
834
+ ...mockCommandCompletion,
835
+ showSuggestions: true,
836
+ suggestions: [suggestion],
837
+ activeSuggestionIndex: 0,
838
+ getCommandFromSuggestion: vi.fn().mockReturnValue(authCommand),
839
+ getCompletedText: vi.fn().mockReturnValue('/mcp auth server1'),
840
+ slashCompletionRange: {
841
+ completionStart: 10,
842
+ completionEnd: 10,
843
+ getCommandFromSuggestion: vi.fn(),
844
+ isArgumentCompletion: true,
845
+ leafCommand: authCommand,
846
+ },
847
+ });
848
+ props.buffer.setText('/mcp auth ');
849
+ props.buffer.lines = ['/mcp auth '];
850
+ props.buffer.cursor = [0, 10];
851
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
852
+ uiActions,
853
+ });
854
+ await act(async () => {
855
+ stdin.write('\r'); // Enter
856
+ });
857
+ await waitFor(() => {
858
+ // Should auto-execute with the completed command
859
+ expect(props.onSubmit).toHaveBeenCalledWith('/mcp auth server1');
860
+ expect(mockCommandCompletion.handleAutocomplete).not.toHaveBeenCalled();
861
+ });
862
+ unmount();
863
+ });
864
+ it('should autocomplete argument completion when command has autoExecute: false', async () => {
865
+ // Simulates: /extensions enable <ext> where multi-arg completions should NOT auto-execute
866
+ const enableCommand = {
867
+ name: 'enable',
868
+ kind: CommandKind.BUILT_IN,
869
+ description: 'Enable an extension',
870
+ action: vi.fn(),
871
+ autoExecute: false,
872
+ completion: vi.fn().mockResolvedValue(['ext1 --scope user']),
873
+ };
874
+ const suggestion = {
875
+ label: 'ext1 --scope user',
876
+ value: 'ext1 --scope user',
877
+ };
878
+ mockedUseCommandCompletion.mockReturnValue({
879
+ ...mockCommandCompletion,
880
+ showSuggestions: true,
881
+ suggestions: [suggestion],
882
+ activeSuggestionIndex: 0,
883
+ getCommandFromSuggestion: vi.fn().mockReturnValue(enableCommand),
884
+ getCompletedText: vi
885
+ .fn()
886
+ .mockReturnValue('/extensions enable ext1 --scope user'),
887
+ slashCompletionRange: {
888
+ completionStart: 19,
889
+ completionEnd: 19,
890
+ getCommandFromSuggestion: vi.fn(),
891
+ isArgumentCompletion: true,
892
+ leafCommand: enableCommand,
893
+ },
894
+ });
895
+ props.buffer.setText('/extensions enable ');
896
+ props.buffer.lines = ['/extensions enable '];
897
+ props.buffer.cursor = [0, 19];
898
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
899
+ uiActions,
900
+ });
901
+ await act(async () => {
902
+ stdin.write('\r'); // Enter
903
+ });
904
+ await waitFor(() => {
905
+ // Should autocomplete (not execute) to allow user to modify
906
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
907
+ expect(props.onSubmit).not.toHaveBeenCalled();
908
+ });
909
+ unmount();
910
+ });
911
+ it('should autocomplete command name even with autoExecute: true if command has completion function', async () => {
912
+ // Simulates: /chat resu -> should NOT auto-execute, should autocomplete to show arg completions
913
+ const resumeCommand = {
914
+ name: 'resume',
915
+ kind: CommandKind.BUILT_IN,
916
+ description: 'Resume a conversation',
917
+ action: vi.fn(),
918
+ autoExecute: true,
919
+ completion: vi.fn().mockResolvedValue(['chat1', 'chat2']),
920
+ };
921
+ const suggestion = { label: 'resume', value: 'resume' };
922
+ mockedUseCommandCompletion.mockReturnValue({
923
+ ...mockCommandCompletion,
924
+ showSuggestions: true,
925
+ suggestions: [suggestion],
926
+ activeSuggestionIndex: 0,
927
+ getCommandFromSuggestion: vi.fn().mockReturnValue(resumeCommand),
928
+ getCompletedText: vi.fn().mockReturnValue('/chat resume'),
929
+ slashCompletionRange: {
930
+ completionStart: 6,
931
+ completionEnd: 10,
932
+ getCommandFromSuggestion: vi.fn(),
933
+ isArgumentCompletion: false,
934
+ leafCommand: null,
935
+ },
936
+ });
937
+ props.buffer.setText('/chat resu');
938
+ props.buffer.lines = ['/chat resu'];
939
+ props.buffer.cursor = [0, 10];
940
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
941
+ uiActions,
942
+ });
943
+ await act(async () => {
944
+ stdin.write('\r'); // Enter
945
+ });
946
+ await waitFor(() => {
947
+ // Should autocomplete to allow selecting an argument, NOT auto-execute
948
+ expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
949
+ expect(props.onSubmit).not.toHaveBeenCalled();
950
+ });
951
+ unmount();
952
+ });
953
+ it('should autocomplete an @-path on Enter without submitting', async () => {
954
+ mockedUseCommandCompletion.mockReturnValue({
955
+ ...mockCommandCompletion,
956
+ showSuggestions: true,
957
+ suggestions: [{ label: 'index.ts', value: 'index.ts' }],
958
+ activeSuggestionIndex: 0,
959
+ });
960
+ props.buffer.setText('@src/components/');
961
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
962
+ uiActions,
963
+ });
964
+ await act(async () => {
965
+ stdin.write('\r');
966
+ });
967
+ await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0));
968
+ expect(props.onSubmit).not.toHaveBeenCalled();
969
+ unmount();
970
+ });
971
+ it('should add a newline on enter when the line ends with a backslash', async () => {
972
+ // This test simulates multi-line input, not submission
973
+ mockBuffer.text = 'first line\\';
974
+ mockBuffer.cursor = [0, 11];
975
+ mockBuffer.lines = ['first line\\'];
976
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
977
+ uiActions,
978
+ });
979
+ await act(async () => {
980
+ stdin.write('\r');
981
+ });
982
+ await waitFor(() => {
983
+ expect(props.buffer.backspace).toHaveBeenCalled();
984
+ expect(props.buffer.newline).toHaveBeenCalled();
985
+ });
986
+ expect(props.onSubmit).not.toHaveBeenCalled();
987
+ unmount();
988
+ });
989
+ it('should clear the buffer on Ctrl+C if it has text', async () => {
990
+ await act(async () => {
991
+ props.buffer.setText('some text to clear');
992
+ });
993
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
994
+ uiActions,
995
+ });
996
+ await act(async () => {
997
+ stdin.write('\x03'); // Ctrl+C character
998
+ });
999
+ await waitFor(() => {
1000
+ expect(props.buffer.setText).toHaveBeenCalledWith('');
1001
+ expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
1002
+ });
1003
+ expect(props.onSubmit).not.toHaveBeenCalled();
1004
+ unmount();
1005
+ });
1006
+ it('should NOT clear the buffer on Ctrl+C if it is empty', async () => {
1007
+ props.buffer.text = '';
1008
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
1009
+ uiActions,
1010
+ });
1011
+ await act(async () => {
1012
+ stdin.write('\x03'); // Ctrl+C character
1013
+ });
1014
+ await waitFor(() => {
1015
+ expect(props.buffer.setText).not.toHaveBeenCalled();
1016
+ });
1017
+ unmount();
1018
+ });
1019
+ it('should call setBannerVisible(false) when clear screen key is pressed', async () => {
1020
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
1021
+ uiActions,
1022
+ });
1023
+ await act(async () => {
1024
+ stdin.write('\x0C'); // Ctrl+L
1025
+ });
1026
+ await waitFor(() => {
1027
+ expect(props.setBannerVisible).toHaveBeenCalledWith(false);
1028
+ });
1029
+ unmount();
1030
+ });
1031
+ describe('cursor-based completion trigger', () => {
1032
+ it.each([
1033
+ {
1034
+ name: 'should trigger completion when cursor is after @ without spaces',
1035
+ text: '@src/components',
1036
+ cursor: [0, 15],
1037
+ showSuggestions: true,
1038
+ },
1039
+ {
1040
+ name: 'should trigger completion when cursor is after / without spaces',
1041
+ text: '/memory',
1042
+ cursor: [0, 7],
1043
+ showSuggestions: true,
1044
+ },
1045
+ {
1046
+ name: 'should NOT trigger completion when cursor is after space following @',
1047
+ text: '@src/file.ts hello',
1048
+ cursor: [0, 18],
1049
+ showSuggestions: false,
1050
+ },
1051
+ {
1052
+ name: 'should NOT trigger completion when cursor is after space following /',
1053
+ text: '/memory add',
1054
+ cursor: [0, 11],
1055
+ showSuggestions: false,
1056
+ },
1057
+ {
1058
+ name: 'should NOT trigger completion when cursor is not after @ or /',
1059
+ text: 'hello world',
1060
+ cursor: [0, 5],
1061
+ showSuggestions: false,
1062
+ },
1063
+ {
1064
+ name: 'should handle multiline text correctly',
1065
+ text: 'first line\n/memory',
1066
+ cursor: [1, 7],
1067
+ showSuggestions: false,
1068
+ },
1069
+ {
1070
+ name: 'should handle Unicode characters (emojis) correctly in paths',
1071
+ text: '@src/file👍.txt',
1072
+ cursor: [0, 14],
1073
+ showSuggestions: true,
1074
+ },
1075
+ {
1076
+ name: 'should handle Unicode characters with spaces after them',
1077
+ text: '@src/file👍.txt hello',
1078
+ cursor: [0, 20],
1079
+ showSuggestions: false,
1080
+ },
1081
+ {
1082
+ name: 'should handle escaped spaces in paths correctly',
1083
+ text: '@src/my\\ file.txt',
1084
+ cursor: [0, 16],
1085
+ showSuggestions: true,
1086
+ },
1087
+ {
1088
+ name: 'should NOT trigger completion after unescaped space following escaped space',
1089
+ text: '@path/my\\ file.txt hello',
1090
+ cursor: [0, 24],
1091
+ showSuggestions: false,
1092
+ },
1093
+ {
1094
+ name: 'should handle multiple escaped spaces in paths',
1095
+ text: '@docs/my\\ long\\ file\\ name.md',
1096
+ cursor: [0, 29],
1097
+ showSuggestions: true,
1098
+ },
1099
+ {
1100
+ name: 'should handle escaped spaces in slash commands',
1101
+ text: '/memory\\ test',
1102
+ cursor: [0, 13],
1103
+ showSuggestions: true,
1104
+ },
1105
+ {
1106
+ name: 'should handle Unicode characters with escaped spaces',
1107
+ text: `@${path.join('files', 'emoji\\ 👍\\ test.txt')}`,
1108
+ cursor: [0, 25],
1109
+ showSuggestions: true,
1110
+ },
1111
+ ])('$name', async ({ text, cursor, showSuggestions }) => {
1112
+ mockBuffer.text = text;
1113
+ mockBuffer.lines = text.split('\n');
1114
+ mockBuffer.cursor = cursor;
1115
+ mockedUseCommandCompletion.mockReturnValue({
1116
+ ...mockCommandCompletion,
1117
+ showSuggestions,
1118
+ suggestions: showSuggestions
1119
+ ? [{ label: 'suggestion', value: 'suggestion' }]
1120
+ : [],
1121
+ });
1122
+ const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
1123
+ uiActions,
1124
+ });
1125
+ await waitFor(() => {
1126
+ expect(mockedUseCommandCompletion).toHaveBeenCalledWith(mockBuffer, path.join('test', 'project', 'src'), mockSlashCommands, mockCommandContext, false, false, expect.any(Object));
1127
+ });
1128
+ unmount();
1129
+ });
1130
+ });
1131
+ describe('vim mode', () => {
1132
+ it.each([
1133
+ {
1134
+ name: 'should not call buffer.handleInput when vim handles input',
1135
+ vimHandled: true,
1136
+ expectBufferHandleInput: false,
1137
+ },
1138
+ {
1139
+ name: 'should call buffer.handleInput when vim does not handle input',
1140
+ vimHandled: false,
1141
+ expectBufferHandleInput: true,
1142
+ },
1143
+ {
1144
+ name: 'should call handleInput when vim mode is disabled',
1145
+ vimHandled: false,
1146
+ expectBufferHandleInput: true,
1147
+ },
1148
+ ])('$name', async ({ vimHandled, expectBufferHandleInput }) => {
1149
+ props.vimHandleInput = vi.fn().mockReturnValue(vimHandled);
1150
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1151
+ await act(async () => stdin.write('i'));
1152
+ await waitFor(() => {
1153
+ expect(props.vimHandleInput).toHaveBeenCalled();
1154
+ if (expectBufferHandleInput) {
1155
+ expect(mockBuffer.handleInput).toHaveBeenCalled();
1156
+ }
1157
+ else {
1158
+ expect(mockBuffer.handleInput).not.toHaveBeenCalled();
1159
+ }
1160
+ });
1161
+ unmount();
1162
+ });
1163
+ });
1164
+ describe('unfocused paste', () => {
1165
+ it('should handle bracketed paste when not focused', async () => {
1166
+ props.focus = false;
1167
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1168
+ await act(async () => {
1169
+ stdin.write('\x1B[200~pasted text\x1B[201~');
1170
+ });
1171
+ await waitFor(() => {
1172
+ expect(mockBuffer.handleInput).toHaveBeenCalledWith(expect.objectContaining({
1173
+ paste: true,
1174
+ sequence: 'pasted text',
1175
+ }));
1176
+ });
1177
+ unmount();
1178
+ });
1179
+ it('should ignore regular keypresses when not focused', async () => {
1180
+ props.focus = false;
1181
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1182
+ await act(async () => {
1183
+ stdin.write('a');
1184
+ });
1185
+ await waitFor(() => { });
1186
+ expect(mockBuffer.handleInput).not.toHaveBeenCalled();
1187
+ unmount();
1188
+ });
1189
+ });
1190
+ describe('Highlighting and Cursor Display', () => {
1191
+ describe('single-line scenarios', () => {
1192
+ it.each([
1193
+ {
1194
+ name: 'mid-word',
1195
+ text: 'hello world',
1196
+ visualCursor: [0, 3],
1197
+ expected: `hel${chalk.inverse('l')}o world`,
1198
+ },
1199
+ {
1200
+ name: 'at the beginning of the line',
1201
+ text: 'hello',
1202
+ visualCursor: [0, 0],
1203
+ expected: `${chalk.inverse('h')}ello`,
1204
+ },
1205
+ {
1206
+ name: 'at the end of the line',
1207
+ text: 'hello',
1208
+ visualCursor: [0, 5],
1209
+ expected: `hello${chalk.inverse(' ')}`,
1210
+ },
1211
+ {
1212
+ name: 'on a highlighted token',
1213
+ text: 'run @path/to/file',
1214
+ visualCursor: [0, 9],
1215
+ expected: `@path/${chalk.inverse('t')}o/file`,
1216
+ },
1217
+ {
1218
+ name: 'for multi-byte unicode characters',
1219
+ text: 'hello 👍 world',
1220
+ visualCursor: [0, 6],
1221
+ expected: `hello ${chalk.inverse('👍')} world`,
1222
+ },
1223
+ {
1224
+ name: 'at the end of a line with unicode characters',
1225
+ text: 'hello 👍',
1226
+ visualCursor: [0, 8],
1227
+ expected: `hello 👍${chalk.inverse(' ')}`,
1228
+ },
1229
+ {
1230
+ name: 'on an empty line',
1231
+ text: '',
1232
+ visualCursor: [0, 0],
1233
+ expected: chalk.inverse(' '),
1234
+ },
1235
+ {
1236
+ name: 'on a space between words',
1237
+ text: 'hello world',
1238
+ visualCursor: [0, 5],
1239
+ expected: `hello${chalk.inverse(' ')}world`,
1240
+ },
1241
+ ])('should display cursor correctly $name', async ({ text, visualCursor, expected }) => {
1242
+ mockBuffer.text = text;
1243
+ mockBuffer.lines = [text];
1244
+ mockBuffer.viewportVisualLines = [text];
1245
+ mockBuffer.visualCursor = visualCursor;
1246
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1247
+ await waitFor(() => {
1248
+ const frame = stdout.lastFrame();
1249
+ expect(frame).toContain(expected);
1250
+ });
1251
+ unmount();
1252
+ });
1253
+ });
1254
+ describe('multi-line scenarios', () => {
1255
+ it.each([
1256
+ {
1257
+ name: 'in the middle of a line',
1258
+ text: 'first line\nsecond line\nthird line',
1259
+ visualCursor: [1, 3],
1260
+ visualToLogicalMap: [
1261
+ [0, 0],
1262
+ [1, 0],
1263
+ [2, 0],
1264
+ ],
1265
+ expected: `sec${chalk.inverse('o')}nd line`,
1266
+ },
1267
+ {
1268
+ name: 'at the beginning of a line',
1269
+ text: 'first line\nsecond line',
1270
+ visualCursor: [1, 0],
1271
+ visualToLogicalMap: [
1272
+ [0, 0],
1273
+ [1, 0],
1274
+ ],
1275
+ expected: `${chalk.inverse('s')}econd line`,
1276
+ },
1277
+ {
1278
+ name: 'at the end of a line',
1279
+ text: 'first line\nsecond line',
1280
+ visualCursor: [0, 10],
1281
+ visualToLogicalMap: [
1282
+ [0, 0],
1283
+ [1, 0],
1284
+ ],
1285
+ expected: `first line${chalk.inverse(' ')}`,
1286
+ },
1287
+ ])('should display cursor correctly $name in a multiline block', async ({ text, visualCursor, expected, visualToLogicalMap }) => {
1288
+ mockBuffer.text = text;
1289
+ mockBuffer.lines = text.split('\n');
1290
+ mockBuffer.viewportVisualLines = text.split('\n');
1291
+ mockBuffer.visualCursor = visualCursor;
1292
+ mockBuffer.visualToLogicalMap = visualToLogicalMap;
1293
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1294
+ await waitFor(() => {
1295
+ const frame = stdout.lastFrame();
1296
+ expect(frame).toContain(expected);
1297
+ });
1298
+ unmount();
1299
+ });
1300
+ it('should display cursor on a blank line in a multiline block', async () => {
1301
+ const text = 'first line\n\nthird line';
1302
+ mockBuffer.text = text;
1303
+ mockBuffer.lines = text.split('\n');
1304
+ mockBuffer.viewportVisualLines = text.split('\n');
1305
+ mockBuffer.visualCursor = [1, 0]; // cursor on the blank line
1306
+ mockBuffer.visualToLogicalMap = [
1307
+ [0, 0],
1308
+ [1, 0],
1309
+ [2, 0],
1310
+ ];
1311
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1312
+ await waitFor(() => {
1313
+ const frame = stdout.lastFrame();
1314
+ const lines = frame.split('\n');
1315
+ // The line with the cursor should just be an inverted space inside the box border
1316
+ expect(lines.find((l) => l.includes(chalk.inverse(' ')))).not.toBeUndefined();
1317
+ });
1318
+ unmount();
1319
+ });
1320
+ });
1321
+ });
1322
+ describe('multiline rendering', () => {
1323
+ it('should correctly render multiline input including blank lines', async () => {
1324
+ const text = 'hello\n\nworld';
1325
+ mockBuffer.text = text;
1326
+ mockBuffer.lines = text.split('\n');
1327
+ mockBuffer.viewportVisualLines = text.split('\n');
1328
+ mockBuffer.allVisualLines = text.split('\n');
1329
+ mockBuffer.visualCursor = [2, 5]; // cursor at the end of "world"
1330
+ // Provide a visual-to-logical mapping for each visual line
1331
+ mockBuffer.visualToLogicalMap = [
1332
+ [0, 0], // 'hello' starts at col 0 of logical line 0
1333
+ [1, 0], // '' (blank) is logical line 1, col 0
1334
+ [2, 0], // 'world' is logical line 2, col 0
1335
+ ];
1336
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1337
+ await waitFor(() => {
1338
+ const frame = stdout.lastFrame();
1339
+ // Check that all lines, including the empty one, are rendered.
1340
+ // This implicitly tests that the Box wrapper provides height for the empty line.
1341
+ expect(frame).toContain('hello');
1342
+ expect(frame).toContain(`world${chalk.inverse(' ')}`);
1343
+ const outputLines = frame.split('\n');
1344
+ // The number of lines should be 2 for the border plus 3 for the content.
1345
+ expect(outputLines.length).toBe(5);
1346
+ });
1347
+ unmount();
1348
+ });
1349
+ });
1350
+ describe('multiline paste', () => {
1351
+ it.each([
1352
+ {
1353
+ description: 'with \n newlines',
1354
+ pastedText: 'This \n is \n a \n multiline \n paste.',
1355
+ },
1356
+ {
1357
+ description: 'with extra slashes before \n newlines',
1358
+ pastedText: 'This \\\n is \\\n a \\\n multiline \\\n paste.',
1359
+ },
1360
+ {
1361
+ description: 'with \r\n newlines',
1362
+ pastedText: 'This\r\nis\r\na\r\nmultiline\r\npaste.',
1363
+ },
1364
+ ])('should handle multiline paste $description', async ({ pastedText }) => {
1365
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1366
+ // Simulate a bracketed paste event from the terminal
1367
+ await act(async () => {
1368
+ stdin.write(`\x1b[200~${pastedText}\x1b[201~`);
1369
+ });
1370
+ await waitFor(() => {
1371
+ // Verify that the buffer's handleInput was called once with the full text
1372
+ expect(props.buffer.handleInput).toHaveBeenCalledTimes(1);
1373
+ expect(props.buffer.handleInput).toHaveBeenCalledWith(expect.objectContaining({
1374
+ paste: true,
1375
+ sequence: pastedText,
1376
+ }));
1377
+ });
1378
+ unmount();
1379
+ });
1380
+ });
1381
+ describe('paste auto-submission protection', () => {
1382
+ beforeEach(() => {
1383
+ vi.useFakeTimers();
1384
+ mockedUseKittyKeyboardProtocol.mockReturnValue({
1385
+ enabled: false,
1386
+ checking: false,
1387
+ });
1388
+ });
1389
+ afterEach(() => {
1390
+ vi.useRealTimers();
1391
+ });
1392
+ it('should prevent auto-submission immediately after an unsafe paste', async () => {
1393
+ // isTerminalPasteTrusted will be false due to beforeEach setup.
1394
+ props.buffer.text = 'some command';
1395
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1396
+ await act(async () => {
1397
+ await vi.runAllTimersAsync();
1398
+ });
1399
+ // Simulate a paste operation (this should set the paste protection)
1400
+ await act(async () => {
1401
+ stdin.write(`\x1b[200~pasted content\x1b[201~`);
1402
+ });
1403
+ // Simulate an Enter key press immediately after paste
1404
+ await act(async () => {
1405
+ stdin.write('\r');
1406
+ });
1407
+ await act(async () => {
1408
+ await vi.runAllTimersAsync();
1409
+ });
1410
+ // Verify that onSubmit was NOT called due to recent paste protection
1411
+ expect(props.onSubmit).not.toHaveBeenCalled();
1412
+ // It should call newline() instead
1413
+ expect(props.buffer.newline).toHaveBeenCalled();
1414
+ unmount();
1415
+ });
1416
+ it('should allow submission after unsafe paste protection timeout', async () => {
1417
+ // isTerminalPasteTrusted will be false due to beforeEach setup.
1418
+ props.buffer.text = 'pasted text';
1419
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1420
+ await act(async () => {
1421
+ await vi.runAllTimersAsync();
1422
+ });
1423
+ // Simulate a paste operation (this sets the protection)
1424
+ await act(async () => {
1425
+ stdin.write('\x1b[200~pasted text\x1b[201~');
1426
+ });
1427
+ await act(async () => {
1428
+ await vi.runAllTimersAsync();
1429
+ });
1430
+ // Advance timers past the protection timeout
1431
+ await act(async () => {
1432
+ await vi.advanceTimersByTimeAsync(50);
1433
+ });
1434
+ // Now Enter should work normally
1435
+ await act(async () => {
1436
+ stdin.write('\r');
1437
+ });
1438
+ await act(async () => {
1439
+ await vi.runAllTimersAsync();
1440
+ });
1441
+ expect(props.onSubmit).toHaveBeenCalledWith('pasted text');
1442
+ expect(props.buffer.newline).not.toHaveBeenCalled();
1443
+ unmount();
1444
+ });
1445
+ it.each([
1446
+ {
1447
+ name: 'kitty',
1448
+ setup: () => mockedUseKittyKeyboardProtocol.mockReturnValue({
1449
+ enabled: true,
1450
+ checking: false,
1451
+ }),
1452
+ },
1453
+ ])('should allow immediate submission for a trusted paste ($name)', async ({ setup }) => {
1454
+ setup();
1455
+ props.buffer.text = 'pasted command';
1456
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1457
+ await act(async () => {
1458
+ await vi.runAllTimersAsync();
1459
+ });
1460
+ // Simulate a paste operation
1461
+ await act(async () => {
1462
+ stdin.write('\x1b[200~some pasted stuff\x1b[201~');
1463
+ });
1464
+ await act(async () => {
1465
+ await vi.runAllTimersAsync();
1466
+ });
1467
+ // Simulate an Enter key press immediately after paste
1468
+ await act(async () => {
1469
+ stdin.write('\r');
1470
+ });
1471
+ await act(async () => {
1472
+ await vi.runAllTimersAsync();
1473
+ });
1474
+ // Verify that onSubmit was called
1475
+ expect(props.onSubmit).toHaveBeenCalledWith('pasted command');
1476
+ unmount();
1477
+ });
1478
+ it('should not interfere with normal Enter key submission when no recent paste', async () => {
1479
+ // Set up buffer with text before rendering to ensure submission works
1480
+ props.buffer.text = 'normal command';
1481
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1482
+ await act(async () => {
1483
+ await vi.runAllTimersAsync();
1484
+ });
1485
+ // Press Enter without any recent paste
1486
+ await act(async () => {
1487
+ stdin.write('\r');
1488
+ });
1489
+ await act(async () => {
1490
+ await vi.runAllTimersAsync();
1491
+ });
1492
+ // Verify that onSubmit was called normally
1493
+ expect(props.onSubmit).toHaveBeenCalledWith('normal command');
1494
+ unmount();
1495
+ });
1496
+ });
1497
+ describe('enhanced input UX - double ESC clear functionality', () => {
1498
+ beforeEach(() => vi.useFakeTimers());
1499
+ afterEach(() => vi.useRealTimers());
1500
+ it('should clear buffer on second ESC press', async () => {
1501
+ const onEscapePromptChange = vi.fn();
1502
+ props.onEscapePromptChange = onEscapePromptChange;
1503
+ props.buffer.setText('text to clear');
1504
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1505
+ await act(async () => {
1506
+ stdin.write('\x1B');
1507
+ vi.advanceTimersByTime(100);
1508
+ expect(onEscapePromptChange).toHaveBeenCalledWith(false);
1509
+ });
1510
+ await act(async () => {
1511
+ stdin.write('\x1B');
1512
+ vi.advanceTimersByTime(100);
1513
+ expect(props.buffer.setText).toHaveBeenCalledWith('');
1514
+ expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
1515
+ });
1516
+ unmount();
1517
+ });
1518
+ it('should clear buffer on double ESC', async () => {
1519
+ const onEscapePromptChange = vi.fn();
1520
+ props.onEscapePromptChange = onEscapePromptChange;
1521
+ props.buffer.setText('text to clear');
1522
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1523
+ await act(async () => {
1524
+ stdin.write('\x1B\x1B');
1525
+ vi.advanceTimersByTime(100);
1526
+ expect(props.buffer.setText).toHaveBeenCalledWith('');
1527
+ expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
1528
+ });
1529
+ unmount();
1530
+ });
1531
+ it('should reset escape state on any non-ESC key', async () => {
1532
+ const onEscapePromptChange = vi.fn();
1533
+ props.onEscapePromptChange = onEscapePromptChange;
1534
+ props.buffer.setText('some text');
1535
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1536
+ await act(async () => {
1537
+ stdin.write('\x1B');
1538
+ await waitFor(() => {
1539
+ expect(onEscapePromptChange).toHaveBeenCalledWith(false);
1540
+ });
1541
+ });
1542
+ await act(async () => {
1543
+ stdin.write('a');
1544
+ await waitFor(() => {
1545
+ expect(onEscapePromptChange).toHaveBeenCalledWith(false);
1546
+ });
1547
+ });
1548
+ unmount();
1549
+ });
1550
+ it('should handle ESC in shell mode by disabling shell mode', async () => {
1551
+ props.shellModeActive = true;
1552
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1553
+ await act(async () => {
1554
+ stdin.write('\x1B');
1555
+ vi.advanceTimersByTime(100);
1556
+ expect(props.setShellModeActive).toHaveBeenCalledWith(false);
1557
+ });
1558
+ unmount();
1559
+ });
1560
+ it('should handle ESC when completion suggestions are showing', async () => {
1561
+ mockedUseCommandCompletion.mockReturnValue({
1562
+ ...mockCommandCompletion,
1563
+ showSuggestions: true,
1564
+ suggestions: [{ label: 'suggestion', value: 'suggestion' }],
1565
+ });
1566
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1567
+ await act(async () => {
1568
+ stdin.write('\x1B');
1569
+ vi.advanceTimersByTime(100);
1570
+ expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
1571
+ });
1572
+ unmount();
1573
+ });
1574
+ it('should not call onEscapePromptChange when not provided', async () => {
1575
+ props.onEscapePromptChange = undefined;
1576
+ props.buffer.setText('some text');
1577
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1578
+ await act(async () => {
1579
+ await vi.runAllTimersAsync();
1580
+ });
1581
+ await act(async () => {
1582
+ stdin.write('\x1B');
1583
+ });
1584
+ await act(async () => {
1585
+ await vi.runAllTimersAsync();
1586
+ });
1587
+ unmount();
1588
+ });
1589
+ it('should not interfere with existing keyboard shortcuts', async () => {
1590
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1591
+ await act(async () => {
1592
+ stdin.write('\x0C');
1593
+ });
1594
+ await waitFor(() => expect(props.onClearScreen).toHaveBeenCalled());
1595
+ await act(async () => {
1596
+ stdin.write('\x01');
1597
+ });
1598
+ await waitFor(() => expect(props.buffer.move).toHaveBeenCalledWith('home'));
1599
+ unmount();
1600
+ });
1601
+ });
1602
+ describe('reverse search', () => {
1603
+ beforeEach(async () => {
1604
+ props.shellModeActive = true;
1605
+ vi.mocked(useShellHistory).mockReturnValue({
1606
+ history: ['echo hello', 'echo world', 'ls'],
1607
+ getPreviousCommand: vi.fn(),
1608
+ getNextCommand: vi.fn(),
1609
+ addCommandToHistory: vi.fn(),
1610
+ resetHistoryPosition: vi.fn(),
1611
+ });
1612
+ });
1613
+ it('invokes reverse search on Ctrl+R', async () => {
1614
+ // Mock the reverse search completion to return suggestions
1615
+ mockedUseReverseSearchCompletion.mockReturnValue({
1616
+ ...mockReverseSearchCompletion,
1617
+ suggestions: [
1618
+ { label: 'echo hello', value: 'echo hello' },
1619
+ { label: 'echo world', value: 'echo world' },
1620
+ { label: 'ls', value: 'ls' },
1621
+ ],
1622
+ showSuggestions: true,
1623
+ activeSuggestionIndex: 0,
1624
+ });
1625
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1626
+ // Trigger reverse search with Ctrl+R
1627
+ await act(async () => {
1628
+ stdin.write('\x12');
1629
+ });
1630
+ await waitFor(() => {
1631
+ const frame = stdout.lastFrame();
1632
+ expect(frame).toContain('(r:)');
1633
+ expect(frame).toContain('echo hello');
1634
+ expect(frame).toContain('echo world');
1635
+ expect(frame).toContain('ls');
1636
+ });
1637
+ unmount();
1638
+ });
1639
+ it.each([
1640
+ { name: 'standard', escapeSequence: '\x1B' },
1641
+ { name: 'kitty', escapeSequence: '\u001b[27u' },
1642
+ ])('resets reverse search state on Escape ($name)', async ({ escapeSequence }) => {
1643
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1644
+ await act(async () => {
1645
+ stdin.write('\x12');
1646
+ });
1647
+ // Wait for reverse search to be active
1648
+ await waitFor(() => {
1649
+ expect(stdout.lastFrame()).toContain('(r:)');
1650
+ });
1651
+ await act(async () => {
1652
+ stdin.write(escapeSequence);
1653
+ });
1654
+ await waitFor(() => {
1655
+ expect(stdout.lastFrame()).not.toContain('(r:)');
1656
+ expect(stdout.lastFrame()).not.toContain('echo hello');
1657
+ });
1658
+ unmount();
1659
+ });
1660
+ it('completes the highlighted entry on Tab and exits reverse-search', async () => {
1661
+ // Mock the reverse search completion
1662
+ const mockHandleAutocomplete = vi.fn(() => {
1663
+ props.buffer.setText('echo hello');
1664
+ });
1665
+ mockedUseReverseSearchCompletion.mockImplementation((buffer, shellHistory, reverseSearchActive) => ({
1666
+ ...mockReverseSearchCompletion,
1667
+ suggestions: reverseSearchActive
1668
+ ? [
1669
+ { label: 'echo hello', value: 'echo hello' },
1670
+ { label: 'echo world', value: 'echo world' },
1671
+ { label: 'ls', value: 'ls' },
1672
+ ]
1673
+ : [],
1674
+ showSuggestions: reverseSearchActive,
1675
+ activeSuggestionIndex: reverseSearchActive ? 0 : -1,
1676
+ handleAutocomplete: mockHandleAutocomplete,
1677
+ }));
1678
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1679
+ // Enter reverse search mode with Ctrl+R
1680
+ await act(async () => {
1681
+ stdin.write('\x12');
1682
+ });
1683
+ // Verify reverse search is active
1684
+ await waitFor(() => {
1685
+ expect(stdout.lastFrame()).toContain('(r:)');
1686
+ });
1687
+ // Press Tab to complete the highlighted entry
1688
+ await act(async () => {
1689
+ stdin.write('\t');
1690
+ });
1691
+ await waitFor(() => {
1692
+ expect(mockHandleAutocomplete).toHaveBeenCalledWith(0);
1693
+ expect(props.buffer.setText).toHaveBeenCalledWith('echo hello');
1694
+ });
1695
+ unmount();
1696
+ }, 15000);
1697
+ it('submits the highlighted entry on Enter and exits reverse-search', async () => {
1698
+ // Mock the reverse search completion to return suggestions
1699
+ mockedUseReverseSearchCompletion.mockReturnValue({
1700
+ ...mockReverseSearchCompletion,
1701
+ suggestions: [
1702
+ { label: 'echo hello', value: 'echo hello' },
1703
+ { label: 'echo world', value: 'echo world' },
1704
+ { label: 'ls', value: 'ls' },
1705
+ ],
1706
+ showSuggestions: true,
1707
+ activeSuggestionIndex: 0,
1708
+ });
1709
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1710
+ await act(async () => {
1711
+ stdin.write('\x12');
1712
+ });
1713
+ await waitFor(() => {
1714
+ expect(stdout.lastFrame()).toContain('(r:)');
1715
+ });
1716
+ await act(async () => {
1717
+ stdin.write('\r');
1718
+ });
1719
+ await waitFor(() => {
1720
+ expect(stdout.lastFrame()).not.toContain('(r:)');
1721
+ });
1722
+ expect(props.onSubmit).toHaveBeenCalledWith('echo hello');
1723
+ unmount();
1724
+ });
1725
+ it('should restore text and cursor position after reverse search"', async () => {
1726
+ const initialText = 'initial text';
1727
+ const initialCursor = [0, 3];
1728
+ props.buffer.setText(initialText);
1729
+ props.buffer.cursor = initialCursor;
1730
+ // Mock the reverse search completion to be active and then reset
1731
+ mockedUseReverseSearchCompletion.mockImplementation((buffer, shellHistory, reverseSearchActiveFromInputPrompt) => ({
1732
+ ...mockReverseSearchCompletion,
1733
+ suggestions: reverseSearchActiveFromInputPrompt
1734
+ ? [{ label: 'history item', value: 'history item' }]
1735
+ : [],
1736
+ showSuggestions: reverseSearchActiveFromInputPrompt,
1737
+ }));
1738
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1739
+ // reverse search with Ctrl+R
1740
+ await act(async () => {
1741
+ stdin.write('\x12');
1742
+ });
1743
+ await waitFor(() => {
1744
+ expect(stdout.lastFrame()).toContain('(r:)');
1745
+ });
1746
+ // Press kitty escape key
1747
+ await act(async () => {
1748
+ stdin.write('\u001b[27u');
1749
+ });
1750
+ await waitFor(() => {
1751
+ expect(stdout.lastFrame()).not.toContain('(r:)');
1752
+ expect(props.buffer.text).toBe(initialText);
1753
+ expect(props.buffer.cursor).toEqual(initialCursor);
1754
+ });
1755
+ unmount();
1756
+ });
1757
+ });
1758
+ describe('Ctrl+E keyboard shortcut', () => {
1759
+ it('should move cursor to end of current line in multiline input', async () => {
1760
+ props.buffer.text = 'line 1\nline 2\nline 3';
1761
+ props.buffer.cursor = [1, 2];
1762
+ props.buffer.lines = ['line 1', 'line 2', 'line 3'];
1763
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1764
+ await act(async () => {
1765
+ stdin.write('\x05'); // Ctrl+E
1766
+ });
1767
+ await waitFor(() => {
1768
+ expect(props.buffer.move).toHaveBeenCalledWith('end');
1769
+ });
1770
+ expect(props.buffer.moveToOffset).not.toHaveBeenCalled();
1771
+ unmount();
1772
+ });
1773
+ it('should move cursor to end of current line for single line input', async () => {
1774
+ props.buffer.text = 'single line text';
1775
+ props.buffer.cursor = [0, 5];
1776
+ props.buffer.lines = ['single line text'];
1777
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1778
+ await act(async () => {
1779
+ stdin.write('\x05'); // Ctrl+E
1780
+ });
1781
+ await waitFor(() => {
1782
+ expect(props.buffer.move).toHaveBeenCalledWith('end');
1783
+ });
1784
+ expect(props.buffer.moveToOffset).not.toHaveBeenCalled();
1785
+ unmount();
1786
+ });
1787
+ });
1788
+ describe('command search (Ctrl+R when not in shell)', () => {
1789
+ it('enters command search on Ctrl+R and shows suggestions', async () => {
1790
+ props.shellModeActive = false;
1791
+ vi.mocked(useReverseSearchCompletion).mockImplementation((buffer, data, isActive) => ({
1792
+ ...mockReverseSearchCompletion,
1793
+ suggestions: isActive
1794
+ ? [
1795
+ { label: 'git commit -m "msg"', value: 'git commit -m "msg"' },
1796
+ { label: 'git push', value: 'git push' },
1797
+ ]
1798
+ : [],
1799
+ showSuggestions: !!isActive,
1800
+ activeSuggestionIndex: isActive ? 0 : -1,
1801
+ }));
1802
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1803
+ await act(async () => {
1804
+ stdin.write('\x12'); // Ctrl+R
1805
+ });
1806
+ await waitFor(() => {
1807
+ const frame = stdout.lastFrame() ?? '';
1808
+ expect(frame).toContain('(r:)');
1809
+ expect(frame).toContain('git commit');
1810
+ expect(frame).toContain('git push');
1811
+ });
1812
+ unmount();
1813
+ });
1814
+ it('expands and collapses long suggestion via Right/Left arrows', async () => {
1815
+ props.shellModeActive = false;
1816
+ const longValue = 'l'.repeat(200);
1817
+ vi.mocked(useReverseSearchCompletion).mockReturnValue({
1818
+ ...mockReverseSearchCompletion,
1819
+ suggestions: [{ label: longValue, value: longValue, matchedIndex: 0 }],
1820
+ showSuggestions: true,
1821
+ activeSuggestionIndex: 0,
1822
+ visibleStartIndex: 0,
1823
+ isLoadingSuggestions: false,
1824
+ });
1825
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1826
+ await act(async () => {
1827
+ stdin.write('\x12');
1828
+ });
1829
+ await waitFor(() => {
1830
+ expect(clean(stdout.lastFrame())).toContain('→');
1831
+ });
1832
+ await act(async () => {
1833
+ stdin.write('\u001B[C');
1834
+ });
1835
+ await waitFor(() => {
1836
+ expect(clean(stdout.lastFrame())).toContain('←');
1837
+ });
1838
+ expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-expanded-match');
1839
+ await act(async () => {
1840
+ stdin.write('\u001B[D');
1841
+ });
1842
+ await waitFor(() => {
1843
+ expect(clean(stdout.lastFrame())).toContain('→');
1844
+ });
1845
+ expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-collapsed-match');
1846
+ unmount();
1847
+ });
1848
+ it('renders match window and expanded view (snapshots)', async () => {
1849
+ props.shellModeActive = false;
1850
+ props.buffer.setText('commit');
1851
+ const label = 'git commit -m "feat: add search" in src/app';
1852
+ const matchedIndex = label.indexOf('commit');
1853
+ vi.mocked(useReverseSearchCompletion).mockReturnValue({
1854
+ ...mockReverseSearchCompletion,
1855
+ suggestions: [{ label, value: label, matchedIndex }],
1856
+ showSuggestions: true,
1857
+ activeSuggestionIndex: 0,
1858
+ visibleStartIndex: 0,
1859
+ isLoadingSuggestions: false,
1860
+ });
1861
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1862
+ await act(async () => {
1863
+ stdin.write('\x12');
1864
+ });
1865
+ await waitFor(() => {
1866
+ expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-collapsed-match');
1867
+ });
1868
+ await act(async () => {
1869
+ stdin.write('\u001B[C');
1870
+ });
1871
+ await waitFor(() => {
1872
+ expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-expanded-match');
1873
+ });
1874
+ unmount();
1875
+ });
1876
+ it('does not show expand/collapse indicator for short suggestions', async () => {
1877
+ props.shellModeActive = false;
1878
+ const shortValue = 'echo hello';
1879
+ vi.mocked(useReverseSearchCompletion).mockReturnValue({
1880
+ ...mockReverseSearchCompletion,
1881
+ suggestions: [{ label: shortValue, value: shortValue }],
1882
+ showSuggestions: true,
1883
+ activeSuggestionIndex: 0,
1884
+ visibleStartIndex: 0,
1885
+ isLoadingSuggestions: false,
1886
+ });
1887
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1888
+ await act(async () => {
1889
+ stdin.write('\x12');
1890
+ });
1891
+ await waitFor(() => {
1892
+ const frame = clean(stdout.lastFrame());
1893
+ // Ensure it rendered the search mode
1894
+ expect(frame).toContain('(r:)');
1895
+ expect(frame).not.toContain('→');
1896
+ expect(frame).not.toContain('←');
1897
+ });
1898
+ unmount();
1899
+ });
1900
+ });
1901
+ describe('mouse interaction', () => {
1902
+ it.each([
1903
+ {
1904
+ name: 'first line, first char',
1905
+ relX: 0,
1906
+ relY: 0,
1907
+ mouseCol: 5,
1908
+ mouseRow: 2,
1909
+ },
1910
+ {
1911
+ name: 'first line, middle char',
1912
+ relX: 6,
1913
+ relY: 0,
1914
+ mouseCol: 11,
1915
+ mouseRow: 2,
1916
+ },
1917
+ {
1918
+ name: 'second line, first char',
1919
+ relX: 0,
1920
+ relY: 1,
1921
+ mouseCol: 5,
1922
+ mouseRow: 3,
1923
+ },
1924
+ {
1925
+ name: 'second line, end char',
1926
+ relX: 5,
1927
+ relY: 1,
1928
+ mouseCol: 10,
1929
+ mouseRow: 3,
1930
+ },
1931
+ ])('should move cursor on mouse click - $name', async ({ relX, relY, mouseCol, mouseRow }) => {
1932
+ props.buffer.text = 'hello world\nsecond line';
1933
+ props.buffer.lines = ['hello world', 'second line'];
1934
+ props.buffer.viewportVisualLines = ['hello world', 'second line'];
1935
+ props.buffer.visualToLogicalMap = [
1936
+ [0, 0],
1937
+ [1, 0],
1938
+ ];
1939
+ props.buffer.visualCursor = [0, 11];
1940
+ props.buffer.visualScrollRow = 0;
1941
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
1942
+ // Wait for initial render
1943
+ await waitFor(() => {
1944
+ expect(stdout.lastFrame()).toContain('hello world');
1945
+ });
1946
+ // Simulate left mouse press at calculated coordinates.
1947
+ // Assumes inner box is at x=4, y=1 based on border(1)+padding(1)+prompt(2) and border-top(1).
1948
+ await act(async () => {
1949
+ stdin.write(`\x1b[<0;${mouseCol};${mouseRow}M`);
1950
+ });
1951
+ await waitFor(() => {
1952
+ expect(props.buffer.moveToVisualPosition).toHaveBeenCalledWith(relY, relX);
1953
+ });
1954
+ unmount();
1955
+ });
1956
+ it('should unfocus embedded shell on click', async () => {
1957
+ props.buffer.text = 'hello';
1958
+ props.buffer.lines = ['hello'];
1959
+ props.buffer.viewportVisualLines = ['hello'];
1960
+ props.buffer.visualToLogicalMap = [[0, 0]];
1961
+ props.isEmbeddedShellFocused = true;
1962
+ const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
1963
+ await waitFor(() => {
1964
+ expect(stdout.lastFrame()).toContain('hello');
1965
+ });
1966
+ await act(async () => {
1967
+ // Click somewhere in the prompt
1968
+ stdin.write(`\x1b[<0;5;2M`);
1969
+ });
1970
+ await waitFor(() => {
1971
+ expect(mockSetEmbeddedShellFocused).toHaveBeenCalledWith(false);
1972
+ });
1973
+ unmount();
1974
+ });
1975
+ });
1976
+ describe('queued message editing', () => {
1977
+ it('should load all queued messages when up arrow is pressed with empty input', async () => {
1978
+ const mockPopAllMessages = vi.fn();
1979
+ mockPopAllMessages.mockReturnValue('Message 1\n\nMessage 2\n\nMessage 3');
1980
+ props.popAllMessages = mockPopAllMessages;
1981
+ props.buffer.text = '';
1982
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1983
+ await act(async () => {
1984
+ stdin.write('\u001B[A');
1985
+ });
1986
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
1987
+ expect(props.buffer.setText).toHaveBeenCalledWith('Message 1\n\nMessage 2\n\nMessage 3');
1988
+ unmount();
1989
+ });
1990
+ it('should not load queued messages when input is not empty', async () => {
1991
+ const mockPopAllMessages = vi.fn();
1992
+ props.popAllMessages = mockPopAllMessages;
1993
+ props.buffer.text = 'some text';
1994
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
1995
+ await act(async () => {
1996
+ stdin.write('\u001B[A');
1997
+ });
1998
+ await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
1999
+ expect(mockPopAllMessages).not.toHaveBeenCalled();
2000
+ unmount();
2001
+ });
2002
+ it('should handle undefined messages from popAllMessages', async () => {
2003
+ const mockPopAllMessages = vi.fn();
2004
+ mockPopAllMessages.mockReturnValue(undefined);
2005
+ props.popAllMessages = mockPopAllMessages;
2006
+ props.buffer.text = '';
2007
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2008
+ await act(async () => {
2009
+ stdin.write('\u001B[A');
2010
+ });
2011
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
2012
+ expect(props.buffer.setText).not.toHaveBeenCalled();
2013
+ expect(mockInputHistory.navigateUp).toHaveBeenCalled();
2014
+ unmount();
2015
+ });
2016
+ it('should work with NAVIGATION_UP key as well', async () => {
2017
+ const mockPopAllMessages = vi.fn();
2018
+ props.popAllMessages = mockPopAllMessages;
2019
+ props.buffer.text = '';
2020
+ props.buffer.allVisualLines = [''];
2021
+ props.buffer.visualCursor = [0, 0];
2022
+ props.buffer.visualScrollRow = 0;
2023
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2024
+ await act(async () => {
2025
+ stdin.write('\u001B[A');
2026
+ });
2027
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
2028
+ unmount();
2029
+ });
2030
+ it('should handle single queued message', async () => {
2031
+ const mockPopAllMessages = vi.fn();
2032
+ mockPopAllMessages.mockReturnValue('Single message');
2033
+ props.popAllMessages = mockPopAllMessages;
2034
+ props.buffer.text = '';
2035
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2036
+ await act(async () => {
2037
+ stdin.write('\u001B[A');
2038
+ });
2039
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
2040
+ expect(props.buffer.setText).toHaveBeenCalledWith('Single message');
2041
+ unmount();
2042
+ });
2043
+ it('should only check for queued messages when buffer text is trimmed empty', async () => {
2044
+ const mockPopAllMessages = vi.fn();
2045
+ props.popAllMessages = mockPopAllMessages;
2046
+ props.buffer.text = ' '; // Whitespace only
2047
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2048
+ await act(async () => {
2049
+ stdin.write('\u001B[A');
2050
+ });
2051
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
2052
+ unmount();
2053
+ });
2054
+ it('should not call popAllMessages if it is not provided', async () => {
2055
+ props.popAllMessages = undefined;
2056
+ props.buffer.text = '';
2057
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2058
+ await act(async () => {
2059
+ stdin.write('\u001B[A');
2060
+ });
2061
+ await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
2062
+ unmount();
2063
+ });
2064
+ it('should navigate input history on fresh start when no queued messages exist', async () => {
2065
+ const mockPopAllMessages = vi.fn();
2066
+ mockPopAllMessages.mockReturnValue(undefined);
2067
+ props.popAllMessages = mockPopAllMessages;
2068
+ props.buffer.text = '';
2069
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2070
+ await act(async () => {
2071
+ stdin.write('\u001B[A');
2072
+ });
2073
+ await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
2074
+ expect(mockInputHistory.navigateUp).toHaveBeenCalled();
2075
+ expect(props.buffer.setText).not.toHaveBeenCalled();
2076
+ unmount();
2077
+ });
2078
+ });
2079
+ describe('snapshots', () => {
2080
+ it('should render correctly in shell mode', async () => {
2081
+ props.shellModeActive = true;
2082
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2083
+ await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
2084
+ unmount();
2085
+ });
2086
+ it('should render correctly when accepting edits', async () => {
2087
+ props.approvalMode = ApprovalMode.AUTO_EDIT;
2088
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2089
+ await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
2090
+ unmount();
2091
+ });
2092
+ it('should render correctly in yolo mode', async () => {
2093
+ props.approvalMode = ApprovalMode.YOLO;
2094
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2095
+ await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
2096
+ unmount();
2097
+ });
2098
+ it('should not show inverted cursor when shell is focused', async () => {
2099
+ props.isEmbeddedShellFocused = true;
2100
+ props.focus = false;
2101
+ const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2102
+ await waitFor(() => {
2103
+ expect(stdout.lastFrame()).not.toContain(`{chalk.inverse(' ')}`);
2104
+ expect(stdout.lastFrame()).toMatchSnapshot();
2105
+ });
2106
+ unmount();
2107
+ });
2108
+ });
2109
+ it('should still allow input when shell is not focused', async () => {
2110
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
2111
+ shellFocus: false,
2112
+ });
2113
+ await act(async () => {
2114
+ stdin.write('a');
2115
+ });
2116
+ await waitFor(() => expect(mockBuffer.handleInput).toHaveBeenCalled());
2117
+ unmount();
2118
+ });
2119
+ describe('command queuing while streaming', () => {
2120
+ beforeEach(() => {
2121
+ props.streamingState = StreamingState.Responding;
2122
+ props.setQueueErrorMessage = vi.fn();
2123
+ props.onSubmit = vi.fn();
2124
+ });
2125
+ it.each([
2126
+ {
2127
+ name: 'should prevent slash commands',
2128
+ bufferText: '/help',
2129
+ shellMode: false,
2130
+ shouldSubmit: false,
2131
+ errorMessage: 'Slash commands cannot be queued',
2132
+ },
2133
+ {
2134
+ name: 'should prevent shell commands',
2135
+ bufferText: 'ls',
2136
+ shellMode: true,
2137
+ shouldSubmit: false,
2138
+ errorMessage: 'Shell commands cannot be queued',
2139
+ },
2140
+ {
2141
+ name: 'should allow regular messages',
2142
+ bufferText: 'regular message',
2143
+ shellMode: false,
2144
+ shouldSubmit: true,
2145
+ errorMessage: null,
2146
+ },
2147
+ ])('$name', async ({ bufferText, shellMode, shouldSubmit, errorMessage }) => {
2148
+ props.buffer.text = bufferText;
2149
+ props.shellModeActive = shellMode;
2150
+ const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
2151
+ await act(async () => {
2152
+ stdin.write('\r');
2153
+ });
2154
+ await waitFor(() => {
2155
+ if (shouldSubmit) {
2156
+ expect(props.onSubmit).toHaveBeenCalledWith(bufferText);
2157
+ expect(props.setQueueErrorMessage).not.toHaveBeenCalled();
2158
+ }
2159
+ else {
2160
+ expect(props.onSubmit).not.toHaveBeenCalled();
2161
+ expect(props.setQueueErrorMessage).toHaveBeenCalledWith(errorMessage);
2162
+ }
2163
+ });
2164
+ unmount();
2165
+ });
2166
+ });
2167
+ });
2168
+ function clean(str) {
2169
+ if (!str)
2170
+ return '';
2171
+ // Remove ANSI escape codes and trim whitespace
2172
+ return stripAnsi(str).trim();
2173
+ }
2174
+ //# sourceMappingURL=InputPrompt.test.js.map