@zgsm/costrict-cli 0.0.1

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