@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,2020 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { spawnSync } from 'node:child_process';
7
+ import fs from 'node:fs';
8
+ import os from 'node:os';
9
+ import pathMod from 'node:path';
10
+ import * as path from 'node:path';
11
+ import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
12
+ import { LRUCache } from 'mnemonist';
13
+ import { coreEvents, CoreEvent, debugLogger, unescapePath, getEditorCommand, isGuiEditor, } from '@google/gemini-cli-core';
14
+ import { toCodePoints, cpLen, cpSlice, stripUnsafeCharacters, getCachedStringWidth, } from '../../utils/textUtils.js';
15
+ import { parsePastedPaths } from '../../utils/clipboardUtils.js';
16
+ import { keyMatchers, Command } from '../../keyMatchers.js';
17
+ import { handleVimAction } from './vim-buffer-actions.js';
18
+ import { LRU_BUFFER_PERF_CACHE_LIMIT } from '../../constants.js';
19
+ const LARGE_PASTE_LINE_THRESHOLD = 5;
20
+ const LARGE_PASTE_CHAR_THRESHOLD = 500;
21
+ // Regex to match paste placeholders like [Pasted Text: 6 lines] or [Pasted Text: 501 chars #2]
22
+ export const PASTED_TEXT_PLACEHOLDER_REGEX = /\[Pasted Text: \d+ (?:lines|chars)(?: #\d+)?\]/g;
23
+ // Helper functions for line-based word navigation
24
+ export const isWordCharStrict = (char) => /[\w\p{L}\p{N}]/u.test(char); // Matches a single character that is any Unicode letter, any Unicode number, or an underscore
25
+ export const isWhitespace = (char) => /\s/.test(char);
26
+ // Check if a character is a combining mark (only diacritics for now)
27
+ export const isCombiningMark = (char) => /\p{M}/u.test(char);
28
+ // Check if a character should be considered part of a word (including combining marks)
29
+ export const isWordCharWithCombining = (char) => isWordCharStrict(char) || isCombiningMark(char);
30
+ // Get the script of a character (simplified for common scripts)
31
+ export const getCharScript = (char) => {
32
+ if (/[\p{Script=Latin}]/u.test(char))
33
+ return 'latin'; // All Latin script chars including diacritics
34
+ if (/[\p{Script=Han}]/u.test(char))
35
+ return 'han'; // Chinese
36
+ if (/[\p{Script=Arabic}]/u.test(char))
37
+ return 'arabic';
38
+ if (/[\p{Script=Hiragana}]/u.test(char))
39
+ return 'hiragana';
40
+ if (/[\p{Script=Katakana}]/u.test(char))
41
+ return 'katakana';
42
+ if (/[\p{Script=Cyrillic}]/u.test(char))
43
+ return 'cyrillic';
44
+ return 'other';
45
+ };
46
+ // Check if two characters are from different scripts (indicating word boundary)
47
+ export const isDifferentScript = (char1, char2) => {
48
+ if (!isWordCharStrict(char1) || !isWordCharStrict(char2))
49
+ return false;
50
+ return getCharScript(char1) !== getCharScript(char2);
51
+ };
52
+ // Find next word start within a line, starting from col
53
+ export const findNextWordStartInLine = (line, col) => {
54
+ const chars = toCodePoints(line);
55
+ let i = col;
56
+ if (i >= chars.length)
57
+ return null;
58
+ const currentChar = chars[i];
59
+ // Skip current word/sequence based on character type
60
+ if (isWordCharStrict(currentChar)) {
61
+ while (i < chars.length && isWordCharWithCombining(chars[i])) {
62
+ // Check for script boundary - if next character is from different script, stop here
63
+ if (i + 1 < chars.length &&
64
+ isWordCharStrict(chars[i + 1]) &&
65
+ isDifferentScript(chars[i], chars[i + 1])) {
66
+ i++; // Include current character
67
+ break; // Stop at script boundary
68
+ }
69
+ i++;
70
+ }
71
+ }
72
+ else if (!isWhitespace(currentChar)) {
73
+ while (i < chars.length &&
74
+ !isWordCharStrict(chars[i]) &&
75
+ !isWhitespace(chars[i])) {
76
+ i++;
77
+ }
78
+ }
79
+ // Skip whitespace
80
+ while (i < chars.length && isWhitespace(chars[i])) {
81
+ i++;
82
+ }
83
+ return i < chars.length ? i : null;
84
+ };
85
+ // Find previous word start within a line
86
+ export const findPrevWordStartInLine = (line, col) => {
87
+ const chars = toCodePoints(line);
88
+ let i = col;
89
+ if (i <= 0)
90
+ return null;
91
+ i--;
92
+ // Skip whitespace moving backwards
93
+ while (i >= 0 && isWhitespace(chars[i])) {
94
+ i--;
95
+ }
96
+ if (i < 0)
97
+ return null;
98
+ if (isWordCharStrict(chars[i])) {
99
+ // We're in a word, move to its beginning
100
+ while (i >= 0 && isWordCharStrict(chars[i])) {
101
+ // Check for script boundary - if previous character is from different script, stop here
102
+ if (i - 1 >= 0 &&
103
+ isWordCharStrict(chars[i - 1]) &&
104
+ isDifferentScript(chars[i], chars[i - 1])) {
105
+ return i; // Return current position at script boundary
106
+ }
107
+ i--;
108
+ }
109
+ return i + 1;
110
+ }
111
+ else {
112
+ // We're in punctuation, move to its beginning
113
+ while (i >= 0 && !isWordCharStrict(chars[i]) && !isWhitespace(chars[i])) {
114
+ i--;
115
+ }
116
+ return i + 1;
117
+ }
118
+ };
119
+ // Find word end within a line
120
+ export const findWordEndInLine = (line, col) => {
121
+ const chars = toCodePoints(line);
122
+ let i = col;
123
+ // If we're already at the end of a word (including punctuation sequences), advance to next word
124
+ // This includes both regular word endings and script boundaries
125
+ const atEndOfWordChar = i < chars.length &&
126
+ isWordCharWithCombining(chars[i]) &&
127
+ (i + 1 >= chars.length ||
128
+ !isWordCharWithCombining(chars[i + 1]) ||
129
+ (isWordCharStrict(chars[i]) &&
130
+ i + 1 < chars.length &&
131
+ isWordCharStrict(chars[i + 1]) &&
132
+ isDifferentScript(chars[i], chars[i + 1])));
133
+ const atEndOfPunctuation = i < chars.length &&
134
+ !isWordCharWithCombining(chars[i]) &&
135
+ !isWhitespace(chars[i]) &&
136
+ (i + 1 >= chars.length ||
137
+ isWhitespace(chars[i + 1]) ||
138
+ isWordCharWithCombining(chars[i + 1]));
139
+ if (atEndOfWordChar || atEndOfPunctuation) {
140
+ // We're at the end of a word or punctuation sequence, move forward to find next word
141
+ i++;
142
+ // Skip whitespace to find next word or punctuation
143
+ while (i < chars.length && isWhitespace(chars[i])) {
144
+ i++;
145
+ }
146
+ }
147
+ // If we're not on a word character, find the next word or punctuation sequence
148
+ if (i < chars.length && !isWordCharWithCombining(chars[i])) {
149
+ // Skip whitespace to find next word or punctuation
150
+ while (i < chars.length && isWhitespace(chars[i])) {
151
+ i++;
152
+ }
153
+ }
154
+ // Move to end of current word (including combining marks, but stop at script boundaries)
155
+ let foundWord = false;
156
+ let lastBaseCharPos = -1;
157
+ if (i < chars.length && isWordCharWithCombining(chars[i])) {
158
+ // Handle word characters
159
+ while (i < chars.length && isWordCharWithCombining(chars[i])) {
160
+ foundWord = true;
161
+ // Track the position of the last base character (not combining mark)
162
+ if (isWordCharStrict(chars[i])) {
163
+ lastBaseCharPos = i;
164
+ }
165
+ // Check if next character is from a different script (word boundary)
166
+ if (i + 1 < chars.length &&
167
+ isWordCharStrict(chars[i + 1]) &&
168
+ isDifferentScript(chars[i], chars[i + 1])) {
169
+ i++; // Include current character
170
+ if (isWordCharStrict(chars[i - 1])) {
171
+ lastBaseCharPos = i - 1;
172
+ }
173
+ break; // Stop at script boundary
174
+ }
175
+ i++;
176
+ }
177
+ }
178
+ else if (i < chars.length && !isWhitespace(chars[i])) {
179
+ // Handle punctuation sequences (like ████)
180
+ while (i < chars.length &&
181
+ !isWordCharStrict(chars[i]) &&
182
+ !isWhitespace(chars[i])) {
183
+ foundWord = true;
184
+ lastBaseCharPos = i;
185
+ i++;
186
+ }
187
+ }
188
+ // Only return a position if we actually found a word
189
+ // Return the position of the last base character, not combining marks
190
+ if (foundWord && lastBaseCharPos >= col) {
191
+ return lastBaseCharPos;
192
+ }
193
+ return null;
194
+ };
195
+ // Initialize segmenter for word boundary detection
196
+ const segmenter = new Intl.Segmenter(undefined, { granularity: 'word' });
197
+ function findPrevWordBoundary(line, cursorCol) {
198
+ const codePoints = toCodePoints(line);
199
+ // Convert cursorCol (CP index) to string index
200
+ const prefix = codePoints.slice(0, cursorCol).join('');
201
+ const cursorIdx = prefix.length;
202
+ let targetIdx = 0;
203
+ for (const seg of segmenter.segment(line)) {
204
+ // We want the last word start strictly before the cursor.
205
+ // If we've reached or passed the cursor, we stop.
206
+ if (seg.index >= cursorIdx)
207
+ break;
208
+ if (seg.isWordLike) {
209
+ targetIdx = seg.index;
210
+ }
211
+ }
212
+ return toCodePoints(line.slice(0, targetIdx)).length;
213
+ }
214
+ function findNextWordBoundary(line, cursorCol) {
215
+ const codePoints = toCodePoints(line);
216
+ const prefix = codePoints.slice(0, cursorCol).join('');
217
+ const cursorIdx = prefix.length;
218
+ let targetIdx = line.length;
219
+ for (const seg of segmenter.segment(line)) {
220
+ const segEnd = seg.index + seg.segment.length;
221
+ if (segEnd > cursorIdx) {
222
+ if (seg.isWordLike) {
223
+ targetIdx = segEnd;
224
+ break;
225
+ }
226
+ }
227
+ }
228
+ return toCodePoints(line.slice(0, targetIdx)).length;
229
+ }
230
+ // Find next word across lines
231
+ export const findNextWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
232
+ // First try current line
233
+ const currentLine = lines[cursorRow] || '';
234
+ const colInCurrentLine = searchForWordStart
235
+ ? findNextWordStartInLine(currentLine, cursorCol)
236
+ : findWordEndInLine(currentLine, cursorCol);
237
+ if (colInCurrentLine !== null) {
238
+ return { row: cursorRow, col: colInCurrentLine };
239
+ }
240
+ // Search subsequent lines
241
+ for (let row = cursorRow + 1; row < lines.length; row++) {
242
+ const line = lines[row] || '';
243
+ const chars = toCodePoints(line);
244
+ // For empty lines, if we haven't found any words yet, return the empty line
245
+ if (chars.length === 0) {
246
+ // Check if there are any words in remaining lines
247
+ let hasWordsInLaterLines = false;
248
+ for (let laterRow = row + 1; laterRow < lines.length; laterRow++) {
249
+ const laterLine = lines[laterRow] || '';
250
+ const laterChars = toCodePoints(laterLine);
251
+ let firstNonWhitespace = 0;
252
+ while (firstNonWhitespace < laterChars.length &&
253
+ isWhitespace(laterChars[firstNonWhitespace])) {
254
+ firstNonWhitespace++;
255
+ }
256
+ if (firstNonWhitespace < laterChars.length) {
257
+ hasWordsInLaterLines = true;
258
+ break;
259
+ }
260
+ }
261
+ // If no words in later lines, return the empty line
262
+ if (!hasWordsInLaterLines) {
263
+ return { row, col: 0 };
264
+ }
265
+ continue;
266
+ }
267
+ // Find first non-whitespace
268
+ let firstNonWhitespace = 0;
269
+ while (firstNonWhitespace < chars.length &&
270
+ isWhitespace(chars[firstNonWhitespace])) {
271
+ firstNonWhitespace++;
272
+ }
273
+ if (firstNonWhitespace < chars.length) {
274
+ if (searchForWordStart) {
275
+ return { row, col: firstNonWhitespace };
276
+ }
277
+ else {
278
+ // For word end, find the end of the first word
279
+ const endCol = findWordEndInLine(line, firstNonWhitespace);
280
+ if (endCol !== null) {
281
+ return { row, col: endCol };
282
+ }
283
+ }
284
+ }
285
+ }
286
+ return null;
287
+ };
288
+ // Find previous word across lines
289
+ export const findPrevWordAcrossLines = (lines, cursorRow, cursorCol) => {
290
+ // First try current line
291
+ const currentLine = lines[cursorRow] || '';
292
+ const colInCurrentLine = findPrevWordStartInLine(currentLine, cursorCol);
293
+ if (colInCurrentLine !== null) {
294
+ return { row: cursorRow, col: colInCurrentLine };
295
+ }
296
+ // Search previous lines
297
+ for (let row = cursorRow - 1; row >= 0; row--) {
298
+ const line = lines[row] || '';
299
+ const chars = toCodePoints(line);
300
+ if (chars.length === 0)
301
+ continue;
302
+ // Find last word start
303
+ let lastWordStart = chars.length;
304
+ while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
305
+ lastWordStart--;
306
+ }
307
+ if (lastWordStart > 0) {
308
+ // Find start of this word
309
+ const wordStart = findPrevWordStartInLine(line, lastWordStart);
310
+ if (wordStart !== null) {
311
+ return { row, col: wordStart };
312
+ }
313
+ }
314
+ }
315
+ return null;
316
+ };
317
+ // Helper functions for vim line operations
318
+ export const getPositionFromOffsets = (startOffset, endOffset, lines) => {
319
+ let offset = 0;
320
+ let startRow = 0;
321
+ let startCol = 0;
322
+ let endRow = 0;
323
+ let endCol = 0;
324
+ // Find start position
325
+ for (let i = 0; i < lines.length; i++) {
326
+ const lineLength = lines[i].length + 1; // +1 for newline
327
+ if (offset + lineLength > startOffset) {
328
+ startRow = i;
329
+ startCol = startOffset - offset;
330
+ break;
331
+ }
332
+ offset += lineLength;
333
+ }
334
+ // Find end position
335
+ offset = 0;
336
+ for (let i = 0; i < lines.length; i++) {
337
+ const lineLength = lines[i].length + (i < lines.length - 1 ? 1 : 0); // +1 for newline except last line
338
+ if (offset + lineLength >= endOffset) {
339
+ endRow = i;
340
+ endCol = endOffset - offset;
341
+ break;
342
+ }
343
+ offset += lineLength;
344
+ }
345
+ return { startRow, startCol, endRow, endCol };
346
+ };
347
+ export const getLineRangeOffsets = (startRow, lineCount, lines) => {
348
+ let startOffset = 0;
349
+ // Calculate start offset
350
+ for (let i = 0; i < startRow; i++) {
351
+ startOffset += lines[i].length + 1; // +1 for newline
352
+ }
353
+ // Calculate end offset
354
+ let endOffset = startOffset;
355
+ for (let i = 0; i < lineCount; i++) {
356
+ const lineIndex = startRow + i;
357
+ if (lineIndex < lines.length) {
358
+ endOffset += lines[lineIndex].length;
359
+ if (lineIndex < lines.length - 1) {
360
+ endOffset += 1; // +1 for newline
361
+ }
362
+ }
363
+ }
364
+ return { startOffset, endOffset };
365
+ };
366
+ export const replaceRangeInternal = (state, startRow, startCol, endRow, endCol, text) => {
367
+ const currentLine = (row) => state.lines[row] || '';
368
+ const currentLineLen = (row) => cpLen(currentLine(row));
369
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
370
+ if (startRow > endRow ||
371
+ (startRow === endRow && startCol > endCol) ||
372
+ startRow < 0 ||
373
+ startCol < 0 ||
374
+ endRow >= state.lines.length ||
375
+ (endRow < state.lines.length && endCol > currentLineLen(endRow))) {
376
+ return state; // Invalid range
377
+ }
378
+ const newLines = [...state.lines];
379
+ const sCol = clamp(startCol, 0, currentLineLen(startRow));
380
+ const eCol = clamp(endCol, 0, currentLineLen(endRow));
381
+ const prefix = cpSlice(currentLine(startRow), 0, sCol);
382
+ const suffix = cpSlice(currentLine(endRow), eCol);
383
+ const normalisedReplacement = text
384
+ .replace(/\r\n/g, '\n')
385
+ .replace(/\r/g, '\n');
386
+ const replacementParts = normalisedReplacement.split('\n');
387
+ // The combined first line of the new text
388
+ const firstLine = prefix + replacementParts[0];
389
+ if (replacementParts.length === 1) {
390
+ // No newlines in replacement: combine prefix, replacement, and suffix on one line.
391
+ newLines.splice(startRow, endRow - startRow + 1, firstLine + suffix);
392
+ }
393
+ else {
394
+ // Newlines in replacement: create new lines.
395
+ const lastLine = replacementParts[replacementParts.length - 1] + suffix;
396
+ const middleLines = replacementParts.slice(1, -1);
397
+ newLines.splice(startRow, endRow - startRow + 1, firstLine, ...middleLines, lastLine);
398
+ }
399
+ const finalCursorRow = startRow + replacementParts.length - 1;
400
+ const finalCursorCol = (replacementParts.length > 1 ? 0 : sCol) +
401
+ cpLen(replacementParts[replacementParts.length - 1]);
402
+ return {
403
+ ...state,
404
+ lines: newLines,
405
+ cursorRow: Math.min(Math.max(finalCursorRow, 0), newLines.length - 1),
406
+ cursorCol: Math.max(0, Math.min(finalCursorCol, cpLen(newLines[finalCursorRow] || ''))),
407
+ preferredCol: null,
408
+ };
409
+ };
410
+ function clamp(v, min, max) {
411
+ return v < min ? min : v > max ? max : v;
412
+ }
413
+ function calculateInitialCursorPosition(initialLines, offset) {
414
+ let remainingChars = offset;
415
+ let row = 0;
416
+ while (row < initialLines.length) {
417
+ const lineLength = cpLen(initialLines[row]);
418
+ // Add 1 for the newline character (except for the last line)
419
+ const totalCharsInLineAndNewline = lineLength + (row < initialLines.length - 1 ? 1 : 0);
420
+ if (remainingChars <= lineLength) {
421
+ // Cursor is on this line
422
+ return [row, remainingChars];
423
+ }
424
+ remainingChars -= totalCharsInLineAndNewline;
425
+ row++;
426
+ }
427
+ // Offset is beyond the text, place cursor at the end of the last line
428
+ if (initialLines.length > 0) {
429
+ const lastRow = initialLines.length - 1;
430
+ return [lastRow, cpLen(initialLines[lastRow])];
431
+ }
432
+ return [0, 0]; // Default for empty text
433
+ }
434
+ export function offsetToLogicalPos(text, offset) {
435
+ let row = 0;
436
+ let col = 0;
437
+ let currentOffset = 0;
438
+ if (offset === 0)
439
+ return [0, 0];
440
+ const lines = text.split('\n');
441
+ for (let i = 0; i < lines.length; i++) {
442
+ const line = lines[i];
443
+ const lineLength = cpLen(line);
444
+ const lineLengthWithNewline = lineLength + (i < lines.length - 1 ? 1 : 0);
445
+ if (offset <= currentOffset + lineLength) {
446
+ // Check against lineLength first
447
+ row = i;
448
+ col = offset - currentOffset;
449
+ return [row, col];
450
+ }
451
+ else if (offset <= currentOffset + lineLengthWithNewline) {
452
+ // Check if offset is the newline itself
453
+ row = i;
454
+ col = lineLength; // Position cursor at the end of the current line content
455
+ // If the offset IS the newline, and it's not the last line, advance to next line, col 0
456
+ if (offset === currentOffset + lineLengthWithNewline &&
457
+ i < lines.length - 1) {
458
+ return [i + 1, 0];
459
+ }
460
+ return [row, col]; // Otherwise, it's at the end of the current line content
461
+ }
462
+ currentOffset += lineLengthWithNewline;
463
+ }
464
+ // If offset is beyond the text length, place cursor at the end of the last line
465
+ // or [0,0] if text is empty
466
+ if (lines.length > 0) {
467
+ row = lines.length - 1;
468
+ col = cpLen(lines[row]);
469
+ }
470
+ else {
471
+ row = 0;
472
+ col = 0;
473
+ }
474
+ return [row, col];
475
+ }
476
+ /**
477
+ * Converts logical row/col position to absolute text offset
478
+ * Inverse operation of offsetToLogicalPos
479
+ */
480
+ export function logicalPosToOffset(lines, row, col) {
481
+ let offset = 0;
482
+ // Clamp row to valid range
483
+ const actualRow = Math.min(row, lines.length - 1);
484
+ // Add lengths of all lines before the target row
485
+ for (let i = 0; i < actualRow; i++) {
486
+ offset += cpLen(lines[i]) + 1; // +1 for newline
487
+ }
488
+ // Add column offset within the target row
489
+ if (actualRow >= 0 && actualRow < lines.length) {
490
+ offset += Math.min(col, cpLen(lines[actualRow]));
491
+ }
492
+ return offset;
493
+ }
494
+ export const imagePathRegex = /@((?:\\.|[^\s\r\n\\])+?\.(?:png|jpg|jpeg|gif|webp|svg|bmp))\b/gi;
495
+ export function getTransformedImagePath(filePath) {
496
+ const raw = filePath;
497
+ // Ignore leading @ when stripping directories, but keep it for simple '@file.png'
498
+ const withoutAt = raw.startsWith('@') ? raw.slice(1) : raw;
499
+ // Unescape the path to handle escaped spaces and other characters
500
+ const unescaped = unescapePath(withoutAt);
501
+ // Find last directory separator, supporting both POSIX and Windows styles
502
+ const lastSepIndex = Math.max(unescaped.lastIndexOf('/'), unescaped.lastIndexOf('\\'));
503
+ // If we saw a separator, take the segment after it; otherwise fall back to the unescaped string
504
+ const fileName = lastSepIndex >= 0 ? unescaped.slice(lastSepIndex + 1) : unescaped;
505
+ const extension = path.extname(fileName);
506
+ const baseName = path.basename(fileName, extension);
507
+ const maxBaseLength = 10;
508
+ const truncatedBase = baseName.length > maxBaseLength
509
+ ? `...${baseName.slice(-maxBaseLength)}`
510
+ : baseName;
511
+ return `[Image ${truncatedBase}${extension}]`;
512
+ }
513
+ const transformationsCache = new LRUCache(LRU_BUFFER_PERF_CACHE_LIMIT);
514
+ export function calculateTransformationsForLine(line) {
515
+ const cached = transformationsCache.get(line);
516
+ if (cached) {
517
+ return cached;
518
+ }
519
+ const transformations = [];
520
+ // 1. Detect image paths
521
+ imagePathRegex.lastIndex = 0;
522
+ let match;
523
+ while ((match = imagePathRegex.exec(line)) !== null) {
524
+ const logicalText = match[0];
525
+ const logStart = cpLen(line.substring(0, match.index));
526
+ const logEnd = logStart + cpLen(logicalText);
527
+ transformations.push({
528
+ logStart,
529
+ logEnd,
530
+ logicalText,
531
+ collapsedText: getTransformedImagePath(logicalText),
532
+ type: 'image',
533
+ });
534
+ }
535
+ // 2. Detect paste placeholders
536
+ const pasteRegex = new RegExp(PASTED_TEXT_PLACEHOLDER_REGEX.source, 'g');
537
+ while ((match = pasteRegex.exec(line)) !== null) {
538
+ const logicalText = match[0];
539
+ const logStart = cpLen(line.substring(0, match.index));
540
+ const logEnd = logStart + cpLen(logicalText);
541
+ transformations.push({
542
+ logStart,
543
+ logEnd,
544
+ logicalText,
545
+ collapsedText: logicalText,
546
+ type: 'paste',
547
+ id: logicalText,
548
+ });
549
+ }
550
+ // Sort transformations by logStart to maintain consistency
551
+ transformations.sort((a, b) => a.logStart - b.logStart);
552
+ transformationsCache.set(line, transformations);
553
+ return transformations;
554
+ }
555
+ export function calculateTransformations(lines) {
556
+ return lines.map((ln) => calculateTransformationsForLine(ln));
557
+ }
558
+ export function getTransformUnderCursor(row, col, spansByLine) {
559
+ const spans = spansByLine[row];
560
+ if (!spans || spans.length === 0)
561
+ return null;
562
+ for (const span of spans) {
563
+ if (col >= span.logStart && col <= span.logEnd) {
564
+ return span;
565
+ }
566
+ if (col < span.logStart)
567
+ break;
568
+ }
569
+ return null;
570
+ }
571
+ /**
572
+ * Find atomic placeholder at cursor for backspace (cursor at end).
573
+ * Checks all placeholder types in priority order.
574
+ */
575
+ function findAtomicPlaceholderForBackspace(line, cursorCol, transformations) {
576
+ for (const transform of transformations) {
577
+ if (cursorCol === transform.logEnd) {
578
+ return {
579
+ start: transform.logStart,
580
+ end: transform.logEnd,
581
+ type: transform.type,
582
+ id: transform.id,
583
+ };
584
+ }
585
+ }
586
+ return null;
587
+ }
588
+ /**
589
+ * Find atomic placeholder at cursor for delete (cursor at start).
590
+ */
591
+ function findAtomicPlaceholderForDelete(line, cursorCol, transformations) {
592
+ for (const transform of transformations) {
593
+ if (cursorCol === transform.logStart) {
594
+ return {
595
+ start: transform.logStart,
596
+ end: transform.logEnd,
597
+ type: transform.type,
598
+ id: transform.id,
599
+ };
600
+ }
601
+ }
602
+ return null;
603
+ }
604
+ export function calculateTransformedLine(logLine, logIndex, logicalCursor, transformations) {
605
+ let transformedLine = '';
606
+ const transformedToLogMap = [];
607
+ let lastLogPos = 0;
608
+ const cursorIsOnThisLine = logIndex === logicalCursor[0];
609
+ const cursorCol = logicalCursor[1];
610
+ for (const transform of transformations) {
611
+ const textBeforeTransformation = cpSlice(logLine, lastLogPos, transform.logStart);
612
+ transformedLine += textBeforeTransformation;
613
+ for (let i = 0; i < cpLen(textBeforeTransformation); i++) {
614
+ transformedToLogMap.push(lastLogPos + i);
615
+ }
616
+ const isExpanded = transform.type === 'image' &&
617
+ cursorIsOnThisLine &&
618
+ cursorCol >= transform.logStart &&
619
+ cursorCol <= transform.logEnd;
620
+ const transformedText = isExpanded
621
+ ? transform.logicalText
622
+ : transform.collapsedText;
623
+ transformedLine += transformedText;
624
+ // Map transformed characters back to logical characters
625
+ const transformedLen = cpLen(transformedText);
626
+ if (isExpanded) {
627
+ for (let i = 0; i < transformedLen; i++) {
628
+ transformedToLogMap.push(transform.logStart + i);
629
+ }
630
+ }
631
+ else {
632
+ // Collapsed: distribute transformed positions monotonically across the raw span.
633
+ // This preserves ordering across wrapped slices so logicalToVisualMap has
634
+ // increasing startColInLogical and visual cursor mapping remains consistent.
635
+ const logicalLength = Math.max(0, transform.logEnd - transform.logStart);
636
+ for (let i = 0; i < transformedLen; i++) {
637
+ // Map the i-th transformed code point into [logStart, logEnd)
638
+ const transformationToLogicalOffset = logicalLength === 0
639
+ ? 0
640
+ : Math.floor((i * logicalLength) / transformedLen);
641
+ const transformationToLogicalIndex = transform.logStart +
642
+ Math.min(transformationToLogicalOffset, Math.max(logicalLength - 1, 0));
643
+ transformedToLogMap.push(transformationToLogicalIndex);
644
+ }
645
+ }
646
+ lastLogPos = transform.logEnd;
647
+ }
648
+ // Append text after last transform
649
+ const remainingUntransformedText = cpSlice(logLine, lastLogPos);
650
+ transformedLine += remainingUntransformedText;
651
+ for (let i = 0; i < cpLen(remainingUntransformedText); i++) {
652
+ transformedToLogMap.push(lastLogPos + i);
653
+ }
654
+ // For a cursor at the very end of the transformed line
655
+ transformedToLogMap.push(cpLen(logLine));
656
+ return { transformedLine, transformedToLogMap };
657
+ }
658
+ const lineLayoutCache = new LRUCache(LRU_BUFFER_PERF_CACHE_LIMIT);
659
+ function getLineLayoutCacheKey(line, viewportWidth, isCursorOnLine, cursorCol) {
660
+ // Most lines (99.9% in a large buffer) are not cursor lines.
661
+ // We use a simpler key for them to reduce string allocation overhead.
662
+ if (!isCursorOnLine) {
663
+ return `${viewportWidth}:N:${line}`;
664
+ }
665
+ return `${viewportWidth}:C:${cursorCol}:${line}`;
666
+ }
667
+ // Calculates the visual wrapping of lines and the mapping between logical and visual coordinates.
668
+ // This is an expensive operation and should be memoized.
669
+ function calculateLayout(logicalLines, viewportWidth, logicalCursor) {
670
+ const visualLines = [];
671
+ const logicalToVisualMap = [];
672
+ const visualToLogicalMap = [];
673
+ const transformedToLogicalMaps = [];
674
+ const visualToTransformedMap = [];
675
+ logicalLines.forEach((logLine, logIndex) => {
676
+ logicalToVisualMap[logIndex] = [];
677
+ const isCursorOnLine = logIndex === logicalCursor[0];
678
+ const cacheKey = getLineLayoutCacheKey(logLine, viewportWidth, isCursorOnLine, logicalCursor[1]);
679
+ const cached = lineLayoutCache.get(cacheKey);
680
+ if (cached) {
681
+ const visualLineOffset = visualLines.length;
682
+ visualLines.push(...cached.visualLines);
683
+ cached.logicalToVisualMap.forEach(([relVisualIdx, logCol]) => {
684
+ logicalToVisualMap[logIndex].push([
685
+ visualLineOffset + relVisualIdx,
686
+ logCol,
687
+ ]);
688
+ });
689
+ cached.visualToLogicalMap.forEach(([, logCol]) => {
690
+ visualToLogicalMap.push([logIndex, logCol]);
691
+ });
692
+ transformedToLogicalMaps[logIndex] = cached.transformedToLogMap;
693
+ visualToTransformedMap.push(...cached.visualToTransformedMap);
694
+ return;
695
+ }
696
+ // Not in cache, calculate
697
+ const transformations = calculateTransformationsForLine(logLine);
698
+ const { transformedLine, transformedToLogMap } = calculateTransformedLine(logLine, logIndex, logicalCursor, transformations);
699
+ const lineVisualLines = [];
700
+ const lineLogicalToVisualMap = [];
701
+ const lineVisualToLogicalMap = [];
702
+ const lineVisualToTransformedMap = [];
703
+ if (transformedLine.length === 0) {
704
+ // Handle empty logical line
705
+ lineLogicalToVisualMap.push([0, 0]);
706
+ lineVisualToLogicalMap.push([logIndex, 0]);
707
+ lineVisualToTransformedMap.push(0);
708
+ lineVisualLines.push('');
709
+ }
710
+ else {
711
+ // Non-empty logical line
712
+ let currentPosInLogLine = 0; // Tracks position within the current logical line (code point index)
713
+ const codePointsInLogLine = toCodePoints(transformedLine);
714
+ while (currentPosInLogLine < codePointsInLogLine.length) {
715
+ let currentChunk = '';
716
+ let currentChunkVisualWidth = 0;
717
+ let numCodePointsInChunk = 0;
718
+ let lastWordBreakPoint = -1; // Index in codePointsInLogLine for word break
719
+ let numCodePointsAtLastWordBreak = 0;
720
+ // Iterate through code points to build the current visual line (chunk)
721
+ for (let i = currentPosInLogLine; i < codePointsInLogLine.length; i++) {
722
+ const char = codePointsInLogLine[i];
723
+ const charVisualWidth = getCachedStringWidth(char);
724
+ if (currentChunkVisualWidth + charVisualWidth > viewportWidth) {
725
+ // Character would exceed viewport width
726
+ if (lastWordBreakPoint !== -1 &&
727
+ numCodePointsAtLastWordBreak > 0 &&
728
+ currentPosInLogLine + numCodePointsAtLastWordBreak < i) {
729
+ // We have a valid word break point to use, and it's not the start of the current segment
730
+ currentChunk = codePointsInLogLine
731
+ .slice(currentPosInLogLine, currentPosInLogLine + numCodePointsAtLastWordBreak)
732
+ .join('');
733
+ numCodePointsInChunk = numCodePointsAtLastWordBreak;
734
+ }
735
+ else {
736
+ // No word break, or word break is at the start of this potential chunk, or word break leads to empty chunk.
737
+ // Hard break: take characters up to viewportWidth, or just the current char if it alone is too wide.
738
+ if (numCodePointsInChunk === 0 &&
739
+ charVisualWidth > viewportWidth) {
740
+ // Single character is wider than viewport, take it anyway
741
+ currentChunk = char;
742
+ numCodePointsInChunk = 1;
743
+ }
744
+ }
745
+ break; // Break from inner loop to finalize this chunk
746
+ }
747
+ currentChunk += char;
748
+ currentChunkVisualWidth += charVisualWidth;
749
+ numCodePointsInChunk++;
750
+ // Check for word break opportunity (space)
751
+ if (char === ' ') {
752
+ lastWordBreakPoint = i; // Store code point index of the space
753
+ // Store the state *before* adding the space, if we decide to break here.
754
+ numCodePointsAtLastWordBreak = numCodePointsInChunk - 1; // Chars *before* the space
755
+ }
756
+ }
757
+ if (numCodePointsInChunk === 0 &&
758
+ currentPosInLogLine < codePointsInLogLine.length) {
759
+ const firstChar = codePointsInLogLine[currentPosInLogLine];
760
+ currentChunk = firstChar;
761
+ numCodePointsInChunk = 1;
762
+ }
763
+ const logicalStartCol = transformedToLogMap[currentPosInLogLine] ?? 0;
764
+ lineLogicalToVisualMap.push([lineVisualLines.length, logicalStartCol]);
765
+ lineVisualToLogicalMap.push([logIndex, logicalStartCol]);
766
+ lineVisualToTransformedMap.push(currentPosInLogLine);
767
+ lineVisualLines.push(currentChunk);
768
+ const logicalStartOfThisChunk = currentPosInLogLine;
769
+ currentPosInLogLine += numCodePointsInChunk;
770
+ if (logicalStartOfThisChunk + numCodePointsInChunk <
771
+ codePointsInLogLine.length &&
772
+ currentPosInLogLine < codePointsInLogLine.length &&
773
+ codePointsInLogLine[currentPosInLogLine] === ' ') {
774
+ currentPosInLogLine++;
775
+ }
776
+ }
777
+ }
778
+ // Cache the result for this line
779
+ lineLayoutCache.set(cacheKey, {
780
+ visualLines: lineVisualLines,
781
+ logicalToVisualMap: lineLogicalToVisualMap,
782
+ visualToLogicalMap: lineVisualToLogicalMap,
783
+ transformedToLogMap,
784
+ visualToTransformedMap: lineVisualToTransformedMap,
785
+ });
786
+ const visualLineOffset = visualLines.length;
787
+ visualLines.push(...lineVisualLines);
788
+ lineLogicalToVisualMap.forEach(([relVisualIdx, logCol]) => {
789
+ logicalToVisualMap[logIndex].push([
790
+ visualLineOffset + relVisualIdx,
791
+ logCol,
792
+ ]);
793
+ });
794
+ lineVisualToLogicalMap.forEach(([, logCol]) => {
795
+ visualToLogicalMap.push([logIndex, logCol]);
796
+ });
797
+ transformedToLogicalMaps[logIndex] = transformedToLogMap;
798
+ visualToTransformedMap.push(...lineVisualToTransformedMap);
799
+ });
800
+ // If the entire logical text was empty, ensure there's one empty visual line.
801
+ if (logicalLines.length === 0 ||
802
+ (logicalLines.length === 1 && logicalLines[0] === '')) {
803
+ if (visualLines.length === 0) {
804
+ visualLines.push('');
805
+ if (!logicalToVisualMap[0])
806
+ logicalToVisualMap[0] = [];
807
+ logicalToVisualMap[0].push([0, 0]);
808
+ visualToLogicalMap.push([0, 0]);
809
+ visualToTransformedMap.push(0);
810
+ }
811
+ }
812
+ return {
813
+ visualLines,
814
+ logicalToVisualMap,
815
+ visualToLogicalMap,
816
+ transformedToLogicalMaps,
817
+ visualToTransformedMap,
818
+ };
819
+ }
820
+ // Calculates the visual cursor position based on a pre-calculated layout.
821
+ // This is a lightweight operation.
822
+ function calculateVisualCursorFromLayout(layout, logicalCursor) {
823
+ const { logicalToVisualMap, visualLines, transformedToLogicalMaps } = layout;
824
+ const [logicalRow, logicalCol] = logicalCursor;
825
+ const segmentsForLogicalLine = logicalToVisualMap[logicalRow];
826
+ if (!segmentsForLogicalLine || segmentsForLogicalLine.length === 0) {
827
+ // This can happen for an empty document.
828
+ return [0, 0];
829
+ }
830
+ // Find the segment where the logical column fits.
831
+ // The segments are sorted by startColInLogical.
832
+ let targetSegmentIndex = segmentsForLogicalLine.findIndex(([, startColInLogical], index) => {
833
+ const nextStartColInLogical = index + 1 < segmentsForLogicalLine.length
834
+ ? segmentsForLogicalLine[index + 1][1]
835
+ : Infinity;
836
+ return (logicalCol >= startColInLogical && logicalCol < nextStartColInLogical);
837
+ });
838
+ // If not found, it means the cursor is at the end of the logical line.
839
+ if (targetSegmentIndex === -1) {
840
+ if (logicalCol === 0) {
841
+ targetSegmentIndex = 0;
842
+ }
843
+ else {
844
+ targetSegmentIndex = segmentsForLogicalLine.length - 1;
845
+ }
846
+ }
847
+ const [visualRow, startColInLogical] = segmentsForLogicalLine[targetSegmentIndex];
848
+ // Find the coordinates in transformed space in order to conver to visual
849
+ const transformedToLogicalMap = transformedToLogicalMaps[logicalRow] ?? [];
850
+ let transformedCol = 0;
851
+ for (let i = 0; i < transformedToLogicalMap.length; i++) {
852
+ if (transformedToLogicalMap[i] > logicalCol) {
853
+ transformedCol = Math.max(0, i - 1);
854
+ break;
855
+ }
856
+ if (i === transformedToLogicalMap.length - 1) {
857
+ transformedCol = transformedToLogicalMap.length - 1;
858
+ }
859
+ }
860
+ let startColInTransformed = 0;
861
+ while (startColInTransformed < transformedToLogicalMap.length &&
862
+ transformedToLogicalMap[startColInTransformed] < startColInLogical) {
863
+ startColInTransformed++;
864
+ }
865
+ const clampedTransformedCol = Math.min(transformedCol, Math.max(0, transformedToLogicalMap.length - 1));
866
+ const visualCol = clampedTransformedCol - startColInTransformed;
867
+ const clampedVisualCol = Math.min(Math.max(visualCol, 0), cpLen(visualLines[visualRow] ?? ''));
868
+ return [visualRow, clampedVisualCol];
869
+ }
870
+ const historyLimit = 100;
871
+ export const pushUndo = (currentState) => {
872
+ const snapshot = {
873
+ lines: [...currentState.lines],
874
+ cursorRow: currentState.cursorRow,
875
+ cursorCol: currentState.cursorCol,
876
+ pastedContent: { ...currentState.pastedContent },
877
+ };
878
+ const newStack = [...currentState.undoStack, snapshot];
879
+ if (newStack.length > historyLimit) {
880
+ newStack.shift();
881
+ }
882
+ return { ...currentState, undoStack: newStack, redoStack: [] };
883
+ };
884
+ function generatePastedTextId(content, lineCount, pastedContent) {
885
+ const base = lineCount > LARGE_PASTE_LINE_THRESHOLD
886
+ ? `[Pasted Text: ${lineCount} lines]`
887
+ : `[Pasted Text: ${content.length} chars]`;
888
+ let id = base;
889
+ let suffix = 2;
890
+ while (pastedContent[id]) {
891
+ id = base.replace(']', ` #${suffix}]`);
892
+ suffix++;
893
+ }
894
+ return id;
895
+ }
896
+ function textBufferReducerLogic(state, action, options = {}) {
897
+ const pushUndoLocal = pushUndo;
898
+ const currentLine = (r) => state.lines[r] ?? '';
899
+ const currentLineLen = (r) => cpLen(currentLine(r));
900
+ switch (action.type) {
901
+ case 'set_text': {
902
+ let nextState = state;
903
+ if (action.pushToUndo !== false) {
904
+ nextState = pushUndoLocal(state);
905
+ }
906
+ const newContentLines = action.payload
907
+ .replace(/\r\n?/g, '\n')
908
+ .split('\n');
909
+ const lines = newContentLines.length === 0 ? [''] : newContentLines;
910
+ const lastNewLineIndex = lines.length - 1;
911
+ return {
912
+ ...nextState,
913
+ lines,
914
+ cursorRow: lastNewLineIndex,
915
+ cursorCol: cpLen(lines[lastNewLineIndex] ?? ''),
916
+ preferredCol: null,
917
+ pastedContent: action.payload === '' ? {} : nextState.pastedContent,
918
+ };
919
+ }
920
+ case 'insert': {
921
+ const nextState = pushUndoLocal(state);
922
+ const newLines = [...nextState.lines];
923
+ let newCursorRow = nextState.cursorRow;
924
+ let newCursorCol = nextState.cursorCol;
925
+ const currentLine = (r) => newLines[r] ?? '';
926
+ let payload = action.payload;
927
+ let newPastedContent = nextState.pastedContent;
928
+ if (action.isPaste) {
929
+ // Normalize line endings for pastes
930
+ payload = payload.replace(/\r\n|\r/g, '\n');
931
+ const lineCount = payload.split('\n').length;
932
+ if (lineCount > LARGE_PASTE_LINE_THRESHOLD ||
933
+ payload.length > LARGE_PASTE_CHAR_THRESHOLD) {
934
+ const id = generatePastedTextId(payload, lineCount, newPastedContent);
935
+ newPastedContent = {
936
+ ...newPastedContent,
937
+ [id]: payload,
938
+ };
939
+ payload = id;
940
+ }
941
+ }
942
+ if (options.singleLine) {
943
+ payload = payload.replace(/[\r\n]/g, '');
944
+ }
945
+ if (options.inputFilter) {
946
+ payload = options.inputFilter(payload);
947
+ }
948
+ if (payload.length === 0) {
949
+ return state;
950
+ }
951
+ const str = stripUnsafeCharacters(payload.replace(/\r\n/g, '\n').replace(/\r/g, '\n'));
952
+ const parts = str.split('\n');
953
+ const lineContent = currentLine(newCursorRow);
954
+ const before = cpSlice(lineContent, 0, newCursorCol);
955
+ const after = cpSlice(lineContent, newCursorCol);
956
+ if (parts.length > 1) {
957
+ newLines[newCursorRow] = before + parts[0];
958
+ const remainingParts = parts.slice(1);
959
+ const lastPartOriginal = remainingParts.pop() ?? '';
960
+ newLines.splice(newCursorRow + 1, 0, ...remainingParts);
961
+ newLines.splice(newCursorRow + parts.length - 1, 0, lastPartOriginal + after);
962
+ newCursorRow = newCursorRow + parts.length - 1;
963
+ newCursorCol = cpLen(lastPartOriginal);
964
+ }
965
+ else {
966
+ newLines[newCursorRow] = before + parts[0] + after;
967
+ newCursorCol = cpLen(before) + cpLen(parts[0]);
968
+ }
969
+ return {
970
+ ...nextState,
971
+ lines: newLines,
972
+ cursorRow: newCursorRow,
973
+ cursorCol: newCursorCol,
974
+ preferredCol: null,
975
+ pastedContent: newPastedContent,
976
+ };
977
+ }
978
+ case 'add_pasted_content': {
979
+ const { id, text } = action.payload;
980
+ return {
981
+ ...state,
982
+ pastedContent: {
983
+ ...state.pastedContent,
984
+ [id]: text,
985
+ },
986
+ };
987
+ }
988
+ case 'backspace': {
989
+ const { cursorRow, cursorCol, lines, transformationsByLine } = state;
990
+ // Early return if at start of buffer
991
+ if (cursorCol === 0 && cursorRow === 0)
992
+ return state;
993
+ // Check if cursor is at end of an atomic placeholder
994
+ const transformations = transformationsByLine[cursorRow] ?? [];
995
+ const placeholder = findAtomicPlaceholderForBackspace(lines[cursorRow], cursorCol, transformations);
996
+ if (placeholder) {
997
+ const nextState = pushUndoLocal(state);
998
+ const newLines = [...nextState.lines];
999
+ newLines[cursorRow] =
1000
+ cpSlice(newLines[cursorRow], 0, placeholder.start) +
1001
+ cpSlice(newLines[cursorRow], placeholder.end);
1002
+ // Recalculate transformations for the modified line
1003
+ const newTransformations = [...nextState.transformationsByLine];
1004
+ newTransformations[cursorRow] = calculateTransformationsForLine(newLines[cursorRow]);
1005
+ // Clean up pastedContent if this was a paste placeholder
1006
+ let newPastedContent = nextState.pastedContent;
1007
+ if (placeholder.type === 'paste' && placeholder.id) {
1008
+ const { [placeholder.id]: _, ...remaining } = nextState.pastedContent;
1009
+ newPastedContent = remaining;
1010
+ }
1011
+ return {
1012
+ ...nextState,
1013
+ lines: newLines,
1014
+ cursorCol: placeholder.start,
1015
+ preferredCol: null,
1016
+ transformationsByLine: newTransformations,
1017
+ pastedContent: newPastedContent,
1018
+ };
1019
+ }
1020
+ // Standard backspace logic
1021
+ const nextState = pushUndoLocal(state);
1022
+ const newLines = [...nextState.lines];
1023
+ let newCursorRow = nextState.cursorRow;
1024
+ let newCursorCol = nextState.cursorCol;
1025
+ const currentLine = (r) => newLines[r] ?? '';
1026
+ if (newCursorCol > 0) {
1027
+ const lineContent = currentLine(newCursorRow);
1028
+ newLines[newCursorRow] =
1029
+ cpSlice(lineContent, 0, newCursorCol - 1) +
1030
+ cpSlice(lineContent, newCursorCol);
1031
+ newCursorCol--;
1032
+ }
1033
+ else if (newCursorRow > 0) {
1034
+ const prevLineContent = currentLine(newCursorRow - 1);
1035
+ const currentLineContentVal = currentLine(newCursorRow);
1036
+ const newCol = cpLen(prevLineContent);
1037
+ newLines[newCursorRow - 1] = prevLineContent + currentLineContentVal;
1038
+ newLines.splice(newCursorRow, 1);
1039
+ newCursorRow--;
1040
+ newCursorCol = newCol;
1041
+ }
1042
+ return {
1043
+ ...nextState,
1044
+ lines: newLines,
1045
+ cursorRow: newCursorRow,
1046
+ cursorCol: newCursorCol,
1047
+ preferredCol: null,
1048
+ };
1049
+ }
1050
+ case 'set_viewport': {
1051
+ const { width, height } = action.payload;
1052
+ if (width === state.viewportWidth && height === state.viewportHeight) {
1053
+ return state;
1054
+ }
1055
+ return {
1056
+ ...state,
1057
+ viewportWidth: width,
1058
+ viewportHeight: height,
1059
+ };
1060
+ }
1061
+ case 'move': {
1062
+ const { dir } = action.payload;
1063
+ const { cursorRow, cursorCol, lines, visualLayout, preferredCol } = state;
1064
+ // Visual movements
1065
+ if (dir === 'left' ||
1066
+ dir === 'right' ||
1067
+ dir === 'up' ||
1068
+ dir === 'down' ||
1069
+ dir === 'home' ||
1070
+ dir === 'end') {
1071
+ const visualCursor = calculateVisualCursorFromLayout(visualLayout, [
1072
+ cursorRow,
1073
+ cursorCol,
1074
+ ]);
1075
+ const { visualLines, visualToLogicalMap } = visualLayout;
1076
+ let newVisualRow = visualCursor[0];
1077
+ let newVisualCol = visualCursor[1];
1078
+ let newPreferredCol = preferredCol;
1079
+ const currentVisLineLen = cpLen(visualLines[newVisualRow] ?? '');
1080
+ switch (dir) {
1081
+ case 'left':
1082
+ newPreferredCol = null;
1083
+ if (newVisualCol > 0) {
1084
+ newVisualCol--;
1085
+ }
1086
+ else if (newVisualRow > 0) {
1087
+ newVisualRow--;
1088
+ newVisualCol = cpLen(visualLines[newVisualRow] ?? '');
1089
+ }
1090
+ break;
1091
+ case 'right':
1092
+ newPreferredCol = null;
1093
+ if (newVisualCol < currentVisLineLen) {
1094
+ newVisualCol++;
1095
+ }
1096
+ else if (newVisualRow < visualLines.length - 1) {
1097
+ newVisualRow++;
1098
+ newVisualCol = 0;
1099
+ }
1100
+ break;
1101
+ case 'up':
1102
+ if (newVisualRow > 0) {
1103
+ if (newPreferredCol === null)
1104
+ newPreferredCol = newVisualCol;
1105
+ newVisualRow--;
1106
+ newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
1107
+ }
1108
+ break;
1109
+ case 'down':
1110
+ if (newVisualRow < visualLines.length - 1) {
1111
+ if (newPreferredCol === null)
1112
+ newPreferredCol = newVisualCol;
1113
+ newVisualRow++;
1114
+ newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
1115
+ }
1116
+ break;
1117
+ case 'home':
1118
+ newPreferredCol = null;
1119
+ newVisualCol = 0;
1120
+ break;
1121
+ case 'end':
1122
+ newPreferredCol = null;
1123
+ newVisualCol = currentVisLineLen;
1124
+ break;
1125
+ default: {
1126
+ const exhaustiveCheck = dir;
1127
+ debugLogger.error(`Unknown visual movement direction: ${exhaustiveCheck}`);
1128
+ return state;
1129
+ }
1130
+ }
1131
+ if (visualToLogicalMap[newVisualRow]) {
1132
+ const [logRow, logicalStartCol] = visualToLogicalMap[newVisualRow];
1133
+ const transformedToLogicalMap = visualLayout.transformedToLogicalMaps?.[logRow] ?? [];
1134
+ let transformedStartCol = 0;
1135
+ while (transformedStartCol < transformedToLogicalMap.length &&
1136
+ transformedToLogicalMap[transformedStartCol] < logicalStartCol) {
1137
+ transformedStartCol++;
1138
+ }
1139
+ const clampedTransformedCol = Math.min(transformedStartCol + newVisualCol, Math.max(0, transformedToLogicalMap.length - 1));
1140
+ const newLogicalCol = transformedToLogicalMap[clampedTransformedCol] ??
1141
+ cpLen(lines[logRow] ?? '');
1142
+ return {
1143
+ ...state,
1144
+ cursorRow: logRow,
1145
+ cursorCol: newLogicalCol,
1146
+ preferredCol: newPreferredCol,
1147
+ };
1148
+ }
1149
+ return state;
1150
+ }
1151
+ // Logical movements
1152
+ switch (dir) {
1153
+ case 'wordLeft': {
1154
+ if (cursorCol === 0 && cursorRow === 0)
1155
+ return state;
1156
+ let newCursorRow = cursorRow;
1157
+ let newCursorCol = cursorCol;
1158
+ if (cursorCol === 0) {
1159
+ newCursorRow--;
1160
+ newCursorCol = cpLen(lines[newCursorRow] ?? '');
1161
+ }
1162
+ else {
1163
+ const lineContent = lines[cursorRow];
1164
+ newCursorCol = findPrevWordBoundary(lineContent, cursorCol);
1165
+ }
1166
+ return {
1167
+ ...state,
1168
+ cursorRow: newCursorRow,
1169
+ cursorCol: newCursorCol,
1170
+ preferredCol: null,
1171
+ };
1172
+ }
1173
+ case 'wordRight': {
1174
+ const lineContent = lines[cursorRow] ?? '';
1175
+ if (cursorRow === lines.length - 1 &&
1176
+ cursorCol === cpLen(lineContent)) {
1177
+ return state;
1178
+ }
1179
+ let newCursorRow = cursorRow;
1180
+ let newCursorCol = cursorCol;
1181
+ const lineLen = cpLen(lineContent);
1182
+ if (cursorCol >= lineLen) {
1183
+ newCursorRow++;
1184
+ newCursorCol = 0;
1185
+ }
1186
+ else {
1187
+ newCursorCol = findNextWordBoundary(lineContent, cursorCol);
1188
+ }
1189
+ return {
1190
+ ...state,
1191
+ cursorRow: newCursorRow,
1192
+ cursorCol: newCursorCol,
1193
+ preferredCol: null,
1194
+ };
1195
+ }
1196
+ default:
1197
+ return state;
1198
+ }
1199
+ }
1200
+ case 'set_cursor': {
1201
+ return {
1202
+ ...state,
1203
+ ...action.payload,
1204
+ };
1205
+ }
1206
+ case 'delete': {
1207
+ const { cursorRow, cursorCol, lines, transformationsByLine } = state;
1208
+ // Check if cursor is at start of an atomic placeholder
1209
+ const transformations = transformationsByLine[cursorRow] ?? [];
1210
+ const placeholder = findAtomicPlaceholderForDelete(lines[cursorRow], cursorCol, transformations);
1211
+ if (placeholder) {
1212
+ const nextState = pushUndoLocal(state);
1213
+ const newLines = [...nextState.lines];
1214
+ newLines[cursorRow] =
1215
+ cpSlice(newLines[cursorRow], 0, placeholder.start) +
1216
+ cpSlice(newLines[cursorRow], placeholder.end);
1217
+ // Recalculate transformations for the modified line
1218
+ const newTransformations = [...nextState.transformationsByLine];
1219
+ newTransformations[cursorRow] = calculateTransformationsForLine(newLines[cursorRow]);
1220
+ // Clean up pastedContent if this was a paste placeholder
1221
+ let newPastedContent = nextState.pastedContent;
1222
+ if (placeholder.type === 'paste' && placeholder.id) {
1223
+ const { [placeholder.id]: _, ...remaining } = nextState.pastedContent;
1224
+ newPastedContent = remaining;
1225
+ }
1226
+ return {
1227
+ ...nextState,
1228
+ lines: newLines,
1229
+ // cursorCol stays the same
1230
+ preferredCol: null,
1231
+ transformationsByLine: newTransformations,
1232
+ pastedContent: newPastedContent,
1233
+ };
1234
+ }
1235
+ // Standard delete logic
1236
+ const lineContent = currentLine(cursorRow);
1237
+ if (cursorCol < currentLineLen(cursorRow)) {
1238
+ const nextState = pushUndoLocal(state);
1239
+ const newLines = [...nextState.lines];
1240
+ newLines[cursorRow] =
1241
+ cpSlice(lineContent, 0, cursorCol) +
1242
+ cpSlice(lineContent, cursorCol + 1);
1243
+ return {
1244
+ ...nextState,
1245
+ lines: newLines,
1246
+ preferredCol: null,
1247
+ };
1248
+ }
1249
+ else if (cursorRow < lines.length - 1) {
1250
+ const nextState = pushUndoLocal(state);
1251
+ const nextLineContent = currentLine(cursorRow + 1);
1252
+ const newLines = [...nextState.lines];
1253
+ newLines[cursorRow] = lineContent + nextLineContent;
1254
+ newLines.splice(cursorRow + 1, 1);
1255
+ return {
1256
+ ...nextState,
1257
+ lines: newLines,
1258
+ preferredCol: null,
1259
+ };
1260
+ }
1261
+ return state;
1262
+ }
1263
+ case 'delete_word_left': {
1264
+ const { cursorRow, cursorCol } = state;
1265
+ if (cursorCol === 0 && cursorRow === 0)
1266
+ return state;
1267
+ const nextState = pushUndoLocal(state);
1268
+ const newLines = [...nextState.lines];
1269
+ let newCursorRow = cursorRow;
1270
+ let newCursorCol = cursorCol;
1271
+ if (newCursorCol > 0) {
1272
+ const lineContent = currentLine(newCursorRow);
1273
+ const prevWordStart = findPrevWordStartInLine(lineContent, newCursorCol);
1274
+ const start = prevWordStart === null ? 0 : prevWordStart;
1275
+ newLines[newCursorRow] =
1276
+ cpSlice(lineContent, 0, start) + cpSlice(lineContent, newCursorCol);
1277
+ newCursorCol = start;
1278
+ }
1279
+ else {
1280
+ // Act as a backspace
1281
+ const prevLineContent = currentLine(cursorRow - 1);
1282
+ const currentLineContentVal = currentLine(cursorRow);
1283
+ const newCol = cpLen(prevLineContent);
1284
+ newLines[cursorRow - 1] = prevLineContent + currentLineContentVal;
1285
+ newLines.splice(cursorRow, 1);
1286
+ newCursorRow--;
1287
+ newCursorCol = newCol;
1288
+ }
1289
+ return {
1290
+ ...nextState,
1291
+ lines: newLines,
1292
+ cursorRow: newCursorRow,
1293
+ cursorCol: newCursorCol,
1294
+ preferredCol: null,
1295
+ };
1296
+ }
1297
+ case 'delete_word_right': {
1298
+ const { cursorRow, cursorCol, lines } = state;
1299
+ const lineContent = currentLine(cursorRow);
1300
+ const lineLen = cpLen(lineContent);
1301
+ if (cursorCol >= lineLen && cursorRow === lines.length - 1) {
1302
+ return state;
1303
+ }
1304
+ const nextState = pushUndoLocal(state);
1305
+ const newLines = [...nextState.lines];
1306
+ if (cursorCol >= lineLen) {
1307
+ // Act as a delete, joining with the next line
1308
+ const nextLineContent = currentLine(cursorRow + 1);
1309
+ newLines[cursorRow] = lineContent + nextLineContent;
1310
+ newLines.splice(cursorRow + 1, 1);
1311
+ }
1312
+ else {
1313
+ const nextWordStart = findNextWordStartInLine(lineContent, cursorCol);
1314
+ const end = nextWordStart === null ? lineLen : nextWordStart;
1315
+ newLines[cursorRow] =
1316
+ cpSlice(lineContent, 0, cursorCol) + cpSlice(lineContent, end);
1317
+ }
1318
+ return {
1319
+ ...nextState,
1320
+ lines: newLines,
1321
+ preferredCol: null,
1322
+ };
1323
+ }
1324
+ case 'kill_line_right': {
1325
+ const { cursorRow, cursorCol, lines } = state;
1326
+ const lineContent = currentLine(cursorRow);
1327
+ if (cursorCol < currentLineLen(cursorRow)) {
1328
+ const nextState = pushUndoLocal(state);
1329
+ const newLines = [...nextState.lines];
1330
+ newLines[cursorRow] = cpSlice(lineContent, 0, cursorCol);
1331
+ return {
1332
+ ...nextState,
1333
+ lines: newLines,
1334
+ };
1335
+ }
1336
+ else if (cursorRow < lines.length - 1) {
1337
+ // Act as a delete
1338
+ const nextState = pushUndoLocal(state);
1339
+ const nextLineContent = currentLine(cursorRow + 1);
1340
+ const newLines = [...nextState.lines];
1341
+ newLines[cursorRow] = lineContent + nextLineContent;
1342
+ newLines.splice(cursorRow + 1, 1);
1343
+ return {
1344
+ ...nextState,
1345
+ lines: newLines,
1346
+ preferredCol: null,
1347
+ };
1348
+ }
1349
+ return state;
1350
+ }
1351
+ case 'kill_line_left': {
1352
+ const { cursorRow, cursorCol } = state;
1353
+ if (cursorCol > 0) {
1354
+ const nextState = pushUndoLocal(state);
1355
+ const lineContent = currentLine(cursorRow);
1356
+ const newLines = [...nextState.lines];
1357
+ newLines[cursorRow] = cpSlice(lineContent, cursorCol);
1358
+ return {
1359
+ ...nextState,
1360
+ lines: newLines,
1361
+ cursorCol: 0,
1362
+ preferredCol: null,
1363
+ };
1364
+ }
1365
+ return state;
1366
+ }
1367
+ case 'undo': {
1368
+ const stateToRestore = state.undoStack[state.undoStack.length - 1];
1369
+ if (!stateToRestore)
1370
+ return state;
1371
+ const currentSnapshot = {
1372
+ lines: [...state.lines],
1373
+ cursorRow: state.cursorRow,
1374
+ cursorCol: state.cursorCol,
1375
+ pastedContent: { ...state.pastedContent },
1376
+ };
1377
+ return {
1378
+ ...state,
1379
+ ...stateToRestore,
1380
+ undoStack: state.undoStack.slice(0, -1),
1381
+ redoStack: [...state.redoStack, currentSnapshot],
1382
+ };
1383
+ }
1384
+ case 'redo': {
1385
+ const stateToRestore = state.redoStack[state.redoStack.length - 1];
1386
+ if (!stateToRestore)
1387
+ return state;
1388
+ const currentSnapshot = {
1389
+ lines: [...state.lines],
1390
+ cursorRow: state.cursorRow,
1391
+ cursorCol: state.cursorCol,
1392
+ pastedContent: { ...state.pastedContent },
1393
+ };
1394
+ return {
1395
+ ...state,
1396
+ ...stateToRestore,
1397
+ redoStack: state.redoStack.slice(0, -1),
1398
+ undoStack: [...state.undoStack, currentSnapshot],
1399
+ };
1400
+ }
1401
+ case 'replace_range': {
1402
+ const { startRow, startCol, endRow, endCol, text } = action.payload;
1403
+ const nextState = pushUndoLocal(state);
1404
+ return replaceRangeInternal(nextState, startRow, startCol, endRow, endCol, text);
1405
+ }
1406
+ case 'move_to_offset': {
1407
+ const { offset } = action.payload;
1408
+ const [newRow, newCol] = offsetToLogicalPos(state.lines.join('\n'), offset);
1409
+ return {
1410
+ ...state,
1411
+ cursorRow: newRow,
1412
+ cursorCol: newCol,
1413
+ preferredCol: null,
1414
+ };
1415
+ }
1416
+ case 'create_undo_snapshot': {
1417
+ return pushUndoLocal(state);
1418
+ }
1419
+ // Vim-specific operations
1420
+ case 'vim_delete_word_forward':
1421
+ case 'vim_delete_word_backward':
1422
+ case 'vim_delete_word_end':
1423
+ case 'vim_change_word_forward':
1424
+ case 'vim_change_word_backward':
1425
+ case 'vim_change_word_end':
1426
+ case 'vim_delete_line':
1427
+ case 'vim_change_line':
1428
+ case 'vim_delete_to_end_of_line':
1429
+ case 'vim_change_to_end_of_line':
1430
+ case 'vim_change_movement':
1431
+ case 'vim_move_left':
1432
+ case 'vim_move_right':
1433
+ case 'vim_move_up':
1434
+ case 'vim_move_down':
1435
+ case 'vim_move_word_forward':
1436
+ case 'vim_move_word_backward':
1437
+ case 'vim_move_word_end':
1438
+ case 'vim_delete_char':
1439
+ case 'vim_insert_at_cursor':
1440
+ case 'vim_append_at_cursor':
1441
+ case 'vim_open_line_below':
1442
+ case 'vim_open_line_above':
1443
+ case 'vim_append_at_line_end':
1444
+ case 'vim_insert_at_line_start':
1445
+ case 'vim_move_to_line_start':
1446
+ case 'vim_move_to_line_end':
1447
+ case 'vim_move_to_first_nonwhitespace':
1448
+ case 'vim_move_to_first_line':
1449
+ case 'vim_move_to_last_line':
1450
+ case 'vim_move_to_line':
1451
+ case 'vim_escape_insert_mode':
1452
+ return handleVimAction(state, action);
1453
+ default: {
1454
+ const exhaustiveCheck = action;
1455
+ debugLogger.error(`Unknown action encountered: ${exhaustiveCheck}`);
1456
+ return state;
1457
+ }
1458
+ }
1459
+ }
1460
+ export function textBufferReducer(state, action, options = {}) {
1461
+ const newState = textBufferReducerLogic(state, action, options);
1462
+ const newTransformedLines = newState.lines !== state.lines
1463
+ ? calculateTransformations(newState.lines)
1464
+ : state.transformationsByLine;
1465
+ const oldTransform = getTransformUnderCursor(state.cursorRow, state.cursorCol, state.transformationsByLine);
1466
+ const newTransform = getTransformUnderCursor(newState.cursorRow, newState.cursorCol, newTransformedLines);
1467
+ const oldInside = oldTransform !== null;
1468
+ const newInside = newTransform !== null;
1469
+ const movedBetweenTransforms = oldTransform !== newTransform &&
1470
+ (oldTransform !== null || newTransform !== null);
1471
+ if (newState.lines !== state.lines ||
1472
+ newState.viewportWidth !== state.viewportWidth ||
1473
+ oldInside !== newInside ||
1474
+ movedBetweenTransforms) {
1475
+ const shouldResetPreferred = oldInside !== newInside || movedBetweenTransforms;
1476
+ return {
1477
+ ...newState,
1478
+ preferredCol: shouldResetPreferred ? null : newState.preferredCol,
1479
+ visualLayout: calculateLayout(newState.lines, newState.viewportWidth, [
1480
+ newState.cursorRow,
1481
+ newState.cursorCol,
1482
+ ]),
1483
+ transformationsByLine: newTransformedLines,
1484
+ };
1485
+ }
1486
+ return newState;
1487
+ }
1488
+ // --- End of reducer logic ---
1489
+ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive = false, inputFilter, singleLine = false, getPreferredEditor, }) {
1490
+ const initialState = useMemo(() => {
1491
+ const lines = initialText.split('\n');
1492
+ const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(lines.length === 0 ? [''] : lines, initialCursorOffset);
1493
+ const transformationsByLine = calculateTransformations(lines.length === 0 ? [''] : lines);
1494
+ const visualLayout = calculateLayout(lines.length === 0 ? [''] : lines, viewport.width, [initialCursorRow, initialCursorCol]);
1495
+ return {
1496
+ lines: lines.length === 0 ? [''] : lines,
1497
+ cursorRow: initialCursorRow,
1498
+ cursorCol: initialCursorCol,
1499
+ transformationsByLine,
1500
+ preferredCol: null,
1501
+ undoStack: [],
1502
+ redoStack: [],
1503
+ clipboard: null,
1504
+ selectionAnchor: null,
1505
+ viewportWidth: viewport.width,
1506
+ viewportHeight: viewport.height,
1507
+ visualLayout,
1508
+ pastedContent: {},
1509
+ };
1510
+ }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
1511
+ const [state, dispatch] = useReducer((s, a) => textBufferReducer(s, a, { inputFilter, singleLine }), initialState);
1512
+ const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, transformationsByLine, pastedContent, } = state;
1513
+ const text = useMemo(() => lines.join('\n'), [lines]);
1514
+ const visualCursor = useMemo(() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]), [visualLayout, cursorRow, cursorCol]);
1515
+ const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
1516
+ const [visualScrollRow, setVisualScrollRow] = useState(0);
1517
+ useEffect(() => {
1518
+ if (onChange) {
1519
+ onChange(text);
1520
+ }
1521
+ }, [text, onChange]);
1522
+ useEffect(() => {
1523
+ dispatch({
1524
+ type: 'set_viewport',
1525
+ payload: { width: viewport.width, height: viewport.height },
1526
+ });
1527
+ }, [viewport.width, viewport.height]);
1528
+ // Update visual scroll (vertical)
1529
+ useEffect(() => {
1530
+ const { height } = viewport;
1531
+ const totalVisualLines = visualLines.length;
1532
+ const maxScrollStart = Math.max(0, totalVisualLines - height);
1533
+ let newVisualScrollRow = visualScrollRow;
1534
+ if (visualCursor[0] < visualScrollRow) {
1535
+ newVisualScrollRow = visualCursor[0];
1536
+ }
1537
+ else if (visualCursor[0] >= visualScrollRow + height) {
1538
+ newVisualScrollRow = visualCursor[0] - height + 1;
1539
+ }
1540
+ // When the number of visual lines shrinks (e.g., after widening the viewport),
1541
+ // ensure scroll never starts beyond the last valid start so we can render a full window.
1542
+ newVisualScrollRow = clamp(newVisualScrollRow, 0, maxScrollStart);
1543
+ if (newVisualScrollRow !== visualScrollRow) {
1544
+ setVisualScrollRow(newVisualScrollRow);
1545
+ }
1546
+ }, [visualCursor, visualScrollRow, viewport, visualLines.length]);
1547
+ const insert = useCallback((ch, { paste = false } = {}) => {
1548
+ if (typeof ch !== 'string') {
1549
+ return;
1550
+ }
1551
+ let textToInsert = ch;
1552
+ const minLengthToInferAsDragDrop = 3;
1553
+ if (ch.length >= minLengthToInferAsDragDrop &&
1554
+ !shellModeActive &&
1555
+ paste) {
1556
+ let potentialPath = ch.trim();
1557
+ const quoteMatch = potentialPath.match(/^'(.*)'$/);
1558
+ if (quoteMatch) {
1559
+ potentialPath = quoteMatch[1];
1560
+ }
1561
+ potentialPath = potentialPath.trim();
1562
+ const processed = parsePastedPaths(potentialPath, isValidPath);
1563
+ if (processed) {
1564
+ textToInsert = processed;
1565
+ }
1566
+ }
1567
+ let currentText = '';
1568
+ for (const char of toCodePoints(textToInsert)) {
1569
+ if (char.codePointAt(0) === 127) {
1570
+ if (currentText.length > 0) {
1571
+ dispatch({ type: 'insert', payload: currentText, isPaste: paste });
1572
+ currentText = '';
1573
+ }
1574
+ dispatch({ type: 'backspace' });
1575
+ }
1576
+ else {
1577
+ currentText += char;
1578
+ }
1579
+ }
1580
+ if (currentText.length > 0) {
1581
+ dispatch({ type: 'insert', payload: currentText, isPaste: paste });
1582
+ }
1583
+ }, [isValidPath, shellModeActive]);
1584
+ const newline = useCallback(() => {
1585
+ if (singleLine) {
1586
+ return;
1587
+ }
1588
+ dispatch({ type: 'insert', payload: '\n' });
1589
+ }, [singleLine]);
1590
+ const backspace = useCallback(() => {
1591
+ dispatch({ type: 'backspace' });
1592
+ }, []);
1593
+ const del = useCallback(() => {
1594
+ dispatch({ type: 'delete' });
1595
+ }, []);
1596
+ const move = useCallback((dir) => {
1597
+ dispatch({ type: 'move', payload: { dir } });
1598
+ }, [dispatch]);
1599
+ const undo = useCallback(() => {
1600
+ dispatch({ type: 'undo' });
1601
+ }, []);
1602
+ const redo = useCallback(() => {
1603
+ dispatch({ type: 'redo' });
1604
+ }, []);
1605
+ const setText = useCallback((newText) => {
1606
+ dispatch({ type: 'set_text', payload: newText });
1607
+ }, []);
1608
+ const deleteWordLeft = useCallback(() => {
1609
+ dispatch({ type: 'delete_word_left' });
1610
+ }, []);
1611
+ const deleteWordRight = useCallback(() => {
1612
+ dispatch({ type: 'delete_word_right' });
1613
+ }, []);
1614
+ const killLineRight = useCallback(() => {
1615
+ dispatch({ type: 'kill_line_right' });
1616
+ }, []);
1617
+ const killLineLeft = useCallback(() => {
1618
+ dispatch({ type: 'kill_line_left' });
1619
+ }, []);
1620
+ // Vim-specific operations
1621
+ const vimDeleteWordForward = useCallback((count) => {
1622
+ dispatch({ type: 'vim_delete_word_forward', payload: { count } });
1623
+ }, []);
1624
+ const vimDeleteWordBackward = useCallback((count) => {
1625
+ dispatch({ type: 'vim_delete_word_backward', payload: { count } });
1626
+ }, []);
1627
+ const vimDeleteWordEnd = useCallback((count) => {
1628
+ dispatch({ type: 'vim_delete_word_end', payload: { count } });
1629
+ }, []);
1630
+ const vimChangeWordForward = useCallback((count) => {
1631
+ dispatch({ type: 'vim_change_word_forward', payload: { count } });
1632
+ }, []);
1633
+ const vimChangeWordBackward = useCallback((count) => {
1634
+ dispatch({ type: 'vim_change_word_backward', payload: { count } });
1635
+ }, []);
1636
+ const vimChangeWordEnd = useCallback((count) => {
1637
+ dispatch({ type: 'vim_change_word_end', payload: { count } });
1638
+ }, []);
1639
+ const vimDeleteLine = useCallback((count) => {
1640
+ dispatch({ type: 'vim_delete_line', payload: { count } });
1641
+ }, []);
1642
+ const vimChangeLine = useCallback((count) => {
1643
+ dispatch({ type: 'vim_change_line', payload: { count } });
1644
+ }, []);
1645
+ const vimDeleteToEndOfLine = useCallback(() => {
1646
+ dispatch({ type: 'vim_delete_to_end_of_line' });
1647
+ }, []);
1648
+ const vimChangeToEndOfLine = useCallback(() => {
1649
+ dispatch({ type: 'vim_change_to_end_of_line' });
1650
+ }, []);
1651
+ const vimChangeMovement = useCallback((movement, count) => {
1652
+ dispatch({ type: 'vim_change_movement', payload: { movement, count } });
1653
+ }, []);
1654
+ // New vim navigation and operation methods
1655
+ const vimMoveLeft = useCallback((count) => {
1656
+ dispatch({ type: 'vim_move_left', payload: { count } });
1657
+ }, []);
1658
+ const vimMoveRight = useCallback((count) => {
1659
+ dispatch({ type: 'vim_move_right', payload: { count } });
1660
+ }, []);
1661
+ const vimMoveUp = useCallback((count) => {
1662
+ dispatch({ type: 'vim_move_up', payload: { count } });
1663
+ }, []);
1664
+ const vimMoveDown = useCallback((count) => {
1665
+ dispatch({ type: 'vim_move_down', payload: { count } });
1666
+ }, []);
1667
+ const vimMoveWordForward = useCallback((count) => {
1668
+ dispatch({ type: 'vim_move_word_forward', payload: { count } });
1669
+ }, []);
1670
+ const vimMoveWordBackward = useCallback((count) => {
1671
+ dispatch({ type: 'vim_move_word_backward', payload: { count } });
1672
+ }, []);
1673
+ const vimMoveWordEnd = useCallback((count) => {
1674
+ dispatch({ type: 'vim_move_word_end', payload: { count } });
1675
+ }, []);
1676
+ const vimDeleteChar = useCallback((count) => {
1677
+ dispatch({ type: 'vim_delete_char', payload: { count } });
1678
+ }, []);
1679
+ const vimInsertAtCursor = useCallback(() => {
1680
+ dispatch({ type: 'vim_insert_at_cursor' });
1681
+ }, []);
1682
+ const vimAppendAtCursor = useCallback(() => {
1683
+ dispatch({ type: 'vim_append_at_cursor' });
1684
+ }, []);
1685
+ const vimOpenLineBelow = useCallback(() => {
1686
+ dispatch({ type: 'vim_open_line_below' });
1687
+ }, []);
1688
+ const vimOpenLineAbove = useCallback(() => {
1689
+ dispatch({ type: 'vim_open_line_above' });
1690
+ }, []);
1691
+ const vimAppendAtLineEnd = useCallback(() => {
1692
+ dispatch({ type: 'vim_append_at_line_end' });
1693
+ }, []);
1694
+ const vimInsertAtLineStart = useCallback(() => {
1695
+ dispatch({ type: 'vim_insert_at_line_start' });
1696
+ }, []);
1697
+ const vimMoveToLineStart = useCallback(() => {
1698
+ dispatch({ type: 'vim_move_to_line_start' });
1699
+ }, []);
1700
+ const vimMoveToLineEnd = useCallback(() => {
1701
+ dispatch({ type: 'vim_move_to_line_end' });
1702
+ }, []);
1703
+ const vimMoveToFirstNonWhitespace = useCallback(() => {
1704
+ dispatch({ type: 'vim_move_to_first_nonwhitespace' });
1705
+ }, []);
1706
+ const vimMoveToFirstLine = useCallback(() => {
1707
+ dispatch({ type: 'vim_move_to_first_line' });
1708
+ }, []);
1709
+ const vimMoveToLastLine = useCallback(() => {
1710
+ dispatch({ type: 'vim_move_to_last_line' });
1711
+ }, []);
1712
+ const vimMoveToLine = useCallback((lineNumber) => {
1713
+ dispatch({ type: 'vim_move_to_line', payload: { lineNumber } });
1714
+ }, []);
1715
+ const vimEscapeInsertMode = useCallback(() => {
1716
+ dispatch({ type: 'vim_escape_insert_mode' });
1717
+ }, []);
1718
+ const openInExternalEditor = useCallback(async () => {
1719
+ const tmpDir = fs.mkdtempSync(pathMod.join(os.tmpdir(), 'gemini-edit-'));
1720
+ const filePath = pathMod.join(tmpDir, 'buffer.txt');
1721
+ fs.writeFileSync(filePath, text, 'utf8');
1722
+ let command = undefined;
1723
+ const args = [filePath];
1724
+ const preferredEditorType = getPreferredEditor?.();
1725
+ if (!command && preferredEditorType) {
1726
+ command = getEditorCommand(preferredEditorType);
1727
+ if (isGuiEditor(preferredEditorType)) {
1728
+ args.unshift('--wait');
1729
+ }
1730
+ }
1731
+ if (!command) {
1732
+ command =
1733
+ process.env['VISUAL'] ??
1734
+ process.env['EDITOR'] ??
1735
+ (process.platform === 'win32' ? 'notepad' : 'vi');
1736
+ }
1737
+ dispatch({ type: 'create_undo_snapshot' });
1738
+ const wasRaw = stdin?.isRaw ?? false;
1739
+ try {
1740
+ setRawMode?.(false);
1741
+ const { status, error } = spawnSync(command, args, {
1742
+ stdio: 'inherit',
1743
+ });
1744
+ if (error)
1745
+ throw error;
1746
+ if (typeof status === 'number' && status !== 0)
1747
+ throw new Error(`External editor exited with status ${status}`);
1748
+ let newText = fs.readFileSync(filePath, 'utf8');
1749
+ newText = newText.replace(/\r\n?/g, '\n');
1750
+ dispatch({ type: 'set_text', payload: newText, pushToUndo: false });
1751
+ }
1752
+ catch (err) {
1753
+ coreEvents.emitFeedback('error', '[useTextBuffer] external editor error', err);
1754
+ }
1755
+ finally {
1756
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
1757
+ if (wasRaw)
1758
+ setRawMode?.(true);
1759
+ try {
1760
+ fs.unlinkSync(filePath);
1761
+ }
1762
+ catch {
1763
+ /* ignore */
1764
+ }
1765
+ try {
1766
+ fs.rmdirSync(tmpDir);
1767
+ }
1768
+ catch {
1769
+ /* ignore */
1770
+ }
1771
+ }
1772
+ }, [text, stdin, setRawMode, getPreferredEditor]);
1773
+ const handleInput = useCallback((key) => {
1774
+ const { sequence: input } = key;
1775
+ if (key.name === 'paste')
1776
+ insert(input, { paste: true });
1777
+ else if (keyMatchers[Command.RETURN](key))
1778
+ newline();
1779
+ else if (keyMatchers[Command.NEWLINE](key))
1780
+ newline();
1781
+ else if (keyMatchers[Command.MOVE_LEFT](key))
1782
+ move('left');
1783
+ else if (keyMatchers[Command.MOVE_RIGHT](key))
1784
+ move('right');
1785
+ else if (keyMatchers[Command.MOVE_UP](key))
1786
+ move('up');
1787
+ else if (keyMatchers[Command.MOVE_DOWN](key))
1788
+ move('down');
1789
+ else if (keyMatchers[Command.MOVE_WORD_LEFT](key))
1790
+ move('wordLeft');
1791
+ else if (keyMatchers[Command.MOVE_WORD_RIGHT](key))
1792
+ move('wordRight');
1793
+ else if (keyMatchers[Command.HOME](key))
1794
+ move('home');
1795
+ else if (keyMatchers[Command.END](key))
1796
+ move('end');
1797
+ else if (keyMatchers[Command.DELETE_WORD_BACKWARD](key))
1798
+ deleteWordLeft();
1799
+ else if (keyMatchers[Command.DELETE_WORD_FORWARD](key))
1800
+ deleteWordRight();
1801
+ else if (keyMatchers[Command.DELETE_CHAR_LEFT](key))
1802
+ backspace();
1803
+ else if (keyMatchers[Command.DELETE_CHAR_RIGHT](key))
1804
+ del();
1805
+ else if (keyMatchers[Command.UNDO](key))
1806
+ undo();
1807
+ else if (keyMatchers[Command.REDO](key))
1808
+ redo();
1809
+ else if (key.insertable)
1810
+ insert(input, { paste: false });
1811
+ }, [
1812
+ newline,
1813
+ move,
1814
+ deleteWordLeft,
1815
+ deleteWordRight,
1816
+ backspace,
1817
+ del,
1818
+ insert,
1819
+ undo,
1820
+ redo,
1821
+ ]);
1822
+ const renderedVisualLines = useMemo(() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height), [visualLines, visualScrollRow, viewport.height]);
1823
+ const replaceRange = useCallback((startRow, startCol, endRow, endCol, text) => {
1824
+ dispatch({
1825
+ type: 'replace_range',
1826
+ payload: { startRow, startCol, endRow, endCol, text },
1827
+ });
1828
+ }, []);
1829
+ const replaceRangeByOffset = useCallback((startOffset, endOffset, replacementText) => {
1830
+ const [startRow, startCol] = offsetToLogicalPos(text, startOffset);
1831
+ const [endRow, endCol] = offsetToLogicalPos(text, endOffset);
1832
+ replaceRange(startRow, startCol, endRow, endCol, replacementText);
1833
+ }, [text, replaceRange]);
1834
+ const moveToOffset = useCallback((offset) => {
1835
+ dispatch({ type: 'move_to_offset', payload: { offset } });
1836
+ }, []);
1837
+ const moveToVisualPosition = useCallback((visRow, visCol) => {
1838
+ const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
1839
+ // Clamp visRow to valid range
1840
+ const clampedVisRow = Math.max(0, Math.min(visRow, visualLines.length - 1));
1841
+ const visualLine = visualLines[clampedVisRow] || '';
1842
+ if (visualToLogicalMap[clampedVisRow]) {
1843
+ const [logRow] = visualToLogicalMap[clampedVisRow];
1844
+ const transformedToLogicalMap = transformedToLogicalMaps?.[logRow] ?? [];
1845
+ // Where does this visual line begin within the transformed line?
1846
+ const startColInTransformed = visualToTransformedMap?.[clampedVisRow] ?? 0;
1847
+ // Handle wide characters: convert visual X position to character offset
1848
+ const codePoints = toCodePoints(visualLine);
1849
+ let currentVisX = 0;
1850
+ let charOffset = 0;
1851
+ for (const char of codePoints) {
1852
+ const charWidth = getCachedStringWidth(char);
1853
+ // If the click is within this character
1854
+ if (visCol < currentVisX + charWidth) {
1855
+ // Check if we clicked the second half of a wide character
1856
+ if (charWidth > 1 && visCol >= currentVisX + charWidth / 2) {
1857
+ charOffset++;
1858
+ }
1859
+ break;
1860
+ }
1861
+ currentVisX += charWidth;
1862
+ charOffset++;
1863
+ }
1864
+ // Clamp charOffset to length
1865
+ charOffset = Math.min(charOffset, codePoints.length);
1866
+ // Map character offset through transformations to get logical position
1867
+ const transformedCol = Math.min(startColInTransformed + charOffset, Math.max(0, transformedToLogicalMap.length - 1));
1868
+ const newCursorRow = logRow;
1869
+ const newCursorCol = transformedToLogicalMap[transformedCol] ?? cpLen(lines[logRow] ?? '');
1870
+ dispatch({
1871
+ type: 'set_cursor',
1872
+ payload: {
1873
+ cursorRow: newCursorRow,
1874
+ cursorCol: newCursorCol,
1875
+ preferredCol: charOffset,
1876
+ },
1877
+ });
1878
+ }
1879
+ }, [visualLayout, lines]);
1880
+ const getOffset = useCallback(() => logicalPosToOffset(lines, cursorRow, cursorCol), [lines, cursorRow, cursorCol]);
1881
+ const returnValue = useMemo(() => ({
1882
+ lines,
1883
+ text,
1884
+ cursor: [cursorRow, cursorCol],
1885
+ preferredCol,
1886
+ selectionAnchor,
1887
+ pastedContent,
1888
+ allVisualLines: visualLines,
1889
+ viewportVisualLines: renderedVisualLines,
1890
+ visualCursor,
1891
+ visualScrollRow,
1892
+ visualToLogicalMap,
1893
+ transformedToLogicalMaps,
1894
+ visualToTransformedMap,
1895
+ transformationsByLine,
1896
+ visualLayout,
1897
+ setText,
1898
+ insert,
1899
+ newline,
1900
+ backspace,
1901
+ del,
1902
+ move,
1903
+ undo,
1904
+ redo,
1905
+ replaceRange,
1906
+ replaceRangeByOffset,
1907
+ moveToOffset,
1908
+ getOffset,
1909
+ moveToVisualPosition,
1910
+ deleteWordLeft,
1911
+ deleteWordRight,
1912
+ killLineRight,
1913
+ killLineLeft,
1914
+ handleInput,
1915
+ openInExternalEditor,
1916
+ // Vim-specific operations
1917
+ vimDeleteWordForward,
1918
+ vimDeleteWordBackward,
1919
+ vimDeleteWordEnd,
1920
+ vimChangeWordForward,
1921
+ vimChangeWordBackward,
1922
+ vimChangeWordEnd,
1923
+ vimDeleteLine,
1924
+ vimChangeLine,
1925
+ vimDeleteToEndOfLine,
1926
+ vimChangeToEndOfLine,
1927
+ vimChangeMovement,
1928
+ vimMoveLeft,
1929
+ vimMoveRight,
1930
+ vimMoveUp,
1931
+ vimMoveDown,
1932
+ vimMoveWordForward,
1933
+ vimMoveWordBackward,
1934
+ vimMoveWordEnd,
1935
+ vimDeleteChar,
1936
+ vimInsertAtCursor,
1937
+ vimAppendAtCursor,
1938
+ vimOpenLineBelow,
1939
+ vimOpenLineAbove,
1940
+ vimAppendAtLineEnd,
1941
+ vimInsertAtLineStart,
1942
+ vimMoveToLineStart,
1943
+ vimMoveToLineEnd,
1944
+ vimMoveToFirstNonWhitespace,
1945
+ vimMoveToFirstLine,
1946
+ vimMoveToLastLine,
1947
+ vimMoveToLine,
1948
+ vimEscapeInsertMode,
1949
+ }), [
1950
+ lines,
1951
+ text,
1952
+ cursorRow,
1953
+ cursorCol,
1954
+ preferredCol,
1955
+ selectionAnchor,
1956
+ pastedContent,
1957
+ visualLines,
1958
+ renderedVisualLines,
1959
+ visualCursor,
1960
+ visualScrollRow,
1961
+ visualToLogicalMap,
1962
+ transformedToLogicalMaps,
1963
+ visualToTransformedMap,
1964
+ transformationsByLine,
1965
+ visualLayout,
1966
+ setText,
1967
+ insert,
1968
+ newline,
1969
+ backspace,
1970
+ del,
1971
+ move,
1972
+ undo,
1973
+ redo,
1974
+ replaceRange,
1975
+ replaceRangeByOffset,
1976
+ moveToOffset,
1977
+ getOffset,
1978
+ moveToVisualPosition,
1979
+ deleteWordLeft,
1980
+ deleteWordRight,
1981
+ killLineRight,
1982
+ killLineLeft,
1983
+ handleInput,
1984
+ openInExternalEditor,
1985
+ vimDeleteWordForward,
1986
+ vimDeleteWordBackward,
1987
+ vimDeleteWordEnd,
1988
+ vimChangeWordForward,
1989
+ vimChangeWordBackward,
1990
+ vimChangeWordEnd,
1991
+ vimDeleteLine,
1992
+ vimChangeLine,
1993
+ vimDeleteToEndOfLine,
1994
+ vimChangeToEndOfLine,
1995
+ vimChangeMovement,
1996
+ vimMoveLeft,
1997
+ vimMoveRight,
1998
+ vimMoveUp,
1999
+ vimMoveDown,
2000
+ vimMoveWordForward,
2001
+ vimMoveWordBackward,
2002
+ vimMoveWordEnd,
2003
+ vimDeleteChar,
2004
+ vimInsertAtCursor,
2005
+ vimAppendAtCursor,
2006
+ vimOpenLineBelow,
2007
+ vimOpenLineAbove,
2008
+ vimAppendAtLineEnd,
2009
+ vimInsertAtLineStart,
2010
+ vimMoveToLineStart,
2011
+ vimMoveToLineEnd,
2012
+ vimMoveToFirstNonWhitespace,
2013
+ vimMoveToFirstLine,
2014
+ vimMoveToLastLine,
2015
+ vimMoveToLine,
2016
+ vimEscapeInsertMode,
2017
+ ]);
2018
+ return returnValue;
2019
+ }
2020
+ //# sourceMappingURL=text-buffer.js.map