@google/gemini-cli 0.0.4 → 0.0.44-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1100) hide show
  1. package/README.md +10 -4
  2. package/gemini.js +416261 -0
  3. package/package.json +13 -11
  4. package/dist/.last_build +0 -0
  5. package/dist/index.d.ts +0 -7
  6. package/dist/index.js +0 -29
  7. package/dist/index.js.map +0 -1
  8. package/dist/package.json +0 -84
  9. package/dist/src/commands/extensions/disable.d.ts +0 -14
  10. package/dist/src/commands/extensions/disable.js +0 -42
  11. package/dist/src/commands/extensions/disable.js.map +0 -1
  12. package/dist/src/commands/extensions/enable.d.ts +0 -14
  13. package/dist/src/commands/extensions/enable.js +0 -46
  14. package/dist/src/commands/extensions/enable.js.map +0 -1
  15. package/dist/src/commands/extensions/examples/context/GEMINI.md +0 -8
  16. package/dist/src/commands/extensions/examples/context/gemini-extension.json +0 -5
  17. package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +0 -6
  18. package/dist/src/commands/extensions/examples/custom-commands/gemini-extension.json +0 -4
  19. package/dist/src/commands/extensions/examples/exclude-tools/gemini-extension.json +0 -5
  20. package/dist/src/commands/extensions/examples/mcp-server/example.d.ts +0 -6
  21. package/dist/src/commands/extensions/examples/mcp-server/example.js +0 -46
  22. package/dist/src/commands/extensions/examples/mcp-server/example.js.map +0 -1
  23. package/dist/src/commands/extensions/examples/mcp-server/example.ts +0 -60
  24. package/dist/src/commands/extensions/examples/mcp-server/gemini-extension.json +0 -10
  25. package/dist/src/commands/extensions/install.d.ts +0 -14
  26. package/dist/src/commands/extensions/install.js +0 -77
  27. package/dist/src/commands/extensions/install.js.map +0 -1
  28. package/dist/src/commands/extensions/install.test.d.ts +0 -6
  29. package/dist/src/commands/extensions/install.test.js +0 -95
  30. package/dist/src/commands/extensions/install.test.js.map +0 -1
  31. package/dist/src/commands/extensions/link.d.ts +0 -12
  32. package/dist/src/commands/extensions/link.js +0 -37
  33. package/dist/src/commands/extensions/link.js.map +0 -1
  34. package/dist/src/commands/extensions/list.d.ts +0 -8
  35. package/dist/src/commands/extensions/list.js +0 -32
  36. package/dist/src/commands/extensions/list.js.map +0 -1
  37. package/dist/src/commands/extensions/new.d.ts +0 -7
  38. package/dist/src/commands/extensions/new.js +0 -70
  39. package/dist/src/commands/extensions/new.js.map +0 -1
  40. package/dist/src/commands/extensions/new.test.d.ts +0 -6
  41. package/dist/src/commands/extensions/new.test.js +0 -50
  42. package/dist/src/commands/extensions/new.test.js.map +0 -1
  43. package/dist/src/commands/extensions/uninstall.d.ts +0 -12
  44. package/dist/src/commands/extensions/uninstall.js +0 -38
  45. package/dist/src/commands/extensions/uninstall.js.map +0 -1
  46. package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
  47. package/dist/src/commands/extensions/uninstall.test.js +0 -15
  48. package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
  49. package/dist/src/commands/extensions/update.d.ts +0 -13
  50. package/dist/src/commands/extensions/update.js +0 -69
  51. package/dist/src/commands/extensions/update.js.map +0 -1
  52. package/dist/src/commands/extensions.d.ts +0 -7
  53. package/dist/src/commands/extensions.js +0 -33
  54. package/dist/src/commands/extensions.js.map +0 -1
  55. package/dist/src/commands/mcp/add.d.ts +0 -7
  56. package/dist/src/commands/mcp/add.js +0 -166
  57. package/dist/src/commands/mcp/add.js.map +0 -1
  58. package/dist/src/commands/mcp/list.d.ts +0 -8
  59. package/dist/src/commands/mcp/list.js +0 -110
  60. package/dist/src/commands/mcp/list.js.map +0 -1
  61. package/dist/src/commands/mcp/remove.d.ts +0 -7
  62. package/dist/src/commands/mcp/remove.js +0 -44
  63. package/dist/src/commands/mcp/remove.js.map +0 -1
  64. package/dist/src/commands/mcp.d.ts +0 -7
  65. package/dist/src/commands/mcp.js +0 -23
  66. package/dist/src/commands/mcp.js.map +0 -1
  67. package/dist/src/config/auth.d.ts +0 -6
  68. package/dist/src/config/auth.js +0 -34
  69. package/dist/src/config/auth.js.map +0 -1
  70. package/dist/src/config/auth.test.d.ts +0 -6
  71. package/dist/src/config/auth.test.js +0 -65
  72. package/dist/src/config/auth.test.js.map +0 -1
  73. package/dist/src/config/config.d.ts +0 -45
  74. package/dist/src/config/config.js +0 -480
  75. package/dist/src/config/config.js.map +0 -1
  76. package/dist/src/config/extension.d.ts +0 -66
  77. package/dist/src/config/extension.js +0 -524
  78. package/dist/src/config/extension.js.map +0 -1
  79. package/dist/src/config/extensions/extensionEnablement.d.ts +0 -30
  80. package/dist/src/config/extensions/extensionEnablement.js +0 -113
  81. package/dist/src/config/extensions/extensionEnablement.js.map +0 -1
  82. package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
  83. package/dist/src/config/extensions/extensionEnablement.test.js +0 -116
  84. package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
  85. package/dist/src/config/extensions/github.d.ts +0 -25
  86. package/dist/src/config/extensions/github.js +0 -258
  87. package/dist/src/config/extensions/github.js.map +0 -1
  88. package/dist/src/config/extensions/github.test.d.ts +0 -6
  89. package/dist/src/config/extensions/github.test.js +0 -232
  90. package/dist/src/config/extensions/github.test.js.map +0 -1
  91. package/dist/src/config/extensions/variableSchema.d.ts +0 -36
  92. package/dist/src/config/extensions/variableSchema.js +0 -22
  93. package/dist/src/config/extensions/variableSchema.js.map +0 -1
  94. package/dist/src/config/extensions/variables.d.ts +0 -17
  95. package/dist/src/config/extensions/variables.js +0 -40
  96. package/dist/src/config/extensions/variables.js.map +0 -1
  97. package/dist/src/config/extensions/variables.test.d.ts +0 -6
  98. package/dist/src/config/extensions/variables.test.js +0 -17
  99. package/dist/src/config/extensions/variables.test.js.map +0 -1
  100. package/dist/src/config/keyBindings.d.ts +0 -70
  101. package/dist/src/config/keyBindings.js +0 -130
  102. package/dist/src/config/keyBindings.js.map +0 -1
  103. package/dist/src/config/keyBindings.test.d.ts +0 -6
  104. package/dist/src/config/keyBindings.test.js +0 -51
  105. package/dist/src/config/keyBindings.test.js.map +0 -1
  106. package/dist/src/config/policy-engine.integration.test.d.ts +0 -6
  107. package/dist/src/config/policy-engine.integration.test.js +0 -270
  108. package/dist/src/config/policy-engine.integration.test.js.map +0 -1
  109. package/dist/src/config/policy.d.ts +0 -8
  110. package/dist/src/config/policy.js +0 -150
  111. package/dist/src/config/policy.js.map +0 -1
  112. package/dist/src/config/policy.test.d.ts +0 -6
  113. package/dist/src/config/policy.test.js +0 -336
  114. package/dist/src/config/policy.test.js.map +0 -1
  115. package/dist/src/config/sandboxConfig.d.ts +0 -13
  116. package/dist/src/config/sandboxConfig.js +0 -73
  117. package/dist/src/config/sandboxConfig.js.map +0 -1
  118. package/dist/src/config/settings.d.ts +0 -65
  119. package/dist/src/config/settings.js +0 -553
  120. package/dist/src/config/settings.js.map +0 -1
  121. package/dist/src/config/settingsSchema.d.ts +0 -959
  122. package/dist/src/config/settingsSchema.js +0 -925
  123. package/dist/src/config/settingsSchema.js.map +0 -1
  124. package/dist/src/config/settingsSchema.test.d.ts +0 -6
  125. package/dist/src/config/settingsSchema.test.js +0 -206
  126. package/dist/src/config/settingsSchema.test.js.map +0 -1
  127. package/dist/src/config/trustedFolders.d.ts +0 -47
  128. package/dist/src/config/trustedFolders.js +0 -142
  129. package/dist/src/config/trustedFolders.js.map +0 -1
  130. package/dist/src/config/trustedFolders.test.d.ts +0 -6
  131. package/dist/src/config/trustedFolders.test.js +0 -259
  132. package/dist/src/config/trustedFolders.test.js.map +0 -1
  133. package/dist/src/core/auth.d.ts +0 -13
  134. package/dist/src/core/auth.js +0 -27
  135. package/dist/src/core/auth.js.map +0 -1
  136. package/dist/src/core/initializer.d.ts +0 -21
  137. package/dist/src/core/initializer.js +0 -33
  138. package/dist/src/core/initializer.js.map +0 -1
  139. package/dist/src/core/theme.d.ts +0 -12
  140. package/dist/src/core/theme.js +0 -20
  141. package/dist/src/core/theme.js.map +0 -1
  142. package/dist/src/gemini.d.ts +0 -12
  143. package/dist/src/gemini.js +0 -334
  144. package/dist/src/gemini.js.map +0 -1
  145. package/dist/src/gemini.test.d.ts +0 -6
  146. package/dist/src/gemini.test.js +0 -318
  147. package/dist/src/gemini.test.js.map +0 -1
  148. package/dist/src/generated/git-commit.d.ts +0 -7
  149. package/dist/src/generated/git-commit.js +0 -10
  150. package/dist/src/generated/git-commit.js.map +0 -1
  151. package/dist/src/nonInteractiveCli.d.ts +0 -7
  152. package/dist/src/nonInteractiveCli.js +0 -108
  153. package/dist/src/nonInteractiveCli.js.map +0 -1
  154. package/dist/src/patches/is-in-ci.d.ts +0 -7
  155. package/dist/src/patches/is-in-ci.js +0 -15
  156. package/dist/src/patches/is-in-ci.js.map +0 -1
  157. package/dist/src/services/BuiltinCommandLoader.d.ts +0 -24
  158. package/dist/src/services/BuiltinCommandLoader.js +0 -82
  159. package/dist/src/services/BuiltinCommandLoader.js.map +0 -1
  160. package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
  161. package/dist/src/services/BuiltinCommandLoader.test.js +0 -107
  162. package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
  163. package/dist/src/services/CommandService.d.ts +0 -55
  164. package/dist/src/services/CommandService.js +0 -90
  165. package/dist/src/services/CommandService.js.map +0 -1
  166. package/dist/src/services/CommandService.test.d.ts +0 -6
  167. package/dist/src/services/CommandService.test.js +0 -233
  168. package/dist/src/services/CommandService.test.js.map +0 -1
  169. package/dist/src/services/FileCommandLoader.d.ts +0 -51
  170. package/dist/src/services/FileCommandLoader.js +0 -227
  171. package/dist/src/services/FileCommandLoader.js.map +0 -1
  172. package/dist/src/services/McpPromptLoader.d.ts +0 -35
  173. package/dist/src/services/McpPromptLoader.js +0 -253
  174. package/dist/src/services/McpPromptLoader.js.map +0 -1
  175. package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
  176. package/dist/src/services/McpPromptLoader.test.js +0 -341
  177. package/dist/src/services/McpPromptLoader.test.js.map +0 -1
  178. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +0 -16
  179. package/dist/src/services/prompt-processors/argumentProcessor.js +0 -21
  180. package/dist/src/services/prompt-processors/argumentProcessor.js.map +0 -1
  181. package/dist/src/services/prompt-processors/atFileProcessor.d.ts +0 -12
  182. package/dist/src/services/prompt-processors/atFileProcessor.js +0 -62
  183. package/dist/src/services/prompt-processors/atFileProcessor.js.map +0 -1
  184. package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
  185. package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -174
  186. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
  187. package/dist/src/services/prompt-processors/injectionParser.d.ts +0 -29
  188. package/dist/src/services/prompt-processors/injectionParser.js +0 -60
  189. package/dist/src/services/prompt-processors/injectionParser.js.map +0 -1
  190. package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
  191. package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
  192. package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
  193. package/dist/src/services/prompt-processors/shellProcessor.d.ts +0 -27
  194. package/dist/src/services/prompt-processors/shellProcessor.js +0 -128
  195. package/dist/src/services/prompt-processors/shellProcessor.js.map +0 -1
  196. package/dist/src/services/prompt-processors/types.d.ts +0 -45
  197. package/dist/src/services/prompt-processors/types.js +0 -20
  198. package/dist/src/services/prompt-processors/types.js.map +0 -1
  199. package/dist/src/services/types.d.ts +0 -22
  200. package/dist/src/services/types.js +0 -7
  201. package/dist/src/services/types.js.map +0 -1
  202. package/dist/src/test-utils/customMatchers.d.ts +0 -14
  203. package/dist/src/test-utils/customMatchers.js +0 -40
  204. package/dist/src/test-utils/customMatchers.js.map +0 -1
  205. package/dist/src/test-utils/mockCommandContext.d.ts +0 -18
  206. package/dist/src/test-utils/mockCommandContext.js +0 -86
  207. package/dist/src/test-utils/mockCommandContext.js.map +0 -1
  208. package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
  209. package/dist/src/test-utils/mockCommandContext.test.js +0 -51
  210. package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
  211. package/dist/src/test-utils/render.d.ts +0 -8
  212. package/dist/src/test-utils/render.js +0 -10
  213. package/dist/src/test-utils/render.js.map +0 -1
  214. package/dist/src/ui/App.d.ts +0 -6
  215. package/dist/src/ui/App.js +0 -22
  216. package/dist/src/ui/App.js.map +0 -1
  217. package/dist/src/ui/AppContainer.d.ts +0 -17
  218. package/dist/src/ui/AppContainer.js +0 -879
  219. package/dist/src/ui/AppContainer.js.map +0 -1
  220. package/dist/src/ui/AppContainer.test.d.ts +0 -6
  221. package/dist/src/ui/AppContainer.test.js +0 -414
  222. package/dist/src/ui/AppContainer.test.js.map +0 -1
  223. package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -16
  224. package/dist/src/ui/IdeIntegrationNudge.js +0 -47
  225. package/dist/src/ui/IdeIntegrationNudge.js.map +0 -1
  226. package/dist/src/ui/auth/AuthDialog.d.ts +0 -18
  227. package/dist/src/ui/auth/AuthDialog.js +0 -99
  228. package/dist/src/ui/auth/AuthDialog.js.map +0 -1
  229. package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
  230. package/dist/src/ui/auth/AuthDialog.test.js +0 -184
  231. package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
  232. package/dist/src/ui/auth/AuthInProgress.d.ts +0 -11
  233. package/dist/src/ui/auth/AuthInProgress.js +0 -23
  234. package/dist/src/ui/auth/AuthInProgress.js.map +0 -1
  235. package/dist/src/ui/auth/useAuth.d.ts +0 -15
  236. package/dist/src/ui/auth/useAuth.js +0 -73
  237. package/dist/src/ui/auth/useAuth.js.map +0 -1
  238. package/dist/src/ui/colors.d.ts +0 -7
  239. package/dist/src/ui/colors.js +0 -54
  240. package/dist/src/ui/colors.js.map +0 -1
  241. package/dist/src/ui/commands/aboutCommand.d.ts +0 -7
  242. package/dist/src/ui/commands/aboutCommand.js +0 -49
  243. package/dist/src/ui/commands/aboutCommand.js.map +0 -1
  244. package/dist/src/ui/commands/authCommand.d.ts +0 -7
  245. package/dist/src/ui/commands/authCommand.js +0 -16
  246. package/dist/src/ui/commands/authCommand.js.map +0 -1
  247. package/dist/src/ui/commands/bugCommand.d.ts +0 -7
  248. package/dist/src/ui/commands/bugCommand.js +0 -76
  249. package/dist/src/ui/commands/bugCommand.js.map +0 -1
  250. package/dist/src/ui/commands/chatCommand.d.ts +0 -9
  251. package/dist/src/ui/commands/chatCommand.js +0 -314
  252. package/dist/src/ui/commands/chatCommand.js.map +0 -1
  253. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  254. package/dist/src/ui/commands/clearCommand.js +0 -27
  255. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  256. package/dist/src/ui/commands/compressCommand.d.ts +0 -7
  257. package/dist/src/ui/commands/compressCommand.js +0 -66
  258. package/dist/src/ui/commands/compressCommand.js.map +0 -1
  259. package/dist/src/ui/commands/copyCommand.d.ts +0 -7
  260. package/dist/src/ui/commands/copyCommand.js +0 -59
  261. package/dist/src/ui/commands/copyCommand.js.map +0 -1
  262. package/dist/src/ui/commands/corgiCommand.d.ts +0 -7
  263. package/dist/src/ui/commands/corgiCommand.js +0 -16
  264. package/dist/src/ui/commands/corgiCommand.js.map +0 -1
  265. package/dist/src/ui/commands/directoryCommand.d.ts +0 -8
  266. package/dist/src/ui/commands/directoryCommand.js +0 -135
  267. package/dist/src/ui/commands/directoryCommand.js.map +0 -1
  268. package/dist/src/ui/commands/docsCommand.d.ts +0 -7
  269. package/dist/src/ui/commands/docsCommand.js +0 -31
  270. package/dist/src/ui/commands/docsCommand.js.map +0 -1
  271. package/dist/src/ui/commands/editorCommand.d.ts +0 -7
  272. package/dist/src/ui/commands/editorCommand.js +0 -16
  273. package/dist/src/ui/commands/editorCommand.js.map +0 -1
  274. package/dist/src/ui/commands/extensionsCommand.d.ts +0 -7
  275. package/dist/src/ui/commands/extensionsCommand.js +0 -85
  276. package/dist/src/ui/commands/extensionsCommand.js.map +0 -1
  277. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  278. package/dist/src/ui/commands/helpCommand.js +0 -21
  279. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  280. package/dist/src/ui/commands/ideCommand.d.ts +0 -7
  281. package/dist/src/ui/commands/ideCommand.js +0 -225
  282. package/dist/src/ui/commands/ideCommand.js.map +0 -1
  283. package/dist/src/ui/commands/initCommand.d.ts +0 -7
  284. package/dist/src/ui/commands/initCommand.js +0 -76
  285. package/dist/src/ui/commands/initCommand.js.map +0 -1
  286. package/dist/src/ui/commands/mcpCommand.d.ts +0 -7
  287. package/dist/src/ui/commands/mcpCommand.js +0 -433
  288. package/dist/src/ui/commands/mcpCommand.js.map +0 -1
  289. package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
  290. package/dist/src/ui/commands/memoryCommand.js +0 -92
  291. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  292. package/dist/src/ui/commands/privacyCommand.d.ts +0 -7
  293. package/dist/src/ui/commands/privacyCommand.js +0 -16
  294. package/dist/src/ui/commands/privacyCommand.js.map +0 -1
  295. package/dist/src/ui/commands/quitCommand.d.ts +0 -7
  296. package/dist/src/ui/commands/quitCommand.js +0 -34
  297. package/dist/src/ui/commands/quitCommand.js.map +0 -1
  298. package/dist/src/ui/commands/restoreCommand.d.ts +0 -8
  299. package/dist/src/ui/commands/restoreCommand.js +0 -124
  300. package/dist/src/ui/commands/restoreCommand.js.map +0 -1
  301. package/dist/src/ui/commands/settingsCommand.d.ts +0 -7
  302. package/dist/src/ui/commands/settingsCommand.js +0 -16
  303. package/dist/src/ui/commands/settingsCommand.js.map +0 -1
  304. package/dist/src/ui/commands/setupGithubCommand.d.ts +0 -9
  305. package/dist/src/ui/commands/setupGithubCommand.js +0 -154
  306. package/dist/src/ui/commands/setupGithubCommand.js.map +0 -1
  307. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
  308. package/dist/src/ui/commands/setupGithubCommand.test.js +0 -167
  309. package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
  310. package/dist/src/ui/commands/statsCommand.d.ts +0 -7
  311. package/dist/src/ui/commands/statsCommand.js +0 -54
  312. package/dist/src/ui/commands/statsCommand.js.map +0 -1
  313. package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
  314. package/dist/src/ui/commands/terminalSetupCommand.js +0 -41
  315. package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
  316. package/dist/src/ui/commands/themeCommand.d.ts +0 -7
  317. package/dist/src/ui/commands/themeCommand.js +0 -16
  318. package/dist/src/ui/commands/themeCommand.js.map +0 -1
  319. package/dist/src/ui/commands/toolsCommand.d.ts +0 -7
  320. package/dist/src/ui/commands/toolsCommand.js +0 -56
  321. package/dist/src/ui/commands/toolsCommand.js.map +0 -1
  322. package/dist/src/ui/commands/types.d.ts +0 -152
  323. package/dist/src/ui/commands/types.js +0 -12
  324. package/dist/src/ui/commands/types.js.map +0 -1
  325. package/dist/src/ui/commands/vimCommand.d.ts +0 -7
  326. package/dist/src/ui/commands/vimCommand.js +0 -23
  327. package/dist/src/ui/commands/vimCommand.js.map +0 -1
  328. package/dist/src/ui/components/AboutBox.d.ts +0 -17
  329. package/dist/src/ui/components/AboutBox.js +0 -6
  330. package/dist/src/ui/components/AboutBox.js.map +0 -1
  331. package/dist/src/ui/components/AnsiOutput.d.ts +0 -13
  332. package/dist/src/ui/components/AnsiOutput.js +0 -12
  333. package/dist/src/ui/components/AnsiOutput.js.map +0 -1
  334. package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
  335. package/dist/src/ui/components/AnsiOutput.test.js +0 -97
  336. package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
  337. package/dist/src/ui/components/AppHeader.d.ts +0 -10
  338. package/dist/src/ui/components/AppHeader.js +0 -22
  339. package/dist/src/ui/components/AppHeader.js.map +0 -1
  340. package/dist/src/ui/components/AsciiArt.d.ts +0 -8
  341. package/dist/src/ui/components/AsciiArt.js +0 -36
  342. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  343. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  344. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
  345. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  346. package/dist/src/ui/components/Composer.d.ts +0 -6
  347. package/dist/src/ui/components/Composer.js +0 -73
  348. package/dist/src/ui/components/Composer.js.map +0 -1
  349. package/dist/src/ui/components/Composer.test.d.ts +0 -6
  350. package/dist/src/ui/components/Composer.test.js +0 -337
  351. package/dist/src/ui/components/Composer.test.js.map +0 -1
  352. package/dist/src/ui/components/ConfigInitDisplay.d.ts +0 -6
  353. package/dist/src/ui/components/ConfigInitDisplay.js +0 -38
  354. package/dist/src/ui/components/ConfigInitDisplay.js.map +0 -1
  355. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  356. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  357. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  358. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -20
  359. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -66
  360. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  361. package/dist/src/ui/components/ContextUsageDisplay.d.ts +0 -9
  362. package/dist/src/ui/components/ContextUsageDisplay.js +0 -14
  363. package/dist/src/ui/components/ContextUsageDisplay.js.map +0 -1
  364. package/dist/src/ui/components/DebugProfiler.d.ts +0 -6
  365. package/dist/src/ui/components/DebugProfiler.js +0 -27
  366. package/dist/src/ui/components/DebugProfiler.js.map +0 -1
  367. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  368. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  369. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  370. package/dist/src/ui/components/DialogManager.d.ts +0 -6
  371. package/dist/src/ui/components/DialogManager.js +0 -85
  372. package/dist/src/ui/components/DialogManager.js.map +0 -1
  373. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -16
  374. package/dist/src/ui/components/EditorSettingsDialog.js +0 -71
  375. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  376. package/dist/src/ui/components/FolderTrustDialog.d.ts +0 -17
  377. package/dist/src/ui/components/FolderTrustDialog.js +0 -55
  378. package/dist/src/ui/components/FolderTrustDialog.js.map +0 -1
  379. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
  380. package/dist/src/ui/components/FolderTrustDialog.test.js +0 -88
  381. package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
  382. package/dist/src/ui/components/Footer.d.ts +0 -25
  383. package/dist/src/ui/components/Footer.js +0 -30
  384. package/dist/src/ui/components/Footer.js.map +0 -1
  385. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -22
  386. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -23
  387. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  388. package/dist/src/ui/components/Header.d.ts +0 -13
  389. package/dist/src/ui/components/Header.js +0 -28
  390. package/dist/src/ui/components/Header.js.map +0 -1
  391. package/dist/src/ui/components/Header.test.d.ts +0 -6
  392. package/dist/src/ui/components/Header.test.js +0 -37
  393. package/dist/src/ui/components/Header.test.js.map +0 -1
  394. package/dist/src/ui/components/Help.d.ts +0 -12
  395. package/dist/src/ui/components/Help.js +0 -13
  396. package/dist/src/ui/components/Help.js.map +0 -1
  397. package/dist/src/ui/components/Help.test.d.ts +0 -6
  398. package/dist/src/ui/components/Help.test.js +0 -57
  399. package/dist/src/ui/components/Help.test.js.map +0 -1
  400. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -20
  401. package/dist/src/ui/components/HistoryItemDisplay.js +0 -20
  402. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  403. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  404. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -93
  405. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  406. package/dist/src/ui/components/InputPrompt.d.ts +0 -37
  407. package/dist/src/ui/components/InputPrompt.js +0 -700
  408. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  409. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  410. package/dist/src/ui/components/LoadingIndicator.js +0 -25
  411. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  412. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  413. package/dist/src/ui/components/LoadingIndicator.test.js +0 -190
  414. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  415. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +0 -13
  416. package/dist/src/ui/components/LoopDetectionConfirmation.js +0 -35
  417. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +0 -1
  418. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
  419. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -25
  420. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
  421. package/dist/src/ui/components/MainContent.d.ts +0 -6
  422. package/dist/src/ui/components/MainContent.js +0 -23
  423. package/dist/src/ui/components/MainContent.js.map +0 -1
  424. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  425. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -24
  426. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  427. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  428. package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
  429. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  430. package/dist/src/ui/components/Notifications.d.ts +0 -6
  431. package/dist/src/ui/components/Notifications.js +0 -23
  432. package/dist/src/ui/components/Notifications.js.map +0 -1
  433. package/dist/src/ui/components/PrepareLabel.d.ts +0 -15
  434. package/dist/src/ui/components/PrepareLabel.js +0 -72
  435. package/dist/src/ui/components/PrepareLabel.js.map +0 -1
  436. package/dist/src/ui/components/PrepareLabel.test.d.ts +0 -6
  437. package/dist/src/ui/components/PrepareLabel.test.js +0 -71
  438. package/dist/src/ui/components/PrepareLabel.test.js.map +0 -1
  439. package/dist/src/ui/components/ProQuotaDialog.d.ts +0 -13
  440. package/dist/src/ui/components/ProQuotaDialog.js +0 -21
  441. package/dist/src/ui/components/ProQuotaDialog.js.map +0 -1
  442. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
  443. package/dist/src/ui/components/ProQuotaDialog.test.js +0 -56
  444. package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
  445. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +0 -9
  446. package/dist/src/ui/components/QueuedMessageDisplay.js +0 -20
  447. package/dist/src/ui/components/QueuedMessageDisplay.js.map +0 -1
  448. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
  449. package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -56
  450. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
  451. package/dist/src/ui/components/QuittingDisplay.d.ts +0 -6
  452. package/dist/src/ui/components/QuittingDisplay.js +0 -20
  453. package/dist/src/ui/components/QuittingDisplay.js.map +0 -1
  454. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  455. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
  456. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  457. package/dist/src/ui/components/SettingsDialog.d.ts +0 -16
  458. package/dist/src/ui/components/SettingsDialog.js +0 -621
  459. package/dist/src/ui/components/SettingsDialog.js.map +0 -1
  460. package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
  461. package/dist/src/ui/components/SettingsDialog.test.js +0 -1002
  462. package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
  463. package/dist/src/ui/components/ShellConfirmationDialog.d.ts +0 -15
  464. package/dist/src/ui/components/ShellConfirmationDialog.js +0 -46
  465. package/dist/src/ui/components/ShellConfirmationDialog.js.map +0 -1
  466. package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +0 -6
  467. package/dist/src/ui/components/ShellConfirmationDialog.test.js +0 -40
  468. package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +0 -1
  469. package/dist/src/ui/components/ShellInputPrompt.d.ts +0 -11
  470. package/dist/src/ui/components/ShellInputPrompt.js +0 -36
  471. package/dist/src/ui/components/ShellInputPrompt.js.map +0 -1
  472. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  473. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  474. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  475. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  476. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  477. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  478. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  479. package/dist/src/ui/components/StatsDisplay.js +0 -43
  480. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  481. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -27
  482. package/dist/src/ui/components/SuggestionsDisplay.js +0 -40
  483. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  484. package/dist/src/ui/components/ThemeDialog.d.ts +0 -20
  485. package/dist/src/ui/components/ThemeDialog.js +0 -121
  486. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  487. package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
  488. package/dist/src/ui/components/ThemeDialog.test.js +0 -75
  489. package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
  490. package/dist/src/ui/components/Tips.d.ts +0 -12
  491. package/dist/src/ui/components/Tips.js +0 -9
  492. package/dist/src/ui/components/Tips.js.map +0 -1
  493. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  494. package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
  495. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  496. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  497. package/dist/src/ui/components/UpdateNotification.js +0 -10
  498. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  499. package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +0 -11
  500. package/dist/src/ui/components/WorkspaceMigrationDialog.js +0 -42
  501. package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +0 -1
  502. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -10
  503. package/dist/src/ui/components/messages/CompressionMessage.js +0 -46
  504. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  505. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
  506. package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -160
  507. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
  508. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -17
  509. package/dist/src/ui/components/messages/DiffRenderer.js +0 -218
  510. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  511. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  512. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
  513. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  514. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  515. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  516. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  517. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  518. package/dist/src/ui/components/messages/GeminiMessage.js +0 -11
  519. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  520. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  521. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  522. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  523. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  524. package/dist/src/ui/components/messages/InfoMessage.js +0 -10
  525. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  526. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -15
  527. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -174
  528. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  529. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  530. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -114
  531. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  532. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -19
  533. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -58
  534. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  535. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
  536. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -261
  537. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
  538. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -19
  539. package/dist/src/ui/components/messages/ToolMessage.js +0 -76
  540. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  541. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  542. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -150
  543. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  544. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  545. package/dist/src/ui/components/messages/UserMessage.js +0 -14
  546. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  547. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  548. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  549. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  550. package/dist/src/ui/components/messages/WarningMessage.d.ts +0 -11
  551. package/dist/src/ui/components/messages/WarningMessage.js +0 -10
  552. package/dist/src/ui/components/messages/WarningMessage.js.map +0 -1
  553. package/dist/src/ui/components/shared/EnumSelector.d.ts +0 -18
  554. package/dist/src/ui/components/shared/EnumSelector.js +0 -44
  555. package/dist/src/ui/components/shared/EnumSelector.js.map +0 -1
  556. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
  557. package/dist/src/ui/components/shared/EnumSelector.test.js +0 -70
  558. package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
  559. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  560. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -451
  561. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  562. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  563. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -154
  564. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  565. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -46
  566. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -116
  567. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  568. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
  569. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -111
  570. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
  571. package/dist/src/ui/components/shared/ScopeSelector.d.ts +0 -19
  572. package/dist/src/ui/components/shared/ScopeSelector.js +0 -11
  573. package/dist/src/ui/components/shared/ScopeSelector.js.map +0 -1
  574. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -490
  575. package/dist/src/ui/components/shared/text-buffer.js +0 -1598
  576. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  577. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +0 -72
  578. package/dist/src/ui/components/shared/vim-buffer-actions.js +0 -552
  579. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +0 -1
  580. package/dist/src/ui/components/views/ExtensionsList.d.ts +0 -6
  581. package/dist/src/ui/components/views/ExtensionsList.js +0 -47
  582. package/dist/src/ui/components/views/ExtensionsList.js.map +0 -1
  583. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
  584. package/dist/src/ui/components/views/ExtensionsList.test.js +0 -97
  585. package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
  586. package/dist/src/ui/constants.d.ts +0 -18
  587. package/dist/src/ui/constants.js +0 -23
  588. package/dist/src/ui/constants.js.map +0 -1
  589. package/dist/src/ui/contexts/AppContext.d.ts +0 -11
  590. package/dist/src/ui/contexts/AppContext.js +0 -15
  591. package/dist/src/ui/contexts/AppContext.js.map +0 -1
  592. package/dist/src/ui/contexts/ConfigContext.d.ts +0 -9
  593. package/dist/src/ui/contexts/ConfigContext.js +0 -16
  594. package/dist/src/ui/contexts/ConfigContext.js.map +0 -1
  595. package/dist/src/ui/contexts/FocusContext.d.ts +0 -7
  596. package/dist/src/ui/contexts/FocusContext.js +0 -9
  597. package/dist/src/ui/contexts/FocusContext.js.map +0 -1
  598. package/dist/src/ui/contexts/KeypressContext.d.ts +0 -34
  599. package/dist/src/ui/contexts/KeypressContext.js +0 -580
  600. package/dist/src/ui/contexts/KeypressContext.js.map +0 -1
  601. package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
  602. package/dist/src/ui/contexts/KeypressContext.test.js +0 -671
  603. package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
  604. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  605. package/dist/src/ui/contexts/OverflowContext.js +0 -38
  606. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  607. package/dist/src/ui/contexts/SessionContext.d.ts +0 -45
  608. package/dist/src/ui/contexts/SessionContext.js +0 -157
  609. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  610. package/dist/src/ui/contexts/SettingsContext.d.ts +0 -9
  611. package/dist/src/ui/contexts/SettingsContext.js +0 -15
  612. package/dist/src/ui/contexts/SettingsContext.js.map +0 -1
  613. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  614. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  615. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  616. package/dist/src/ui/contexts/UIActionsContext.d.ts +0 -36
  617. package/dist/src/ui/contexts/UIActionsContext.js +0 -20
  618. package/dist/src/ui/contexts/UIActionsContext.js.map +0 -1
  619. package/dist/src/ui/contexts/UIStateContext.d.ts +0 -95
  620. package/dist/src/ui/contexts/UIStateContext.js +0 -15
  621. package/dist/src/ui/contexts/UIStateContext.js.map +0 -1
  622. package/dist/src/ui/contexts/VimModeContext.d.ts +0 -19
  623. package/dist/src/ui/contexts/VimModeContext.js +0 -48
  624. package/dist/src/ui/contexts/VimModeContext.js.map +0 -1
  625. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  626. package/dist/src/ui/editors/editorSettingsManager.js +0 -47
  627. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  628. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  629. package/dist/src/ui/hooks/atCommandProcessor.js +0 -364
  630. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  631. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
  632. package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -834
  633. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
  634. package/dist/src/ui/hooks/keyToAnsi.d.ts +0 -15
  635. package/dist/src/ui/hooks/keyToAnsi.js +0 -67
  636. package/dist/src/ui/hooks/keyToAnsi.js.map +0 -1
  637. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -18
  638. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -279
  639. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  640. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
  641. package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -504
  642. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
  643. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -42
  644. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -406
  645. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  646. package/dist/src/ui/hooks/useAtCompletion.d.ts +0 -23
  647. package/dist/src/ui/hooks/useAtCompletion.js +0 -179
  648. package/dist/src/ui/hooks/useAtCompletion.js.map +0 -1
  649. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -13
  650. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -50
  651. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  652. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +0 -6
  653. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +0 -380
  654. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +0 -1
  655. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  656. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  657. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  658. package/dist/src/ui/hooks/useCommandCompletion.d.ts +0 -32
  659. package/dist/src/ui/hooks/useCommandCompletion.js +0 -186
  660. package/dist/src/ui/hooks/useCommandCompletion.js.map +0 -1
  661. package/dist/src/ui/hooks/useCompletion.d.ts +0 -24
  662. package/dist/src/ui/hooks/useCompletion.js +0 -88
  663. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  664. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  665. package/dist/src/ui/hooks/useConsoleMessages.js +0 -76
  666. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  667. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  668. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  669. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  670. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
  671. package/dist/src/ui/hooks/useEditorSettings.test.js +0 -164
  672. package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
  673. package/dist/src/ui/hooks/useFocus.d.ts +0 -10
  674. package/dist/src/ui/hooks/useFocus.js +0 -41
  675. package/dist/src/ui/hooks/useFocus.js.map +0 -1
  676. package/dist/src/ui/hooks/useFolderTrust.d.ts +0 -13
  677. package/dist/src/ui/hooks/useFolderTrust.js +0 -65
  678. package/dist/src/ui/hooks/useFolderTrust.js.map +0 -1
  679. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -35
  680. package/dist/src/ui/hooks/useGeminiStream.js +0 -724
  681. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  682. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  683. package/dist/src/ui/hooks/useGitBranchName.js +0 -58
  684. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  685. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
  686. package/dist/src/ui/hooks/useGitBranchName.test.js +0 -171
  687. package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
  688. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  689. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  690. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  691. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
  692. package/dist/src/ui/hooks/useHistoryManager.test.js +0 -171
  693. package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
  694. package/dist/src/ui/hooks/useIdeTrustListener.d.ts +0 -14
  695. package/dist/src/ui/hooks/useIdeTrustListener.js +0 -39
  696. package/dist/src/ui/hooks/useIdeTrustListener.js.map +0 -1
  697. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  698. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  699. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  700. package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
  701. package/dist/src/ui/hooks/useInputHistory.test.js +0 -207
  702. package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
  703. package/dist/src/ui/hooks/useInputHistoryStore.d.ts +0 -19
  704. package/dist/src/ui/hooks/useInputHistoryStore.js +0 -81
  705. package/dist/src/ui/hooks/useInputHistoryStore.js.map +0 -1
  706. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
  707. package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -234
  708. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
  709. package/dist/src/ui/hooks/useKeypress.d.ts +0 -17
  710. package/dist/src/ui/hooks/useKeypress.js +0 -27
  711. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  712. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -15
  713. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -20
  714. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
  715. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  716. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  717. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  718. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
  719. package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -91
  720. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
  721. package/dist/src/ui/hooks/useLogger.d.ts +0 -11
  722. package/dist/src/ui/hooks/useLogger.js +0 -29
  723. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  724. package/dist/src/ui/hooks/useMemoryMonitor.d.ts +0 -13
  725. package/dist/src/ui/hooks/useMemoryMonitor.js +0 -28
  726. package/dist/src/ui/hooks/useMemoryMonitor.js.map +0 -1
  727. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
  728. package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -57
  729. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
  730. package/dist/src/ui/hooks/useMessageQueue.d.ts +0 -23
  731. package/dist/src/ui/hooks/useMessageQueue.js +0 -51
  732. package/dist/src/ui/hooks/useMessageQueue.js.map +0 -1
  733. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
  734. package/dist/src/ui/hooks/useMessageQueue.test.js +0 -167
  735. package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
  736. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  737. package/dist/src/ui/hooks/usePhraseCycler.js +0 -190
  738. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  739. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  740. package/dist/src/ui/hooks/usePrivacySettings.js +0 -114
  741. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  742. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
  743. package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -90
  744. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
  745. package/dist/src/ui/hooks/usePromptCompletion.d.ts +0 -23
  746. package/dist/src/ui/hooks/usePromptCompletion.js +0 -177
  747. package/dist/src/ui/hooks/usePromptCompletion.js.map +0 -1
  748. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +0 -21
  749. package/dist/src/ui/hooks/useQuotaAndFallback.js +0 -122
  750. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +0 -1
  751. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
  752. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -267
  753. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
  754. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -34
  755. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -192
  756. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  757. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  758. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  759. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  760. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +0 -19
  761. package/dist/src/ui/hooks/useReverseSearchCompletion.js +0 -103
  762. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +0 -1
  763. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
  764. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -163
  765. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
  766. package/dist/src/ui/hooks/useSettingsCommand.d.ts +0 -10
  767. package/dist/src/ui/hooks/useSettingsCommand.js +0 -21
  768. package/dist/src/ui/hooks/useSettingsCommand.js.map +0 -1
  769. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -14
  770. package/dist/src/ui/hooks/useShellHistory.js +0 -111
  771. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  772. package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
  773. package/dist/src/ui/hooks/useShellHistory.test.js +0 -187
  774. package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
  775. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  776. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  777. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  778. package/dist/src/ui/hooks/useSlashCompletion.d.ts +0 -20
  779. package/dist/src/ui/hooks/useSlashCompletion.js +0 -344
  780. package/dist/src/ui/hooks/useSlashCompletion.js.map +0 -1
  781. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -9
  782. package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -564
  783. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
  784. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  785. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  786. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  787. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  788. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  789. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  790. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  791. package/dist/src/ui/hooks/useThemeCommand.js +0 -68
  792. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  793. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  794. package/dist/src/ui/hooks/useTimer.js +0 -58
  795. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  796. package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
  797. package/dist/src/ui/hooks/useTimer.test.js +0 -90
  798. package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
  799. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
  800. package/dist/src/ui/hooks/useToolScheduler.test.js +0 -855
  801. package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
  802. package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +0 -13
  803. package/dist/src/ui/hooks/useWorkspaceMigration.js +0 -54
  804. package/dist/src/ui/hooks/useWorkspaceMigration.js.map +0 -1
  805. package/dist/src/ui/hooks/vim.d.ts +0 -28
  806. package/dist/src/ui/hooks/vim.js +0 -639
  807. package/dist/src/ui/hooks/vim.js.map +0 -1
  808. package/dist/src/ui/keyMatchers.d.ts +0 -27
  809. package/dist/src/ui/keyMatchers.js +0 -68
  810. package/dist/src/ui/keyMatchers.js.map +0 -1
  811. package/dist/src/ui/keyMatchers.test.d.ts +0 -6
  812. package/dist/src/ui/keyMatchers.test.js +0 -293
  813. package/dist/src/ui/keyMatchers.test.js.map +0 -1
  814. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  815. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -41
  816. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  817. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  818. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -18
  819. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  820. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  821. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -18
  822. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  823. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  824. package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
  825. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  826. package/dist/src/ui/semantic-colors.d.ts +0 -7
  827. package/dist/src/ui/semantic-colors.js +0 -24
  828. package/dist/src/ui/semantic-colors.js.map +0 -1
  829. package/dist/src/ui/state/extensions.d.ts +0 -14
  830. package/dist/src/ui/state/extensions.js +0 -16
  831. package/dist/src/ui/state/extensions.js.map +0 -1
  832. package/dist/src/ui/textConstants.d.ts +0 -9
  833. package/dist/src/ui/textConstants.js +0 -10
  834. package/dist/src/ui/textConstants.js.map +0 -1
  835. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  836. package/dist/src/ui/themes/ansi-light.js +0 -142
  837. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  838. package/dist/src/ui/themes/ansi.d.ts +0 -7
  839. package/dist/src/ui/themes/ansi.js +0 -152
  840. package/dist/src/ui/themes/ansi.js.map +0 -1
  841. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  842. package/dist/src/ui/themes/atom-one-dark.js +0 -138
  843. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  844. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  845. package/dist/src/ui/themes/ayu-light.js +0 -130
  846. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  847. package/dist/src/ui/themes/ayu.d.ts +0 -7
  848. package/dist/src/ui/themes/ayu.js +0 -104
  849. package/dist/src/ui/themes/ayu.js.map +0 -1
  850. package/dist/src/ui/themes/color-utils.d.ts +0 -21
  851. package/dist/src/ui/themes/color-utils.js +0 -221
  852. package/dist/src/ui/themes/color-utils.js.map +0 -1
  853. package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
  854. package/dist/src/ui/themes/color-utils.test.js +0 -197
  855. package/dist/src/ui/themes/color-utils.test.js.map +0 -1
  856. package/dist/src/ui/themes/default-light.d.ts +0 -7
  857. package/dist/src/ui/themes/default-light.js +0 -100
  858. package/dist/src/ui/themes/default-light.js.map +0 -1
  859. package/dist/src/ui/themes/default.d.ts +0 -7
  860. package/dist/src/ui/themes/default.js +0 -143
  861. package/dist/src/ui/themes/default.js.map +0 -1
  862. package/dist/src/ui/themes/dracula.d.ts +0 -7
  863. package/dist/src/ui/themes/dracula.js +0 -115
  864. package/dist/src/ui/themes/dracula.js.map +0 -1
  865. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  866. package/dist/src/ui/themes/github-dark.js +0 -138
  867. package/dist/src/ui/themes/github-dark.js.map +0 -1
  868. package/dist/src/ui/themes/github-light.d.ts +0 -7
  869. package/dist/src/ui/themes/github-light.js +0 -140
  870. package/dist/src/ui/themes/github-light.js.map +0 -1
  871. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  872. package/dist/src/ui/themes/googlecode.js +0 -137
  873. package/dist/src/ui/themes/googlecode.js.map +0 -1
  874. package/dist/src/ui/themes/no-color.d.ts +0 -7
  875. package/dist/src/ui/themes/no-color.js +0 -115
  876. package/dist/src/ui/themes/no-color.js.map +0 -1
  877. package/dist/src/ui/themes/semantic-tokens.d.ts +0 -37
  878. package/dist/src/ui/themes/semantic-tokens.js +0 -94
  879. package/dist/src/ui/themes/semantic-tokens.js.map +0 -1
  880. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  881. package/dist/src/ui/themes/shades-of-purple.js +0 -304
  882. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  883. package/dist/src/ui/themes/theme-manager.d.ts +0 -66
  884. package/dist/src/ui/themes/theme-manager.js +0 -262
  885. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  886. package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
  887. package/dist/src/ui/themes/theme-manager.test.js +0 -142
  888. package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
  889. package/dist/src/ui/themes/theme.d.ts +0 -130
  890. package/dist/src/ui/themes/theme.js +0 -379
  891. package/dist/src/ui/themes/theme.js.map +0 -1
  892. package/dist/src/ui/themes/xcode.d.ts +0 -7
  893. package/dist/src/ui/themes/xcode.js +0 -145
  894. package/dist/src/ui/themes/xcode.js.map +0 -1
  895. package/dist/src/ui/types.d.ts +0 -224
  896. package/dist/src/ui/types.js +0 -56
  897. package/dist/src/ui/types.js.map +0 -1
  898. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -17
  899. package/dist/src/ui/utils/CodeColorizer.js +0 -111
  900. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  901. package/dist/src/ui/utils/ConsolePatcher.d.ts +0 -25
  902. package/dist/src/ui/utils/ConsolePatcher.js +0 -52
  903. package/dist/src/ui/utils/ConsolePatcher.js.map +0 -1
  904. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
  905. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -111
  906. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  907. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  908. package/dist/src/ui/utils/MarkdownDisplay.js +0 -208
  909. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  910. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  911. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -156
  912. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  913. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  914. package/dist/src/ui/utils/TableRenderer.js +0 -84
  915. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  916. package/dist/src/ui/utils/clipboardUtils.d.ts +0 -22
  917. package/dist/src/ui/utils/clipboardUtils.js +0 -126
  918. package/dist/src/ui/utils/clipboardUtils.js.map +0 -1
  919. package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
  920. package/dist/src/ui/utils/clipboardUtils.test.js +0 -65
  921. package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
  922. package/dist/src/ui/utils/commandUtils.d.ts +0 -24
  923. package/dist/src/ui/utils/commandUtils.js +0 -131
  924. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  925. package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
  926. package/dist/src/ui/utils/commandUtils.test.js +0 -349
  927. package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
  928. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  929. package/dist/src/ui/utils/computeStats.js +0 -57
  930. package/dist/src/ui/utils/computeStats.js.map +0 -1
  931. package/dist/src/ui/utils/displayUtils.d.ts +0 -17
  932. package/dist/src/ui/utils/displayUtils.js +0 -24
  933. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  934. package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
  935. package/dist/src/ui/utils/displayUtils.test.js +0 -42
  936. package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
  937. package/dist/src/ui/utils/formatters.d.ts +0 -13
  938. package/dist/src/ui/utils/formatters.js +0 -56
  939. package/dist/src/ui/utils/formatters.js.map +0 -1
  940. package/dist/src/ui/utils/formatters.test.d.ts +0 -6
  941. package/dist/src/ui/utils/formatters.test.js +0 -56
  942. package/dist/src/ui/utils/formatters.test.js.map +0 -1
  943. package/dist/src/ui/utils/highlight.d.ts +0 -11
  944. package/dist/src/ui/utils/highlight.js +0 -78
  945. package/dist/src/ui/utils/highlight.js.map +0 -1
  946. package/dist/src/ui/utils/highlight.test.d.ts +0 -6
  947. package/dist/src/ui/utils/highlight.test.js +0 -120
  948. package/dist/src/ui/utils/highlight.test.js.map +0 -1
  949. package/dist/src/ui/utils/isNarrowWidth.d.ts +0 -6
  950. package/dist/src/ui/utils/isNarrowWidth.js +0 -9
  951. package/dist/src/ui/utils/isNarrowWidth.js.map +0 -1
  952. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -13
  953. package/dist/src/ui/utils/kittyProtocolDetector.js +0 -98
  954. package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
  955. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  956. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  957. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  958. package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
  959. package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
  960. package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
  961. package/dist/src/ui/utils/platformConstants.d.ts +0 -75
  962. package/dist/src/ui/utils/platformConstants.js +0 -78
  963. package/dist/src/ui/utils/platformConstants.js.map +0 -1
  964. package/dist/src/ui/utils/terminalSetup.d.ts +0 -30
  965. package/dist/src/ui/utils/terminalSetup.js +0 -281
  966. package/dist/src/ui/utils/terminalSetup.js.map +0 -1
  967. package/dist/src/ui/utils/textUtils.d.ts +0 -41
  968. package/dist/src/ui/utils/textUtils.js +0 -129
  969. package/dist/src/ui/utils/textUtils.js.map +0 -1
  970. package/dist/src/ui/utils/updateCheck.d.ts +0 -12
  971. package/dist/src/ui/utils/updateCheck.js +0 -78
  972. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  973. package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
  974. package/dist/src/ui/utils/updateCheck.test.js +0 -145
  975. package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
  976. package/dist/src/utils/checks.d.ts +0 -19
  977. package/dist/src/utils/checks.js +0 -24
  978. package/dist/src/utils/checks.js.map +0 -1
  979. package/dist/src/utils/cleanup.d.ts +0 -8
  980. package/dist/src/utils/cleanup.js +0 -35
  981. package/dist/src/utils/cleanup.js.map +0 -1
  982. package/dist/src/utils/commands.d.ts +0 -20
  983. package/dist/src/utils/commands.js +0 -53
  984. package/dist/src/utils/commands.js.map +0 -1
  985. package/dist/src/utils/commands.test.d.ts +0 -6
  986. package/dist/src/utils/commands.test.js +0 -115
  987. package/dist/src/utils/commands.test.js.map +0 -1
  988. package/dist/src/utils/commentJson.d.ts +0 -9
  989. package/dist/src/utils/commentJson.js +0 -48
  990. package/dist/src/utils/commentJson.js.map +0 -1
  991. package/dist/src/utils/commentJson.test.d.ts +0 -6
  992. package/dist/src/utils/commentJson.test.js +0 -146
  993. package/dist/src/utils/commentJson.test.js.map +0 -1
  994. package/dist/src/utils/deepMerge.d.ts +0 -10
  995. package/dist/src/utils/deepMerge.js +0 -58
  996. package/dist/src/utils/deepMerge.js.map +0 -1
  997. package/dist/src/utils/deepMerge.test.d.ts +0 -6
  998. package/dist/src/utils/deepMerge.test.js +0 -143
  999. package/dist/src/utils/deepMerge.test.js.map +0 -1
  1000. package/dist/src/utils/dialogScopeUtils.d.ts +0 -32
  1001. package/dist/src/utils/dialogScopeUtils.js +0 -48
  1002. package/dist/src/utils/dialogScopeUtils.js.map +0 -1
  1003. package/dist/src/utils/envVarResolver.d.ts +0 -39
  1004. package/dist/src/utils/envVarResolver.js +0 -97
  1005. package/dist/src/utils/envVarResolver.js.map +0 -1
  1006. package/dist/src/utils/envVarResolver.test.d.ts +0 -6
  1007. package/dist/src/utils/envVarResolver.test.js +0 -221
  1008. package/dist/src/utils/envVarResolver.test.js.map +0 -1
  1009. package/dist/src/utils/errors.d.ts +0 -27
  1010. package/dist/src/utils/errors.js +0 -105
  1011. package/dist/src/utils/errors.js.map +0 -1
  1012. package/dist/src/utils/errors.test.d.ts +0 -6
  1013. package/dist/src/utils/errors.test.js +0 -303
  1014. package/dist/src/utils/errors.test.js.map +0 -1
  1015. package/dist/src/utils/events.d.ts +0 -12
  1016. package/dist/src/utils/events.js +0 -14
  1017. package/dist/src/utils/events.js.map +0 -1
  1018. package/dist/src/utils/gitUtils.d.ts +0 -30
  1019. package/dist/src/utils/gitUtils.js +0 -89
  1020. package/dist/src/utils/gitUtils.js.map +0 -1
  1021. package/dist/src/utils/gitUtils.test.d.ts +0 -6
  1022. package/dist/src/utils/gitUtils.test.js +0 -113
  1023. package/dist/src/utils/gitUtils.test.js.map +0 -1
  1024. package/dist/src/utils/handleAutoUpdate.d.ts +0 -11
  1025. package/dist/src/utils/handleAutoUpdate.js +0 -102
  1026. package/dist/src/utils/handleAutoUpdate.js.map +0 -1
  1027. package/dist/src/utils/installationInfo.d.ts +0 -23
  1028. package/dist/src/utils/installationInfo.js +0 -154
  1029. package/dist/src/utils/installationInfo.js.map +0 -1
  1030. package/dist/src/utils/installationInfo.test.d.ts +0 -6
  1031. package/dist/src/utils/installationInfo.test.js +0 -242
  1032. package/dist/src/utils/installationInfo.test.js.map +0 -1
  1033. package/dist/src/utils/package.d.ts +0 -12
  1034. package/dist/src/utils/package.js +0 -24
  1035. package/dist/src/utils/package.js.map +0 -1
  1036. package/dist/src/utils/processUtils.d.ts +0 -13
  1037. package/dist/src/utils/processUtils.js +0 -18
  1038. package/dist/src/utils/processUtils.js.map +0 -1
  1039. package/dist/src/utils/processUtils.test.d.ts +0 -6
  1040. package/dist/src/utils/processUtils.test.js +0 -20
  1041. package/dist/src/utils/processUtils.test.js.map +0 -1
  1042. package/dist/src/utils/readStdin.d.ts +0 -6
  1043. package/dist/src/utils/readStdin.js +0 -59
  1044. package/dist/src/utils/readStdin.js.map +0 -1
  1045. package/dist/src/utils/readStdin.test.d.ts +0 -6
  1046. package/dist/src/utils/readStdin.test.js +0 -88
  1047. package/dist/src/utils/readStdin.test.js.map +0 -1
  1048. package/dist/src/utils/resolvePath.d.ts +0 -6
  1049. package/dist/src/utils/resolvePath.js +0 -21
  1050. package/dist/src/utils/resolvePath.js.map +0 -1
  1051. package/dist/src/utils/sandbox-macos-permissive-closed.sb +0 -32
  1052. package/dist/src/utils/sandbox-macos-permissive-open.sb +0 -25
  1053. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +0 -37
  1054. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +0 -93
  1055. package/dist/src/utils/sandbox-macos-restrictive-open.sb +0 -96
  1056. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +0 -98
  1057. package/dist/src/utils/sandbox.d.ts +0 -7
  1058. package/dist/src/utils/sandbox.js +0 -735
  1059. package/dist/src/utils/sandbox.js.map +0 -1
  1060. package/dist/src/utils/settingsUtils.d.ts +0 -144
  1061. package/dist/src/utils/settingsUtils.js +0 -340
  1062. package/dist/src/utils/settingsUtils.js.map +0 -1
  1063. package/dist/src/utils/settingsUtils.test.d.ts +0 -6
  1064. package/dist/src/utils/settingsUtils.test.js +0 -808
  1065. package/dist/src/utils/settingsUtils.test.js.map +0 -1
  1066. package/dist/src/utils/spawnWrapper.d.ts +0 -7
  1067. package/dist/src/utils/spawnWrapper.js +0 -8
  1068. package/dist/src/utils/spawnWrapper.js.map +0 -1
  1069. package/dist/src/utils/startupWarnings.d.ts +0 -6
  1070. package/dist/src/utils/startupWarnings.js +0 -40
  1071. package/dist/src/utils/startupWarnings.js.map +0 -1
  1072. package/dist/src/utils/updateEventEmitter.d.ts +0 -11
  1073. package/dist/src/utils/updateEventEmitter.js +0 -12
  1074. package/dist/src/utils/updateEventEmitter.js.map +0 -1
  1075. package/dist/src/utils/userStartupWarnings.d.ts +0 -6
  1076. package/dist/src/utils/userStartupWarnings.js +0 -54
  1077. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  1078. package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
  1079. package/dist/src/utils/userStartupWarnings.test.js +0 -67
  1080. package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
  1081. package/dist/src/utils/version.d.ts +0 -6
  1082. package/dist/src/utils/version.js +0 -11
  1083. package/dist/src/utils/version.js.map +0 -1
  1084. package/dist/src/validateNonInterActiveAuth.d.ts +0 -9
  1085. package/dist/src/validateNonInterActiveAuth.js +0 -58
  1086. package/dist/src/validateNonInterActiveAuth.js.map +0 -1
  1087. package/dist/src/zed-integration/acp.d.ts +0 -63
  1088. package/dist/src/zed-integration/acp.js +0 -226
  1089. package/dist/src/zed-integration/acp.js.map +0 -1
  1090. package/dist/src/zed-integration/fileSystemService.d.ts +0 -19
  1091. package/dist/src/zed-integration/fileSystemService.js +0 -43
  1092. package/dist/src/zed-integration/fileSystemService.js.map +0 -1
  1093. package/dist/src/zed-integration/schema.d.ts +0 -11782
  1094. package/dist/src/zed-integration/schema.js +0 -311
  1095. package/dist/src/zed-integration/schema.js.map +0 -1
  1096. package/dist/src/zed-integration/zedIntegration.d.ts +0 -10
  1097. package/dist/src/zed-integration/zedIntegration.js +0 -745
  1098. package/dist/src/zed-integration/zedIntegration.js.map +0 -1
  1099. package/dist/tsconfig.tsbuildinfo +0 -1
  1100. package/npm-shrinkwrap.json +0 -17168
