@didim365/agent-cli 0.1.0

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