@umsai/ums-code 0.0.11-post6 → 0.0.14-v1

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 (632) hide show
  1. package/dist/package.json +5 -5
  2. package/dist/src/acp/acp.d.ts +208 -0
  3. package/dist/src/{zed-integration → acp}/acp.js +44 -76
  4. package/dist/src/acp/acp.js.map +1 -0
  5. package/dist/src/acp/acpPeer.d.ts +8 -0
  6. package/dist/src/acp/acpPeer.js +537 -0
  7. package/dist/src/acp/acpPeer.js.map +1 -0
  8. package/dist/src/config/auth.js +11 -12
  9. package/dist/src/config/auth.js.map +1 -1
  10. package/dist/src/config/config.d.ts +3 -3
  11. package/dist/src/config/config.js +86 -164
  12. package/dist/src/config/config.js.map +1 -1
  13. package/dist/src/config/extension.d.ts +1 -2
  14. package/dist/src/config/extension.js +4 -9
  15. package/dist/src/config/extension.js.map +1 -1
  16. package/dist/src/config/sandboxConfig.js +3 -3
  17. package/dist/src/config/sandboxConfig.js.map +1 -1
  18. package/dist/src/config/settings.d.ts +64 -3
  19. package/dist/src/config/settings.js +38 -58
  20. package/dist/src/config/settings.js.map +1 -1
  21. package/dist/src/gemini.js +41 -37
  22. package/dist/src/gemini.js.map +1 -1
  23. package/dist/src/generated/git-commit.d.ts +1 -2
  24. package/dist/src/generated/git-commit.js +1 -2
  25. package/dist/src/generated/git-commit.js.map +1 -1
  26. package/dist/src/nonInteractiveCli.js +8 -3
  27. package/dist/src/nonInteractiveCli.js.map +1 -1
  28. package/dist/src/services/BuiltinCommandLoader.d.ts +1 -0
  29. package/dist/src/services/BuiltinCommandLoader.js +4 -11
  30. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  31. package/dist/src/services/FileCommandLoader.js +8 -10
  32. package/dist/src/services/FileCommandLoader.js.map +1 -1
  33. package/dist/src/services/McpPromptLoader.js +3 -3
  34. package/dist/src/services/McpPromptLoader.js.map +1 -1
  35. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +7 -2
  36. package/dist/src/services/prompt-processors/argumentProcessor.js +10 -2
  37. package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -1
  38. package/dist/src/services/prompt-processors/shellProcessor.d.ts +13 -16
  39. package/dist/src/services/prompt-processors/shellProcessor.js +40 -125
  40. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
  41. package/dist/src/services/prompt-processors/types.d.ts +0 -2
  42. package/dist/src/services/prompt-processors/types.js +0 -2
  43. package/dist/src/services/prompt-processors/types.js.map +1 -1
  44. package/dist/src/ui/App.js +46 -224
  45. package/dist/src/ui/App.js.map +1 -1
  46. package/dist/src/ui/commands/aboutCommand.js +5 -9
  47. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  48. package/dist/src/ui/commands/bugCommand.js +5 -13
  49. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  50. package/dist/src/ui/commands/chatCommand.js +6 -23
  51. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  52. package/dist/src/ui/commands/clearCommand.js +1 -0
  53. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  54. package/dist/src/ui/commands/directoryCommand.js +21 -18
  55. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  56. package/dist/src/ui/commands/docsCommand.js +1 -1
  57. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  58. package/dist/src/ui/commands/ideCommand.js +18 -90
  59. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  60. package/dist/src/ui/commands/initCommand.d.ts +1 -1
  61. package/dist/src/ui/commands/initCommand.js +7 -17
  62. package/dist/src/ui/commands/initCommand.js.map +1 -1
  63. package/dist/src/ui/commands/mcpCommand.js +7 -11
  64. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  65. package/dist/src/ui/commands/memoryCommand.js +6 -139
  66. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  67. package/dist/src/ui/commands/quitCommand.d.ts +0 -1
  68. package/dist/src/ui/commands/quitCommand.js +0 -25
  69. package/dist/src/ui/commands/quitCommand.js.map +1 -1
  70. package/dist/src/ui/commands/setupGithubCommand.d.ts +0 -2
  71. package/dist/src/ui/commands/setupGithubCommand.js +26 -132
  72. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  73. package/dist/src/ui/commands/toolsCommand.js +2 -2
  74. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  75. package/dist/src/ui/commands/types.d.ts +3 -19
  76. package/dist/src/ui/commands/types.js.map +1 -1
  77. package/dist/src/ui/commands/ums/umsInitCommand.js +21 -55
  78. package/dist/src/ui/commands/ums/umsInitCommand.js.map +1 -1
  79. package/dist/src/ui/components/AboutBox.d.ts +0 -1
  80. package/dist/src/ui/components/AboutBox.js +1 -1
  81. package/dist/src/ui/components/AboutBox.js.map +1 -1
  82. package/dist/src/ui/components/AsciiArt.d.ts +0 -1
  83. package/dist/src/ui/components/AsciiArt.js +0 -8
  84. package/dist/src/ui/components/AsciiArt.js.map +1 -1
  85. package/dist/src/ui/components/AuthDialog.d.ts +1 -1
  86. package/dist/src/ui/components/AuthDialog.js +15 -17
  87. package/dist/src/ui/components/AuthDialog.js.map +1 -1
  88. package/dist/src/ui/components/AuthInProgress.js +5 -6
  89. package/dist/src/ui/components/AuthInProgress.js.map +1 -1
  90. package/dist/src/ui/components/ContextSummaryDisplay.js +25 -22
  91. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  92. package/dist/src/ui/components/DebugProfiler.js +4 -5
  93. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  94. package/dist/src/ui/components/EditorSettingsDialog.js +5 -6
  95. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  96. package/dist/src/ui/components/Footer.d.ts +0 -1
  97. package/dist/src/ui/components/Footer.js +6 -16
  98. package/dist/src/ui/components/Footer.js.map +1 -1
  99. package/dist/src/ui/components/Header.d.ts +1 -0
  100. package/dist/src/ui/components/Header.js +5 -13
  101. package/dist/src/ui/components/Header.js.map +1 -1
  102. package/dist/src/ui/components/Help.js +1 -1
  103. package/dist/src/ui/components/Help.js.map +1 -1
  104. package/dist/src/ui/components/HistoryItemDisplay.js +1 -2
  105. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  106. package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +12 -0
  107. package/dist/src/ui/components/IDEContextDetailDisplay.js +12 -0
  108. package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -0
  109. package/dist/src/ui/components/InputPrompt.d.ts +0 -1
  110. package/dist/src/ui/components/InputPrompt.js +35 -98
  111. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  112. package/dist/src/ui/components/LoadingIndicator.js +5 -10
  113. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  114. package/dist/src/ui/components/ShellConfirmationDialog.js +5 -7
  115. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
  116. package/dist/src/ui/components/StatsDisplay.js +7 -8
  117. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  118. package/dist/src/ui/components/SuggestionsDisplay.js +1 -1
  119. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  120. package/dist/src/ui/components/ThemeDialog.js +20 -10
  121. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  122. package/dist/src/ui/components/messages/DiffRenderer.js +1 -10
  123. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  124. package/dist/src/ui/components/messages/InfoMessage.js +1 -6
  125. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  126. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +14 -36
  127. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  128. package/dist/src/ui/components/messages/ToolGroupMessage.js +1 -1
  129. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  130. package/dist/src/ui/components/messages/ToolMessage.js +10 -75
  131. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
  132. package/dist/src/ui/components/shared/MaxSizedBox.js +1 -1
  133. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
  134. package/dist/src/ui/components/shared/RadioButtonSelect.js +9 -11
  135. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
  136. package/dist/src/ui/components/shared/text-buffer.d.ts +4 -17
  137. package/dist/src/ui/components/shared/text-buffer.js +80 -262
  138. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  139. package/dist/src/ui/components/shared/vim-buffer-actions.js +152 -139
  140. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
  141. package/dist/src/ui/components/ums/UMSKeyPrompt.js +3 -3
  142. package/dist/src/ui/components/ums/UMSKeyPrompt.js.map +1 -1
  143. package/dist/src/ui/contexts/SessionContext.d.ts +1 -3
  144. package/dist/src/ui/contexts/SessionContext.js +11 -3
  145. package/dist/src/ui/contexts/SessionContext.js.map +1 -1
  146. package/dist/src/ui/hooks/atCommandProcessor.js +16 -17
  147. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  148. package/dist/src/ui/hooks/shellCommandProcessor.js +13 -8
  149. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
  150. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +2 -9
  151. package/dist/src/ui/hooks/slashCommandProcessor.js +62 -234
  152. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  153. package/dist/src/ui/hooks/useAtCompletion.js +3 -4
  154. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  155. package/dist/src/ui/hooks/useAuthCommand.js +1 -1
  156. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +6 -6
  157. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
  158. package/dist/src/ui/hooks/useFocus.d.ts +0 -4
  159. package/dist/src/ui/hooks/useFocus.js +4 -4
  160. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  161. package/dist/src/ui/hooks/useGeminiStream.d.ts +3 -4
  162. package/dist/src/ui/hooks/useGeminiStream.js +33 -50
  163. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  164. package/dist/src/ui/hooks/useKeypress.d.ts +16 -4
  165. package/dist/src/ui/hooks/useKeypress.js +140 -8
  166. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  167. package/dist/src/ui/hooks/usePhraseCycler.js +2 -2
  168. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  169. package/dist/src/ui/hooks/usePrivacySettings.js +2 -6
  170. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
  171. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
  172. package/dist/src/ui/hooks/useReactToolScheduler.js +15 -15
  173. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  174. package/dist/src/ui/hooks/useThemeCommand.js +1 -1
  175. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  176. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +4 -5
  177. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
  178. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +4 -5
  179. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -1
  180. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +4 -5
  181. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -1
  182. package/dist/src/ui/themes/ansi-light.js +1 -2
  183. package/dist/src/ui/themes/ansi-light.js.map +1 -1
  184. package/dist/src/ui/themes/ansi.js +1 -2
  185. package/dist/src/ui/themes/ansi.js.map +1 -1
  186. package/dist/src/ui/themes/atom-one-dark.js +1 -2
  187. package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
  188. package/dist/src/ui/themes/ayu-light.js +1 -2
  189. package/dist/src/ui/themes/ayu-light.js.map +1 -1
  190. package/dist/src/ui/themes/ayu.js +1 -2
  191. package/dist/src/ui/themes/ayu.js.map +1 -1
  192. package/dist/src/ui/themes/default-light.js +1 -2
  193. package/dist/src/ui/themes/default-light.js.map +1 -1
  194. package/dist/src/ui/themes/default.js +1 -2
  195. package/dist/src/ui/themes/default.js.map +1 -1
  196. package/dist/src/ui/themes/dracula.js +1 -2
  197. package/dist/src/ui/themes/dracula.js.map +1 -1
  198. package/dist/src/ui/themes/github-dark.js +1 -2
  199. package/dist/src/ui/themes/github-dark.js.map +1 -1
  200. package/dist/src/ui/themes/github-light.js +1 -2
  201. package/dist/src/ui/themes/github-light.js.map +1 -1
  202. package/dist/src/ui/themes/googlecode.js +1 -2
  203. package/dist/src/ui/themes/googlecode.js.map +1 -1
  204. package/dist/src/ui/themes/no-color.js +1 -30
  205. package/dist/src/ui/themes/no-color.js.map +1 -1
  206. package/dist/src/ui/themes/qwen-dark.js +1 -2
  207. package/dist/src/ui/themes/qwen-dark.js.map +1 -1
  208. package/dist/src/ui/themes/qwen-light.js +1 -2
  209. package/dist/src/ui/themes/qwen-light.js.map +1 -1
  210. package/dist/src/ui/themes/shades-of-purple.js +1 -2
  211. package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
  212. package/dist/src/ui/themes/theme-manager.d.ts +0 -6
  213. package/dist/src/ui/themes/theme-manager.js +1 -8
  214. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  215. package/dist/src/ui/themes/theme.d.ts +2 -45
  216. package/dist/src/ui/themes/theme.js +107 -92
  217. package/dist/src/ui/themes/theme.js.map +1 -1
  218. package/dist/src/ui/themes/xcode.js +1 -2
  219. package/dist/src/ui/themes/xcode.js.map +1 -1
  220. package/dist/src/ui/types.d.ts +4 -30
  221. package/dist/src/ui/types.js +0 -2
  222. package/dist/src/ui/types.js.map +1 -1
  223. package/dist/src/ui/utils/CodeColorizer.d.ts +1 -2
  224. package/dist/src/ui/utils/CodeColorizer.js +4 -5
  225. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  226. package/dist/src/ui/utils/ConsolePatcher.d.ts +0 -1
  227. package/dist/src/ui/utils/ConsolePatcher.js +0 -3
  228. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  229. package/dist/src/ui/utils/InlineMarkdownRenderer.js +1 -8
  230. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
  231. package/dist/src/ui/utils/MarkdownDisplay.js +2 -4
  232. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  233. package/dist/src/ui/utils/commandUtils.d.ts +0 -1
  234. package/dist/src/ui/utils/commandUtils.js +1 -22
  235. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  236. package/dist/src/ui/utils/computeStats.js +1 -3
  237. package/dist/src/ui/utils/computeStats.js.map +1 -1
  238. package/dist/src/ui/utils/errorParsing.d.ts +7 -0
  239. package/dist/src/ui/utils/errorParsing.js +90 -0
  240. package/dist/src/ui/utils/errorParsing.js.map +1 -0
  241. package/dist/src/ui/utils/updateCheck.d.ts +1 -1
  242. package/dist/src/ui/utils/updateCheck.js +10 -4
  243. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  244. package/dist/src/utils/cleanup.d.ts +2 -2
  245. package/dist/src/utils/cleanup.js +2 -2
  246. package/dist/src/utils/cleanup.js.map +1 -1
  247. package/dist/src/utils/gitUtils.d.ts +1 -21
  248. package/dist/src/utils/gitUtils.js +3 -68
  249. package/dist/src/utils/gitUtils.js.map +1 -1
  250. package/dist/src/utils/installationInfo.js +5 -5
  251. package/dist/src/utils/installationInfo.js.map +1 -1
  252. package/dist/src/utils/readStdin.js +0 -10
  253. package/dist/src/utils/readStdin.js.map +1 -1
  254. package/dist/src/utils/sandbox.js +434 -457
  255. package/dist/src/utils/sandbox.js.map +1 -1
  256. package/dist/src/utils/version.js +1 -1
  257. package/dist/src/utils/version.js.map +1 -1
  258. package/dist/src/validateNonInterActiveAuth.js +7 -4
  259. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  260. package/dist/tsconfig.tsbuildinfo +1 -1
  261. package/package.json +6 -6
  262. package/dist/src/commands/mcp/add.d.ts +0 -7
  263. package/dist/src/commands/mcp/add.js +0 -166
  264. package/dist/src/commands/mcp/add.js.map +0 -1
  265. package/dist/src/commands/mcp/list.d.ts +0 -8
  266. package/dist/src/commands/mcp/list.js +0 -110
  267. package/dist/src/commands/mcp/list.js.map +0 -1
  268. package/dist/src/commands/mcp/remove.d.ts +0 -7
  269. package/dist/src/commands/mcp/remove.js +0 -44
  270. package/dist/src/commands/mcp/remove.js.map +0 -1
  271. package/dist/src/commands/mcp.d.ts +0 -7
  272. package/dist/src/commands/mcp.js +0 -23
  273. package/dist/src/commands/mcp.js.map +0 -1
  274. package/dist/src/config/auth.test.d.ts +0 -6
  275. package/dist/src/config/auth.test.js +0 -57
  276. package/dist/src/config/auth.test.js.map +0 -1
  277. package/dist/src/config/keyBindings.d.ts +0 -66
  278. package/dist/src/config/keyBindings.js +0 -141
  279. package/dist/src/config/keyBindings.js.map +0 -1
  280. package/dist/src/config/keyBindings.test.d.ts +0 -6
  281. package/dist/src/config/keyBindings.test.js +0 -51
  282. package/dist/src/config/keyBindings.test.js.map +0 -1
  283. package/dist/src/config/settingsSchema.d.ts +0 -613
  284. package/dist/src/config/settingsSchema.js +0 -586
  285. package/dist/src/config/settingsSchema.js.map +0 -1
  286. package/dist/src/config/settingsSchema.test.d.ts +0 -6
  287. package/dist/src/config/settingsSchema.test.js +0 -196
  288. package/dist/src/config/settingsSchema.test.js.map +0 -1
  289. package/dist/src/config/trustedFolders.d.ts +0 -37
  290. package/dist/src/config/trustedFolders.js +0 -118
  291. package/dist/src/config/trustedFolders.js.map +0 -1
  292. package/dist/src/config/trustedFolders.test.d.ts +0 -6
  293. package/dist/src/config/trustedFolders.test.js +0 -160
  294. package/dist/src/config/trustedFolders.test.js.map +0 -1
  295. package/dist/src/gemini.test.d.ts +0 -6
  296. package/dist/src/gemini.test.js +0 -193
  297. package/dist/src/gemini.test.js.map +0 -1
  298. package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
  299. package/dist/src/services/BuiltinCommandLoader.test.js +0 -111
  300. package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
  301. package/dist/src/services/CommandService.test.d.ts +0 -6
  302. package/dist/src/services/CommandService.test.js +0 -232
  303. package/dist/src/services/CommandService.test.js.map +0 -1
  304. package/dist/src/test-utils/customMatchers.d.ts +0 -14
  305. package/dist/src/test-utils/customMatchers.js +0 -46
  306. package/dist/src/test-utils/customMatchers.js.map +0 -1
  307. package/dist/src/test-utils/mockCommandContext.d.ts +0 -18
  308. package/dist/src/test-utils/mockCommandContext.js +0 -87
  309. package/dist/src/test-utils/mockCommandContext.js.map +0 -1
  310. package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
  311. package/dist/src/test-utils/mockCommandContext.test.js +0 -51
  312. package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
  313. package/dist/src/test-utils/render.d.ts +0 -8
  314. package/dist/src/test-utils/render.js +0 -10
  315. package/dist/src/test-utils/render.js.map +0 -1
  316. package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -16
  317. package/dist/src/ui/IdeIntegrationNudge.js +0 -52
  318. package/dist/src/ui/IdeIntegrationNudge.js.map +0 -1
  319. package/dist/src/ui/commands/agentsCommand.d.ts +0 -7
  320. package/dist/src/ui/commands/agentsCommand.js +0 -32
  321. package/dist/src/ui/commands/agentsCommand.js.map +0 -1
  322. package/dist/src/ui/commands/settingsCommand.d.ts +0 -7
  323. package/dist/src/ui/commands/settingsCommand.js +0 -16
  324. package/dist/src/ui/commands/settingsCommand.js.map +0 -1
  325. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
  326. package/dist/src/ui/commands/setupGithubCommand.test.js +0 -167
  327. package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
  328. package/dist/src/ui/commands/summaryCommand.d.ts +0 -7
  329. package/dist/src/ui/commands/summaryCommand.js +0 -149
  330. package/dist/src/ui/commands/summaryCommand.js.map +0 -1
  331. package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
  332. package/dist/src/ui/commands/terminalSetupCommand.js +0 -41
  333. package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
  334. package/dist/src/ui/components/AuthDialog.test.d.ts +0 -6
  335. package/dist/src/ui/components/AuthDialog.test.js +0 -220
  336. package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
  337. package/dist/src/ui/components/ContextUsageDisplay.d.ts +0 -9
  338. package/dist/src/ui/components/ContextUsageDisplay.js +0 -14
  339. package/dist/src/ui/components/ContextUsageDisplay.js.map +0 -1
  340. package/dist/src/ui/components/FolderTrustDialog.d.ts +0 -16
  341. package/dist/src/ui/components/FolderTrustDialog.js +0 -39
  342. package/dist/src/ui/components/FolderTrustDialog.js.map +0 -1
  343. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
  344. package/dist/src/ui/components/FolderTrustDialog.test.js +0 -26
  345. package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
  346. package/dist/src/ui/components/Header.test.d.ts +0 -6
  347. package/dist/src/ui/components/Header.test.js +0 -37
  348. package/dist/src/ui/components/Header.test.js.map +0 -1
  349. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  350. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -91
  351. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  352. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  353. package/dist/src/ui/components/LoadingIndicator.test.js +0 -190
  354. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  355. package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +0 -6
  356. package/dist/src/ui/components/OpenAIKeyPrompt.test.js +0 -44
  357. package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +0 -1
  358. package/dist/src/ui/components/QuitConfirmationDialog.d.ts +0 -17
  359. package/dist/src/ui/components/QuitConfirmationDialog.js +0 -44
  360. package/dist/src/ui/components/QuitConfirmationDialog.js.map +0 -1
  361. package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +0 -6
  362. package/dist/src/ui/components/QwenOAuthProgress.test.js +0 -292
  363. package/dist/src/ui/components/QwenOAuthProgress.test.js.map +0 -1
  364. package/dist/src/ui/components/SettingsDialog.d.ts +0 -14
  365. package/dist/src/ui/components/SettingsDialog.js +0 -519
  366. package/dist/src/ui/components/SettingsDialog.js.map +0 -1
  367. package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
  368. package/dist/src/ui/components/SettingsDialog.test.js +0 -568
  369. package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
  370. package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +0 -6
  371. package/dist/src/ui/components/ShellConfirmationDialog.test.js +0 -40
  372. package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +0 -1
  373. package/dist/src/ui/components/TodoDisplay.d.ts +0 -16
  374. package/dist/src/ui/components/TodoDisplay.js +0 -27
  375. package/dist/src/ui/components/TodoDisplay.js.map +0 -1
  376. package/dist/src/ui/components/TodoDisplay.test.d.ts +0 -6
  377. package/dist/src/ui/components/TodoDisplay.test.js +0 -77
  378. package/dist/src/ui/components/TodoDisplay.test.js.map +0 -1
  379. package/dist/src/ui/components/WelcomeBackDialog.d.ts +0 -13
  380. package/dist/src/ui/components/WelcomeBackDialog.js +0 -31
  381. package/dist/src/ui/components/WelcomeBackDialog.js.map +0 -1
  382. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  383. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
  384. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  385. package/dist/src/ui/components/messages/SummaryMessage.d.ts +0 -11
  386. package/dist/src/ui/components/messages/SummaryMessage.js +0 -35
  387. package/dist/src/ui/components/messages/SummaryMessage.js.map +0 -1
  388. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  389. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -37
  390. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  391. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  392. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -146
  393. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  394. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  395. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -154
  396. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  397. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
  398. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -111
  399. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
  400. package/dist/src/ui/components/shared/TextInput.d.ts +0 -16
  401. package/dist/src/ui/components/shared/TextInput.js +0 -127
  402. package/dist/src/ui/components/shared/TextInput.js.map +0 -1
  403. package/dist/src/ui/components/subagents/constants.d.ts +0 -23
  404. package/dist/src/ui/components/subagents/constants.js +0 -67
  405. package/dist/src/ui/components/subagents/constants.js.map +0 -1
  406. package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +0 -15
  407. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +0 -171
  408. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +0 -1
  409. package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +0 -15
  410. package/dist/src/ui/components/subagents/create/ColorSelector.js +0 -41
  411. package/dist/src/ui/components/subagents/create/ColorSelector.js.map +0 -1
  412. package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +0 -10
  413. package/dist/src/ui/components/subagents/create/CreationSummary.js +0 -163
  414. package/dist/src/ui/components/subagents/create/CreationSummary.js.map +0 -1
  415. package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +0 -10
  416. package/dist/src/ui/components/subagents/create/DescriptionInput.js +0 -105
  417. package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +0 -1
  418. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +0 -10
  419. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +0 -33
  420. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +0 -1
  421. package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +0 -10
  422. package/dist/src/ui/components/subagents/create/LocationSelector.js +0 -33
  423. package/dist/src/ui/components/subagents/create/LocationSelector.js.map +0 -1
  424. package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +0 -26
  425. package/dist/src/ui/components/subagents/create/TextEntryStep.js +0 -28
  426. package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +0 -1
  427. package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +0 -16
  428. package/dist/src/ui/components/subagents/create/ToolSelector.js +0 -143
  429. package/dist/src/ui/components/subagents/create/ToolSelector.js.map +0 -1
  430. package/dist/src/ui/components/subagents/index.d.ts +0 -8
  431. package/dist/src/ui/components/subagents/index.js +0 -12
  432. package/dist/src/ui/components/subagents/index.js.map +0 -1
  433. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +0 -13
  434. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +0 -45
  435. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +0 -1
  436. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +0 -13
  437. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +0 -32
  438. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +0 -1
  439. package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +0 -15
  440. package/dist/src/ui/components/subagents/manage/AgentEditStep.js +0 -62
  441. package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +0 -1
  442. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +0 -12
  443. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +0 -224
  444. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +0 -1
  445. package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +0 -11
  446. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +0 -18
  447. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +0 -1
  448. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +0 -15
  449. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +0 -220
  450. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +0 -1
  451. package/dist/src/ui/components/subagents/reducers.d.ts +0 -14
  452. package/dist/src/ui/components/subagents/reducers.js +0 -161
  453. package/dist/src/ui/components/subagents/reducers.js.map +0 -1
  454. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +0 -19
  455. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +0 -184
  456. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +0 -1
  457. package/dist/src/ui/components/subagents/types.d.ts +0 -137
  458. package/dist/src/ui/components/subagents/types.js +0 -15
  459. package/dist/src/ui/components/subagents/types.js.map +0 -1
  460. package/dist/src/ui/components/subagents/utils.d.ts +0 -15
  461. package/dist/src/ui/components/subagents/utils.js +0 -79
  462. package/dist/src/ui/components/subagents/utils.js.map +0 -1
  463. package/dist/src/ui/contexts/KeypressContext.d.ts +0 -31
  464. package/dist/src/ui/contexts/KeypressContext.js +0 -388
  465. package/dist/src/ui/contexts/KeypressContext.js.map +0 -1
  466. package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
  467. package/dist/src/ui/contexts/KeypressContext.test.js +0 -754
  468. package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
  469. package/dist/src/ui/contexts/SettingsContext.d.ts +0 -9
  470. package/dist/src/ui/contexts/SettingsContext.js +0 -15
  471. package/dist/src/ui/contexts/SettingsContext.js.map +0 -1
  472. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
  473. package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -824
  474. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
  475. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
  476. package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -328
  477. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
  478. package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +0 -11
  479. package/dist/src/ui/hooks/useAgentsManagerDialog.js +0 -21
  480. package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +0 -1
  481. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +0 -6
  482. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +0 -191
  483. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +0 -1
  484. package/dist/src/ui/hooks/useDialogClose.d.ts +0 -34
  485. package/dist/src/ui/hooks/useDialogClose.js +0 -62
  486. package/dist/src/ui/hooks/useDialogClose.js.map +0 -1
  487. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
  488. package/dist/src/ui/hooks/useEditorSettings.test.js +0 -164
  489. package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
  490. package/dist/src/ui/hooks/useFolderTrust.d.ts +0 -12
  491. package/dist/src/ui/hooks/useFolderTrust.js +0 -55
  492. package/dist/src/ui/hooks/useFolderTrust.js.map +0 -1
  493. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
  494. package/dist/src/ui/hooks/useGitBranchName.test.js +0 -239
  495. package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
  496. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
  497. package/dist/src/ui/hooks/useHistoryManager.test.js +0 -171
  498. package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
  499. package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
  500. package/dist/src/ui/hooks/useInputHistory.test.js +0 -207
  501. package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
  502. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -15
  503. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -20
  504. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
  505. package/dist/src/ui/hooks/useLaunchEditor.d.ts +0 -10
  506. package/dist/src/ui/hooks/useLaunchEditor.js +0 -70
  507. package/dist/src/ui/hooks/useLaunchEditor.js.map +0 -1
  508. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
  509. package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -91
  510. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
  511. package/dist/src/ui/hooks/useMessageQueue.d.ts +0 -22
  512. package/dist/src/ui/hooks/useMessageQueue.js +0 -49
  513. package/dist/src/ui/hooks/useMessageQueue.js.map +0 -1
  514. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
  515. package/dist/src/ui/hooks/useMessageQueue.test.js +0 -158
  516. package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
  517. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
  518. package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -154
  519. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
  520. package/dist/src/ui/hooks/useQuitConfirmation.d.ts +0 -14
  521. package/dist/src/ui/hooks/useQuitConfirmation.js +0 -36
  522. package/dist/src/ui/hooks/useQuitConfirmation.js.map +0 -1
  523. package/dist/src/ui/hooks/useQwenAuth.test.d.ts +0 -6
  524. package/dist/src/ui/hooks/useQwenAuth.test.js +0 -288
  525. package/dist/src/ui/hooks/useQwenAuth.test.js.map +0 -1
  526. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
  527. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -163
  528. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
  529. package/dist/src/ui/hooks/useSettingsCommand.d.ts +0 -10
  530. package/dist/src/ui/hooks/useSettingsCommand.js +0 -21
  531. package/dist/src/ui/hooks/useSettingsCommand.js.map +0 -1
  532. package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
  533. package/dist/src/ui/hooks/useShellHistory.test.js +0 -162
  534. package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
  535. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -6
  536. package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -272
  537. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
  538. package/dist/src/ui/hooks/useSubagentCreateDialog.d.ts +0 -10
  539. package/dist/src/ui/hooks/useSubagentCreateDialog.js +0 -21
  540. package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +0 -1
  541. package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
  542. package/dist/src/ui/hooks/useTimer.test.js +0 -90
  543. package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
  544. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
  545. package/dist/src/ui/hooks/useToolScheduler.test.js +0 -846
  546. package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
  547. package/dist/src/ui/hooks/useWelcomeBack.d.ts +0 -23
  548. package/dist/src/ui/hooks/useWelcomeBack.js +0 -78
  549. package/dist/src/ui/hooks/useWelcomeBack.js.map +0 -1
  550. package/dist/src/ui/keyMatchers.d.ts +0 -26
  551. package/dist/src/ui/keyMatchers.js +0 -68
  552. package/dist/src/ui/keyMatchers.js.map +0 -1
  553. package/dist/src/ui/keyMatchers.test.d.ts +0 -6
  554. package/dist/src/ui/keyMatchers.test.js +0 -276
  555. package/dist/src/ui/keyMatchers.test.js.map +0 -1
  556. package/dist/src/ui/semantic-colors.d.ts +0 -7
  557. package/dist/src/ui/semantic-colors.js +0 -24
  558. package/dist/src/ui/semantic-colors.js.map +0 -1
  559. package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
  560. package/dist/src/ui/themes/color-utils.test.js +0 -197
  561. package/dist/src/ui/themes/color-utils.test.js.map +0 -1
  562. package/dist/src/ui/themes/semantic-tokens.d.ts +0 -37
  563. package/dist/src/ui/themes/semantic-tokens.js +0 -94
  564. package/dist/src/ui/themes/semantic-tokens.js.map +0 -1
  565. package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
  566. package/dist/src/ui/themes/theme-manager.test.js +0 -83
  567. package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
  568. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  569. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -151
  570. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  571. package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
  572. package/dist/src/ui/utils/clipboardUtils.test.js +0 -65
  573. package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
  574. package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
  575. package/dist/src/ui/utils/commandUtils.test.js +0 -294
  576. package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
  577. package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
  578. package/dist/src/ui/utils/displayUtils.test.js +0 -42
  579. package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
  580. package/dist/src/ui/utils/formatters.test.d.ts +0 -6
  581. package/dist/src/ui/utils/formatters.test.js +0 -56
  582. package/dist/src/ui/utils/formatters.test.js.map +0 -1
  583. package/dist/src/ui/utils/isNarrowWidth.d.ts +0 -6
  584. package/dist/src/ui/utils/isNarrowWidth.js +0 -9
  585. package/dist/src/ui/utils/isNarrowWidth.js.map +0 -1
  586. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -13
  587. package/dist/src/ui/utils/kittyProtocolDetector.js +0 -88
  588. package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
  589. package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
  590. package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
  591. package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
  592. package/dist/src/ui/utils/platformConstants.d.ts +0 -45
  593. package/dist/src/ui/utils/platformConstants.js +0 -46
  594. package/dist/src/ui/utils/platformConstants.js.map +0 -1
  595. package/dist/src/ui/utils/terminalSetup.d.ts +0 -30
  596. package/dist/src/ui/utils/terminalSetup.js +0 -281
  597. package/dist/src/ui/utils/terminalSetup.js.map +0 -1
  598. package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
  599. package/dist/src/ui/utils/updateCheck.test.js +0 -145
  600. package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
  601. package/dist/src/utils/checks.d.ts +0 -19
  602. package/dist/src/utils/checks.js +0 -24
  603. package/dist/src/utils/checks.js.map +0 -1
  604. package/dist/src/utils/dialogScopeUtils.d.ts +0 -31
  605. package/dist/src/utils/dialogScopeUtils.js +0 -48
  606. package/dist/src/utils/dialogScopeUtils.js.map +0 -1
  607. package/dist/src/utils/gitUtils.test.d.ts +0 -6
  608. package/dist/src/utils/gitUtils.test.js +0 -113
  609. package/dist/src/utils/gitUtils.test.js.map +0 -1
  610. package/dist/src/utils/installationInfo.test.d.ts +0 -6
  611. package/dist/src/utils/installationInfo.test.js +0 -242
  612. package/dist/src/utils/installationInfo.test.js.map +0 -1
  613. package/dist/src/utils/settingsUtils.d.ts +0 -134
  614. package/dist/src/utils/settingsUtils.js +0 -336
  615. package/dist/src/utils/settingsUtils.js.map +0 -1
  616. package/dist/src/utils/settingsUtils.test.d.ts +0 -6
  617. package/dist/src/utils/settingsUtils.test.js +0 -514
  618. package/dist/src/utils/settingsUtils.test.js.map +0 -1
  619. package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
  620. package/dist/src/utils/userStartupWarnings.test.js +0 -67
  621. package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
  622. package/dist/src/zed-integration/acp.d.ts +0 -63
  623. package/dist/src/zed-integration/acp.js.map +0 -1
  624. package/dist/src/zed-integration/fileSystemService.d.ts +0 -19
  625. package/dist/src/zed-integration/fileSystemService.js +0 -43
  626. package/dist/src/zed-integration/fileSystemService.js.map +0 -1
  627. package/dist/src/zed-integration/schema.d.ts +0 -11782
  628. package/dist/src/zed-integration/schema.js +0 -311
  629. package/dist/src/zed-integration/schema.js.map +0 -1
  630. package/dist/src/zed-integration/zedIntegration.d.ts +0 -10
  631. package/dist/src/zed-integration/zedIntegration.js +0 -765
  632. package/dist/src/zed-integration/zedIntegration.js.map +0 -1