@@ -1,1598 +0,0 @@
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 { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
11
- import { unescapePath } from '@google/gemini-cli-core';
12
- import { toCodePoints, cpLen, cpSlice, stripUnsafeCharacters, getCachedStringWidth, } from '../../utils/textUtils.js';
13
- import { handleVimAction } from './vim-buffer-actions.js';
14
- // Simple helper for word‑wise ops.
15
- function isWordChar(ch) {
16
- if (ch === undefined) {
17
- return false;
18
- }
19
- return !/[\s,.;!?]/.test(ch);
20
- }
21
- // Helper functions for line-based word navigation
22
- 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
23
- export const isWhitespace = (char) => /\s/.test(char);
24
- // Check if a character is a combining mark (only diacritics for now)
25
- export const isCombiningMark = (char) => /\p{M}/u.test(char);
26
- // Check if a character should be considered part of a word (including combining marks)
27
- export const isWordCharWithCombining = (char) => isWordCharStrict(char) || isCombiningMark(char);
28
- // Get the script of a character (simplified for common scripts)
29
- export const getCharScript = (char) => {
30
- if (/[\p{Script=Latin}]/u.test(char))
31
- return 'latin'; // All Latin script chars including diacritics
32
- if (/[\p{Script=Han}]/u.test(char))
33
- return 'han'; // Chinese
34
- if (/[\p{Script=Arabic}]/u.test(char))
35
- return 'arabic';
36
- if (/[\p{Script=Hiragana}]/u.test(char))
37
- return 'hiragana';
38
- if (/[\p{Script=Katakana}]/u.test(char))
39
- return 'katakana';
40
- if (/[\p{Script=Cyrillic}]/u.test(char))
41
- return 'cyrillic';
42
- return 'other';
43
- };
44
- // Check if two characters are from different scripts (indicating word boundary)
45
- export const isDifferentScript = (char1, char2) => {
46
- if (!isWordCharStrict(char1) || !isWordCharStrict(char2))
47
- return false;
48
- return getCharScript(char1) !== getCharScript(char2);
49
- };
50
- // Find next word start within a line, starting from col
51
- export const findNextWordStartInLine = (line, col) => {
52
- const chars = toCodePoints(line);
53
- let i = col;
54
- if (i >= chars.length)
55
- return null;
56
- const currentChar = chars[i];
57
- // Skip current word/sequence based on character type
58
- if (isWordCharStrict(currentChar)) {
59
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
60
- // Check for script boundary - if next character is from different script, stop here
61
- if (i + 1 < chars.length &&
62
- isWordCharStrict(chars[i + 1]) &&
63
- isDifferentScript(chars[i], chars[i + 1])) {
64
- i++; // Include current character
65
- break; // Stop at script boundary
66
- }
67
- i++;
68
- }
69
- }
70
- else if (!isWhitespace(currentChar)) {
71
- while (i < chars.length &&
72
- !isWordCharStrict(chars[i]) &&
73
- !isWhitespace(chars[i])) {
74
- i++;
75
- }
76
- }
77
- // Skip whitespace
78
- while (i < chars.length && isWhitespace(chars[i])) {
79
- i++;
80
- }
81
- return i < chars.length ? i : null;
82
- };
83
- // Find previous word start within a line
84
- export const findPrevWordStartInLine = (line, col) => {
85
- const chars = toCodePoints(line);
86
- let i = col;
87
- if (i <= 0)
88
- return null;
89
- i--;
90
- // Skip whitespace moving backwards
91
- while (i >= 0 && isWhitespace(chars[i])) {
92
- i--;
93
- }
94
- if (i < 0)
95
- return null;
96
- if (isWordCharStrict(chars[i])) {
97
- // We're in a word, move to its beginning
98
- while (i >= 0 && isWordCharStrict(chars[i])) {
99
- // Check for script boundary - if previous character is from different script, stop here
100
- if (i - 1 >= 0 &&
101
- isWordCharStrict(chars[i - 1]) &&
102
- isDifferentScript(chars[i], chars[i - 1])) {
103
- return i; // Return current position at script boundary
104
- }
105
- i--;
106
- }
107
- return i + 1;
108
- }
109
- else {
110
- // We're in punctuation, move to its beginning
111
- while (i >= 0 && !isWordCharStrict(chars[i]) && !isWhitespace(chars[i])) {
112
- i--;
113
- }
114
- return i + 1;
115
- }
116
- };
117
- // Find word end within a line
118
- export const findWordEndInLine = (line, col) => {
119
- const chars = toCodePoints(line);
120
- let i = col;
121
- // If we're already at the end of a word (including punctuation sequences), advance to next word
122
- // This includes both regular word endings and script boundaries
123
- const atEndOfWordChar = i < chars.length &&
124
- isWordCharWithCombining(chars[i]) &&
125
- (i + 1 >= chars.length ||
126
- !isWordCharWithCombining(chars[i + 1]) ||
127
- (isWordCharStrict(chars[i]) &&
128
- i + 1 < chars.length &&
129
- isWordCharStrict(chars[i + 1]) &&
130
- isDifferentScript(chars[i], chars[i + 1])));
131
- const atEndOfPunctuation = i < chars.length &&
132
- !isWordCharWithCombining(chars[i]) &&
133
- !isWhitespace(chars[i]) &&
134
- (i + 1 >= chars.length ||
135
- isWhitespace(chars[i + 1]) ||
136
- isWordCharWithCombining(chars[i + 1]));
137
- if (atEndOfWordChar || atEndOfPunctuation) {
138
- // We're at the end of a word or punctuation sequence, move forward to find next word
139
- i++;
140
- // Skip whitespace to find next word or punctuation
141
- while (i < chars.length && isWhitespace(chars[i])) {
142
- i++;
143
- }
144
- }
145
- // If we're not on a word character, find the next word or punctuation sequence
146
- if (i < chars.length && !isWordCharWithCombining(chars[i])) {
147
- // Skip whitespace to find next word or punctuation
148
- while (i < chars.length && isWhitespace(chars[i])) {
149
- i++;
150
- }
151
- }
152
- // Move to end of current word (including combining marks, but stop at script boundaries)
153
- let foundWord = false;
154
- let lastBaseCharPos = -1;
155
- if (i < chars.length && isWordCharWithCombining(chars[i])) {
156
- // Handle word characters
157
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
158
- foundWord = true;
159
- // Track the position of the last base character (not combining mark)
160
- if (isWordCharStrict(chars[i])) {
161
- lastBaseCharPos = i;
162
- }
163
- // Check if next character is from a different script (word boundary)
164
- if (i + 1 < chars.length &&
165
- isWordCharStrict(chars[i + 1]) &&
166
- isDifferentScript(chars[i], chars[i + 1])) {
167
- i++; // Include current character
168
- if (isWordCharStrict(chars[i - 1])) {
169
- lastBaseCharPos = i - 1;
170
- }
171
- break; // Stop at script boundary
172
- }
173
- i++;
174
- }
175
- }
176
- else if (i < chars.length && !isWhitespace(chars[i])) {
177
- // Handle punctuation sequences (like ████)
178
- while (i < chars.length &&
179
- !isWordCharStrict(chars[i]) &&
180
- !isWhitespace(chars[i])) {
181
- foundWord = true;
182
- lastBaseCharPos = i;
183
- i++;
184
- }
185
- }
186
- // Only return a position if we actually found a word
187
- // Return the position of the last base character, not combining marks
188
- if (foundWord && lastBaseCharPos >= col) {
189
- return lastBaseCharPos;
190
- }
191
- return null;
192
- };
193
- // Find next word across lines
194
- export const findNextWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
195
- // First try current line
196
- const currentLine = lines[cursorRow] || '';
197
- const colInCurrentLine = searchForWordStart
198
- ? findNextWordStartInLine(currentLine, cursorCol)
199
- : findWordEndInLine(currentLine, cursorCol);
200
- if (colInCurrentLine !== null) {
201
- return { row: cursorRow, col: colInCurrentLine };
202
- }
203
- // Search subsequent lines
204
- for (let row = cursorRow + 1; row < lines.length; row++) {
205
- const line = lines[row] || '';
206
- const chars = toCodePoints(line);
207
- // For empty lines, if we haven't found any words yet, return the empty line
208
- if (chars.length === 0) {
209
- // Check if there are any words in remaining lines
210
- let hasWordsInLaterLines = false;
211
- for (let laterRow = row + 1; laterRow < lines.length; laterRow++) {
212
- const laterLine = lines[laterRow] || '';
213
- const laterChars = toCodePoints(laterLine);
214
- let firstNonWhitespace = 0;
215
- while (firstNonWhitespace < laterChars.length &&
216
- isWhitespace(laterChars[firstNonWhitespace])) {
217
- firstNonWhitespace++;
218
- }
219
- if (firstNonWhitespace < laterChars.length) {
220
- hasWordsInLaterLines = true;
221
- break;
222
- }
223
- }
224
- // If no words in later lines, return the empty line
225
- if (!hasWordsInLaterLines) {
226
- return { row, col: 0 };
227
- }
228
- continue;
229
- }
230
- // Find first non-whitespace
231
- let firstNonWhitespace = 0;
232
- while (firstNonWhitespace < chars.length &&
233
- isWhitespace(chars[firstNonWhitespace])) {
234
- firstNonWhitespace++;
235
- }
236
- if (firstNonWhitespace < chars.length) {
237
- if (searchForWordStart) {
238
- return { row, col: firstNonWhitespace };
239
- }
240
- else {
241
- // For word end, find the end of the first word
242
- const endCol = findWordEndInLine(line, firstNonWhitespace);
243
- if (endCol !== null) {
244
- return { row, col: endCol };
245
- }
246
- }
247
- }
248
- }
249
- return null;
250
- };
251
- // Find previous word across lines
252
- export const findPrevWordAcrossLines = (lines, cursorRow, cursorCol) => {
253
- // First try current line
254
- const currentLine = lines[cursorRow] || '';
255
- const colInCurrentLine = findPrevWordStartInLine(currentLine, cursorCol);
256
- if (colInCurrentLine !== null) {
257
- return { row: cursorRow, col: colInCurrentLine };
258
- }
259
- // Search previous lines
260
- for (let row = cursorRow - 1; row >= 0; row--) {
261
- const line = lines[row] || '';
262
- const chars = toCodePoints(line);
263
- if (chars.length === 0)
264
- continue;
265
- // Find last word start
266
- let lastWordStart = chars.length;
267
- while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
268
- lastWordStart--;
269
- }
270
- if (lastWordStart > 0) {
271
- // Find start of this word
272
- const wordStart = findPrevWordStartInLine(line, lastWordStart);
273
- if (wordStart !== null) {
274
- return { row, col: wordStart };
275
- }
276
- }
277
- }
278
- return null;
279
- };
280
- // Helper functions for vim line operations
281
- export const getPositionFromOffsets = (startOffset, endOffset, lines) => {
282
- let offset = 0;
283
- let startRow = 0;
284
- let startCol = 0;
285
- let endRow = 0;
286
- let endCol = 0;
287
- // Find start position
288
- for (let i = 0; i < lines.length; i++) {
289
- const lineLength = lines[i].length + 1; // +1 for newline
290
- if (offset + lineLength > startOffset) {
291
- startRow = i;
292
- startCol = startOffset - offset;
293
- break;
294
- }
295
- offset += lineLength;
296
- }
297
- // Find end position
298
- offset = 0;
299
- for (let i = 0; i < lines.length; i++) {
300
- const lineLength = lines[i].length + (i < lines.length - 1 ? 1 : 0); // +1 for newline except last line
301
- if (offset + lineLength >= endOffset) {
302
- endRow = i;
303
- endCol = endOffset - offset;
304
- break;
305
- }
306
- offset += lineLength;
307
- }
308
- return { startRow, startCol, endRow, endCol };
309
- };
310
- export const getLineRangeOffsets = (startRow, lineCount, lines) => {
311
- let startOffset = 0;
312
- // Calculate start offset
313
- for (let i = 0; i < startRow; i++) {
314
- startOffset += lines[i].length + 1; // +1 for newline
315
- }
316
- // Calculate end offset
317
- let endOffset = startOffset;
318
- for (let i = 0; i < lineCount; i++) {
319
- const lineIndex = startRow + i;
320
- if (lineIndex < lines.length) {
321
- endOffset += lines[lineIndex].length;
322
- if (lineIndex < lines.length - 1) {
323
- endOffset += 1; // +1 for newline
324
- }
325
- }
326
- }
327
- return { startOffset, endOffset };
328
- };
329
- export const replaceRangeInternal = (state, startRow, startCol, endRow, endCol, text) => {
330
- const currentLine = (row) => state.lines[row] || '';
331
- const currentLineLen = (row) => cpLen(currentLine(row));
332
- const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
333
- if (startRow > endRow ||
334
- (startRow === endRow && startCol > endCol) ||
335
- startRow < 0 ||
336
- startCol < 0 ||
337
- endRow >= state.lines.length ||
338
- (endRow < state.lines.length && endCol > currentLineLen(endRow))) {
339
- return state; // Invalid range
340
- }
341
- const newLines = [...state.lines];
342
- const sCol = clamp(startCol, 0, currentLineLen(startRow));
343
- const eCol = clamp(endCol, 0, currentLineLen(endRow));
344
- const prefix = cpSlice(currentLine(startRow), 0, sCol);
345
- const suffix = cpSlice(currentLine(endRow), eCol);
346
- const normalisedReplacement = text
347
- .replace(/\r\n/g, '\n')
348
- .replace(/\r/g, '\n');
349
- const replacementParts = normalisedReplacement.split('\n');
350
- // The combined first line of the new text
351
- const firstLine = prefix + replacementParts[0];
352
- if (replacementParts.length === 1) {
353
- // No newlines in replacement: combine prefix, replacement, and suffix on one line.
354
- newLines.splice(startRow, endRow - startRow + 1, firstLine + suffix);
355
- }
356
- else {
357
- // Newlines in replacement: create new lines.
358
- const lastLine = replacementParts[replacementParts.length - 1] + suffix;
359
- const middleLines = replacementParts.slice(1, -1);
360
- newLines.splice(startRow, endRow - startRow + 1, firstLine, ...middleLines, lastLine);
361
- }
362
- const finalCursorRow = startRow + replacementParts.length - 1;
363
- const finalCursorCol = (replacementParts.length > 1 ? 0 : sCol) +
364
- cpLen(replacementParts[replacementParts.length - 1]);
365
- return {
366
- ...state,
367
- lines: newLines,
368
- cursorRow: Math.min(Math.max(finalCursorRow, 0), newLines.length - 1),
369
- cursorCol: Math.max(0, Math.min(finalCursorCol, cpLen(newLines[finalCursorRow] || ''))),
370
- preferredCol: null,
371
- };
372
- };
373
- function clamp(v, min, max) {
374
- return v < min ? min : v > max ? max : v;
375
- }
376
- function calculateInitialCursorPosition(initialLines, offset) {
377
- let remainingChars = offset;
378
- let row = 0;
379
- while (row < initialLines.length) {
380
- const lineLength = cpLen(initialLines[row]);
381
- // Add 1 for the newline character (except for the last line)
382
- const totalCharsInLineAndNewline = lineLength + (row < initialLines.length - 1 ? 1 : 0);
383
- if (remainingChars <= lineLength) {
384
- // Cursor is on this line
385
- return [row, remainingChars];
386
- }
387
- remainingChars -= totalCharsInLineAndNewline;
388
- row++;
389
- }
390
- // Offset is beyond the text, place cursor at the end of the last line
391
- if (initialLines.length > 0) {
392
- const lastRow = initialLines.length - 1;
393
- return [lastRow, cpLen(initialLines[lastRow])];
394
- }
395
- return [0, 0]; // Default for empty text
396
- }
397
- export function offsetToLogicalPos(text, offset) {
398
- let row = 0;
399
- let col = 0;
400
- let currentOffset = 0;
401
- if (offset === 0)
402
- return [0, 0];
403
- const lines = text.split('\n');
404
- for (let i = 0; i < lines.length; i++) {
405
- const line = lines[i];
406
- const lineLength = cpLen(line);
407
- const lineLengthWithNewline = lineLength + (i < lines.length - 1 ? 1 : 0);
408
- if (offset <= currentOffset + lineLength) {
409
- // Check against lineLength first
410
- row = i;
411
- col = offset - currentOffset;
412
- return [row, col];
413
- }
414
- else if (offset <= currentOffset + lineLengthWithNewline) {
415
- // Check if offset is the newline itself
416
- row = i;
417
- col = lineLength; // Position cursor at the end of the current line content
418
- // If the offset IS the newline, and it's not the last line, advance to next line, col 0
419
- if (offset === currentOffset + lineLengthWithNewline &&
420
- i < lines.length - 1) {
421
- return [i + 1, 0];
422
- }
423
- return [row, col]; // Otherwise, it's at the end of the current line content
424
- }
425
- currentOffset += lineLengthWithNewline;
426
- }
427
- // If offset is beyond the text length, place cursor at the end of the last line
428
- // or [0,0] if text is empty
429
- if (lines.length > 0) {
430
- row = lines.length - 1;
431
- col = cpLen(lines[row]);
432
- }
433
- else {
434
- row = 0;
435
- col = 0;
436
- }
437
- return [row, col];
438
- }
439
- /**
440
- * Converts logical row/col position to absolute text offset
441
- * Inverse operation of offsetToLogicalPos
442
- */
443
- export function logicalPosToOffset(lines, row, col) {
444
- let offset = 0;
445
- // Clamp row to valid range
446
- const actualRow = Math.min(row, lines.length - 1);
447
- // Add lengths of all lines before the target row
448
- for (let i = 0; i < actualRow; i++) {
449
- offset += cpLen(lines[i]) + 1; // +1 for newline
450
- }
451
- // Add column offset within the target row
452
- if (actualRow >= 0 && actualRow < lines.length) {
453
- offset += Math.min(col, cpLen(lines[actualRow]));
454
- }
455
- return offset;
456
- }
457
- // Calculates the visual wrapping of lines and the mapping between logical and visual coordinates.
458
- // This is an expensive operation and should be memoized.
459
- function calculateLayout(logicalLines, viewportWidth) {
460
- const visualLines = [];
461
- const logicalToVisualMap = [];
462
- const visualToLogicalMap = [];
463
- logicalLines.forEach((logLine, logIndex) => {
464
- logicalToVisualMap[logIndex] = [];
465
- if (logLine.length === 0) {
466
- // Handle empty logical line
467
- logicalToVisualMap[logIndex].push([visualLines.length, 0]);
468
- visualToLogicalMap.push([logIndex, 0]);
469
- visualLines.push('');
470
- }
471
- else {
472
- // Non-empty logical line
473
- let currentPosInLogLine = 0; // Tracks position within the current logical line (code point index)
474
- const codePointsInLogLine = toCodePoints(logLine);
475
- while (currentPosInLogLine < codePointsInLogLine.length) {
476
- let currentChunk = '';
477
- let currentChunkVisualWidth = 0;
478
- let numCodePointsInChunk = 0;
479
- let lastWordBreakPoint = -1; // Index in codePointsInLogLine for word break
480
- let numCodePointsAtLastWordBreak = 0;
481
- // Iterate through code points to build the current visual line (chunk)
482
- for (let i = currentPosInLogLine; i < codePointsInLogLine.length; i++) {
483
- const char = codePointsInLogLine[i];
484
- const charVisualWidth = getCachedStringWidth(char);
485
- if (currentChunkVisualWidth + charVisualWidth > viewportWidth) {
486
- // Character would exceed viewport width
487
- if (lastWordBreakPoint !== -1 &&
488
- numCodePointsAtLastWordBreak > 0 &&
489
- currentPosInLogLine + numCodePointsAtLastWordBreak < i) {
490
- // We have a valid word break point to use, and it's not the start of the current segment
491
- currentChunk = codePointsInLogLine
492
- .slice(currentPosInLogLine, currentPosInLogLine + numCodePointsAtLastWordBreak)
493
- .join('');
494
- numCodePointsInChunk = numCodePointsAtLastWordBreak;
495
- }
496
- else {
497
- // No word break, or word break is at the start of this potential chunk, or word break leads to empty chunk.
498
- // Hard break: take characters up to viewportWidth, or just the current char if it alone is too wide.
499
- if (numCodePointsInChunk === 0 &&
500
- charVisualWidth > viewportWidth) {
501
- // Single character is wider than viewport, take it anyway
502
- currentChunk = char;
503
- numCodePointsInChunk = 1;
504
- }
505
- else if (numCodePointsInChunk === 0 &&
506
- charVisualWidth <= viewportWidth) {
507
- // This case should ideally be caught by the next iteration if the char fits.
508
- // If it doesn't fit (because currentChunkVisualWidth was already > 0 from a previous char that filled the line),
509
- // then numCodePointsInChunk would not be 0.
510
- // This branch means the current char *itself* doesn't fit an empty line, which is handled by the above.
511
- // If we are here, it means the loop should break and the current chunk (which is empty) is finalized.
512
- }
513
- }
514
- break; // Break from inner loop to finalize this chunk
515
- }
516
- currentChunk += char;
517
- currentChunkVisualWidth += charVisualWidth;
518
- numCodePointsInChunk++;
519
- // Check for word break opportunity (space)
520
- if (char === ' ') {
521
- lastWordBreakPoint = i; // Store code point index of the space
522
- // Store the state *before* adding the space, if we decide to break here.
523
- numCodePointsAtLastWordBreak = numCodePointsInChunk - 1; // Chars *before* the space
524
- }
525
- }
526
- // If the inner loop completed without breaking (i.e., remaining text fits)
527
- // or if the loop broke but numCodePointsInChunk is still 0 (e.g. first char too wide for empty line)
528
- if (numCodePointsInChunk === 0 &&
529
- currentPosInLogLine < codePointsInLogLine.length) {
530
- // This can happen if the very first character considered for a new visual line is wider than the viewport.
531
- // In this case, we take that single character.
532
- const firstChar = codePointsInLogLine[currentPosInLogLine];
533
- currentChunk = firstChar;
534
- numCodePointsInChunk = 1; // Ensure we advance
535
- }
536
- // If after everything, numCodePointsInChunk is still 0 but we haven't processed the whole logical line,
537
- // it implies an issue, like viewportWidth being 0 or less. Avoid infinite loop.
538
- if (numCodePointsInChunk === 0 &&
539
- currentPosInLogLine < codePointsInLogLine.length) {
540
- // Force advance by one character to prevent infinite loop if something went wrong
541
- currentChunk = codePointsInLogLine[currentPosInLogLine];
542
- numCodePointsInChunk = 1;
543
- }
544
- logicalToVisualMap[logIndex].push([
545
- visualLines.length,
546
- currentPosInLogLine,
547
- ]);
548
- visualToLogicalMap.push([logIndex, currentPosInLogLine]);
549
- visualLines.push(currentChunk);
550
- const logicalStartOfThisChunk = currentPosInLogLine;
551
- currentPosInLogLine += numCodePointsInChunk;
552
- // If the chunk processed did not consume the entire logical line,
553
- // and the character immediately following the chunk is a space,
554
- // advance past this space as it acted as a delimiter for word wrapping.
555
- if (logicalStartOfThisChunk + numCodePointsInChunk <
556
- codePointsInLogLine.length &&
557
- currentPosInLogLine < codePointsInLogLine.length && // Redundant if previous is true, but safe
558
- codePointsInLogLine[currentPosInLogLine] === ' ') {
559
- currentPosInLogLine++;
560
- }
561
- }
562
- }
563
- });
564
- // If the entire logical text was empty, ensure there's one empty visual line.
565
- if (logicalLines.length === 0 ||
566
- (logicalLines.length === 1 && logicalLines[0] === '')) {
567
- if (visualLines.length === 0) {
568
- visualLines.push('');
569
- if (!logicalToVisualMap[0])
570
- logicalToVisualMap[0] = [];
571
- logicalToVisualMap[0].push([0, 0]);
572
- visualToLogicalMap.push([0, 0]);
573
- }
574
- }
575
- return {
576
- visualLines,
577
- logicalToVisualMap,
578
- visualToLogicalMap,
579
- };
580
- }
581
- // Calculates the visual cursor position based on a pre-calculated layout.
582
- // This is a lightweight operation.
583
- function calculateVisualCursorFromLayout(layout, logicalCursor) {
584
- const { logicalToVisualMap, visualLines } = layout;
585
- const [logicalRow, logicalCol] = logicalCursor;
586
- const segmentsForLogicalLine = logicalToVisualMap[logicalRow];
587
- if (!segmentsForLogicalLine || segmentsForLogicalLine.length === 0) {
588
- // This can happen for an empty document.
589
- return [0, 0];
590
- }
591
- // Find the segment where the logical column fits.
592
- // The segments are sorted by startColInLogical.
593
- let targetSegmentIndex = segmentsForLogicalLine.findIndex(([, startColInLogical], index) => {
594
- const nextStartColInLogical = index + 1 < segmentsForLogicalLine.length
595
- ? segmentsForLogicalLine[index + 1][1]
596
- : Infinity;
597
- return (logicalCol >= startColInLogical && logicalCol < nextStartColInLogical);
598
- });
599
- // If not found, it means the cursor is at the end of the logical line.
600
- if (targetSegmentIndex === -1) {
601
- if (logicalCol === 0) {
602
- targetSegmentIndex = 0;
603
- }
604
- else {
605
- targetSegmentIndex = segmentsForLogicalLine.length - 1;
606
- }
607
- }
608
- const [visualRow, startColInLogical] = segmentsForLogicalLine[targetSegmentIndex];
609
- const visualCol = logicalCol - startColInLogical;
610
- // The visual column should not exceed the length of the visual line.
611
- const clampedVisualCol = Math.min(visualCol, cpLen(visualLines[visualRow] ?? ''));
612
- return [visualRow, clampedVisualCol];
613
- }
614
- const historyLimit = 100;
615
- export const pushUndo = (currentState) => {
616
- const snapshot = {
617
- lines: [...currentState.lines],
618
- cursorRow: currentState.cursorRow,
619
- cursorCol: currentState.cursorCol,
620
- };
621
- const newStack = [...currentState.undoStack, snapshot];
622
- if (newStack.length > historyLimit) {
623
- newStack.shift();
624
- }
625
- return { ...currentState, undoStack: newStack, redoStack: [] };
626
- };
627
- function textBufferReducerLogic(state, action) {
628
- const pushUndoLocal = pushUndo;
629
- const currentLine = (r) => state.lines[r] ?? '';
630
- const currentLineLen = (r) => cpLen(currentLine(r));
631
- switch (action.type) {
632
- case 'set_text': {
633
- let nextState = state;
634
- if (action.pushToUndo !== false) {
635
- nextState = pushUndoLocal(state);
636
- }
637
- const newContentLines = action.payload
638
- .replace(/\r\n?/g, '\n')
639
- .split('\n');
640
- const lines = newContentLines.length === 0 ? [''] : newContentLines;
641
- const lastNewLineIndex = lines.length - 1;
642
- return {
643
- ...nextState,
644
- lines,
645
- cursorRow: lastNewLineIndex,
646
- cursorCol: cpLen(lines[lastNewLineIndex] ?? ''),
647
- preferredCol: null,
648
- };
649
- }
650
- case 'insert': {
651
- const nextState = pushUndoLocal(state);
652
- const newLines = [...nextState.lines];
653
- let newCursorRow = nextState.cursorRow;
654
- let newCursorCol = nextState.cursorCol;
655
- const currentLine = (r) => newLines[r] ?? '';
656
- const str = stripUnsafeCharacters(action.payload.replace(/\r\n/g, '\n').replace(/\r/g, '\n'));
657
- const parts = str.split('\n');
658
- const lineContent = currentLine(newCursorRow);
659
- const before = cpSlice(lineContent, 0, newCursorCol);
660
- const after = cpSlice(lineContent, newCursorCol);
661
- if (parts.length > 1) {
662
- newLines[newCursorRow] = before + parts[0];
663
- const remainingParts = parts.slice(1);
664
- const lastPartOriginal = remainingParts.pop() ?? '';
665
- newLines.splice(newCursorRow + 1, 0, ...remainingParts);
666
- newLines.splice(newCursorRow + parts.length - 1, 0, lastPartOriginal + after);
667
- newCursorRow = newCursorRow + parts.length - 1;
668
- newCursorCol = cpLen(lastPartOriginal);
669
- }
670
- else {
671
- newLines[newCursorRow] = before + parts[0] + after;
672
- newCursorCol = cpLen(before) + cpLen(parts[0]);
673
- }
674
- return {
675
- ...nextState,
676
- lines: newLines,
677
- cursorRow: newCursorRow,
678
- cursorCol: newCursorCol,
679
- preferredCol: null,
680
- };
681
- }
682
- case 'backspace': {
683
- const nextState = pushUndoLocal(state);
684
- const newLines = [...nextState.lines];
685
- let newCursorRow = nextState.cursorRow;
686
- let newCursorCol = nextState.cursorCol;
687
- const currentLine = (r) => newLines[r] ?? '';
688
- if (newCursorCol === 0 && newCursorRow === 0)
689
- return state;
690
- if (newCursorCol > 0) {
691
- const lineContent = currentLine(newCursorRow);
692
- newLines[newCursorRow] =
693
- cpSlice(lineContent, 0, newCursorCol - 1) +
694
- cpSlice(lineContent, newCursorCol);
695
- newCursorCol--;
696
- }
697
- else if (newCursorRow > 0) {
698
- const prevLineContent = currentLine(newCursorRow - 1);
699
- const currentLineContentVal = currentLine(newCursorRow);
700
- const newCol = cpLen(prevLineContent);
701
- newLines[newCursorRow - 1] = prevLineContent + currentLineContentVal;
702
- newLines.splice(newCursorRow, 1);
703
- newCursorRow--;
704
- newCursorCol = newCol;
705
- }
706
- return {
707
- ...nextState,
708
- lines: newLines,
709
- cursorRow: newCursorRow,
710
- cursorCol: newCursorCol,
711
- preferredCol: null,
712
- };
713
- }
714
- case 'set_viewport': {
715
- const { width, height } = action.payload;
716
- if (width === state.viewportWidth && height === state.viewportHeight) {
717
- return state;
718
- }
719
- return {
720
- ...state,
721
- viewportWidth: width,
722
- viewportHeight: height,
723
- };
724
- }
725
- case 'move': {
726
- const { dir } = action.payload;
727
- const { cursorRow, cursorCol, lines, visualLayout, preferredCol } = state;
728
- // Visual movements
729
- if (dir === 'left' ||
730
- dir === 'right' ||
731
- dir === 'up' ||
732
- dir === 'down' ||
733
- dir === 'home' ||
734
- dir === 'end') {
735
- const visualCursor = calculateVisualCursorFromLayout(visualLayout, [
736
- cursorRow,
737
- cursorCol,
738
- ]);
739
- const { visualLines, visualToLogicalMap } = visualLayout;
740
- let newVisualRow = visualCursor[0];
741
- let newVisualCol = visualCursor[1];
742
- let newPreferredCol = preferredCol;
743
- const currentVisLineLen = cpLen(visualLines[newVisualRow] ?? '');
744
- switch (dir) {
745
- case 'left':
746
- newPreferredCol = null;
747
- if (newVisualCol > 0) {
748
- newVisualCol--;
749
- }
750
- else if (newVisualRow > 0) {
751
- newVisualRow--;
752
- newVisualCol = cpLen(visualLines[newVisualRow] ?? '');
753
- }
754
- break;
755
- case 'right':
756
- newPreferredCol = null;
757
- if (newVisualCol < currentVisLineLen) {
758
- newVisualCol++;
759
- }
760
- else if (newVisualRow < visualLines.length - 1) {
761
- newVisualRow++;
762
- newVisualCol = 0;
763
- }
764
- break;
765
- case 'up':
766
- if (newVisualRow > 0) {
767
- if (newPreferredCol === null)
768
- newPreferredCol = newVisualCol;
769
- newVisualRow--;
770
- newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
771
- }
772
- break;
773
- case 'down':
774
- if (newVisualRow < visualLines.length - 1) {
775
- if (newPreferredCol === null)
776
- newPreferredCol = newVisualCol;
777
- newVisualRow++;
778
- newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
779
- }
780
- break;
781
- case 'home':
782
- newPreferredCol = null;
783
- newVisualCol = 0;
784
- break;
785
- case 'end':
786
- newPreferredCol = null;
787
- newVisualCol = currentVisLineLen;
788
- break;
789
- default: {
790
- const exhaustiveCheck = dir;
791
- console.error(`Unknown visual movement direction: ${exhaustiveCheck}`);
792
- return state;
793
- }
794
- }
795
- if (visualToLogicalMap[newVisualRow]) {
796
- const [logRow, logStartCol] = visualToLogicalMap[newVisualRow];
797
- return {
798
- ...state,
799
- cursorRow: logRow,
800
- cursorCol: clamp(logStartCol + newVisualCol, 0, cpLen(lines[logRow] ?? '')),
801
- preferredCol: newPreferredCol,
802
- };
803
- }
804
- return state;
805
- }
806
- // Logical movements
807
- switch (dir) {
808
- case 'wordLeft': {
809
- if (cursorCol === 0 && cursorRow === 0)
810
- return state;
811
- let newCursorRow = cursorRow;
812
- let newCursorCol = cursorCol;
813
- if (cursorCol === 0) {
814
- newCursorRow--;
815
- newCursorCol = cpLen(lines[newCursorRow] ?? '');
816
- }
817
- else {
818
- const lineContent = lines[cursorRow];
819
- const arr = toCodePoints(lineContent);
820
- let start = cursorCol;
821
- let onlySpaces = true;
822
- for (let i = 0; i < start; i++) {
823
- if (isWordChar(arr[i])) {
824
- onlySpaces = false;
825
- break;
826
- }
827
- }
828
- if (onlySpaces && start > 0) {
829
- start--;
830
- }
831
- else {
832
- while (start > 0 && !isWordChar(arr[start - 1]))
833
- start--;
834
- while (start > 0 && isWordChar(arr[start - 1]))
835
- start--;
836
- }
837
- newCursorCol = start;
838
- }
839
- return {
840
- ...state,
841
- cursorRow: newCursorRow,
842
- cursorCol: newCursorCol,
843
- preferredCol: null,
844
- };
845
- }
846
- case 'wordRight': {
847
- if (cursorRow === lines.length - 1 &&
848
- cursorCol === cpLen(lines[cursorRow] ?? '')) {
849
- return state;
850
- }
851
- let newCursorRow = cursorRow;
852
- let newCursorCol = cursorCol;
853
- const lineContent = lines[cursorRow] ?? '';
854
- const arr = toCodePoints(lineContent);
855
- if (cursorCol >= arr.length) {
856
- newCursorRow++;
857
- newCursorCol = 0;
858
- }
859
- else {
860
- let end = cursorCol;
861
- while (end < arr.length && !isWordChar(arr[end]))
862
- end++;
863
- while (end < arr.length && isWordChar(arr[end]))
864
- end++;
865
- newCursorCol = end;
866
- }
867
- return {
868
- ...state,
869
- cursorRow: newCursorRow,
870
- cursorCol: newCursorCol,
871
- preferredCol: null,
872
- };
873
- }
874
- default:
875
- return state;
876
- }
877
- }
878
- case 'set_cursor': {
879
- return {
880
- ...state,
881
- ...action.payload,
882
- };
883
- }
884
- case 'delete': {
885
- const { cursorRow, cursorCol, lines } = state;
886
- const lineContent = currentLine(cursorRow);
887
- if (cursorCol < currentLineLen(cursorRow)) {
888
- const nextState = pushUndoLocal(state);
889
- const newLines = [...nextState.lines];
890
- newLines[cursorRow] =
891
- cpSlice(lineContent, 0, cursorCol) +
892
- cpSlice(lineContent, cursorCol + 1);
893
- return {
894
- ...nextState,
895
- lines: newLines,
896
- preferredCol: null,
897
- };
898
- }
899
- else if (cursorRow < lines.length - 1) {
900
- const nextState = pushUndoLocal(state);
901
- const nextLineContent = currentLine(cursorRow + 1);
902
- const newLines = [...nextState.lines];
903
- newLines[cursorRow] = lineContent + nextLineContent;
904
- newLines.splice(cursorRow + 1, 1);
905
- return {
906
- ...nextState,
907
- lines: newLines,
908
- preferredCol: null,
909
- };
910
- }
911
- return state;
912
- }
913
- case 'delete_word_left': {
914
- const { cursorRow, cursorCol } = state;
915
- if (cursorCol === 0 && cursorRow === 0)
916
- return state;
917
- const nextState = pushUndoLocal(state);
918
- const newLines = [...nextState.lines];
919
- let newCursorRow = cursorRow;
920
- let newCursorCol = cursorCol;
921
- if (newCursorCol > 0) {
922
- const lineContent = currentLine(newCursorRow);
923
- const prevWordStart = findPrevWordStartInLine(lineContent, newCursorCol);
924
- const start = prevWordStart === null ? 0 : prevWordStart;
925
- newLines[newCursorRow] =
926
- cpSlice(lineContent, 0, start) + cpSlice(lineContent, newCursorCol);
927
- newCursorCol = start;
928
- }
929
- else {
930
- // Act as a backspace
931
- const prevLineContent = currentLine(cursorRow - 1);
932
- const currentLineContentVal = currentLine(cursorRow);
933
- const newCol = cpLen(prevLineContent);
934
- newLines[cursorRow - 1] = prevLineContent + currentLineContentVal;
935
- newLines.splice(cursorRow, 1);
936
- newCursorRow--;
937
- newCursorCol = newCol;
938
- }
939
- return {
940
- ...nextState,
941
- lines: newLines,
942
- cursorRow: newCursorRow,
943
- cursorCol: newCursorCol,
944
- preferredCol: null,
945
- };
946
- }
947
- case 'delete_word_right': {
948
- const { cursorRow, cursorCol, lines } = state;
949
- const lineContent = currentLine(cursorRow);
950
- const lineLen = cpLen(lineContent);
951
- if (cursorCol >= lineLen && cursorRow === lines.length - 1) {
952
- return state;
953
- }
954
- const nextState = pushUndoLocal(state);
955
- const newLines = [...nextState.lines];
956
- if (cursorCol >= lineLen) {
957
- // Act as a delete, joining with the next line
958
- const nextLineContent = currentLine(cursorRow + 1);
959
- newLines[cursorRow] = lineContent + nextLineContent;
960
- newLines.splice(cursorRow + 1, 1);
961
- }
962
- else {
963
- const nextWordStart = findNextWordStartInLine(lineContent, cursorCol);
964
- const end = nextWordStart === null ? lineLen : nextWordStart;
965
- newLines[cursorRow] =
966
- cpSlice(lineContent, 0, cursorCol) + cpSlice(lineContent, end);
967
- }
968
- return {
969
- ...nextState,
970
- lines: newLines,
971
- preferredCol: null,
972
- };
973
- }
974
- case 'kill_line_right': {
975
- const { cursorRow, cursorCol, lines } = state;
976
- const lineContent = currentLine(cursorRow);
977
- if (cursorCol < currentLineLen(cursorRow)) {
978
- const nextState = pushUndoLocal(state);
979
- const newLines = [...nextState.lines];
980
- newLines[cursorRow] = cpSlice(lineContent, 0, cursorCol);
981
- return {
982
- ...nextState,
983
- lines: newLines,
984
- };
985
- }
986
- else if (cursorRow < lines.length - 1) {
987
- // Act as a delete
988
- const nextState = pushUndoLocal(state);
989
- const nextLineContent = currentLine(cursorRow + 1);
990
- const newLines = [...nextState.lines];
991
- newLines[cursorRow] = lineContent + nextLineContent;
992
- newLines.splice(cursorRow + 1, 1);
993
- return {
994
- ...nextState,
995
- lines: newLines,
996
- preferredCol: null,
997
- };
998
- }
999
- return state;
1000
- }
1001
- case 'kill_line_left': {
1002
- const { cursorRow, cursorCol } = state;
1003
- if (cursorCol > 0) {
1004
- const nextState = pushUndoLocal(state);
1005
- const lineContent = currentLine(cursorRow);
1006
- const newLines = [...nextState.lines];
1007
- newLines[cursorRow] = cpSlice(lineContent, cursorCol);
1008
- return {
1009
- ...nextState,
1010
- lines: newLines,
1011
- cursorCol: 0,
1012
- preferredCol: null,
1013
- };
1014
- }
1015
- return state;
1016
- }
1017
- case 'undo': {
1018
- const stateToRestore = state.undoStack[state.undoStack.length - 1];
1019
- if (!stateToRestore)
1020
- return state;
1021
- const currentSnapshot = {
1022
- lines: [...state.lines],
1023
- cursorRow: state.cursorRow,
1024
- cursorCol: state.cursorCol,
1025
- };
1026
- return {
1027
- ...state,
1028
- ...stateToRestore,
1029
- undoStack: state.undoStack.slice(0, -1),
1030
- redoStack: [...state.redoStack, currentSnapshot],
1031
- };
1032
- }
1033
- case 'redo': {
1034
- const stateToRestore = state.redoStack[state.redoStack.length - 1];
1035
- if (!stateToRestore)
1036
- return state;
1037
- const currentSnapshot = {
1038
- lines: [...state.lines],
1039
- cursorRow: state.cursorRow,
1040
- cursorCol: state.cursorCol,
1041
- };
1042
- return {
1043
- ...state,
1044
- ...stateToRestore,
1045
- redoStack: state.redoStack.slice(0, -1),
1046
- undoStack: [...state.undoStack, currentSnapshot],
1047
- };
1048
- }
1049
- case 'replace_range': {
1050
- const { startRow, startCol, endRow, endCol, text } = action.payload;
1051
- const nextState = pushUndoLocal(state);
1052
- return replaceRangeInternal(nextState, startRow, startCol, endRow, endCol, text);
1053
- }
1054
- case 'move_to_offset': {
1055
- const { offset } = action.payload;
1056
- const [newRow, newCol] = offsetToLogicalPos(state.lines.join('\n'), offset);
1057
- return {
1058
- ...state,
1059
- cursorRow: newRow,
1060
- cursorCol: newCol,
1061
- preferredCol: null,
1062
- };
1063
- }
1064
- case 'create_undo_snapshot': {
1065
- return pushUndoLocal(state);
1066
- }
1067
- // Vim-specific operations
1068
- case 'vim_delete_word_forward':
1069
- case 'vim_delete_word_backward':
1070
- case 'vim_delete_word_end':
1071
- case 'vim_change_word_forward':
1072
- case 'vim_change_word_backward':
1073
- case 'vim_change_word_end':
1074
- case 'vim_delete_line':
1075
- case 'vim_change_line':
1076
- case 'vim_delete_to_end_of_line':
1077
- case 'vim_change_to_end_of_line':
1078
- case 'vim_change_movement':
1079
- case 'vim_move_left':
1080
- case 'vim_move_right':
1081
- case 'vim_move_up':
1082
- case 'vim_move_down':
1083
- case 'vim_move_word_forward':
1084
- case 'vim_move_word_backward':
1085
- case 'vim_move_word_end':
1086
- case 'vim_delete_char':
1087
- case 'vim_insert_at_cursor':
1088
- case 'vim_append_at_cursor':
1089
- case 'vim_open_line_below':
1090
- case 'vim_open_line_above':
1091
- case 'vim_append_at_line_end':
1092
- case 'vim_insert_at_line_start':
1093
- case 'vim_move_to_line_start':
1094
- case 'vim_move_to_line_end':
1095
- case 'vim_move_to_first_nonwhitespace':
1096
- case 'vim_move_to_first_line':
1097
- case 'vim_move_to_last_line':
1098
- case 'vim_move_to_line':
1099
- case 'vim_escape_insert_mode':
1100
- return handleVimAction(state, action);
1101
- default: {
1102
- const exhaustiveCheck = action;
1103
- console.error(`Unknown action encountered: ${exhaustiveCheck}`);
1104
- return state;
1105
- }
1106
- }
1107
- }
1108
- export function textBufferReducer(state, action) {
1109
- const newState = textBufferReducerLogic(state, action);
1110
- if (newState.lines !== state.lines ||
1111
- newState.viewportWidth !== state.viewportWidth) {
1112
- return {
1113
- ...newState,
1114
- visualLayout: calculateLayout(newState.lines, newState.viewportWidth),
1115
- };
1116
- }
1117
- return newState;
1118
- }
1119
- // --- End of reducer logic ---
1120
- export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, isValidPath, shellModeActive = false, }) {
1121
- const initialState = useMemo(() => {
1122
- const lines = initialText.split('\n');
1123
- const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(lines.length === 0 ? [''] : lines, initialCursorOffset);
1124
- const visualLayout = calculateLayout(lines.length === 0 ? [''] : lines, viewport.width);
1125
- return {
1126
- lines: lines.length === 0 ? [''] : lines,
1127
- cursorRow: initialCursorRow,
1128
- cursorCol: initialCursorCol,
1129
- preferredCol: null,
1130
- undoStack: [],
1131
- redoStack: [],
1132
- clipboard: null,
1133
- selectionAnchor: null,
1134
- viewportWidth: viewport.width,
1135
- viewportHeight: viewport.height,
1136
- visualLayout,
1137
- };
1138
- }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
1139
- const [state, dispatch] = useReducer(textBufferReducer, initialState);
1140
- const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, } = state;
1141
- const text = useMemo(() => lines.join('\n'), [lines]);
1142
- const visualCursor = useMemo(() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]), [visualLayout, cursorRow, cursorCol]);
1143
- const { visualLines, visualToLogicalMap } = visualLayout;
1144
- const [visualScrollRow, setVisualScrollRow] = useState(0);
1145
- useEffect(() => {
1146
- if (onChange) {
1147
- onChange(text);
1148
- }
1149
- }, [text, onChange]);
1150
- useEffect(() => {
1151
- dispatch({
1152
- type: 'set_viewport',
1153
- payload: { width: viewport.width, height: viewport.height },
1154
- });
1155
- }, [viewport.width, viewport.height]);
1156
- // Update visual scroll (vertical)
1157
- useEffect(() => {
1158
- const { height } = viewport;
1159
- const totalVisualLines = visualLines.length;
1160
- const maxScrollStart = Math.max(0, totalVisualLines - height);
1161
- let newVisualScrollRow = visualScrollRow;
1162
- if (visualCursor[0] < visualScrollRow) {
1163
- newVisualScrollRow = visualCursor[0];
1164
- }
1165
- else if (visualCursor[0] >= visualScrollRow + height) {
1166
- newVisualScrollRow = visualCursor[0] - height + 1;
1167
- }
1168
- // When the number of visual lines shrinks (e.g., after widening the viewport),
1169
- // ensure scroll never starts beyond the last valid start so we can render a full window.
1170
- newVisualScrollRow = clamp(newVisualScrollRow, 0, maxScrollStart);
1171
- if (newVisualScrollRow !== visualScrollRow) {
1172
- setVisualScrollRow(newVisualScrollRow);
1173
- }
1174
- }, [visualCursor, visualScrollRow, viewport, visualLines.length]);
1175
- const insert = useCallback((ch, { paste = false } = {}) => {
1176
- if (/[\n\r]/.test(ch)) {
1177
- dispatch({ type: 'insert', payload: ch });
1178
- return;
1179
- }
1180
- const minLengthToInferAsDragDrop = 3;
1181
- if (ch.length >= minLengthToInferAsDragDrop &&
1182
- !shellModeActive &&
1183
- paste) {
1184
- let potentialPath = ch.trim();
1185
- const quoteMatch = potentialPath.match(/^'(.*)'$/);
1186
- if (quoteMatch) {
1187
- potentialPath = quoteMatch[1];
1188
- }
1189
- potentialPath = potentialPath.trim();
1190
- if (isValidPath(unescapePath(potentialPath))) {
1191
- ch = `@${potentialPath} `;
1192
- }
1193
- }
1194
- let currentText = '';
1195
- for (const char of toCodePoints(ch)) {
1196
- if (char.codePointAt(0) === 127) {
1197
- if (currentText.length > 0) {
1198
- dispatch({ type: 'insert', payload: currentText });
1199
- currentText = '';
1200
- }
1201
- dispatch({ type: 'backspace' });
1202
- }
1203
- else {
1204
- currentText += char;
1205
- }
1206
- }
1207
- if (currentText.length > 0) {
1208
- dispatch({ type: 'insert', payload: currentText });
1209
- }
1210
- }, [isValidPath, shellModeActive]);
1211
- const newline = useCallback(() => {
1212
- dispatch({ type: 'insert', payload: '\n' });
1213
- }, []);
1214
- const backspace = useCallback(() => {
1215
- dispatch({ type: 'backspace' });
1216
- }, []);
1217
- const del = useCallback(() => {
1218
- dispatch({ type: 'delete' });
1219
- }, []);
1220
- const move = useCallback((dir) => {
1221
- dispatch({ type: 'move', payload: { dir } });
1222
- }, [dispatch]);
1223
- const undo = useCallback(() => {
1224
- dispatch({ type: 'undo' });
1225
- }, []);
1226
- const redo = useCallback(() => {
1227
- dispatch({ type: 'redo' });
1228
- }, []);
1229
- const setText = useCallback((newText) => {
1230
- dispatch({ type: 'set_text', payload: newText });
1231
- }, []);
1232
- const deleteWordLeft = useCallback(() => {
1233
- dispatch({ type: 'delete_word_left' });
1234
- }, []);
1235
- const deleteWordRight = useCallback(() => {
1236
- dispatch({ type: 'delete_word_right' });
1237
- }, []);
1238
- const killLineRight = useCallback(() => {
1239
- dispatch({ type: 'kill_line_right' });
1240
- }, []);
1241
- const killLineLeft = useCallback(() => {
1242
- dispatch({ type: 'kill_line_left' });
1243
- }, []);
1244
- // Vim-specific operations
1245
- const vimDeleteWordForward = useCallback((count) => {
1246
- dispatch({ type: 'vim_delete_word_forward', payload: { count } });
1247
- }, []);
1248
- const vimDeleteWordBackward = useCallback((count) => {
1249
- dispatch({ type: 'vim_delete_word_backward', payload: { count } });
1250
- }, []);
1251
- const vimDeleteWordEnd = useCallback((count) => {
1252
- dispatch({ type: 'vim_delete_word_end', payload: { count } });
1253
- }, []);
1254
- const vimChangeWordForward = useCallback((count) => {
1255
- dispatch({ type: 'vim_change_word_forward', payload: { count } });
1256
- }, []);
1257
- const vimChangeWordBackward = useCallback((count) => {
1258
- dispatch({ type: 'vim_change_word_backward', payload: { count } });
1259
- }, []);
1260
- const vimChangeWordEnd = useCallback((count) => {
1261
- dispatch({ type: 'vim_change_word_end', payload: { count } });
1262
- }, []);
1263
- const vimDeleteLine = useCallback((count) => {
1264
- dispatch({ type: 'vim_delete_line', payload: { count } });
1265
- }, []);
1266
- const vimChangeLine = useCallback((count) => {
1267
- dispatch({ type: 'vim_change_line', payload: { count } });
1268
- }, []);
1269
- const vimDeleteToEndOfLine = useCallback(() => {
1270
- dispatch({ type: 'vim_delete_to_end_of_line' });
1271
- }, []);
1272
- const vimChangeToEndOfLine = useCallback(() => {
1273
- dispatch({ type: 'vim_change_to_end_of_line' });
1274
- }, []);
1275
- const vimChangeMovement = useCallback((movement, count) => {
1276
- dispatch({ type: 'vim_change_movement', payload: { movement, count } });
1277
- }, []);
1278
- // New vim navigation and operation methods
1279
- const vimMoveLeft = useCallback((count) => {
1280
- dispatch({ type: 'vim_move_left', payload: { count } });
1281
- }, []);
1282
- const vimMoveRight = useCallback((count) => {
1283
- dispatch({ type: 'vim_move_right', payload: { count } });
1284
- }, []);
1285
- const vimMoveUp = useCallback((count) => {
1286
- dispatch({ type: 'vim_move_up', payload: { count } });
1287
- }, []);
1288
- const vimMoveDown = useCallback((count) => {
1289
- dispatch({ type: 'vim_move_down', payload: { count } });
1290
- }, []);
1291
- const vimMoveWordForward = useCallback((count) => {
1292
- dispatch({ type: 'vim_move_word_forward', payload: { count } });
1293
- }, []);
1294
- const vimMoveWordBackward = useCallback((count) => {
1295
- dispatch({ type: 'vim_move_word_backward', payload: { count } });
1296
- }, []);
1297
- const vimMoveWordEnd = useCallback((count) => {
1298
- dispatch({ type: 'vim_move_word_end', payload: { count } });
1299
- }, []);
1300
- const vimDeleteChar = useCallback((count) => {
1301
- dispatch({ type: 'vim_delete_char', payload: { count } });
1302
- }, []);
1303
- const vimInsertAtCursor = useCallback(() => {
1304
- dispatch({ type: 'vim_insert_at_cursor' });
1305
- }, []);
1306
- const vimAppendAtCursor = useCallback(() => {
1307
- dispatch({ type: 'vim_append_at_cursor' });
1308
- }, []);
1309
- const vimOpenLineBelow = useCallback(() => {
1310
- dispatch({ type: 'vim_open_line_below' });
1311
- }, []);
1312
- const vimOpenLineAbove = useCallback(() => {
1313
- dispatch({ type: 'vim_open_line_above' });
1314
- }, []);
1315
- const vimAppendAtLineEnd = useCallback(() => {
1316
- dispatch({ type: 'vim_append_at_line_end' });
1317
- }, []);
1318
- const vimInsertAtLineStart = useCallback(() => {
1319
- dispatch({ type: 'vim_insert_at_line_start' });
1320
- }, []);
1321
- const vimMoveToLineStart = useCallback(() => {
1322
- dispatch({ type: 'vim_move_to_line_start' });
1323
- }, []);
1324
- const vimMoveToLineEnd = useCallback(() => {
1325
- dispatch({ type: 'vim_move_to_line_end' });
1326
- }, []);
1327
- const vimMoveToFirstNonWhitespace = useCallback(() => {
1328
- dispatch({ type: 'vim_move_to_first_nonwhitespace' });
1329
- }, []);
1330
- const vimMoveToFirstLine = useCallback(() => {
1331
- dispatch({ type: 'vim_move_to_first_line' });
1332
- }, []);
1333
- const vimMoveToLastLine = useCallback(() => {
1334
- dispatch({ type: 'vim_move_to_last_line' });
1335
- }, []);
1336
- const vimMoveToLine = useCallback((lineNumber) => {
1337
- dispatch({ type: 'vim_move_to_line', payload: { lineNumber } });
1338
- }, []);
1339
- const vimEscapeInsertMode = useCallback(() => {
1340
- dispatch({ type: 'vim_escape_insert_mode' });
1341
- }, []);
1342
- const openInExternalEditor = useCallback(async (opts = {}) => {
1343
- const editor = opts.editor ??
1344
- process.env['VISUAL'] ??
1345
- process.env['EDITOR'] ??
1346
- (process.platform === 'win32' ? 'notepad' : 'vi');
1347
- const tmpDir = fs.mkdtempSync(pathMod.join(os.tmpdir(), 'gemini-edit-'));
1348
- const filePath = pathMod.join(tmpDir, 'buffer.txt');
1349
- fs.writeFileSync(filePath, text, 'utf8');
1350
- dispatch({ type: 'create_undo_snapshot' });
1351
- const wasRaw = stdin?.isRaw ?? false;
1352
- try {
1353
- setRawMode?.(false);
1354
- const { status, error } = spawnSync(editor, [filePath], {
1355
- stdio: 'inherit',
1356
- });
1357
- if (error)
1358
- throw error;
1359
- if (typeof status === 'number' && status !== 0)
1360
- throw new Error(`External editor exited with status ${status}`);
1361
- let newText = fs.readFileSync(filePath, 'utf8');
1362
- newText = newText.replace(/\r\n?/g, '\n');
1363
- dispatch({ type: 'set_text', payload: newText, pushToUndo: false });
1364
- }
1365
- catch (err) {
1366
- console.error('[useTextBuffer] external editor error', err);
1367
- }
1368
- finally {
1369
- if (wasRaw)
1370
- setRawMode?.(true);
1371
- try {
1372
- fs.unlinkSync(filePath);
1373
- }
1374
- catch {
1375
- /* ignore */
1376
- }
1377
- try {
1378
- fs.rmdirSync(tmpDir);
1379
- }
1380
- catch {
1381
- /* ignore */
1382
- }
1383
- }
1384
- }, [text, stdin, setRawMode]);
1385
- const handleInput = useCallback((key) => {
1386
- const { sequence: input } = key;
1387
- if (key.paste) {
1388
- // Do not do any other processing on pastes so ensure we handle them
1389
- // before all other cases.
1390
- insert(input, { paste: key.paste });
1391
- return;
1392
- }
1393
- if (key.name === 'return' ||
1394
- input === '\r' ||
1395
- input === '\n' ||
1396
- input === '\\\r' // VSCode terminal represents shift + enter this way
1397
- )
1398
- newline();
1399
- else if (key.name === 'left' && !key.meta && !key.ctrl)
1400
- move('left');
1401
- else if (key.ctrl && key.name === 'b')
1402
- move('left');
1403
- else if (key.name === 'right' && !key.meta && !key.ctrl)
1404
- move('right');
1405
- else if (key.ctrl && key.name === 'f')
1406
- move('right');
1407
- else if (key.name === 'up')
1408
- move('up');
1409
- else if (key.name === 'down')
1410
- move('down');
1411
- else if ((key.ctrl || key.meta) && key.name === 'left')
1412
- move('wordLeft');
1413
- else if (key.meta && key.name === 'b')
1414
- move('wordLeft');
1415
- else if ((key.ctrl || key.meta) && key.name === 'right')
1416
- move('wordRight');
1417
- else if (key.meta && key.name === 'f')
1418
- move('wordRight');
1419
- else if (key.name === 'home')
1420
- move('home');
1421
- else if (key.ctrl && key.name === 'a')
1422
- move('home');
1423
- else if (key.name === 'end')
1424
- move('end');
1425
- else if (key.ctrl && key.name === 'e')
1426
- move('end');
1427
- else if (key.ctrl && key.name === 'w')
1428
- deleteWordLeft();
1429
- else if ((key.meta || key.ctrl) &&
1430
- (key.name === 'backspace' || input === '\x7f'))
1431
- deleteWordLeft();
1432
- else if ((key.meta || key.ctrl) && key.name === 'delete')
1433
- deleteWordRight();
1434
- else if (key.name === 'backspace' ||
1435
- input === '\x7f' ||
1436
- (key.ctrl && key.name === 'h'))
1437
- backspace();
1438
- else if (key.name === 'delete' || (key.ctrl && key.name === 'd'))
1439
- del();
1440
- else if (key.ctrl && !key.shift && key.name === 'z')
1441
- undo();
1442
- else if (key.ctrl && key.shift && key.name === 'z')
1443
- redo();
1444
- else if (input && !key.ctrl && !key.meta) {
1445
- insert(input, { paste: key.paste });
1446
- }
1447
- }, [
1448
- newline,
1449
- move,
1450
- deleteWordLeft,
1451
- deleteWordRight,
1452
- backspace,
1453
- del,
1454
- insert,
1455
- undo,
1456
- redo,
1457
- ]);
1458
- const renderedVisualLines = useMemo(() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height), [visualLines, visualScrollRow, viewport.height]);
1459
- const replaceRange = useCallback((startRow, startCol, endRow, endCol, text) => {
1460
- dispatch({
1461
- type: 'replace_range',
1462
- payload: { startRow, startCol, endRow, endCol, text },
1463
- });
1464
- }, []);
1465
- const replaceRangeByOffset = useCallback((startOffset, endOffset, replacementText) => {
1466
- const [startRow, startCol] = offsetToLogicalPos(text, startOffset);
1467
- const [endRow, endCol] = offsetToLogicalPos(text, endOffset);
1468
- replaceRange(startRow, startCol, endRow, endCol, replacementText);
1469
- }, [text, replaceRange]);
1470
- const moveToOffset = useCallback((offset) => {
1471
- dispatch({ type: 'move_to_offset', payload: { offset } });
1472
- }, []);
1473
- const returnValue = useMemo(() => ({
1474
- lines,
1475
- text,
1476
- cursor: [cursorRow, cursorCol],
1477
- preferredCol,
1478
- selectionAnchor,
1479
- allVisualLines: visualLines,
1480
- viewportVisualLines: renderedVisualLines,
1481
- visualCursor,
1482
- visualScrollRow,
1483
- visualToLogicalMap,
1484
- setText,
1485
- insert,
1486
- newline,
1487
- backspace,
1488
- del,
1489
- move,
1490
- undo,
1491
- redo,
1492
- replaceRange,
1493
- replaceRangeByOffset,
1494
- moveToOffset,
1495
- deleteWordLeft,
1496
- deleteWordRight,
1497
- killLineRight,
1498
- killLineLeft,
1499
- handleInput,
1500
- openInExternalEditor,
1501
- // Vim-specific operations
1502
- vimDeleteWordForward,
1503
- vimDeleteWordBackward,
1504
- vimDeleteWordEnd,
1505
- vimChangeWordForward,
1506
- vimChangeWordBackward,
1507
- vimChangeWordEnd,
1508
- vimDeleteLine,
1509
- vimChangeLine,
1510
- vimDeleteToEndOfLine,
1511
- vimChangeToEndOfLine,
1512
- vimChangeMovement,
1513
- vimMoveLeft,
1514
- vimMoveRight,
1515
- vimMoveUp,
1516
- vimMoveDown,
1517
- vimMoveWordForward,
1518
- vimMoveWordBackward,
1519
- vimMoveWordEnd,
1520
- vimDeleteChar,
1521
- vimInsertAtCursor,
1522
- vimAppendAtCursor,
1523
- vimOpenLineBelow,
1524
- vimOpenLineAbove,
1525
- vimAppendAtLineEnd,
1526
- vimInsertAtLineStart,
1527
- vimMoveToLineStart,
1528
- vimMoveToLineEnd,
1529
- vimMoveToFirstNonWhitespace,
1530
- vimMoveToFirstLine,
1531
- vimMoveToLastLine,
1532
- vimMoveToLine,
1533
- vimEscapeInsertMode,
1534
- }), [
1535
- lines,
1536
- text,
1537
- cursorRow,
1538
- cursorCol,
1539
- preferredCol,
1540
- selectionAnchor,
1541
- visualLines,
1542
- renderedVisualLines,
1543
- visualCursor,
1544
- visualScrollRow,
1545
- setText,
1546
- insert,
1547
- newline,
1548
- backspace,
1549
- del,
1550
- move,
1551
- undo,
1552
- redo,
1553
- replaceRange,
1554
- replaceRangeByOffset,
1555
- moveToOffset,
1556
- deleteWordLeft,
1557
- deleteWordRight,
1558
- killLineRight,
1559
- killLineLeft,
1560
- handleInput,
1561
- openInExternalEditor,
1562
- vimDeleteWordForward,
1563
- vimDeleteWordBackward,
1564
- vimDeleteWordEnd,
1565
- vimChangeWordForward,
1566
- vimChangeWordBackward,
1567
- vimChangeWordEnd,
1568
- vimDeleteLine,
1569
- vimChangeLine,
1570
- vimDeleteToEndOfLine,
1571
- vimChangeToEndOfLine,
1572
- vimChangeMovement,
1573
- vimMoveLeft,
1574
- vimMoveRight,
1575
- vimMoveUp,
1576
- vimMoveDown,
1577
- vimMoveWordForward,
1578
- vimMoveWordBackward,
1579
- vimMoveWordEnd,
1580
- vimDeleteChar,
1581
- vimInsertAtCursor,
1582
- vimAppendAtCursor,
1583
- vimOpenLineBelow,
1584
- vimOpenLineAbove,
1585
- vimAppendAtLineEnd,
1586
- vimInsertAtLineStart,
1587
- vimMoveToLineStart,
1588
- vimMoveToLineEnd,
1589
- vimMoveToFirstNonWhitespace,
1590
- vimMoveToFirstLine,
1591
- vimMoveToLastLine,
1592
- vimMoveToLine,
1593
- vimEscapeInsertMode,
1594
- visualToLogicalMap,
1595
- ]);
1596
- return returnValue;
1597
- }
1598
- //# sourceMappingURL=text-buffer.js.map