@trukhinyuri/gemini-pp 0.27.0-nightly.20260121.97aac696f

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 (2217) 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 +95 -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 +71 -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 +150 -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 +8 -0
  51. package/dist/src/commands/extensions/list.js +45 -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 +111 -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 +122 -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 +612 -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 +2351 -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 +639 -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 +1615 -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 +397 -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 +145 -0
  264. package/dist/src/config/mcp/mcpServerEnablement.js +254 -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 +318 -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 +1720 -0
  300. package/dist/src/config/settingsSchema.js +2005 -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 +27 -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 +43 -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 +570 -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 +381 -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 +1567 -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 +64 -0
  441. package/dist/src/test-utils/render.js +246 -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 +160 -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 +1386 -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 +305 -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 +56 -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 +131 -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 +302 -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 +335 -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 +194 -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 +296 -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 +572 -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/loginCodexCommand.d.ts +9 -0
  600. package/dist/src/ui/commands/loginCodexCommand.js +81 -0
  601. package/dist/src/ui/commands/loginCodexCommand.js.map +1 -0
  602. package/dist/src/ui/commands/logoutCodexCommand.d.ts +9 -0
  603. package/dist/src/ui/commands/logoutCodexCommand.js +62 -0
  604. package/dist/src/ui/commands/logoutCodexCommand.js.map +1 -0
  605. package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
  606. package/dist/src/ui/commands/mcpCommand.js +416 -0
  607. package/dist/src/ui/commands/mcpCommand.js.map +1 -0
  608. package/dist/src/ui/commands/mcpCommand.test.d.ts +6 -0
  609. package/dist/src/ui/commands/mcpCommand.test.js +189 -0
  610. package/dist/src/ui/commands/mcpCommand.test.js.map +1 -0
  611. package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
  612. package/dist/src/ui/commands/memoryCommand.js +94 -0
  613. package/dist/src/ui/commands/memoryCommand.js.map +1 -0
  614. package/dist/src/ui/commands/memoryCommand.test.d.ts +6 -0
  615. package/dist/src/ui/commands/memoryCommand.test.js +350 -0
  616. package/dist/src/ui/commands/memoryCommand.test.js.map +1 -0
  617. package/dist/src/ui/commands/modelCommand.d.ts +7 -0
  618. package/dist/src/ui/commands/modelCommand.js +22 -0
  619. package/dist/src/ui/commands/modelCommand.js.map +1 -0
  620. package/dist/src/ui/commands/modelCommand.test.d.ts +6 -0
  621. package/dist/src/ui/commands/modelCommand.test.js +41 -0
  622. package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
  623. package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
  624. package/dist/src/ui/commands/permissionsCommand.js +75 -0
  625. package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
  626. package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
  627. package/dist/src/ui/commands/permissionsCommand.test.js +86 -0
  628. package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
  629. package/dist/src/ui/commands/policiesCommand.d.ts +7 -0
  630. package/dist/src/ui/commands/policiesCommand.js +77 -0
  631. package/dist/src/ui/commands/policiesCommand.js.map +1 -0
  632. package/dist/src/ui/commands/policiesCommand.test.d.ts +6 -0
  633. package/dist/src/ui/commands/policiesCommand.test.js +87 -0
  634. package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
  635. package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
  636. package/dist/src/ui/commands/privacyCommand.js +17 -0
  637. package/dist/src/ui/commands/privacyCommand.js.map +1 -0
  638. package/dist/src/ui/commands/privacyCommand.test.d.ts +6 -0
  639. package/dist/src/ui/commands/privacyCommand.test.js +32 -0
  640. package/dist/src/ui/commands/privacyCommand.test.js.map +1 -0
  641. package/dist/src/ui/commands/profileCommand.d.ts +7 -0
  642. package/dist/src/ui/commands/profileCommand.js +24 -0
  643. package/dist/src/ui/commands/profileCommand.js.map +1 -0
  644. package/dist/src/ui/commands/quitCommand.d.ts +7 -0
  645. package/dist/src/ui/commands/quitCommand.js +35 -0
  646. package/dist/src/ui/commands/quitCommand.js.map +1 -0
  647. package/dist/src/ui/commands/quitCommand.test.d.ts +6 -0
  648. package/dist/src/ui/commands/quitCommand.test.js +50 -0
  649. package/dist/src/ui/commands/quitCommand.test.js.map +1 -0
  650. package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
  651. package/dist/src/ui/commands/restoreCommand.js +130 -0
  652. package/dist/src/ui/commands/restoreCommand.js.map +1 -0
  653. package/dist/src/ui/commands/restoreCommand.test.d.ts +6 -0
  654. package/dist/src/ui/commands/restoreCommand.test.js +190 -0
  655. package/dist/src/ui/commands/restoreCommand.test.js.map +1 -0
  656. package/dist/src/ui/commands/resumeCommand.d.ts +7 -0
  657. package/dist/src/ui/commands/resumeCommand.js +17 -0
  658. package/dist/src/ui/commands/resumeCommand.js.map +1 -0
  659. package/dist/src/ui/commands/rewindCommand.d.ts +7 -0
  660. package/dist/src/ui/commands/rewindCommand.js +132 -0
  661. package/dist/src/ui/commands/rewindCommand.js.map +1 -0
  662. package/dist/src/ui/commands/rewindCommand.test.d.ts +6 -0
  663. package/dist/src/ui/commands/rewindCommand.test.js +242 -0
  664. package/dist/src/ui/commands/rewindCommand.test.js.map +1 -0
  665. package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
  666. package/dist/src/ui/commands/settingsCommand.js +17 -0
  667. package/dist/src/ui/commands/settingsCommand.js.map +1 -0
  668. package/dist/src/ui/commands/settingsCommand.test.d.ts +6 -0
  669. package/dist/src/ui/commands/settingsCommand.test.js +30 -0
  670. package/dist/src/ui/commands/settingsCommand.test.js.map +1 -0
  671. package/dist/src/ui/commands/setupGithubCommand.d.ts +10 -0
  672. package/dist/src/ui/commands/setupGithubCommand.js +195 -0
  673. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
  674. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +6 -0
  675. package/dist/src/ui/commands/setupGithubCommand.test.js +238 -0
  676. package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
  677. package/dist/src/ui/commands/skillsCommand.d.ts +7 -0
  678. package/dist/src/ui/commands/skillsCommand.js +237 -0
  679. package/dist/src/ui/commands/skillsCommand.js.map +1 -0
  680. package/dist/src/ui/commands/skillsCommand.test.d.ts +6 -0
  681. package/dist/src/ui/commands/skillsCommand.test.js +426 -0
  682. package/dist/src/ui/commands/skillsCommand.test.js.map +1 -0
  683. package/dist/src/ui/commands/statsCommand.d.ts +7 -0
  684. package/dist/src/ui/commands/statsCommand.js +75 -0
  685. package/dist/src/ui/commands/statsCommand.js.map +1 -0
  686. package/dist/src/ui/commands/statsCommand.test.d.ts +6 -0
  687. package/dist/src/ui/commands/statsCommand.test.js +70 -0
  688. package/dist/src/ui/commands/statsCommand.test.js.map +1 -0
  689. package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
  690. package/dist/src/ui/commands/terminalSetupCommand.js +43 -0
  691. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
  692. package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +6 -0
  693. package/dist/src/ui/commands/terminalSetupCommand.test.js +66 -0
  694. package/dist/src/ui/commands/terminalSetupCommand.test.js.map +1 -0
  695. package/dist/src/ui/commands/themeCommand.d.ts +7 -0
  696. package/dist/src/ui/commands/themeCommand.js +17 -0
  697. package/dist/src/ui/commands/themeCommand.js.map +1 -0
  698. package/dist/src/ui/commands/themeCommand.test.d.ts +6 -0
  699. package/dist/src/ui/commands/themeCommand.test.js +32 -0
  700. package/dist/src/ui/commands/themeCommand.test.js.map +1 -0
  701. package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
  702. package/dist/src/ui/commands/toolsCommand.js +43 -0
  703. package/dist/src/ui/commands/toolsCommand.js.map +1 -0
  704. package/dist/src/ui/commands/toolsCommand.test.d.ts +6 -0
  705. package/dist/src/ui/commands/toolsCommand.test.js +100 -0
  706. package/dist/src/ui/commands/toolsCommand.test.js.map +1 -0
  707. package/dist/src/ui/commands/types.d.ts +147 -0
  708. package/dist/src/ui/commands/types.js +13 -0
  709. package/dist/src/ui/commands/types.js.map +1 -0
  710. package/dist/src/ui/commands/vimCommand.d.ts +7 -0
  711. package/dist/src/ui/commands/vimCommand.js +24 -0
  712. package/dist/src/ui/commands/vimCommand.js.map +1 -0
  713. package/dist/src/ui/components/AboutBox.d.ts +18 -0
  714. package/dist/src/ui/components/AboutBox.js +6 -0
  715. package/dist/src/ui/components/AboutBox.js.map +1 -0
  716. package/dist/src/ui/components/AboutBox.test.d.ts +6 -0
  717. package/dist/src/ui/components/AboutBox.test.js +53 -0
  718. package/dist/src/ui/components/AboutBox.test.js.map +1 -0
  719. package/dist/src/ui/components/AdminSettingsChangedDialog.d.ts +6 -0
  720. package/dist/src/ui/components/AdminSettingsChangedDialog.js +22 -0
  721. package/dist/src/ui/components/AdminSettingsChangedDialog.js.map +1 -0
  722. package/dist/src/ui/components/AdminSettingsChangedDialog.test.d.ts +6 -0
  723. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +43 -0
  724. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +1 -0
  725. package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +6 -0
  726. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +24 -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 +170 -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 +72 -0
  751. package/dist/src/ui/components/AsciiArt.js.map +1 -0
  752. package/dist/src/ui/components/Banner.d.ts +14 -0
  753. package/dist/src/ui/components/Banner.js +28 -0
  754. package/dist/src/ui/components/Banner.js.map +1 -0
  755. package/dist/src/ui/components/Banner.test.d.ts +6 -0
  756. package/dist/src/ui/components/Banner.test.js +24 -0
  757. package/dist/src/ui/components/Banner.test.js.map +1 -0
  758. package/dist/src/ui/components/CliSpinner.d.ts +9 -0
  759. package/dist/src/ui/components/CliSpinner.js +19 -0
  760. package/dist/src/ui/components/CliSpinner.js.map +1 -0
  761. package/dist/src/ui/components/CliSpinner.test.d.ts +6 -0
  762. package/dist/src/ui/components/CliSpinner.test.js +23 -0
  763. package/dist/src/ui/components/CliSpinner.test.js.map +1 -0
  764. package/dist/src/ui/components/Composer.d.ts +6 -0
  765. package/dist/src/ui/components/Composer.js +58 -0
  766. package/dist/src/ui/components/Composer.js.map +1 -0
  767. package/dist/src/ui/components/Composer.test.d.ts +6 -0
  768. package/dist/src/ui/components/Composer.test.js +383 -0
  769. package/dist/src/ui/components/Composer.test.js.map +1 -0
  770. package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
  771. package/dist/src/ui/components/ConfigInitDisplay.js +48 -0
  772. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
  773. package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +6 -0
  774. package/dist/src/ui/components/ConfigInitDisplay.test.js +117 -0
  775. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -0
  776. package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
  777. package/dist/src/ui/components/ConsentPrompt.js +19 -0
  778. package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
  779. package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
  780. package/dist/src/ui/components/ConsentPrompt.test.js +77 -0
  781. package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
  782. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
  783. package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
  784. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
  785. package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +6 -0
  786. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +26 -0
  787. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -0
  788. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
  789. package/dist/src/ui/components/ContextSummaryDisplay.js +63 -0
  790. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
  791. package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +6 -0
  792. package/dist/src/ui/components/ContextSummaryDisplay.test.js +102 -0
  793. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -0
  794. package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
  795. package/dist/src/ui/components/ContextUsageDisplay.js +16 -0
  796. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
  797. package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +6 -0
  798. package/dist/src/ui/components/ContextUsageDisplay.test.js +39 -0
  799. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -0
  800. package/dist/src/ui/components/CopyModeWarning.d.ts +7 -0
  801. package/dist/src/ui/components/CopyModeWarning.js +12 -0
  802. package/dist/src/ui/components/CopyModeWarning.js.map +1 -0
  803. package/dist/src/ui/components/CopyModeWarning.test.d.ts +6 -0
  804. package/dist/src/ui/components/CopyModeWarning.test.js +33 -0
  805. package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -0
  806. package/dist/src/ui/components/DebugProfiler.d.ts +25 -0
  807. package/dist/src/ui/components/DebugProfiler.js +177 -0
  808. package/dist/src/ui/components/DebugProfiler.js.map +1 -0
  809. package/dist/src/ui/components/DebugProfiler.test.d.ts +6 -0
  810. package/dist/src/ui/components/DebugProfiler.test.js +229 -0
  811. package/dist/src/ui/components/DebugProfiler.test.js.map +1 -0
  812. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +15 -0
  813. package/dist/src/ui/components/DetailedMessagesDisplay.js +54 -0
  814. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
  815. package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +6 -0
  816. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +39 -0
  817. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -0
  818. package/dist/src/ui/components/DialogManager.d.ts +12 -0
  819. package/dist/src/ui/components/DialogManager.js +107 -0
  820. package/dist/src/ui/components/DialogManager.js.map +1 -0
  821. package/dist/src/ui/components/DialogManager.test.d.ts +6 -0
  822. package/dist/src/ui/components/DialogManager.test.js +153 -0
  823. package/dist/src/ui/components/DialogManager.test.js.map +1 -0
  824. package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
  825. package/dist/src/ui/components/EditorSettingsDialog.js +81 -0
  826. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
  827. package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +6 -0
  828. package/dist/src/ui/components/EditorSettingsDialog.test.js +119 -0
  829. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -0
  830. package/dist/src/ui/components/ExitWarning.d.ts +7 -0
  831. package/dist/src/ui/components/ExitWarning.js +9 -0
  832. package/dist/src/ui/components/ExitWarning.js.map +1 -0
  833. package/dist/src/ui/components/ExitWarning.test.d.ts +6 -0
  834. package/dist/src/ui/components/ExitWarning.test.js +54 -0
  835. package/dist/src/ui/components/ExitWarning.test.js.map +1 -0
  836. package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
  837. package/dist/src/ui/components/FolderTrustDialog.js +71 -0
  838. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
  839. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
  840. package/dist/src/ui/components/FolderTrustDialog.test.js +102 -0
  841. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
  842. package/dist/src/ui/components/Footer.d.ts +7 -0
  843. package/dist/src/ui/components/Footer.js +49 -0
  844. package/dist/src/ui/components/Footer.js.map +1 -0
  845. package/dist/src/ui/components/Footer.test.d.ts +6 -0
  846. package/dist/src/ui/components/Footer.test.js +321 -0
  847. package/dist/src/ui/components/Footer.test.js.map +1 -0
  848. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +22 -0
  849. package/dist/src/ui/components/GeminiRespondingSpinner.js +23 -0
  850. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
  851. package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +6 -0
  852. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +61 -0
  853. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -0
  854. package/dist/src/ui/components/GradientRegression.test.d.ts +6 -0
  855. package/dist/src/ui/components/GradientRegression.test.js +105 -0
  856. package/dist/src/ui/components/GradientRegression.test.js.map +1 -0
  857. package/dist/src/ui/components/Header.d.ts +13 -0
  858. package/dist/src/ui/components/Header.js +31 -0
  859. package/dist/src/ui/components/Header.js.map +1 -0
  860. package/dist/src/ui/components/Header.test.d.ts +6 -0
  861. package/dist/src/ui/components/Header.test.js +147 -0
  862. package/dist/src/ui/components/Header.test.js.map +1 -0
  863. package/dist/src/ui/components/Help.d.ts +12 -0
  864. package/dist/src/ui/components/Help.js +17 -0
  865. package/dist/src/ui/components/Help.js.map +1 -0
  866. package/dist/src/ui/components/Help.test.d.ts +6 -0
  867. package/dist/src/ui/components/Help.test.js +67 -0
  868. package/dist/src/ui/components/Help.test.js.map +1 -0
  869. package/dist/src/ui/components/HistoryItemDisplay.d.ts +21 -0
  870. package/dist/src/ui/components/HistoryItemDisplay.js +33 -0
  871. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
  872. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
  873. package/dist/src/ui/components/HistoryItemDisplay.test.js +207 -0
  874. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
  875. package/dist/src/ui/components/HookStatusDisplay.d.ts +12 -0
  876. package/dist/src/ui/components/HookStatusDisplay.js +20 -0
  877. package/dist/src/ui/components/HookStatusDisplay.js.map +1 -0
  878. package/dist/src/ui/components/HookStatusDisplay.test.d.ts +6 -0
  879. package/dist/src/ui/components/HookStatusDisplay.test.js +51 -0
  880. package/dist/src/ui/components/HookStatusDisplay.test.js.map +1 -0
  881. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
  882. package/dist/src/ui/components/IdeTrustChangeDialog.js +34 -0
  883. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
  884. package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
  885. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +58 -0
  886. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
  887. package/dist/src/ui/components/InputPrompt.d.ts +50 -0
  888. package/dist/src/ui/components/InputPrompt.js +881 -0
  889. package/dist/src/ui/components/InputPrompt.js.map +1 -0
  890. package/dist/src/ui/components/InputPrompt.test.d.ts +6 -0
  891. package/dist/src/ui/components/InputPrompt.test.js +2376 -0
  892. package/dist/src/ui/components/InputPrompt.test.js.map +1 -0
  893. package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
  894. package/dist/src/ui/components/LoadingIndicator.js +30 -0
  895. package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
  896. package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
  897. package/dist/src/ui/components/LoadingIndicator.test.js +207 -0
  898. package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
  899. package/dist/src/ui/components/LogoutConfirmationDialog.d.ts +15 -0
  900. package/dist/src/ui/components/LogoutConfirmationDialog.js +37 -0
  901. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -0
  902. package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +6 -0
  903. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +59 -0
  904. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +1 -0
  905. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
  906. package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
  907. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
  908. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
  909. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +25 -0
  910. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
  911. package/dist/src/ui/components/MainContent.d.ts +6 -0
  912. package/dist/src/ui/components/MainContent.js +78 -0
  913. package/dist/src/ui/components/MainContent.js.map +1 -0
  914. package/dist/src/ui/components/MainContent.test.d.ts +6 -0
  915. package/dist/src/ui/components/MainContent.test.js +83 -0
  916. package/dist/src/ui/components/MainContent.test.js.map +1 -0
  917. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
  918. package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
  919. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
  920. package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +6 -0
  921. package/dist/src/ui/components/MemoryUsageDisplay.test.js +49 -0
  922. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -0
  923. package/dist/src/ui/components/ModelDialog.d.ts +11 -0
  924. package/dist/src/ui/components/ModelDialog.js +147 -0
  925. package/dist/src/ui/components/ModelDialog.js.map +1 -0
  926. package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
  927. package/dist/src/ui/components/ModelDialog.test.js +197 -0
  928. package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
  929. package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
  930. package/dist/src/ui/components/ModelStatsDisplay.js +87 -0
  931. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
  932. package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +6 -0
  933. package/dist/src/ui/components/ModelStatsDisplay.test.js +343 -0
  934. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -0
  935. package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +23 -0
  936. package/dist/src/ui/components/MultiFolderTrustDialog.js +91 -0
  937. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -0
  938. package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +6 -0
  939. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +161 -0
  940. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -0
  941. package/dist/src/ui/components/Notifications.d.ts +6 -0
  942. package/dist/src/ui/components/Notifications.js +61 -0
  943. package/dist/src/ui/components/Notifications.js.map +1 -0
  944. package/dist/src/ui/components/Notifications.test.d.ts +6 -0
  945. package/dist/src/ui/components/Notifications.test.js +153 -0
  946. package/dist/src/ui/components/Notifications.test.js.map +1 -0
  947. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +16 -0
  948. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +58 -0
  949. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
  950. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
  951. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +162 -0
  952. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
  953. package/dist/src/ui/components/ProQuotaDialog.d.ts +16 -0
  954. package/dist/src/ui/components/ProQuotaDialog.js +77 -0
  955. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
  956. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
  957. package/dist/src/ui/components/ProQuotaDialog.test.js +191 -0
  958. package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
  959. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
  960. package/dist/src/ui/components/QueuedMessageDisplay.js +20 -0
  961. package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
  962. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
  963. package/dist/src/ui/components/QueuedMessageDisplay.test.js +65 -0
  964. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
  965. package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
  966. package/dist/src/ui/components/QuittingDisplay.js +20 -0
  967. package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
  968. package/dist/src/ui/components/QuittingDisplay.test.d.ts +6 -0
  969. package/dist/src/ui/components/QuittingDisplay.test.js +49 -0
  970. package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -0
  971. package/dist/src/ui/components/RawMarkdownIndicator.d.ts +7 -0
  972. package/dist/src/ui/components/RawMarkdownIndicator.js +8 -0
  973. package/dist/src/ui/components/RawMarkdownIndicator.js.map +1 -0
  974. package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +6 -0
  975. package/dist/src/ui/components/RawMarkdownIndicator.test.js +34 -0
  976. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -0
  977. package/dist/src/ui/components/RewindConfirmation.d.ts +21 -0
  978. package/dist/src/ui/components/RewindConfirmation.js +63 -0
  979. package/dist/src/ui/components/RewindConfirmation.js.map +1 -0
  980. package/dist/src/ui/components/RewindConfirmation.test.d.ts +6 -0
  981. package/dist/src/ui/components/RewindConfirmation.test.js +53 -0
  982. package/dist/src/ui/components/RewindConfirmation.test.js.map +1 -0
  983. package/dist/src/ui/components/RewindViewer.d.ts +15 -0
  984. package/dist/src/ui/components/RewindViewer.js +127 -0
  985. package/dist/src/ui/components/RewindViewer.js.map +1 -0
  986. package/dist/src/ui/components/RewindViewer.test.d.ts +6 -0
  987. package/dist/src/ui/components/RewindViewer.test.js +241 -0
  988. package/dist/src/ui/components/RewindViewer.test.js.map +1 -0
  989. package/dist/src/ui/components/SessionBrowser.d.ts +98 -0
  990. package/dist/src/ui/components/SessionBrowser.js +460 -0
  991. package/dist/src/ui/components/SessionBrowser.js.map +1 -0
  992. package/dist/src/ui/components/SessionBrowser.test.d.ts +6 -0
  993. package/dist/src/ui/components/SessionBrowser.test.js +256 -0
  994. package/dist/src/ui/components/SessionBrowser.test.js.map +1 -0
  995. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
  996. package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
  997. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
  998. package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +6 -0
  999. package/dist/src/ui/components/SessionSummaryDisplay.test.js +75 -0
  1000. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -0
  1001. package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
  1002. package/dist/src/ui/components/SettingsDialog.js +724 -0
  1003. package/dist/src/ui/components/SettingsDialog.js.map +1 -0
  1004. package/dist/src/ui/components/SettingsDialog.test.d.ts +6 -0
  1005. package/dist/src/ui/components/SettingsDialog.test.js +1168 -0
  1006. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
  1007. package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
  1008. package/dist/src/ui/components/ShellInputPrompt.js +36 -0
  1009. package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
  1010. package/dist/src/ui/components/ShellInputPrompt.test.d.ts +6 -0
  1011. package/dist/src/ui/components/ShellInputPrompt.test.js +91 -0
  1012. package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -0
  1013. package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
  1014. package/dist/src/ui/components/ShellModeIndicator.js +5 -0
  1015. package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
  1016. package/dist/src/ui/components/ShellModeIndicator.test.d.ts +6 -0
  1017. package/dist/src/ui/components/ShellModeIndicator.test.js +17 -0
  1018. package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -0
  1019. package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
  1020. package/dist/src/ui/components/ShowMoreLines.js +24 -0
  1021. package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
  1022. package/dist/src/ui/components/ShowMoreLines.test.d.ts +6 -0
  1023. package/dist/src/ui/components/ShowMoreLines.test.js +40 -0
  1024. package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -0
  1025. package/dist/src/ui/components/StatsDisplay.d.ts +14 -0
  1026. package/dist/src/ui/components/StatsDisplay.js +119 -0
  1027. package/dist/src/ui/components/StatsDisplay.js.map +1 -0
  1028. package/dist/src/ui/components/StatsDisplay.test.d.ts +6 -0
  1029. package/dist/src/ui/components/StatsDisplay.test.js +438 -0
  1030. package/dist/src/ui/components/StatsDisplay.test.js.map +1 -0
  1031. package/dist/src/ui/components/StatusDisplay.d.ts +11 -0
  1032. package/dist/src/ui/components/StatusDisplay.js +45 -0
  1033. package/dist/src/ui/components/StatusDisplay.js.map +1 -0
  1034. package/dist/src/ui/components/StatusDisplay.test.d.ts +6 -0
  1035. package/dist/src/ui/components/StatusDisplay.test.js +155 -0
  1036. package/dist/src/ui/components/StatusDisplay.test.js.map +1 -0
  1037. package/dist/src/ui/components/StickyHeader.d.ts +16 -0
  1038. package/dist/src/ui/components/StickyHeader.js +5 -0
  1039. package/dist/src/ui/components/StickyHeader.js.map +1 -0
  1040. package/dist/src/ui/components/StickyHeader.test.d.ts +6 -0
  1041. package/dist/src/ui/components/StickyHeader.test.js +17 -0
  1042. package/dist/src/ui/components/StickyHeader.test.js.map +1 -0
  1043. package/dist/src/ui/components/SuggestionsDisplay.d.ts +27 -0
  1044. package/dist/src/ui/components/SuggestionsDisplay.js +46 -0
  1045. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
  1046. package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +6 -0
  1047. package/dist/src/ui/components/SuggestionsDisplay.test.js +56 -0
  1048. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -0
  1049. package/dist/src/ui/components/Table.d.ts +21 -0
  1050. package/dist/src/ui/components/Table.js +7 -0
  1051. package/dist/src/ui/components/Table.js.map +1 -0
  1052. package/dist/src/ui/components/Table.test.d.ts +6 -0
  1053. package/dist/src/ui/components/Table.test.js +53 -0
  1054. package/dist/src/ui/components/Table.test.js.map +1 -0
  1055. package/dist/src/ui/components/ThemeDialog.d.ts +21 -0
  1056. package/dist/src/ui/components/ThemeDialog.js +181 -0
  1057. package/dist/src/ui/components/ThemeDialog.js.map +1 -0
  1058. package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
  1059. package/dist/src/ui/components/ThemeDialog.test.js +167 -0
  1060. package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
  1061. package/dist/src/ui/components/ThemedGradient.d.ts +8 -0
  1062. package/dist/src/ui/components/ThemedGradient.js +16 -0
  1063. package/dist/src/ui/components/ThemedGradient.js.map +1 -0
  1064. package/dist/src/ui/components/ThemedGradient.test.d.ts +6 -0
  1065. package/dist/src/ui/components/ThemedGradient.test.js +30 -0
  1066. package/dist/src/ui/components/ThemedGradient.test.js.map +1 -0
  1067. package/dist/src/ui/components/Tips.d.ts +12 -0
  1068. package/dist/src/ui/components/Tips.js +9 -0
  1069. package/dist/src/ui/components/Tips.js.map +1 -0
  1070. package/dist/src/ui/components/Tips.test.d.ts +6 -0
  1071. package/dist/src/ui/components/Tips.test.js +23 -0
  1072. package/dist/src/ui/components/Tips.test.js.map +1 -0
  1073. package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
  1074. package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
  1075. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
  1076. package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +6 -0
  1077. package/dist/src/ui/components/ToolStatsDisplay.test.js +227 -0
  1078. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -0
  1079. package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
  1080. package/dist/src/ui/components/UpdateNotification.js +10 -0
  1081. package/dist/src/ui/components/UpdateNotification.js.map +1 -0
  1082. package/dist/src/ui/components/UpdateNotification.test.d.ts +6 -0
  1083. package/dist/src/ui/components/UpdateNotification.test.js +16 -0
  1084. package/dist/src/ui/components/UpdateNotification.test.js.map +1 -0
  1085. package/dist/src/ui/components/ValidationDialog.d.ts +15 -0
  1086. package/dist/src/ui/components/ValidationDialog.js +86 -0
  1087. package/dist/src/ui/components/ValidationDialog.js.map +1 -0
  1088. package/dist/src/ui/components/ValidationDialog.test.d.ts +6 -0
  1089. package/dist/src/ui/components/ValidationDialog.test.js +128 -0
  1090. package/dist/src/ui/components/ValidationDialog.test.js.map +1 -0
  1091. package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
  1092. package/dist/src/ui/components/messages/CompressionMessage.js +48 -0
  1093. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
  1094. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
  1095. package/dist/src/ui/components/messages/CompressionMessage.test.js +191 -0
  1096. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
  1097. package/dist/src/ui/components/messages/DiffRenderer.d.ts +17 -0
  1098. package/dist/src/ui/components/messages/DiffRenderer.js +250 -0
  1099. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
  1100. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
  1101. package/dist/src/ui/components/messages/DiffRenderer.test.js +240 -0
  1102. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
  1103. package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
  1104. package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
  1105. package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
  1106. package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +6 -0
  1107. package/dist/src/ui/components/messages/ErrorMessage.test.js +23 -0
  1108. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -0
  1109. package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
  1110. package/dist/src/ui/components/messages/GeminiMessage.js +15 -0
  1111. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
  1112. package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +6 -0
  1113. package/dist/src/ui/components/messages/GeminiMessage.test.js +35 -0
  1114. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -0
  1115. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
  1116. package/dist/src/ui/components/messages/GeminiMessageContent.js +19 -0
  1117. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
  1118. package/dist/src/ui/components/messages/InfoMessage.d.ts +13 -0
  1119. package/dist/src/ui/components/messages/InfoMessage.js +11 -0
  1120. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
  1121. package/dist/src/ui/components/messages/InfoMessage.test.d.ts +6 -0
  1122. package/dist/src/ui/components/messages/InfoMessage.test.js +28 -0
  1123. package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -0
  1124. package/dist/src/ui/components/messages/ModelMessage.d.ts +11 -0
  1125. package/dist/src/ui/components/messages/ModelMessage.js +5 -0
  1126. package/dist/src/ui/components/messages/ModelMessage.js.map +1 -0
  1127. package/dist/src/ui/components/messages/RedirectionConfirmation.test.d.ts +6 -0
  1128. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +33 -0
  1129. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +1 -0
  1130. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +14 -0
  1131. package/dist/src/ui/components/messages/ShellToolMessage.js +44 -0
  1132. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -0
  1133. package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +6 -0
  1134. package/dist/src/ui/components/messages/ShellToolMessage.test.js +123 -0
  1135. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -0
  1136. package/dist/src/ui/components/messages/Todo.d.ts +7 -0
  1137. package/dist/src/ui/components/messages/Todo.js +91 -0
  1138. package/dist/src/ui/components/messages/Todo.js.map +1 -0
  1139. package/dist/src/ui/components/messages/Todo.test.d.ts +6 -0
  1140. package/dist/src/ui/components/messages/Todo.test.js +114 -0
  1141. package/dist/src/ui/components/messages/Todo.test.js.map +1 -0
  1142. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
  1143. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +252 -0
  1144. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
  1145. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
  1146. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +180 -0
  1147. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
  1148. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +19 -0
  1149. package/dist/src/ui/components/messages/ToolGroupMessage.js +76 -0
  1150. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
  1151. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
  1152. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +425 -0
  1153. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
  1154. package/dist/src/ui/components/messages/ToolMessage.d.ts +24 -0
  1155. package/dist/src/ui/components/messages/ToolMessage.js +18 -0
  1156. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
  1157. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
  1158. package/dist/src/ui/components/messages/ToolMessage.test.js +154 -0
  1159. package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
  1160. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.d.ts +6 -0
  1161. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +89 -0
  1162. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +1 -0
  1163. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +6 -0
  1164. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +62 -0
  1165. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -0
  1166. package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +13 -0
  1167. package/dist/src/ui/components/messages/ToolResultDisplay.js +60 -0
  1168. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -0
  1169. package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +6 -0
  1170. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +114 -0
  1171. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -0
  1172. package/dist/src/ui/components/messages/ToolShared.d.ts +49 -0
  1173. package/dist/src/ui/components/messages/ToolShared.js +93 -0
  1174. package/dist/src/ui/components/messages/ToolShared.js.map +1 -0
  1175. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +6 -0
  1176. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +134 -0
  1177. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +1 -0
  1178. package/dist/src/ui/components/messages/UserMessage.d.ts +12 -0
  1179. package/dist/src/ui/components/messages/UserMessage.js +13 -0
  1180. package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
  1181. package/dist/src/ui/components/messages/UserMessage.test.d.ts +6 -0
  1182. package/dist/src/ui/components/messages/UserMessage.test.js +32 -0
  1183. package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -0
  1184. package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
  1185. package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
  1186. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
  1187. package/dist/src/ui/components/messages/WarningMessage.d.ts +11 -0
  1188. package/dist/src/ui/components/messages/WarningMessage.js +10 -0
  1189. package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
  1190. package/dist/src/ui/components/messages/WarningMessage.test.d.ts +6 -0
  1191. package/dist/src/ui/components/messages/WarningMessage.test.js +23 -0
  1192. package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -0
  1193. package/dist/src/ui/components/shared/BaseSelectionList.d.ts +39 -0
  1194. package/dist/src/ui/components/shared/BaseSelectionList.js +73 -0
  1195. package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
  1196. package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
  1197. package/dist/src/ui/components/shared/BaseSelectionList.test.js +386 -0
  1198. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
  1199. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +35 -0
  1200. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
  1201. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
  1202. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
  1203. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
  1204. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
  1205. package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
  1206. package/dist/src/ui/components/shared/EnumSelector.js +44 -0
  1207. package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
  1208. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
  1209. package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
  1210. package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
  1211. package/dist/src/ui/components/shared/ExpandableText.d.ts +17 -0
  1212. package/dist/src/ui/components/shared/ExpandableText.js +87 -0
  1213. package/dist/src/ui/components/shared/ExpandableText.js.map +1 -0
  1214. package/dist/src/ui/components/shared/ExpandableText.test.d.ts +6 -0
  1215. package/dist/src/ui/components/shared/ExpandableText.test.js +88 -0
  1216. package/dist/src/ui/components/shared/ExpandableText.test.js.map +1 -0
  1217. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +25 -0
  1218. package/dist/src/ui/components/shared/MaxSizedBox.js +67 -0
  1219. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
  1220. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
  1221. package/dist/src/ui/components/shared/MaxSizedBox.test.js +90 -0
  1222. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
  1223. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +48 -0
  1224. package/dist/src/ui/components/shared/RadioButtonSelect.js +22 -0
  1225. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
  1226. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
  1227. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +134 -0
  1228. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
  1229. package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
  1230. package/dist/src/ui/components/shared/ScopeSelector.js +14 -0
  1231. package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
  1232. package/dist/src/ui/components/shared/Scrollable.d.ts +18 -0
  1233. package/dist/src/ui/components/shared/Scrollable.js +84 -0
  1234. package/dist/src/ui/components/shared/Scrollable.js.map +1 -0
  1235. package/dist/src/ui/components/shared/Scrollable.test.d.ts +6 -0
  1236. package/dist/src/ui/components/shared/Scrollable.test.js +74 -0
  1237. package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -0
  1238. package/dist/src/ui/components/shared/ScrollableList.d.ts +26 -0
  1239. package/dist/src/ui/components/shared/ScrollableList.js +152 -0
  1240. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -0
  1241. package/dist/src/ui/components/shared/ScrollableList.test.d.ts +6 -0
  1242. package/dist/src/ui/components/shared/ScrollableList.test.js +228 -0
  1243. package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -0
  1244. package/dist/src/ui/components/shared/TextInput.d.ts +15 -0
  1245. package/dist/src/ui/components/shared/TextInput.js +38 -0
  1246. package/dist/src/ui/components/shared/TextInput.js.map +1 -0
  1247. package/dist/src/ui/components/shared/TextInput.test.d.ts +6 -0
  1248. package/dist/src/ui/components/shared/TextInput.test.js +242 -0
  1249. package/dist/src/ui/components/shared/TextInput.test.js.map +1 -0
  1250. package/dist/src/ui/components/shared/VirtualizedList.d.ts +44 -0
  1251. package/dist/src/ui/components/shared/VirtualizedList.js +312 -0
  1252. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -0
  1253. package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +6 -0
  1254. package/dist/src/ui/components/shared/VirtualizedList.test.js +171 -0
  1255. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -0
  1256. package/dist/src/ui/components/shared/performance.test.d.ts +1 -0
  1257. package/dist/src/ui/components/shared/performance.test.js +67 -0
  1258. package/dist/src/ui/components/shared/performance.test.js.map +1 -0
  1259. package/dist/src/ui/components/shared/text-buffer.d.ts +542 -0
  1260. package/dist/src/ui/components/shared/text-buffer.js +2020 -0
  1261. package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
  1262. package/dist/src/ui/components/shared/text-buffer.test.d.ts +6 -0
  1263. package/dist/src/ui/components/shared/text-buffer.test.js +2362 -0
  1264. package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -0
  1265. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
  1266. package/dist/src/ui/components/shared/vim-buffer-actions.js +552 -0
  1267. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
  1268. package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +6 -0
  1269. package/dist/src/ui/components/shared/vim-buffer-actions.test.js +957 -0
  1270. package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -0
  1271. package/dist/src/ui/components/views/AgentsStatus.d.ts +13 -0
  1272. package/dist/src/ui/components/views/AgentsStatus.js +23 -0
  1273. package/dist/src/ui/components/views/AgentsStatus.js.map +1 -0
  1274. package/dist/src/ui/components/views/ChatList.d.ts +12 -0
  1275. package/dist/src/ui/components/views/ChatList.js +17 -0
  1276. package/dist/src/ui/components/views/ChatList.js.map +1 -0
  1277. package/dist/src/ui/components/views/ChatList.test.d.ts +6 -0
  1278. package/dist/src/ui/components/views/ChatList.test.js +45 -0
  1279. package/dist/src/ui/components/views/ChatList.test.js.map +1 -0
  1280. package/dist/src/ui/components/views/ExtensionsList.d.ts +12 -0
  1281. package/dist/src/ui/components/views/ExtensionsList.js +45 -0
  1282. package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
  1283. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
  1284. package/dist/src/ui/components/views/ExtensionsList.test.js +148 -0
  1285. package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
  1286. package/dist/src/ui/components/views/HooksList.d.ts +24 -0
  1287. package/dist/src/ui/components/views/HooksList.js +28 -0
  1288. package/dist/src/ui/components/views/HooksList.js.map +1 -0
  1289. package/dist/src/ui/components/views/McpStatus.d.ts +28 -0
  1290. package/dist/src/ui/components/views/McpStatus.js +104 -0
  1291. package/dist/src/ui/components/views/McpStatus.js.map +1 -0
  1292. package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
  1293. package/dist/src/ui/components/views/McpStatus.test.js +153 -0
  1294. package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
  1295. package/dist/src/ui/components/views/SkillsList.d.ts +13 -0
  1296. package/dist/src/ui/components/views/SkillsList.js +17 -0
  1297. package/dist/src/ui/components/views/SkillsList.js.map +1 -0
  1298. package/dist/src/ui/components/views/SkillsList.test.d.ts +6 -0
  1299. package/dist/src/ui/components/views/SkillsList.test.js +97 -0
  1300. package/dist/src/ui/components/views/SkillsList.test.js.map +1 -0
  1301. package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
  1302. package/dist/src/ui/components/views/ToolsList.js +7 -0
  1303. package/dist/src/ui/components/views/ToolsList.js.map +1 -0
  1304. package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
  1305. package/dist/src/ui/components/views/ToolsList.test.js +45 -0
  1306. package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
  1307. package/dist/src/ui/constants/tips.d.ts +6 -0
  1308. package/dist/src/ui/constants/tips.js +164 -0
  1309. package/dist/src/ui/constants/tips.js.map +1 -0
  1310. package/dist/src/ui/constants/wittyPhrases.d.ts +6 -0
  1311. package/dist/src/ui/constants/wittyPhrases.js +137 -0
  1312. package/dist/src/ui/constants/wittyPhrases.js.map +1 -0
  1313. package/dist/src/ui/constants.d.ts +24 -0
  1314. package/dist/src/ui/constants.js +31 -0
  1315. package/dist/src/ui/constants.js.map +1 -0
  1316. package/dist/src/ui/contexts/AppContext.d.ts +11 -0
  1317. package/dist/src/ui/contexts/AppContext.js +15 -0
  1318. package/dist/src/ui/contexts/AppContext.js.map +1 -0
  1319. package/dist/src/ui/contexts/ConfigContext.d.ts +9 -0
  1320. package/dist/src/ui/contexts/ConfigContext.js +16 -0
  1321. package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
  1322. package/dist/src/ui/contexts/KeypressContext.d.ts +32 -0
  1323. package/dist/src/ui/contexts/KeypressContext.js +614 -0
  1324. package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
  1325. package/dist/src/ui/contexts/KeypressContext.test.d.ts +6 -0
  1326. package/dist/src/ui/contexts/KeypressContext.test.js +957 -0
  1327. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
  1328. package/dist/src/ui/contexts/MouseContext.d.ts +21 -0
  1329. package/dist/src/ui/contexts/MouseContext.js +104 -0
  1330. package/dist/src/ui/contexts/MouseContext.js.map +1 -0
  1331. package/dist/src/ui/contexts/MouseContext.test.d.ts +6 -0
  1332. package/dist/src/ui/contexts/MouseContext.test.js +198 -0
  1333. package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
  1334. package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
  1335. package/dist/src/ui/contexts/OverflowContext.js +38 -0
  1336. package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
  1337. package/dist/src/ui/contexts/ScrollProvider.d.ts +25 -0
  1338. package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +6 -0
  1339. package/dist/src/ui/contexts/ScrollProvider.drag.test.js +319 -0
  1340. package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +1 -0
  1341. package/dist/src/ui/contexts/ScrollProvider.js +242 -0
  1342. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -0
  1343. package/dist/src/ui/contexts/ScrollProvider.test.d.ts +6 -0
  1344. package/dist/src/ui/contexts/ScrollProvider.test.js +377 -0
  1345. package/dist/src/ui/contexts/ScrollProvider.test.js.map +1 -0
  1346. package/dist/src/ui/contexts/SessionContext.d.ts +46 -0
  1347. package/dist/src/ui/contexts/SessionContext.js +158 -0
  1348. package/dist/src/ui/contexts/SessionContext.js.map +1 -0
  1349. package/dist/src/ui/contexts/SessionContext.test.d.ts +6 -0
  1350. package/dist/src/ui/contexts/SessionContext.test.js +198 -0
  1351. package/dist/src/ui/contexts/SessionContext.test.js.map +1 -0
  1352. package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
  1353. package/dist/src/ui/contexts/SettingsContext.js +15 -0
  1354. package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
  1355. package/dist/src/ui/contexts/ShellFocusContext.d.ts +7 -0
  1356. package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
  1357. package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
  1358. package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
  1359. package/dist/src/ui/contexts/StreamingContext.js +15 -0
  1360. package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
  1361. package/dist/src/ui/contexts/ToolActionsContext.d.ts +20 -0
  1362. package/dist/src/ui/contexts/ToolActionsContext.js +74 -0
  1363. package/dist/src/ui/contexts/ToolActionsContext.js.map +1 -0
  1364. package/dist/src/ui/contexts/ToolActionsContext.test.d.ts +6 -0
  1365. package/dist/src/ui/contexts/ToolActionsContext.test.js +135 -0
  1366. package/dist/src/ui/contexts/ToolActionsContext.test.js.map +1 -0
  1367. package/dist/src/ui/contexts/UIActionsContext.d.ts +57 -0
  1368. package/dist/src/ui/contexts/UIActionsContext.js +21 -0
  1369. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
  1370. package/dist/src/ui/contexts/UIStateContext.d.ts +136 -0
  1371. package/dist/src/ui/contexts/UIStateContext.js +17 -0
  1372. package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
  1373. package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
  1374. package/dist/src/ui/contexts/VimModeContext.js +48 -0
  1375. package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
  1376. package/dist/src/ui/debug.d.ts +8 -0
  1377. package/dist/src/ui/debug.js +11 -0
  1378. package/dist/src/ui/debug.js.map +1 -0
  1379. package/dist/src/ui/editors/editorSettingsManager.d.ts +18 -0
  1380. package/dist/src/ui/editors/editorSettingsManager.js +37 -0
  1381. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
  1382. package/dist/src/ui/hooks/atCommandProcessor.d.ts +32 -0
  1383. package/dist/src/ui/hooks/atCommandProcessor.js +528 -0
  1384. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
  1385. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +6 -0
  1386. package/dist/src/ui/hooks/atCommandProcessor.test.js +1032 -0
  1387. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
  1388. package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +6 -0
  1389. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +183 -0
  1390. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +1 -0
  1391. package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
  1392. package/dist/src/ui/hooks/keyToAnsi.js +67 -0
  1393. package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
  1394. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +19 -0
  1395. package/dist/src/ui/hooks/shellCommandProcessor.js +285 -0
  1396. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
  1397. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +6 -0
  1398. package/dist/src/ui/hooks/shellCommandProcessor.test.js +521 -0
  1399. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
  1400. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +46 -0
  1401. package/dist/src/ui/hooks/slashCommandProcessor.js +510 -0
  1402. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
  1403. package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +6 -0
  1404. package/dist/src/ui/hooks/slashCommandProcessor.test.js +796 -0
  1405. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -0
  1406. package/dist/src/ui/hooks/toolMapping.d.ts +14 -0
  1407. package/dist/src/ui/hooks/toolMapping.js +100 -0
  1408. package/dist/src/ui/hooks/toolMapping.js.map +1 -0
  1409. package/dist/src/ui/hooks/toolMapping.test.d.ts +6 -0
  1410. package/dist/src/ui/hooks/toolMapping.test.js +211 -0
  1411. package/dist/src/ui/hooks/toolMapping.test.js.map +1 -0
  1412. package/dist/src/ui/hooks/useAlternateBuffer.d.ts +8 -0
  1413. package/dist/src/ui/hooks/useAlternateBuffer.js +12 -0
  1414. package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -0
  1415. package/dist/src/ui/hooks/useAnimatedScrollbar.d.ts +10 -0
  1416. package/dist/src/ui/hooks/useAnimatedScrollbar.js +91 -0
  1417. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -0
  1418. package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +6 -0
  1419. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +85 -0
  1420. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +1 -0
  1421. package/dist/src/ui/hooks/useApprovalModeIndicator.d.ts +14 -0
  1422. package/dist/src/ui/hooks/useApprovalModeIndicator.js +75 -0
  1423. package/dist/src/ui/hooks/useApprovalModeIndicator.js.map +1 -0
  1424. package/dist/src/ui/hooks/useApprovalModeIndicator.test.d.ts +6 -0
  1425. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +435 -0
  1426. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +1 -0
  1427. package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
  1428. package/dist/src/ui/hooks/useAtCompletion.js +280 -0
  1429. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
  1430. package/dist/src/ui/hooks/useAtCompletion.test.d.ts +6 -0
  1431. package/dist/src/ui/hooks/useAtCompletion.test.js +417 -0
  1432. package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -0
  1433. package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +6 -0
  1434. package/dist/src/ui/hooks/useAtCompletion_agents.test.js +87 -0
  1435. package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +1 -0
  1436. package/dist/src/ui/hooks/useBanner.d.ts +14 -0
  1437. package/dist/src/ui/hooks/useBanner.js +48 -0
  1438. package/dist/src/ui/hooks/useBanner.js.map +1 -0
  1439. package/dist/src/ui/hooks/useBanner.test.d.ts +6 -0
  1440. package/dist/src/ui/hooks/useBanner.test.js +92 -0
  1441. package/dist/src/ui/hooks/useBanner.test.js.map +1 -0
  1442. package/dist/src/ui/hooks/useBatchedScroll.d.ts +14 -0
  1443. package/dist/src/ui/hooks/useBatchedScroll.js +27 -0
  1444. package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -0
  1445. package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +6 -0
  1446. package/dist/src/ui/hooks/useBatchedScroll.test.js +62 -0
  1447. package/dist/src/ui/hooks/useBatchedScroll.test.js.map +1 -0
  1448. package/dist/src/ui/hooks/useCommandCompletion.d.ts +42 -0
  1449. package/dist/src/ui/hooks/useCommandCompletion.js +237 -0
  1450. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
  1451. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +6 -0
  1452. package/dist/src/ui/hooks/useCommandCompletion.test.js +462 -0
  1453. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -0
  1454. package/dist/src/ui/hooks/useCompletion.d.ts +24 -0
  1455. package/dist/src/ui/hooks/useCompletion.js +88 -0
  1456. package/dist/src/ui/hooks/useCompletion.js.map +1 -0
  1457. package/dist/src/ui/hooks/useConsoleMessages.d.ts +11 -0
  1458. package/dist/src/ui/hooks/useConsoleMessages.js +101 -0
  1459. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
  1460. package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +6 -0
  1461. package/dist/src/ui/hooks/useConsoleMessages.test.js +159 -0
  1462. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -0
  1463. package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
  1464. package/dist/src/ui/hooks/useEditorSettings.js +44 -0
  1465. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
  1466. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +6 -0
  1467. package/dist/src/ui/hooks/useEditorSettings.test.js +179 -0
  1468. package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
  1469. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +31 -0
  1470. package/dist/src/ui/hooks/useExtensionUpdates.js +173 -0
  1471. package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
  1472. package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
  1473. package/dist/src/ui/hooks/useExtensionUpdates.test.js +279 -0
  1474. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
  1475. package/dist/src/ui/hooks/useFlickerDetector.d.ts +14 -0
  1476. package/dist/src/ui/hooks/useFlickerDetector.js +37 -0
  1477. package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -0
  1478. package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +6 -0
  1479. package/dist/src/ui/hooks/useFlickerDetector.test.js +106 -0
  1480. package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -0
  1481. package/dist/src/ui/hooks/useFocus.d.ts +10 -0
  1482. package/dist/src/ui/hooks/useFocus.js +51 -0
  1483. package/dist/src/ui/hooks/useFocus.js.map +1 -0
  1484. package/dist/src/ui/hooks/useFocus.test.d.ts +6 -0
  1485. package/dist/src/ui/hooks/useFocus.test.js +131 -0
  1486. package/dist/src/ui/hooks/useFocus.test.js.map +1 -0
  1487. package/dist/src/ui/hooks/useFolderTrust.d.ts +14 -0
  1488. package/dist/src/ui/hooks/useFolderTrust.js +76 -0
  1489. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
  1490. package/dist/src/ui/hooks/useFolderTrust.test.d.ts +6 -0
  1491. package/dist/src/ui/hooks/useFolderTrust.test.js +218 -0
  1492. package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -0
  1493. package/dist/src/ui/hooks/useGeminiStream.d.ts +37 -0
  1494. package/dist/src/ui/hooks/useGeminiStream.js +911 -0
  1495. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
  1496. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +6 -0
  1497. package/dist/src/ui/hooks/useGeminiStream.test.js +2269 -0
  1498. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -0
  1499. package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
  1500. package/dist/src/ui/hooks/useGitBranchName.js +65 -0
  1501. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
  1502. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
  1503. package/dist/src/ui/hooks/useGitBranchName.test.js +183 -0
  1504. package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
  1505. package/dist/src/ui/hooks/useHistoryManager.d.ts +25 -0
  1506. package/dist/src/ui/hooks/useHistoryManager.js +108 -0
  1507. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
  1508. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +6 -0
  1509. package/dist/src/ui/hooks/useHistoryManager.test.js +188 -0
  1510. package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
  1511. package/dist/src/ui/hooks/useHookDisplayState.d.ts +7 -0
  1512. package/dist/src/ui/hooks/useHookDisplayState.js +83 -0
  1513. package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -0
  1514. package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +6 -0
  1515. package/dist/src/ui/hooks/useHookDisplayState.test.js +180 -0
  1516. package/dist/src/ui/hooks/useHookDisplayState.test.js.map +1 -0
  1517. package/dist/src/ui/hooks/useIdeTrustListener.d.ts +16 -0
  1518. package/dist/src/ui/hooks/useIdeTrustListener.js +67 -0
  1519. package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
  1520. package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
  1521. package/dist/src/ui/hooks/useIdeTrustListener.test.js +214 -0
  1522. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
  1523. package/dist/src/ui/hooks/useInactivityTimer.d.ts +14 -0
  1524. package/dist/src/ui/hooks/useInactivityTimer.js +30 -0
  1525. package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -0
  1526. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +8 -0
  1527. package/dist/src/ui/hooks/useIncludeDirsTrust.js +110 -0
  1528. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -0
  1529. package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +6 -0
  1530. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +172 -0
  1531. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -0
  1532. package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
  1533. package/dist/src/ui/hooks/useInputHistory.js +84 -0
  1534. package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
  1535. package/dist/src/ui/hooks/useInputHistory.test.d.ts +6 -0
  1536. package/dist/src/ui/hooks/useInputHistory.test.js +208 -0
  1537. package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
  1538. package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
  1539. package/dist/src/ui/hooks/useInputHistoryStore.js +82 -0
  1540. package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
  1541. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +6 -0
  1542. package/dist/src/ui/hooks/useInputHistoryStore.test.js +238 -0
  1543. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
  1544. package/dist/src/ui/hooks/useKeypress.d.ts +17 -0
  1545. package/dist/src/ui/hooks/useKeypress.js +27 -0
  1546. package/dist/src/ui/hooks/useKeypress.js.map +1 -0
  1547. package/dist/src/ui/hooks/useKeypress.test.d.ts +6 -0
  1548. package/dist/src/ui/hooks/useKeypress.test.js +205 -0
  1549. package/dist/src/ui/hooks/useKeypress.test.js.map +1 -0
  1550. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +14 -0
  1551. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +19 -0
  1552. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
  1553. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +17 -0
  1554. package/dist/src/ui/hooks/useLoadingIndicator.js +48 -0
  1555. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
  1556. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +6 -0
  1557. package/dist/src/ui/hooks/useLoadingIndicator.test.js +145 -0
  1558. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
  1559. package/dist/src/ui/hooks/useLogger.d.ts +11 -0
  1560. package/dist/src/ui/hooks/useLogger.js +29 -0
  1561. package/dist/src/ui/hooks/useLogger.js.map +1 -0
  1562. package/dist/src/ui/hooks/useMemoryMonitor.d.ts +13 -0
  1563. package/dist/src/ui/hooks/useMemoryMonitor.js +28 -0
  1564. package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
  1565. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +6 -0
  1566. package/dist/src/ui/hooks/useMemoryMonitor.test.js +62 -0
  1567. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
  1568. package/dist/src/ui/hooks/useMessageQueue.d.ts +24 -0
  1569. package/dist/src/ui/hooks/useMessageQueue.js +61 -0
  1570. package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
  1571. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +6 -0
  1572. package/dist/src/ui/hooks/useMessageQueue.test.js +293 -0
  1573. package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
  1574. package/dist/src/ui/hooks/useModelCommand.d.ts +12 -0
  1575. package/dist/src/ui/hooks/useModelCommand.js +21 -0
  1576. package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
  1577. package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
  1578. package/dist/src/ui/hooks/useModelCommand.test.js +45 -0
  1579. package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
  1580. package/dist/src/ui/hooks/useMouse.d.ts +17 -0
  1581. package/dist/src/ui/hooks/useMouse.js +27 -0
  1582. package/dist/src/ui/hooks/useMouse.js.map +1 -0
  1583. package/dist/src/ui/hooks/useMouse.test.d.ts +6 -0
  1584. package/dist/src/ui/hooks/useMouse.test.js +57 -0
  1585. package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
  1586. package/dist/src/ui/hooks/useMouseClick.d.ts +12 -0
  1587. package/dist/src/ui/hooks/useMouseClick.js +28 -0
  1588. package/dist/src/ui/hooks/useMouseClick.js.map +1 -0
  1589. package/dist/src/ui/hooks/useMouseClick.test.d.ts +6 -0
  1590. package/dist/src/ui/hooks/useMouseClick.test.js +59 -0
  1591. package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -0
  1592. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
  1593. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +115 -0
  1594. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
  1595. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
  1596. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +291 -0
  1597. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
  1598. package/dist/src/ui/hooks/usePhraseCycler.d.ts +16 -0
  1599. package/dist/src/ui/hooks/usePhraseCycler.js +81 -0
  1600. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
  1601. package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +6 -0
  1602. package/dist/src/ui/hooks/usePhraseCycler.test.js +208 -0
  1603. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -0
  1604. package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
  1605. package/dist/src/ui/hooks/usePrivacySettings.js +103 -0
  1606. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
  1607. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +6 -0
  1608. package/dist/src/ui/hooks/usePrivacySettings.test.js +104 -0
  1609. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -0
  1610. package/dist/src/ui/hooks/usePromptCompletion.d.ts +23 -0
  1611. package/dist/src/ui/hooks/usePromptCompletion.js +169 -0
  1612. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -0
  1613. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +21 -0
  1614. package/dist/src/ui/hooks/useQuotaAndFallback.js +152 -0
  1615. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
  1616. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +6 -0
  1617. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +461 -0
  1618. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
  1619. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +43 -0
  1620. package/dist/src/ui/hooks/useReactToolScheduler.js +98 -0
  1621. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
  1622. package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +6 -0
  1623. package/dist/src/ui/hooks/useReactToolScheduler.test.js +58 -0
  1624. package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -0
  1625. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
  1626. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
  1627. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
  1628. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
  1629. package/dist/src/ui/hooks/useReverseSearchCompletion.js +103 -0
  1630. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
  1631. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +6 -0
  1632. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +169 -0
  1633. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
  1634. package/dist/src/ui/hooks/useRewind.d.ts +14 -0
  1635. package/dist/src/ui/hooks/useRewind.js +31 -0
  1636. package/dist/src/ui/hooks/useRewind.js.map +1 -0
  1637. package/dist/src/ui/hooks/useRewind.test.d.ts +6 -0
  1638. package/dist/src/ui/hooks/useRewind.test.js +100 -0
  1639. package/dist/src/ui/hooks/useRewind.test.js.map +1 -0
  1640. package/dist/src/ui/hooks/useSelectionList.d.ts +35 -0
  1641. package/dist/src/ui/hooks/useSelectionList.js +297 -0
  1642. package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
  1643. package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
  1644. package/dist/src/ui/hooks/useSelectionList.test.js +848 -0
  1645. package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
  1646. package/dist/src/ui/hooks/useSessionBrowser.d.ts +35 -0
  1647. package/dist/src/ui/hooks/useSessionBrowser.js +224 -0
  1648. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -0
  1649. package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +6 -0
  1650. package/dist/src/ui/hooks/useSessionBrowser.test.js +203 -0
  1651. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -0
  1652. package/dist/src/ui/hooks/useSessionResume.d.ts +30 -0
  1653. package/dist/src/ui/hooks/useSessionResume.js +57 -0
  1654. package/dist/src/ui/hooks/useSessionResume.js.map +1 -0
  1655. package/dist/src/ui/hooks/useSessionResume.test.d.ts +6 -0
  1656. package/dist/src/ui/hooks/useSessionResume.test.js +326 -0
  1657. package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -0
  1658. package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
  1659. package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
  1660. package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
  1661. package/dist/src/ui/hooks/useShellHistory.d.ts +14 -0
  1662. package/dist/src/ui/hooks/useShellHistory.js +113 -0
  1663. package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
  1664. package/dist/src/ui/hooks/useShellHistory.test.d.ts +6 -0
  1665. package/dist/src/ui/hooks/useShellHistory.test.js +223 -0
  1666. package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
  1667. package/dist/src/ui/hooks/useShellInactivityStatus.d.ts +26 -0
  1668. package/dist/src/ui/hooks/useShellInactivityStatus.js +46 -0
  1669. package/dist/src/ui/hooks/useShellInactivityStatus.js.map +1 -0
  1670. package/dist/src/ui/hooks/useShellInactivityStatus.test.d.ts +6 -0
  1671. package/dist/src/ui/hooks/useShellInactivityStatus.test.js +84 -0
  1672. package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +1 -0
  1673. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
  1674. package/dist/src/ui/hooks/useShowMemoryCommand.js +59 -0
  1675. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
  1676. package/dist/src/ui/hooks/useSlashCompletion.d.ts +23 -0
  1677. package/dist/src/ui/hooks/useSlashCompletion.js +397 -0
  1678. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
  1679. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +9 -0
  1680. package/dist/src/ui/hooks/useSlashCompletion.test.js +845 -0
  1681. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
  1682. package/dist/src/ui/hooks/useSnowfall.d.ts +6 -0
  1683. package/dist/src/ui/hooks/useSnowfall.js +126 -0
  1684. package/dist/src/ui/hooks/useSnowfall.js.map +1 -0
  1685. package/dist/src/ui/hooks/useSnowfall.test.d.ts +6 -0
  1686. package/dist/src/ui/hooks/useSnowfall.test.js +88 -0
  1687. package/dist/src/ui/hooks/useSnowfall.test.js.map +1 -0
  1688. package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
  1689. package/dist/src/ui/hooks/useStateAndRef.js +26 -0
  1690. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
  1691. package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
  1692. package/dist/src/ui/hooks/useTerminalSize.js +26 -0
  1693. package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
  1694. package/dist/src/ui/hooks/useThemeCommand.d.ts +16 -0
  1695. package/dist/src/ui/hooks/useThemeCommand.js +74 -0
  1696. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
  1697. package/dist/src/ui/hooks/useTimer.d.ts +12 -0
  1698. package/dist/src/ui/hooks/useTimer.js +58 -0
  1699. package/dist/src/ui/hooks/useTimer.js.map +1 -0
  1700. package/dist/src/ui/hooks/useTimer.test.d.ts +6 -0
  1701. package/dist/src/ui/hooks/useTimer.test.js +119 -0
  1702. package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
  1703. package/dist/src/ui/hooks/useTips.d.ts +10 -0
  1704. package/dist/src/ui/hooks/useTips.js +18 -0
  1705. package/dist/src/ui/hooks/useTips.js.map +1 -0
  1706. package/dist/src/ui/hooks/useTips.test.d.ts +6 -0
  1707. package/dist/src/ui/hooks/useTips.test.js +33 -0
  1708. package/dist/src/ui/hooks/useTips.test.js.map +1 -0
  1709. package/dist/src/ui/hooks/useToolExecutionScheduler.d.ts +30 -0
  1710. package/dist/src/ui/hooks/useToolExecutionScheduler.js +113 -0
  1711. package/dist/src/ui/hooks/useToolExecutionScheduler.js.map +1 -0
  1712. package/dist/src/ui/hooks/useToolExecutionScheduler.test.d.ts +6 -0
  1713. package/dist/src/ui/hooks/useToolExecutionScheduler.test.js +296 -0
  1714. package/dist/src/ui/hooks/useToolExecutionScheduler.test.js.map +1 -0
  1715. package/dist/src/ui/hooks/useToolScheduler.d.ts +29 -0
  1716. package/dist/src/ui/hooks/useToolScheduler.js +30 -0
  1717. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -0
  1718. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +6 -0
  1719. package/dist/src/ui/hooks/useToolScheduler.test.js +881 -0
  1720. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
  1721. package/dist/src/ui/hooks/useToolSchedulerFacade.test.d.ts +6 -0
  1722. package/dist/src/ui/hooks/useToolSchedulerFacade.test.js +45 -0
  1723. package/dist/src/ui/hooks/useToolSchedulerFacade.test.js.map +1 -0
  1724. package/dist/src/ui/hooks/useTurnActivityMonitor.d.ts +16 -0
  1725. package/dist/src/ui/hooks/useTurnActivityMonitor.js +49 -0
  1726. package/dist/src/ui/hooks/useTurnActivityMonitor.js.map +1 -0
  1727. package/dist/src/ui/hooks/useTurnActivityMonitor.test.d.ts +6 -0
  1728. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +97 -0
  1729. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +1 -0
  1730. package/dist/src/ui/hooks/vim.d.ts +28 -0
  1731. package/dist/src/ui/hooks/vim.js +642 -0
  1732. package/dist/src/ui/hooks/vim.js.map +1 -0
  1733. package/dist/src/ui/hooks/vim.test.d.ts +6 -0
  1734. package/dist/src/ui/hooks/vim.test.js +1278 -0
  1735. package/dist/src/ui/hooks/vim.test.js.map +1 -0
  1736. package/dist/src/ui/keyMatchers.d.ts +27 -0
  1737. package/dist/src/ui/keyMatchers.js +45 -0
  1738. package/dist/src/ui/keyMatchers.js.map +1 -0
  1739. package/dist/src/ui/keyMatchers.test.d.ts +6 -0
  1740. package/dist/src/ui/keyMatchers.test.js +383 -0
  1741. package/dist/src/ui/keyMatchers.test.js.map +1 -0
  1742. package/dist/src/ui/layouts/DefaultAppLayout.d.ts +7 -0
  1743. package/dist/src/ui/layouts/DefaultAppLayout.js +24 -0
  1744. package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
  1745. package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
  1746. package/dist/src/ui/layouts/ScreenReaderAppLayout.js +17 -0
  1747. package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
  1748. package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
  1749. package/dist/src/ui/noninteractive/nonInteractiveUi.js +30 -0
  1750. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
  1751. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
  1752. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +42 -0
  1753. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
  1754. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +6 -0
  1755. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +121 -0
  1756. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -0
  1757. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
  1758. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +18 -0
  1759. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
  1760. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +6 -0
  1761. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +34 -0
  1762. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -0
  1763. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
  1764. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +18 -0
  1765. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
  1766. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +6 -0
  1767. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +34 -0
  1768. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -0
  1769. package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
  1770. package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
  1771. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
  1772. package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +6 -0
  1773. package/dist/src/ui/privacy/PrivacyNotice.test.js +62 -0
  1774. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -0
  1775. package/dist/src/ui/semantic-colors.d.ts +7 -0
  1776. package/dist/src/ui/semantic-colors.js +24 -0
  1777. package/dist/src/ui/semantic-colors.js.map +1 -0
  1778. package/dist/src/ui/state/extensions.d.ts +67 -0
  1779. package/dist/src/ui/state/extensions.js +97 -0
  1780. package/dist/src/ui/state/extensions.js.map +1 -0
  1781. package/dist/src/ui/state/extensions.test.d.ts +6 -0
  1782. package/dist/src/ui/state/extensions.test.js +219 -0
  1783. package/dist/src/ui/state/extensions.test.js.map +1 -0
  1784. package/dist/src/ui/textConstants.d.ts +13 -0
  1785. package/dist/src/ui/textConstants.js +14 -0
  1786. package/dist/src/ui/textConstants.js.map +1 -0
  1787. package/dist/src/ui/themes/ansi-light.d.ts +7 -0
  1788. package/dist/src/ui/themes/ansi-light.js +143 -0
  1789. package/dist/src/ui/themes/ansi-light.js.map +1 -0
  1790. package/dist/src/ui/themes/ansi.d.ts +7 -0
  1791. package/dist/src/ui/themes/ansi.js +153 -0
  1792. package/dist/src/ui/themes/ansi.js.map +1 -0
  1793. package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
  1794. package/dist/src/ui/themes/atom-one-dark.js +140 -0
  1795. package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
  1796. package/dist/src/ui/themes/ayu-light.d.ts +7 -0
  1797. package/dist/src/ui/themes/ayu-light.js +132 -0
  1798. package/dist/src/ui/themes/ayu-light.js.map +1 -0
  1799. package/dist/src/ui/themes/ayu.d.ts +7 -0
  1800. package/dist/src/ui/themes/ayu.js +106 -0
  1801. package/dist/src/ui/themes/ayu.js.map +1 -0
  1802. package/dist/src/ui/themes/color-utils.d.ts +23 -0
  1803. package/dist/src/ui/themes/color-utils.js +250 -0
  1804. package/dist/src/ui/themes/color-utils.js.map +1 -0
  1805. package/dist/src/ui/themes/color-utils.test.d.ts +6 -0
  1806. package/dist/src/ui/themes/color-utils.test.js +245 -0
  1807. package/dist/src/ui/themes/color-utils.test.js.map +1 -0
  1808. package/dist/src/ui/themes/default-light.d.ts +7 -0
  1809. package/dist/src/ui/themes/default-light.js +100 -0
  1810. package/dist/src/ui/themes/default-light.js.map +1 -0
  1811. package/dist/src/ui/themes/default.d.ts +7 -0
  1812. package/dist/src/ui/themes/default.js +143 -0
  1813. package/dist/src/ui/themes/default.js.map +1 -0
  1814. package/dist/src/ui/themes/dracula.d.ts +7 -0
  1815. package/dist/src/ui/themes/dracula.js +117 -0
  1816. package/dist/src/ui/themes/dracula.js.map +1 -0
  1817. package/dist/src/ui/themes/github-dark.d.ts +7 -0
  1818. package/dist/src/ui/themes/github-dark.js +140 -0
  1819. package/dist/src/ui/themes/github-dark.js.map +1 -0
  1820. package/dist/src/ui/themes/github-light.d.ts +7 -0
  1821. package/dist/src/ui/themes/github-light.js +142 -0
  1822. package/dist/src/ui/themes/github-light.js.map +1 -0
  1823. package/dist/src/ui/themes/googlecode.d.ts +7 -0
  1824. package/dist/src/ui/themes/googlecode.js +139 -0
  1825. package/dist/src/ui/themes/googlecode.js.map +1 -0
  1826. package/dist/src/ui/themes/holiday.d.ts +7 -0
  1827. package/dist/src/ui/themes/holiday.js +162 -0
  1828. package/dist/src/ui/themes/holiday.js.map +1 -0
  1829. package/dist/src/ui/themes/no-color.d.ts +7 -0
  1830. package/dist/src/ui/themes/no-color.js +118 -0
  1831. package/dist/src/ui/themes/no-color.js.map +1 -0
  1832. package/dist/src/ui/themes/semantic-tokens.d.ts +39 -0
  1833. package/dist/src/ui/themes/semantic-tokens.js +100 -0
  1834. package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
  1835. package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
  1836. package/dist/src/ui/themes/shades-of-purple.js +306 -0
  1837. package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
  1838. package/dist/src/ui/themes/theme-manager.d.ts +71 -0
  1839. package/dist/src/ui/themes/theme-manager.js +271 -0
  1840. package/dist/src/ui/themes/theme-manager.js.map +1 -0
  1841. package/dist/src/ui/themes/theme-manager.test.d.ts +6 -0
  1842. package/dist/src/ui/themes/theme-manager.test.js +150 -0
  1843. package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
  1844. package/dist/src/ui/themes/theme.d.ts +145 -0
  1845. package/dist/src/ui/themes/theme.js +420 -0
  1846. package/dist/src/ui/themes/theme.js.map +1 -0
  1847. package/dist/src/ui/themes/theme.test.d.ts +6 -0
  1848. package/dist/src/ui/themes/theme.test.js +174 -0
  1849. package/dist/src/ui/themes/theme.test.js.map +1 -0
  1850. package/dist/src/ui/themes/xcode.d.ts +7 -0
  1851. package/dist/src/ui/themes/xcode.js +147 -0
  1852. package/dist/src/ui/themes/xcode.js.map +1 -0
  1853. package/dist/src/ui/types.d.ts +335 -0
  1854. package/dist/src/ui/types.js +70 -0
  1855. package/dist/src/ui/types.js.map +1 -0
  1856. package/dist/src/ui/utils/CodeColorizer.d.ts +25 -0
  1857. package/dist/src/ui/utils/CodeColorizer.js +123 -0
  1858. package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
  1859. package/dist/src/ui/utils/CodeColorizer.test.d.ts +6 -0
  1860. package/dist/src/ui/utils/CodeColorizer.test.js +38 -0
  1861. package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -0
  1862. package/dist/src/ui/utils/ConsolePatcher.d.ts +25 -0
  1863. package/dist/src/ui/utils/ConsolePatcher.js +50 -0
  1864. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
  1865. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +17 -0
  1866. package/dist/src/ui/utils/InlineMarkdownRenderer.js +113 -0
  1867. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
  1868. package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +6 -0
  1869. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +21 -0
  1870. package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +1 -0
  1871. package/dist/src/ui/utils/MarkdownDisplay.d.ts +15 -0
  1872. package/dist/src/ui/utils/MarkdownDisplay.js +242 -0
  1873. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
  1874. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
  1875. package/dist/src/ui/utils/MarkdownDisplay.test.js +159 -0
  1876. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
  1877. package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
  1878. package/dist/src/ui/utils/TableRenderer.js +84 -0
  1879. package/dist/src/ui/utils/TableRenderer.js.map +1 -0
  1880. package/dist/src/ui/utils/clipboardUtils.d.ts +47 -0
  1881. package/dist/src/ui/utils/clipboardUtils.js +432 -0
  1882. package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
  1883. package/dist/src/ui/utils/clipboardUtils.test.d.ts +6 -0
  1884. package/dist/src/ui/utils/clipboardUtils.test.js +354 -0
  1885. package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
  1886. package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +6 -0
  1887. package/dist/src/ui/utils/clipboardUtils.windows.test.js +52 -0
  1888. package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +1 -0
  1889. package/dist/src/ui/utils/commandUtils.d.ts +36 -0
  1890. package/dist/src/ui/utils/commandUtils.js +245 -0
  1891. package/dist/src/ui/utils/commandUtils.js.map +1 -0
  1892. package/dist/src/ui/utils/commandUtils.test.d.ts +6 -0
  1893. package/dist/src/ui/utils/commandUtils.test.js +479 -0
  1894. package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
  1895. package/dist/src/ui/utils/computeStats.d.ts +10 -0
  1896. package/dist/src/ui/utils/computeStats.js +62 -0
  1897. package/dist/src/ui/utils/computeStats.js.map +1 -0
  1898. package/dist/src/ui/utils/computeStats.test.d.ts +6 -0
  1899. package/dist/src/ui/utils/computeStats.test.js +271 -0
  1900. package/dist/src/ui/utils/computeStats.test.js.map +1 -0
  1901. package/dist/src/ui/utils/directoryUtils.d.ts +24 -0
  1902. package/dist/src/ui/utils/directoryUtils.js +125 -0
  1903. package/dist/src/ui/utils/directoryUtils.js.map +1 -0
  1904. package/dist/src/ui/utils/directoryUtils.test.d.ts +6 -0
  1905. package/dist/src/ui/utils/directoryUtils.test.js +244 -0
  1906. package/dist/src/ui/utils/directoryUtils.test.js.map +1 -0
  1907. package/dist/src/ui/utils/displayUtils.d.ts +18 -0
  1908. package/dist/src/ui/utils/displayUtils.js +27 -0
  1909. package/dist/src/ui/utils/displayUtils.js.map +1 -0
  1910. package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
  1911. package/dist/src/ui/utils/displayUtils.test.js +61 -0
  1912. package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
  1913. package/dist/src/ui/utils/formatters.d.ts +22 -0
  1914. package/dist/src/ui/utils/formatters.js +81 -0
  1915. package/dist/src/ui/utils/formatters.js.map +1 -0
  1916. package/dist/src/ui/utils/formatters.test.d.ts +6 -0
  1917. package/dist/src/ui/utils/formatters.test.js +124 -0
  1918. package/dist/src/ui/utils/formatters.test.js.map +1 -0
  1919. package/dist/src/ui/utils/highlight.d.ts +12 -0
  1920. package/dist/src/ui/utils/highlight.js +115 -0
  1921. package/dist/src/ui/utils/highlight.js.map +1 -0
  1922. package/dist/src/ui/utils/highlight.test.d.ts +6 -0
  1923. package/dist/src/ui/utils/highlight.test.js +198 -0
  1924. package/dist/src/ui/utils/highlight.test.js.map +1 -0
  1925. package/dist/src/ui/utils/historyExportUtils.d.ts +21 -0
  1926. package/dist/src/ui/utils/historyExportUtils.js +59 -0
  1927. package/dist/src/ui/utils/historyExportUtils.js.map +1 -0
  1928. package/dist/src/ui/utils/input.d.ts +17 -0
  1929. package/dist/src/ui/utils/input.js +51 -0
  1930. package/dist/src/ui/utils/input.js.map +1 -0
  1931. package/dist/src/ui/utils/input.test.d.ts +6 -0
  1932. package/dist/src/ui/utils/input.test.js +44 -0
  1933. package/dist/src/ui/utils/input.test.js.map +1 -0
  1934. package/dist/src/ui/utils/isNarrowWidth.d.ts +6 -0
  1935. package/dist/src/ui/utils/isNarrowWidth.js +9 -0
  1936. package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
  1937. package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
  1938. package/dist/src/ui/utils/markdownUtilities.js +110 -0
  1939. package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
  1940. package/dist/src/ui/utils/markdownUtilities.test.d.ts +6 -0
  1941. package/dist/src/ui/utils/markdownUtilities.test.js +42 -0
  1942. package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
  1943. package/dist/src/ui/utils/mouse.d.ts +32 -0
  1944. package/dist/src/ui/utils/mouse.js +181 -0
  1945. package/dist/src/ui/utils/mouse.js.map +1 -0
  1946. package/dist/src/ui/utils/mouse.test.d.ts +6 -0
  1947. package/dist/src/ui/utils/mouse.test.js +136 -0
  1948. package/dist/src/ui/utils/mouse.test.js.map +1 -0
  1949. package/dist/src/ui/utils/rewindFileOps.d.ts +47 -0
  1950. package/dist/src/ui/utils/rewindFileOps.js +190 -0
  1951. package/dist/src/ui/utils/rewindFileOps.js.map +1 -0
  1952. package/dist/src/ui/utils/rewindFileOps.test.d.ts +6 -0
  1953. package/dist/src/ui/utils/rewindFileOps.test.js +375 -0
  1954. package/dist/src/ui/utils/rewindFileOps.test.js.map +1 -0
  1955. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +41 -0
  1956. package/dist/src/ui/utils/terminalCapabilityManager.js +209 -0
  1957. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -0
  1958. package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +6 -0
  1959. package/dist/src/ui/utils/terminalCapabilityManager.test.js +221 -0
  1960. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +1 -0
  1961. package/dist/src/ui/utils/terminalSetup.d.ts +34 -0
  1962. package/dist/src/ui/utils/terminalSetup.js +305 -0
  1963. package/dist/src/ui/utils/terminalSetup.js.map +1 -0
  1964. package/dist/src/ui/utils/terminalSetup.test.d.ts +6 -0
  1965. package/dist/src/ui/utils/terminalSetup.test.js +145 -0
  1966. package/dist/src/ui/utils/terminalSetup.test.js.map +1 -0
  1967. package/dist/src/ui/utils/textOutput.d.ts +27 -0
  1968. package/dist/src/ui/utils/textOutput.js +53 -0
  1969. package/dist/src/ui/utils/textOutput.js.map +1 -0
  1970. package/dist/src/ui/utils/textOutput.test.d.ts +6 -0
  1971. package/dist/src/ui/utils/textOutput.test.js +79 -0
  1972. package/dist/src/ui/utils/textOutput.test.js.map +1 -0
  1973. package/dist/src/ui/utils/textUtils.d.ts +47 -0
  1974. package/dist/src/ui/utils/textUtils.js +213 -0
  1975. package/dist/src/ui/utils/textUtils.js.map +1 -0
  1976. package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
  1977. package/dist/src/ui/utils/textUtils.test.js +168 -0
  1978. package/dist/src/ui/utils/textUtils.test.js.map +1 -0
  1979. package/dist/src/ui/utils/ui-sizing.d.ts +7 -0
  1980. package/dist/src/ui/utils/ui-sizing.js +30 -0
  1981. package/dist/src/ui/utils/ui-sizing.js.map +1 -0
  1982. package/dist/src/ui/utils/ui-sizing.test.d.ts +6 -0
  1983. package/dist/src/ui/utils/ui-sizing.test.js +56 -0
  1984. package/dist/src/ui/utils/ui-sizing.test.js.map +1 -0
  1985. package/dist/src/ui/utils/updateCheck.d.ts +19 -0
  1986. package/dist/src/ui/utils/updateCheck.js +86 -0
  1987. package/dist/src/ui/utils/updateCheck.js.map +1 -0
  1988. package/dist/src/ui/utils/updateCheck.test.d.ts +6 -0
  1989. package/dist/src/ui/utils/updateCheck.test.js +134 -0
  1990. package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
  1991. package/dist/src/utils/activityLogger.d.ts +47 -0
  1992. package/dist/src/utils/activityLogger.js +297 -0
  1993. package/dist/src/utils/activityLogger.js.map +1 -0
  1994. package/dist/src/utils/agentSettings.d.ts +31 -0
  1995. package/dist/src/utils/agentSettings.js +102 -0
  1996. package/dist/src/utils/agentSettings.js.map +1 -0
  1997. package/dist/src/utils/agentUtils.d.ts +15 -0
  1998. package/dist/src/utils/agentUtils.js +50 -0
  1999. package/dist/src/utils/agentUtils.js.map +1 -0
  2000. package/dist/src/utils/agentUtils.test.d.ts +6 -0
  2001. package/dist/src/utils/agentUtils.test.js +121 -0
  2002. package/dist/src/utils/agentUtils.test.js.map +1 -0
  2003. package/dist/src/utils/checks.d.ts +19 -0
  2004. package/dist/src/utils/checks.js +24 -0
  2005. package/dist/src/utils/checks.js.map +1 -0
  2006. package/dist/src/utils/checks.test.d.ts +6 -0
  2007. package/dist/src/utils/checks.test.js +29 -0
  2008. package/dist/src/utils/checks.test.js.map +1 -0
  2009. package/dist/src/utils/cleanup.d.ts +21 -0
  2010. package/dist/src/utils/cleanup.js +101 -0
  2011. package/dist/src/utils/cleanup.js.map +1 -0
  2012. package/dist/src/utils/cleanup.test.d.ts +6 -0
  2013. package/dist/src/utils/cleanup.test.js +92 -0
  2014. package/dist/src/utils/cleanup.test.js.map +1 -0
  2015. package/dist/src/utils/commands.d.ts +20 -0
  2016. package/dist/src/utils/commands.js +53 -0
  2017. package/dist/src/utils/commands.js.map +1 -0
  2018. package/dist/src/utils/commands.test.d.ts +6 -0
  2019. package/dist/src/utils/commands.test.js +115 -0
  2020. package/dist/src/utils/commands.test.js.map +1 -0
  2021. package/dist/src/utils/commentJson.d.ts +9 -0
  2022. package/dist/src/utils/commentJson.js +130 -0
  2023. package/dist/src/utils/commentJson.js.map +1 -0
  2024. package/dist/src/utils/commentJson.test.d.ts +6 -0
  2025. package/dist/src/utils/commentJson.test.js +308 -0
  2026. package/dist/src/utils/commentJson.test.js.map +1 -0
  2027. package/dist/src/utils/deepMerge.d.ts +9 -0
  2028. package/dist/src/utils/deepMerge.js +63 -0
  2029. package/dist/src/utils/deepMerge.js.map +1 -0
  2030. package/dist/src/utils/deepMerge.test.d.ts +6 -0
  2031. package/dist/src/utils/deepMerge.test.js +201 -0
  2032. package/dist/src/utils/deepMerge.test.js.map +1 -0
  2033. package/dist/src/utils/dialogScopeUtils.d.ts +25 -0
  2034. package/dist/src/utils/dialogScopeUtils.js +50 -0
  2035. package/dist/src/utils/dialogScopeUtils.js.map +1 -0
  2036. package/dist/src/utils/dialogScopeUtils.test.d.ts +6 -0
  2037. package/dist/src/utils/dialogScopeUtils.test.js +81 -0
  2038. package/dist/src/utils/dialogScopeUtils.test.js.map +1 -0
  2039. package/dist/src/utils/envVarResolver.d.ts +39 -0
  2040. package/dist/src/utils/envVarResolver.js +100 -0
  2041. package/dist/src/utils/envVarResolver.js.map +1 -0
  2042. package/dist/src/utils/envVarResolver.test.d.ts +6 -0
  2043. package/dist/src/utils/envVarResolver.test.js +221 -0
  2044. package/dist/src/utils/envVarResolver.test.js.map +1 -0
  2045. package/dist/src/utils/errors.d.ts +33 -0
  2046. package/dist/src/utils/errors.js +185 -0
  2047. package/dist/src/utils/errors.js.map +1 -0
  2048. package/dist/src/utils/errors.test.d.ts +6 -0
  2049. package/dist/src/utils/errors.test.js +435 -0
  2050. package/dist/src/utils/errors.test.js.map +1 -0
  2051. package/dist/src/utils/events.d.ts +19 -0
  2052. package/dist/src/utils/events.js +15 -0
  2053. package/dist/src/utils/events.js.map +1 -0
  2054. package/dist/src/utils/events.test.d.ts +6 -0
  2055. package/dist/src/utils/events.test.js +24 -0
  2056. package/dist/src/utils/events.test.js.map +1 -0
  2057. package/dist/src/utils/gitUtils.d.ts +30 -0
  2058. package/dist/src/utils/gitUtils.js +90 -0
  2059. package/dist/src/utils/gitUtils.js.map +1 -0
  2060. package/dist/src/utils/gitUtils.test.d.ts +6 -0
  2061. package/dist/src/utils/gitUtils.test.js +113 -0
  2062. package/dist/src/utils/gitUtils.test.js.map +1 -0
  2063. package/dist/src/utils/handleAutoUpdate.d.ts +11 -0
  2064. package/dist/src/utils/handleAutoUpdate.js +113 -0
  2065. package/dist/src/utils/handleAutoUpdate.js.map +1 -0
  2066. package/dist/src/utils/handleAutoUpdate.test.d.ts +6 -0
  2067. package/dist/src/utils/handleAutoUpdate.test.js +310 -0
  2068. package/dist/src/utils/handleAutoUpdate.test.js.map +1 -0
  2069. package/dist/src/utils/installationInfo.d.ts +24 -0
  2070. package/dist/src/utils/installationInfo.js +161 -0
  2071. package/dist/src/utils/installationInfo.js.map +1 -0
  2072. package/dist/src/utils/installationInfo.test.d.ts +6 -0
  2073. package/dist/src/utils/installationInfo.test.js +296 -0
  2074. package/dist/src/utils/installationInfo.test.js.map +1 -0
  2075. package/dist/src/utils/math.d.ts +13 -0
  2076. package/dist/src/utils/math.js +14 -0
  2077. package/dist/src/utils/math.js.map +1 -0
  2078. package/dist/src/utils/math.test.d.ts +6 -0
  2079. package/dist/src/utils/math.test.js +23 -0
  2080. package/dist/src/utils/math.test.js.map +1 -0
  2081. package/dist/src/utils/persistentState.d.ts +21 -0
  2082. package/dist/src/utils/persistentState.js +65 -0
  2083. package/dist/src/utils/persistentState.js.map +1 -0
  2084. package/dist/src/utils/persistentState.test.d.ts +6 -0
  2085. package/dist/src/utils/persistentState.test.js +68 -0
  2086. package/dist/src/utils/persistentState.test.js.map +1 -0
  2087. package/dist/src/utils/processUtils.d.ts +13 -0
  2088. package/dist/src/utils/processUtils.js +18 -0
  2089. package/dist/src/utils/processUtils.js.map +1 -0
  2090. package/dist/src/utils/processUtils.test.d.ts +6 -0
  2091. package/dist/src/utils/processUtils.test.js +20 -0
  2092. package/dist/src/utils/processUtils.test.js.map +1 -0
  2093. package/dist/src/utils/readStdin.d.ts +6 -0
  2094. package/dist/src/utils/readStdin.js +68 -0
  2095. package/dist/src/utils/readStdin.js.map +1 -0
  2096. package/dist/src/utils/readStdin.test.d.ts +6 -0
  2097. package/dist/src/utils/readStdin.test.js +117 -0
  2098. package/dist/src/utils/readStdin.test.js.map +1 -0
  2099. package/dist/src/utils/readStdin_safety.test.d.ts +6 -0
  2100. package/dist/src/utils/readStdin_safety.test.js +68 -0
  2101. package/dist/src/utils/readStdin_safety.test.js.map +1 -0
  2102. package/dist/src/utils/relaunch.d.ts +8 -0
  2103. package/dist/src/utils/relaunch.js +62 -0
  2104. package/dist/src/utils/relaunch.js.map +1 -0
  2105. package/dist/src/utils/relaunch.test.d.ts +6 -0
  2106. package/dist/src/utils/relaunch.test.js +279 -0
  2107. package/dist/src/utils/relaunch.test.js.map +1 -0
  2108. package/dist/src/utils/resolvePath.d.ts +6 -0
  2109. package/dist/src/utils/resolvePath.js +21 -0
  2110. package/dist/src/utils/resolvePath.js.map +1 -0
  2111. package/dist/src/utils/resolvePath.test.d.ts +6 -0
  2112. package/dist/src/utils/resolvePath.test.js +34 -0
  2113. package/dist/src/utils/resolvePath.test.js.map +1 -0
  2114. package/dist/src/utils/sandbox-macos-permissive-closed.sb +32 -0
  2115. package/dist/src/utils/sandbox-macos-permissive-open.sb +27 -0
  2116. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +37 -0
  2117. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +93 -0
  2118. package/dist/src/utils/sandbox-macos-restrictive-open.sb +96 -0
  2119. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +98 -0
  2120. package/dist/src/utils/sandbox.d.ts +7 -0
  2121. package/dist/src/utils/sandbox.js +626 -0
  2122. package/dist/src/utils/sandbox.js.map +1 -0
  2123. package/dist/src/utils/sandbox.test.d.ts +6 -0
  2124. package/dist/src/utils/sandbox.test.js +314 -0
  2125. package/dist/src/utils/sandbox.test.js.map +1 -0
  2126. package/dist/src/utils/sandboxUtils.d.ts +14 -0
  2127. package/dist/src/utils/sandboxUtils.js +121 -0
  2128. package/dist/src/utils/sandboxUtils.js.map +1 -0
  2129. package/dist/src/utils/sandboxUtils.test.d.ts +6 -0
  2130. package/dist/src/utils/sandboxUtils.test.js +122 -0
  2131. package/dist/src/utils/sandboxUtils.test.js.map +1 -0
  2132. package/dist/src/utils/sessionCleanup.d.ts +22 -0
  2133. package/dist/src/utils/sessionCleanup.integration.test.d.ts +6 -0
  2134. package/dist/src/utils/sessionCleanup.integration.test.js +182 -0
  2135. package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -0
  2136. package/dist/src/utils/sessionCleanup.js +226 -0
  2137. package/dist/src/utils/sessionCleanup.js.map +1 -0
  2138. package/dist/src/utils/sessionCleanup.test.d.ts +6 -0
  2139. package/dist/src/utils/sessionCleanup.test.js +1298 -0
  2140. package/dist/src/utils/sessionCleanup.test.js.map +1 -0
  2141. package/dist/src/utils/sessionUtils.d.ts +170 -0
  2142. package/dist/src/utils/sessionUtils.js +334 -0
  2143. package/dist/src/utils/sessionUtils.js.map +1 -0
  2144. package/dist/src/utils/sessionUtils.test.d.ts +6 -0
  2145. package/dist/src/utils/sessionUtils.test.js +503 -0
  2146. package/dist/src/utils/sessionUtils.test.js.map +1 -0
  2147. package/dist/src/utils/sessions.d.ts +8 -0
  2148. package/dist/src/utils/sessions.js +69 -0
  2149. package/dist/src/utils/sessions.js.map +1 -0
  2150. package/dist/src/utils/sessions.test.d.ts +6 -0
  2151. package/dist/src/utils/sessions.test.js +581 -0
  2152. package/dist/src/utils/sessions.test.js.map +1 -0
  2153. package/dist/src/utils/settingsUtils.d.ts +151 -0
  2154. package/dist/src/utils/settingsUtils.js +352 -0
  2155. package/dist/src/utils/settingsUtils.js.map +1 -0
  2156. package/dist/src/utils/settingsUtils.test.d.ts +6 -0
  2157. package/dist/src/utils/settingsUtils.test.js +808 -0
  2158. package/dist/src/utils/settingsUtils.test.js.map +1 -0
  2159. package/dist/src/utils/skillSettings.d.ts +33 -0
  2160. package/dist/src/utils/skillSettings.js +101 -0
  2161. package/dist/src/utils/skillSettings.js.map +1 -0
  2162. package/dist/src/utils/skillUtils.d.ts +30 -0
  2163. package/dist/src/utils/skillUtils.js +146 -0
  2164. package/dist/src/utils/skillUtils.js.map +1 -0
  2165. package/dist/src/utils/skillUtils.test.d.ts +6 -0
  2166. package/dist/src/utils/skillUtils.test.js +70 -0
  2167. package/dist/src/utils/skillUtils.test.js.map +1 -0
  2168. package/dist/src/utils/spawnWrapper.d.ts +7 -0
  2169. package/dist/src/utils/spawnWrapper.js +8 -0
  2170. package/dist/src/utils/spawnWrapper.js.map +1 -0
  2171. package/dist/src/utils/startupWarnings.d.ts +6 -0
  2172. package/dist/src/utils/startupWarnings.js +40 -0
  2173. package/dist/src/utils/startupWarnings.js.map +1 -0
  2174. package/dist/src/utils/startupWarnings.test.d.ts +6 -0
  2175. package/dist/src/utils/startupWarnings.test.js +61 -0
  2176. package/dist/src/utils/startupWarnings.test.js.map +1 -0
  2177. package/dist/src/utils/terminalTheme.d.ts +15 -0
  2178. package/dist/src/utils/terminalTheme.js +50 -0
  2179. package/dist/src/utils/terminalTheme.js.map +1 -0
  2180. package/dist/src/utils/updateEventEmitter.d.ts +11 -0
  2181. package/dist/src/utils/updateEventEmitter.js +12 -0
  2182. package/dist/src/utils/updateEventEmitter.js.map +1 -0
  2183. package/dist/src/utils/updateEventEmitter.test.d.ts +6 -0
  2184. package/dist/src/utils/updateEventEmitter.test.js +18 -0
  2185. package/dist/src/utils/updateEventEmitter.test.js.map +1 -0
  2186. package/dist/src/utils/userStartupWarnings.d.ts +7 -0
  2187. package/dist/src/utils/userStartupWarnings.js +64 -0
  2188. package/dist/src/utils/userStartupWarnings.js.map +1 -0
  2189. package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
  2190. package/dist/src/utils/userStartupWarnings.test.js +98 -0
  2191. package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
  2192. package/dist/src/utils/windowTitle.d.ts +22 -0
  2193. package/dist/src/utils/windowTitle.js +84 -0
  2194. package/dist/src/utils/windowTitle.js.map +1 -0
  2195. package/dist/src/utils/windowTitle.test.d.ts +6 -0
  2196. package/dist/src/utils/windowTitle.test.js +216 -0
  2197. package/dist/src/utils/windowTitle.test.js.map +1 -0
  2198. package/dist/src/validateNonInterActiveAuth.d.ts +9 -0
  2199. package/dist/src/validateNonInterActiveAuth.js +58 -0
  2200. package/dist/src/validateNonInterActiveAuth.js.map +1 -0
  2201. package/dist/src/validateNonInterActiveAuth.test.d.ts +6 -0
  2202. package/dist/src/validateNonInterActiveAuth.test.js +319 -0
  2203. package/dist/src/validateNonInterActiveAuth.test.js.map +1 -0
  2204. package/dist/src/zed-integration/fileSystemService.d.ts +19 -0
  2205. package/dist/src/zed-integration/fileSystemService.js +41 -0
  2206. package/dist/src/zed-integration/fileSystemService.js.map +1 -0
  2207. package/dist/src/zed-integration/fileSystemService.test.d.ts +6 -0
  2208. package/dist/src/zed-integration/fileSystemService.test.js +88 -0
  2209. package/dist/src/zed-integration/fileSystemService.test.js.map +1 -0
  2210. package/dist/src/zed-integration/zedIntegration.d.ts +39 -0
  2211. package/dist/src/zed-integration/zedIntegration.js +774 -0
  2212. package/dist/src/zed-integration/zedIntegration.js.map +1 -0
  2213. package/dist/src/zed-integration/zedIntegration.test.d.ts +6 -0
  2214. package/dist/src/zed-integration/zedIntegration.test.js +625 -0
  2215. package/dist/src/zed-integration/zedIntegration.test.js.map +1 -0
  2216. package/dist/tsconfig.tsbuildinfo +1 -0
  2217. package/package.json +95 -0