@@ -5,16 +5,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  * SPDX-License-Identifier: Apache-2.0
6
6
  */
7
7
  import { useEffect, useState, useRef } from 'react';
8
- import { Text, Box } from 'ink';
8
+ import { Text, Box, useInput } from 'ink';
9
9
  import { Colors } from '../../colors.js';
10
- import { useKeypress } from '../../hooks/useKeypress.js';
11
10
  /**
12
11
  * A custom component that displays a list of items with radio buttons,
13
12
  * supporting scrolling and keyboard navigation.
14
13
  *
15
14
  * @template T The type of the value associated with each radio item.
16
15
  */
17
- export function RadioButtonSelect({ items, initialIndex = 0, onSelect, onHighlight, isFocused = true, showScrollArrows = false, maxItemsToShow = 10, showNumbers = true, }) {
16
+ export function RadioButtonSelect({ items, initialIndex = 0, onSelect, onHighlight, isFocused, showScrollArrows = false, maxItemsToShow = 10, showNumbers = true, }) {
18
17
  const [activeIndex, setActiveIndex] = useState(initialIndex);
19
18
  const [scrollOffset, setScrollOffset] = useState(0);
20
19
  const [numberInput, setNumberInput] = useState('');
@@ -33,27 +32,26 @@ export function RadioButtonSelect({ items, initialIndex = 0, onSelect, onHighlig
33
32
  clearTimeout(numberInputTimer.current);
34
33
  }
35
34
  }, []);
36
- useKeypress((key) => {
37
- const { sequence, name } = key;
38
- const isNumeric = showNumbers && /^[0-9]$/.test(sequence);
35
+ useInput((input, key) => {
36
+ const isNumeric = showNumbers && /^[0-9]$/.test(input);
39
37
  // Any key press that is not a digit should clear the number input buffer.
40
38
  if (!isNumeric && numberInputTimer.current) {
41
39
  clearTimeout(numberInputTimer.current);
42
40
  setNumberInput('');
43
41
  }
44
- if (name === 'k' || name === 'up') {
42
+ if (input === 'k' || key.upArrow) {
45
43
  const newIndex = activeIndex > 0 ? activeIndex - 1 : items.length - 1;
46
44
  setActiveIndex(newIndex);
47
45
  onHighlight?.(items[newIndex].value);
48
46
  return;
49
47
  }
50
- if (name === 'j' || name === 'down') {
48
+ if (input === 'j' || key.downArrow) {
51
49
  const newIndex = activeIndex < items.length - 1 ? activeIndex + 1 : 0;
52
50
  setActiveIndex(newIndex);
53
51
  onHighlight?.(items[newIndex].value);
54
52
  return;
55
53
  }
56
- if (name === 'return') {
54
+ if (key.return) {
57
55
  onSelect(items[activeIndex].value);
58
56
  return;
59
57
  }
@@ -62,7 +60,7 @@ export function RadioButtonSelect({ items, initialIndex = 0, onSelect, onHighlig
62
60
  if (numberInputTimer.current) {
63
61
  clearTimeout(numberInputTimer.current);
64
62
  }
65
- const newNumberInput = numberInput + sequence;
63
+ const newNumberInput = numberInput + input;
66
64
  setNumberInput(newNumberInput);
67
65
  const targetIndex = Number.parseInt(newNumberInput, 10) - 1;
68
66
  // A single '0' is not a valid selection since items are 1-indexed.
@@ -93,7 +91,7 @@ export function RadioButtonSelect({ items, initialIndex = 0, onSelect, onHighlig
93
91
  setNumberInput('');
94
92
  }
95
93
  }
96
- }, { isActive: !!(isFocused && items.length > 0) });
94
+ }, { isActive: isFocused && items.length > 0 });
97
95
  const visibleItems = items.slice(scrollOffset, scrollOffset + maxItemsToShow);
98
96
  return (_jsxs(Box, { flexDirection: "column", children: [showScrollArrows && (_jsx(Text, { color: scrollOffset > 0 ? Colors.Foreground : Colors.Gray, children: "\u25B2" })), visibleItems.map((item, index) => {
99
97
  const itemIndex = scrollOffset + index;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButtonSelect.js","sourceRoot":"","sources":["../../../../../src/ui/components/shared/RadioButtonSelect.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MA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KAAC,IAAI,IACH,KAAK,EACH,YAAY,GAAG,cAAc,GAAG,KAAK,CAAC,MAAM;oBAC1C,CAAC,CAAC,MAAM,CAAC,UAAU;oBACnB,CAAC,CAAC,MAAM,CAAC,IAAI,uBAIZ,CACR,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -4,23 +4,10 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export type Direction = 'left' | 'right' | 'up' | 'down' | 'wordLeft' | 'wordRight' | 'home' | 'end';
7
- export declare const isWordCharStrict: (char: string) => boolean;
8
- export declare const isWhitespace: (char: string) => boolean;
9
- export declare const isCombiningMark: (char: string) => boolean;
10
- export declare const isWordCharWithCombining: (char: string) => boolean;
11
- export declare const getCharScript: (char: string) => string;
12
- export declare const isDifferentScript: (char1: string, char2: string) => boolean;
13
- export declare const findNextWordStartInLine: (line: string, col: number) => number | null;
14
- export declare const findPrevWordStartInLine: (line: string, col: number) => number | null;
15
- export declare const findWordEndInLine: (line: string, col: number) => number | null;
16
- export declare const findNextWordAcrossLines: (lines: string[], cursorRow: number, cursorCol: number, searchForWordStart: boolean) => {
17
- row: number;
18
- col: number;
19
- } | null;
20
- export declare const findPrevWordAcrossLines: (lines: string[], cursorRow: number, cursorCol: number) => {
21
- row: number;
22
- col: number;
23
- } | null;
7
+ export declare const findNextWordStart: (text: string, currentOffset: number) => number;
8
+ export declare const findPrevWordStart: (text: string, currentOffset: number) => number;
9
+ export declare const findWordEnd: (text: string, currentOffset: number) => number;
10
+ export declare const getOffsetFromPosition: (row: number, col: number, lines: string[]) => number;
24
11
  export declare const getPositionFromOffsets: (startOffset: number, endOffset: number, lines: string[]) => {
25
12
  startRow: number;
26
13
  startCol: number;
@@ -4,7 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import stripAnsi from 'strip-ansi';
7
- import { stripVTControlCharacters } from 'util';
8
7
  import { spawnSync } from 'child_process';
9
8
  import fs from 'fs';
10
9
  import os from 'os';
@@ -21,266 +20,112 @@ function isWordChar(ch) {
21
20
  }
22
21
  return !/[\s,.;!?]/.test(ch);
23
22
  }
24
- // Helper functions for line-based word navigation
25
- 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
26
- export const isWhitespace = (char) => /\s/.test(char);
27
- // Check if a character is a combining mark (only diacritics for now)
28
- export const isCombiningMark = (char) => /\p{M}/u.test(char);
29
- // Check if a character should be considered part of a word (including combining marks)
30
- export const isWordCharWithCombining = (char) => isWordCharStrict(char) || isCombiningMark(char);
31
- // Get the script of a character (simplified for common scripts)
32
- export const getCharScript = (char) => {
33
- if (/[\p{Script=Latin}]/u.test(char))
34
- return 'latin'; // All Latin script chars including diacritics
35
- if (/[\p{Script=Han}]/u.test(char))
36
- return 'han'; // Chinese
37
- if (/[\p{Script=Arabic}]/u.test(char))
38
- return 'arabic';
39
- if (/[\p{Script=Hiragana}]/u.test(char))
40
- return 'hiragana';
41
- if (/[\p{Script=Katakana}]/u.test(char))
42
- return 'katakana';
43
- if (/[\p{Script=Cyrillic}]/u.test(char))
44
- return 'cyrillic';
45
- return 'other';
46
- };
47
- // Check if two characters are from different scripts (indicating word boundary)
48
- export const isDifferentScript = (char1, char2) => {
49
- if (!isWordCharStrict(char1) || !isWordCharStrict(char2))
50
- return false;
51
- return getCharScript(char1) !== getCharScript(char2);
52
- };
53
- // Find next word start within a line, starting from col
54
- export const findNextWordStartInLine = (line, col) => {
55
- const chars = toCodePoints(line);
56
- let i = col;
57
- if (i >= chars.length)
58
- return null;
59
- const currentChar = chars[i];
23
+ // Vim-specific word boundary functions
24
+ export const findNextWordStart = (text, currentOffset) => {
25
+ let i = currentOffset;
26
+ if (i >= text.length)
27
+ return i;
28
+ const currentChar = text[i];
60
29
  // Skip current word/sequence based on character type
61
- if (isWordCharStrict(currentChar)) {
62
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
63
- // Check for script boundary - if next character is from different script, stop here
64
- if (i + 1 < chars.length &&
65
- isWordCharStrict(chars[i + 1]) &&
66
- isDifferentScript(chars[i], chars[i + 1])) {
67
- i++; // Include current character
68
- break; // Stop at script boundary
69
- }
30
+ if (/\w/.test(currentChar)) {
31
+ // Skip current word characters
32
+ while (i < text.length && /\w/.test(text[i])) {
70
33
  i++;
71
34
  }
72
35
  }
73
- else if (!isWhitespace(currentChar)) {
74
- while (i < chars.length &&
75
- !isWordCharStrict(chars[i]) &&
76
- !isWhitespace(chars[i])) {
36
+ else if (!/\s/.test(currentChar)) {
37
+ // Skip current non-word, non-whitespace characters (like "/", ".", etc.)
38
+ while (i < text.length && !/\w/.test(text[i]) && !/\s/.test(text[i])) {
77
39
  i++;
78
40
  }
79
41
  }
80
42
  // Skip whitespace
81
- while (i < chars.length && isWhitespace(chars[i])) {
43
+ while (i < text.length && /\s/.test(text[i])) {
82
44
  i++;
83
45
  }
84
- return i < chars.length ? i : null;
46
+ // If we reached the end of text and there's no next word,
47
+ // vim behavior for dw is to delete to the end of the current word
48
+ if (i >= text.length) {
49
+ // Go back to find the end of the last word
50
+ let endOfLastWord = text.length - 1;
51
+ while (endOfLastWord >= 0 && /\s/.test(text[endOfLastWord])) {
52
+ endOfLastWord--;
53
+ }
54
+ // For dw on last word, return position AFTER the last character to delete entire word
55
+ return Math.max(currentOffset + 1, endOfLastWord + 1);
56
+ }
57
+ return i;
85
58
  };
86
- // Find previous word start within a line
87
- export const findPrevWordStartInLine = (line, col) => {
88
- const chars = toCodePoints(line);
89
- let i = col;
90
- if (i <= 0)
91
- return null;
59
+ export const findPrevWordStart = (text, currentOffset) => {
60
+ let i = currentOffset;
61
+ // If at beginning of text, return current position
62
+ if (i <= 0) {
63
+ return currentOffset;
64
+ }
65
+ // Move back one character to start searching
92
66
  i--;
93
67
  // Skip whitespace moving backwards
94
- while (i >= 0 && isWhitespace(chars[i])) {
68
+ while (i >= 0 && (text[i] === ' ' || text[i] === '\t' || text[i] === '\n')) {
95
69
  i--;
96
70
  }
97
- if (i < 0)
98
- return null;
99
- if (isWordCharStrict(chars[i])) {
71
+ if (i < 0) {
72
+ return 0; // Reached beginning of text
73
+ }
74
+ const charAtI = text[i];
75
+ if (/\w/.test(charAtI)) {
100
76
  // We're in a word, move to its beginning
101
- while (i >= 0 && isWordCharStrict(chars[i])) {
102
- // Check for script boundary - if previous character is from different script, stop here
103
- if (i - 1 >= 0 &&
104
- isWordCharStrict(chars[i - 1]) &&
105
- isDifferentScript(chars[i], chars[i - 1])) {
106
- return i; // Return current position at script boundary
107
- }
77
+ while (i >= 0 && /\w/.test(text[i])) {
108
78
  i--;
109
79
  }
110
- return i + 1;
80
+ return i + 1; // Return first character of word
111
81
  }
112
82
  else {
113
83
  // We're in punctuation, move to its beginning
114
- while (i >= 0 && !isWordCharStrict(chars[i]) && !isWhitespace(chars[i])) {
84
+ while (i >= 0 &&
85
+ !/\w/.test(text[i]) &&
86
+ text[i] !== ' ' &&
87
+ text[i] !== '\t' &&
88
+ text[i] !== '\n') {
115
89
  i--;
116
90
  }
117
- return i + 1;
91
+ return i + 1; // Return first character of punctuation sequence
118
92
  }
119
93
  };
120
- // Find word end within a line
121
- export const findWordEndInLine = (line, col) => {
122
- const chars = toCodePoints(line);
123
- let i = col;
124
- // If we're already at the end of a word (including punctuation sequences), advance to next word
125
- // This includes both regular word endings and script boundaries
126
- const atEndOfWordChar = i < chars.length &&
127
- isWordCharWithCombining(chars[i]) &&
128
- (i + 1 >= chars.length ||
129
- !isWordCharWithCombining(chars[i + 1]) ||
130
- (isWordCharStrict(chars[i]) &&
131
- i + 1 < chars.length &&
132
- isWordCharStrict(chars[i + 1]) &&
133
- isDifferentScript(chars[i], chars[i + 1])));
134
- const atEndOfPunctuation = i < chars.length &&
135
- !isWordCharWithCombining(chars[i]) &&
136
- !isWhitespace(chars[i]) &&
137
- (i + 1 >= chars.length ||
138
- isWhitespace(chars[i + 1]) ||
139
- isWordCharWithCombining(chars[i + 1]));
140
- if (atEndOfWordChar || atEndOfPunctuation) {
141
- // We're at the end of a word or punctuation sequence, move forward to find next word
94
+ export const findWordEnd = (text, currentOffset) => {
95
+ let i = currentOffset;
96
+ // If we're already at the end of a word, advance to next word
97
+ if (i < text.length &&
98
+ /\w/.test(text[i]) &&
99
+ (i + 1 >= text.length || !/\w/.test(text[i + 1]))) {
100
+ // We're at the end of a word, move forward to find next word
142
101
  i++;
143
- // Skip whitespace to find next word or punctuation
144
- while (i < chars.length && isWhitespace(chars[i])) {
102
+ // Skip whitespace/punctuation to find next word
103
+ while (i < text.length && !/\w/.test(text[i])) {
145
104
  i++;
146
105
  }
147
106
  }
148
- // If we're not on a word character, find the next word or punctuation sequence
149
- if (i < chars.length && !isWordCharWithCombining(chars[i])) {
150
- // Skip whitespace to find next word or punctuation
151
- while (i < chars.length && isWhitespace(chars[i])) {
107
+ // If we're not on a word character, find the next word
108
+ if (i < text.length && !/\w/.test(text[i])) {
109
+ while (i < text.length && !/\w/.test(text[i])) {
152
110
  i++;
153
111
  }
154
112
  }
155
- // Move to end of current word (including combining marks, but stop at script boundaries)
156
- let foundWord = false;
157
- let lastBaseCharPos = -1;
158
- if (i < chars.length && isWordCharWithCombining(chars[i])) {
159
- // Handle word characters
160
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
161
- foundWord = true;
162
- // Track the position of the last base character (not combining mark)
163
- if (isWordCharStrict(chars[i])) {
164
- lastBaseCharPos = i;
165
- }
166
- // Check if next character is from a different script (word boundary)
167
- if (i + 1 < chars.length &&
168
- isWordCharStrict(chars[i + 1]) &&
169
- isDifferentScript(chars[i], chars[i + 1])) {
170
- i++; // Include current character
171
- if (isWordCharStrict(chars[i - 1])) {
172
- lastBaseCharPos = i - 1;
173
- }
174
- break; // Stop at script boundary
175
- }
176
- i++;
177
- }
178
- }
179
- else if (i < chars.length && !isWhitespace(chars[i])) {
180
- // Handle punctuation sequences (like ████)
181
- while (i < chars.length &&
182
- !isWordCharStrict(chars[i]) &&
183
- !isWhitespace(chars[i])) {
184
- foundWord = true;
185
- lastBaseCharPos = i;
186
- i++;
187
- }
188
- }
189
- // Only return a position if we actually found a word
190
- // Return the position of the last base character, not combining marks
191
- if (foundWord && lastBaseCharPos >= col) {
192
- return lastBaseCharPos;
193
- }
194
- return null;
195
- };
196
- // Find next word across lines
197
- export const findNextWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
198
- // First try current line
199
- const currentLine = lines[cursorRow] || '';
200
- const colInCurrentLine = searchForWordStart
201
- ? findNextWordStartInLine(currentLine, cursorCol)
202
- : findWordEndInLine(currentLine, cursorCol);
203
- if (colInCurrentLine !== null) {
204
- return { row: cursorRow, col: colInCurrentLine };
205
- }
206
- // Search subsequent lines
207
- for (let row = cursorRow + 1; row < lines.length; row++) {
208
- const line = lines[row] || '';
209
- const chars = toCodePoints(line);
210
- // For empty lines, if we haven't found any words yet, return the empty line
211
- if (chars.length === 0) {
212
- // Check if there are any words in remaining lines
213
- let hasWordsInLaterLines = false;
214
- for (let laterRow = row + 1; laterRow < lines.length; laterRow++) {
215
- const laterLine = lines[laterRow] || '';
216
- const laterChars = toCodePoints(laterLine);
217
- let firstNonWhitespace = 0;
218
- while (firstNonWhitespace < laterChars.length &&
219
- isWhitespace(laterChars[firstNonWhitespace])) {
220
- firstNonWhitespace++;
221
- }
222
- if (firstNonWhitespace < laterChars.length) {
223
- hasWordsInLaterLines = true;
224
- break;
225
- }
226
- }
227
- // If no words in later lines, return the empty line
228
- if (!hasWordsInLaterLines) {
229
- return { row, col: 0 };
230
- }
231
- continue;
232
- }
233
- // Find first non-whitespace
234
- let firstNonWhitespace = 0;
235
- while (firstNonWhitespace < chars.length &&
236
- isWhitespace(chars[firstNonWhitespace])) {
237
- firstNonWhitespace++;
238
- }
239
- if (firstNonWhitespace < chars.length) {
240
- if (searchForWordStart) {
241
- return { row, col: firstNonWhitespace };
242
- }
243
- else {
244
- // For word end, find the end of the first word
245
- const endCol = findWordEndInLine(line, firstNonWhitespace);
246
- if (endCol !== null) {
247
- return { row, col: endCol };
248
- }
249
- }
250
- }
113
+ // Move to end of current word
114
+ while (i < text.length && /\w/.test(text[i])) {
115
+ i++;
251
116
  }
252
- return null;
117
+ // Move back one to be on the last character of the word
118
+ return Math.max(currentOffset, i - 1);
253
119
  };
254
- // Find previous word across lines
255
- export const findPrevWordAcrossLines = (lines, cursorRow, cursorCol) => {
256
- // First try current line
257
- const currentLine = lines[cursorRow] || '';
258
- const colInCurrentLine = findPrevWordStartInLine(currentLine, cursorCol);
259
- if (colInCurrentLine !== null) {
260
- return { row: cursorRow, col: colInCurrentLine };
261
- }
262
- // Search previous lines
263
- for (let row = cursorRow - 1; row >= 0; row--) {
264
- const line = lines[row] || '';
265
- const chars = toCodePoints(line);
266
- if (chars.length === 0)
267
- continue;
268
- // Find last word start
269
- let lastWordStart = chars.length;
270
- while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
271
- lastWordStart--;
272
- }
273
- if (lastWordStart > 0) {
274
- // Find start of this word
275
- const wordStart = findPrevWordStartInLine(line, lastWordStart);
276
- if (wordStart !== null) {
277
- return { row, col: wordStart };
278
- }
279
- }
120
+ // Helper functions for vim operations
121
+ export const getOffsetFromPosition = (row, col, lines) => {
122
+ let offset = 0;
123
+ for (let i = 0; i < row; i++) {
124
+ offset += lines[i].length + 1; // +1 for newline
280
125
  }
281
- return null;
126
+ offset += col;
127
+ return offset;
282
128
  };
283
- // Helper functions for vim line operations
284
129
  export const getPositionFromOffsets = (startOffset, endOffset, lines) => {
285
130
  let offset = 0;
286
131
  let startRow = 0;
@@ -376,42 +221,21 @@ export const replaceRangeInternal = (state, startRow, startCol, endRow, endCol,
376
221
  /**
377
222
  * Strip characters that can break terminal rendering.
378
223
  *
379
- * Uses Node.js built-in stripVTControlCharacters to handle VT sequences,
380
- * then filters remaining control characters that can disrupt display.
381
- *
382
- * Characters stripped:
383
- * - ANSI escape sequences (via strip-ansi)
384
- * - VT control sequences (via Node.js util.stripVTControlCharacters)
385
- * - C0 control chars (0x00-0x1F) except CR/LF which are handled elsewhere
386
- * - C1 control chars (0x80-0x9F) that can cause display issues
387
- *
388
- * Characters preserved:
389
- * - All printable Unicode including emojis
390
- * - DEL (0x7F) - handled functionally by applyOperations, not a display issue
391
- * - CR/LF (0x0D/0x0A) - needed for line breaks
224
+ * Strip ANSI escape codes and control characters except for line breaks.
225
+ * Control characters such as delete break terminal UI rendering.
392
226
  */
393
227
  function stripUnsafeCharacters(str) {
394
- const strippedAnsi = stripAnsi(str);
395
- const strippedVT = stripVTControlCharacters(strippedAnsi);
396
- return toCodePoints(strippedVT)
228
+ const stripped = stripAnsi(str);
229
+ return toCodePoints(stripped)
397
230
  .filter((char) => {
398
- const code = char.codePointAt(0);
399
- if (code === undefined)
231
+ if (char.length > 1)
400
232
  return false;
401
- // Preserve CR/LF for line handling
402
- if (code === 0x0a || code === 0x0d)
403
- return true;
404
- // Remove C0 control chars (except CR/LF) that can break display
405
- // Examples: BELL(0x07) makes noise, BS(0x08) moves cursor, VT(0x0B), FF(0x0C)
406
- if (code >= 0x00 && code <= 0x1f)
407
- return false;
408
- // Remove C1 control chars (0x80-0x9F) - legacy 8-bit control codes
409
- if (code >= 0x80 && code <= 0x9f)
233
+ const code = char.codePointAt(0);
234
+ if (code === undefined) {
410
235
  return false;
411
- // Preserve DEL (0x7F) - it's handled functionally by applyOperations as backspace
412
- // and doesn't cause rendering issues when displayed
413
- // Preserve all other characters including Unicode/emojis
414
- return true;
236
+ }
237
+ const isUnsafe = code === 127 || (code <= 31 && code !== 13 && code !== 10);
238
+ return !isUnsafe;
415
239
  })
416
240
  .join('');
417
241
  }
@@ -1395,12 +1219,6 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
1395
1219
  }, [text, stdin, setRawMode]);
1396
1220
  const handleInput = useCallback((key) => {
1397
1221
  const { sequence: input } = key;
1398
- if (key.paste) {
1399
- // Do not do any other processing on pastes so ensure we handle them
1400
- // before all other cases.
1401
- insert(input, { paste: key.paste });
1402
- return;
1403
- }
1404
1222
  if (key.name === 'return' ||
1405
1223
  input === '\r' ||
1406
1224
  input === '\n' ||