@@ -0,0 +1,2362 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
7
+ import stripAnsi from 'strip-ansi';
8
+ import { act } from 'react';
9
+ import { renderHook, renderHookWithProviders, } from '../../../test-utils/render.js';
10
+ import { useTextBuffer, offsetToLogicalPos, logicalPosToOffset, textBufferReducer, findWordEndInLine, findNextWordStartInLine, isWordCharStrict, calculateTransformationsForLine, calculateTransformedLine, getTransformUnderCursor, getTransformedImagePath, } from './text-buffer.js';
11
+ import { cpLen } from '../../utils/textUtils.js';
12
+ const defaultVisualLayout = {
13
+ visualLines: [''],
14
+ logicalToVisualMap: [[[0, 0]]],
15
+ visualToLogicalMap: [[0, 0]],
16
+ transformedToLogicalMaps: [[]],
17
+ visualToTransformedMap: [],
18
+ };
19
+ const initialState = {
20
+ lines: [''],
21
+ cursorRow: 0,
22
+ cursorCol: 0,
23
+ preferredCol: null,
24
+ undoStack: [],
25
+ redoStack: [],
26
+ clipboard: null,
27
+ selectionAnchor: null,
28
+ viewportWidth: 80,
29
+ viewportHeight: 24,
30
+ transformationsByLine: [[]],
31
+ visualLayout: defaultVisualLayout,
32
+ pastedContent: {},
33
+ };
34
+ /**
35
+ * Helper to create a TextBufferState with properly calculated transformations.
36
+ */
37
+ function createStateWithTransformations(partial) {
38
+ const state = { ...initialState, ...partial };
39
+ return {
40
+ ...state,
41
+ transformationsByLine: state.lines.map((l) => calculateTransformationsForLine(l)),
42
+ };
43
+ }
44
+ describe('textBufferReducer', () => {
45
+ afterEach(() => {
46
+ vi.restoreAllMocks();
47
+ });
48
+ it('should return the initial state if state is undefined', () => {
49
+ const action = { type: 'unknown_action' };
50
+ const state = textBufferReducer(initialState, action);
51
+ expect(state).toHaveOnlyValidCharacters();
52
+ expect(state).toEqual(initialState);
53
+ });
54
+ describe('set_text action', () => {
55
+ it('should set new text and move cursor to the end', () => {
56
+ const action = {
57
+ type: 'set_text',
58
+ payload: 'hello\nworld',
59
+ };
60
+ const state = textBufferReducer(initialState, action);
61
+ expect(state).toHaveOnlyValidCharacters();
62
+ expect(state.lines).toEqual(['hello', 'world']);
63
+ expect(state.cursorRow).toBe(1);
64
+ expect(state.cursorCol).toBe(5);
65
+ expect(state.undoStack.length).toBe(1);
66
+ });
67
+ it('should not create an undo snapshot if pushToUndo is false', () => {
68
+ const action = {
69
+ type: 'set_text',
70
+ payload: 'no undo',
71
+ pushToUndo: false,
72
+ };
73
+ const state = textBufferReducer(initialState, action);
74
+ expect(state).toHaveOnlyValidCharacters();
75
+ expect(state.lines).toEqual(['no undo']);
76
+ expect(state.undoStack.length).toBe(0);
77
+ });
78
+ });
79
+ describe('insert action', () => {
80
+ it('should insert a character', () => {
81
+ const action = { type: 'insert', payload: 'a' };
82
+ const state = textBufferReducer(initialState, action);
83
+ expect(state).toHaveOnlyValidCharacters();
84
+ expect(state.lines).toEqual(['a']);
85
+ expect(state.cursorCol).toBe(1);
86
+ });
87
+ it('should insert a newline', () => {
88
+ const stateWithText = { ...initialState, lines: ['hello'] };
89
+ const action = { type: 'insert', payload: '\n' };
90
+ const state = textBufferReducer(stateWithText, action);
91
+ expect(state).toHaveOnlyValidCharacters();
92
+ expect(state.lines).toEqual(['', 'hello']);
93
+ expect(state.cursorRow).toBe(1);
94
+ expect(state.cursorCol).toBe(0);
95
+ });
96
+ });
97
+ describe('insert action with options', () => {
98
+ it('should filter input using inputFilter option', () => {
99
+ const action = { type: 'insert', payload: 'a1b2c3' };
100
+ const options = {
101
+ inputFilter: (text) => text.replace(/[0-9]/g, ''),
102
+ };
103
+ const state = textBufferReducer(initialState, action, options);
104
+ expect(state.lines).toEqual(['abc']);
105
+ expect(state.cursorCol).toBe(3);
106
+ });
107
+ it('should strip newlines when singleLine option is true', () => {
108
+ const action = {
109
+ type: 'insert',
110
+ payload: 'hello\nworld',
111
+ };
112
+ const options = { singleLine: true };
113
+ const state = textBufferReducer(initialState, action, options);
114
+ expect(state.lines).toEqual(['helloworld']);
115
+ expect(state.cursorCol).toBe(10);
116
+ });
117
+ it('should apply both inputFilter and singleLine options', () => {
118
+ const action = {
119
+ type: 'insert',
120
+ payload: 'h\ne\nl\nl\no\n1\n2\n3',
121
+ };
122
+ const options = {
123
+ singleLine: true,
124
+ inputFilter: (text) => text.replace(/[0-9]/g, ''),
125
+ };
126
+ const state = textBufferReducer(initialState, action, options);
127
+ expect(state.lines).toEqual(['hello']);
128
+ expect(state.cursorCol).toBe(5);
129
+ });
130
+ });
131
+ describe('add_pasted_content action', () => {
132
+ it('should add content to pastedContent Record', () => {
133
+ const action = {
134
+ type: 'add_pasted_content',
135
+ payload: { id: '[Pasted Text: 6 lines]', text: 'large content' },
136
+ };
137
+ const state = textBufferReducer(initialState, action);
138
+ expect(state.pastedContent).toEqual({
139
+ '[Pasted Text: 6 lines]': 'large content',
140
+ });
141
+ });
142
+ });
143
+ describe('backspace action', () => {
144
+ it('should remove a character', () => {
145
+ const stateWithText = {
146
+ ...initialState,
147
+ lines: ['a'],
148
+ cursorRow: 0,
149
+ cursorCol: 1,
150
+ };
151
+ const action = { type: 'backspace' };
152
+ const state = textBufferReducer(stateWithText, action);
153
+ expect(state).toHaveOnlyValidCharacters();
154
+ expect(state.lines).toEqual(['']);
155
+ expect(state.cursorCol).toBe(0);
156
+ });
157
+ it('should join lines if at the beginning of a line', () => {
158
+ const stateWithText = {
159
+ ...initialState,
160
+ lines: ['hello', 'world'],
161
+ cursorRow: 1,
162
+ cursorCol: 0,
163
+ };
164
+ const action = { type: 'backspace' };
165
+ const state = textBufferReducer(stateWithText, action);
166
+ expect(state).toHaveOnlyValidCharacters();
167
+ expect(state.lines).toEqual(['helloworld']);
168
+ expect(state.cursorRow).toBe(0);
169
+ expect(state.cursorCol).toBe(5);
170
+ });
171
+ });
172
+ describe('atomic placeholder deletion', () => {
173
+ describe('paste placeholders', () => {
174
+ it('backspace at end of paste placeholder removes entire placeholder', () => {
175
+ const placeholder = '[Pasted Text: 6 lines]';
176
+ const stateWithPlaceholder = createStateWithTransformations({
177
+ lines: [placeholder],
178
+ cursorRow: 0,
179
+ cursorCol: placeholder.length, // cursor at end
180
+ pastedContent: {
181
+ [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
182
+ },
183
+ });
184
+ const action = { type: 'backspace' };
185
+ const state = textBufferReducer(stateWithPlaceholder, action);
186
+ expect(state).toHaveOnlyValidCharacters();
187
+ expect(state.lines).toEqual(['']);
188
+ expect(state.cursorCol).toBe(0);
189
+ // pastedContent should be cleaned up
190
+ expect(state.pastedContent[placeholder]).toBeUndefined();
191
+ });
192
+ it('delete at start of paste placeholder removes entire placeholder', () => {
193
+ const placeholder = '[Pasted Text: 6 lines]';
194
+ const stateWithPlaceholder = createStateWithTransformations({
195
+ lines: [placeholder],
196
+ cursorRow: 0,
197
+ cursorCol: 0, // cursor at start
198
+ pastedContent: {
199
+ [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
200
+ },
201
+ });
202
+ const action = { type: 'delete' };
203
+ const state = textBufferReducer(stateWithPlaceholder, action);
204
+ expect(state).toHaveOnlyValidCharacters();
205
+ expect(state.lines).toEqual(['']);
206
+ expect(state.cursorCol).toBe(0);
207
+ // pastedContent should be cleaned up
208
+ expect(state.pastedContent[placeholder]).toBeUndefined();
209
+ });
210
+ it('backspace inside paste placeholder does normal deletion', () => {
211
+ const placeholder = '[Pasted Text: 6 lines]';
212
+ const stateWithPlaceholder = createStateWithTransformations({
213
+ lines: [placeholder],
214
+ cursorRow: 0,
215
+ cursorCol: 10, // cursor in middle
216
+ pastedContent: {
217
+ [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
218
+ },
219
+ });
220
+ const action = { type: 'backspace' };
221
+ const state = textBufferReducer(stateWithPlaceholder, action);
222
+ expect(state).toHaveOnlyValidCharacters();
223
+ // Should only delete one character
224
+ expect(state.lines[0].length).toBe(placeholder.length - 1);
225
+ expect(state.cursorCol).toBe(9);
226
+ // pastedContent should NOT be cleaned up (placeholder is broken)
227
+ expect(state.pastedContent[placeholder]).toBeDefined();
228
+ });
229
+ });
230
+ describe('image placeholders', () => {
231
+ it('backspace at end of image path removes entire path', () => {
232
+ const imagePath = '@test.png';
233
+ const stateWithImage = createStateWithTransformations({
234
+ lines: [imagePath],
235
+ cursorRow: 0,
236
+ cursorCol: imagePath.length, // cursor at end
237
+ });
238
+ const action = { type: 'backspace' };
239
+ const state = textBufferReducer(stateWithImage, action);
240
+ expect(state).toHaveOnlyValidCharacters();
241
+ expect(state.lines).toEqual(['']);
242
+ expect(state.cursorCol).toBe(0);
243
+ });
244
+ it('delete at start of image path removes entire path', () => {
245
+ const imagePath = '@test.png';
246
+ const stateWithImage = createStateWithTransformations({
247
+ lines: [imagePath],
248
+ cursorRow: 0,
249
+ cursorCol: 0, // cursor at start
250
+ });
251
+ const action = { type: 'delete' };
252
+ const state = textBufferReducer(stateWithImage, action);
253
+ expect(state).toHaveOnlyValidCharacters();
254
+ expect(state.lines).toEqual(['']);
255
+ expect(state.cursorCol).toBe(0);
256
+ });
257
+ it('backspace inside image path does normal deletion', () => {
258
+ const imagePath = '@test.png';
259
+ const stateWithImage = createStateWithTransformations({
260
+ lines: [imagePath],
261
+ cursorRow: 0,
262
+ cursorCol: 5, // cursor in middle
263
+ });
264
+ const action = { type: 'backspace' };
265
+ const state = textBufferReducer(stateWithImage, action);
266
+ expect(state).toHaveOnlyValidCharacters();
267
+ // Should only delete one character
268
+ expect(state.lines[0].length).toBe(imagePath.length - 1);
269
+ expect(state.cursorCol).toBe(4);
270
+ });
271
+ });
272
+ describe('undo behavior', () => {
273
+ it('undo after placeholder deletion restores everything', () => {
274
+ const placeholder = '[Pasted Text: 6 lines]';
275
+ const pasteContent = 'line1\nline2\nline3\nline4\nline5\nline6';
276
+ const stateWithPlaceholder = createStateWithTransformations({
277
+ lines: [placeholder],
278
+ cursorRow: 0,
279
+ cursorCol: placeholder.length,
280
+ pastedContent: { [placeholder]: pasteContent },
281
+ });
282
+ // Delete the placeholder
283
+ const deleteAction = { type: 'backspace' };
284
+ const stateAfterDelete = textBufferReducer(stateWithPlaceholder, deleteAction);
285
+ expect(stateAfterDelete.lines).toEqual(['']);
286
+ expect(stateAfterDelete.pastedContent[placeholder]).toBeUndefined();
287
+ // Undo should restore
288
+ const undoAction = { type: 'undo' };
289
+ const stateAfterUndo = textBufferReducer(stateAfterDelete, undoAction);
290
+ expect(stateAfterUndo).toHaveOnlyValidCharacters();
291
+ expect(stateAfterUndo.lines).toEqual([placeholder]);
292
+ expect(stateAfterUndo.pastedContent[placeholder]).toBe(pasteContent);
293
+ });
294
+ });
295
+ });
296
+ describe('undo/redo actions', () => {
297
+ it('should undo and redo a change', () => {
298
+ // 1. Insert text
299
+ const insertAction = {
300
+ type: 'insert',
301
+ payload: 'test',
302
+ };
303
+ const stateAfterInsert = textBufferReducer(initialState, insertAction);
304
+ expect(stateAfterInsert).toHaveOnlyValidCharacters();
305
+ expect(stateAfterInsert.lines).toEqual(['test']);
306
+ expect(stateAfterInsert.undoStack.length).toBe(1);
307
+ // 2. Undo
308
+ const undoAction = { type: 'undo' };
309
+ const stateAfterUndo = textBufferReducer(stateAfterInsert, undoAction);
310
+ expect(stateAfterUndo).toHaveOnlyValidCharacters();
311
+ expect(stateAfterUndo.lines).toEqual(['']);
312
+ expect(stateAfterUndo.undoStack.length).toBe(0);
313
+ expect(stateAfterUndo.redoStack.length).toBe(1);
314
+ // 3. Redo
315
+ const redoAction = { type: 'redo' };
316
+ const stateAfterRedo = textBufferReducer(stateAfterUndo, redoAction);
317
+ expect(stateAfterRedo).toHaveOnlyValidCharacters();
318
+ expect(stateAfterRedo.lines).toEqual(['test']);
319
+ expect(stateAfterRedo.undoStack.length).toBe(1);
320
+ expect(stateAfterRedo.redoStack.length).toBe(0);
321
+ });
322
+ });
323
+ describe('create_undo_snapshot action', () => {
324
+ it('should create a snapshot without changing state', () => {
325
+ const stateWithText = {
326
+ ...initialState,
327
+ lines: ['hello'],
328
+ cursorRow: 0,
329
+ cursorCol: 5,
330
+ };
331
+ const action = { type: 'create_undo_snapshot' };
332
+ const state = textBufferReducer(stateWithText, action);
333
+ expect(state).toHaveOnlyValidCharacters();
334
+ expect(state.lines).toEqual(['hello']);
335
+ expect(state.cursorRow).toBe(0);
336
+ expect(state.cursorCol).toBe(5);
337
+ expect(state.undoStack.length).toBe(1);
338
+ expect(state.undoStack[0].lines).toEqual(['hello']);
339
+ expect(state.undoStack[0].cursorRow).toBe(0);
340
+ expect(state.undoStack[0].cursorCol).toBe(5);
341
+ });
342
+ });
343
+ describe('delete_word_left action', () => {
344
+ const createSingleLineState = (text, col) => ({
345
+ ...initialState,
346
+ lines: [text],
347
+ cursorRow: 0,
348
+ cursorCol: col,
349
+ });
350
+ it.each([
351
+ {
352
+ input: 'hello world',
353
+ cursorCol: 11,
354
+ expectedLines: ['hello '],
355
+ expectedCol: 6,
356
+ desc: 'simple word',
357
+ },
358
+ {
359
+ input: 'path/to/file',
360
+ cursorCol: 12,
361
+ expectedLines: ['path/to/'],
362
+ expectedCol: 8,
363
+ desc: 'path segment',
364
+ },
365
+ {
366
+ input: 'variable_name',
367
+ cursorCol: 13,
368
+ expectedLines: ['variable_'],
369
+ expectedCol: 9,
370
+ desc: 'variable_name parts',
371
+ },
372
+ ])('should delete $desc', ({ input, cursorCol, expectedLines, expectedCol }) => {
373
+ const state = textBufferReducer(createSingleLineState(input, cursorCol), { type: 'delete_word_left' });
374
+ expect(state.lines).toEqual(expectedLines);
375
+ expect(state.cursorCol).toBe(expectedCol);
376
+ });
377
+ it('should act like backspace at the beginning of a line', () => {
378
+ const stateWithText = {
379
+ ...initialState,
380
+ lines: ['hello', 'world'],
381
+ cursorRow: 1,
382
+ cursorCol: 0,
383
+ };
384
+ const state = textBufferReducer(stateWithText, {
385
+ type: 'delete_word_left',
386
+ });
387
+ expect(state.lines).toEqual(['helloworld']);
388
+ expect(state.cursorRow).toBe(0);
389
+ expect(state.cursorCol).toBe(5);
390
+ });
391
+ });
392
+ describe('delete_word_right action', () => {
393
+ const createSingleLineState = (text, col) => ({
394
+ ...initialState,
395
+ lines: [text],
396
+ cursorRow: 0,
397
+ cursorCol: col,
398
+ });
399
+ it.each([
400
+ {
401
+ input: 'hello world',
402
+ cursorCol: 0,
403
+ expectedLines: ['world'],
404
+ expectedCol: 0,
405
+ desc: 'simple word',
406
+ },
407
+ {
408
+ input: 'variable_name',
409
+ cursorCol: 0,
410
+ expectedLines: ['_name'],
411
+ expectedCol: 0,
412
+ desc: 'variable_name parts',
413
+ },
414
+ ])('should delete $desc', ({ input, cursorCol, expectedLines, expectedCol }) => {
415
+ const state = textBufferReducer(createSingleLineState(input, cursorCol), { type: 'delete_word_right' });
416
+ expect(state.lines).toEqual(expectedLines);
417
+ expect(state.cursorCol).toBe(expectedCol);
418
+ });
419
+ it('should delete path segments progressively', () => {
420
+ const stateWithText = {
421
+ ...initialState,
422
+ lines: ['path/to/file'],
423
+ cursorRow: 0,
424
+ cursorCol: 0,
425
+ };
426
+ let state = textBufferReducer(stateWithText, {
427
+ type: 'delete_word_right',
428
+ });
429
+ expect(state.lines).toEqual(['/to/file']);
430
+ state = textBufferReducer(state, { type: 'delete_word_right' });
431
+ expect(state.lines).toEqual(['to/file']);
432
+ });
433
+ it('should act like delete at the end of a line', () => {
434
+ const stateWithText = {
435
+ ...initialState,
436
+ lines: ['hello', 'world'],
437
+ cursorRow: 0,
438
+ cursorCol: 5,
439
+ };
440
+ const state = textBufferReducer(stateWithText, {
441
+ type: 'delete_word_right',
442
+ });
443
+ expect(state.lines).toEqual(['helloworld']);
444
+ expect(state.cursorRow).toBe(0);
445
+ expect(state.cursorCol).toBe(5);
446
+ });
447
+ });
448
+ });
449
+ const getBufferState = (result) => {
450
+ expect(result.current).toHaveOnlyValidCharacters();
451
+ return {
452
+ text: result.current.text,
453
+ lines: [...result.current.lines], // Clone for safety
454
+ cursor: [...result.current.cursor],
455
+ allVisualLines: [...result.current.allVisualLines],
456
+ viewportVisualLines: [...result.current.viewportVisualLines],
457
+ visualCursor: [...result.current.visualCursor],
458
+ visualScrollRow: result.current.visualScrollRow,
459
+ preferredCol: result.current.preferredCol,
460
+ };
461
+ };
462
+ describe('useTextBuffer', () => {
463
+ let viewport;
464
+ beforeEach(() => {
465
+ viewport = { width: 10, height: 3 }; // Default viewport for tests
466
+ });
467
+ afterEach(() => {
468
+ vi.restoreAllMocks();
469
+ });
470
+ describe('Initialization', () => {
471
+ it('should initialize with empty text and cursor at (0,0) by default', () => {
472
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
473
+ const state = getBufferState(result);
474
+ expect(state.text).toBe('');
475
+ expect(state.lines).toEqual(['']);
476
+ expect(state.cursor).toEqual([0, 0]);
477
+ expect(state.allVisualLines).toEqual(['']);
478
+ expect(state.viewportVisualLines).toEqual(['']);
479
+ expect(state.visualCursor).toEqual([0, 0]);
480
+ expect(state.visualScrollRow).toBe(0);
481
+ });
482
+ it('should initialize with provided initialText', () => {
483
+ const { result } = renderHook(() => useTextBuffer({
484
+ initialText: 'hello',
485
+ viewport,
486
+ isValidPath: () => false,
487
+ }));
488
+ const state = getBufferState(result);
489
+ expect(state.text).toBe('hello');
490
+ expect(state.lines).toEqual(['hello']);
491
+ expect(state.cursor).toEqual([0, 0]); // Default cursor if offset not given
492
+ expect(state.allVisualLines).toEqual(['hello']);
493
+ expect(state.viewportVisualLines).toEqual(['hello']);
494
+ expect(state.visualCursor).toEqual([0, 0]);
495
+ });
496
+ it('should initialize with initialText and initialCursorOffset', () => {
497
+ const { result } = renderHook(() => useTextBuffer({
498
+ initialText: 'hello\nworld',
499
+ initialCursorOffset: 7, // Should be at 'o' in 'world'
500
+ viewport,
501
+ isValidPath: () => false,
502
+ }));
503
+ const state = getBufferState(result);
504
+ expect(state.text).toBe('hello\nworld');
505
+ expect(state.lines).toEqual(['hello', 'world']);
506
+ expect(state.cursor).toEqual([1, 1]); // Logical cursor at 'o' in "world"
507
+ expect(state.allVisualLines).toEqual(['hello', 'world']);
508
+ expect(state.viewportVisualLines).toEqual(['hello', 'world']);
509
+ expect(state.visualCursor[0]).toBe(1); // On the second visual line
510
+ expect(state.visualCursor[1]).toBe(1); // At 'o' in "world"
511
+ });
512
+ it('should wrap visual lines', () => {
513
+ const { result } = renderHook(() => useTextBuffer({
514
+ initialText: 'The quick brown fox jumps over the lazy dog.',
515
+ initialCursorOffset: 2, // After '好'
516
+ viewport: { width: 15, height: 4 },
517
+ isValidPath: () => false,
518
+ }));
519
+ const state = getBufferState(result);
520
+ expect(state.allVisualLines).toEqual([
521
+ 'The quick',
522
+ 'brown fox',
523
+ 'jumps over the',
524
+ 'lazy dog.',
525
+ ]);
526
+ });
527
+ it('should wrap visual lines with multiple spaces', () => {
528
+ const { result } = renderHook(() => useTextBuffer({
529
+ initialText: 'The quick brown fox jumps over the lazy dog.',
530
+ viewport: { width: 15, height: 4 },
531
+ isValidPath: () => false,
532
+ }));
533
+ const state = getBufferState(result);
534
+ // Including multiple spaces at the end of the lines like this is
535
+ // consistent with Google docs behavior and makes it intuitive to edit
536
+ // the spaces as needed.
537
+ expect(state.allVisualLines).toEqual([
538
+ 'The quick ',
539
+ 'brown fox ',
540
+ 'jumps over the',
541
+ 'lazy dog.',
542
+ ]);
543
+ });
544
+ it('should wrap visual lines even without spaces', () => {
545
+ const { result } = renderHook(() => useTextBuffer({
546
+ initialText: '123456789012345ABCDEFG', // 4 chars, 12 bytes
547
+ viewport: { width: 15, height: 2 },
548
+ isValidPath: () => false,
549
+ }));
550
+ const state = getBufferState(result);
551
+ // Including multiple spaces at the end of the lines like this is
552
+ // consistent with Google docs behavior and makes it intuitive to edit
553
+ // the spaces as needed.
554
+ expect(state.allVisualLines).toEqual(['123456789012345', 'ABCDEFG']);
555
+ });
556
+ it('should initialize with multi-byte unicode characters and correct cursor offset', () => {
557
+ const { result } = renderHook(() => useTextBuffer({
558
+ initialText: '你好世界', // 4 chars, 12 bytes
559
+ initialCursorOffset: 2, // After '好'
560
+ viewport: { width: 5, height: 2 },
561
+ isValidPath: () => false,
562
+ }));
563
+ const state = getBufferState(result);
564
+ expect(state.text).toBe('你好世界');
565
+ expect(state.lines).toEqual(['你好世界']);
566
+ expect(state.cursor).toEqual([0, 2]);
567
+ // Visual: "你好" (width 4), "世"界" (width 4) with viewport width 5
568
+ expect(state.allVisualLines).toEqual(['你好', '世界']);
569
+ expect(state.visualCursor).toEqual([1, 0]);
570
+ });
571
+ });
572
+ describe('Basic Editing', () => {
573
+ it('insert: should insert a character and update cursor', () => {
574
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
575
+ act(() => result.current.insert('a'));
576
+ let state = getBufferState(result);
577
+ expect(state.text).toBe('a');
578
+ expect(state.cursor).toEqual([0, 1]);
579
+ expect(state.visualCursor).toEqual([0, 1]);
580
+ act(() => result.current.insert('b'));
581
+ state = getBufferState(result);
582
+ expect(state.text).toBe('ab');
583
+ expect(state.cursor).toEqual([0, 2]);
584
+ expect(state.visualCursor).toEqual([0, 2]);
585
+ });
586
+ it('insert: should insert text in the middle of a line', () => {
587
+ const { result } = renderHook(() => useTextBuffer({
588
+ initialText: 'abc',
589
+ viewport,
590
+ isValidPath: () => false,
591
+ }));
592
+ act(() => result.current.move('right'));
593
+ act(() => result.current.insert('-NEW-'));
594
+ const state = getBufferState(result);
595
+ expect(state.text).toBe('a-NEW-bc');
596
+ expect(state.cursor).toEqual([0, 6]);
597
+ });
598
+ it('insert: should use placeholder for large text paste', () => {
599
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
600
+ const largeText = '1\n2\n3\n4\n5\n6';
601
+ act(() => result.current.insert(largeText, { paste: true }));
602
+ const state = getBufferState(result);
603
+ expect(state.text).toBe('[Pasted Text: 6 lines]');
604
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
605
+ });
606
+ it('insert: should NOT use placeholder for large text if NOT a paste', () => {
607
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
608
+ const largeText = '1\n2\n3\n4\n5\n6';
609
+ act(() => result.current.insert(largeText, { paste: false }));
610
+ const state = getBufferState(result);
611
+ expect(state.text).toBe(largeText);
612
+ });
613
+ it('insert: should clean up pastedContent when placeholder is deleted', () => {
614
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
615
+ const largeText = '1\n2\n3\n4\n5\n6';
616
+ act(() => result.current.insert(largeText, { paste: true }));
617
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
618
+ // Delete the placeholder using setText
619
+ act(() => result.current.setText(''));
620
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
621
+ });
622
+ it('insert: should clean up pastedContent when placeholder is removed via atomic backspace', () => {
623
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
624
+ const largeText = '1\n2\n3\n4\n5\n6';
625
+ act(() => result.current.insert(largeText, { paste: true }));
626
+ expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
627
+ // Single backspace at end of placeholder removes entire placeholder
628
+ act(() => {
629
+ result.current.backspace();
630
+ });
631
+ expect(getBufferState(result).text).toBe('');
632
+ // pastedContent is cleaned up when placeholder is deleted atomically
633
+ expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
634
+ });
635
+ it('newline: should create a new line and move cursor', () => {
636
+ const { result } = renderHook(() => useTextBuffer({
637
+ initialText: 'ab',
638
+ viewport,
639
+ isValidPath: () => false,
640
+ }));
641
+ act(() => result.current.move('end')); // cursor at [0,2]
642
+ act(() => result.current.newline());
643
+ const state = getBufferState(result);
644
+ expect(state.text).toBe('ab\n');
645
+ expect(state.lines).toEqual(['ab', '']);
646
+ expect(state.cursor).toEqual([1, 0]);
647
+ expect(state.allVisualLines).toEqual(['ab', '']);
648
+ expect(state.viewportVisualLines).toEqual(['ab', '']); // viewport height 3
649
+ expect(state.visualCursor).toEqual([1, 0]); // On the new visual line
650
+ });
651
+ it('backspace: should delete char to the left or merge lines', () => {
652
+ const { result } = renderHook(() => useTextBuffer({
653
+ initialText: 'a\nb',
654
+ viewport,
655
+ isValidPath: () => false,
656
+ }));
657
+ act(() => {
658
+ result.current.move('down');
659
+ });
660
+ act(() => {
661
+ result.current.move('end'); // cursor to [1,1] (end of 'b')
662
+ });
663
+ act(() => result.current.backspace()); // delete 'b'
664
+ let state = getBufferState(result);
665
+ expect(state.text).toBe('a\n');
666
+ expect(state.cursor).toEqual([1, 0]);
667
+ act(() => result.current.backspace()); // merge lines
668
+ state = getBufferState(result);
669
+ expect(state.text).toBe('a');
670
+ expect(state.cursor).toEqual([0, 1]); // cursor after 'a'
671
+ expect(state.allVisualLines).toEqual(['a']);
672
+ expect(state.viewportVisualLines).toEqual(['a']);
673
+ expect(state.visualCursor).toEqual([0, 1]);
674
+ });
675
+ it('del: should delete char to the right or merge lines', () => {
676
+ const { result } = renderHook(() => useTextBuffer({
677
+ initialText: 'a\nb',
678
+ viewport,
679
+ isValidPath: () => false,
680
+ }));
681
+ // cursor at [0,0]
682
+ act(() => result.current.del()); // delete 'a'
683
+ let state = getBufferState(result);
684
+ expect(state.text).toBe('\nb');
685
+ expect(state.cursor).toEqual([0, 0]);
686
+ act(() => result.current.del()); // merge lines (deletes newline)
687
+ state = getBufferState(result);
688
+ expect(state.text).toBe('b');
689
+ expect(state.cursor).toEqual([0, 0]);
690
+ expect(state.allVisualLines).toEqual(['b']);
691
+ expect(state.viewportVisualLines).toEqual(['b']);
692
+ expect(state.visualCursor).toEqual([0, 0]);
693
+ });
694
+ });
695
+ describe('Drag and Drop File Paths', () => {
696
+ it('should prepend @ to a valid file path on insert', () => {
697
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => true }));
698
+ const filePath = '/path/to/a/valid/file.txt';
699
+ act(() => result.current.insert(filePath, { paste: true }));
700
+ expect(getBufferState(result).text).toBe(`@${filePath} `);
701
+ });
702
+ it('should not prepend @ to an invalid file path on insert', () => {
703
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
704
+ const notAPath = 'this is just some long text';
705
+ act(() => result.current.insert(notAPath, { paste: true }));
706
+ expect(getBufferState(result).text).toBe(notAPath);
707
+ });
708
+ it('should handle quoted paths', () => {
709
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => true }));
710
+ const filePath = "'/path/to/a/valid/file.txt'";
711
+ act(() => result.current.insert(filePath, { paste: true }));
712
+ expect(getBufferState(result).text).toBe(`@/path/to/a/valid/file.txt `);
713
+ });
714
+ it('should not prepend @ to short text that is not a path', () => {
715
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => true }));
716
+ const shortText = 'ab';
717
+ act(() => result.current.insert(shortText, { paste: true }));
718
+ expect(getBufferState(result).text).toBe(shortText);
719
+ });
720
+ it('should prepend @ to multiple valid file paths on insert', () => {
721
+ // Use Set to model reality: individual paths exist, combined string doesn't
722
+ const validPaths = new Set(['/path/to/file1.txt', '/path/to/file2.txt']);
723
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: (p) => validPaths.has(p) }));
724
+ const filePaths = '/path/to/file1.txt /path/to/file2.txt';
725
+ act(() => result.current.insert(filePaths, { paste: true }));
726
+ expect(getBufferState(result).text).toBe('@/path/to/file1.txt @/path/to/file2.txt ');
727
+ });
728
+ it('should handle multiple paths with escaped spaces', () => {
729
+ // Use Set to model reality: individual paths exist, combined string doesn't
730
+ const validPaths = new Set(['/path/to/my file.txt', '/other/path.txt']);
731
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: (p) => validPaths.has(p) }));
732
+ const filePaths = '/path/to/my\\ file.txt /other/path.txt';
733
+ act(() => result.current.insert(filePaths, { paste: true }));
734
+ expect(getBufferState(result).text).toBe('@/path/to/my\\ file.txt @/other/path.txt ');
735
+ });
736
+ it('should only prepend @ to valid paths in multi-path paste', () => {
737
+ const { result } = renderHook(() => useTextBuffer({
738
+ viewport,
739
+ isValidPath: (p) => p.endsWith('.txt'),
740
+ }));
741
+ const filePaths = '/valid/file.txt /invalid/file.jpg';
742
+ act(() => result.current.insert(filePaths, { paste: true }));
743
+ expect(getBufferState(result).text).toBe('@/valid/file.txt /invalid/file.jpg ');
744
+ });
745
+ });
746
+ describe('Shell Mode Behavior', () => {
747
+ it('should not prepend @ to valid file paths when shellModeActive is true', () => {
748
+ const { result } = renderHook(() => useTextBuffer({
749
+ viewport,
750
+ isValidPath: () => true,
751
+ shellModeActive: true,
752
+ }));
753
+ const filePath = '/path/to/a/valid/file.txt';
754
+ act(() => result.current.insert(filePath, { paste: true }));
755
+ expect(getBufferState(result).text).toBe(filePath); // No @ prefix
756
+ });
757
+ it('should not prepend @ to quoted paths when shellModeActive is true', () => {
758
+ const { result } = renderHook(() => useTextBuffer({
759
+ viewport,
760
+ isValidPath: () => true,
761
+ shellModeActive: true,
762
+ }));
763
+ const quotedFilePath = "'/path/to/a/valid/file.txt'";
764
+ act(() => result.current.insert(quotedFilePath, { paste: true }));
765
+ expect(getBufferState(result).text).toBe(quotedFilePath); // No @ prefix, keeps quotes
766
+ });
767
+ it('should behave normally with invalid paths when shellModeActive is true', () => {
768
+ const { result } = renderHook(() => useTextBuffer({
769
+ viewport,
770
+ isValidPath: () => false,
771
+ shellModeActive: true,
772
+ }));
773
+ const notAPath = 'this is just some text';
774
+ act(() => result.current.insert(notAPath, { paste: true }));
775
+ expect(getBufferState(result).text).toBe(notAPath);
776
+ });
777
+ it('should behave normally with short text when shellModeActive is true', () => {
778
+ const { result } = renderHook(() => useTextBuffer({
779
+ viewport,
780
+ isValidPath: () => true,
781
+ shellModeActive: true,
782
+ }));
783
+ const shortText = 'ls';
784
+ act(() => result.current.insert(shortText, { paste: true }));
785
+ expect(getBufferState(result).text).toBe(shortText); // No @ prefix for short text
786
+ });
787
+ });
788
+ describe('Cursor Movement', () => {
789
+ it('move: left/right should work within and across visual lines (due to wrapping)', () => {
790
+ // Text: "long line1next line2" (20 chars)
791
+ // Viewport width 5. Word wrapping should produce:
792
+ // "long " (5)
793
+ // "line1" (5)
794
+ // "next " (5)
795
+ // "line2" (5)
796
+ const { result } = renderHook(() => useTextBuffer({
797
+ initialText: 'long line1next line2', // Corrected: was 'long line1next line2'
798
+ viewport: { width: 5, height: 4 },
799
+ isValidPath: () => false,
800
+ }));
801
+ // Initial cursor [0,0] logical, visual [0,0] ("l" of "long ")
802
+ act(() => result.current.move('right')); // visual [0,1] ("o")
803
+ expect(getBufferState(result).visualCursor).toEqual([0, 1]);
804
+ act(() => result.current.move('right')); // visual [0,2] ("n")
805
+ act(() => result.current.move('right')); // visual [0,3] ("g")
806
+ act(() => result.current.move('right')); // visual [0,4] (" ")
807
+ expect(getBufferState(result).visualCursor).toEqual([0, 4]);
808
+ act(() => result.current.move('right')); // visual [1,0] ("l" of "line1")
809
+ expect(getBufferState(result).visualCursor).toEqual([1, 0]);
810
+ expect(getBufferState(result).cursor).toEqual([0, 5]); // logical cursor
811
+ act(() => result.current.move('left')); // visual [0,4] (" " of "long ")
812
+ expect(getBufferState(result).visualCursor).toEqual([0, 4]);
813
+ expect(getBufferState(result).cursor).toEqual([0, 4]); // logical cursor
814
+ });
815
+ it('move: up/down should preserve preferred visual column', () => {
816
+ const text = 'abcde\nxy\n12345';
817
+ const { result } = renderHook(() => useTextBuffer({
818
+ initialText: text,
819
+ viewport,
820
+ isValidPath: () => false,
821
+ }));
822
+ expect(result.current.allVisualLines).toEqual(['abcde', 'xy', '12345']);
823
+ // Place cursor at the end of "abcde" -> logical [0,5]
824
+ act(() => {
825
+ result.current.move('home'); // to [0,0]
826
+ });
827
+ for (let i = 0; i < 5; i++) {
828
+ act(() => {
829
+ result.current.move('right'); // to [0,5]
830
+ });
831
+ }
832
+ expect(getBufferState(result).cursor).toEqual([0, 5]);
833
+ expect(getBufferState(result).visualCursor).toEqual([0, 5]);
834
+ // Set preferredCol by moving up then down to the same spot, then test.
835
+ act(() => {
836
+ result.current.move('down'); // to xy, logical [1,2], visual [1,2], preferredCol should be 5
837
+ });
838
+ let state = getBufferState(result);
839
+ expect(state.cursor).toEqual([1, 2]); // Logical cursor at end of 'xy'
840
+ expect(state.visualCursor).toEqual([1, 2]); // Visual cursor at end of 'xy'
841
+ expect(state.preferredCol).toBe(5);
842
+ act(() => result.current.move('down')); // to '12345', preferredCol=5.
843
+ state = getBufferState(result);
844
+ expect(state.cursor).toEqual([2, 5]); // Logical cursor at end of '12345'
845
+ expect(state.visualCursor).toEqual([2, 5]); // Visual cursor at end of '12345'
846
+ expect(state.preferredCol).toBe(5); // Preferred col is maintained
847
+ act(() => result.current.move('left')); // preferredCol should reset
848
+ state = getBufferState(result);
849
+ expect(state.preferredCol).toBe(null);
850
+ });
851
+ it('move: home/end should go to visual line start/end', () => {
852
+ const initialText = 'line one\nsecond line';
853
+ const { result } = renderHook(() => useTextBuffer({
854
+ initialText,
855
+ viewport: { width: 5, height: 5 },
856
+ isValidPath: () => false,
857
+ }));
858
+ expect(result.current.allVisualLines).toEqual([
859
+ 'line',
860
+ 'one',
861
+ 'secon',
862
+ 'd',
863
+ 'line',
864
+ ]);
865
+ // Initial cursor [0,0] (start of "line")
866
+ act(() => result.current.move('down')); // visual cursor from [0,0] to [1,0] ("o" of "one")
867
+ act(() => result.current.move('right')); // visual cursor to [1,1] ("n" of "one")
868
+ expect(getBufferState(result).visualCursor).toEqual([1, 1]);
869
+ act(() => result.current.move('home')); // visual cursor to [1,0] (start of "one")
870
+ expect(getBufferState(result).visualCursor).toEqual([1, 0]);
871
+ act(() => result.current.move('end')); // visual cursor to [1,3] (end of "one")
872
+ expect(getBufferState(result).visualCursor).toEqual([1, 3]); // "one" is 3 chars
873
+ });
874
+ });
875
+ describe('Visual Layout & Viewport', () => {
876
+ it('should wrap long lines correctly into visualLines', () => {
877
+ const { result } = renderHook(() => useTextBuffer({
878
+ initialText: 'This is a very long line of text.', // 33 chars
879
+ viewport: { width: 10, height: 5 },
880
+ isValidPath: () => false,
881
+ }));
882
+ const state = getBufferState(result);
883
+ // Expected visual lines with word wrapping (viewport width 10):
884
+ // "This is a"
885
+ // "very long"
886
+ // "line of"
887
+ // "text."
888
+ expect(state.allVisualLines.length).toBe(4);
889
+ expect(state.allVisualLines[0]).toBe('This is a');
890
+ expect(state.allVisualLines[1]).toBe('very long');
891
+ expect(state.allVisualLines[2]).toBe('line of');
892
+ expect(state.allVisualLines[3]).toBe('text.');
893
+ });
894
+ it('should update visualScrollRow when visualCursor moves out of viewport', () => {
895
+ const { result } = renderHook(() => useTextBuffer({
896
+ initialText: 'l1\nl2\nl3\nl4\nl5',
897
+ viewport: { width: 5, height: 3 }, // Can show 3 visual lines
898
+ isValidPath: () => false,
899
+ }));
900
+ // Initial: l1, l2, l3 visible. visualScrollRow = 0. visualCursor = [0,0]
901
+ expect(getBufferState(result).visualScrollRow).toBe(0);
902
+ expect(getBufferState(result).allVisualLines).toEqual([
903
+ 'l1',
904
+ 'l2',
905
+ 'l3',
906
+ 'l4',
907
+ 'l5',
908
+ ]);
909
+ expect(getBufferState(result).viewportVisualLines).toEqual([
910
+ 'l1',
911
+ 'l2',
912
+ 'l3',
913
+ ]);
914
+ act(() => result.current.move('down')); // vc=[1,0]
915
+ act(() => result.current.move('down')); // vc=[2,0] (l3)
916
+ expect(getBufferState(result).visualScrollRow).toBe(0);
917
+ act(() => result.current.move('down')); // vc=[3,0] (l4) - scroll should happen
918
+ // Now: l2, l3, l4 visible. visualScrollRow = 1.
919
+ let state = getBufferState(result);
920
+ expect(state.visualScrollRow).toBe(1);
921
+ expect(state.allVisualLines).toEqual(['l1', 'l2', 'l3', 'l4', 'l5']);
922
+ expect(state.viewportVisualLines).toEqual(['l2', 'l3', 'l4']);
923
+ expect(state.visualCursor).toEqual([3, 0]);
924
+ act(() => result.current.move('up')); // vc=[2,0] (l3)
925
+ act(() => result.current.move('up')); // vc=[1,0] (l2)
926
+ expect(getBufferState(result).visualScrollRow).toBe(1);
927
+ act(() => result.current.move('up')); // vc=[0,0] (l1) - scroll up
928
+ // Now: l1, l2, l3 visible. visualScrollRow = 0
929
+ state = getBufferState(result); // Assign to the existing `state` variable
930
+ expect(state.visualScrollRow).toBe(0);
931
+ expect(state.allVisualLines).toEqual(['l1', 'l2', 'l3', 'l4', 'l5']);
932
+ expect(state.viewportVisualLines).toEqual(['l1', 'l2', 'l3']);
933
+ expect(state.visualCursor).toEqual([0, 0]);
934
+ });
935
+ });
936
+ describe('Undo/Redo', () => {
937
+ it('should undo and redo an insert operation', () => {
938
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
939
+ act(() => result.current.insert('a'));
940
+ expect(getBufferState(result).text).toBe('a');
941
+ act(() => result.current.undo());
942
+ expect(getBufferState(result).text).toBe('');
943
+ expect(getBufferState(result).cursor).toEqual([0, 0]);
944
+ act(() => result.current.redo());
945
+ expect(getBufferState(result).text).toBe('a');
946
+ expect(getBufferState(result).cursor).toEqual([0, 1]);
947
+ });
948
+ it('should undo and redo a newline operation', () => {
949
+ const { result } = renderHook(() => useTextBuffer({
950
+ initialText: 'test',
951
+ viewport,
952
+ isValidPath: () => false,
953
+ }));
954
+ act(() => result.current.move('end'));
955
+ act(() => result.current.newline());
956
+ expect(getBufferState(result).text).toBe('test\n');
957
+ act(() => result.current.undo());
958
+ expect(getBufferState(result).text).toBe('test');
959
+ expect(getBufferState(result).cursor).toEqual([0, 4]);
960
+ act(() => result.current.redo());
961
+ expect(getBufferState(result).text).toBe('test\n');
962
+ expect(getBufferState(result).cursor).toEqual([1, 0]);
963
+ });
964
+ });
965
+ describe('Unicode Handling', () => {
966
+ it('insert: should correctly handle multi-byte unicode characters', () => {
967
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
968
+ act(() => result.current.insert('你好'));
969
+ const state = getBufferState(result);
970
+ expect(state.text).toBe('你好');
971
+ expect(state.cursor).toEqual([0, 2]); // Cursor is 2 (char count)
972
+ expect(state.visualCursor).toEqual([0, 2]);
973
+ });
974
+ it('backspace: should correctly delete multi-byte unicode characters', () => {
975
+ const { result } = renderHook(() => useTextBuffer({
976
+ initialText: '你好',
977
+ viewport,
978
+ isValidPath: () => false,
979
+ }));
980
+ act(() => result.current.move('end')); // cursor at [0,2]
981
+ act(() => result.current.backspace()); // delete '好'
982
+ let state = getBufferState(result);
983
+ expect(state.text).toBe('你');
984
+ expect(state.cursor).toEqual([0, 1]);
985
+ act(() => result.current.backspace()); // delete '你'
986
+ state = getBufferState(result);
987
+ expect(state.text).toBe('');
988
+ expect(state.cursor).toEqual([0, 0]);
989
+ });
990
+ it('move: left/right should treat multi-byte chars as single units for visual cursor', () => {
991
+ const { result } = renderHook(() => useTextBuffer({
992
+ initialText: '🐶🐱',
993
+ viewport: { width: 5, height: 1 },
994
+ isValidPath: () => false,
995
+ }));
996
+ // Initial: visualCursor [0,0]
997
+ act(() => result.current.move('right')); // visualCursor [0,1] (after 🐶)
998
+ let state = getBufferState(result);
999
+ expect(state.cursor).toEqual([0, 1]);
1000
+ expect(state.visualCursor).toEqual([0, 1]);
1001
+ act(() => result.current.move('right')); // visualCursor [0,2] (after 🐱)
1002
+ state = getBufferState(result);
1003
+ expect(state.cursor).toEqual([0, 2]);
1004
+ expect(state.visualCursor).toEqual([0, 2]);
1005
+ act(() => result.current.move('left')); // visualCursor [0,1] (before 🐱 / after 🐶)
1006
+ state = getBufferState(result);
1007
+ expect(state.cursor).toEqual([0, 1]);
1008
+ expect(state.visualCursor).toEqual([0, 1]);
1009
+ });
1010
+ it('moveToVisualPosition: should correctly handle wide characters (Chinese)', () => {
1011
+ const { result } = renderHook(() => useTextBuffer({
1012
+ initialText: '你好', // 2 chars, width 4
1013
+ viewport: { width: 10, height: 1 },
1014
+ isValidPath: () => false,
1015
+ }));
1016
+ // '你' (width 2): visual 0-1. '好' (width 2): visual 2-3.
1017
+ // Click on '你' (first half, x=0) -> index 0
1018
+ act(() => result.current.moveToVisualPosition(0, 0));
1019
+ expect(getBufferState(result).cursor).toEqual([0, 0]);
1020
+ // Click on '你' (second half, x=1) -> index 1 (after first char)
1021
+ act(() => result.current.moveToVisualPosition(0, 1));
1022
+ expect(getBufferState(result).cursor).toEqual([0, 1]);
1023
+ // Click on '好' (first half, x=2) -> index 1 (before second char)
1024
+ act(() => result.current.moveToVisualPosition(0, 2));
1025
+ expect(getBufferState(result).cursor).toEqual([0, 1]);
1026
+ // Click on '好' (second half, x=3) -> index 2 (after second char)
1027
+ act(() => result.current.moveToVisualPosition(0, 3));
1028
+ expect(getBufferState(result).cursor).toEqual([0, 2]);
1029
+ });
1030
+ });
1031
+ describe('handleInput', () => {
1032
+ it('should insert printable characters', () => {
1033
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1034
+ act(() => result.current.handleInput({
1035
+ name: 'h',
1036
+ shift: false,
1037
+ alt: false,
1038
+ ctrl: false,
1039
+ cmd: false,
1040
+ insertable: true,
1041
+ sequence: 'h',
1042
+ }));
1043
+ act(() => result.current.handleInput({
1044
+ name: 'i',
1045
+ shift: false,
1046
+ alt: false,
1047
+ ctrl: false,
1048
+ cmd: false,
1049
+ insertable: true,
1050
+ sequence: 'i',
1051
+ }));
1052
+ expect(getBufferState(result).text).toBe('hi');
1053
+ });
1054
+ it('should handle "Enter" key as newline', () => {
1055
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1056
+ act(() => result.current.handleInput({
1057
+ name: 'return',
1058
+ shift: false,
1059
+ alt: false,
1060
+ ctrl: false,
1061
+ cmd: false,
1062
+ insertable: true,
1063
+ sequence: '\r',
1064
+ }));
1065
+ expect(getBufferState(result).lines).toEqual(['', '']);
1066
+ });
1067
+ it('should handle Ctrl+J as newline', () => {
1068
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1069
+ act(() => result.current.handleInput({
1070
+ name: 'j',
1071
+ shift: false,
1072
+ alt: false,
1073
+ ctrl: true,
1074
+ cmd: false,
1075
+ insertable: false,
1076
+ sequence: '\n',
1077
+ }));
1078
+ expect(getBufferState(result).lines).toEqual(['', '']);
1079
+ });
1080
+ it('should do nothing for a tab key press', () => {
1081
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1082
+ act(() => result.current.handleInput({
1083
+ name: 'tab',
1084
+ shift: false,
1085
+ alt: false,
1086
+ ctrl: false,
1087
+ cmd: false,
1088
+ insertable: false,
1089
+ sequence: '\t',
1090
+ }));
1091
+ expect(getBufferState(result).text).toBe('');
1092
+ });
1093
+ it('should do nothing for a shift tab key press', () => {
1094
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1095
+ act(() => result.current.handleInput({
1096
+ name: 'tab',
1097
+ shift: true,
1098
+ alt: false,
1099
+ ctrl: false,
1100
+ cmd: false,
1101
+ insertable: false,
1102
+ sequence: '\u001b[9;2u',
1103
+ }));
1104
+ expect(getBufferState(result).text).toBe('');
1105
+ });
1106
+ it('should handle "Backspace" key', () => {
1107
+ const { result } = renderHook(() => useTextBuffer({
1108
+ initialText: 'a',
1109
+ viewport,
1110
+ isValidPath: () => false,
1111
+ }));
1112
+ act(() => result.current.move('end'));
1113
+ act(() => result.current.handleInput({
1114
+ name: 'backspace',
1115
+ shift: false,
1116
+ alt: false,
1117
+ ctrl: false,
1118
+ cmd: false,
1119
+ insertable: false,
1120
+ sequence: '\x7f',
1121
+ }));
1122
+ expect(getBufferState(result).text).toBe('');
1123
+ });
1124
+ it('should handle multiple delete characters in one input', () => {
1125
+ const { result } = renderHook(() => useTextBuffer({
1126
+ initialText: 'abcde',
1127
+ viewport,
1128
+ isValidPath: () => false,
1129
+ }));
1130
+ act(() => result.current.move('end')); // cursor at the end
1131
+ expect(getBufferState(result).cursor).toEqual([0, 5]);
1132
+ act(() => {
1133
+ result.current.handleInput({
1134
+ name: 'backspace',
1135
+ shift: false,
1136
+ alt: false,
1137
+ ctrl: false,
1138
+ cmd: false,
1139
+ insertable: false,
1140
+ sequence: '\x7f',
1141
+ });
1142
+ result.current.handleInput({
1143
+ name: 'backspace',
1144
+ shift: false,
1145
+ alt: false,
1146
+ ctrl: false,
1147
+ cmd: false,
1148
+ insertable: false,
1149
+ sequence: '\x7f',
1150
+ });
1151
+ result.current.handleInput({
1152
+ name: 'backspace',
1153
+ shift: false,
1154
+ alt: false,
1155
+ ctrl: false,
1156
+ cmd: false,
1157
+ insertable: false,
1158
+ sequence: '\x7f',
1159
+ });
1160
+ });
1161
+ expect(getBufferState(result).text).toBe('ab');
1162
+ expect(getBufferState(result).cursor).toEqual([0, 2]);
1163
+ });
1164
+ it('should handle inserts that contain delete characters', () => {
1165
+ const { result } = renderHook(() => useTextBuffer({
1166
+ initialText: 'abcde',
1167
+ viewport,
1168
+ isValidPath: () => false,
1169
+ }));
1170
+ act(() => result.current.move('end')); // cursor at the end
1171
+ expect(getBufferState(result).cursor).toEqual([0, 5]);
1172
+ act(() => {
1173
+ result.current.insert('\x7f\x7f\x7f');
1174
+ });
1175
+ expect(getBufferState(result).text).toBe('ab');
1176
+ expect(getBufferState(result).cursor).toEqual([0, 2]);
1177
+ });
1178
+ it('should handle inserts with a mix of regular and delete characters', () => {
1179
+ const { result } = renderHook(() => useTextBuffer({
1180
+ initialText: 'abcde',
1181
+ viewport,
1182
+ isValidPath: () => false,
1183
+ }));
1184
+ act(() => result.current.move('end')); // cursor at the end
1185
+ expect(getBufferState(result).cursor).toEqual([0, 5]);
1186
+ act(() => {
1187
+ result.current.insert('\x7fI\x7f\x7fNEW');
1188
+ });
1189
+ expect(getBufferState(result).text).toBe('abcNEW');
1190
+ expect(getBufferState(result).cursor).toEqual([0, 6]);
1191
+ });
1192
+ it('should handle arrow keys for movement', () => {
1193
+ const { result } = renderHook(() => useTextBuffer({
1194
+ initialText: 'ab',
1195
+ viewport,
1196
+ isValidPath: () => false,
1197
+ }));
1198
+ act(() => result.current.move('end')); // cursor [0,2]
1199
+ act(() => result.current.handleInput({
1200
+ name: 'left',
1201
+ shift: false,
1202
+ alt: false,
1203
+ ctrl: false,
1204
+ cmd: false,
1205
+ insertable: false,
1206
+ sequence: '\x1b[D',
1207
+ }));
1208
+ expect(getBufferState(result).cursor).toEqual([0, 1]);
1209
+ act(() => result.current.handleInput({
1210
+ name: 'right',
1211
+ shift: false,
1212
+ alt: false,
1213
+ ctrl: false,
1214
+ cmd: false,
1215
+ insertable: false,
1216
+ sequence: '\x1b[C',
1217
+ }));
1218
+ expect(getBufferState(result).cursor).toEqual([0, 2]);
1219
+ });
1220
+ it('should strip ANSI escape codes when pasting text', () => {
1221
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1222
+ const textWithAnsi = '\x1B[31mHello\x1B[0m \x1B[32mWorld\x1B[0m';
1223
+ // Simulate pasting by calling handleInput with a string longer than 1 char
1224
+ act(() => result.current.handleInput({
1225
+ name: '',
1226
+ shift: false,
1227
+ alt: false,
1228
+ ctrl: false,
1229
+ cmd: false,
1230
+ insertable: true,
1231
+ sequence: textWithAnsi,
1232
+ }));
1233
+ expect(getBufferState(result).text).toBe('Hello World');
1234
+ });
1235
+ it('should handle VSCode terminal Shift+Enter as newline', () => {
1236
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1237
+ act(() => result.current.handleInput({
1238
+ name: 'return',
1239
+ shift: true,
1240
+ alt: false,
1241
+ ctrl: false,
1242
+ cmd: false,
1243
+ insertable: true,
1244
+ sequence: '\r',
1245
+ })); // Simulates Shift+Enter in VSCode terminal
1246
+ expect(getBufferState(result).lines).toEqual(['', '']);
1247
+ });
1248
+ it('should correctly handle repeated pasting of long text', () => {
1249
+ const longText = `not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
1250
+
1251
+ Why do we use it?
1252
+ It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
1253
+
1254
+ Where does it come from?
1255
+ Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lore
1256
+ `;
1257
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1258
+ // Simulate pasting the long text multiple times
1259
+ act(() => {
1260
+ result.current.insert(longText, { paste: true });
1261
+ result.current.insert(longText, { paste: true });
1262
+ result.current.insert(longText, { paste: true });
1263
+ });
1264
+ const state = getBufferState(result);
1265
+ // Check that the text is the result of three concatenations of unique placeholders.
1266
+ // Now that ID generation is in the reducer, they are correctly unique even when batched.
1267
+ expect(state.lines).toStrictEqual([
1268
+ '[Pasted Text: 8 lines][Pasted Text: 8 lines #2][Pasted Text: 8 lines #3]',
1269
+ ]);
1270
+ expect(result.current.pastedContent['[Pasted Text: 8 lines]']).toBe(longText);
1271
+ expect(result.current.pastedContent['[Pasted Text: 8 lines #2]']).toBe(longText);
1272
+ expect(result.current.pastedContent['[Pasted Text: 8 lines #3]']).toBe(longText);
1273
+ const expectedCursorPos = offsetToLogicalPos(state.text, state.text.length);
1274
+ expect(state.cursor).toEqual(expectedCursorPos);
1275
+ });
1276
+ });
1277
+ // More tests would be needed for:
1278
+ // - setText, replaceRange
1279
+ // - deleteWordLeft, deleteWordRight
1280
+ // - More complex undo/redo scenarios
1281
+ // - Selection and clipboard (copy/paste) - might need clipboard API mocks or internal state check
1282
+ // - openInExternalEditor (heavy mocking of fs, child_process, os)
1283
+ // - All edge cases for visual scrolling and wrapping with different viewport sizes and text content.
1284
+ describe('replaceRange', () => {
1285
+ it('should replace a single-line range with single-line text', () => {
1286
+ const { result } = renderHook(() => useTextBuffer({
1287
+ initialText: '@pac',
1288
+ viewport,
1289
+ isValidPath: () => false,
1290
+ }));
1291
+ act(() => result.current.replaceRange(0, 1, 0, 4, 'packages'));
1292
+ const state = getBufferState(result);
1293
+ expect(state.text).toBe('@packages');
1294
+ expect(state.cursor).toEqual([0, 9]); // cursor after 'typescript'
1295
+ });
1296
+ it('should replace a multi-line range with single-line text', () => {
1297
+ const { result } = renderHook(() => useTextBuffer({
1298
+ initialText: 'hello\nworld\nagain',
1299
+ viewport,
1300
+ isValidPath: () => false,
1301
+ }));
1302
+ act(() => result.current.replaceRange(0, 2, 1, 3, ' new ')); // replace 'llo\nwor' with ' new '
1303
+ const state = getBufferState(result);
1304
+ expect(state.text).toBe('he new ld\nagain');
1305
+ expect(state.cursor).toEqual([0, 7]); // cursor after ' new '
1306
+ });
1307
+ it('should delete a range when replacing with an empty string', () => {
1308
+ const { result } = renderHook(() => useTextBuffer({
1309
+ initialText: 'hello world',
1310
+ viewport,
1311
+ isValidPath: () => false,
1312
+ }));
1313
+ act(() => result.current.replaceRange(0, 5, 0, 11, '')); // delete ' world'
1314
+ const state = getBufferState(result);
1315
+ expect(state.text).toBe('hello');
1316
+ expect(state.cursor).toEqual([0, 5]);
1317
+ });
1318
+ it('should handle replacing at the beginning of the text', () => {
1319
+ const { result } = renderHook(() => useTextBuffer({
1320
+ initialText: 'world',
1321
+ viewport,
1322
+ isValidPath: () => false,
1323
+ }));
1324
+ act(() => result.current.replaceRange(0, 0, 0, 0, 'hello '));
1325
+ const state = getBufferState(result);
1326
+ expect(state.text).toBe('hello world');
1327
+ expect(state.cursor).toEqual([0, 6]);
1328
+ });
1329
+ it('should handle replacing at the end of the text', () => {
1330
+ const { result } = renderHook(() => useTextBuffer({
1331
+ initialText: 'hello',
1332
+ viewport,
1333
+ isValidPath: () => false,
1334
+ }));
1335
+ act(() => result.current.replaceRange(0, 5, 0, 5, ' world'));
1336
+ const state = getBufferState(result);
1337
+ expect(state.text).toBe('hello world');
1338
+ expect(state.cursor).toEqual([0, 11]);
1339
+ });
1340
+ it('should handle replacing the entire buffer content', () => {
1341
+ const { result } = renderHook(() => useTextBuffer({
1342
+ initialText: 'old text',
1343
+ viewport,
1344
+ isValidPath: () => false,
1345
+ }));
1346
+ act(() => result.current.replaceRange(0, 0, 0, 8, 'new text'));
1347
+ const state = getBufferState(result);
1348
+ expect(state.text).toBe('new text');
1349
+ expect(state.cursor).toEqual([0, 8]);
1350
+ });
1351
+ it('should correctly replace with unicode characters', () => {
1352
+ const { result } = renderHook(() => useTextBuffer({
1353
+ initialText: 'hello *** world',
1354
+ viewport,
1355
+ isValidPath: () => false,
1356
+ }));
1357
+ act(() => result.current.replaceRange(0, 6, 0, 9, '你好'));
1358
+ const state = getBufferState(result);
1359
+ expect(state.text).toBe('hello 你好 world');
1360
+ expect(state.cursor).toEqual([0, 8]); // after '你好'
1361
+ });
1362
+ it('should handle invalid range by returning false and not changing text', () => {
1363
+ const { result } = renderHook(() => useTextBuffer({
1364
+ initialText: 'test',
1365
+ viewport,
1366
+ isValidPath: () => false,
1367
+ }));
1368
+ act(() => {
1369
+ result.current.replaceRange(0, 5, 0, 3, 'fail'); // startCol > endCol in same line
1370
+ });
1371
+ expect(getBufferState(result).text).toBe('test');
1372
+ act(() => {
1373
+ result.current.replaceRange(1, 0, 0, 0, 'fail'); // startRow > endRow
1374
+ });
1375
+ expect(getBufferState(result).text).toBe('test');
1376
+ });
1377
+ it('replaceRange: multiple lines with a single character', () => {
1378
+ const { result } = renderHook(() => useTextBuffer({
1379
+ initialText: 'first\nsecond\nthird',
1380
+ viewport,
1381
+ isValidPath: () => false,
1382
+ }));
1383
+ act(() => result.current.replaceRange(0, 2, 2, 3, 'X')); // Replace 'rst\nsecond\nthi'
1384
+ const state = getBufferState(result);
1385
+ expect(state.text).toBe('fiXrd');
1386
+ expect(state.cursor).toEqual([0, 3]); // After 'X'
1387
+ });
1388
+ it('should replace a single-line range with multi-line text', () => {
1389
+ const { result } = renderHook(() => useTextBuffer({
1390
+ initialText: 'one two three',
1391
+ viewport,
1392
+ isValidPath: () => false,
1393
+ }));
1394
+ // Replace "two" with "new\nline"
1395
+ act(() => result.current.replaceRange(0, 4, 0, 7, 'new\nline'));
1396
+ const state = getBufferState(result);
1397
+ expect(state.lines).toEqual(['one new', 'line three']);
1398
+ expect(state.text).toBe('one new\nline three');
1399
+ expect(state.cursor).toEqual([1, 4]); // cursor after 'line'
1400
+ });
1401
+ });
1402
+ describe('Input Sanitization', () => {
1403
+ const createInput = (sequence) => ({
1404
+ name: '',
1405
+ shift: false,
1406
+ alt: false,
1407
+ ctrl: false,
1408
+ cmd: false,
1409
+ insertable: true,
1410
+ sequence,
1411
+ });
1412
+ it.each([
1413
+ {
1414
+ input: '\x1B[31mHello\x1B[0m \x1B[32mWorld\x1B[0m',
1415
+ expected: 'Hello World',
1416
+ desc: 'ANSI escape codes',
1417
+ },
1418
+ {
1419
+ input: 'H\x07e\x08l\x0Bl\x0Co',
1420
+ expected: 'Hello',
1421
+ desc: 'control characters',
1422
+ },
1423
+ {
1424
+ input: '\u001B[4mH\u001B[0mello',
1425
+ expected: 'Hello',
1426
+ desc: 'mixed ANSI and control characters',
1427
+ },
1428
+ {
1429
+ input: '\u001B[4mPasted\u001B[4m Text',
1430
+ expected: 'Pasted Text',
1431
+ desc: 'pasted text with ANSI',
1432
+ },
1433
+ ])('should strip $desc from input', ({ input, expected }) => {
1434
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1435
+ act(() => result.current.handleInput(createInput(input)));
1436
+ expect(getBufferState(result).text).toBe(expected);
1437
+ });
1438
+ it('should not strip standard characters or newlines', () => {
1439
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1440
+ const validText = 'Hello World\nThis is a test.';
1441
+ act(() => result.current.handleInput(createInput(validText)));
1442
+ expect(getBufferState(result).text).toBe(validText);
1443
+ });
1444
+ it('should sanitize large text (>5000 chars) and strip unsafe characters', () => {
1445
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1446
+ const unsafeChars = '\x07\x08\x0B\x0C';
1447
+ const largeTextWithUnsafe = 'safe text'.repeat(600) + unsafeChars + 'more safe text';
1448
+ expect(largeTextWithUnsafe.length).toBeGreaterThan(5000);
1449
+ act(() => result.current.handleInput({
1450
+ name: '',
1451
+ shift: false,
1452
+ alt: false,
1453
+ ctrl: false,
1454
+ cmd: false,
1455
+ insertable: true,
1456
+ sequence: largeTextWithUnsafe,
1457
+ }));
1458
+ const resultText = getBufferState(result).text;
1459
+ expect(resultText).not.toContain('\x07');
1460
+ expect(resultText).not.toContain('\x08');
1461
+ expect(resultText).not.toContain('\x0B');
1462
+ expect(resultText).not.toContain('\x0C');
1463
+ expect(resultText).toContain('safe text');
1464
+ expect(resultText).toContain('more safe text');
1465
+ });
1466
+ it('should sanitize large ANSI text (>5000 chars) and strip escape codes', () => {
1467
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1468
+ const largeTextWithAnsi = '\x1B[31m' +
1469
+ 'red text'.repeat(800) +
1470
+ '\x1B[0m' +
1471
+ '\x1B[32m' +
1472
+ 'green text'.repeat(200) +
1473
+ '\x1B[0m';
1474
+ expect(largeTextWithAnsi.length).toBeGreaterThan(5000);
1475
+ act(() => result.current.handleInput({
1476
+ name: '',
1477
+ shift: false,
1478
+ alt: false,
1479
+ ctrl: false,
1480
+ cmd: false,
1481
+ insertable: true,
1482
+ sequence: largeTextWithAnsi,
1483
+ }));
1484
+ const resultText = getBufferState(result).text;
1485
+ expect(resultText).not.toContain('\x1B[31m');
1486
+ expect(resultText).not.toContain('\x1B[32m');
1487
+ expect(resultText).not.toContain('\x1B[0m');
1488
+ expect(resultText).toContain('red text');
1489
+ expect(resultText).toContain('green text');
1490
+ });
1491
+ it('should not strip popular emojis', () => {
1492
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath: () => false }));
1493
+ const emojis = '🐍🐳🦀🦄';
1494
+ act(() => result.current.handleInput({
1495
+ name: '',
1496
+ shift: false,
1497
+ alt: false,
1498
+ ctrl: false,
1499
+ cmd: false,
1500
+ insertable: true,
1501
+ sequence: emojis,
1502
+ }));
1503
+ expect(getBufferState(result).text).toBe(emojis);
1504
+ });
1505
+ });
1506
+ describe('inputFilter', () => {
1507
+ it('should filter input based on the provided filter function', () => {
1508
+ const { result } = renderHook(() => useTextBuffer({
1509
+ viewport,
1510
+ isValidPath: () => false,
1511
+ inputFilter: (text) => text.replace(/[^0-9]/g, ''),
1512
+ }));
1513
+ act(() => result.current.insert('a1b2c3'));
1514
+ expect(getBufferState(result).text).toBe('123');
1515
+ });
1516
+ it('should handle empty result from filter', () => {
1517
+ const { result } = renderHook(() => useTextBuffer({
1518
+ viewport,
1519
+ isValidPath: () => false,
1520
+ inputFilter: (text) => text.replace(/[^0-9]/g, ''),
1521
+ }));
1522
+ act(() => result.current.insert('abc'));
1523
+ expect(getBufferState(result).text).toBe('');
1524
+ });
1525
+ it('should filter pasted text', () => {
1526
+ const { result } = renderHook(() => useTextBuffer({
1527
+ viewport,
1528
+ isValidPath: () => false,
1529
+ inputFilter: (text) => text.toUpperCase(),
1530
+ }));
1531
+ act(() => result.current.insert('hello', { paste: true }));
1532
+ expect(getBufferState(result).text).toBe('HELLO');
1533
+ });
1534
+ it('should not filter newlines if they are allowed by the filter', () => {
1535
+ const { result } = renderHook(() => useTextBuffer({
1536
+ viewport,
1537
+ isValidPath: () => false,
1538
+ inputFilter: (text) => text, // Allow everything including newlines
1539
+ }));
1540
+ act(() => result.current.insert('a\nb'));
1541
+ // The insert function splits by newline and inserts separately if it detects them.
1542
+ // If the filter allows them, they should be handled correctly by the subsequent logic in insert.
1543
+ expect(getBufferState(result).text).toBe('a\nb');
1544
+ });
1545
+ it('should filter before newline check in insert', () => {
1546
+ const { result } = renderHook(() => useTextBuffer({
1547
+ viewport,
1548
+ isValidPath: () => false,
1549
+ inputFilter: (text) => text.replace(/\n/g, ''), // Filter out newlines
1550
+ }));
1551
+ act(() => result.current.insert('a\nb'));
1552
+ expect(getBufferState(result).text).toBe('ab');
1553
+ });
1554
+ });
1555
+ describe('stripAnsi', () => {
1556
+ it('should correctly strip ANSI escape codes', () => {
1557
+ const textWithAnsi = '\x1B[31mHello\x1B[0m World';
1558
+ expect(stripAnsi(textWithAnsi)).toBe('Hello World');
1559
+ });
1560
+ it('should handle multiple ANSI codes', () => {
1561
+ const textWithMultipleAnsi = '\x1B[1m\x1B[34mBold Blue\x1B[0m Text';
1562
+ expect(stripAnsi(textWithMultipleAnsi)).toBe('Bold Blue Text');
1563
+ });
1564
+ it('should not modify text without ANSI codes', () => {
1565
+ const plainText = 'Plain text';
1566
+ expect(stripAnsi(plainText)).toBe('Plain text');
1567
+ });
1568
+ it('should handle empty string', () => {
1569
+ expect(stripAnsi('')).toBe('');
1570
+ });
1571
+ });
1572
+ describe('Memoization', () => {
1573
+ it('should keep action references stable across re-renders', () => {
1574
+ // We pass a stable `isValidPath` so that callbacks that depend on it
1575
+ // are not recreated on every render.
1576
+ const isValidPath = () => false;
1577
+ const { result, rerender } = renderHook(() => useTextBuffer({ viewport, isValidPath }));
1578
+ const initialInsert = result.current.insert;
1579
+ const initialBackspace = result.current.backspace;
1580
+ const initialMove = result.current.move;
1581
+ const initialHandleInput = result.current.handleInput;
1582
+ rerender();
1583
+ expect(result.current.insert).toBe(initialInsert);
1584
+ expect(result.current.backspace).toBe(initialBackspace);
1585
+ expect(result.current.move).toBe(initialMove);
1586
+ expect(result.current.handleInput).toBe(initialHandleInput);
1587
+ });
1588
+ it('should have memoized actions that operate on the latest state', () => {
1589
+ const isValidPath = () => false;
1590
+ const { result } = renderHook(() => useTextBuffer({ viewport, isValidPath }));
1591
+ // Store a reference to the memoized insert function.
1592
+ const memoizedInsert = result.current.insert;
1593
+ // Update the buffer state.
1594
+ act(() => {
1595
+ result.current.insert('hello');
1596
+ });
1597
+ expect(getBufferState(result).text).toBe('hello');
1598
+ // Now, call the original memoized function reference.
1599
+ act(() => {
1600
+ memoizedInsert(' world');
1601
+ });
1602
+ // It should have operated on the updated state.
1603
+ expect(getBufferState(result).text).toBe('hello world');
1604
+ });
1605
+ });
1606
+ describe('singleLine mode', () => {
1607
+ it('should not insert a newline character when singleLine is true', () => {
1608
+ const { result } = renderHook(() => useTextBuffer({
1609
+ viewport,
1610
+ isValidPath: () => false,
1611
+ singleLine: true,
1612
+ }));
1613
+ act(() => result.current.insert('\n'));
1614
+ const state = getBufferState(result);
1615
+ expect(state.text).toBe('');
1616
+ expect(state.lines).toEqual(['']);
1617
+ });
1618
+ it('should not create a new line when newline() is called and singleLine is true', () => {
1619
+ const { result } = renderHook(() => useTextBuffer({
1620
+ initialText: 'ab',
1621
+ viewport,
1622
+ isValidPath: () => false,
1623
+ singleLine: true,
1624
+ }));
1625
+ act(() => result.current.move('end')); // cursor at [0,2]
1626
+ act(() => result.current.newline());
1627
+ const state = getBufferState(result);
1628
+ expect(state.text).toBe('ab');
1629
+ expect(state.lines).toEqual(['ab']);
1630
+ expect(state.cursor).toEqual([0, 2]);
1631
+ });
1632
+ it('should not handle "Enter" key as newline when singleLine is true', () => {
1633
+ const { result } = renderHook(() => useTextBuffer({
1634
+ viewport,
1635
+ isValidPath: () => false,
1636
+ singleLine: true,
1637
+ }));
1638
+ act(() => result.current.handleInput({
1639
+ name: 'return',
1640
+ shift: false,
1641
+ alt: false,
1642
+ ctrl: false,
1643
+ cmd: false,
1644
+ insertable: true,
1645
+ sequence: '\r',
1646
+ }));
1647
+ expect(getBufferState(result).lines).toEqual(['']);
1648
+ });
1649
+ it('should not print anything for function keys when singleLine is true', () => {
1650
+ const { result } = renderHook(() => useTextBuffer({
1651
+ viewport,
1652
+ isValidPath: () => false,
1653
+ singleLine: true,
1654
+ }));
1655
+ act(() => result.current.handleInput({
1656
+ name: 'f1',
1657
+ shift: false,
1658
+ alt: false,
1659
+ ctrl: false,
1660
+ cmd: false,
1661
+ insertable: false,
1662
+ sequence: '\u001bOP',
1663
+ }));
1664
+ expect(getBufferState(result).lines).toEqual(['']);
1665
+ });
1666
+ it('should strip newlines from pasted text when singleLine is true', () => {
1667
+ const { result } = renderHook(() => useTextBuffer({
1668
+ viewport,
1669
+ isValidPath: () => false,
1670
+ singleLine: true,
1671
+ }));
1672
+ act(() => result.current.insert('hello\nworld', { paste: true }));
1673
+ const state = getBufferState(result);
1674
+ expect(state.text).toBe('helloworld');
1675
+ expect(state.lines).toEqual(['helloworld']);
1676
+ });
1677
+ });
1678
+ });
1679
+ describe('offsetToLogicalPos', () => {
1680
+ it.each([
1681
+ { text: 'any text', offset: 0, expected: [0, 0], desc: 'offset 0' },
1682
+ { text: 'hello', offset: 0, expected: [0, 0], desc: 'single line start' },
1683
+ { text: 'hello', offset: 2, expected: [0, 2], desc: 'single line middle' },
1684
+ { text: 'hello', offset: 5, expected: [0, 5], desc: 'single line end' },
1685
+ { text: 'hello', offset: 10, expected: [0, 5], desc: 'beyond end clamps' },
1686
+ {
1687
+ text: 'a\n\nc',
1688
+ offset: 0,
1689
+ expected: [0, 0],
1690
+ desc: 'empty lines - first char',
1691
+ },
1692
+ {
1693
+ text: 'a\n\nc',
1694
+ offset: 1,
1695
+ expected: [0, 1],
1696
+ desc: 'empty lines - end of first',
1697
+ },
1698
+ {
1699
+ text: 'a\n\nc',
1700
+ offset: 2,
1701
+ expected: [1, 0],
1702
+ desc: 'empty lines - empty line',
1703
+ },
1704
+ {
1705
+ text: 'a\n\nc',
1706
+ offset: 3,
1707
+ expected: [2, 0],
1708
+ desc: 'empty lines - last line start',
1709
+ },
1710
+ {
1711
+ text: 'a\n\nc',
1712
+ offset: 4,
1713
+ expected: [2, 1],
1714
+ desc: 'empty lines - last line end',
1715
+ },
1716
+ {
1717
+ text: 'hello\n',
1718
+ offset: 5,
1719
+ expected: [0, 5],
1720
+ desc: 'newline end - before newline',
1721
+ },
1722
+ {
1723
+ text: 'hello\n',
1724
+ offset: 6,
1725
+ expected: [1, 0],
1726
+ desc: 'newline end - after newline',
1727
+ },
1728
+ {
1729
+ text: 'hello\n',
1730
+ offset: 7,
1731
+ expected: [1, 0],
1732
+ desc: 'newline end - beyond',
1733
+ },
1734
+ {
1735
+ text: '\nhello',
1736
+ offset: 0,
1737
+ expected: [0, 0],
1738
+ desc: 'newline start - first line',
1739
+ },
1740
+ {
1741
+ text: '\nhello',
1742
+ offset: 1,
1743
+ expected: [1, 0],
1744
+ desc: 'newline start - second line',
1745
+ },
1746
+ {
1747
+ text: '\nhello',
1748
+ offset: 3,
1749
+ expected: [1, 2],
1750
+ desc: 'newline start - middle of second',
1751
+ },
1752
+ { text: '', offset: 0, expected: [0, 0], desc: 'empty string at 0' },
1753
+ { text: '', offset: 5, expected: [0, 0], desc: 'empty string beyond' },
1754
+ {
1755
+ text: '你好\n世界',
1756
+ offset: 0,
1757
+ expected: [0, 0],
1758
+ desc: 'unicode - start',
1759
+ },
1760
+ {
1761
+ text: '你好\n世界',
1762
+ offset: 1,
1763
+ expected: [0, 1],
1764
+ desc: 'unicode - after first char',
1765
+ },
1766
+ {
1767
+ text: '你好\n世界',
1768
+ offset: 2,
1769
+ expected: [0, 2],
1770
+ desc: 'unicode - end first line',
1771
+ },
1772
+ {
1773
+ text: '你好\n世界',
1774
+ offset: 3,
1775
+ expected: [1, 0],
1776
+ desc: 'unicode - second line start',
1777
+ },
1778
+ {
1779
+ text: '你好\n世界',
1780
+ offset: 4,
1781
+ expected: [1, 1],
1782
+ desc: 'unicode - second line middle',
1783
+ },
1784
+ {
1785
+ text: '你好\n世界',
1786
+ offset: 5,
1787
+ expected: [1, 2],
1788
+ desc: 'unicode - second line end',
1789
+ },
1790
+ {
1791
+ text: '你好\n世界',
1792
+ offset: 6,
1793
+ expected: [1, 2],
1794
+ desc: 'unicode - beyond',
1795
+ },
1796
+ {
1797
+ text: 'abc\ndef',
1798
+ offset: 3,
1799
+ expected: [0, 3],
1800
+ desc: 'at newline - end of line',
1801
+ },
1802
+ {
1803
+ text: 'abc\ndef',
1804
+ offset: 4,
1805
+ expected: [1, 0],
1806
+ desc: 'at newline - after newline',
1807
+ },
1808
+ { text: '🐶🐱', offset: 0, expected: [0, 0], desc: 'emoji - start' },
1809
+ { text: '🐶🐱', offset: 1, expected: [0, 1], desc: 'emoji - middle' },
1810
+ { text: '🐶🐱', offset: 2, expected: [0, 2], desc: 'emoji - end' },
1811
+ ])('should handle $desc', ({ text, offset, expected }) => {
1812
+ expect(offsetToLogicalPos(text, offset)).toEqual(expected);
1813
+ });
1814
+ describe('multi-line text', () => {
1815
+ const text = 'hello\nworld\n123';
1816
+ it.each([
1817
+ { offset: 0, expected: [0, 0], desc: 'start of first line' },
1818
+ { offset: 3, expected: [0, 3], desc: 'middle of first line' },
1819
+ { offset: 5, expected: [0, 5], desc: 'end of first line' },
1820
+ { offset: 6, expected: [1, 0], desc: 'start of second line' },
1821
+ { offset: 8, expected: [1, 2], desc: 'middle of second line' },
1822
+ { offset: 11, expected: [1, 5], desc: 'end of second line' },
1823
+ { offset: 12, expected: [2, 0], desc: 'start of third line' },
1824
+ { offset: 13, expected: [2, 1], desc: 'middle of third line' },
1825
+ { offset: 15, expected: [2, 3], desc: 'end of third line' },
1826
+ { offset: 20, expected: [2, 3], desc: 'beyond end' },
1827
+ ])('should return $expected for $desc (offset $offset)', ({ offset, expected }) => {
1828
+ expect(offsetToLogicalPos(text, offset)).toEqual(expected);
1829
+ });
1830
+ });
1831
+ });
1832
+ describe('logicalPosToOffset', () => {
1833
+ it('should convert row/col position to offset correctly', () => {
1834
+ const lines = ['hello', 'world', '123'];
1835
+ // Line 0: "hello" (5 chars)
1836
+ expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // Start of 'hello'
1837
+ expect(logicalPosToOffset(lines, 0, 3)).toBe(3); // 'l' in 'hello'
1838
+ expect(logicalPosToOffset(lines, 0, 5)).toBe(5); // End of 'hello'
1839
+ // Line 1: "world" (5 chars), offset starts at 6 (5 + 1 for newline)
1840
+ expect(logicalPosToOffset(lines, 1, 0)).toBe(6); // Start of 'world'
1841
+ expect(logicalPosToOffset(lines, 1, 2)).toBe(8); // 'r' in 'world'
1842
+ expect(logicalPosToOffset(lines, 1, 5)).toBe(11); // End of 'world'
1843
+ // Line 2: "123" (3 chars), offset starts at 12 (5 + 1 + 5 + 1)
1844
+ expect(logicalPosToOffset(lines, 2, 0)).toBe(12); // Start of '123'
1845
+ expect(logicalPosToOffset(lines, 2, 1)).toBe(13); // '2' in '123'
1846
+ expect(logicalPosToOffset(lines, 2, 3)).toBe(15); // End of '123'
1847
+ });
1848
+ it('should handle empty lines', () => {
1849
+ const lines = ['a', '', 'c'];
1850
+ expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // 'a'
1851
+ expect(logicalPosToOffset(lines, 0, 1)).toBe(1); // End of 'a'
1852
+ expect(logicalPosToOffset(lines, 1, 0)).toBe(2); // Empty line
1853
+ expect(logicalPosToOffset(lines, 2, 0)).toBe(3); // 'c'
1854
+ expect(logicalPosToOffset(lines, 2, 1)).toBe(4); // End of 'c'
1855
+ });
1856
+ it('should handle single empty line', () => {
1857
+ const lines = [''];
1858
+ expect(logicalPosToOffset(lines, 0, 0)).toBe(0);
1859
+ });
1860
+ it('should be inverse of offsetToLogicalPos', () => {
1861
+ const lines = ['hello', 'world', '123'];
1862
+ const text = lines.join('\n');
1863
+ // Test round-trip conversion
1864
+ for (let offset = 0; offset <= text.length; offset++) {
1865
+ const [row, col] = offsetToLogicalPos(text, offset);
1866
+ const convertedOffset = logicalPosToOffset(lines, row, col);
1867
+ expect(convertedOffset).toBe(offset);
1868
+ }
1869
+ });
1870
+ it('should handle out-of-bounds positions', () => {
1871
+ const lines = ['hello'];
1872
+ // Beyond end of line
1873
+ expect(logicalPosToOffset(lines, 0, 10)).toBe(5); // Clamps to end of line
1874
+ // Beyond array bounds - should clamp to the last line
1875
+ expect(logicalPosToOffset(lines, 5, 0)).toBe(0); // Clamps to start of last line (row 0)
1876
+ expect(logicalPosToOffset(lines, 5, 10)).toBe(5); // Clamps to end of last line
1877
+ });
1878
+ });
1879
+ const createTestState = (lines, cursorRow, cursorCol, viewportWidth = 80) => {
1880
+ const text = lines.join('\n');
1881
+ let state = textBufferReducer(initialState, {
1882
+ type: 'set_text',
1883
+ payload: text,
1884
+ });
1885
+ state = textBufferReducer(state, {
1886
+ type: 'set_cursor',
1887
+ payload: { cursorRow, cursorCol, preferredCol: null },
1888
+ });
1889
+ state = textBufferReducer(state, {
1890
+ type: 'set_viewport',
1891
+ payload: { width: viewportWidth, height: 24 },
1892
+ });
1893
+ return state;
1894
+ };
1895
+ describe('textBufferReducer vim operations', () => {
1896
+ describe('vim_delete_line', () => {
1897
+ it('should delete a single line including newline in multi-line text', () => {
1898
+ const state = createTestState(['line1', 'line2', 'line3'], 1, 2);
1899
+ const action = {
1900
+ type: 'vim_delete_line',
1901
+ payload: { count: 1 },
1902
+ };
1903
+ const result = textBufferReducer(state, action);
1904
+ expect(result).toHaveOnlyValidCharacters();
1905
+ // After deleting line2, we should have line1 and line3, with cursor on line3 (now at index 1)
1906
+ expect(result.lines).toEqual(['line1', 'line3']);
1907
+ expect(result.cursorRow).toBe(1);
1908
+ expect(result.cursorCol).toBe(0);
1909
+ });
1910
+ it('should delete multiple lines when count > 1', () => {
1911
+ const state = createTestState(['line1', 'line2', 'line3', 'line4'], 1, 0);
1912
+ const action = {
1913
+ type: 'vim_delete_line',
1914
+ payload: { count: 2 },
1915
+ };
1916
+ const result = textBufferReducer(state, action);
1917
+ expect(result).toHaveOnlyValidCharacters();
1918
+ // Should delete line2 and line3, leaving line1 and line4
1919
+ expect(result.lines).toEqual(['line1', 'line4']);
1920
+ expect(result.cursorRow).toBe(1);
1921
+ expect(result.cursorCol).toBe(0);
1922
+ });
1923
+ it('should clear single line content when only one line exists', () => {
1924
+ const state = createTestState(['only line'], 0, 5);
1925
+ const action = {
1926
+ type: 'vim_delete_line',
1927
+ payload: { count: 1 },
1928
+ };
1929
+ const result = textBufferReducer(state, action);
1930
+ expect(result).toHaveOnlyValidCharacters();
1931
+ // Should clear the line content but keep the line
1932
+ expect(result.lines).toEqual(['']);
1933
+ expect(result.cursorRow).toBe(0);
1934
+ expect(result.cursorCol).toBe(0);
1935
+ });
1936
+ it('should handle deleting the last line properly', () => {
1937
+ const state = createTestState(['line1', 'line2'], 1, 0);
1938
+ const action = {
1939
+ type: 'vim_delete_line',
1940
+ payload: { count: 1 },
1941
+ };
1942
+ const result = textBufferReducer(state, action);
1943
+ expect(result).toHaveOnlyValidCharacters();
1944
+ // Should delete the last line completely, not leave empty line
1945
+ expect(result.lines).toEqual(['line1']);
1946
+ expect(result.cursorRow).toBe(0);
1947
+ expect(result.cursorCol).toBe(0);
1948
+ });
1949
+ it('should handle deleting all lines and maintain valid state for subsequent paste', () => {
1950
+ const state = createTestState(['line1', 'line2', 'line3', 'line4'], 0, 0);
1951
+ // Delete all 4 lines with 4dd
1952
+ const deleteAction = {
1953
+ type: 'vim_delete_line',
1954
+ payload: { count: 4 },
1955
+ };
1956
+ const afterDelete = textBufferReducer(state, deleteAction);
1957
+ expect(afterDelete).toHaveOnlyValidCharacters();
1958
+ // After deleting all lines, should have one empty line
1959
+ expect(afterDelete.lines).toEqual(['']);
1960
+ expect(afterDelete.cursorRow).toBe(0);
1961
+ expect(afterDelete.cursorCol).toBe(0);
1962
+ // Now paste multiline content - this should work correctly
1963
+ const pasteAction = {
1964
+ type: 'insert',
1965
+ payload: 'new1\nnew2\nnew3\nnew4',
1966
+ };
1967
+ const afterPaste = textBufferReducer(afterDelete, pasteAction);
1968
+ expect(afterPaste).toHaveOnlyValidCharacters();
1969
+ // All lines including the first one should be present
1970
+ expect(afterPaste.lines).toEqual(['new1', 'new2', 'new3', 'new4']);
1971
+ expect(afterPaste.cursorRow).toBe(3);
1972
+ expect(afterPaste.cursorCol).toBe(4);
1973
+ });
1974
+ });
1975
+ });
1976
+ describe('Unicode helper functions', () => {
1977
+ describe('findWordEndInLine with Unicode', () => {
1978
+ it('should handle combining characters', () => {
1979
+ // café with combining accent
1980
+ const cafeWithCombining = 'cafe\u0301';
1981
+ const result = findWordEndInLine(cafeWithCombining + ' test', 0);
1982
+ expect(result).toBe(3); // End of 'café' at base character 'e', not combining accent
1983
+ });
1984
+ it('should handle precomposed characters with diacritics', () => {
1985
+ // café with precomposed é (U+00E9)
1986
+ const cafePrecomposed = 'café';
1987
+ const result = findWordEndInLine(cafePrecomposed + ' test', 0);
1988
+ expect(result).toBe(3); // End of 'café' at precomposed character 'é'
1989
+ });
1990
+ it('should return null when no word end found', () => {
1991
+ const result = findWordEndInLine(' ', 0);
1992
+ expect(result).toBeNull(); // No word end found in whitespace-only string string
1993
+ });
1994
+ });
1995
+ describe('findNextWordStartInLine with Unicode', () => {
1996
+ it('should handle right-to-left text', () => {
1997
+ const result = findNextWordStartInLine('hello مرحبا world', 0);
1998
+ expect(result).toBe(6); // Start of Arabic word
1999
+ });
2000
+ it('should handle Chinese characters', () => {
2001
+ const result = findNextWordStartInLine('hello 你好 world', 0);
2002
+ expect(result).toBe(6); // Start of Chinese word
2003
+ });
2004
+ it('should return null at end of line', () => {
2005
+ const result = findNextWordStartInLine('hello', 10);
2006
+ expect(result).toBeNull();
2007
+ });
2008
+ it('should handle combining characters', () => {
2009
+ // café with combining accent + next word
2010
+ const textWithCombining = 'cafe\u0301 test';
2011
+ const result = findNextWordStartInLine(textWithCombining, 0);
2012
+ expect(result).toBe(6); // Start of 'test' after 'café ' (combining char makes string longer)
2013
+ });
2014
+ it('should handle precomposed characters with diacritics', () => {
2015
+ // café with precomposed é + next word
2016
+ const textPrecomposed = 'café test';
2017
+ const result = findNextWordStartInLine(textPrecomposed, 0);
2018
+ expect(result).toBe(5); // Start of 'test' after 'café '
2019
+ });
2020
+ });
2021
+ describe('isWordCharStrict with Unicode', () => {
2022
+ it('should return true for ASCII word characters', () => {
2023
+ expect(isWordCharStrict('a')).toBe(true);
2024
+ expect(isWordCharStrict('Z')).toBe(true);
2025
+ expect(isWordCharStrict('0')).toBe(true);
2026
+ expect(isWordCharStrict('_')).toBe(true);
2027
+ });
2028
+ it('should return false for punctuation', () => {
2029
+ expect(isWordCharStrict('.')).toBe(false);
2030
+ expect(isWordCharStrict(',')).toBe(false);
2031
+ expect(isWordCharStrict('!')).toBe(false);
2032
+ });
2033
+ it('should return true for non-Latin scripts', () => {
2034
+ expect(isWordCharStrict('你')).toBe(true); // Chinese character
2035
+ expect(isWordCharStrict('م')).toBe(true); // Arabic character
2036
+ });
2037
+ it('should return false for whitespace', () => {
2038
+ expect(isWordCharStrict(' ')).toBe(false);
2039
+ expect(isWordCharStrict('\t')).toBe(false);
2040
+ });
2041
+ });
2042
+ describe('cpLen with Unicode', () => {
2043
+ it('should handle combining characters', () => {
2044
+ expect(cpLen('é')).toBe(1); // Precomposed
2045
+ expect(cpLen('e\u0301')).toBe(2); // e + combining acute
2046
+ });
2047
+ it('should handle Chinese and Arabic text', () => {
2048
+ expect(cpLen('hello 你好 world')).toBe(14); // 5 + 1 + 2 + 1 + 5 = 14
2049
+ expect(cpLen('hello مرحبا world')).toBe(17);
2050
+ });
2051
+ });
2052
+ describe('useTextBuffer CJK Navigation', () => {
2053
+ const viewport = { width: 80, height: 24 };
2054
+ it('should navigate by word in Chinese', () => {
2055
+ const { result } = renderHook(() => useTextBuffer({
2056
+ initialText: '你好世界',
2057
+ initialCursorOffset: 4, // End of string
2058
+ viewport,
2059
+ isValidPath: () => false,
2060
+ }));
2061
+ // Initial state: cursor at end (index 2 in code points if 4 is length? wait. length is 2 code points? No. '你好世界' length is 4.)
2062
+ // '你好世界' length is 4. Code points length is 4.
2063
+ // Move word left
2064
+ act(() => {
2065
+ result.current.move('wordLeft');
2066
+ });
2067
+ // Should be at start of "世界" (index 2)
2068
+ // "你好世界" -> "你好" | "世界"
2069
+ expect(result.current.cursor[1]).toBe(2);
2070
+ // Move word left again
2071
+ act(() => {
2072
+ result.current.move('wordLeft');
2073
+ });
2074
+ // Should be at start of "你好" (index 0)
2075
+ expect(result.current.cursor[1]).toBe(0);
2076
+ // Move word left again (should stay at 0)
2077
+ act(() => {
2078
+ result.current.move('wordLeft');
2079
+ });
2080
+ expect(result.current.cursor[1]).toBe(0);
2081
+ // Move word right
2082
+ act(() => {
2083
+ result.current.move('wordRight');
2084
+ });
2085
+ // Should be at end of "你好" (index 2)
2086
+ expect(result.current.cursor[1]).toBe(2);
2087
+ // Move word right again
2088
+ act(() => {
2089
+ result.current.move('wordRight');
2090
+ });
2091
+ // Should be at end of "世界" (index 4)
2092
+ expect(result.current.cursor[1]).toBe(4);
2093
+ // Move word right again (should stay at end)
2094
+ act(() => {
2095
+ result.current.move('wordRight');
2096
+ });
2097
+ expect(result.current.cursor[1]).toBe(4);
2098
+ });
2099
+ it('should navigate mixed English and Chinese', () => {
2100
+ const { result } = renderHook(() => useTextBuffer({
2101
+ initialText: 'Hello你好World',
2102
+ initialCursorOffset: 10, // End
2103
+ viewport,
2104
+ isValidPath: () => false,
2105
+ }));
2106
+ // Hello (5) + 你好 (2) + World (5) = 12 chars.
2107
+ // initialCursorOffset 10? 'Hello你好World'.length is 12.
2108
+ // Let's set it to end.
2109
+ act(() => {
2110
+ result.current.move('end');
2111
+ });
2112
+ expect(result.current.cursor[1]).toBe(12);
2113
+ // wordLeft -> start of "World" (index 7)
2114
+ act(() => result.current.move('wordLeft'));
2115
+ expect(result.current.cursor[1]).toBe(7);
2116
+ // wordLeft -> start of "你好" (index 5)
2117
+ act(() => result.current.move('wordLeft'));
2118
+ expect(result.current.cursor[1]).toBe(5);
2119
+ // wordLeft -> start of "Hello" (index 0)
2120
+ act(() => result.current.move('wordLeft'));
2121
+ expect(result.current.cursor[1]).toBe(0);
2122
+ // wordLeft -> start of line (should stay at 0)
2123
+ act(() => result.current.move('wordLeft'));
2124
+ expect(result.current.cursor[1]).toBe(0);
2125
+ });
2126
+ });
2127
+ });
2128
+ describe('Transformation Utilities', () => {
2129
+ afterEach(() => {
2130
+ vi.restoreAllMocks();
2131
+ });
2132
+ describe('getTransformedImagePath', () => {
2133
+ it('should transform a simple image path', () => {
2134
+ expect(getTransformedImagePath('@test.png')).toBe('[Image test.png]');
2135
+ });
2136
+ it('should handle paths with directories', () => {
2137
+ expect(getTransformedImagePath('@path/to/image.jpg')).toBe('[Image image.jpg]');
2138
+ });
2139
+ it('should truncate long filenames', () => {
2140
+ expect(getTransformedImagePath('@verylongfilename1234567890.png')).toBe('[Image ...1234567890.png]');
2141
+ });
2142
+ it('should handle different image extensions', () => {
2143
+ expect(getTransformedImagePath('@test.jpg')).toBe('[Image test.jpg]');
2144
+ expect(getTransformedImagePath('@test.jpeg')).toBe('[Image test.jpeg]');
2145
+ expect(getTransformedImagePath('@test.gif')).toBe('[Image test.gif]');
2146
+ expect(getTransformedImagePath('@test.webp')).toBe('[Image test.webp]');
2147
+ expect(getTransformedImagePath('@test.svg')).toBe('[Image test.svg]');
2148
+ expect(getTransformedImagePath('@test.bmp')).toBe('[Image test.bmp]');
2149
+ });
2150
+ it('should handle POSIX-style forward-slash paths on any platform', () => {
2151
+ const input = '@C:/Users/foo/screenshots/image2x.png';
2152
+ expect(getTransformedImagePath(input)).toBe('[Image image2x.png]');
2153
+ });
2154
+ it('should handle Windows-style backslash paths on any platform', () => {
2155
+ const input = '@C:\\Users\\foo\\screenshots\\image2x.png';
2156
+ expect(getTransformedImagePath(input)).toBe('[Image image2x.png]');
2157
+ });
2158
+ it('should handle escaped spaces in paths', () => {
2159
+ const input = '@path/to/my\\ file.png';
2160
+ expect(getTransformedImagePath(input)).toBe('[Image my file.png]');
2161
+ });
2162
+ });
2163
+ describe('getTransformationsForLine', () => {
2164
+ it('should find transformations in a line', () => {
2165
+ const line = 'Check out @test.png and @another.jpg';
2166
+ const result = calculateTransformationsForLine(line);
2167
+ expect(result).toHaveLength(2);
2168
+ expect(result[0]).toMatchObject({
2169
+ logicalText: '@test.png',
2170
+ collapsedText: '[Image test.png]',
2171
+ });
2172
+ expect(result[1]).toMatchObject({
2173
+ logicalText: '@another.jpg',
2174
+ collapsedText: '[Image another.jpg]',
2175
+ });
2176
+ });
2177
+ it('should handle no transformations', () => {
2178
+ const line = 'Just some regular text';
2179
+ const result = calculateTransformationsForLine(line);
2180
+ expect(result).toEqual([]);
2181
+ });
2182
+ it('should handle empty line', () => {
2183
+ const result = calculateTransformationsForLine('');
2184
+ expect(result).toEqual([]);
2185
+ });
2186
+ it('should keep adjacent image paths as separate transformations', () => {
2187
+ const line = '@a.png@b.png@c.png';
2188
+ const result = calculateTransformationsForLine(line);
2189
+ expect(result).toHaveLength(3);
2190
+ expect(result[0].logicalText).toBe('@a.png');
2191
+ expect(result[1].logicalText).toBe('@b.png');
2192
+ expect(result[2].logicalText).toBe('@c.png');
2193
+ });
2194
+ it('should handle multiple transformations in a row', () => {
2195
+ const line = '@a.png @b.png @c.png';
2196
+ const result = calculateTransformationsForLine(line);
2197
+ expect(result).toHaveLength(3);
2198
+ });
2199
+ });
2200
+ describe('getTransformUnderCursor', () => {
2201
+ const transformations = [
2202
+ {
2203
+ logStart: 5,
2204
+ logEnd: 14,
2205
+ logicalText: '@test.png',
2206
+ collapsedText: '[Image @test.png]',
2207
+ type: 'image',
2208
+ },
2209
+ {
2210
+ logStart: 20,
2211
+ logEnd: 31,
2212
+ logicalText: '@another.jpg',
2213
+ collapsedText: '[Image @another.jpg]',
2214
+ type: 'image',
2215
+ },
2216
+ ];
2217
+ it('should find transformation when cursor is inside it', () => {
2218
+ const result = getTransformUnderCursor(0, 7, [transformations]);
2219
+ expect(result).toEqual(transformations[0]);
2220
+ });
2221
+ it('should find transformation when cursor is at start', () => {
2222
+ const result = getTransformUnderCursor(0, 5, [transformations]);
2223
+ expect(result).toEqual(transformations[0]);
2224
+ });
2225
+ it('should find transformation when cursor is at end', () => {
2226
+ const result = getTransformUnderCursor(0, 14, [transformations]);
2227
+ expect(result).toEqual(transformations[0]);
2228
+ });
2229
+ it('should return null when cursor is not on a transformation', () => {
2230
+ const result = getTransformUnderCursor(0, 2, [transformations]);
2231
+ expect(result).toBeNull();
2232
+ });
2233
+ it('should handle empty transformations array', () => {
2234
+ const result = getTransformUnderCursor(0, 5, []);
2235
+ expect(result).toBeNull();
2236
+ });
2237
+ });
2238
+ describe('calculateTransformedLine', () => {
2239
+ it('should transform a line with one transformation', () => {
2240
+ const line = 'Check out @test.png';
2241
+ const transformations = calculateTransformationsForLine(line);
2242
+ const result = calculateTransformedLine(line, 0, [0, 0], transformations);
2243
+ expect(result.transformedLine).toBe('Check out [Image test.png]');
2244
+ expect(result.transformedToLogMap).toHaveLength(27); // Length includes all characters in the transformed line
2245
+ // Test that we have proper mappings
2246
+ expect(result.transformedToLogMap[0]).toBe(0); // 'C'
2247
+ expect(result.transformedToLogMap[9]).toBe(9); // ' ' before transformation
2248
+ });
2249
+ it('should handle cursor inside transformation', () => {
2250
+ const line = 'Check out @test.png';
2251
+ const transformations = calculateTransformationsForLine(line);
2252
+ // Cursor at '@' (position 10 in the line)
2253
+ const result = calculateTransformedLine(line, 0, [0, 10], transformations);
2254
+ // Should show full path when cursor is on it
2255
+ expect(result.transformedLine).toBe('Check out @test.png');
2256
+ // When expanded, each character maps to itself
2257
+ expect(result.transformedToLogMap[10]).toBe(10); // '@'
2258
+ });
2259
+ it('should handle line with no transformations', () => {
2260
+ const line = 'Just some text';
2261
+ const result = calculateTransformedLine(line, 0, [0, 0], []);
2262
+ expect(result.transformedLine).toBe(line);
2263
+ // Each visual position should map directly to logical position + trailing
2264
+ expect(result.transformedToLogMap).toHaveLength(15); // 14 chars + 1 trailing
2265
+ expect(result.transformedToLogMap[0]).toBe(0);
2266
+ expect(result.transformedToLogMap[13]).toBe(13);
2267
+ expect(result.transformedToLogMap[14]).toBe(14); // Trailing position
2268
+ });
2269
+ it('should handle empty line', () => {
2270
+ const result = calculateTransformedLine('', 0, [0, 0], []);
2271
+ expect(result.transformedLine).toBe('');
2272
+ expect(result.transformedToLogMap).toEqual([0]); // Just the trailing position
2273
+ });
2274
+ });
2275
+ describe('Layout Caching and Invalidation', () => {
2276
+ it.each([
2277
+ {
2278
+ desc: 'via setText',
2279
+ actFn: (result) => result.current.setText('changed line'),
2280
+ expected: 'changed line',
2281
+ },
2282
+ {
2283
+ desc: 'via replaceRange',
2284
+ actFn: (result) => result.current.replaceRange(0, 0, 0, 13, 'changed line'),
2285
+ expected: 'changed line',
2286
+ },
2287
+ ])('should invalidate cache when line content changes $desc', ({ actFn, expected }) => {
2288
+ const viewport = { width: 80, height: 24 };
2289
+ const { result } = renderHookWithProviders(() => useTextBuffer({
2290
+ initialText: 'original line',
2291
+ viewport,
2292
+ isValidPath: () => true,
2293
+ }));
2294
+ const originalLayout = result.current.visualLayout;
2295
+ act(() => {
2296
+ actFn(result);
2297
+ });
2298
+ expect(result.current.visualLayout).not.toBe(originalLayout);
2299
+ expect(result.current.allVisualLines[0]).toBe(expected);
2300
+ });
2301
+ it('should invalidate cache when viewport width changes', () => {
2302
+ const viewport = { width: 80, height: 24 };
2303
+ const { result, rerender } = renderHookWithProviders(({ vp }) => useTextBuffer({
2304
+ initialText: 'a very long line that will wrap when the viewport is small',
2305
+ viewport: vp,
2306
+ isValidPath: () => true,
2307
+ }), { initialProps: { vp: viewport } });
2308
+ const originalLayout = result.current.visualLayout;
2309
+ // Shrink viewport to force wrapping change
2310
+ rerender({ vp: { width: 10, height: 24 } });
2311
+ expect(result.current.visualLayout).not.toBe(originalLayout);
2312
+ expect(result.current.allVisualLines.length).toBeGreaterThan(1);
2313
+ });
2314
+ it('should correctly handle cursor expansion/collapse in cached layout', () => {
2315
+ const viewport = { width: 80, height: 24 };
2316
+ const text = 'Check @image.png here';
2317
+ const { result } = renderHookWithProviders(() => useTextBuffer({
2318
+ initialText: text,
2319
+ viewport,
2320
+ isValidPath: () => true,
2321
+ }));
2322
+ // Cursor at start (collapsed)
2323
+ act(() => {
2324
+ result.current.moveToOffset(0);
2325
+ });
2326
+ expect(result.current.allVisualLines[0]).toContain('[Image image.png]');
2327
+ // Move cursor onto the @path (expanded)
2328
+ act(() => {
2329
+ result.current.moveToOffset(7); // onto @
2330
+ });
2331
+ expect(result.current.allVisualLines[0]).toContain('@image.png');
2332
+ expect(result.current.allVisualLines[0]).not.toContain('[Image image.png]');
2333
+ // Move cursor away (collapsed again)
2334
+ act(() => {
2335
+ result.current.moveToOffset(0);
2336
+ });
2337
+ expect(result.current.allVisualLines[0]).toContain('[Image image.png]');
2338
+ });
2339
+ it('should reuse cache for unchanged lines during editing', () => {
2340
+ const viewport = { width: 80, height: 24 };
2341
+ const initialText = 'line 1\nline 2\nline 3';
2342
+ const { result } = renderHookWithProviders(() => useTextBuffer({
2343
+ initialText,
2344
+ viewport,
2345
+ isValidPath: () => true,
2346
+ }));
2347
+ const layout1 = result.current.visualLayout;
2348
+ // Edit line 1
2349
+ act(() => {
2350
+ result.current.moveToOffset(0);
2351
+ result.current.insert('X');
2352
+ });
2353
+ const layout2 = result.current.visualLayout;
2354
+ expect(layout2).not.toBe(layout1);
2355
+ // Verify that visual lines for line 2 and 3 (indices 1 and 2 in visualLines)
2356
+ // are identical in content if not in object reference (the arrays are rebuilt, but contents are cached)
2357
+ expect(result.current.allVisualLines[1]).toBe('line 2');
2358
+ expect(result.current.allVisualLines[2]).toBe('line 3');
2359
+ });
2360
+ });
2361
+ });
2362
+ //# sourceMappingURL=text-buffer.test.js.map