@quantum-ai/gemini-cli 0.45.4 → 0.45.6

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 (1961) hide show
  1. package/README.md +394 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/package.json +17 -14
  5. package/dist/src/acp/acpCommandHandler.js.map +1 -1
  6. package/dist/src/acp/acpErrors.js.map +1 -1
  7. package/dist/src/acp/acpFileSystemService.js.map +1 -1
  8. package/dist/src/acp/acpRpcDispatcher.js.map +1 -1
  9. package/dist/src/acp/acpSession.js.map +1 -1
  10. package/dist/src/acp/acpSessionManager.js.map +1 -1
  11. package/dist/src/acp/acpUtils.js.map +1 -1
  12. package/dist/src/acp/commands/about.js.map +1 -1
  13. package/dist/src/acp/commands/commandRegistry.js.map +1 -1
  14. package/dist/src/acp/commands/extensions.js.map +1 -1
  15. package/dist/src/acp/commands/help.js.map +1 -1
  16. package/dist/src/acp/commands/init.js.map +1 -1
  17. package/dist/src/acp/commands/memory.js.map +1 -1
  18. package/dist/src/acp/commands/restore.js.map +1 -1
  19. package/dist/src/commands/extensions/configure.js.map +1 -1
  20. package/dist/src/commands/extensions/disable.js.map +1 -1
  21. package/dist/src/commands/extensions/enable.js.map +1 -1
  22. package/dist/src/commands/extensions/install.js.map +1 -1
  23. package/dist/src/commands/extensions/link.js.map +1 -1
  24. package/dist/src/commands/extensions/list.js.map +1 -1
  25. package/dist/src/commands/extensions/new.js.map +1 -1
  26. package/dist/src/commands/extensions/uninstall.js.map +1 -1
  27. package/dist/src/commands/extensions/update.js.map +1 -1
  28. package/dist/src/commands/extensions/utils.js.map +1 -1
  29. package/dist/src/commands/extensions/validate.js.map +1 -1
  30. package/dist/src/commands/gemma/logs.js.map +1 -1
  31. package/dist/src/commands/gemma/platform.js.map +1 -1
  32. package/dist/src/commands/gemma/setup.js.map +1 -1
  33. package/dist/src/commands/gemma/start.js.map +1 -1
  34. package/dist/src/commands/gemma/status.js.map +1 -1
  35. package/dist/src/commands/gemma/stop.js.map +1 -1
  36. package/dist/src/commands/hooks/migrate.js +1 -1
  37. package/dist/src/commands/hooks/migrate.js.map +1 -1
  38. package/dist/src/commands/mcp/add.js +1 -1
  39. package/dist/src/commands/mcp/add.js.map +1 -1
  40. package/dist/src/commands/mcp/enableDisable.js.map +1 -1
  41. package/dist/src/commands/mcp/list.js.map +1 -1
  42. package/dist/src/commands/mcp/remove.js.map +1 -1
  43. package/dist/src/commands/skills/install.js.map +1 -1
  44. package/dist/src/commands/skills/link.js.map +1 -1
  45. package/dist/src/commands/skills/list.js.map +1 -1
  46. package/dist/src/commands/skills/uninstall.js.map +1 -1
  47. package/dist/src/config/auth.js.map +1 -1
  48. package/dist/src/config/config.js.map +1 -1
  49. package/dist/src/config/extension-manager-themes.spec.js.map +1 -1
  50. package/dist/src/config/extension-manager.d.ts +1 -0
  51. package/dist/src/config/extension-manager.js.map +1 -1
  52. package/dist/src/config/extension.js.map +1 -1
  53. package/dist/src/config/extensionRegistryClient.js +2 -1
  54. package/dist/src/config/extensionRegistryClient.js.map +1 -1
  55. package/dist/src/config/extensions/consent.js.map +1 -1
  56. package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
  57. package/dist/src/config/extensions/extensionSettings.js +1 -1
  58. package/dist/src/config/extensions/extensionSettings.js.map +1 -1
  59. package/dist/src/config/extensions/github.js.map +1 -1
  60. package/dist/src/config/extensions/github_fetch.js.map +1 -1
  61. package/dist/src/config/extensions/update.js.map +1 -1
  62. package/dist/src/config/extensions/variables.js.map +1 -1
  63. package/dist/src/config/footerItems.js.map +1 -1
  64. package/dist/src/config/mcp/mcpServerEnablement.js +2 -1
  65. package/dist/src/config/mcp/mcpServerEnablement.js.map +1 -1
  66. package/dist/src/config/policy.js.map +1 -1
  67. package/dist/src/config/sandboxConfig.js.map +1 -1
  68. package/dist/src/config/settings-validation.js.map +1 -1
  69. package/dist/src/config/settings.js +1 -1
  70. package/dist/src/config/settings.js.map +1 -1
  71. package/dist/src/config/settingsSchema.d.ts +38 -21
  72. package/dist/src/config/settingsSchema.js +7 -7
  73. package/dist/src/config/settingsSchema.js.map +1 -1
  74. package/dist/src/core/auth.js.map +1 -1
  75. package/dist/src/core/initializer.js.map +1 -1
  76. package/dist/src/core/theme.js.map +1 -1
  77. package/dist/src/deferred.js.map +1 -1
  78. package/dist/src/gemini.js.map +1 -1
  79. package/dist/src/index.d.ts +1 -0
  80. package/dist/src/index.js +1 -0
  81. package/dist/src/index.js.map +1 -1
  82. package/dist/src/interactiveCli.js.map +1 -1
  83. package/dist/src/nonInteractiveCli.js.map +1 -1
  84. package/dist/src/nonInteractiveCliAgentSession.js.map +1 -1
  85. package/dist/src/nonInteractiveCliCommands.js.map +1 -1
  86. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  87. package/dist/src/services/CommandService.js.map +1 -1
  88. package/dist/src/services/FileCommandLoader.js.map +1 -1
  89. package/dist/src/services/McpPromptLoader.js.map +1 -1
  90. package/dist/src/services/SkillCommandLoader.js.map +1 -1
  91. package/dist/src/services/SlashCommandConflictHandler.js.map +1 -1
  92. package/dist/src/services/SlashCommandResolver.js.map +1 -1
  93. package/dist/src/services/liteRtServerManager.js.map +1 -1
  94. package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -1
  95. package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -1
  96. package/dist/src/services/prompt-processors/injectionParser.js.map +1 -1
  97. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
  98. package/dist/src/test-utils/AppRig.js.map +1 -1
  99. package/dist/src/test-utils/MockShellExecutionService.js +2 -1
  100. package/dist/src/test-utils/MockShellExecutionService.js.map +1 -1
  101. package/dist/src/test-utils/async.js.map +1 -1
  102. package/dist/src/test-utils/createExtension.js.map +1 -1
  103. package/dist/src/test-utils/customMatchers.js.map +1 -1
  104. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  105. package/dist/src/test-utils/mockDebugLogger.js.map +1 -1
  106. package/dist/src/test-utils/render.js.map +1 -1
  107. package/dist/src/test-utils/settings.js.map +1 -1
  108. package/dist/src/test-utils/svg.js.map +1 -1
  109. package/dist/src/ui/App.d.ts +1 -1
  110. package/dist/src/ui/App.js.map +1 -1
  111. package/dist/src/ui/AppContainer.d.ts +1 -1
  112. package/dist/src/ui/AppContainer.js.map +1 -1
  113. package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
  114. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  115. package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
  116. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  117. package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
  118. package/dist/src/ui/auth/BannedAccountDialog.js.map +1 -1
  119. package/dist/src/ui/auth/LoginRestartDialog.d.ts +1 -1
  120. package/dist/src/ui/auth/LoginRestartDialog.js.map +1 -1
  121. package/dist/src/ui/auth/useAuth.d.ts +1 -0
  122. package/dist/src/ui/auth/useAuth.js.map +1 -1
  123. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  124. package/dist/src/ui/commands/agentsCommand.js.map +1 -1
  125. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  126. package/dist/src/ui/commands/bugMemoryCommand.js.map +1 -1
  127. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  128. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  129. package/dist/src/ui/commands/commandsCommand.js.map +1 -1
  130. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  131. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  132. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  133. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  134. package/dist/src/ui/commands/exportSessionCommand.js.map +1 -1
  135. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  136. package/dist/src/ui/commands/helpCommand.js.map +1 -1
  137. package/dist/src/ui/commands/hooksCommand.js.map +1 -1
  138. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  139. package/dist/src/ui/commands/initCommand.js.map +1 -1
  140. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  141. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  142. package/dist/src/ui/commands/modelCommand.js.map +1 -1
  143. package/dist/src/ui/commands/oncallCommand.js.map +1 -1
  144. package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
  145. package/dist/src/ui/commands/planCommand.js.map +1 -1
  146. package/dist/src/ui/commands/policiesCommand.js.map +1 -1
  147. package/dist/src/ui/commands/quitCommand.js +1 -1
  148. package/dist/src/ui/commands/quitCommand.js.map +1 -1
  149. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  150. package/dist/src/ui/commands/rewindCommand.js.map +1 -1
  151. package/dist/src/ui/commands/setupGithubCommand.js +3 -3
  152. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  153. package/dist/src/ui/commands/skillsCommand.js.map +1 -1
  154. package/dist/src/ui/commands/statsCommand.js.map +1 -1
  155. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
  156. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  157. package/dist/src/ui/commands/types.js +1 -1
  158. package/dist/src/ui/commands/types.js.map +1 -1
  159. package/dist/src/ui/commands/upgradeCommand.js.map +1 -1
  160. package/dist/src/ui/components/AdminSettingsChangedDialog.d.ts +1 -1
  161. package/dist/src/ui/components/AdminSettingsChangedDialog.js.map +1 -1
  162. package/dist/src/ui/components/AgentConfigDialog.js.map +1 -1
  163. package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +1 -1
  164. package/dist/src/ui/components/AppHeader.d.ts +1 -1
  165. package/dist/src/ui/components/AppHeader.js.map +1 -1
  166. package/dist/src/ui/components/ApprovalModeIndicator.js.map +1 -1
  167. package/dist/src/ui/components/AskUserDialog.js +12 -12
  168. package/dist/src/ui/components/AskUserDialog.js.map +1 -1
  169. package/dist/src/ui/components/BackgroundTaskDisplay.d.ts +1 -1
  170. package/dist/src/ui/components/BackgroundTaskDisplay.js.map +1 -1
  171. package/dist/src/ui/components/Banner.d.ts +1 -1
  172. package/dist/src/ui/components/Banner.js.map +1 -1
  173. package/dist/src/ui/components/Checklist.js.map +1 -1
  174. package/dist/src/ui/components/ChecklistItem.js.map +1 -1
  175. package/dist/src/ui/components/CliSpinner.d.ts +1 -1
  176. package/dist/src/ui/components/CliSpinner.js.map +1 -1
  177. package/dist/src/ui/components/ColorsDisplay.js.map +1 -1
  178. package/dist/src/ui/components/Composer.d.ts +2 -2
  179. package/dist/src/ui/components/Composer.js.map +1 -1
  180. package/dist/src/ui/components/ConfigExtensionDialog.js.map +1 -1
  181. package/dist/src/ui/components/ConfigInitDisplay.d.ts +1 -1
  182. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
  183. package/dist/src/ui/components/ConsentPrompt.d.ts +1 -1
  184. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -1
  185. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  186. package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
  187. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
  188. package/dist/src/ui/components/DebugProfiler.d.ts +1 -1
  189. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  190. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
  191. package/dist/src/ui/components/DialogManager.d.ts +1 -1
  192. package/dist/src/ui/components/DialogManager.js.map +1 -1
  193. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  194. package/dist/src/ui/components/EmptyWalletDialog.js.map +1 -1
  195. package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
  196. package/dist/src/ui/components/FolderTrustDialog.js +1 -1
  197. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  198. package/dist/src/ui/components/Footer.js.map +1 -1
  199. package/dist/src/ui/components/FooterConfigDialog.js.map +1 -1
  200. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
  201. package/dist/src/ui/components/GeminiSpinner.js.map +1 -1
  202. package/dist/src/ui/components/Header.js.map +1 -1
  203. package/dist/src/ui/components/HookStatusDisplay.js.map +1 -1
  204. package/dist/src/ui/components/HooksDialog.js.map +1 -1
  205. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +1 -1
  206. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
  207. package/dist/src/ui/components/InboxDialog.js.map +1 -1
  208. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  209. package/dist/src/ui/components/ListeningIndicator.js.map +1 -1
  210. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  211. package/dist/src/ui/components/LogoutConfirmationDialog.js +1 -1
  212. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -1
  213. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +1 -1
  214. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
  215. package/dist/src/ui/components/MainContent.d.ts +1 -1
  216. package/dist/src/ui/components/MainContent.js.map +1 -1
  217. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
  218. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  219. package/dist/src/ui/components/ModelQuotaDisplay.d.ts +1 -1
  220. package/dist/src/ui/components/ModelQuotaDisplay.js.map +1 -1
  221. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
  222. package/dist/src/ui/components/MultiFolderTrustDialog.js +1 -1
  223. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
  224. package/dist/src/ui/components/NewAgentsNotification.d.ts +1 -1
  225. package/dist/src/ui/components/NewAgentsNotification.js +1 -1
  226. package/dist/src/ui/components/NewAgentsNotification.js.map +1 -1
  227. package/dist/src/ui/components/Notifications.d.ts +1 -1
  228. package/dist/src/ui/components/Notifications.js.map +1 -1
  229. package/dist/src/ui/components/OverageMenuDialog.js.map +1 -1
  230. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
  231. package/dist/src/ui/components/PolicyUpdateDialog.js +1 -1
  232. package/dist/src/ui/components/PolicyUpdateDialog.js.map +1 -1
  233. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  234. package/dist/src/ui/components/ProgressBar.js.map +1 -1
  235. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +1 -1
  236. package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -1
  237. package/dist/src/ui/components/QuittingDisplay.d.ts +1 -1
  238. package/dist/src/ui/components/QuittingDisplay.js.map +1 -1
  239. package/dist/src/ui/components/QuotaDisplay.js.map +1 -1
  240. package/dist/src/ui/components/QuotaStatsInfo.js.map +1 -1
  241. package/dist/src/ui/components/RewindConfirmation.js +1 -1
  242. package/dist/src/ui/components/RewindConfirmation.js.map +1 -1
  243. package/dist/src/ui/components/RewindViewer.js.map +1 -1
  244. package/dist/src/ui/components/SessionBrowser/utils.d.ts +2 -2
  245. package/dist/src/ui/components/SessionBrowser/utils.js.map +1 -1
  246. package/dist/src/ui/components/SessionBrowser.js.map +1 -1
  247. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
  248. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  249. package/dist/src/ui/components/ShellInputPrompt.js.map +1 -1
  250. package/dist/src/ui/components/ShowMoreLines.d.ts +1 -1
  251. package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
  252. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  253. package/dist/src/ui/components/StatusDisplay.js.map +1 -1
  254. package/dist/src/ui/components/StatusRow.js.map +1 -1
  255. package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -1
  256. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  257. package/dist/src/ui/components/Table.d.ts +1 -1
  258. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  259. package/dist/src/ui/components/ThemedGradient.js.map +1 -1
  260. package/dist/src/ui/components/ToastDisplay.js.map +1 -1
  261. package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
  262. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
  263. package/dist/src/ui/components/UpdateNotification.d.ts +1 -1
  264. package/dist/src/ui/components/UserIdentity.js.map +1 -1
  265. package/dist/src/ui/components/ValidationDialog.js.map +1 -1
  266. package/dist/src/ui/components/VoiceModelDialog.js.map +1 -1
  267. package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -0
  268. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
  269. package/dist/src/ui/components/messages/DenseToolMessage.js.map +1 -1
  270. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  271. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
  272. package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +1 -1
  273. package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +1 -1
  274. package/dist/src/ui/components/messages/ThinkingMessage.js.map +1 -1
  275. package/dist/src/ui/components/messages/Todo.js.map +1 -1
  276. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  277. package/dist/src/ui/components/messages/ToolGroupDisplay.js.map +1 -1
  278. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  279. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
  280. package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
  281. package/dist/src/ui/components/messages/TopicMessage.js.map +1 -1
  282. package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -1
  283. package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
  284. package/dist/src/ui/components/shared/DialogFooter.js.map +1 -1
  285. package/dist/src/ui/components/shared/EnumSelector.d.ts +1 -1
  286. package/dist/src/ui/components/shared/EnumSelector.js.map +1 -1
  287. package/dist/src/ui/components/shared/ExpandableText.js.map +1 -1
  288. package/dist/src/ui/components/shared/HalfLinePaddedBox.js.map +1 -1
  289. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
  290. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
  291. package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
  292. package/dist/src/ui/components/shared/ScrollableList.d.ts +1 -1
  293. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
  294. package/dist/src/ui/components/shared/SearchableList.js.map +1 -1
  295. package/dist/src/ui/components/shared/SlicingMaxSizedBox.d.ts +2 -1
  296. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js.map +1 -1
  297. package/dist/src/ui/components/shared/TabHeader.js.map +1 -1
  298. package/dist/src/ui/components/shared/TextInput.js.map +1 -1
  299. package/dist/src/ui/components/shared/VirtualizedList.d.ts +1 -1
  300. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
  301. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
  302. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  303. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
  304. package/dist/src/ui/components/triage/TriageDuplicates.d.ts +2 -2
  305. package/dist/src/ui/components/triage/TriageDuplicates.js +2 -2
  306. package/dist/src/ui/components/triage/TriageDuplicates.js.map +1 -1
  307. package/dist/src/ui/components/triage/TriageIssues.d.ts +3 -3
  308. package/dist/src/ui/components/triage/TriageIssues.js.map +1 -1
  309. package/dist/src/ui/components/views/AgentsStatus.js.map +1 -1
  310. package/dist/src/ui/components/views/ChatList.js.map +1 -1
  311. package/dist/src/ui/components/views/ExtensionDetails.js.map +1 -1
  312. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -1
  313. package/dist/src/ui/components/views/ExtensionsList.js.map +1 -1
  314. package/dist/src/ui/components/views/McpStatus.js.map +1 -1
  315. package/dist/src/ui/components/views/SkillsList.js.map +1 -1
  316. package/dist/src/ui/constants.js +2 -2
  317. package/dist/src/ui/constants.js.map +1 -1
  318. package/dist/src/ui/contexts/AppContext.d.ts +1 -0
  319. package/dist/src/ui/contexts/AppContext.js.map +1 -1
  320. package/dist/src/ui/contexts/AskUserActionsContext.js.map +1 -1
  321. package/dist/src/ui/contexts/ConfigContext.js.map +1 -1
  322. package/dist/src/ui/contexts/InputContext.d.ts +1 -0
  323. package/dist/src/ui/contexts/InputContext.js.map +1 -1
  324. package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
  325. package/dist/src/ui/contexts/KeypressContext.js +9 -9
  326. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  327. package/dist/src/ui/contexts/MouseContext.d.ts +1 -1
  328. package/dist/src/ui/contexts/MouseContext.js.map +1 -1
  329. package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
  330. package/dist/src/ui/contexts/QuotaContext.d.ts +1 -0
  331. package/dist/src/ui/contexts/QuotaContext.js.map +1 -1
  332. package/dist/src/ui/contexts/ScrollProvider.d.ts +1 -1
  333. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -1
  334. package/dist/src/ui/contexts/SessionContext.js +1 -1
  335. package/dist/src/ui/contexts/SessionContext.js.map +1 -1
  336. package/dist/src/ui/contexts/SettingsContext.js.map +1 -1
  337. package/dist/src/ui/contexts/ShellFocusContext.d.ts +1 -0
  338. package/dist/src/ui/contexts/StreamingContext.js.map +1 -1
  339. package/dist/src/ui/contexts/TerminalContext.d.ts +1 -1
  340. package/dist/src/ui/contexts/TerminalContext.js.map +1 -1
  341. package/dist/src/ui/contexts/ToolActionsContext.js.map +1 -1
  342. package/dist/src/ui/contexts/UIActionsContext.d.ts +1 -0
  343. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  344. package/dist/src/ui/contexts/UIStateContext.d.ts +1 -0
  345. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  346. package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
  347. package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
  348. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  349. package/dist/src/ui/hooks/creditsFlowHandler.d.ts +1 -0
  350. package/dist/src/ui/hooks/creditsFlowHandler.js.map +1 -1
  351. package/dist/src/ui/hooks/shell-completions/gitProvider.js.map +1 -1
  352. package/dist/src/ui/hooks/shell-completions/index.js.map +1 -1
  353. package/dist/src/ui/hooks/shell-completions/npmProvider.js.map +1 -1
  354. package/dist/src/ui/hooks/shellReducer.js.map +1 -1
  355. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
  356. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  357. package/dist/src/ui/hooks/toolMapping.js.map +1 -1
  358. package/dist/src/ui/hooks/useAgentStream.js.map +1 -1
  359. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
  360. package/dist/src/ui/hooks/useApprovalModeIndicator.js.map +1 -1
  361. package/dist/src/ui/hooks/useAtCompletion.js +1 -1
  362. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  363. package/dist/src/ui/hooks/useBackgroundTaskManager.d.ts +1 -0
  364. package/dist/src/ui/hooks/useBackgroundTaskManager.js.map +1 -1
  365. package/dist/src/ui/hooks/useBanner.js.map +1 -1
  366. package/dist/src/ui/hooks/useCommandCompletion.js +1 -1
  367. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  368. package/dist/src/ui/hooks/useCompletion.d.ts +1 -0
  369. package/dist/src/ui/hooks/useCompletion.js.map +1 -1
  370. package/dist/src/ui/hooks/useComposerStatus.js.map +1 -1
  371. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  372. package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
  373. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
  374. package/dist/src/ui/hooks/useExecutionLifecycle.d.ts +1 -1
  375. package/dist/src/ui/hooks/useExecutionLifecycle.js.map +1 -1
  376. package/dist/src/ui/hooks/useExtensionRegistry.js.map +1 -1
  377. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +4 -3
  378. package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
  379. package/dist/src/ui/hooks/useFlickerDetector.d.ts +1 -0
  380. package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -1
  381. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  382. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  383. package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
  384. package/dist/src/ui/hooks/useGeminiStream.js +1 -1
  385. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  386. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
  387. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
  388. package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -1
  389. package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -1
  390. package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -1
  391. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +1 -0
  392. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
  393. package/dist/src/ui/hooks/useInlineEditBuffer.d.ts +2 -1
  394. package/dist/src/ui/hooks/useInlineEditBuffer.js.map +1 -1
  395. package/dist/src/ui/hooks/useInputHistory.js.map +1 -1
  396. package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -1
  397. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  398. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  399. package/dist/src/ui/hooks/useMcpStatus.js.map +1 -1
  400. package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -1
  401. package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
  402. package/dist/src/ui/hooks/useMouse.js.map +1 -1
  403. package/dist/src/ui/hooks/useMouseClick.d.ts +1 -1
  404. package/dist/src/ui/hooks/useMouseClick.js.map +1 -1
  405. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +1 -1
  406. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
  407. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  408. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
  409. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
  410. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
  411. package/dist/src/ui/hooks/useRegistrySearch.js.map +1 -1
  412. package/dist/src/ui/hooks/useRepeatedKeyPress.js.map +1 -1
  413. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -1
  414. package/dist/src/ui/hooks/useRewind.js.map +1 -1
  415. package/dist/src/ui/hooks/useRunEventNotifications.js +1 -1
  416. package/dist/src/ui/hooks/useRunEventNotifications.js.map +1 -1
  417. package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
  418. package/dist/src/ui/hooks/useSessionBrowser.d.ts +1 -1
  419. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  420. package/dist/src/ui/hooks/useSessionResume.d.ts +1 -1
  421. package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
  422. package/dist/src/ui/hooks/useSettingsNavigation.js.map +1 -1
  423. package/dist/src/ui/hooks/useShellCompletion.js.map +1 -1
  424. package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
  425. package/dist/src/ui/hooks/useShellInactivityStatus.js.map +1 -1
  426. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  427. package/dist/src/ui/hooks/useSnowfall.js.map +1 -1
  428. package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
  429. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
  430. package/dist/src/ui/hooks/useSuspend.js.map +1 -1
  431. package/dist/src/ui/hooks/useTabbedNavigation.js.map +1 -1
  432. package/dist/src/ui/hooks/useTerminalTheme.js.map +1 -1
  433. package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
  434. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  435. package/dist/src/ui/hooks/useTimedMessage.js.map +1 -1
  436. package/dist/src/ui/hooks/useTimer.js.map +1 -1
  437. package/dist/src/ui/hooks/useTips.js.map +1 -1
  438. package/dist/src/ui/hooks/useToolScheduler.d.ts +1 -0
  439. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
  440. package/dist/src/ui/hooks/useTurnActivityMonitor.js.map +1 -1
  441. package/dist/src/ui/hooks/useVisibilityToggle.js.map +1 -1
  442. package/dist/src/ui/hooks/useVoiceMode.js.map +1 -1
  443. package/dist/src/ui/hooks/vim.js.map +1 -1
  444. package/dist/src/ui/key/keyBindings.js +5 -4
  445. package/dist/src/ui/key/keyBindings.js.map +1 -1
  446. package/dist/src/ui/key/keyMatchers.js.map +1 -1
  447. package/dist/src/ui/key/keyToAnsi.js.map +1 -1
  448. package/dist/src/ui/key/keybindingUtils.js.map +1 -1
  449. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
  450. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
  451. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
  452. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +1 -1
  453. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -1
  454. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +1 -1
  455. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -1
  456. package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
  457. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -1
  458. package/dist/src/ui/state/extensions.js +1 -1
  459. package/dist/src/ui/state/extensions.js.map +1 -1
  460. package/dist/src/ui/themes/builtin/dark/ansi-dark.js +1 -1
  461. package/dist/src/ui/themes/builtin/dark/ansi-dark.js.map +1 -1
  462. package/dist/src/ui/themes/builtin/dark/holiday-dark.js +1 -1
  463. package/dist/src/ui/themes/builtin/dark/holiday-dark.js.map +1 -1
  464. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js +17 -17
  465. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js.map +1 -1
  466. package/dist/src/ui/themes/builtin/light/github-light.js +1 -1
  467. package/dist/src/ui/themes/builtin/light/github-light.js.map +1 -1
  468. package/dist/src/ui/themes/builtin/light/xcode-light.js +1 -1
  469. package/dist/src/ui/themes/builtin/light/xcode-light.js.map +1 -1
  470. package/dist/src/ui/themes/color-utils.js.map +1 -1
  471. package/dist/src/ui/themes/theme-manager.d.ts +1 -0
  472. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  473. package/dist/src/ui/themes/theme.js.map +1 -1
  474. package/dist/src/ui/types.js +5 -5
  475. package/dist/src/ui/types.js.map +1 -1
  476. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  477. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  478. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  479. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  480. package/dist/src/ui/utils/antigravityUtils.js.map +1 -1
  481. package/dist/src/ui/utils/borderStyles.js.map +1 -1
  482. package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
  483. package/dist/src/ui/utils/commandUtils.js +2 -2
  484. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  485. package/dist/src/ui/utils/computeStats.js.map +1 -1
  486. package/dist/src/ui/utils/confirmingTool.js.map +1 -1
  487. package/dist/src/ui/utils/contextUsage.js.map +1 -1
  488. package/dist/src/ui/utils/directoryUtils.js.map +1 -1
  489. package/dist/src/ui/utils/displayUtils.js.map +1 -1
  490. package/dist/src/ui/utils/editorUtils.d.ts +1 -0
  491. package/dist/src/ui/utils/editorUtils.js.map +1 -1
  492. package/dist/src/ui/utils/formatters.d.ts +1 -1
  493. package/dist/src/ui/utils/formatters.js.map +1 -1
  494. package/dist/src/ui/utils/highlight.js.map +1 -1
  495. package/dist/src/ui/utils/historyExportUtils.js.map +1 -1
  496. package/dist/src/ui/utils/historyUtils.js +1 -1
  497. package/dist/src/ui/utils/historyUtils.js.map +1 -1
  498. package/dist/src/ui/utils/input.d.ts +2 -2
  499. package/dist/src/ui/utils/latexToUnicode.js.map +1 -1
  500. package/dist/src/ui/utils/markdownParsingUtils.js.map +1 -1
  501. package/dist/src/ui/utils/markdownUtilities.js.map +1 -1
  502. package/dist/src/ui/utils/mouse.js.map +1 -1
  503. package/dist/src/ui/utils/pendingAttentionNotification.js.map +1 -1
  504. package/dist/src/ui/utils/rewindFileOps.js.map +1 -1
  505. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +1 -0
  506. package/dist/src/ui/utils/terminalCapabilityManager.js +2 -1
  507. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
  508. package/dist/src/ui/utils/terminalSetup.js.map +1 -1
  509. package/dist/src/ui/utils/terminalUtils.js.map +1 -1
  510. package/dist/src/ui/utils/textOutput.d.ts +1 -0
  511. package/dist/src/ui/utils/textOutput.js.map +1 -1
  512. package/dist/src/ui/utils/textUtils.js.map +1 -1
  513. package/dist/src/ui/utils/toolLayoutUtils.js.map +1 -1
  514. package/dist/src/ui/utils/ui-sizing.js.map +1 -1
  515. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  516. package/dist/src/ui/utils/urlSecurityUtils.js.map +1 -1
  517. package/dist/src/utils/activityLogger.d.ts +1 -0
  518. package/dist/src/utils/activityLogger.js.map +1 -1
  519. package/dist/src/utils/agentUtils.js.map +1 -1
  520. package/dist/src/utils/autoMemory.js.map +1 -1
  521. package/dist/src/utils/cleanup.js.map +1 -1
  522. package/dist/src/utils/commands.js.map +1 -1
  523. package/dist/src/utils/commentJson.js.map +1 -1
  524. package/dist/src/utils/deepMerge.js.map +1 -1
  525. package/dist/src/utils/devtoolsService.js +1 -1
  526. package/dist/src/utils/devtoolsService.js.map +1 -1
  527. package/dist/src/utils/dialogScopeUtils.js.map +1 -1
  528. package/dist/src/utils/envVarResolver.js.map +1 -1
  529. package/dist/src/utils/errors.js.map +1 -1
  530. package/dist/src/utils/events.d.ts +1 -0
  531. package/dist/src/utils/events.js +2 -2
  532. package/dist/src/utils/events.js.map +1 -1
  533. package/dist/src/utils/featureToggleUtils.js.map +1 -1
  534. package/dist/src/utils/gitUtils.js +1 -1
  535. package/dist/src/utils/gitUtils.js.map +1 -1
  536. package/dist/src/utils/handleAutoUpdate.d.ts +1 -0
  537. package/dist/src/utils/handleAutoUpdate.js.map +1 -1
  538. package/dist/src/utils/hookSettings.js.map +1 -1
  539. package/dist/src/utils/hookUtils.js.map +1 -1
  540. package/dist/src/utils/installationInfo.js +2 -2
  541. package/dist/src/utils/installationInfo.js.map +1 -1
  542. package/dist/src/utils/jsonoutput.js.map +1 -1
  543. package/dist/src/utils/logCleanup.js.map +1 -1
  544. package/dist/src/utils/persistentState.js.map +1 -1
  545. package/dist/src/utils/processUtils.d.ts +1 -0
  546. package/dist/src/utils/processUtils.js.map +1 -1
  547. package/dist/src/utils/readStdin.js.map +1 -1
  548. package/dist/src/utils/relaunch.js.map +1 -1
  549. package/dist/src/utils/resize-observer-polyfill.d.ts +2 -0
  550. package/dist/src/utils/resize-observer-polyfill.js +7 -0
  551. package/dist/src/utils/resize-observer-polyfill.js.map +1 -0
  552. package/dist/src/utils/resolvePath.js.map +1 -1
  553. package/dist/src/utils/sandbox.js +1 -1
  554. package/dist/src/utils/sandbox.js.map +1 -1
  555. package/dist/src/utils/sandboxUtils.js.map +1 -1
  556. package/dist/src/utils/sessionCleanup.js +3 -3
  557. package/dist/src/utils/sessionCleanup.js.map +1 -1
  558. package/dist/src/utils/sessionUtils.d.ts +1 -1
  559. package/dist/src/utils/sessionUtils.js +1 -1
  560. package/dist/src/utils/sessionUtils.js.map +1 -1
  561. package/dist/src/utils/sessions.js.map +1 -1
  562. package/dist/src/utils/settingsUtils.js.map +1 -1
  563. package/dist/src/utils/skillUtils.js.map +1 -1
  564. package/dist/src/utils/spawnWrapper.d.ts +1 -0
  565. package/dist/src/utils/startupWarnings.js.map +1 -1
  566. package/dist/src/utils/terminalNotifications.js +1 -1
  567. package/dist/src/utils/terminalNotifications.js.map +1 -1
  568. package/dist/src/utils/terminalTheme.js.map +1 -1
  569. package/dist/src/utils/updateEventEmitter.d.ts +1 -0
  570. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  571. package/dist/src/utils/windowTitle.js.map +1 -1
  572. package/dist/src/utils/worktreeSetup.js.map +1 -1
  573. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  574. package/dist/tsconfig.tsbuildinfo +1 -1
  575. package/package.json +17 -14
  576. package/dist/src/acp/acpCommandHandler.test.d.ts +0 -6
  577. package/dist/src/acp/acpCommandHandler.test.js +0 -28
  578. package/dist/src/acp/acpCommandHandler.test.js.map +0 -1
  579. package/dist/src/acp/acpErrors.test.d.ts +0 -6
  580. package/dist/src/acp/acpErrors.test.js +0 -38
  581. package/dist/src/acp/acpErrors.test.js.map +0 -1
  582. package/dist/src/acp/acpFileSystemService.test.d.ts +0 -6
  583. package/dist/src/acp/acpFileSystemService.test.js +0 -162
  584. package/dist/src/acp/acpFileSystemService.test.js.map +0 -1
  585. package/dist/src/acp/acpResume.test.d.ts +0 -6
  586. package/dist/src/acp/acpResume.test.js +0 -260
  587. package/dist/src/acp/acpResume.test.js.map +0 -1
  588. package/dist/src/acp/acpRpcDispatcher.test.d.ts +0 -6
  589. package/dist/src/acp/acpRpcDispatcher.test.js +0 -238
  590. package/dist/src/acp/acpRpcDispatcher.test.js.map +0 -1
  591. package/dist/src/acp/acpSession.test.d.ts +0 -6
  592. package/dist/src/acp/acpSession.test.js +0 -742
  593. package/dist/src/acp/acpSession.test.js.map +0 -1
  594. package/dist/src/acp/acpSessionManager.test.d.ts +0 -6
  595. package/dist/src/acp/acpSessionManager.test.js +0 -283
  596. package/dist/src/acp/acpSessionManager.test.js.map +0 -1
  597. package/dist/src/acp/commands/extensions.test.d.ts +0 -6
  598. package/dist/src/acp/commands/extensions.test.js +0 -70
  599. package/dist/src/acp/commands/extensions.test.js.map +0 -1
  600. package/dist/src/acp/commands/help.test.d.ts +0 -6
  601. package/dist/src/acp/commands/help.test.js +0 -40
  602. package/dist/src/acp/commands/help.test.js.map +0 -1
  603. package/dist/src/acp/commands/restore.test.d.ts +0 -6
  604. package/dist/src/acp/commands/restore.test.js +0 -173
  605. package/dist/src/acp/commands/restore.test.js.map +0 -1
  606. package/dist/src/commands/extensions/configure.test.d.ts +0 -1
  607. package/dist/src/commands/extensions/configure.test.js +0 -195
  608. package/dist/src/commands/extensions/configure.test.js.map +0 -1
  609. package/dist/src/commands/extensions/disable.test.d.ts +0 -6
  610. package/dist/src/commands/extensions/disable.test.js +0 -169
  611. package/dist/src/commands/extensions/disable.test.js.map +0 -1
  612. package/dist/src/commands/extensions/enable.test.d.ts +0 -6
  613. package/dist/src/commands/extensions/enable.test.js +0 -199
  614. package/dist/src/commands/extensions/enable.test.js.map +0 -1
  615. package/dist/src/commands/extensions/install.test.d.ts +0 -6
  616. package/dist/src/commands/extensions/install.test.js +0 -311
  617. package/dist/src/commands/extensions/install.test.js.map +0 -1
  618. package/dist/src/commands/extensions/link.test.d.ts +0 -6
  619. package/dist/src/commands/extensions/link.test.js +0 -121
  620. package/dist/src/commands/extensions/link.test.js.map +0 -1
  621. package/dist/src/commands/extensions/list.test.d.ts +0 -6
  622. package/dist/src/commands/extensions/list.test.js +0 -132
  623. package/dist/src/commands/extensions/list.test.js.map +0 -1
  624. package/dist/src/commands/extensions/new.test.d.ts +0 -6
  625. package/dist/src/commands/extensions/new.test.js +0 -62
  626. package/dist/src/commands/extensions/new.test.js.map +0 -1
  627. package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
  628. package/dist/src/commands/extensions/uninstall.test.js +0 -240
  629. package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
  630. package/dist/src/commands/extensions/update.test.d.ts +0 -6
  631. package/dist/src/commands/extensions/update.test.js +0 -196
  632. package/dist/src/commands/extensions/update.test.js.map +0 -1
  633. package/dist/src/commands/extensions/validate.test.d.ts +0 -6
  634. package/dist/src/commands/extensions/validate.test.js +0 -96
  635. package/dist/src/commands/extensions/validate.test.js.map +0 -1
  636. package/dist/src/commands/extensions.test.d.ts +0 -6
  637. package/dist/src/commands/extensions.test.js +0 -67
  638. package/dist/src/commands/extensions.test.js.map +0 -1
  639. package/dist/src/commands/gemma/logs.test.d.ts +0 -6
  640. package/dist/src/commands/gemma/logs.test.js +0 -122
  641. package/dist/src/commands/gemma/logs.test.js.map +0 -1
  642. package/dist/src/commands/gemma/platform.test.d.ts +0 -6
  643. package/dist/src/commands/gemma/platform.test.js +0 -108
  644. package/dist/src/commands/gemma/platform.test.js.map +0 -1
  645. package/dist/src/commands/gemma/setup.test.d.ts +0 -6
  646. package/dist/src/commands/gemma/setup.test.js +0 -36
  647. package/dist/src/commands/gemma/setup.test.js.map +0 -1
  648. package/dist/src/commands/gemma/stop.test.d.ts +0 -6
  649. package/dist/src/commands/gemma/stop.test.js +0 -89
  650. package/dist/src/commands/gemma/stop.test.js.map +0 -1
  651. package/dist/src/commands/hooks/migrate.test.d.ts +0 -6
  652. package/dist/src/commands/hooks/migrate.test.js +0 -388
  653. package/dist/src/commands/hooks/migrate.test.js.map +0 -1
  654. package/dist/src/commands/mcp/add.test.d.ts +0 -6
  655. package/dist/src/commands/mcp/add.test.js +0 -274
  656. package/dist/src/commands/mcp/add.test.js.map +0 -1
  657. package/dist/src/commands/mcp/list.test.d.ts +0 -6
  658. package/dist/src/commands/mcp/list.test.js +0 -477
  659. package/dist/src/commands/mcp/list.test.js.map +0 -1
  660. package/dist/src/commands/mcp/remove.test.d.ts +0 -6
  661. package/dist/src/commands/mcp/remove.test.js +0 -206
  662. package/dist/src/commands/mcp/remove.test.js.map +0 -1
  663. package/dist/src/commands/mcp.test.d.ts +0 -6
  664. package/dist/src/commands/mcp.test.js +0 -64
  665. package/dist/src/commands/mcp.test.js.map +0 -1
  666. package/dist/src/commands/skills/disable.test.d.ts +0 -6
  667. package/dist/src/commands/skills/disable.test.js +0 -93
  668. package/dist/src/commands/skills/disable.test.js.map +0 -1
  669. package/dist/src/commands/skills/enable.test.d.ts +0 -6
  670. package/dist/src/commands/skills/enable.test.js +0 -104
  671. package/dist/src/commands/skills/enable.test.js.map +0 -1
  672. package/dist/src/commands/skills/install.test.d.ts +0 -6
  673. package/dist/src/commands/skills/install.test.js +0 -99
  674. package/dist/src/commands/skills/install.test.js.map +0 -1
  675. package/dist/src/commands/skills/link.test.d.ts +0 -6
  676. package/dist/src/commands/skills/link.test.js +0 -53
  677. package/dist/src/commands/skills/link.test.js.map +0 -1
  678. package/dist/src/commands/skills/list.test.d.ts +0 -6
  679. package/dist/src/commands/skills/list.test.js +0 -127
  680. package/dist/src/commands/skills/list.test.js.map +0 -1
  681. package/dist/src/commands/skills/uninstall.test.d.ts +0 -6
  682. package/dist/src/commands/skills/uninstall.test.js +0 -65
  683. package/dist/src/commands/skills/uninstall.test.js.map +0 -1
  684. package/dist/src/commands/skills.test.d.ts +0 -6
  685. package/dist/src/commands/skills.test.js +0 -49
  686. package/dist/src/commands/skills.test.js.map +0 -1
  687. package/dist/src/commands/utils.test.d.ts +0 -6
  688. package/dist/src/commands/utils.test.js +0 -35
  689. package/dist/src/commands/utils.test.js.map +0 -1
  690. package/dist/src/config/auth.test.d.ts +0 -6
  691. package/dist/src/config/auth.test.js +0 -96
  692. package/dist/src/config/auth.test.js.map +0 -1
  693. package/dist/src/config/config.integration.test.d.ts +0 -6
  694. package/dist/src/config/config.integration.test.js +0 -205
  695. package/dist/src/config/config.integration.test.js.map +0 -1
  696. package/dist/src/config/config.test.d.ts +0 -6
  697. package/dist/src/config/config.test.js +0 -3124
  698. package/dist/src/config/config.test.js.map +0 -1
  699. package/dist/src/config/extension-manager-agents.test.d.ts +0 -6
  700. package/dist/src/config/extension-manager-agents.test.js +0 -116
  701. package/dist/src/config/extension-manager-agents.test.js.map +0 -1
  702. package/dist/src/config/extension-manager-hydration.test.d.ts +0 -6
  703. package/dist/src/config/extension-manager-hydration.test.js +0 -262
  704. package/dist/src/config/extension-manager-hydration.test.js.map +0 -1
  705. package/dist/src/config/extension-manager-permissions.test.d.ts +0 -6
  706. package/dist/src/config/extension-manager-permissions.test.js +0 -107
  707. package/dist/src/config/extension-manager-permissions.test.js.map +0 -1
  708. package/dist/src/config/extension-manager-scope.test.d.ts +0 -6
  709. package/dist/src/config/extension-manager-scope.test.js +0 -158
  710. package/dist/src/config/extension-manager-scope.test.js.map +0 -1
  711. package/dist/src/config/extension-manager-skills.test.d.ts +0 -6
  712. package/dist/src/config/extension-manager-skills.test.js +0 -157
  713. package/dist/src/config/extension-manager-skills.test.js.map +0 -1
  714. package/dist/src/config/extension-manager.test.d.ts +0 -6
  715. package/dist/src/config/extension-manager.test.js +0 -430
  716. package/dist/src/config/extension-manager.test.js.map +0 -1
  717. package/dist/src/config/extension.test.d.ts +0 -6
  718. package/dist/src/config/extension.test.js +0 -1800
  719. package/dist/src/config/extension.test.js.map +0 -1
  720. package/dist/src/config/extensionRegistryClient.test.d.ts +0 -6
  721. package/dist/src/config/extensionRegistryClient.test.js +0 -261
  722. package/dist/src/config/extensionRegistryClient.test.js.map +0 -1
  723. package/dist/src/config/extensions/consent.test.d.ts +0 -6
  724. package/dist/src/config/extensions/consent.test.js +0 -302
  725. package/dist/src/config/extensions/consent.test.js.map +0 -1
  726. package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
  727. package/dist/src/config/extensions/extensionEnablement.test.js +0 -404
  728. package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
  729. package/dist/src/config/extensions/extensionSettings.test.d.ts +0 -6
  730. package/dist/src/config/extensions/extensionSettings.test.js +0 -575
  731. package/dist/src/config/extensions/extensionSettings.test.js.map +0 -1
  732. package/dist/src/config/extensions/extensionUpdates.test.d.ts +0 -6
  733. package/dist/src/config/extensions/extensionUpdates.test.js +0 -265
  734. package/dist/src/config/extensions/extensionUpdates.test.js.map +0 -1
  735. package/dist/src/config/extensions/github.test.d.ts +0 -6
  736. package/dist/src/config/extensions/github.test.js +0 -454
  737. package/dist/src/config/extensions/github.test.js.map +0 -1
  738. package/dist/src/config/extensions/github_fetch.test.d.ts +0 -6
  739. package/dist/src/config/extensions/github_fetch.test.js +0 -171
  740. package/dist/src/config/extensions/github_fetch.test.js.map +0 -1
  741. package/dist/src/config/extensions/storage.test.d.ts +0 -6
  742. package/dist/src/config/extensions/storage.test.js +0 -64
  743. package/dist/src/config/extensions/storage.test.js.map +0 -1
  744. package/dist/src/config/extensions/update.test.d.ts +0 -6
  745. package/dist/src/config/extensions/update.test.js +0 -296
  746. package/dist/src/config/extensions/update.test.js.map +0 -1
  747. package/dist/src/config/extensions/variables.test.d.ts +0 -6
  748. package/dist/src/config/extensions/variables.test.js +0 -119
  749. package/dist/src/config/extensions/variables.test.js.map +0 -1
  750. package/dist/src/config/footerItems.test.d.ts +0 -6
  751. package/dist/src/config/footerItems.test.js +0 -180
  752. package/dist/src/config/footerItems.test.js.map +0 -1
  753. package/dist/src/config/mcp/mcpServerEnablement.test.d.ts +0 -6
  754. package/dist/src/config/mcp/mcpServerEnablement.test.js +0 -148
  755. package/dist/src/config/mcp/mcpServerEnablement.test.js.map +0 -1
  756. package/dist/src/config/mutual-exclusivity.test.d.ts +0 -6
  757. package/dist/src/config/mutual-exclusivity.test.js +0 -33
  758. package/dist/src/config/mutual-exclusivity.test.js.map +0 -1
  759. package/dist/src/config/policy-engine.integration.test.d.ts +0 -6
  760. package/dist/src/config/policy-engine.integration.test.js +0 -394
  761. package/dist/src/config/policy-engine.integration.test.js.map +0 -1
  762. package/dist/src/config/policy.test.d.ts +0 -6
  763. package/dist/src/config/policy.test.js +0 -199
  764. package/dist/src/config/policy.test.js.map +0 -1
  765. package/dist/src/config/sandboxConfig.test.d.ts +0 -6
  766. package/dist/src/config/sandboxConfig.test.js +0 -401
  767. package/dist/src/config/sandboxConfig.test.js.map +0 -1
  768. package/dist/src/config/settingPaths.test.d.ts +0 -6
  769. package/dist/src/config/settingPaths.test.js +0 -22
  770. package/dist/src/config/settingPaths.test.js.map +0 -1
  771. package/dist/src/config/settings-env-isolation.test.d.ts +0 -6
  772. package/dist/src/config/settings-env-isolation.test.js +0 -188
  773. package/dist/src/config/settings-env-isolation.test.js.map +0 -1
  774. package/dist/src/config/settings-validation.test.d.ts +0 -6
  775. package/dist/src/config/settings-validation.test.js +0 -464
  776. package/dist/src/config/settings-validation.test.js.map +0 -1
  777. package/dist/src/config/settings.test.d.ts +0 -6
  778. package/dist/src/config/settings.test.js +0 -2660
  779. package/dist/src/config/settings.test.js.map +0 -1
  780. package/dist/src/config/settingsSchema.test.d.ts +0 -6
  781. package/dist/src/config/settingsSchema.test.js +0 -450
  782. package/dist/src/config/settingsSchema.test.js.map +0 -1
  783. package/dist/src/config/settings_repro.test.d.ts +0 -6
  784. package/dist/src/config/settings_repro.test.js +0 -163
  785. package/dist/src/config/settings_repro.test.js.map +0 -1
  786. package/dist/src/config/settings_validation_warning.test.d.ts +0 -6
  787. package/dist/src/config/settings_validation_warning.test.js +0 -124
  788. package/dist/src/config/settings_validation_warning.test.js.map +0 -1
  789. package/dist/src/config/skipExtensions.test.d.ts +0 -6
  790. package/dist/src/config/skipExtensions.test.js +0 -49
  791. package/dist/src/config/skipExtensions.test.js.map +0 -1
  792. package/dist/src/config/trustedFolders.test.d.ts +0 -6
  793. package/dist/src/config/trustedFolders.test.js +0 -411
  794. package/dist/src/config/trustedFolders.test.js.map +0 -1
  795. package/dist/src/config/workspace-policy-cli.test.d.ts +0 -6
  796. package/dist/src/config/workspace-policy-cli.test.js +0 -204
  797. package/dist/src/config/workspace-policy-cli.test.js.map +0 -1
  798. package/dist/src/core/auth.test.d.ts +0 -6
  799. package/dist/src/core/auth.test.js +0 -93
  800. package/dist/src/core/auth.test.js.map +0 -1
  801. package/dist/src/core/initializer.test.d.ts +0 -6
  802. package/dist/src/core/initializer.test.js +0 -111
  803. package/dist/src/core/initializer.test.js.map +0 -1
  804. package/dist/src/core/theme.test.d.ts +0 -6
  805. package/dist/src/core/theme.test.js +0 -46
  806. package/dist/src/core/theme.test.js.map +0 -1
  807. package/dist/src/deferred.test.d.ts +0 -6
  808. package/dist/src/deferred.test.js +0 -180
  809. package/dist/src/deferred.test.js.map +0 -1
  810. package/dist/src/gemini.test.d.ts +0 -6
  811. package/dist/src/gemini.test.js +0 -1432
  812. package/dist/src/gemini.test.js.map +0 -1
  813. package/dist/src/gemini_cleanup.test.d.ts +0 -6
  814. package/dist/src/gemini_cleanup.test.js +0 -391
  815. package/dist/src/gemini_cleanup.test.js.map +0 -1
  816. package/dist/src/integration-tests/modelSteering.test.d.ts +0 -6
  817. package/dist/src/integration-tests/modelSteering.test.js +0 -62
  818. package/dist/src/integration-tests/modelSteering.test.js.map +0 -1
  819. package/dist/src/nonInteractiveCli.test.d.ts +0 -6
  820. package/dist/src/nonInteractiveCli.test.js +0 -1921
  821. package/dist/src/nonInteractiveCli.test.js.map +0 -1
  822. package/dist/src/nonInteractiveCliAgentSession.test.d.ts +0 -6
  823. package/dist/src/nonInteractiveCliAgentSession.test.js +0 -2015
  824. package/dist/src/nonInteractiveCliAgentSession.test.js.map +0 -1
  825. package/dist/src/output-redirection.test.d.ts +0 -6
  826. package/dist/src/output-redirection.test.js +0 -77
  827. package/dist/src/output-redirection.test.js.map +0 -1
  828. package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
  829. package/dist/src/services/BuiltinCommandLoader.test.js +0 -369
  830. package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
  831. package/dist/src/services/CommandService.test.d.ts +0 -6
  832. package/dist/src/services/CommandService.test.js +0 -74
  833. package/dist/src/services/CommandService.test.js.map +0 -1
  834. package/dist/src/services/FileCommandLoader.test.d.ts +0 -6
  835. package/dist/src/services/FileCommandLoader.test.js +0 -1128
  836. package/dist/src/services/FileCommandLoader.test.js.map +0 -1
  837. package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
  838. package/dist/src/services/McpPromptLoader.test.js +0 -411
  839. package/dist/src/services/McpPromptLoader.test.js.map +0 -1
  840. package/dist/src/services/SkillCommandLoader.test.d.ts +0 -6
  841. package/dist/src/services/SkillCommandLoader.test.js +0 -113
  842. package/dist/src/services/SkillCommandLoader.test.js.map +0 -1
  843. package/dist/src/services/SlashCommandConflictHandler.test.d.ts +0 -6
  844. package/dist/src/services/SlashCommandConflictHandler.test.js +0 -144
  845. package/dist/src/services/SlashCommandConflictHandler.test.js.map +0 -1
  846. package/dist/src/services/SlashCommandResolver.test.d.ts +0 -6
  847. package/dist/src/services/SlashCommandResolver.test.js +0 -186
  848. package/dist/src/services/SlashCommandResolver.test.js.map +0 -1
  849. package/dist/src/services/liteRtServerManager.test.d.ts +0 -6
  850. package/dist/src/services/liteRtServerManager.test.js +0 -54
  851. package/dist/src/services/liteRtServerManager.test.js.map +0 -1
  852. package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +0 -6
  853. package/dist/src/services/prompt-processors/argumentProcessor.test.js +0 -40
  854. package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +0 -1
  855. package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
  856. package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -177
  857. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
  858. package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
  859. package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
  860. package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
  861. package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +0 -6
  862. package/dist/src/services/prompt-processors/shellProcessor.test.js +0 -525
  863. package/dist/src/services/prompt-processors/shellProcessor.test.js.map +0 -1
  864. package/dist/src/test-utils/AppRig.test.d.ts +0 -6
  865. package/dist/src/test-utils/AppRig.test.js +0 -60
  866. package/dist/src/test-utils/AppRig.test.js.map +0 -1
  867. package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
  868. package/dist/src/test-utils/mockCommandContext.test.js +0 -51
  869. package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
  870. package/dist/src/test-utils/render.test.d.ts +0 -6
  871. package/dist/src/test-utils/render.test.js +0 -84
  872. package/dist/src/test-utils/render.test.js.map +0 -1
  873. package/dist/src/ui/App.test.d.ts +0 -6
  874. package/dist/src/ui/App.test.js +0 -244
  875. package/dist/src/ui/App.test.js.map +0 -1
  876. package/dist/src/ui/AppContainer.test.d.ts +0 -6
  877. package/dist/src/ui/AppContainer.test.js +0 -2824
  878. package/dist/src/ui/AppContainer.test.js.map +0 -1
  879. package/dist/src/ui/IdeIntegrationNudge.test.d.ts +0 -6
  880. package/dist/src/ui/IdeIntegrationNudge.test.js +0 -149
  881. package/dist/src/ui/IdeIntegrationNudge.test.js.map +0 -1
  882. package/dist/src/ui/ToolConfirmationFullFrame.test.d.ts +0 -1
  883. package/dist/src/ui/ToolConfirmationFullFrame.test.js +0 -153
  884. package/dist/src/ui/ToolConfirmationFullFrame.test.js.map +0 -1
  885. package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +0 -6
  886. package/dist/src/ui/auth/ApiAuthDialog.test.js +0 -127
  887. package/dist/src/ui/auth/ApiAuthDialog.test.js.map +0 -1
  888. package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
  889. package/dist/src/ui/auth/AuthDialog.test.js +0 -350
  890. package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
  891. package/dist/src/ui/auth/AuthInProgress.test.d.ts +0 -6
  892. package/dist/src/ui/auth/AuthInProgress.test.js +0 -99
  893. package/dist/src/ui/auth/AuthInProgress.test.js.map +0 -1
  894. package/dist/src/ui/auth/BannedAccountDialog.test.d.ts +0 -6
  895. package/dist/src/ui/auth/BannedAccountDialog.test.js +0 -141
  896. package/dist/src/ui/auth/BannedAccountDialog.test.js.map +0 -1
  897. package/dist/src/ui/auth/LoginRestartDialog.test.d.ts +0 -6
  898. package/dist/src/ui/auth/LoginRestartDialog.test.js +0 -79
  899. package/dist/src/ui/auth/LoginRestartDialog.test.js.map +0 -1
  900. package/dist/src/ui/auth/useAuth.test.d.ts +0 -6
  901. package/dist/src/ui/auth/useAuth.test.js +0 -214
  902. package/dist/src/ui/auth/useAuth.test.js.map +0 -1
  903. package/dist/src/ui/commands/aboutCommand.test.d.ts +0 -6
  904. package/dist/src/ui/commands/aboutCommand.test.js +0 -145
  905. package/dist/src/ui/commands/aboutCommand.test.js.map +0 -1
  906. package/dist/src/ui/commands/agentsCommand.test.d.ts +0 -6
  907. package/dist/src/ui/commands/agentsCommand.test.js +0 -382
  908. package/dist/src/ui/commands/agentsCommand.test.js.map +0 -1
  909. package/dist/src/ui/commands/authCommand.test.d.ts +0 -6
  910. package/dist/src/ui/commands/authCommand.test.js +0 -103
  911. package/dist/src/ui/commands/authCommand.test.js.map +0 -1
  912. package/dist/src/ui/commands/bugCommand.test.d.ts +0 -6
  913. package/dist/src/ui/commands/bugCommand.test.js +0 -305
  914. package/dist/src/ui/commands/bugCommand.test.js.map +0 -1
  915. package/dist/src/ui/commands/bugMemoryCommand.test.d.ts +0 -6
  916. package/dist/src/ui/commands/bugMemoryCommand.test.js +0 -100
  917. package/dist/src/ui/commands/bugMemoryCommand.test.js.map +0 -1
  918. package/dist/src/ui/commands/chatCommand.test.d.ts +0 -6
  919. package/dist/src/ui/commands/chatCommand.test.js +0 -627
  920. package/dist/src/ui/commands/chatCommand.test.js.map +0 -1
  921. package/dist/src/ui/commands/clearCommand.test.d.ts +0 -6
  922. package/dist/src/ui/commands/clearCommand.test.js +0 -98
  923. package/dist/src/ui/commands/clearCommand.test.js.map +0 -1
  924. package/dist/src/ui/commands/commandsCommand.test.d.ts +0 -6
  925. package/dist/src/ui/commands/commandsCommand.test.js +0 -115
  926. package/dist/src/ui/commands/commandsCommand.test.js.map +0 -1
  927. package/dist/src/ui/commands/compressCommand.test.d.ts +0 -6
  928. package/dist/src/ui/commands/compressCommand.test.js +0 -110
  929. package/dist/src/ui/commands/compressCommand.test.js.map +0 -1
  930. package/dist/src/ui/commands/copyCommand.test.d.ts +0 -6
  931. package/dist/src/ui/commands/copyCommand.test.js +0 -244
  932. package/dist/src/ui/commands/copyCommand.test.js.map +0 -1
  933. package/dist/src/ui/commands/corgiCommand.test.d.ts +0 -6
  934. package/dist/src/ui/commands/corgiCommand.test.js +0 -28
  935. package/dist/src/ui/commands/corgiCommand.test.js.map +0 -1
  936. package/dist/src/ui/commands/directoryCommand.test.d.ts +0 -6
  937. package/dist/src/ui/commands/directoryCommand.test.js +0 -365
  938. package/dist/src/ui/commands/directoryCommand.test.js.map +0 -1
  939. package/dist/src/ui/commands/docsCommand.test.d.ts +0 -6
  940. package/dist/src/ui/commands/docsCommand.test.js +0 -72
  941. package/dist/src/ui/commands/docsCommand.test.js.map +0 -1
  942. package/dist/src/ui/commands/editorCommand.test.d.ts +0 -6
  943. package/dist/src/ui/commands/editorCommand.test.js +0 -27
  944. package/dist/src/ui/commands/editorCommand.test.js.map +0 -1
  945. package/dist/src/ui/commands/exportSessionCommand.test.d.ts +0 -6
  946. package/dist/src/ui/commands/exportSessionCommand.test.js +0 -100
  947. package/dist/src/ui/commands/exportSessionCommand.test.js.map +0 -1
  948. package/dist/src/ui/commands/extensionsCommand.test.d.ts +0 -6
  949. package/dist/src/ui/commands/extensionsCommand.test.js +0 -947
  950. package/dist/src/ui/commands/extensionsCommand.test.js.map +0 -1
  951. package/dist/src/ui/commands/helpCommand.test.d.ts +0 -6
  952. package/dist/src/ui/commands/helpCommand.test.js +0 -94
  953. package/dist/src/ui/commands/helpCommand.test.js.map +0 -1
  954. package/dist/src/ui/commands/hooksCommand.test.d.ts +0 -6
  955. package/dist/src/ui/commands/hooksCommand.test.js +0 -562
  956. package/dist/src/ui/commands/hooksCommand.test.js.map +0 -1
  957. package/dist/src/ui/commands/ideCommand.test.d.ts +0 -6
  958. package/dist/src/ui/commands/ideCommand.test.js +0 -205
  959. package/dist/src/ui/commands/ideCommand.test.js.map +0 -1
  960. package/dist/src/ui/commands/initCommand.test.d.ts +0 -6
  961. package/dist/src/ui/commands/initCommand.test.js +0 -86
  962. package/dist/src/ui/commands/initCommand.test.js.map +0 -1
  963. package/dist/src/ui/commands/mcpCommand.test.d.ts +0 -6
  964. package/dist/src/ui/commands/mcpCommand.test.js +0 -231
  965. package/dist/src/ui/commands/mcpCommand.test.js.map +0 -1
  966. package/dist/src/ui/commands/memoryCommand.test.d.ts +0 -6
  967. package/dist/src/ui/commands/memoryCommand.test.js +0 -361
  968. package/dist/src/ui/commands/memoryCommand.test.js.map +0 -1
  969. package/dist/src/ui/commands/modelCommand.test.d.ts +0 -6
  970. package/dist/src/ui/commands/modelCommand.test.js +0 -135
  971. package/dist/src/ui/commands/modelCommand.test.js.map +0 -1
  972. package/dist/src/ui/commands/permissionsCommand.test.d.ts +0 -6
  973. package/dist/src/ui/commands/permissionsCommand.test.js +0 -86
  974. package/dist/src/ui/commands/permissionsCommand.test.js.map +0 -1
  975. package/dist/src/ui/commands/planCommand.test.d.ts +0 -6
  976. package/dist/src/ui/commands/planCommand.test.js +0 -146
  977. package/dist/src/ui/commands/planCommand.test.js.map +0 -1
  978. package/dist/src/ui/commands/policiesCommand.test.d.ts +0 -6
  979. package/dist/src/ui/commands/policiesCommand.test.js +0 -133
  980. package/dist/src/ui/commands/policiesCommand.test.js.map +0 -1
  981. package/dist/src/ui/commands/privacyCommand.test.d.ts +0 -6
  982. package/dist/src/ui/commands/privacyCommand.test.js +0 -32
  983. package/dist/src/ui/commands/privacyCommand.test.js.map +0 -1
  984. package/dist/src/ui/commands/quitCommand.test.d.ts +0 -6
  985. package/dist/src/ui/commands/quitCommand.test.js +0 -95
  986. package/dist/src/ui/commands/quitCommand.test.js.map +0 -1
  987. package/dist/src/ui/commands/restoreCommand.test.d.ts +0 -6
  988. package/dist/src/ui/commands/restoreCommand.test.js +0 -193
  989. package/dist/src/ui/commands/restoreCommand.test.js.map +0 -1
  990. package/dist/src/ui/commands/resumeCommand.test.d.ts +0 -6
  991. package/dist/src/ui/commands/resumeCommand.test.js +0 -28
  992. package/dist/src/ui/commands/resumeCommand.test.js.map +0 -1
  993. package/dist/src/ui/commands/rewindCommand.test.d.ts +0 -6
  994. package/dist/src/ui/commands/rewindCommand.test.js +0 -256
  995. package/dist/src/ui/commands/rewindCommand.test.js.map +0 -1
  996. package/dist/src/ui/commands/settingsCommand.test.d.ts +0 -6
  997. package/dist/src/ui/commands/settingsCommand.test.js +0 -30
  998. package/dist/src/ui/commands/settingsCommand.test.js.map +0 -1
  999. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
  1000. package/dist/src/ui/commands/setupGithubCommand.test.js +0 -238
  1001. package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
  1002. package/dist/src/ui/commands/skillsCommand.test.d.ts +0 -6
  1003. package/dist/src/ui/commands/skillsCommand.test.js +0 -500
  1004. package/dist/src/ui/commands/skillsCommand.test.js.map +0 -1
  1005. package/dist/src/ui/commands/statsCommand.test.d.ts +0 -6
  1006. package/dist/src/ui/commands/statsCommand.test.js +0 -122
  1007. package/dist/src/ui/commands/statsCommand.test.js.map +0 -1
  1008. package/dist/src/ui/commands/tasksCommand.test.d.ts +0 -6
  1009. package/dist/src/ui/commands/tasksCommand.test.js +0 -30
  1010. package/dist/src/ui/commands/tasksCommand.test.js.map +0 -1
  1011. package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +0 -6
  1012. package/dist/src/ui/commands/terminalSetupCommand.test.js +0 -66
  1013. package/dist/src/ui/commands/terminalSetupCommand.test.js.map +0 -1
  1014. package/dist/src/ui/commands/themeCommand.test.d.ts +0 -6
  1015. package/dist/src/ui/commands/themeCommand.test.js +0 -32
  1016. package/dist/src/ui/commands/themeCommand.test.js.map +0 -1
  1017. package/dist/src/ui/commands/toolsCommand.test.d.ts +0 -6
  1018. package/dist/src/ui/commands/toolsCommand.test.js +0 -187
  1019. package/dist/src/ui/commands/toolsCommand.test.js.map +0 -1
  1020. package/dist/src/ui/commands/upgradeCommand.test.d.ts +0 -6
  1021. package/dist/src/ui/commands/upgradeCommand.test.js +0 -102
  1022. package/dist/src/ui/commands/upgradeCommand.test.js.map +0 -1
  1023. package/dist/src/ui/components/AboutBox.test.d.ts +0 -6
  1024. package/dist/src/ui/components/AboutBox.test.js +0 -63
  1025. package/dist/src/ui/components/AboutBox.test.js.map +0 -1
  1026. package/dist/src/ui/components/AdminSettingsChangedDialog.test.d.ts +0 -6
  1027. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +0 -43
  1028. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +0 -1
  1029. package/dist/src/ui/components/AgentConfigDialog.test.d.ts +0 -6
  1030. package/dist/src/ui/components/AgentConfigDialog.test.js +0 -267
  1031. package/dist/src/ui/components/AgentConfigDialog.test.js.map +0 -1
  1032. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +0 -6
  1033. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +0 -196
  1034. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +0 -1
  1035. package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
  1036. package/dist/src/ui/components/AnsiOutput.test.js +0 -142
  1037. package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
  1038. package/dist/src/ui/components/AppHeader.test.d.ts +0 -6
  1039. package/dist/src/ui/components/AppHeader.test.js +0 -212
  1040. package/dist/src/ui/components/AppHeader.test.js.map +0 -1
  1041. package/dist/src/ui/components/AppHeaderIcon.test.d.ts +0 -6
  1042. package/dist/src/ui/components/AppHeaderIcon.test.js +0 -39
  1043. package/dist/src/ui/components/AppHeaderIcon.test.js.map +0 -1
  1044. package/dist/src/ui/components/ApprovalModeIndicator.test.d.ts +0 -6
  1045. package/dist/src/ui/components/ApprovalModeIndicator.test.js +0 -37
  1046. package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +0 -1
  1047. package/dist/src/ui/components/AskUserDialog.test.d.ts +0 -6
  1048. package/dist/src/ui/components/AskUserDialog.test.js +0 -1121
  1049. package/dist/src/ui/components/AskUserDialog.test.js.map +0 -1
  1050. package/dist/src/ui/components/BackgroundTaskDisplay.test.d.ts +0 -6
  1051. package/dist/src/ui/components/BackgroundTaskDisplay.test.js +0 -209
  1052. package/dist/src/ui/components/BackgroundTaskDisplay.test.js.map +0 -1
  1053. package/dist/src/ui/components/Banner.test.d.ts +0 -6
  1054. package/dist/src/ui/components/Banner.test.js +0 -29
  1055. package/dist/src/ui/components/Banner.test.js.map +0 -1
  1056. package/dist/src/ui/components/BubblingRegression.test.d.ts +0 -6
  1057. package/dist/src/ui/components/BubblingRegression.test.js +0 -60
  1058. package/dist/src/ui/components/BubblingRegression.test.js.map +0 -1
  1059. package/dist/src/ui/components/Checklist.test.d.ts +0 -6
  1060. package/dist/src/ui/components/Checklist.test.js +0 -46
  1061. package/dist/src/ui/components/Checklist.test.js.map +0 -1
  1062. package/dist/src/ui/components/ChecklistItem.test.d.ts +0 -6
  1063. package/dist/src/ui/components/ChecklistItem.test.js +0 -40
  1064. package/dist/src/ui/components/ChecklistItem.test.js.map +0 -1
  1065. package/dist/src/ui/components/CliSpinner.test.d.ts +0 -6
  1066. package/dist/src/ui/components/CliSpinner.test.js +0 -32
  1067. package/dist/src/ui/components/CliSpinner.test.js.map +0 -1
  1068. package/dist/src/ui/components/ColorsDisplay.test.d.ts +0 -6
  1069. package/dist/src/ui/components/ColorsDisplay.test.js +0 -107
  1070. package/dist/src/ui/components/ColorsDisplay.test.js.map +0 -1
  1071. package/dist/src/ui/components/Composer.test.d.ts +0 -6
  1072. package/dist/src/ui/components/Composer.test.js +0 -853
  1073. package/dist/src/ui/components/Composer.test.js.map +0 -1
  1074. package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +0 -6
  1075. package/dist/src/ui/components/ConfigInitDisplay.test.js +0 -118
  1076. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +0 -1
  1077. package/dist/src/ui/components/ConsentPrompt.test.d.ts +0 -6
  1078. package/dist/src/ui/components/ConsentPrompt.test.js +0 -80
  1079. package/dist/src/ui/components/ConsentPrompt.test.js.map +0 -1
  1080. package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +0 -6
  1081. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +0 -28
  1082. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +0 -1
  1083. package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +0 -6
  1084. package/dist/src/ui/components/ContextSummaryDisplay.test.js +0 -81
  1085. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +0 -1
  1086. package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +0 -6
  1087. package/dist/src/ui/components/ContextUsageDisplay.test.js +0 -50
  1088. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +0 -1
  1089. package/dist/src/ui/components/CopyModeWarning.test.d.ts +0 -6
  1090. package/dist/src/ui/components/CopyModeWarning.test.js +0 -35
  1091. package/dist/src/ui/components/CopyModeWarning.test.js.map +0 -1
  1092. package/dist/src/ui/components/DebugProfiler.test.d.ts +0 -6
  1093. package/dist/src/ui/components/DebugProfiler.test.js +0 -228
  1094. package/dist/src/ui/components/DebugProfiler.test.js.map +0 -1
  1095. package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +0 -6
  1096. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +0 -81
  1097. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +0 -1
  1098. package/dist/src/ui/components/DialogManager.test.d.ts +0 -6
  1099. package/dist/src/ui/components/DialogManager.test.js +0 -187
  1100. package/dist/src/ui/components/DialogManager.test.js.map +0 -1
  1101. package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +0 -6
  1102. package/dist/src/ui/components/EditorSettingsDialog.test.js +0 -145
  1103. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +0 -1
  1104. package/dist/src/ui/components/EmptyWalletDialog.test.d.ts +0 -6
  1105. package/dist/src/ui/components/EmptyWalletDialog.test.js +0 -116
  1106. package/dist/src/ui/components/EmptyWalletDialog.test.js.map +0 -1
  1107. package/dist/src/ui/components/ExitPlanModeDialog.test.d.ts +0 -6
  1108. package/dist/src/ui/components/ExitPlanModeDialog.test.js +0 -443
  1109. package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +0 -1
  1110. package/dist/src/ui/components/ExitWarning.test.d.ts +0 -6
  1111. package/dist/src/ui/components/ExitWarning.test.js +0 -58
  1112. package/dist/src/ui/components/ExitWarning.test.js.map +0 -1
  1113. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
  1114. package/dist/src/ui/components/FolderTrustDialog.test.js +0 -342
  1115. package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
  1116. package/dist/src/ui/components/Footer.test.d.ts +0 -6
  1117. package/dist/src/ui/components/Footer.test.js +0 -806
  1118. package/dist/src/ui/components/Footer.test.js.map +0 -1
  1119. package/dist/src/ui/components/FooterConfigDialog.test.d.ts +0 -6
  1120. package/dist/src/ui/components/FooterConfigDialog.test.js +0 -191
  1121. package/dist/src/ui/components/FooterConfigDialog.test.js.map +0 -1
  1122. package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +0 -6
  1123. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +0 -63
  1124. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +0 -1
  1125. package/dist/src/ui/components/GradientRegression.test.d.ts +0 -6
  1126. package/dist/src/ui/components/GradientRegression.test.js +0 -116
  1127. package/dist/src/ui/components/GradientRegression.test.js.map +0 -1
  1128. package/dist/src/ui/components/Header.test.d.ts +0 -6
  1129. package/dist/src/ui/components/Header.test.js +0 -131
  1130. package/dist/src/ui/components/Header.test.js.map +0 -1
  1131. package/dist/src/ui/components/Help.test.d.ts +0 -6
  1132. package/dist/src/ui/components/Help.test.js +0 -67
  1133. package/dist/src/ui/components/Help.test.js.map +0 -1
  1134. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  1135. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -302
  1136. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  1137. package/dist/src/ui/components/HookStatusDisplay.test.d.ts +0 -6
  1138. package/dist/src/ui/components/HookStatusDisplay.test.js +0 -77
  1139. package/dist/src/ui/components/HookStatusDisplay.test.js.map +0 -1
  1140. package/dist/src/ui/components/HooksDialog.test.d.ts +0 -6
  1141. package/dist/src/ui/components/HooksDialog.test.js +0 -175
  1142. package/dist/src/ui/components/HooksDialog.test.js.map +0 -1
  1143. package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +0 -6
  1144. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +0 -78
  1145. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
  1146. package/dist/src/ui/components/InboxDialog.test.d.ts +0 -6
  1147. package/dist/src/ui/components/InboxDialog.test.js +0 -804
  1148. package/dist/src/ui/components/InboxDialog.test.js.map +0 -1
  1149. package/dist/src/ui/components/InputPrompt.test.d.ts +0 -17
  1150. package/dist/src/ui/components/InputPrompt.test.js +0 -4078
  1151. package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
  1152. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  1153. package/dist/src/ui/components/LoadingIndicator.test.js +0 -325
  1154. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  1155. package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +0 -6
  1156. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +0 -74
  1157. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +0 -1
  1158. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
  1159. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -27
  1160. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
  1161. package/dist/src/ui/components/MainContent.test.d.ts +0 -6
  1162. package/dist/src/ui/components/MainContent.test.js +0 -750
  1163. package/dist/src/ui/components/MainContent.test.js.map +0 -1
  1164. package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +0 -6
  1165. package/dist/src/ui/components/MemoryUsageDisplay.test.js +0 -52
  1166. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +0 -1
  1167. package/dist/src/ui/components/ModelDialog.test.d.ts +0 -6
  1168. package/dist/src/ui/components/ModelDialog.test.js +0 -356
  1169. package/dist/src/ui/components/ModelDialog.test.js.map +0 -1
  1170. package/dist/src/ui/components/ModelQuotaDisplay.test.d.ts +0 -6
  1171. package/dist/src/ui/components/ModelQuotaDisplay.test.js +0 -62
  1172. package/dist/src/ui/components/ModelQuotaDisplay.test.js.map +0 -1
  1173. package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
  1174. package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -651
  1175. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
  1176. package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +0 -6
  1177. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +0 -177
  1178. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +0 -1
  1179. package/dist/src/ui/components/NewAgentsNotification.test.d.ts +0 -6
  1180. package/dist/src/ui/components/NewAgentsNotification.test.js +0 -83
  1181. package/dist/src/ui/components/NewAgentsNotification.test.js.map +0 -1
  1182. package/dist/src/ui/components/Notifications.test.d.ts +0 -6
  1183. package/dist/src/ui/components/Notifications.test.js +0 -285
  1184. package/dist/src/ui/components/Notifications.test.js.map +0 -1
  1185. package/dist/src/ui/components/OverageMenuDialog.test.d.ts +0 -6
  1186. package/dist/src/ui/components/OverageMenuDialog.test.js +0 -118
  1187. package/dist/src/ui/components/OverageMenuDialog.test.js.map +0 -1
  1188. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +0 -6
  1189. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -181
  1190. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +0 -1
  1191. package/dist/src/ui/components/PolicyUpdateDialog.test.d.ts +0 -6
  1192. package/dist/src/ui/components/PolicyUpdateDialog.test.js +0 -92
  1193. package/dist/src/ui/components/PolicyUpdateDialog.test.js.map +0 -1
  1194. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
  1195. package/dist/src/ui/components/ProQuotaDialog.test.js +0 -222
  1196. package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
  1197. package/dist/src/ui/components/ProgressBar.test.d.ts +0 -6
  1198. package/dist/src/ui/components/ProgressBar.test.js +0 -28
  1199. package/dist/src/ui/components/ProgressBar.test.js.map +0 -1
  1200. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
  1201. package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -65
  1202. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
  1203. package/dist/src/ui/components/QuittingDisplay.test.d.ts +0 -6
  1204. package/dist/src/ui/components/QuittingDisplay.test.js +0 -60
  1205. package/dist/src/ui/components/QuittingDisplay.test.js.map +0 -1
  1206. package/dist/src/ui/components/QuotaDisplay.test.d.ts +0 -6
  1207. package/dist/src/ui/components/QuotaDisplay.test.js +0 -68
  1208. package/dist/src/ui/components/QuotaDisplay.test.js.map +0 -1
  1209. package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +0 -6
  1210. package/dist/src/ui/components/RawMarkdownIndicator.test.js +0 -38
  1211. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +0 -1
  1212. package/dist/src/ui/components/RewindConfirmation.test.d.ts +0 -6
  1213. package/dist/src/ui/components/RewindConfirmation.test.js +0 -57
  1214. package/dist/src/ui/components/RewindConfirmation.test.js.map +0 -1
  1215. package/dist/src/ui/components/RewindViewer.test.d.ts +0 -6
  1216. package/dist/src/ui/components/RewindViewer.test.js +0 -334
  1217. package/dist/src/ui/components/RewindViewer.test.js.map +0 -1
  1218. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.d.ts +0 -6
  1219. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js +0 -47
  1220. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js.map +0 -1
  1221. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.d.ts +0 -6
  1222. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js +0 -27
  1223. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js.map +0 -1
  1224. package/dist/src/ui/components/SessionBrowser/utils.test.d.ts +0 -6
  1225. package/dist/src/ui/components/SessionBrowser/utils.test.js +0 -108
  1226. package/dist/src/ui/components/SessionBrowser/utils.test.js.map +0 -1
  1227. package/dist/src/ui/components/SessionBrowser.test.d.ts +0 -6
  1228. package/dist/src/ui/components/SessionBrowser.test.js +0 -266
  1229. package/dist/src/ui/components/SessionBrowser.test.js.map +0 -1
  1230. package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
  1231. package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -164
  1232. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
  1233. package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
  1234. package/dist/src/ui/components/SettingsDialog.test.js +0 -1499
  1235. package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
  1236. package/dist/src/ui/components/ShellInputPrompt.test.d.ts +0 -6
  1237. package/dist/src/ui/components/ShellInputPrompt.test.js +0 -201
  1238. package/dist/src/ui/components/ShellInputPrompt.test.js.map +0 -1
  1239. package/dist/src/ui/components/ShellModeIndicator.test.d.ts +0 -6
  1240. package/dist/src/ui/components/ShellModeIndicator.test.js +0 -18
  1241. package/dist/src/ui/components/ShellModeIndicator.test.js.map +0 -1
  1242. package/dist/src/ui/components/ShortcutsHelp.test.d.ts +0 -6
  1243. package/dist/src/ui/components/ShortcutsHelp.test.js +0 -45
  1244. package/dist/src/ui/components/ShortcutsHelp.test.js.map +0 -1
  1245. package/dist/src/ui/components/ShowMoreLines.test.d.ts +0 -6
  1246. package/dist/src/ui/components/ShowMoreLines.test.js +0 -79
  1247. package/dist/src/ui/components/ShowMoreLines.test.js.map +0 -1
  1248. package/dist/src/ui/components/ShowMoreLinesLayout.test.d.ts +0 -1
  1249. package/dist/src/ui/components/ShowMoreLinesLayout.test.js +0 -68
  1250. package/dist/src/ui/components/ShowMoreLinesLayout.test.js.map +0 -1
  1251. package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
  1252. package/dist/src/ui/components/StatsDisplay.test.js +0 -489
  1253. package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
  1254. package/dist/src/ui/components/StatusDisplay.test.d.ts +0 -6
  1255. package/dist/src/ui/components/StatusDisplay.test.js +0 -117
  1256. package/dist/src/ui/components/StatusDisplay.test.js.map +0 -1
  1257. package/dist/src/ui/components/StatusRow.test.d.ts +0 -6
  1258. package/dist/src/ui/components/StatusRow.test.js +0 -99
  1259. package/dist/src/ui/components/StatusRow.test.js.map +0 -1
  1260. package/dist/src/ui/components/StickyHeader.test.d.ts +0 -6
  1261. package/dist/src/ui/components/StickyHeader.test.js +0 -19
  1262. package/dist/src/ui/components/StickyHeader.test.js.map +0 -1
  1263. package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +0 -6
  1264. package/dist/src/ui/components/SuggestionsDisplay.test.js +0 -82
  1265. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +0 -1
  1266. package/dist/src/ui/components/Table.test.d.ts +0 -6
  1267. package/dist/src/ui/components/Table.test.js +0 -72
  1268. package/dist/src/ui/components/Table.test.js.map +0 -1
  1269. package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
  1270. package/dist/src/ui/components/ThemeDialog.test.js +0 -162
  1271. package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
  1272. package/dist/src/ui/components/ThemedGradient.test.d.ts +0 -6
  1273. package/dist/src/ui/components/ThemedGradient.test.js +0 -35
  1274. package/dist/src/ui/components/ThemedGradient.test.js.map +0 -1
  1275. package/dist/src/ui/components/Tips.test.d.ts +0 -6
  1276. package/dist/src/ui/components/Tips.test.js +0 -23
  1277. package/dist/src/ui/components/Tips.test.js.map +0 -1
  1278. package/dist/src/ui/components/ToastDisplay.test.d.ts +0 -6
  1279. package/dist/src/ui/components/ToastDisplay.test.js +0 -167
  1280. package/dist/src/ui/components/ToastDisplay.test.js.map +0 -1
  1281. package/dist/src/ui/components/ToolConfirmationQueue.test.d.ts +0 -6
  1282. package/dist/src/ui/components/ToolConfirmationQueue.test.js +0 -444
  1283. package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +0 -1
  1284. package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
  1285. package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -234
  1286. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
  1287. package/dist/src/ui/components/UpdateNotification.test.d.ts +0 -6
  1288. package/dist/src/ui/components/UpdateNotification.test.js +0 -17
  1289. package/dist/src/ui/components/UpdateNotification.test.js.map +0 -1
  1290. package/dist/src/ui/components/UserIdentity.test.d.ts +0 -6
  1291. package/dist/src/ui/components/UserIdentity.test.js +0 -138
  1292. package/dist/src/ui/components/UserIdentity.test.js.map +0 -1
  1293. package/dist/src/ui/components/ValidationDialog.test.d.ts +0 -6
  1294. package/dist/src/ui/components/ValidationDialog.test.js +0 -162
  1295. package/dist/src/ui/components/ValidationDialog.test.js.map +0 -1
  1296. package/dist/src/ui/components/VoiceModelDialog.test.d.ts +0 -6
  1297. package/dist/src/ui/components/VoiceModelDialog.test.js +0 -68
  1298. package/dist/src/ui/components/VoiceModelDialog.test.js.map +0 -1
  1299. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
  1300. package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -180
  1301. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
  1302. package/dist/src/ui/components/messages/DenseToolMessage.test.d.ts +0 -6
  1303. package/dist/src/ui/components/messages/DenseToolMessage.test.js +0 -406
  1304. package/dist/src/ui/components/messages/DenseToolMessage.test.js.map +0 -1
  1305. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  1306. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -269
  1307. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  1308. package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +0 -6
  1309. package/dist/src/ui/components/messages/ErrorMessage.test.js +0 -25
  1310. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +0 -1
  1311. package/dist/src/ui/components/messages/ExportSessionMessage.test.d.ts +0 -6
  1312. package/dist/src/ui/components/messages/ExportSessionMessage.test.js +0 -32
  1313. package/dist/src/ui/components/messages/ExportSessionMessage.test.js.map +0 -1
  1314. package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +0 -6
  1315. package/dist/src/ui/components/messages/GeminiMessage.test.js +0 -46
  1316. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +0 -1
  1317. package/dist/src/ui/components/messages/HintMessage.test.d.ts +0 -6
  1318. package/dist/src/ui/components/messages/HintMessage.test.js +0 -42
  1319. package/dist/src/ui/components/messages/HintMessage.test.js.map +0 -1
  1320. package/dist/src/ui/components/messages/InfoMessage.test.d.ts +0 -6
  1321. package/dist/src/ui/components/messages/InfoMessage.test.js +0 -31
  1322. package/dist/src/ui/components/messages/InfoMessage.test.js.map +0 -1
  1323. package/dist/src/ui/components/messages/RedirectionConfirmation.test.d.ts +0 -6
  1324. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +0 -35
  1325. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +0 -1
  1326. package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +0 -6
  1327. package/dist/src/ui/components/messages/ShellToolMessage.test.js +0 -290
  1328. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +0 -1
  1329. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.d.ts +0 -1
  1330. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js +0 -92
  1331. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js.map +0 -1
  1332. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.d.ts +0 -6
  1333. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js +0 -69
  1334. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js.map +0 -1
  1335. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.d.ts +0 -6
  1336. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js +0 -164
  1337. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js.map +0 -1
  1338. package/dist/src/ui/components/messages/ThinkingMessage.test.d.ts +0 -6
  1339. package/dist/src/ui/components/messages/ThinkingMessage.test.js +0 -104
  1340. package/dist/src/ui/components/messages/ThinkingMessage.test.js.map +0 -1
  1341. package/dist/src/ui/components/messages/Todo.test.d.ts +0 -6
  1342. package/dist/src/ui/components/messages/Todo.test.js +0 -129
  1343. package/dist/src/ui/components/messages/Todo.test.js.map +0 -1
  1344. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  1345. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -558
  1346. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  1347. package/dist/src/ui/components/messages/ToolGroupDisplay.test.d.ts +0 -6
  1348. package/dist/src/ui/components/messages/ToolGroupDisplay.test.js +0 -210
  1349. package/dist/src/ui/components/messages/ToolGroupDisplay.test.js.map +0 -1
  1350. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.d.ts +0 -6
  1351. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js +0 -147
  1352. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js.map +0 -1
  1353. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
  1354. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -828
  1355. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
  1356. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.d.ts +0 -6
  1357. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js +0 -101
  1358. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js.map +0 -1
  1359. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  1360. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -292
  1361. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  1362. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.d.ts +0 -6
  1363. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +0 -96
  1364. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +0 -1
  1365. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +0 -6
  1366. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +0 -72
  1367. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +0 -1
  1368. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.d.ts +0 -6
  1369. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +0 -88
  1370. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +0 -1
  1371. package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +0 -6
  1372. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +0 -333
  1373. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +0 -1
  1374. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.d.ts +0 -6
  1375. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +0 -77
  1376. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +0 -1
  1377. package/dist/src/ui/components/messages/ToolShared.test.d.ts +0 -6
  1378. package/dist/src/ui/components/messages/ToolShared.test.js +0 -65
  1379. package/dist/src/ui/components/messages/ToolShared.test.js.map +0 -1
  1380. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +0 -6
  1381. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +0 -142
  1382. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +0 -1
  1383. package/dist/src/ui/components/messages/TopicMessage.test.d.ts +0 -6
  1384. package/dist/src/ui/components/messages/TopicMessage.test.js +0 -77
  1385. package/dist/src/ui/components/messages/TopicMessage.test.js.map +0 -1
  1386. package/dist/src/ui/components/messages/UserMessage.test.d.ts +0 -6
  1387. package/dist/src/ui/components/messages/UserMessage.test.js +0 -67
  1388. package/dist/src/ui/components/messages/UserMessage.test.js.map +0 -1
  1389. package/dist/src/ui/components/messages/UserShellMessage.test.d.ts +0 -6
  1390. package/dist/src/ui/components/messages/UserShellMessage.test.js +0 -40
  1391. package/dist/src/ui/components/messages/UserShellMessage.test.js.map +0 -1
  1392. package/dist/src/ui/components/messages/WarningMessage.test.d.ts +0 -6
  1393. package/dist/src/ui/components/messages/WarningMessage.test.js +0 -25
  1394. package/dist/src/ui/components/messages/WarningMessage.test.js.map +0 -1
  1395. package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +0 -6
  1396. package/dist/src/ui/components/shared/BaseSelectionList.test.js +0 -441
  1397. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +0 -1
  1398. package/dist/src/ui/components/shared/BaseSettingsDialog.test.d.ts +0 -6
  1399. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +0 -710
  1400. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +0 -1
  1401. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +0 -6
  1402. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +0 -89
  1403. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +0 -1
  1404. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
  1405. package/dist/src/ui/components/shared/EnumSelector.test.js +0 -83
  1406. package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
  1407. package/dist/src/ui/components/shared/ExpandableText.test.d.ts +0 -6
  1408. package/dist/src/ui/components/shared/ExpandableText.test.js +0 -95
  1409. package/dist/src/ui/components/shared/ExpandableText.test.js.map +0 -1
  1410. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.d.ts +0 -1
  1411. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +0 -47
  1412. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +0 -1
  1413. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  1414. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -161
  1415. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  1416. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
  1417. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -146
  1418. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
  1419. package/dist/src/ui/components/shared/Scrollable.test.d.ts +0 -6
  1420. package/dist/src/ui/components/shared/Scrollable.test.js +0 -143
  1421. package/dist/src/ui/components/shared/Scrollable.test.js.map +0 -1
  1422. package/dist/src/ui/components/shared/ScrollableList.test.d.ts +0 -6
  1423. package/dist/src/ui/components/shared/ScrollableList.test.js +0 -438
  1424. package/dist/src/ui/components/shared/ScrollableList.test.js.map +0 -1
  1425. package/dist/src/ui/components/shared/SearchableList.test.d.ts +0 -6
  1426. package/dist/src/ui/components/shared/SearchableList.test.js +0 -169
  1427. package/dist/src/ui/components/shared/SearchableList.test.js.map +0 -1
  1428. package/dist/src/ui/components/shared/SectionHeader.test.d.ts +0 -6
  1429. package/dist/src/ui/components/shared/SectionHeader.test.js +0 -42
  1430. package/dist/src/ui/components/shared/SectionHeader.test.js.map +0 -1
  1431. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.d.ts +0 -6
  1432. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js +0 -54
  1433. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js.map +0 -1
  1434. package/dist/src/ui/components/shared/TabHeader.test.d.ts +0 -6
  1435. package/dist/src/ui/components/shared/TabHeader.test.js +0 -144
  1436. package/dist/src/ui/components/shared/TabHeader.test.js.map +0 -1
  1437. package/dist/src/ui/components/shared/TextInput.test.d.ts +0 -6
  1438. package/dist/src/ui/components/shared/TextInput.test.js +0 -353
  1439. package/dist/src/ui/components/shared/TextInput.test.js.map +0 -1
  1440. package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +0 -6
  1441. package/dist/src/ui/components/shared/VirtualizedList.test.js +0 -174
  1442. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +0 -1
  1443. package/dist/src/ui/components/shared/performance.test.d.ts +0 -1
  1444. package/dist/src/ui/components/shared/performance.test.js +0 -74
  1445. package/dist/src/ui/components/shared/performance.test.js.map +0 -1
  1446. package/dist/src/ui/components/shared/text-buffer.test.d.ts +0 -6
  1447. package/dist/src/ui/components/shared/text-buffer.test.js +0 -2965
  1448. package/dist/src/ui/components/shared/text-buffer.test.js.map +0 -1
  1449. package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +0 -6
  1450. package/dist/src/ui/components/shared/vim-buffer-actions.test.js +0 -2272
  1451. package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +0 -1
  1452. package/dist/src/ui/components/views/ChatList.test.d.ts +0 -6
  1453. package/dist/src/ui/components/views/ChatList.test.js +0 -45
  1454. package/dist/src/ui/components/views/ChatList.test.js.map +0 -1
  1455. package/dist/src/ui/components/views/ExtensionDetails.test.d.ts +0 -6
  1456. package/dist/src/ui/components/views/ExtensionDetails.test.js +0 -154
  1457. package/dist/src/ui/components/views/ExtensionDetails.test.js.map +0 -1
  1458. package/dist/src/ui/components/views/ExtensionRegistryView.test.d.ts +0 -6
  1459. package/dist/src/ui/components/views/ExtensionRegistryView.test.js +0 -222
  1460. package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +0 -1
  1461. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
  1462. package/dist/src/ui/components/views/ExtensionsList.test.js +0 -145
  1463. package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
  1464. package/dist/src/ui/components/views/McpStatus.test.d.ts +0 -6
  1465. package/dist/src/ui/components/views/McpStatus.test.js +0 -174
  1466. package/dist/src/ui/components/views/McpStatus.test.js.map +0 -1
  1467. package/dist/src/ui/components/views/SkillsList.test.d.ts +0 -6
  1468. package/dist/src/ui/components/views/SkillsList.test.js +0 -99
  1469. package/dist/src/ui/components/views/SkillsList.test.js.map +0 -1
  1470. package/dist/src/ui/components/views/ToolsList.test.d.ts +0 -6
  1471. package/dist/src/ui/components/views/ToolsList.test.js +0 -45
  1472. package/dist/src/ui/components/views/ToolsList.test.js.map +0 -1
  1473. package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
  1474. package/dist/src/ui/contexts/KeypressContext.test.js +0 -1133
  1475. package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
  1476. package/dist/src/ui/contexts/MouseContext.test.d.ts +0 -6
  1477. package/dist/src/ui/contexts/MouseContext.test.js +0 -269
  1478. package/dist/src/ui/contexts/MouseContext.test.js.map +0 -1
  1479. package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +0 -6
  1480. package/dist/src/ui/contexts/ScrollProvider.drag.test.js +0 -320
  1481. package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +0 -1
  1482. package/dist/src/ui/contexts/ScrollProvider.test.d.ts +0 -6
  1483. package/dist/src/ui/contexts/ScrollProvider.test.js +0 -478
  1484. package/dist/src/ui/contexts/ScrollProvider.test.js.map +0 -1
  1485. package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
  1486. package/dist/src/ui/contexts/SessionContext.test.js +0 -213
  1487. package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
  1488. package/dist/src/ui/contexts/SettingsContext.test.d.ts +0 -6
  1489. package/dist/src/ui/contexts/SettingsContext.test.js +0 -106
  1490. package/dist/src/ui/contexts/SettingsContext.test.js.map +0 -1
  1491. package/dist/src/ui/contexts/TerminalContext.test.d.ts +0 -6
  1492. package/dist/src/ui/contexts/TerminalContext.test.js +0 -75
  1493. package/dist/src/ui/contexts/TerminalContext.test.js.map +0 -1
  1494. package/dist/src/ui/contexts/ToolActionsContext.test.d.ts +0 -6
  1495. package/dist/src/ui/contexts/ToolActionsContext.test.js +0 -247
  1496. package/dist/src/ui/contexts/ToolActionsContext.test.js.map +0 -1
  1497. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
  1498. package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -1265
  1499. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
  1500. package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +0 -6
  1501. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +0 -210
  1502. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +0 -1
  1503. package/dist/src/ui/hooks/creditsFlowHandler.test.d.ts +0 -6
  1504. package/dist/src/ui/hooks/creditsFlowHandler.test.js +0 -211
  1505. package/dist/src/ui/hooks/creditsFlowHandler.test.js.map +0 -1
  1506. package/dist/src/ui/hooks/shell-completions/gitProvider.test.d.ts +0 -6
  1507. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js +0 -73
  1508. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js.map +0 -1
  1509. package/dist/src/ui/hooks/shell-completions/npmProvider.test.d.ts +0 -6
  1510. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js +0 -69
  1511. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js.map +0 -1
  1512. package/dist/src/ui/hooks/shellReducer.test.d.ts +0 -6
  1513. package/dist/src/ui/hooks/shellReducer.test.js +0 -341
  1514. package/dist/src/ui/hooks/shellReducer.test.js.map +0 -1
  1515. package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +0 -6
  1516. package/dist/src/ui/hooks/slashCommandProcessor.test.js +0 -881
  1517. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +0 -1
  1518. package/dist/src/ui/hooks/toolMapping.test.d.ts +0 -6
  1519. package/dist/src/ui/hooks/toolMapping.test.js +0 -292
  1520. package/dist/src/ui/hooks/toolMapping.test.js.map +0 -1
  1521. package/dist/src/ui/hooks/useAgentStream.test.d.ts +0 -6
  1522. package/dist/src/ui/hooks/useAgentStream.test.js +0 -161
  1523. package/dist/src/ui/hooks/useAgentStream.test.js.map +0 -1
  1524. package/dist/src/ui/hooks/useAlternateBuffer.test.d.ts +0 -6
  1525. package/dist/src/ui/hooks/useAlternateBuffer.test.js +0 -62
  1526. package/dist/src/ui/hooks/useAlternateBuffer.test.js.map +0 -1
  1527. package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +0 -6
  1528. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +0 -85
  1529. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +0 -1
  1530. package/dist/src/ui/hooks/useApprovalModeIndicator.test.d.ts +0 -6
  1531. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +0 -477
  1532. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +0 -1
  1533. package/dist/src/ui/hooks/useAtCompletion.test.d.ts +0 -6
  1534. package/dist/src/ui/hooks/useAtCompletion.test.js +0 -567
  1535. package/dist/src/ui/hooks/useAtCompletion.test.js.map +0 -1
  1536. package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +0 -6
  1537. package/dist/src/ui/hooks/useAtCompletion_agents.test.js +0 -87
  1538. package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +0 -1
  1539. package/dist/src/ui/hooks/useBackgroundTaskManager.test.d.ts +0 -6
  1540. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js +0 -168
  1541. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js.map +0 -1
  1542. package/dist/src/ui/hooks/useBanner.test.d.ts +0 -6
  1543. package/dist/src/ui/hooks/useBanner.test.js +0 -144
  1544. package/dist/src/ui/hooks/useBanner.test.js.map +0 -1
  1545. package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +0 -6
  1546. package/dist/src/ui/hooks/useBatchedScroll.test.js +0 -62
  1547. package/dist/src/ui/hooks/useBatchedScroll.test.js.map +0 -1
  1548. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +0 -6
  1549. package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -722
  1550. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +0 -1
  1551. package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +0 -6
  1552. package/dist/src/ui/hooks/useConsoleMessages.test.js +0 -201
  1553. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +0 -1
  1554. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
  1555. package/dist/src/ui/hooks/useEditorSettings.test.js +0 -179
  1556. package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
  1557. package/dist/src/ui/hooks/useExecutionLifecycle.test.d.ts +0 -6
  1558. package/dist/src/ui/hooks/useExecutionLifecycle.test.js +0 -903
  1559. package/dist/src/ui/hooks/useExecutionLifecycle.test.js.map +0 -1
  1560. package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +0 -6
  1561. package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -280
  1562. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +0 -1
  1563. package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +0 -6
  1564. package/dist/src/ui/hooks/useFlickerDetector.test.js +0 -106
  1565. package/dist/src/ui/hooks/useFlickerDetector.test.js.map +0 -1
  1566. package/dist/src/ui/hooks/useFocus.test.d.ts +0 -6
  1567. package/dist/src/ui/hooks/useFocus.test.js +0 -140
  1568. package/dist/src/ui/hooks/useFocus.test.js.map +0 -1
  1569. package/dist/src/ui/hooks/useFolderTrust.test.d.ts +0 -6
  1570. package/dist/src/ui/hooks/useFolderTrust.test.js +0 -268
  1571. package/dist/src/ui/hooks/useFolderTrust.test.js.map +0 -1
  1572. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
  1573. package/dist/src/ui/hooks/useGeminiStream.test.js +0 -2855
  1574. package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
  1575. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
  1576. package/dist/src/ui/hooks/useGitBranchName.test.js +0 -237
  1577. package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
  1578. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
  1579. package/dist/src/ui/hooks/useHistoryManager.test.js +0 -259
  1580. package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
  1581. package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +0 -6
  1582. package/dist/src/ui/hooks/useHookDisplayState.test.js +0 -200
  1583. package/dist/src/ui/hooks/useHookDisplayState.test.js.map +0 -1
  1584. package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +0 -6
  1585. package/dist/src/ui/hooks/useIdeTrustListener.test.js +0 -225
  1586. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +0 -1
  1587. package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +0 -6
  1588. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +0 -174
  1589. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +0 -1
  1590. package/dist/src/ui/hooks/useInlineEditBuffer.test.d.ts +0 -6
  1591. package/dist/src/ui/hooks/useInlineEditBuffer.test.js +0 -112
  1592. package/dist/src/ui/hooks/useInlineEditBuffer.test.js.map +0 -1
  1593. package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
  1594. package/dist/src/ui/hooks/useInputHistory.test.js +0 -389
  1595. package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
  1596. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
  1597. package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -238
  1598. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
  1599. package/dist/src/ui/hooks/useKeypress.test.d.ts +0 -6
  1600. package/dist/src/ui/hooks/useKeypress.test.js +0 -198
  1601. package/dist/src/ui/hooks/useKeypress.test.js.map +0 -1
  1602. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
  1603. package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -177
  1604. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
  1605. package/dist/src/ui/hooks/useLogger.test.d.ts +0 -6
  1606. package/dist/src/ui/hooks/useLogger.test.js +0 -44
  1607. package/dist/src/ui/hooks/useLogger.test.js.map +0 -1
  1608. package/dist/src/ui/hooks/useMcpStatus.test.d.ts +0 -6
  1609. package/dist/src/ui/hooks/useMcpStatus.test.js +0 -69
  1610. package/dist/src/ui/hooks/useMcpStatus.test.js.map +0 -1
  1611. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
  1612. package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -62
  1613. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
  1614. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
  1615. package/dist/src/ui/hooks/useMessageQueue.test.js +0 -365
  1616. package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
  1617. package/dist/src/ui/hooks/useModelCommand.test.d.ts +0 -6
  1618. package/dist/src/ui/hooks/useModelCommand.test.js +0 -45
  1619. package/dist/src/ui/hooks/useModelCommand.test.js.map +0 -1
  1620. package/dist/src/ui/hooks/useMouse.test.d.ts +0 -6
  1621. package/dist/src/ui/hooks/useMouse.test.js +0 -52
  1622. package/dist/src/ui/hooks/useMouse.test.js.map +0 -1
  1623. package/dist/src/ui/hooks/useMouseClick.test.d.ts +0 -6
  1624. package/dist/src/ui/hooks/useMouseClick.test.js +0 -68
  1625. package/dist/src/ui/hooks/useMouseClick.test.js.map +0 -1
  1626. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +0 -6
  1627. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +0 -291
  1628. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +0 -1
  1629. package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +0 -6
  1630. package/dist/src/ui/hooks/usePhraseCycler.test.js +0 -187
  1631. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +0 -1
  1632. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
  1633. package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -113
  1634. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
  1635. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
  1636. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -817
  1637. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
  1638. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
  1639. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -168
  1640. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
  1641. package/dist/src/ui/hooks/useRewind.test.d.ts +0 -6
  1642. package/dist/src/ui/hooks/useRewind.test.js +0 -100
  1643. package/dist/src/ui/hooks/useRewind.test.js.map +0 -1
  1644. package/dist/src/ui/hooks/useSelectionList.test.d.ts +0 -6
  1645. package/dist/src/ui/hooks/useSelectionList.test.js +0 -960
  1646. package/dist/src/ui/hooks/useSelectionList.test.js.map +0 -1
  1647. package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +0 -6
  1648. package/dist/src/ui/hooks/useSessionBrowser.test.js +0 -277
  1649. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +0 -1
  1650. package/dist/src/ui/hooks/useSessionResume.test.d.ts +0 -6
  1651. package/dist/src/ui/hooks/useSessionResume.test.js +0 -402
  1652. package/dist/src/ui/hooks/useSessionResume.test.js.map +0 -1
  1653. package/dist/src/ui/hooks/useSettingsNavigation.test.d.ts +0 -6
  1654. package/dist/src/ui/hooks/useSettingsNavigation.test.js +0 -87
  1655. package/dist/src/ui/hooks/useSettingsNavigation.test.js.map +0 -1
  1656. package/dist/src/ui/hooks/useShellCompletion.test.d.ts +0 -6
  1657. package/dist/src/ui/hooks/useShellCompletion.test.js +0 -354
  1658. package/dist/src/ui/hooks/useShellCompletion.test.js.map +0 -1
  1659. package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
  1660. package/dist/src/ui/hooks/useShellHistory.test.js +0 -226
  1661. package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
  1662. package/dist/src/ui/hooks/useShellInactivityStatus.test.d.ts +0 -6
  1663. package/dist/src/ui/hooks/useShellInactivityStatus.test.js +0 -84
  1664. package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +0 -1
  1665. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -10
  1666. package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -977
  1667. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
  1668. package/dist/src/ui/hooks/useSnowfall.test.d.ts +0 -6
  1669. package/dist/src/ui/hooks/useSnowfall.test.js +0 -92
  1670. package/dist/src/ui/hooks/useSnowfall.test.js.map +0 -1
  1671. package/dist/src/ui/hooks/useSuspend.test.d.ts +0 -6
  1672. package/dist/src/ui/hooks/useSuspend.test.js +0 -136
  1673. package/dist/src/ui/hooks/useSuspend.test.js.map +0 -1
  1674. package/dist/src/ui/hooks/useTabbedNavigation.test.d.ts +0 -6
  1675. package/dist/src/ui/hooks/useTabbedNavigation.test.js +0 -243
  1676. package/dist/src/ui/hooks/useTabbedNavigation.test.js.map +0 -1
  1677. package/dist/src/ui/hooks/useTerminalTheme.test.d.ts +0 -6
  1678. package/dist/src/ui/hooks/useTerminalTheme.test.js +0 -169
  1679. package/dist/src/ui/hooks/useTerminalTheme.test.js.map +0 -1
  1680. package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
  1681. package/dist/src/ui/hooks/useTimer.test.js +0 -119
  1682. package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
  1683. package/dist/src/ui/hooks/useTips.test.d.ts +0 -6
  1684. package/dist/src/ui/hooks/useTips.test.js +0 -33
  1685. package/dist/src/ui/hooks/useTips.test.js.map +0 -1
  1686. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
  1687. package/dist/src/ui/hooks/useToolScheduler.test.js +0 -534
  1688. package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
  1689. package/dist/src/ui/hooks/useTurnActivityMonitor.test.d.ts +0 -6
  1690. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +0 -99
  1691. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +0 -1
  1692. package/dist/src/ui/hooks/vim-passthrough.test.d.ts +0 -6
  1693. package/dist/src/ui/hooks/vim-passthrough.test.js +0 -84
  1694. package/dist/src/ui/hooks/vim-passthrough.test.js.map +0 -1
  1695. package/dist/src/ui/hooks/vim.test.d.ts +0 -6
  1696. package/dist/src/ui/hooks/vim.test.js +0 -2156
  1697. package/dist/src/ui/hooks/vim.test.js.map +0 -1
  1698. package/dist/src/ui/key/keyBindings.test.d.ts +0 -6
  1699. package/dist/src/ui/key/keyBindings.test.js +0 -225
  1700. package/dist/src/ui/key/keyBindings.test.js.map +0 -1
  1701. package/dist/src/ui/key/keyMatchers.test.d.ts +0 -6
  1702. package/dist/src/ui/key/keyMatchers.test.js +0 -524
  1703. package/dist/src/ui/key/keyMatchers.test.js.map +0 -1
  1704. package/dist/src/ui/key/keybindingUtils.test.d.ts +0 -6
  1705. package/dist/src/ui/key/keybindingUtils.test.js +0 -121
  1706. package/dist/src/ui/key/keybindingUtils.test.js.map +0 -1
  1707. package/dist/src/ui/layouts/DefaultAppLayout.test.d.ts +0 -6
  1708. package/dist/src/ui/layouts/DefaultAppLayout.test.js +0 -126
  1709. package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +0 -1
  1710. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +0 -6
  1711. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +0 -134
  1712. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +0 -1
  1713. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +0 -6
  1714. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +0 -43
  1715. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +0 -1
  1716. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +0 -6
  1717. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +0 -43
  1718. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +0 -1
  1719. package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +0 -6
  1720. package/dist/src/ui/privacy/PrivacyNotice.test.js +0 -63
  1721. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +0 -1
  1722. package/dist/src/ui/state/extensions.test.d.ts +0 -6
  1723. package/dist/src/ui/state/extensions.test.js +0 -219
  1724. package/dist/src/ui/state/extensions.test.js.map +0 -1
  1725. package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
  1726. package/dist/src/ui/themes/color-utils.test.js +0 -326
  1727. package/dist/src/ui/themes/color-utils.test.js.map +0 -1
  1728. package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
  1729. package/dist/src/ui/themes/theme-manager.test.js +0 -274
  1730. package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
  1731. package/dist/src/ui/themes/theme.test.d.ts +0 -6
  1732. package/dist/src/ui/themes/theme.test.js +0 -171
  1733. package/dist/src/ui/themes/theme.test.js.map +0 -1
  1734. package/dist/src/ui/utils/CodeColorizer.test.d.ts +0 -6
  1735. package/dist/src/ui/utils/CodeColorizer.test.js +0 -74
  1736. package/dist/src/ui/utils/CodeColorizer.test.js.map +0 -1
  1737. package/dist/src/ui/utils/ConsolePatcher.test.d.ts +0 -6
  1738. package/dist/src/ui/utils/ConsolePatcher.test.js +0 -199
  1739. package/dist/src/ui/utils/ConsolePatcher.test.js.map +0 -1
  1740. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  1741. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -175
  1742. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  1743. package/dist/src/ui/utils/TableRenderer.test.d.ts +0 -1
  1744. package/dist/src/ui/utils/TableRenderer.test.js +0 -396
  1745. package/dist/src/ui/utils/TableRenderer.test.js.map +0 -1
  1746. package/dist/src/ui/utils/antigravityUtils.test.d.ts +0 -6
  1747. package/dist/src/ui/utils/antigravityUtils.test.js +0 -54
  1748. package/dist/src/ui/utils/antigravityUtils.test.js.map +0 -1
  1749. package/dist/src/ui/utils/borderStyles.test.d.ts +0 -6
  1750. package/dist/src/ui/utils/borderStyles.test.js +0 -172
  1751. package/dist/src/ui/utils/borderStyles.test.js.map +0 -1
  1752. package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
  1753. package/dist/src/ui/utils/clipboardUtils.test.js +0 -442
  1754. package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
  1755. package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +0 -6
  1756. package/dist/src/ui/utils/clipboardUtils.windows.test.js +0 -56
  1757. package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +0 -1
  1758. package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
  1759. package/dist/src/ui/utils/commandUtils.test.js +0 -511
  1760. package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
  1761. package/dist/src/ui/utils/computeStats.test.d.ts +0 -6
  1762. package/dist/src/ui/utils/computeStats.test.js +0 -279
  1763. package/dist/src/ui/utils/computeStats.test.js.map +0 -1
  1764. package/dist/src/ui/utils/directoryUtils.test.d.ts +0 -6
  1765. package/dist/src/ui/utils/directoryUtils.test.js +0 -239
  1766. package/dist/src/ui/utils/directoryUtils.test.js.map +0 -1
  1767. package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
  1768. package/dist/src/ui/utils/displayUtils.test.js +0 -61
  1769. package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
  1770. package/dist/src/ui/utils/formatters.test.d.ts +0 -6
  1771. package/dist/src/ui/utils/formatters.test.js +0 -152
  1772. package/dist/src/ui/utils/formatters.test.js.map +0 -1
  1773. package/dist/src/ui/utils/highlight.test.d.ts +0 -6
  1774. package/dist/src/ui/utils/highlight.test.js +0 -205
  1775. package/dist/src/ui/utils/highlight.test.js.map +0 -1
  1776. package/dist/src/ui/utils/input.test.d.ts +0 -6
  1777. package/dist/src/ui/utils/input.test.js +0 -44
  1778. package/dist/src/ui/utils/input.test.js.map +0 -1
  1779. package/dist/src/ui/utils/latexToUnicode.test.d.ts +0 -6
  1780. package/dist/src/ui/utils/latexToUnicode.test.js +0 -222
  1781. package/dist/src/ui/utils/latexToUnicode.test.js.map +0 -1
  1782. package/dist/src/ui/utils/markdownParsingUtils.test.d.ts +0 -6
  1783. package/dist/src/ui/utils/markdownParsingUtils.test.js +0 -201
  1784. package/dist/src/ui/utils/markdownParsingUtils.test.js.map +0 -1
  1785. package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
  1786. package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
  1787. package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
  1788. package/dist/src/ui/utils/memorySnapshot.test.d.ts +0 -6
  1789. package/dist/src/ui/utils/memorySnapshot.test.js +0 -62
  1790. package/dist/src/ui/utils/memorySnapshot.test.js.map +0 -1
  1791. package/dist/src/ui/utils/mouse.test.d.ts +0 -6
  1792. package/dist/src/ui/utils/mouse.test.js +0 -136
  1793. package/dist/src/ui/utils/mouse.test.js.map +0 -1
  1794. package/dist/src/ui/utils/pendingAttentionNotification.test.d.ts +0 -6
  1795. package/dist/src/ui/utils/pendingAttentionNotification.test.js +0 -79
  1796. package/dist/src/ui/utils/pendingAttentionNotification.test.js.map +0 -1
  1797. package/dist/src/ui/utils/rewindFileOps.test.d.ts +0 -6
  1798. package/dist/src/ui/utils/rewindFileOps.test.js +0 -375
  1799. package/dist/src/ui/utils/rewindFileOps.test.js.map +0 -1
  1800. package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +0 -6
  1801. package/dist/src/ui/utils/terminalCapabilityManager.test.js +0 -400
  1802. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +0 -1
  1803. package/dist/src/ui/utils/terminalSetup.test.d.ts +0 -6
  1804. package/dist/src/ui/utils/terminalSetup.test.js +0 -201
  1805. package/dist/src/ui/utils/terminalSetup.test.js.map +0 -1
  1806. package/dist/src/ui/utils/textOutput.test.d.ts +0 -6
  1807. package/dist/src/ui/utils/textOutput.test.js +0 -80
  1808. package/dist/src/ui/utils/textOutput.test.js.map +0 -1
  1809. package/dist/src/ui/utils/textUtils.test.d.ts +0 -6
  1810. package/dist/src/ui/utils/textUtils.test.js +0 -430
  1811. package/dist/src/ui/utils/textUtils.test.js.map +0 -1
  1812. package/dist/src/ui/utils/toolLayoutUtils.test.d.ts +0 -6
  1813. package/dist/src/ui/utils/toolLayoutUtils.test.js +0 -187
  1814. package/dist/src/ui/utils/toolLayoutUtils.test.js.map +0 -1
  1815. package/dist/src/ui/utils/ui-sizing.test.d.ts +0 -6
  1816. package/dist/src/ui/utils/ui-sizing.test.js +0 -25
  1817. package/dist/src/ui/utils/ui-sizing.test.js.map +0 -1
  1818. package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
  1819. package/dist/src/ui/utils/updateCheck.test.js +0 -207
  1820. package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
  1821. package/dist/src/ui/utils/urlSecurityUtils.test.d.ts +0 -6
  1822. package/dist/src/ui/utils/urlSecurityUtils.test.js +0 -49
  1823. package/dist/src/ui/utils/urlSecurityUtils.test.js.map +0 -1
  1824. package/dist/src/utils/activityLogger.test.d.ts +0 -6
  1825. package/dist/src/utils/activityLogger.test.js +0 -196
  1826. package/dist/src/utils/activityLogger.test.js.map +0 -1
  1827. package/dist/src/utils/agentSettings.test.d.ts +0 -6
  1828. package/dist/src/utils/agentSettings.test.js +0 -111
  1829. package/dist/src/utils/agentSettings.test.js.map +0 -1
  1830. package/dist/src/utils/agentUtils.test.d.ts +0 -6
  1831. package/dist/src/utils/agentUtils.test.js +0 -121
  1832. package/dist/src/utils/agentUtils.test.js.map +0 -1
  1833. package/dist/src/utils/cleanup.test.d.ts +0 -6
  1834. package/dist/src/utils/cleanup.test.js +0 -256
  1835. package/dist/src/utils/cleanup.test.js.map +0 -1
  1836. package/dist/src/utils/commands.test.d.ts +0 -6
  1837. package/dist/src/utils/commands.test.js +0 -194
  1838. package/dist/src/utils/commands.test.js.map +0 -1
  1839. package/dist/src/utils/commentJson.test.d.ts +0 -6
  1840. package/dist/src/utils/commentJson.test.js +0 -308
  1841. package/dist/src/utils/commentJson.test.js.map +0 -1
  1842. package/dist/src/utils/deepMerge.test.d.ts +0 -6
  1843. package/dist/src/utils/deepMerge.test.js +0 -211
  1844. package/dist/src/utils/deepMerge.test.js.map +0 -1
  1845. package/dist/src/utils/devtoolsService.test.d.ts +0 -6
  1846. package/dist/src/utils/devtoolsService.test.js +0 -346
  1847. package/dist/src/utils/devtoolsService.test.js.map +0 -1
  1848. package/dist/src/utils/dialogScopeUtils.test.d.ts +0 -6
  1849. package/dist/src/utils/dialogScopeUtils.test.js +0 -81
  1850. package/dist/src/utils/dialogScopeUtils.test.js.map +0 -1
  1851. package/dist/src/utils/envVarResolver.test.d.ts +0 -6
  1852. package/dist/src/utils/envVarResolver.test.js +0 -238
  1853. package/dist/src/utils/envVarResolver.test.js.map +0 -1
  1854. package/dist/src/utils/errors.test.d.ts +0 -6
  1855. package/dist/src/utils/errors.test.js +0 -420
  1856. package/dist/src/utils/errors.test.js.map +0 -1
  1857. package/dist/src/utils/events.test.d.ts +0 -6
  1858. package/dist/src/utils/events.test.js +0 -24
  1859. package/dist/src/utils/events.test.js.map +0 -1
  1860. package/dist/src/utils/featureToggleUtils.test.d.ts +0 -6
  1861. package/dist/src/utils/featureToggleUtils.test.js +0 -126
  1862. package/dist/src/utils/featureToggleUtils.test.js.map +0 -1
  1863. package/dist/src/utils/gitUtils.test.d.ts +0 -6
  1864. package/dist/src/utils/gitUtils.test.js +0 -172
  1865. package/dist/src/utils/gitUtils.test.js.map +0 -1
  1866. package/dist/src/utils/handleAutoUpdate.test.d.ts +0 -6
  1867. package/dist/src/utils/handleAutoUpdate.test.js +0 -399
  1868. package/dist/src/utils/handleAutoUpdate.test.js.map +0 -1
  1869. package/dist/src/utils/hookSettings.test.d.ts +0 -6
  1870. package/dist/src/utils/hookSettings.test.js +0 -117
  1871. package/dist/src/utils/hookSettings.test.js.map +0 -1
  1872. package/dist/src/utils/hookUtils.test.d.ts +0 -6
  1873. package/dist/src/utils/hookUtils.test.js +0 -113
  1874. package/dist/src/utils/hookUtils.test.js.map +0 -1
  1875. package/dist/src/utils/installationInfo.test.d.ts +0 -6
  1876. package/dist/src/utils/installationInfo.test.js +0 -322
  1877. package/dist/src/utils/installationInfo.test.js.map +0 -1
  1878. package/dist/src/utils/jsonoutput.test.d.ts +0 -6
  1879. package/dist/src/utils/jsonoutput.test.js +0 -74
  1880. package/dist/src/utils/jsonoutput.test.js.map +0 -1
  1881. package/dist/src/utils/logCleanup.test.d.ts +0 -6
  1882. package/dist/src/utils/logCleanup.test.js +0 -87
  1883. package/dist/src/utils/logCleanup.test.js.map +0 -1
  1884. package/dist/src/utils/math.test.d.ts +0 -6
  1885. package/dist/src/utils/math.test.js +0 -23
  1886. package/dist/src/utils/math.test.js.map +0 -1
  1887. package/dist/src/utils/persistentState.test.d.ts +0 -6
  1888. package/dist/src/utils/persistentState.test.js +0 -68
  1889. package/dist/src/utils/persistentState.test.js.map +0 -1
  1890. package/dist/src/utils/processUtils.test.d.ts +0 -6
  1891. package/dist/src/utils/processUtils.test.js +0 -150
  1892. package/dist/src/utils/processUtils.test.js.map +0 -1
  1893. package/dist/src/utils/readStdin.test.d.ts +0 -6
  1894. package/dist/src/utils/readStdin.test.js +0 -149
  1895. package/dist/src/utils/readStdin.test.js.map +0 -1
  1896. package/dist/src/utils/readStdin_safety.test.d.ts +0 -6
  1897. package/dist/src/utils/readStdin_safety.test.js +0 -68
  1898. package/dist/src/utils/readStdin_safety.test.js.map +0 -1
  1899. package/dist/src/utils/relaunch.test.d.ts +0 -6
  1900. package/dist/src/utils/relaunch.test.js +0 -275
  1901. package/dist/src/utils/relaunch.test.js.map +0 -1
  1902. package/dist/src/utils/resolvePath.test.d.ts +0 -6
  1903. package/dist/src/utils/resolvePath.test.js +0 -34
  1904. package/dist/src/utils/resolvePath.test.js.map +0 -1
  1905. package/dist/src/utils/sandbox.test.d.ts +0 -6
  1906. package/dist/src/utils/sandbox.test.js +0 -725
  1907. package/dist/src/utils/sandbox.test.js.map +0 -1
  1908. package/dist/src/utils/sandboxUtils.test.d.ts +0 -6
  1909. package/dist/src/utils/sandboxUtils.test.js +0 -190
  1910. package/dist/src/utils/sandboxUtils.test.js.map +0 -1
  1911. package/dist/src/utils/sessionCleanup.integration.test.d.ts +0 -6
  1912. package/dist/src/utils/sessionCleanup.integration.test.js +0 -276
  1913. package/dist/src/utils/sessionCleanup.integration.test.js.map +0 -1
  1914. package/dist/src/utils/sessionCleanup.test.d.ts +0 -6
  1915. package/dist/src/utils/sessionCleanup.test.js +0 -829
  1916. package/dist/src/utils/sessionCleanup.test.js.map +0 -1
  1917. package/dist/src/utils/sessionUtils.test.d.ts +0 -6
  1918. package/dist/src/utils/sessionUtils.test.js +0 -815
  1919. package/dist/src/utils/sessionUtils.test.js.map +0 -1
  1920. package/dist/src/utils/sessions.test.d.ts +0 -6
  1921. package/dist/src/utils/sessions.test.js +0 -580
  1922. package/dist/src/utils/sessions.test.js.map +0 -1
  1923. package/dist/src/utils/settingsUtils.test.d.ts +0 -6
  1924. package/dist/src/utils/settingsUtils.test.js +0 -673
  1925. package/dist/src/utils/settingsUtils.test.js.map +0 -1
  1926. package/dist/src/utils/skillSettings.test.d.ts +0 -6
  1927. package/dist/src/utils/skillSettings.test.js +0 -142
  1928. package/dist/src/utils/skillSettings.test.js.map +0 -1
  1929. package/dist/src/utils/skillUtils.test.d.ts +0 -6
  1930. package/dist/src/utils/skillUtils.test.js +0 -248
  1931. package/dist/src/utils/skillUtils.test.js.map +0 -1
  1932. package/dist/src/utils/startupWarnings.test.d.ts +0 -6
  1933. package/dist/src/utils/startupWarnings.test.js +0 -61
  1934. package/dist/src/utils/startupWarnings.test.js.map +0 -1
  1935. package/dist/src/utils/terminalNotifications.test.d.ts +0 -6
  1936. package/dist/src/utils/terminalNotifications.test.js +0 -219
  1937. package/dist/src/utils/terminalNotifications.test.js.map +0 -1
  1938. package/dist/src/utils/terminalTheme.test.d.ts +0 -6
  1939. package/dist/src/utils/terminalTheme.test.js +0 -91
  1940. package/dist/src/utils/terminalTheme.test.js.map +0 -1
  1941. package/dist/src/utils/tierUtils.test.d.ts +0 -6
  1942. package/dist/src/utils/tierUtils.test.js +0 -25
  1943. package/dist/src/utils/tierUtils.test.js.map +0 -1
  1944. package/dist/src/utils/toolOutputCleanup.test.d.ts +0 -6
  1945. package/dist/src/utils/toolOutputCleanup.test.js +0 -280
  1946. package/dist/src/utils/toolOutputCleanup.test.js.map +0 -1
  1947. package/dist/src/utils/updateEventEmitter.test.d.ts +0 -6
  1948. package/dist/src/utils/updateEventEmitter.test.js +0 -18
  1949. package/dist/src/utils/updateEventEmitter.test.js.map +0 -1
  1950. package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
  1951. package/dist/src/utils/userStartupWarnings.test.js +0 -225
  1952. package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
  1953. package/dist/src/utils/windowTitle.test.d.ts +0 -6
  1954. package/dist/src/utils/windowTitle.test.js +0 -216
  1955. package/dist/src/utils/windowTitle.test.js.map +0 -1
  1956. package/dist/src/utils/worktreeSetup.test.d.ts +0 -6
  1957. package/dist/src/utils/worktreeSetup.test.js +0 -89
  1958. package/dist/src/utils/worktreeSetup.test.js.map +0 -1
  1959. package/dist/src/validateNonInterActiveAuth.test.d.ts +0 -6
  1960. package/dist/src/validateNonInterActiveAuth.test.js +0 -319
  1961. package/dist/src/validateNonInterActiveAuth.test.js.map +0 -1
@@ -1,2965 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
7
- import stripAnsi from 'strip-ansi';
8
- import { act } from 'react';
9
- import * as fs from 'node:fs';
10
- import * as path from 'node:path';
11
- import * as os from 'node:os';
12
- import { renderHook, renderHookWithProviders, } from '../../../test-utils/render.js';
13
- import { useTextBuffer, offsetToLogicalPos, logicalPosToOffset, textBufferReducer, findWordEndInLine, findNextWordStartInLine, findNextBigWordStartInLine, findPrevBigWordStartInLine, findBigWordEndInLine, isWordCharStrict, calculateTransformationsForLine, calculateTransformedLine, getTransformUnderCursor, getTransformedImagePath, } from './text-buffer.js';
14
- import { cpLen } from '../../utils/textUtils.js';
15
- import {} from '../../hooks/useKeypress.js';
16
- import { escapePath } from '@google/gemini-cli-core';
17
- vi.mock('../../contexts/SettingsContext.js', async (importOriginal) => {
18
- const actual = await importOriginal();
19
- return {
20
- ...actual,
21
- useSettings: () => ({
22
- merged: { general: { openEditorInNewWindow: false } },
23
- }),
24
- };
25
- });
26
- const defaultVisualLayout = {
27
- visualLines: [''],
28
- logicalToVisualMap: [[[0, 0]]],
29
- visualToLogicalMap: [[0, 0]],
30
- transformedToLogicalMaps: [[]],
31
- visualToTransformedMap: [],
32
- };
33
- const initialState = {
34
- lines: [''],
35
- cursorRow: 0,
36
- cursorCol: 0,
37
- preferredCol: null,
38
- undoStack: [],
39
- redoStack: [],
40
- clipboard: null,
41
- selectionAnchor: null,
42
- viewportWidth: 80,
43
- viewportHeight: 24,
44
- transformationsByLine: [[]],
45
- visualLayout: defaultVisualLayout,
46
- pastedContent: {},
47
- expandedPaste: null,
48
- yankRegister: null,
49
- };
50
- /**
51
- * Helper to create a TextBufferState with properly calculated transformations.
52
- */
53
- function createStateWithTransformations(partial) {
54
- const state = { ...initialState, ...partial };
55
- return {
56
- ...state,
57
- transformationsByLine: state.lines.map((l) => calculateTransformationsForLine(l)),
58
- };
59
- }
60
- describe('textBufferReducer', () => {
61
- afterEach(() => {
62
- vi.restoreAllMocks();
63
- });
64
- it('should return the initial state if state is undefined', async () => {
65
- const action = { type: 'unknown_action' };
66
- const state = textBufferReducer(initialState, action);
67
- expect(state).toHaveOnlyValidCharacters();
68
- expect(state).toEqual(initialState);
69
- });
70
- describe('Big Word Navigation Helpers', () => {
71
- describe('findNextBigWordStartInLine (W)', () => {
72
- it('should skip non-whitespace and then whitespace', async () => {
73
- expect(findNextBigWordStartInLine('hello world', 0)).toBe(6);
74
- expect(findNextBigWordStartInLine('hello.world test', 0)).toBe(12);
75
- expect(findNextBigWordStartInLine(' test', 0)).toBe(3);
76
- expect(findNextBigWordStartInLine('test ', 0)).toBe(null);
77
- });
78
- });
79
- describe('findPrevBigWordStartInLine (B)', () => {
80
- it('should skip whitespace backwards then non-whitespace', async () => {
81
- expect(findPrevBigWordStartInLine('hello world', 6)).toBe(0);
82
- expect(findPrevBigWordStartInLine('hello.world test', 12)).toBe(0);
83
- expect(findPrevBigWordStartInLine(' test', 3)).toBe(null); // At start of word
84
- expect(findPrevBigWordStartInLine(' test', 4)).toBe(3); // Inside word
85
- expect(findPrevBigWordStartInLine('test ', 6)).toBe(0);
86
- });
87
- });
88
- describe('findBigWordEndInLine (E)', () => {
89
- it('should find end of current big word', async () => {
90
- expect(findBigWordEndInLine('hello world', 0)).toBe(4);
91
- expect(findBigWordEndInLine('hello.world test', 0)).toBe(10);
92
- expect(findBigWordEndInLine('hello.world test', 11)).toBe(15);
93
- });
94
- it('should skip whitespace if currently on whitespace', async () => {
95
- expect(findBigWordEndInLine('hello world', 5)).toBe(12);
96
- });
97
- it('should find next big word end if at end of current', async () => {
98
- expect(findBigWordEndInLine('hello world', 4)).toBe(10);
99
- });
100
- });
101
- });
102
- describe('set_text action', () => {
103
- it('should set new text and move cursor to the end', async () => {
104
- const action = {
105
- type: 'set_text',
106
- payload: 'hello\nworld',
107
- };
108
- const state = textBufferReducer(initialState, action);
109
- expect(state).toHaveOnlyValidCharacters();
110
- expect(state.lines).toEqual(['hello', 'world']);
111
- expect(state.cursorRow).toBe(1);
112
- expect(state.cursorCol).toBe(5);
113
- expect(state.undoStack.length).toBe(1);
114
- });
115
- it('should not create an undo snapshot if pushToUndo is false', async () => {
116
- const action = {
117
- type: 'set_text',
118
- payload: 'no undo',
119
- pushToUndo: false,
120
- };
121
- const state = textBufferReducer(initialState, action);
122
- expect(state).toHaveOnlyValidCharacters();
123
- expect(state.lines).toEqual(['no undo']);
124
- expect(state.undoStack.length).toBe(0);
125
- });
126
- });
127
- describe('insert action', () => {
128
- it('should insert a character', async () => {
129
- const action = { type: 'insert', payload: 'a' };
130
- const state = textBufferReducer(initialState, action);
131
- expect(state).toHaveOnlyValidCharacters();
132
- expect(state.lines).toEqual(['a']);
133
- expect(state.cursorCol).toBe(1);
134
- });
135
- it('should insert a newline', async () => {
136
- const stateWithText = { ...initialState, lines: ['hello'] };
137
- const action = { type: 'insert', payload: '\n' };
138
- const state = textBufferReducer(stateWithText, action);
139
- expect(state).toHaveOnlyValidCharacters();
140
- expect(state.lines).toEqual(['', 'hello']);
141
- expect(state.cursorRow).toBe(1);
142
- expect(state.cursorCol).toBe(0);
143
- });
144
- });
145
- describe('insert action with options', () => {
146
- it('should filter input using inputFilter option', async () => {
147
- const action = { type: 'insert', payload: 'a1b2c3' };
148
- const options = {
149
- inputFilter: (text) => text.replace(/[0-9]/g, ''),
150
- };
151
- const state = textBufferReducer(initialState, action, options);
152
- expect(state.lines).toEqual(['abc']);
153
- expect(state.cursorCol).toBe(3);
154
- });
155
- it('should strip newlines when singleLine option is true', async () => {
156
- const action = {
157
- type: 'insert',
158
- payload: 'hello\nworld',
159
- };
160
- const options = { singleLine: true };
161
- const state = textBufferReducer(initialState, action, options);
162
- expect(state.lines).toEqual(['helloworld']);
163
- expect(state.cursorCol).toBe(10);
164
- });
165
- it('should apply both inputFilter and singleLine options', async () => {
166
- const action = {
167
- type: 'insert',
168
- payload: 'h\ne\nl\nl\no\n1\n2\n3',
169
- };
170
- const options = {
171
- singleLine: true,
172
- inputFilter: (text) => text.replace(/[0-9]/g, ''),
173
- };
174
- const state = textBufferReducer(initialState, action, options);
175
- expect(state.lines).toEqual(['hello']);
176
- expect(state.cursorCol).toBe(5);
177
- });
178
- });
179
- describe('add_pasted_content action', () => {
180
- it('should add content to pastedContent Record', async () => {
181
- const action = {
182
- type: 'add_pasted_content',
183
- payload: { id: '[Pasted Text: 6 lines]', text: 'large content' },
184
- };
185
- const state = textBufferReducer(initialState, action);
186
- expect(state.pastedContent).toEqual({
187
- '[Pasted Text: 6 lines]': 'large content',
188
- });
189
- });
190
- });
191
- describe('backspace action', () => {
192
- it('should remove a character', async () => {
193
- const stateWithText = {
194
- ...initialState,
195
- lines: ['a'],
196
- cursorRow: 0,
197
- cursorCol: 1,
198
- };
199
- const action = { type: 'backspace' };
200
- const state = textBufferReducer(stateWithText, action);
201
- expect(state).toHaveOnlyValidCharacters();
202
- expect(state.lines).toEqual(['']);
203
- expect(state.cursorCol).toBe(0);
204
- });
205
- it('should join lines if at the beginning of a line', async () => {
206
- const stateWithText = {
207
- ...initialState,
208
- lines: ['hello', 'world'],
209
- cursorRow: 1,
210
- cursorCol: 0,
211
- };
212
- const action = { type: 'backspace' };
213
- const state = textBufferReducer(stateWithText, action);
214
- expect(state).toHaveOnlyValidCharacters();
215
- expect(state.lines).toEqual(['helloworld']);
216
- expect(state.cursorRow).toBe(0);
217
- expect(state.cursorCol).toBe(5);
218
- });
219
- });
220
- describe('atomic placeholder deletion', () => {
221
- describe('paste placeholders', () => {
222
- it('backspace at end of paste placeholder removes entire placeholder', async () => {
223
- const placeholder = '[Pasted Text: 6 lines]';
224
- const stateWithPlaceholder = createStateWithTransformations({
225
- lines: [placeholder],
226
- cursorRow: 0,
227
- cursorCol: placeholder.length, // cursor at end
228
- pastedContent: {
229
- [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
230
- },
231
- });
232
- const action = { type: 'backspace' };
233
- const state = textBufferReducer(stateWithPlaceholder, action);
234
- expect(state).toHaveOnlyValidCharacters();
235
- expect(state.lines).toEqual(['']);
236
- expect(state.cursorCol).toBe(0);
237
- // pastedContent should be cleaned up
238
- expect(state.pastedContent[placeholder]).toBeUndefined();
239
- });
240
- it('delete at start of paste placeholder removes entire placeholder', async () => {
241
- const placeholder = '[Pasted Text: 6 lines]';
242
- const stateWithPlaceholder = createStateWithTransformations({
243
- lines: [placeholder],
244
- cursorRow: 0,
245
- cursorCol: 0, // cursor at start
246
- pastedContent: {
247
- [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
248
- },
249
- });
250
- const action = { type: 'delete' };
251
- const state = textBufferReducer(stateWithPlaceholder, action);
252
- expect(state).toHaveOnlyValidCharacters();
253
- expect(state.lines).toEqual(['']);
254
- expect(state.cursorCol).toBe(0);
255
- // pastedContent should be cleaned up
256
- expect(state.pastedContent[placeholder]).toBeUndefined();
257
- });
258
- it('backspace inside paste placeholder does normal deletion', async () => {
259
- const placeholder = '[Pasted Text: 6 lines]';
260
- const stateWithPlaceholder = createStateWithTransformations({
261
- lines: [placeholder],
262
- cursorRow: 0,
263
- cursorCol: 10, // cursor in middle
264
- pastedContent: {
265
- [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
266
- },
267
- });
268
- const action = { type: 'backspace' };
269
- const state = textBufferReducer(stateWithPlaceholder, action);
270
- expect(state).toHaveOnlyValidCharacters();
271
- // Should only delete one character
272
- expect(state.lines[0].length).toBe(placeholder.length - 1);
273
- expect(state.cursorCol).toBe(9);
274
- // pastedContent should NOT be cleaned up (placeholder is broken)
275
- expect(state.pastedContent[placeholder]).toBeDefined();
276
- });
277
- });
278
- describe('image placeholders', () => {
279
- it('backspace at end of image path removes entire path', async () => {
280
- const imagePath = '@test.png';
281
- const stateWithImage = createStateWithTransformations({
282
- lines: [imagePath],
283
- cursorRow: 0,
284
- cursorCol: imagePath.length, // cursor at end
285
- });
286
- const action = { type: 'backspace' };
287
- const state = textBufferReducer(stateWithImage, action);
288
- expect(state).toHaveOnlyValidCharacters();
289
- expect(state.lines).toEqual(['']);
290
- expect(state.cursorCol).toBe(0);
291
- });
292
- it('delete at start of image path removes entire path', async () => {
293
- const imagePath = '@test.png';
294
- const stateWithImage = createStateWithTransformations({
295
- lines: [imagePath],
296
- cursorRow: 0,
297
- cursorCol: 0, // cursor at start
298
- });
299
- const action = { type: 'delete' };
300
- const state = textBufferReducer(stateWithImage, action);
301
- expect(state).toHaveOnlyValidCharacters();
302
- expect(state.lines).toEqual(['']);
303
- expect(state.cursorCol).toBe(0);
304
- });
305
- it('backspace inside image path does normal deletion', async () => {
306
- const imagePath = '@test.png';
307
- const stateWithImage = createStateWithTransformations({
308
- lines: [imagePath],
309
- cursorRow: 0,
310
- cursorCol: 5, // cursor in middle
311
- });
312
- const action = { type: 'backspace' };
313
- const state = textBufferReducer(stateWithImage, action);
314
- expect(state).toHaveOnlyValidCharacters();
315
- // Should only delete one character
316
- expect(state.lines[0].length).toBe(imagePath.length - 1);
317
- expect(state.cursorCol).toBe(4);
318
- });
319
- });
320
- describe('undo behavior', () => {
321
- it('undo after placeholder deletion restores everything', async () => {
322
- const placeholder = '[Pasted Text: 6 lines]';
323
- const pasteContent = 'line1\nline2\nline3\nline4\nline5\nline6';
324
- const stateWithPlaceholder = createStateWithTransformations({
325
- lines: [placeholder],
326
- cursorRow: 0,
327
- cursorCol: placeholder.length,
328
- pastedContent: { [placeholder]: pasteContent },
329
- });
330
- // Delete the placeholder
331
- const deleteAction = { type: 'backspace' };
332
- const stateAfterDelete = textBufferReducer(stateWithPlaceholder, deleteAction);
333
- expect(stateAfterDelete.lines).toEqual(['']);
334
- expect(stateAfterDelete.pastedContent[placeholder]).toBeUndefined();
335
- // Undo should restore
336
- const undoAction = { type: 'undo' };
337
- const stateAfterUndo = textBufferReducer(stateAfterDelete, undoAction);
338
- expect(stateAfterUndo).toHaveOnlyValidCharacters();
339
- expect(stateAfterUndo.lines).toEqual([placeholder]);
340
- expect(stateAfterUndo.pastedContent[placeholder]).toBe(pasteContent);
341
- });
342
- });
343
- });
344
- describe('undo/redo actions', () => {
345
- it('should undo and redo a change', async () => {
346
- // 1. Insert text
347
- const insertAction = {
348
- type: 'insert',
349
- payload: 'test',
350
- };
351
- const stateAfterInsert = textBufferReducer(initialState, insertAction);
352
- expect(stateAfterInsert).toHaveOnlyValidCharacters();
353
- expect(stateAfterInsert.lines).toEqual(['test']);
354
- expect(stateAfterInsert.undoStack.length).toBe(1);
355
- // 2. Undo
356
- const undoAction = { type: 'undo' };
357
- const stateAfterUndo = textBufferReducer(stateAfterInsert, undoAction);
358
- expect(stateAfterUndo).toHaveOnlyValidCharacters();
359
- expect(stateAfterUndo.lines).toEqual(['']);
360
- expect(stateAfterUndo.undoStack.length).toBe(0);
361
- expect(stateAfterUndo.redoStack.length).toBe(1);
362
- // 3. Redo
363
- const redoAction = { type: 'redo' };
364
- const stateAfterRedo = textBufferReducer(stateAfterUndo, redoAction);
365
- expect(stateAfterRedo).toHaveOnlyValidCharacters();
366
- expect(stateAfterRedo.lines).toEqual(['test']);
367
- expect(stateAfterRedo.undoStack.length).toBe(1);
368
- expect(stateAfterRedo.redoStack.length).toBe(0);
369
- });
370
- });
371
- describe('create_undo_snapshot action', () => {
372
- it('should create a snapshot without changing state', async () => {
373
- const stateWithText = {
374
- ...initialState,
375
- lines: ['hello'],
376
- cursorRow: 0,
377
- cursorCol: 5,
378
- };
379
- const action = { type: 'create_undo_snapshot' };
380
- const state = textBufferReducer(stateWithText, action);
381
- expect(state).toHaveOnlyValidCharacters();
382
- expect(state.lines).toEqual(['hello']);
383
- expect(state.cursorRow).toBe(0);
384
- expect(state.cursorCol).toBe(5);
385
- expect(state.undoStack.length).toBe(1);
386
- expect(state.undoStack[0].lines).toEqual(['hello']);
387
- expect(state.undoStack[0].cursorRow).toBe(0);
388
- expect(state.undoStack[0].cursorCol).toBe(5);
389
- });
390
- });
391
- describe('delete_word_left action', () => {
392
- const createSingleLineState = (text, col) => ({
393
- ...initialState,
394
- lines: [text],
395
- cursorRow: 0,
396
- cursorCol: col,
397
- });
398
- it.each([
399
- {
400
- input: 'hello world',
401
- cursorCol: 11,
402
- expectedLines: ['hello '],
403
- expectedCol: 6,
404
- desc: 'simple word',
405
- },
406
- {
407
- input: 'path/to/file',
408
- cursorCol: 12,
409
- expectedLines: ['path/to/'],
410
- expectedCol: 8,
411
- desc: 'path segment',
412
- },
413
- {
414
- input: 'variable_name',
415
- cursorCol: 13,
416
- expectedLines: ['variable_'],
417
- expectedCol: 9,
418
- desc: 'variable_name parts',
419
- },
420
- ])('should delete $desc', ({ input, cursorCol, expectedLines, expectedCol }) => {
421
- const state = textBufferReducer(createSingleLineState(input, cursorCol), { type: 'delete_word_left' });
422
- expect(state.lines).toEqual(expectedLines);
423
- expect(state.cursorCol).toBe(expectedCol);
424
- });
425
- it('should act like backspace at the beginning of a line', async () => {
426
- const stateWithText = {
427
- ...initialState,
428
- lines: ['hello', 'world'],
429
- cursorRow: 1,
430
- cursorCol: 0,
431
- };
432
- const state = textBufferReducer(stateWithText, {
433
- type: 'delete_word_left',
434
- });
435
- expect(state.lines).toEqual(['helloworld']);
436
- expect(state.cursorRow).toBe(0);
437
- expect(state.cursorCol).toBe(5);
438
- });
439
- });
440
- describe('delete_word_right action', () => {
441
- const createSingleLineState = (text, col) => ({
442
- ...initialState,
443
- lines: [text],
444
- cursorRow: 0,
445
- cursorCol: col,
446
- });
447
- it.each([
448
- {
449
- input: 'hello world',
450
- cursorCol: 0,
451
- expectedLines: ['world'],
452
- expectedCol: 0,
453
- desc: 'simple word',
454
- },
455
- {
456
- input: 'variable_name',
457
- cursorCol: 0,
458
- expectedLines: ['_name'],
459
- expectedCol: 0,
460
- desc: 'variable_name parts',
461
- },
462
- ])('should delete $desc', ({ input, cursorCol, expectedLines, expectedCol }) => {
463
- const state = textBufferReducer(createSingleLineState(input, cursorCol), { type: 'delete_word_right' });
464
- expect(state.lines).toEqual(expectedLines);
465
- expect(state.cursorCol).toBe(expectedCol);
466
- });
467
- it('should delete path segments progressively', async () => {
468
- const stateWithText = {
469
- ...initialState,
470
- lines: ['path/to/file'],
471
- cursorRow: 0,
472
- cursorCol: 0,
473
- };
474
- let state = textBufferReducer(stateWithText, {
475
- type: 'delete_word_right',
476
- });
477
- expect(state.lines).toEqual(['/to/file']);
478
- state = textBufferReducer(state, { type: 'delete_word_right' });
479
- expect(state.lines).toEqual(['to/file']);
480
- });
481
- it('should act like delete at the end of a line', async () => {
482
- const stateWithText = {
483
- ...initialState,
484
- lines: ['hello', 'world'],
485
- cursorRow: 0,
486
- cursorCol: 5,
487
- };
488
- const state = textBufferReducer(stateWithText, {
489
- type: 'delete_word_right',
490
- });
491
- expect(state.lines).toEqual(['helloworld']);
492
- expect(state.cursorRow).toBe(0);
493
- expect(state.cursorCol).toBe(5);
494
- });
495
- });
496
- describe('kill_line_left action', () => {
497
- it('should clean up pastedContent when deleting a placeholder line-left', async () => {
498
- const placeholder = '[Pasted Text: 6 lines]';
499
- const stateWithPlaceholder = createStateWithTransformations({
500
- lines: [placeholder],
501
- cursorRow: 0,
502
- cursorCol: cpLen(placeholder),
503
- pastedContent: {
504
- [placeholder]: 'line1\nline2\nline3\nline4\nline5\nline6',
505
- },
506
- });
507
- const state = textBufferReducer(stateWithPlaceholder, {
508
- type: 'kill_line_left',
509
- });
510
- expect(state.lines).toEqual(['']);
511
- expect(state.cursorCol).toBe(0);
512
- expect(Object.keys(state.pastedContent)).toHaveLength(0);
513
- });
514
- });
515
- describe('kill_line_right action', () => {
516
- it('should reset preferredCol when deleting to end of line', async () => {
517
- const stateWithText = {
518
- ...initialState,
519
- lines: ['hello world'],
520
- cursorRow: 0,
521
- cursorCol: 5,
522
- preferredCol: 9,
523
- };
524
- const state = textBufferReducer(stateWithText, {
525
- type: 'kill_line_right',
526
- });
527
- expect(state.lines).toEqual(['hello']);
528
- expect(state.preferredCol).toBe(null);
529
- });
530
- });
531
- describe('toggle_paste_expansion action', () => {
532
- const placeholder = '[Pasted Text: 6 lines]';
533
- const content = 'line1\nline2\nline3\nline4\nline5\nline6';
534
- it('should expand a placeholder correctly', async () => {
535
- const stateWithPlaceholder = createStateWithTransformations({
536
- lines: ['prefix ' + placeholder + ' suffix'],
537
- cursorRow: 0,
538
- cursorCol: 0,
539
- pastedContent: { [placeholder]: content },
540
- });
541
- const action = {
542
- type: 'toggle_paste_expansion',
543
- payload: { id: placeholder, row: 0, col: 7 },
544
- };
545
- const state = textBufferReducer(stateWithPlaceholder, action);
546
- expect(state.lines).toEqual([
547
- 'prefix line1',
548
- 'line2',
549
- 'line3',
550
- 'line4',
551
- 'line5',
552
- 'line6 suffix',
553
- ]);
554
- expect(state.expandedPaste?.id).toBe(placeholder);
555
- const info = state.expandedPaste;
556
- expect(info).toEqual({
557
- id: placeholder,
558
- startLine: 0,
559
- lineCount: 6,
560
- prefix: 'prefix ',
561
- suffix: ' suffix',
562
- });
563
- // Cursor should be at the end of expanded content (before suffix)
564
- expect(state.cursorRow).toBe(5);
565
- expect(state.cursorCol).toBe(5); // length of 'line6'
566
- });
567
- it('should collapse an expanded placeholder correctly', async () => {
568
- const expandedState = createStateWithTransformations({
569
- lines: [
570
- 'prefix line1',
571
- 'line2',
572
- 'line3',
573
- 'line4',
574
- 'line5',
575
- 'line6 suffix',
576
- ],
577
- cursorRow: 5,
578
- cursorCol: 5,
579
- pastedContent: { [placeholder]: content },
580
- expandedPaste: {
581
- id: placeholder,
582
- startLine: 0,
583
- lineCount: 6,
584
- prefix: 'prefix ',
585
- suffix: ' suffix',
586
- },
587
- });
588
- const action = {
589
- type: 'toggle_paste_expansion',
590
- payload: { id: placeholder, row: 0, col: 7 },
591
- };
592
- const state = textBufferReducer(expandedState, action);
593
- expect(state.lines).toEqual(['prefix ' + placeholder + ' suffix']);
594
- expect(state.expandedPaste).toBeNull();
595
- // Cursor should be at the end of the collapsed placeholder
596
- expect(state.cursorRow).toBe(0);
597
- expect(state.cursorCol).toBe(('prefix ' + placeholder).length);
598
- });
599
- it('should expand single-line content correctly', async () => {
600
- const singleLinePlaceholder = '[Pasted Text: 10 chars]';
601
- const singleLineContent = 'some text';
602
- const stateWithPlaceholder = createStateWithTransformations({
603
- lines: [singleLinePlaceholder],
604
- cursorRow: 0,
605
- cursorCol: 0,
606
- pastedContent: { [singleLinePlaceholder]: singleLineContent },
607
- });
608
- const state = textBufferReducer(stateWithPlaceholder, {
609
- type: 'toggle_paste_expansion',
610
- payload: { id: singleLinePlaceholder, row: 0, col: 0 },
611
- });
612
- expect(state.lines).toEqual(['some text']);
613
- expect(state.cursorRow).toBe(0);
614
- expect(state.cursorCol).toBe(9);
615
- });
616
- it('should return current state if placeholder ID not found in pastedContent', async () => {
617
- const action = {
618
- type: 'toggle_paste_expansion',
619
- payload: { id: 'unknown', row: 0, col: 0 },
620
- };
621
- const state = textBufferReducer(initialState, action);
622
- expect(state).toBe(initialState);
623
- });
624
- it('should preserve expandedPaste when lines change from edits outside the region', async () => {
625
- // Start with an expanded paste at line 0 (3 lines long)
626
- const placeholder = '[Pasted Text: 3 lines]';
627
- const expandedState = createStateWithTransformations({
628
- lines: ['line1', 'line2', 'line3', 'suffix'],
629
- cursorRow: 3,
630
- cursorCol: 0,
631
- pastedContent: { [placeholder]: 'line1\nline2\nline3' },
632
- expandedPaste: {
633
- id: placeholder,
634
- startLine: 0,
635
- lineCount: 3,
636
- prefix: '',
637
- suffix: '',
638
- },
639
- });
640
- expect(expandedState.expandedPaste).not.toBeNull();
641
- // Insert a newline at the end - this changes lines but is OUTSIDE the expanded region
642
- const stateAfterInsert = textBufferReducer(expandedState, {
643
- type: 'insert',
644
- payload: '\n',
645
- });
646
- // Lines changed, but expandedPaste should be PRESERVED and optionally shifted (no shift here since edit is after)
647
- expect(stateAfterInsert.expandedPaste).not.toBeNull();
648
- expect(stateAfterInsert.expandedPaste?.id).toBe(placeholder);
649
- });
650
- });
651
- });
652
- const getBufferState = (result) => {
653
- expect(result.current).toHaveOnlyValidCharacters();
654
- return {
655
- text: result.current.text,
656
- lines: [...result.current.lines], // Clone for safety
657
- cursor: [...result.current.cursor],
658
- allVisualLines: [...result.current.allVisualLines],
659
- viewportVisualLines: [...result.current.viewportVisualLines],
660
- visualCursor: [...result.current.visualCursor],
661
- visualScrollRow: result.current.visualScrollRow,
662
- preferredCol: result.current.preferredCol,
663
- };
664
- };
665
- describe('useTextBuffer', () => {
666
- let viewport;
667
- beforeEach(() => {
668
- viewport = { width: 10, height: 3 }; // Default viewport for tests
669
- });
670
- afterEach(() => {
671
- vi.restoreAllMocks();
672
- });
673
- describe('Initialization', () => {
674
- it('should initialize with empty text and cursor at (0,0) by default', async () => {
675
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
676
- const state = getBufferState(result);
677
- expect(state.text).toBe('');
678
- expect(state.lines).toEqual(['']);
679
- expect(state.cursor).toEqual([0, 0]);
680
- expect(state.allVisualLines).toEqual(['']);
681
- expect(state.viewportVisualLines).toEqual(['']);
682
- expect(state.visualCursor).toEqual([0, 0]);
683
- expect(state.visualScrollRow).toBe(0);
684
- });
685
- it('should initialize with provided initialText', async () => {
686
- const { result } = await renderHook(() => useTextBuffer({
687
- initialText: 'hello',
688
- viewport,
689
- }));
690
- const state = getBufferState(result);
691
- expect(state.text).toBe('hello');
692
- expect(state.lines).toEqual(['hello']);
693
- expect(state.cursor).toEqual([0, 0]); // Default cursor if offset not given
694
- expect(state.allVisualLines).toEqual(['hello']);
695
- expect(state.viewportVisualLines).toEqual(['hello']);
696
- expect(state.visualCursor).toEqual([0, 0]);
697
- });
698
- it('should initialize with initialText and initialCursorOffset', async () => {
699
- const { result } = await renderHook(() => useTextBuffer({
700
- initialText: 'hello\nworld',
701
- initialCursorOffset: 7, // Should be at 'o' in 'world'
702
- viewport,
703
- }));
704
- const state = getBufferState(result);
705
- expect(state.text).toBe('hello\nworld');
706
- expect(state.lines).toEqual(['hello', 'world']);
707
- expect(state.cursor).toEqual([1, 1]); // Logical cursor at 'o' in "world"
708
- expect(state.allVisualLines).toEqual(['hello', 'world']);
709
- expect(state.viewportVisualLines).toEqual(['hello', 'world']);
710
- expect(state.visualCursor[0]).toBe(1); // On the second visual line
711
- expect(state.visualCursor[1]).toBe(1); // At 'o' in "world"
712
- });
713
- it('should wrap visual lines', async () => {
714
- const { result } = await renderHook(() => useTextBuffer({
715
- initialText: 'The quick brown fox jumps over the lazy dog.',
716
- initialCursorOffset: 2, // After '好'
717
- viewport: { width: 15, height: 4 },
718
- }));
719
- const state = getBufferState(result);
720
- expect(state.allVisualLines).toEqual([
721
- 'The quick',
722
- 'brown fox',
723
- 'jumps over the',
724
- 'lazy dog.',
725
- ]);
726
- });
727
- it('should wrap visual lines with multiple spaces', async () => {
728
- const { result } = await renderHook(() => useTextBuffer({
729
- initialText: 'The quick brown fox jumps over the lazy dog.',
730
- viewport: { width: 15, height: 4 },
731
- }));
732
- const state = getBufferState(result);
733
- // Including multiple spaces at the end of the lines like this is
734
- // consistent with Google docs behavior and makes it intuitive to edit
735
- // the spaces as needed.
736
- expect(state.allVisualLines).toEqual([
737
- 'The quick ',
738
- 'brown fox ',
739
- 'jumps over the',
740
- 'lazy dog.',
741
- ]);
742
- });
743
- it('should wrap visual lines even without spaces', async () => {
744
- const { result } = await renderHook(() => useTextBuffer({
745
- initialText: '123456789012345ABCDEFG', // 4 chars, 12 bytes
746
- viewport: { width: 15, height: 2 },
747
- }));
748
- const state = getBufferState(result);
749
- // Including multiple spaces at the end of the lines like this is
750
- // consistent with Google docs behavior and makes it intuitive to edit
751
- // the spaces as needed.
752
- expect(state.allVisualLines).toEqual(['123456789012345', 'ABCDEFG']);
753
- });
754
- it('should initialize with multi-byte unicode characters and correct cursor offset', async () => {
755
- const { result } = await renderHook(() => useTextBuffer({
756
- initialText: '你好世界', // 4 chars, 12 bytes
757
- initialCursorOffset: 2, // After '好'
758
- viewport: { width: 5, height: 2 },
759
- }));
760
- const state = getBufferState(result);
761
- expect(state.text).toBe('你好世界');
762
- expect(state.lines).toEqual(['你好世界']);
763
- expect(state.cursor).toEqual([0, 2]);
764
- // Visual: "你好" (width 4), "世"界" (width 4) with viewport width 5
765
- expect(state.allVisualLines).toEqual(['你好', '世界']);
766
- expect(state.visualCursor).toEqual([1, 0]);
767
- });
768
- });
769
- describe('Basic Editing', () => {
770
- it('insert: should insert a character and update cursor', async () => {
771
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
772
- act(() => result.current.insert('a'));
773
- let state = getBufferState(result);
774
- expect(state.text).toBe('a');
775
- expect(state.cursor).toEqual([0, 1]);
776
- expect(state.visualCursor).toEqual([0, 1]);
777
- act(() => result.current.insert('b'));
778
- state = getBufferState(result);
779
- expect(state.text).toBe('ab');
780
- expect(state.cursor).toEqual([0, 2]);
781
- expect(state.visualCursor).toEqual([0, 2]);
782
- });
783
- it('insert: should insert text in the middle of a line', async () => {
784
- const { result } = await renderHook(() => useTextBuffer({
785
- initialText: 'abc',
786
- viewport,
787
- }));
788
- act(() => result.current.move('right'));
789
- act(() => result.current.insert('-NEW-'));
790
- const state = getBufferState(result);
791
- expect(state.text).toBe('a-NEW-bc');
792
- expect(state.cursor).toEqual([0, 6]);
793
- });
794
- it('insert: should use placeholder for large text paste', async () => {
795
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
796
- const largeText = '1\n2\n3\n4\n5\n6';
797
- act(() => result.current.insert(largeText, { paste: true }));
798
- const state = getBufferState(result);
799
- expect(state.text).toBe('[Pasted Text: 6 lines]');
800
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
801
- });
802
- it('insert: should NOT use placeholder for large text if NOT a paste', async () => {
803
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
804
- const largeText = '1\n2\n3\n4\n5\n6';
805
- act(() => result.current.insert(largeText, { paste: false }));
806
- const state = getBufferState(result);
807
- expect(state.text).toBe(largeText);
808
- });
809
- it('insert: should clean up pastedContent when placeholder is deleted', async () => {
810
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
811
- const largeText = '1\n2\n3\n4\n5\n6';
812
- act(() => result.current.insert(largeText, { paste: true }));
813
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
814
- // Delete the placeholder using setText
815
- act(() => result.current.setText(''));
816
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
817
- });
818
- it('insert: should clean up pastedContent when placeholder is removed via atomic backspace', async () => {
819
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
820
- const largeText = '1\n2\n3\n4\n5\n6';
821
- act(() => result.current.insert(largeText, { paste: true }));
822
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
823
- // Single backspace at end of placeholder removes entire placeholder
824
- act(() => {
825
- result.current.backspace();
826
- });
827
- expect(getBufferState(result).text).toBe('');
828
- // pastedContent is cleaned up when placeholder is deleted atomically
829
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
830
- });
831
- it('deleteWordLeft: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
832
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
833
- const largeText = '1\n2\n3\n4\n5\n6';
834
- act(() => result.current.insert(largeText, { paste: true }));
835
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
836
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
837
- act(() => {
838
- for (let i = 0; i < 12; i++) {
839
- result.current.deleteWordLeft();
840
- }
841
- });
842
- expect(getBufferState(result).text).toBe('');
843
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
844
- act(() => result.current.insert(largeText, { paste: true }));
845
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
846
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
847
- });
848
- it('deleteWordRight: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
849
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
850
- const largeText = '1\n2\n3\n4\n5\n6';
851
- act(() => result.current.insert(largeText, { paste: true }));
852
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
853
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
854
- act(() => result.current.move('home'));
855
- act(() => {
856
- for (let i = 0; i < 12; i++) {
857
- result.current.deleteWordRight();
858
- }
859
- });
860
- expect(getBufferState(result).text).not.toContain('[Pasted Text: 6 lines]');
861
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
862
- act(() => result.current.insert(largeText, { paste: true }));
863
- expect(getBufferState(result).text).toContain('[Pasted Text: 6 lines]');
864
- expect(getBufferState(result).text).not.toContain('#2');
865
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
866
- });
867
- it('killLineLeft: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
868
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
869
- const largeText = '1\n2\n3\n4\n5\n6';
870
- act(() => result.current.insert(largeText, { paste: true }));
871
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
872
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
873
- act(() => result.current.killLineLeft());
874
- expect(getBufferState(result).text).toBe('');
875
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
876
- act(() => result.current.insert(largeText, { paste: true }));
877
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
878
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
879
- });
880
- it('killLineRight: should clean up pastedContent and avoid #2 suffix on repaste', async () => {
881
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
882
- const largeText = '1\n2\n3\n4\n5\n6';
883
- act(() => result.current.insert(largeText, { paste: true }));
884
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
885
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
886
- act(() => {
887
- for (let i = 0; i < 40; i++) {
888
- result.current.move('left');
889
- }
890
- });
891
- act(() => result.current.killLineRight());
892
- expect(getBufferState(result).text).toBe('');
893
- expect(Object.keys(result.current.pastedContent)).toHaveLength(0);
894
- act(() => result.current.insert(largeText, { paste: true }));
895
- expect(getBufferState(result).text).toBe('[Pasted Text: 6 lines]');
896
- expect(result.current.pastedContent['[Pasted Text: 6 lines]']).toBe(largeText);
897
- });
898
- it('newline: should create a new line and move cursor', async () => {
899
- const { result } = await renderHook(() => useTextBuffer({
900
- initialText: 'ab',
901
- viewport,
902
- }));
903
- act(() => result.current.move('end')); // cursor at [0,2]
904
- act(() => result.current.newline());
905
- const state = getBufferState(result);
906
- expect(state.text).toBe('ab\n');
907
- expect(state.lines).toEqual(['ab', '']);
908
- expect(state.cursor).toEqual([1, 0]);
909
- expect(state.allVisualLines).toEqual(['ab', '']);
910
- expect(state.viewportVisualLines).toEqual(['ab', '']); // viewport height 3
911
- expect(state.visualCursor).toEqual([1, 0]); // On the new visual line
912
- });
913
- it('backspace: should delete char to the left or merge lines', async () => {
914
- const { result } = await renderHook(() => useTextBuffer({
915
- initialText: 'a\nb',
916
- viewport,
917
- }));
918
- act(() => {
919
- result.current.move('down');
920
- });
921
- act(() => {
922
- result.current.move('end'); // cursor to [1,1] (end of 'b')
923
- });
924
- act(() => result.current.backspace()); // delete 'b'
925
- let state = getBufferState(result);
926
- expect(state.text).toBe('a\n');
927
- expect(state.cursor).toEqual([1, 0]);
928
- act(() => result.current.backspace()); // merge lines
929
- state = getBufferState(result);
930
- expect(state.text).toBe('a');
931
- expect(state.cursor).toEqual([0, 1]); // cursor after 'a'
932
- expect(state.allVisualLines).toEqual(['a']);
933
- expect(state.viewportVisualLines).toEqual(['a']);
934
- expect(state.visualCursor).toEqual([0, 1]);
935
- });
936
- it('del: should delete char to the right or merge lines', async () => {
937
- const { result } = await renderHook(() => useTextBuffer({
938
- initialText: 'a\nb',
939
- viewport,
940
- }));
941
- // cursor at [0,0]
942
- act(() => result.current.del()); // delete 'a'
943
- let state = getBufferState(result);
944
- expect(state.text).toBe('\nb');
945
- expect(state.cursor).toEqual([0, 0]);
946
- act(() => result.current.del()); // merge lines (deletes newline)
947
- state = getBufferState(result);
948
- expect(state.text).toBe('b');
949
- expect(state.cursor).toEqual([0, 0]);
950
- expect(state.allVisualLines).toEqual(['b']);
951
- expect(state.viewportVisualLines).toEqual(['b']);
952
- expect(state.visualCursor).toEqual([0, 0]);
953
- });
954
- });
955
- describe('Drag and Drop File Paths', () => {
956
- let tempDir;
957
- beforeEach(() => {
958
- tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gemini-cli-test-'));
959
- });
960
- afterEach(() => {
961
- fs.rmSync(tempDir, { recursive: true, force: true });
962
- });
963
- it('should prepend @ to a valid file path on insert', async () => {
964
- const filePath = path.join(tempDir, 'file.txt');
965
- fs.writeFileSync(filePath, '');
966
- const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
967
- act(() => result.current.insert(filePath, { paste: true }));
968
- expect(getBufferState(result).text).toBe(`@${escapePath(filePath)} `);
969
- });
970
- it('should not prepend @ to an invalid file path on insert', async () => {
971
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
972
- const notAPath = path.join(tempDir, 'non_existent.txt');
973
- act(() => result.current.insert(notAPath, { paste: true }));
974
- expect(getBufferState(result).text).toBe(notAPath);
975
- });
976
- it('should handle quoted paths', async () => {
977
- const filePath = path.join(tempDir, 'file.txt');
978
- fs.writeFileSync(filePath, '');
979
- const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
980
- const quotedPath = `'${filePath}'`;
981
- act(() => result.current.insert(quotedPath, { paste: true }));
982
- expect(getBufferState(result).text).toBe(`@${escapePath(filePath)} `);
983
- });
984
- it('should not prepend @ to short text that is not a path', async () => {
985
- const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
986
- const shortText = 'ab';
987
- act(() => result.current.insert(shortText, { paste: true }));
988
- expect(getBufferState(result).text).toBe(shortText);
989
- });
990
- it('should prepend @ to multiple valid file paths on insert', async () => {
991
- const file1 = path.join(tempDir, 'file1.txt');
992
- const file2 = path.join(tempDir, 'file2.txt');
993
- fs.writeFileSync(file1, '');
994
- fs.writeFileSync(file2, '');
995
- const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
996
- const filePaths = `${escapePath(file1)} ${escapePath(file2)}`;
997
- act(() => result.current.insert(filePaths, { paste: true }));
998
- expect(getBufferState(result).text).toBe(`@${escapePath(file1)} @${escapePath(file2)} `);
999
- });
1000
- it('should handle multiple paths with escaped spaces', async () => {
1001
- const file1 = path.join(tempDir, 'my file.txt');
1002
- const file2 = path.join(tempDir, 'other.txt');
1003
- fs.writeFileSync(file1, '');
1004
- fs.writeFileSync(file2, '');
1005
- const { result } = await renderHook(() => useTextBuffer({ viewport, escapePastedPaths: true }));
1006
- const filePaths = `${escapePath(file1)} ${escapePath(file2)}`;
1007
- act(() => result.current.insert(filePaths, { paste: true }));
1008
- expect(getBufferState(result).text).toBe(`@${escapePath(file1)} @${escapePath(file2)} `);
1009
- });
1010
- it('should not prepend @ unless all paths are valid', async () => {
1011
- const validFile = path.join(tempDir, 'valid.txt');
1012
- const invalidFile = path.join(tempDir, 'invalid.jpg');
1013
- fs.writeFileSync(validFile, '');
1014
- // Do not create invalidFile
1015
- const { result } = await renderHook(() => useTextBuffer({
1016
- viewport,
1017
- escapePastedPaths: true,
1018
- }));
1019
- const filePaths = `${validFile} ${invalidFile}`;
1020
- act(() => result.current.insert(filePaths, { paste: true }));
1021
- expect(getBufferState(result).text).toBe(`${validFile} ${invalidFile}`);
1022
- });
1023
- });
1024
- describe('Shell Mode Behavior', () => {
1025
- it('should not prepend @ to valid file paths when shellModeActive is true', async () => {
1026
- const { result } = await renderHook(() => useTextBuffer({
1027
- viewport,
1028
- escapePastedPaths: true,
1029
- shellModeActive: true,
1030
- }));
1031
- const filePath = '/path/to/a/valid/file.txt';
1032
- act(() => result.current.insert(filePath, { paste: true }));
1033
- expect(getBufferState(result).text).toBe(filePath); // No @ prefix
1034
- });
1035
- it('should not prepend @ to quoted paths when shellModeActive is true', async () => {
1036
- const { result } = await renderHook(() => useTextBuffer({
1037
- viewport,
1038
- escapePastedPaths: true,
1039
- shellModeActive: true,
1040
- }));
1041
- const quotedFilePath = "'/path/to/a/valid/file.txt'";
1042
- act(() => result.current.insert(quotedFilePath, { paste: true }));
1043
- expect(getBufferState(result).text).toBe(quotedFilePath); // No @ prefix, keeps quotes
1044
- });
1045
- it('should behave normally with invalid paths when shellModeActive is true', async () => {
1046
- const { result } = await renderHook(() => useTextBuffer({
1047
- viewport,
1048
- shellModeActive: true,
1049
- }));
1050
- const notAPath = 'this is just some text';
1051
- act(() => result.current.insert(notAPath, { paste: true }));
1052
- expect(getBufferState(result).text).toBe(notAPath);
1053
- });
1054
- it('should behave normally with short text when shellModeActive is true', async () => {
1055
- const { result } = await renderHook(() => useTextBuffer({
1056
- viewport,
1057
- escapePastedPaths: true,
1058
- shellModeActive: true,
1059
- }));
1060
- const shortText = 'ls';
1061
- act(() => result.current.insert(shortText, { paste: true }));
1062
- expect(getBufferState(result).text).toBe(shortText); // No @ prefix for short text
1063
- });
1064
- });
1065
- describe('Cursor Movement', () => {
1066
- it('move: left/right should work within and across visual lines (due to wrapping)', async () => {
1067
- // Text: "long line1next line2" (20 chars)
1068
- // Viewport width 5. Word wrapping should produce:
1069
- // "long " (5)
1070
- // "line1" (5)
1071
- // "next " (5)
1072
- // "line2" (5)
1073
- const { result } = await renderHook(() => useTextBuffer({
1074
- initialText: 'long line1next line2', // Corrected: was 'long line1next line2'
1075
- viewport: { width: 5, height: 4 },
1076
- }));
1077
- // Initial cursor [0,0] logical, visual [0,0] ("l" of "long ")
1078
- act(() => result.current.move('right')); // visual [0,1] ("o")
1079
- expect(getBufferState(result).visualCursor).toEqual([0, 1]);
1080
- act(() => result.current.move('right')); // visual [0,2] ("n")
1081
- act(() => result.current.move('right')); // visual [0,3] ("g")
1082
- act(() => result.current.move('right')); // visual [0,4] (" ")
1083
- expect(getBufferState(result).visualCursor).toEqual([0, 4]);
1084
- act(() => result.current.move('right')); // visual [1,0] ("l" of "line1")
1085
- expect(getBufferState(result).visualCursor).toEqual([1, 0]);
1086
- expect(getBufferState(result).cursor).toEqual([0, 5]); // logical cursor
1087
- act(() => result.current.move('left')); // visual [0,4] (" " of "long ")
1088
- expect(getBufferState(result).visualCursor).toEqual([0, 4]);
1089
- expect(getBufferState(result).cursor).toEqual([0, 4]); // logical cursor
1090
- });
1091
- it('move: up/down should preserve preferred visual column', async () => {
1092
- const text = 'abcde\nxy\n12345';
1093
- const { result } = await renderHook(() => useTextBuffer({
1094
- initialText: text,
1095
- viewport,
1096
- }));
1097
- expect(result.current.allVisualLines).toEqual(['abcde', 'xy', '12345']);
1098
- // Place cursor at the end of "abcde" -> logical [0,5]
1099
- act(() => {
1100
- result.current.move('home'); // to [0,0]
1101
- });
1102
- for (let i = 0; i < 5; i++) {
1103
- act(() => {
1104
- result.current.move('right'); // to [0,5]
1105
- });
1106
- }
1107
- expect(getBufferState(result).cursor).toEqual([0, 5]);
1108
- expect(getBufferState(result).visualCursor).toEqual([0, 5]);
1109
- // Set preferredCol by moving up then down to the same spot, then test.
1110
- act(() => {
1111
- result.current.move('down'); // to xy, logical [1,2], visual [1,2], preferredCol should be 5
1112
- });
1113
- let state = getBufferState(result);
1114
- expect(state.cursor).toEqual([1, 2]); // Logical cursor at end of 'xy'
1115
- expect(state.visualCursor).toEqual([1, 2]); // Visual cursor at end of 'xy'
1116
- expect(state.preferredCol).toBe(5);
1117
- act(() => result.current.move('down')); // to '12345', preferredCol=5.
1118
- state = getBufferState(result);
1119
- expect(state.cursor).toEqual([2, 5]); // Logical cursor at end of '12345'
1120
- expect(state.visualCursor).toEqual([2, 5]); // Visual cursor at end of '12345'
1121
- expect(state.preferredCol).toBe(5); // Preferred col is maintained
1122
- act(() => result.current.move('left')); // preferredCol should reset
1123
- state = getBufferState(result);
1124
- expect(state.preferredCol).toBe(null);
1125
- });
1126
- it('move: home/end should go to visual line start/end', async () => {
1127
- const initialText = 'line one\nsecond line';
1128
- const { result } = await renderHook(() => useTextBuffer({
1129
- initialText,
1130
- viewport: { width: 5, height: 5 },
1131
- }));
1132
- expect(result.current.allVisualLines).toEqual([
1133
- 'line',
1134
- 'one',
1135
- 'secon',
1136
- 'd',
1137
- 'line',
1138
- ]);
1139
- // Initial cursor [0,0] (start of "line")
1140
- act(() => result.current.move('down')); // visual cursor from [0,0] to [1,0] ("o" of "one")
1141
- act(() => result.current.move('right')); // visual cursor to [1,1] ("n" of "one")
1142
- expect(getBufferState(result).visualCursor).toEqual([1, 1]);
1143
- act(() => result.current.move('home')); // visual cursor to [1,0] (start of "one")
1144
- expect(getBufferState(result).visualCursor).toEqual([1, 0]);
1145
- act(() => result.current.move('end')); // visual cursor to [1,3] (end of "one")
1146
- expect(getBufferState(result).visualCursor).toEqual([1, 3]); // "one" is 3 chars
1147
- });
1148
- });
1149
- describe('Visual Layout & Viewport', () => {
1150
- it('should wrap long lines correctly into visualLines', async () => {
1151
- const { result } = await renderHook(() => useTextBuffer({
1152
- initialText: 'This is a very long line of text.', // 33 chars
1153
- viewport: { width: 10, height: 5 },
1154
- }));
1155
- const state = getBufferState(result);
1156
- // Expected visual lines with word wrapping (viewport width 10):
1157
- // "This is a"
1158
- // "very long"
1159
- // "line of"
1160
- // "text."
1161
- expect(state.allVisualLines.length).toBe(4);
1162
- expect(state.allVisualLines[0]).toBe('This is a');
1163
- expect(state.allVisualLines[1]).toBe('very long');
1164
- expect(state.allVisualLines[2]).toBe('line of');
1165
- expect(state.allVisualLines[3]).toBe('text.');
1166
- });
1167
- it('should update visualScrollRow when visualCursor moves out of viewport', async () => {
1168
- const { result } = await renderHook(() => useTextBuffer({
1169
- initialText: 'l1\nl2\nl3\nl4\nl5',
1170
- viewport: { width: 5, height: 3 }, // Can show 3 visual lines
1171
- }));
1172
- // Initial: l1, l2, l3 visible. visualScrollRow = 0. visualCursor = [0,0]
1173
- expect(getBufferState(result).visualScrollRow).toBe(0);
1174
- expect(getBufferState(result).allVisualLines).toEqual([
1175
- 'l1',
1176
- 'l2',
1177
- 'l3',
1178
- 'l4',
1179
- 'l5',
1180
- ]);
1181
- expect(getBufferState(result).viewportVisualLines).toEqual([
1182
- 'l1',
1183
- 'l2',
1184
- 'l3',
1185
- ]);
1186
- act(() => result.current.move('down')); // vc=[1,0]
1187
- act(() => result.current.move('down')); // vc=[2,0] (l3)
1188
- expect(getBufferState(result).visualScrollRow).toBe(0);
1189
- act(() => result.current.move('down')); // vc=[3,0] (l4) - scroll should happen
1190
- // Now: l2, l3, l4 visible. visualScrollRow = 1.
1191
- let state = getBufferState(result);
1192
- expect(state.visualScrollRow).toBe(1);
1193
- expect(state.allVisualLines).toEqual(['l1', 'l2', 'l3', 'l4', 'l5']);
1194
- expect(state.viewportVisualLines).toEqual(['l2', 'l3', 'l4']);
1195
- expect(state.visualCursor).toEqual([3, 0]);
1196
- act(() => result.current.move('up')); // vc=[2,0] (l3)
1197
- act(() => result.current.move('up')); // vc=[1,0] (l2)
1198
- expect(getBufferState(result).visualScrollRow).toBe(1);
1199
- act(() => result.current.move('up')); // vc=[0,0] (l1) - scroll up
1200
- // Now: l1, l2, l3 visible. visualScrollRow = 0
1201
- state = getBufferState(result); // Assign to the existing `state` variable
1202
- expect(state.visualScrollRow).toBe(0);
1203
- expect(state.allVisualLines).toEqual(['l1', 'l2', 'l3', 'l4', 'l5']);
1204
- expect(state.viewportVisualLines).toEqual(['l1', 'l2', 'l3']);
1205
- expect(state.visualCursor).toEqual([0, 0]);
1206
- });
1207
- });
1208
- describe('Undo/Redo', () => {
1209
- it('should undo and redo an insert operation', async () => {
1210
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1211
- act(() => result.current.insert('a'));
1212
- expect(getBufferState(result).text).toBe('a');
1213
- act(() => result.current.undo());
1214
- expect(getBufferState(result).text).toBe('');
1215
- expect(getBufferState(result).cursor).toEqual([0, 0]);
1216
- act(() => result.current.redo());
1217
- expect(getBufferState(result).text).toBe('a');
1218
- expect(getBufferState(result).cursor).toEqual([0, 1]);
1219
- });
1220
- it('should undo and redo a newline operation', async () => {
1221
- const { result } = await renderHook(() => useTextBuffer({
1222
- initialText: 'test',
1223
- viewport,
1224
- }));
1225
- act(() => result.current.move('end'));
1226
- act(() => result.current.newline());
1227
- expect(getBufferState(result).text).toBe('test\n');
1228
- act(() => result.current.undo());
1229
- expect(getBufferState(result).text).toBe('test');
1230
- expect(getBufferState(result).cursor).toEqual([0, 4]);
1231
- act(() => result.current.redo());
1232
- expect(getBufferState(result).text).toBe('test\n');
1233
- expect(getBufferState(result).cursor).toEqual([1, 0]);
1234
- });
1235
- });
1236
- describe('Unicode Handling', () => {
1237
- it('insert: should correctly handle multi-byte unicode characters', async () => {
1238
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1239
- act(() => result.current.insert('你好'));
1240
- const state = getBufferState(result);
1241
- expect(state.text).toBe('你好');
1242
- expect(state.cursor).toEqual([0, 2]); // Cursor is 2 (char count)
1243
- expect(state.visualCursor).toEqual([0, 2]);
1244
- });
1245
- it('backspace: should correctly delete multi-byte unicode characters', async () => {
1246
- const { result } = await renderHook(() => useTextBuffer({
1247
- initialText: '你好',
1248
- viewport,
1249
- }));
1250
- act(() => result.current.move('end')); // cursor at [0,2]
1251
- act(() => result.current.backspace()); // delete '好'
1252
- let state = getBufferState(result);
1253
- expect(state.text).toBe('你');
1254
- expect(state.cursor).toEqual([0, 1]);
1255
- act(() => result.current.backspace()); // delete '你'
1256
- state = getBufferState(result);
1257
- expect(state.text).toBe('');
1258
- expect(state.cursor).toEqual([0, 0]);
1259
- });
1260
- it('move: left/right should treat multi-byte chars as single units for visual cursor', async () => {
1261
- const { result } = await renderHook(() => useTextBuffer({
1262
- initialText: '🐶🐱',
1263
- viewport: { width: 5, height: 1 },
1264
- }));
1265
- // Initial: visualCursor [0,0]
1266
- act(() => result.current.move('right')); // visualCursor [0,1] (after 🐶)
1267
- let state = getBufferState(result);
1268
- expect(state.cursor).toEqual([0, 1]);
1269
- expect(state.visualCursor).toEqual([0, 1]);
1270
- act(() => result.current.move('right')); // visualCursor [0,2] (after 🐱)
1271
- state = getBufferState(result);
1272
- expect(state.cursor).toEqual([0, 2]);
1273
- expect(state.visualCursor).toEqual([0, 2]);
1274
- act(() => result.current.move('left')); // visualCursor [0,1] (before 🐱 / after 🐶)
1275
- state = getBufferState(result);
1276
- expect(state.cursor).toEqual([0, 1]);
1277
- expect(state.visualCursor).toEqual([0, 1]);
1278
- });
1279
- it('move: up/down should work on wrapped lines (regression test)', async () => {
1280
- // Line that wraps into two visual lines
1281
- // Viewport width 10. "0123456789ABCDE" (15 chars)
1282
- // Visual Line 0: "0123456789"
1283
- // Visual Line 1: "ABCDE"
1284
- const { result } = await renderHook(() => useTextBuffer({
1285
- viewport: { width: 10, height: 5 },
1286
- }));
1287
- act(() => {
1288
- result.current.setText('0123456789ABCDE');
1289
- });
1290
- // Cursor should be at the end: logical [0, 15], visual [1, 5]
1291
- expect(getBufferState(result).cursor).toEqual([0, 15]);
1292
- expect(getBufferState(result).visualCursor).toEqual([1, 5]);
1293
- // Press Up arrow - should move to first visual line
1294
- // This currently fails because handleInput returns false if cursorRow === 0
1295
- let handledUp = false;
1296
- act(() => {
1297
- handledUp = result.current.handleInput({
1298
- name: 'up',
1299
- shift: false,
1300
- alt: false,
1301
- ctrl: false,
1302
- cmd: false,
1303
- insertable: false,
1304
- sequence: '\x1b[A',
1305
- });
1306
- });
1307
- expect(handledUp).toBe(true);
1308
- expect(getBufferState(result).visualCursor[0]).toBe(0);
1309
- // Press Down arrow - should move back to second visual line
1310
- // This would also fail if cursorRow is the last logical row
1311
- let handledDown = false;
1312
- act(() => {
1313
- handledDown = result.current.handleInput({
1314
- name: 'down',
1315
- shift: false,
1316
- alt: false,
1317
- ctrl: false,
1318
- cmd: false,
1319
- insertable: false,
1320
- sequence: '\x1b[B',
1321
- });
1322
- });
1323
- expect(handledDown).toBe(true);
1324
- expect(getBufferState(result).visualCursor[0]).toBe(1);
1325
- });
1326
- it('moveToVisualPosition: should correctly handle wide characters (Chinese)', async () => {
1327
- const { result } = await renderHook(() => useTextBuffer({
1328
- initialText: '你好', // 2 chars, width 4
1329
- viewport: { width: 10, height: 1 },
1330
- }));
1331
- // '你' (width 2): visual 0-1. '好' (width 2): visual 2-3.
1332
- // Click on '你' (first half, x=0) -> index 0
1333
- act(() => result.current.moveToVisualPosition(0, 0));
1334
- expect(getBufferState(result).cursor).toEqual([0, 0]);
1335
- // Click on '你' (second half, x=1) -> index 1 (after first char)
1336
- act(() => result.current.moveToVisualPosition(0, 1));
1337
- expect(getBufferState(result).cursor).toEqual([0, 1]);
1338
- // Click on '好' (first half, x=2) -> index 1 (before second char)
1339
- act(() => result.current.moveToVisualPosition(0, 2));
1340
- expect(getBufferState(result).cursor).toEqual([0, 1]);
1341
- // Click on '好' (second half, x=3) -> index 2 (after second char)
1342
- act(() => result.current.moveToVisualPosition(0, 3));
1343
- expect(getBufferState(result).cursor).toEqual([0, 2]);
1344
- });
1345
- });
1346
- describe('handleInput', () => {
1347
- it('should insert printable characters', async () => {
1348
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1349
- act(() => {
1350
- result.current.handleInput({
1351
- name: 'h',
1352
- shift: false,
1353
- alt: false,
1354
- ctrl: false,
1355
- cmd: false,
1356
- insertable: true,
1357
- sequence: 'h',
1358
- });
1359
- });
1360
- void act(() => result.current.handleInput({
1361
- name: 'i',
1362
- shift: false,
1363
- alt: false,
1364
- ctrl: false,
1365
- cmd: false,
1366
- insertable: true,
1367
- sequence: 'i',
1368
- }));
1369
- expect(getBufferState(result).text).toBe('hi');
1370
- });
1371
- it('should handle "Enter" key as newline', async () => {
1372
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1373
- act(() => {
1374
- result.current.handleInput({
1375
- name: 'enter',
1376
- shift: false,
1377
- alt: false,
1378
- ctrl: false,
1379
- cmd: false,
1380
- insertable: true,
1381
- sequence: '\r',
1382
- });
1383
- });
1384
- expect(getBufferState(result).lines).toEqual(['', '']);
1385
- });
1386
- it('should handle Ctrl+J as newline', async () => {
1387
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1388
- act(() => {
1389
- result.current.handleInput({
1390
- name: 'j',
1391
- shift: false,
1392
- alt: false,
1393
- ctrl: true,
1394
- cmd: false,
1395
- insertable: false,
1396
- sequence: '\n',
1397
- });
1398
- });
1399
- expect(getBufferState(result).lines).toEqual(['', '']);
1400
- });
1401
- it('should do nothing for a tab key press', async () => {
1402
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1403
- act(() => {
1404
- result.current.handleInput({
1405
- name: 'tab',
1406
- shift: false,
1407
- alt: false,
1408
- ctrl: false,
1409
- cmd: false,
1410
- insertable: false,
1411
- sequence: '\t',
1412
- });
1413
- });
1414
- expect(getBufferState(result).text).toBe('');
1415
- });
1416
- it('should do nothing for a shift tab key press', async () => {
1417
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1418
- act(() => {
1419
- result.current.handleInput({
1420
- name: 'tab',
1421
- shift: true,
1422
- alt: false,
1423
- ctrl: false,
1424
- cmd: false,
1425
- insertable: false,
1426
- sequence: '\u001b[9;2u',
1427
- });
1428
- });
1429
- expect(getBufferState(result).text).toBe('');
1430
- });
1431
- it('should handle CLEAR_INPUT (Ctrl+C)', async () => {
1432
- const { result } = await renderHook(() => useTextBuffer({
1433
- initialText: 'hello',
1434
- viewport,
1435
- }));
1436
- expect(getBufferState(result).text).toBe('hello');
1437
- let handled = false;
1438
- act(() => {
1439
- handled = result.current.handleInput({
1440
- name: 'c',
1441
- shift: false,
1442
- alt: false,
1443
- ctrl: true,
1444
- cmd: false,
1445
- insertable: false,
1446
- sequence: '\u0003',
1447
- });
1448
- });
1449
- expect(handled).toBe(true);
1450
- expect(getBufferState(result).text).toBe('');
1451
- });
1452
- it('should NOT handle CLEAR_INPUT if buffer is empty', async () => {
1453
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1454
- let handled = true;
1455
- act(() => {
1456
- handled = result.current.handleInput({
1457
- name: 'c',
1458
- shift: false,
1459
- alt: false,
1460
- ctrl: true,
1461
- cmd: false,
1462
- insertable: false,
1463
- sequence: '\u0003',
1464
- });
1465
- });
1466
- expect(handled).toBe(false);
1467
- });
1468
- it('should handle "Backspace" key', async () => {
1469
- const { result } = await renderHook(() => useTextBuffer({
1470
- initialText: 'a',
1471
- viewport,
1472
- }));
1473
- act(() => result.current.move('end'));
1474
- act(() => {
1475
- result.current.handleInput({
1476
- name: 'backspace',
1477
- shift: false,
1478
- alt: false,
1479
- ctrl: false,
1480
- cmd: false,
1481
- insertable: false,
1482
- sequence: '\x7f',
1483
- });
1484
- });
1485
- expect(getBufferState(result).text).toBe('');
1486
- });
1487
- it('should only handle Undo if there is something to undo', async () => {
1488
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1489
- // Platform-specific undo key
1490
- const undoKey = process.platform === 'win32'
1491
- ? {
1492
- name: 'z',
1493
- ctrl: true,
1494
- shift: false,
1495
- alt: false,
1496
- cmd: false,
1497
- insertable: false,
1498
- sequence: '\x1a',
1499
- }
1500
- : process.platform === 'darwin'
1501
- ? {
1502
- name: 'z',
1503
- ctrl: false,
1504
- shift: false,
1505
- alt: false,
1506
- cmd: true,
1507
- insertable: false,
1508
- sequence: '\u001b[122;D',
1509
- }
1510
- : {
1511
- name: 'z',
1512
- ctrl: false,
1513
- shift: false,
1514
- alt: true,
1515
- cmd: false,
1516
- insertable: false,
1517
- sequence: '\u001bz',
1518
- };
1519
- // 1. Initial state: nothing to undo
1520
- let handled = true;
1521
- act(() => {
1522
- handled = result.current.handleInput(undoKey);
1523
- });
1524
- expect(handled).toBe(false);
1525
- // 2. Insert something
1526
- act(() => {
1527
- result.current.handleInput({
1528
- name: 'a',
1529
- shift: false,
1530
- alt: false,
1531
- ctrl: false,
1532
- cmd: false,
1533
- insertable: true,
1534
- sequence: 'a',
1535
- });
1536
- });
1537
- expect(getBufferState(result).text).toBe('a');
1538
- // 3. Now undo should work
1539
- act(() => {
1540
- handled = result.current.handleInput(undoKey);
1541
- });
1542
- expect(handled).toBe(true);
1543
- expect(getBufferState(result).text).toBe('');
1544
- // 4. Undo again: nothing left to undo
1545
- act(() => {
1546
- handled = result.current.handleInput(undoKey);
1547
- });
1548
- expect(handled).toBe(false);
1549
- });
1550
- if (process.platform === 'linux') {
1551
- it('should handle "Ctrl+Z" for smart bubbling on Linux/WSL', async () => {
1552
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1553
- const ctrlZ = {
1554
- name: 'z',
1555
- ctrl: true,
1556
- shift: false,
1557
- alt: false,
1558
- cmd: false,
1559
- insertable: false,
1560
- sequence: '\x1a',
1561
- };
1562
- // 1. Empty buffer: should NOT handle (bubble up to Suspend)
1563
- let handled = true;
1564
- act(() => {
1565
- handled = result.current.handleInput(ctrlZ);
1566
- });
1567
- expect(handled).toBe(false);
1568
- // 2. Add text
1569
- act(() => {
1570
- result.current.handleInput({
1571
- name: 'x',
1572
- insertable: true,
1573
- sequence: 'x',
1574
- shift: false,
1575
- alt: false,
1576
- ctrl: false,
1577
- cmd: false,
1578
- });
1579
- });
1580
- // 3. Has history: should handle (perform Undo)
1581
- act(() => {
1582
- handled = result.current.handleInput(ctrlZ);
1583
- });
1584
- expect(handled).toBe(true);
1585
- expect(getBufferState(result).text).toBe('');
1586
- // 4. Empty again: should NOT handle
1587
- act(() => {
1588
- handled = result.current.handleInput(ctrlZ);
1589
- });
1590
- expect(handled).toBe(false);
1591
- });
1592
- }
1593
- it('should only handle Redo if there is something to redo', async () => {
1594
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1595
- // Platform-specific redo key (first in list)
1596
- const redoKey = process.platform === 'win32'
1597
- ? {
1598
- name: 'z',
1599
- ctrl: true,
1600
- shift: true,
1601
- alt: false,
1602
- cmd: false,
1603
- insertable: false,
1604
- sequence: '\x1a',
1605
- }
1606
- : process.platform === 'darwin'
1607
- ? {
1608
- name: 'z',
1609
- ctrl: false,
1610
- shift: true,
1611
- alt: false,
1612
- cmd: true,
1613
- insertable: false,
1614
- sequence: '\u001b[122;2D',
1615
- }
1616
- : {
1617
- name: 'z',
1618
- ctrl: false,
1619
- shift: true,
1620
- alt: true,
1621
- cmd: false,
1622
- insertable: false,
1623
- sequence: '\u001bZ',
1624
- };
1625
- const undoKey = process.platform === 'win32'
1626
- ? {
1627
- name: 'z',
1628
- ctrl: true,
1629
- shift: false,
1630
- alt: false,
1631
- cmd: false,
1632
- insertable: false,
1633
- sequence: '\x1a',
1634
- }
1635
- : process.platform === 'darwin'
1636
- ? {
1637
- name: 'z',
1638
- ctrl: false,
1639
- shift: false,
1640
- alt: false,
1641
- cmd: true,
1642
- insertable: false,
1643
- sequence: '\u001b[122;D',
1644
- }
1645
- : {
1646
- name: 'z',
1647
- ctrl: false,
1648
- shift: false,
1649
- alt: true,
1650
- cmd: false,
1651
- insertable: false,
1652
- sequence: '\u001bz',
1653
- };
1654
- // 1. Initial state: nothing to redo
1655
- let handled = true;
1656
- act(() => {
1657
- handled = result.current.handleInput(redoKey);
1658
- });
1659
- expect(handled).toBe(false);
1660
- // 2. Insert and Undo
1661
- act(() => {
1662
- result.current.handleInput({
1663
- name: 'a',
1664
- shift: false,
1665
- alt: false,
1666
- ctrl: false,
1667
- cmd: false,
1668
- insertable: true,
1669
- sequence: 'a',
1670
- });
1671
- });
1672
- act(() => {
1673
- result.current.handleInput(undoKey);
1674
- });
1675
- expect(getBufferState(result).text).toBe('');
1676
- // 3. Now redo should work
1677
- act(() => {
1678
- handled = result.current.handleInput(redoKey);
1679
- });
1680
- expect(handled).toBe(true);
1681
- expect(getBufferState(result).text).toBe('a');
1682
- // 4. Redo again: nothing left to redo
1683
- act(() => {
1684
- handled = result.current.handleInput(redoKey);
1685
- });
1686
- expect(handled).toBe(false);
1687
- });
1688
- it('should handle multiple delete characters in one input', async () => {
1689
- const { result } = await renderHook(() => useTextBuffer({
1690
- initialText: 'abcde',
1691
- viewport,
1692
- }));
1693
- act(() => result.current.move('end')); // cursor at the end
1694
- expect(getBufferState(result).cursor).toEqual([0, 5]);
1695
- act(() => {
1696
- result.current.handleInput({
1697
- name: 'backspace',
1698
- shift: false,
1699
- alt: false,
1700
- ctrl: false,
1701
- cmd: false,
1702
- insertable: false,
1703
- sequence: '\x7f',
1704
- });
1705
- result.current.handleInput({
1706
- name: 'backspace',
1707
- shift: false,
1708
- alt: false,
1709
- ctrl: false,
1710
- cmd: false,
1711
- insertable: false,
1712
- sequence: '\x7f',
1713
- });
1714
- result.current.handleInput({
1715
- name: 'backspace',
1716
- shift: false,
1717
- alt: false,
1718
- ctrl: false,
1719
- cmd: false,
1720
- insertable: false,
1721
- sequence: '\x7f',
1722
- });
1723
- });
1724
- expect(getBufferState(result).text).toBe('ab');
1725
- expect(getBufferState(result).cursor).toEqual([0, 2]);
1726
- });
1727
- it('should handle inserts that contain delete characters', async () => {
1728
- const { result } = await renderHook(() => useTextBuffer({
1729
- initialText: 'abcde',
1730
- viewport,
1731
- }));
1732
- act(() => result.current.move('end')); // cursor at the end
1733
- expect(getBufferState(result).cursor).toEqual([0, 5]);
1734
- act(() => {
1735
- result.current.insert('\x7f\x7f\x7f');
1736
- });
1737
- expect(getBufferState(result).text).toBe('ab');
1738
- expect(getBufferState(result).cursor).toEqual([0, 2]);
1739
- });
1740
- it('should handle inserts with a mix of regular and delete characters', async () => {
1741
- const { result } = await renderHook(() => useTextBuffer({
1742
- initialText: 'abcde',
1743
- viewport,
1744
- }));
1745
- act(() => result.current.move('end')); // cursor at the end
1746
- expect(getBufferState(result).cursor).toEqual([0, 5]);
1747
- act(() => {
1748
- result.current.insert('\x7fI\x7f\x7fNEW');
1749
- });
1750
- expect(getBufferState(result).text).toBe('abcNEW');
1751
- expect(getBufferState(result).cursor).toEqual([0, 6]);
1752
- });
1753
- it('should handle arrow keys for movement', async () => {
1754
- const { result } = await renderHook(() => useTextBuffer({
1755
- initialText: 'ab',
1756
- viewport,
1757
- }));
1758
- act(() => result.current.move('end')); // cursor [0,2]
1759
- act(() => {
1760
- result.current.handleInput({
1761
- name: 'left',
1762
- shift: false,
1763
- alt: false,
1764
- ctrl: false,
1765
- cmd: false,
1766
- insertable: false,
1767
- sequence: '\x1b[D',
1768
- });
1769
- });
1770
- expect(getBufferState(result).cursor).toEqual([0, 1]);
1771
- act(() => {
1772
- result.current.handleInput({
1773
- name: 'right',
1774
- shift: false,
1775
- alt: false,
1776
- ctrl: false,
1777
- cmd: false,
1778
- insertable: false,
1779
- sequence: '\x1b[C',
1780
- });
1781
- });
1782
- expect(getBufferState(result).cursor).toEqual([0, 2]);
1783
- });
1784
- it('should strip ANSI escape codes when pasting text', async () => {
1785
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1786
- const textWithAnsi = '\x1B[31mHello\x1B[0m \x1B[32mWorld\x1B[0m';
1787
- // Simulate pasting by calling handleInput with a string longer than 1 char
1788
- act(() => {
1789
- result.current.handleInput({
1790
- name: '',
1791
- shift: false,
1792
- alt: false,
1793
- ctrl: false,
1794
- cmd: false,
1795
- insertable: true,
1796
- sequence: textWithAnsi,
1797
- });
1798
- });
1799
- expect(getBufferState(result).text).toBe('Hello World');
1800
- });
1801
- it('should handle VSCode terminal Shift+Enter as newline', async () => {
1802
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1803
- act(() => {
1804
- result.current.handleInput({
1805
- name: 'enter',
1806
- shift: true,
1807
- alt: false,
1808
- ctrl: false,
1809
- cmd: false,
1810
- insertable: true,
1811
- sequence: '\r',
1812
- });
1813
- }); // Simulates Shift+Enter in VSCode terminal
1814
- expect(getBufferState(result).lines).toEqual(['', '']);
1815
- });
1816
- it('should correctly handle repeated pasting of long text', async () => {
1817
- const longText = `not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
1818
-
1819
- Why do we use it?
1820
- It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
1821
-
1822
- Where does it come from?
1823
- Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lore
1824
- `;
1825
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1826
- // Simulate pasting the long text multiple times
1827
- act(() => {
1828
- result.current.insert(longText, { paste: true });
1829
- result.current.insert(longText, { paste: true });
1830
- result.current.insert(longText, { paste: true });
1831
- });
1832
- const state = getBufferState(result);
1833
- // Check that the text is the result of three concatenations of unique placeholders.
1834
- // Now that ID generation is in the reducer, they are correctly unique even when batched.
1835
- expect(state.lines).toStrictEqual([
1836
- '[Pasted Text: 8 lines][Pasted Text: 8 lines #2][Pasted Text: 8 lines #3]',
1837
- ]);
1838
- expect(result.current.pastedContent['[Pasted Text: 8 lines]']).toBe(longText);
1839
- expect(result.current.pastedContent['[Pasted Text: 8 lines #2]']).toBe(longText);
1840
- expect(result.current.pastedContent['[Pasted Text: 8 lines #3]']).toBe(longText);
1841
- const expectedCursorPos = offsetToLogicalPos(state.text, state.text.length);
1842
- expect(state.cursor).toEqual(expectedCursorPos);
1843
- });
1844
- });
1845
- // More tests would be needed for:
1846
- // - setText, replaceRange
1847
- // - deleteWordLeft, deleteWordRight
1848
- // - More complex undo/redo scenarios
1849
- // - Selection and clipboard (copy/paste) - might need clipboard API mocks or internal state check
1850
- // - openInExternalEditor (heavy mocking of fs, child_process, os)
1851
- // - All edge cases for visual scrolling and wrapping with different viewport sizes and text content.
1852
- describe('replaceRange', () => {
1853
- it('should replace a single-line range with single-line text', async () => {
1854
- const { result } = await renderHook(() => useTextBuffer({
1855
- initialText: '@pac',
1856
- viewport,
1857
- }));
1858
- act(() => result.current.replaceRange(0, 1, 0, 4, 'packages'));
1859
- const state = getBufferState(result);
1860
- expect(state.text).toBe('@packages');
1861
- expect(state.cursor).toEqual([0, 9]); // cursor after 'typescript'
1862
- });
1863
- it('should replace a multi-line range with single-line text', async () => {
1864
- const { result } = await renderHook(() => useTextBuffer({
1865
- initialText: 'hello\nworld\nagain',
1866
- viewport,
1867
- }));
1868
- act(() => result.current.replaceRange(0, 2, 1, 3, ' new ')); // replace 'llo\nwor' with ' new '
1869
- const state = getBufferState(result);
1870
- expect(state.text).toBe('he new ld\nagain');
1871
- expect(state.cursor).toEqual([0, 7]); // cursor after ' new '
1872
- });
1873
- it('should delete a range when replacing with an empty string', async () => {
1874
- const { result } = await renderHook(() => useTextBuffer({
1875
- initialText: 'hello world',
1876
- viewport,
1877
- }));
1878
- act(() => result.current.replaceRange(0, 5, 0, 11, '')); // delete ' world'
1879
- const state = getBufferState(result);
1880
- expect(state.text).toBe('hello');
1881
- expect(state.cursor).toEqual([0, 5]);
1882
- });
1883
- it('should handle replacing at the beginning of the text', async () => {
1884
- const { result } = await renderHook(() => useTextBuffer({
1885
- initialText: 'world',
1886
- viewport,
1887
- }));
1888
- act(() => result.current.replaceRange(0, 0, 0, 0, 'hello '));
1889
- const state = getBufferState(result);
1890
- expect(state.text).toBe('hello world');
1891
- expect(state.cursor).toEqual([0, 6]);
1892
- });
1893
- it('should handle replacing at the end of the text', async () => {
1894
- const { result } = await renderHook(() => useTextBuffer({
1895
- initialText: 'hello',
1896
- viewport,
1897
- }));
1898
- act(() => result.current.replaceRange(0, 5, 0, 5, ' world'));
1899
- const state = getBufferState(result);
1900
- expect(state.text).toBe('hello world');
1901
- expect(state.cursor).toEqual([0, 11]);
1902
- });
1903
- it('should handle replacing the entire buffer content', async () => {
1904
- const { result } = await renderHook(() => useTextBuffer({
1905
- initialText: 'old text',
1906
- viewport,
1907
- }));
1908
- act(() => result.current.replaceRange(0, 0, 0, 8, 'new text'));
1909
- const state = getBufferState(result);
1910
- expect(state.text).toBe('new text');
1911
- expect(state.cursor).toEqual([0, 8]);
1912
- });
1913
- it('should correctly replace with unicode characters', async () => {
1914
- const { result } = await renderHook(() => useTextBuffer({
1915
- initialText: 'hello *** world',
1916
- viewport,
1917
- }));
1918
- act(() => result.current.replaceRange(0, 6, 0, 9, '你好'));
1919
- const state = getBufferState(result);
1920
- expect(state.text).toBe('hello 你好 world');
1921
- expect(state.cursor).toEqual([0, 8]); // after '你好'
1922
- });
1923
- it('should handle invalid range by returning false and not changing text', async () => {
1924
- const { result } = await renderHook(() => useTextBuffer({
1925
- initialText: 'test',
1926
- viewport,
1927
- }));
1928
- act(() => {
1929
- result.current.replaceRange(0, 5, 0, 3, 'fail'); // startCol > endCol in same line
1930
- });
1931
- expect(getBufferState(result).text).toBe('test');
1932
- act(() => {
1933
- result.current.replaceRange(1, 0, 0, 0, 'fail'); // startRow > endRow
1934
- });
1935
- expect(getBufferState(result).text).toBe('test');
1936
- });
1937
- it('replaceRange: multiple lines with a single character', async () => {
1938
- const { result } = await renderHook(() => useTextBuffer({
1939
- initialText: 'first\nsecond\nthird',
1940
- viewport,
1941
- }));
1942
- act(() => result.current.replaceRange(0, 2, 2, 3, 'X')); // Replace 'rst\nsecond\nthi'
1943
- const state = getBufferState(result);
1944
- expect(state.text).toBe('fiXrd');
1945
- expect(state.cursor).toEqual([0, 3]); // After 'X'
1946
- });
1947
- it('should replace a single-line range with multi-line text', async () => {
1948
- const { result } = await renderHook(() => useTextBuffer({
1949
- initialText: 'one two three',
1950
- viewport,
1951
- }));
1952
- // Replace "two" with "new\nline"
1953
- act(() => result.current.replaceRange(0, 4, 0, 7, 'new\nline'));
1954
- const state = getBufferState(result);
1955
- expect(state.lines).toEqual(['one new', 'line three']);
1956
- expect(state.text).toBe('one new\nline three');
1957
- expect(state.cursor).toEqual([1, 4]); // cursor after 'line'
1958
- });
1959
- });
1960
- describe('Input Sanitization', () => {
1961
- const createInput = (sequence) => ({
1962
- name: '',
1963
- shift: false,
1964
- alt: false,
1965
- ctrl: false,
1966
- cmd: false,
1967
- insertable: true,
1968
- sequence,
1969
- });
1970
- it.each([
1971
- {
1972
- input: '\x1B[31mHello\x1B[0m \x1B[32mWorld\x1B[0m',
1973
- expected: 'Hello World',
1974
- desc: 'ANSI escape codes',
1975
- },
1976
- {
1977
- input: 'H\x07e\x08l\x0Bl\x0Co',
1978
- expected: 'Hello',
1979
- desc: 'control characters',
1980
- },
1981
- {
1982
- input: '\u001B[4mH\u001B[0mello',
1983
- expected: 'Hello',
1984
- desc: 'mixed ANSI and control characters',
1985
- },
1986
- {
1987
- input: '\u001B[4mPasted\u001B[4m Text',
1988
- expected: 'Pasted Text',
1989
- desc: 'pasted text with ANSI',
1990
- },
1991
- ])('should strip $desc from input', async ({ input, expected }) => {
1992
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
1993
- act(() => {
1994
- result.current.handleInput(createInput(input));
1995
- });
1996
- expect(getBufferState(result).text).toBe(expected);
1997
- });
1998
- it('should not strip standard characters or newlines', async () => {
1999
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
2000
- const validText = 'Hello World\nThis is a test.';
2001
- act(() => {
2002
- result.current.handleInput(createInput(validText));
2003
- });
2004
- expect(getBufferState(result).text).toBe(validText);
2005
- });
2006
- it('should sanitize large text (>5000 chars) and strip unsafe characters', async () => {
2007
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
2008
- const unsafeChars = '\x07\x08\x0B\x0C';
2009
- const largeTextWithUnsafe = 'safe text'.repeat(600) + unsafeChars + 'more safe text';
2010
- expect(largeTextWithUnsafe.length).toBeGreaterThan(5000);
2011
- act(() => {
2012
- result.current.handleInput({
2013
- name: '',
2014
- shift: false,
2015
- alt: false,
2016
- ctrl: false,
2017
- cmd: false,
2018
- insertable: true,
2019
- sequence: largeTextWithUnsafe,
2020
- });
2021
- });
2022
- const resultText = getBufferState(result).text;
2023
- expect(resultText).not.toContain('\x07');
2024
- expect(resultText).not.toContain('\x08');
2025
- expect(resultText).not.toContain('\x0B');
2026
- expect(resultText).not.toContain('\x0C');
2027
- expect(resultText).toContain('safe text');
2028
- expect(resultText).toContain('more safe text');
2029
- });
2030
- it('should sanitize large ANSI text (>5000 chars) and strip escape codes', async () => {
2031
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
2032
- const largeTextWithAnsi = '\x1B[31m' +
2033
- 'red text'.repeat(800) +
2034
- '\x1B[0m' +
2035
- '\x1B[32m' +
2036
- 'green text'.repeat(200) +
2037
- '\x1B[0m';
2038
- expect(largeTextWithAnsi.length).toBeGreaterThan(5000);
2039
- act(() => {
2040
- result.current.handleInput({
2041
- name: '',
2042
- shift: false,
2043
- alt: false,
2044
- ctrl: false,
2045
- cmd: false,
2046
- insertable: true,
2047
- sequence: largeTextWithAnsi,
2048
- });
2049
- });
2050
- const resultText = getBufferState(result).text;
2051
- expect(resultText).not.toContain('\x1B[31m');
2052
- expect(resultText).not.toContain('\x1B[32m');
2053
- expect(resultText).not.toContain('\x1B[0m');
2054
- expect(resultText).toContain('red text');
2055
- expect(resultText).toContain('green text');
2056
- });
2057
- it('should not strip popular emojis', async () => {
2058
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
2059
- const emojis = '🐍🐳🦀🦄';
2060
- act(() => {
2061
- result.current.handleInput({
2062
- name: '',
2063
- shift: false,
2064
- alt: false,
2065
- ctrl: false,
2066
- cmd: false,
2067
- insertable: true,
2068
- sequence: emojis,
2069
- });
2070
- });
2071
- expect(getBufferState(result).text).toBe(emojis);
2072
- });
2073
- });
2074
- describe('inputFilter', () => {
2075
- it('should filter input based on the provided filter function', async () => {
2076
- const { result } = await renderHook(() => useTextBuffer({
2077
- viewport,
2078
- inputFilter: (text) => text.replace(/[^0-9]/g, ''),
2079
- }));
2080
- act(() => result.current.insert('a1b2c3'));
2081
- expect(getBufferState(result).text).toBe('123');
2082
- });
2083
- it('should handle empty result from filter', async () => {
2084
- const { result } = await renderHook(() => useTextBuffer({
2085
- viewport,
2086
- inputFilter: (text) => text.replace(/[^0-9]/g, ''),
2087
- }));
2088
- act(() => result.current.insert('abc'));
2089
- expect(getBufferState(result).text).toBe('');
2090
- });
2091
- it('should filter pasted text', async () => {
2092
- const { result } = await renderHook(() => useTextBuffer({
2093
- viewport,
2094
- inputFilter: (text) => text.toUpperCase(),
2095
- }));
2096
- act(() => result.current.insert('hello', { paste: true }));
2097
- expect(getBufferState(result).text).toBe('HELLO');
2098
- });
2099
- it('should not filter newlines if they are allowed by the filter', async () => {
2100
- const { result } = await renderHook(() => useTextBuffer({
2101
- viewport,
2102
- inputFilter: (text) => text, // Allow everything including newlines
2103
- }));
2104
- act(() => result.current.insert('a\nb'));
2105
- // The insert function splits by newline and inserts separately if it detects them.
2106
- // If the filter allows them, they should be handled correctly by the subsequent logic in insert.
2107
- expect(getBufferState(result).text).toBe('a\nb');
2108
- });
2109
- it('should filter before newline check in insert', async () => {
2110
- const { result } = await renderHook(() => useTextBuffer({
2111
- viewport,
2112
- inputFilter: (text) => text.replace(/\n/g, ''), // Filter out newlines
2113
- }));
2114
- act(() => result.current.insert('a\nb'));
2115
- expect(getBufferState(result).text).toBe('ab');
2116
- });
2117
- });
2118
- describe('stripAnsi', () => {
2119
- it('should correctly strip ANSI escape codes', async () => {
2120
- const textWithAnsi = '\x1B[31mHello\x1B[0m World';
2121
- expect(stripAnsi(textWithAnsi)).toBe('Hello World');
2122
- });
2123
- it('should handle multiple ANSI codes', async () => {
2124
- const textWithMultipleAnsi = '\x1B[1m\x1B[34mBold Blue\x1B[0m Text';
2125
- expect(stripAnsi(textWithMultipleAnsi)).toBe('Bold Blue Text');
2126
- });
2127
- it('should not modify text without ANSI codes', async () => {
2128
- const plainText = 'Plain text';
2129
- expect(stripAnsi(plainText)).toBe('Plain text');
2130
- });
2131
- it('should handle empty string', async () => {
2132
- expect(stripAnsi('')).toBe('');
2133
- });
2134
- });
2135
- describe('Memoization', () => {
2136
- it('should keep action references stable across re-renders', async () => {
2137
- const { result, rerender } = await renderHook(() => useTextBuffer({ viewport }));
2138
- const initialInsert = result.current.insert;
2139
- const initialBackspace = result.current.backspace;
2140
- const initialMove = result.current.move;
2141
- const initialHandleInput = result.current.handleInput;
2142
- rerender();
2143
- expect(result.current.insert).toBe(initialInsert);
2144
- expect(result.current.backspace).toBe(initialBackspace);
2145
- expect(result.current.move).toBe(initialMove);
2146
- expect(result.current.handleInput).toBe(initialHandleInput);
2147
- });
2148
- it('should have memoized actions that operate on the latest state', async () => {
2149
- const { result } = await renderHook(() => useTextBuffer({ viewport }));
2150
- // Store a reference to the memoized insert function.
2151
- const memoizedInsert = result.current.insert;
2152
- // Update the buffer state.
2153
- act(() => {
2154
- result.current.insert('hello');
2155
- });
2156
- expect(getBufferState(result).text).toBe('hello');
2157
- // Now, call the original memoized function reference.
2158
- act(() => {
2159
- memoizedInsert(' world');
2160
- });
2161
- // It should have operated on the updated state.
2162
- expect(getBufferState(result).text).toBe('hello world');
2163
- });
2164
- });
2165
- describe('singleLine mode', () => {
2166
- it('should not insert a newline character when singleLine is true', async () => {
2167
- const { result } = await renderHook(() => useTextBuffer({
2168
- viewport,
2169
- singleLine: true,
2170
- }));
2171
- act(() => result.current.insert('\n'));
2172
- const state = getBufferState(result);
2173
- expect(state.text).toBe('');
2174
- expect(state.lines).toEqual(['']);
2175
- });
2176
- it('should not create a new line when newline() is called and singleLine is true', async () => {
2177
- const { result } = await renderHook(() => useTextBuffer({
2178
- initialText: 'ab',
2179
- viewport,
2180
- singleLine: true,
2181
- }));
2182
- act(() => result.current.move('end')); // cursor at [0,2]
2183
- act(() => result.current.newline());
2184
- const state = getBufferState(result);
2185
- expect(state.text).toBe('ab');
2186
- expect(state.lines).toEqual(['ab']);
2187
- expect(state.cursor).toEqual([0, 2]);
2188
- });
2189
- it('should not handle "Enter" key as newline when singleLine is true', async () => {
2190
- const { result } = await renderHook(() => useTextBuffer({
2191
- viewport,
2192
- singleLine: true,
2193
- }));
2194
- act(() => {
2195
- result.current.handleInput({
2196
- name: 'enter',
2197
- shift: false,
2198
- alt: false,
2199
- ctrl: false,
2200
- cmd: false,
2201
- insertable: true,
2202
- sequence: '\r',
2203
- });
2204
- });
2205
- expect(getBufferState(result).lines).toEqual(['']);
2206
- });
2207
- it('should not print anything for function keys when singleLine is true', async () => {
2208
- const { result } = await renderHook(() => useTextBuffer({
2209
- viewport,
2210
- singleLine: true,
2211
- }));
2212
- act(() => {
2213
- result.current.handleInput({
2214
- name: 'f1',
2215
- shift: false,
2216
- alt: false,
2217
- ctrl: false,
2218
- cmd: false,
2219
- insertable: false,
2220
- sequence: '\u001bOP',
2221
- });
2222
- });
2223
- expect(getBufferState(result).lines).toEqual(['']);
2224
- });
2225
- it('should strip newlines from pasted text when singleLine is true', async () => {
2226
- const { result } = await renderHook(() => useTextBuffer({
2227
- viewport,
2228
- singleLine: true,
2229
- }));
2230
- act(() => result.current.insert('hello\nworld', { paste: true }));
2231
- const state = getBufferState(result);
2232
- expect(state.text).toBe('helloworld');
2233
- expect(state.lines).toEqual(['helloworld']);
2234
- });
2235
- });
2236
- });
2237
- describe('offsetToLogicalPos', () => {
2238
- it.each([
2239
- { text: 'any text', offset: 0, expected: [0, 0], desc: 'offset 0' },
2240
- { text: 'hello', offset: 0, expected: [0, 0], desc: 'single line start' },
2241
- { text: 'hello', offset: 2, expected: [0, 2], desc: 'single line middle' },
2242
- { text: 'hello', offset: 5, expected: [0, 5], desc: 'single line end' },
2243
- { text: 'hello', offset: 10, expected: [0, 5], desc: 'beyond end clamps' },
2244
- {
2245
- text: 'a\n\nc',
2246
- offset: 0,
2247
- expected: [0, 0],
2248
- desc: 'empty lines - first char',
2249
- },
2250
- {
2251
- text: 'a\n\nc',
2252
- offset: 1,
2253
- expected: [0, 1],
2254
- desc: 'empty lines - end of first',
2255
- },
2256
- {
2257
- text: 'a\n\nc',
2258
- offset: 2,
2259
- expected: [1, 0],
2260
- desc: 'empty lines - empty line',
2261
- },
2262
- {
2263
- text: 'a\n\nc',
2264
- offset: 3,
2265
- expected: [2, 0],
2266
- desc: 'empty lines - last line start',
2267
- },
2268
- {
2269
- text: 'a\n\nc',
2270
- offset: 4,
2271
- expected: [2, 1],
2272
- desc: 'empty lines - last line end',
2273
- },
2274
- {
2275
- text: 'hello\n',
2276
- offset: 5,
2277
- expected: [0, 5],
2278
- desc: 'newline end - before newline',
2279
- },
2280
- {
2281
- text: 'hello\n',
2282
- offset: 6,
2283
- expected: [1, 0],
2284
- desc: 'newline end - after newline',
2285
- },
2286
- {
2287
- text: 'hello\n',
2288
- offset: 7,
2289
- expected: [1, 0],
2290
- desc: 'newline end - beyond',
2291
- },
2292
- {
2293
- text: '\nhello',
2294
- offset: 0,
2295
- expected: [0, 0],
2296
- desc: 'newline start - first line',
2297
- },
2298
- {
2299
- text: '\nhello',
2300
- offset: 1,
2301
- expected: [1, 0],
2302
- desc: 'newline start - second line',
2303
- },
2304
- {
2305
- text: '\nhello',
2306
- offset: 3,
2307
- expected: [1, 2],
2308
- desc: 'newline start - middle of second',
2309
- },
2310
- { text: '', offset: 0, expected: [0, 0], desc: 'empty string at 0' },
2311
- { text: '', offset: 5, expected: [0, 0], desc: 'empty string beyond' },
2312
- {
2313
- text: '你好\n世界',
2314
- offset: 0,
2315
- expected: [0, 0],
2316
- desc: 'unicode - start',
2317
- },
2318
- {
2319
- text: '你好\n世界',
2320
- offset: 1,
2321
- expected: [0, 1],
2322
- desc: 'unicode - after first char',
2323
- },
2324
- {
2325
- text: '你好\n世界',
2326
- offset: 2,
2327
- expected: [0, 2],
2328
- desc: 'unicode - end first line',
2329
- },
2330
- {
2331
- text: '你好\n世界',
2332
- offset: 3,
2333
- expected: [1, 0],
2334
- desc: 'unicode - second line start',
2335
- },
2336
- {
2337
- text: '你好\n世界',
2338
- offset: 4,
2339
- expected: [1, 1],
2340
- desc: 'unicode - second line middle',
2341
- },
2342
- {
2343
- text: '你好\n世界',
2344
- offset: 5,
2345
- expected: [1, 2],
2346
- desc: 'unicode - second line end',
2347
- },
2348
- {
2349
- text: '你好\n世界',
2350
- offset: 6,
2351
- expected: [1, 2],
2352
- desc: 'unicode - beyond',
2353
- },
2354
- {
2355
- text: 'abc\ndef',
2356
- offset: 3,
2357
- expected: [0, 3],
2358
- desc: 'at newline - end of line',
2359
- },
2360
- {
2361
- text: 'abc\ndef',
2362
- offset: 4,
2363
- expected: [1, 0],
2364
- desc: 'at newline - after newline',
2365
- },
2366
- { text: '🐶🐱', offset: 0, expected: [0, 0], desc: 'emoji - start' },
2367
- { text: '🐶🐱', offset: 1, expected: [0, 1], desc: 'emoji - middle' },
2368
- { text: '🐶🐱', offset: 2, expected: [0, 2], desc: 'emoji - end' },
2369
- ])('should handle $desc', async ({ text, offset, expected }) => {
2370
- expect(offsetToLogicalPos(text, offset)).toEqual(expected);
2371
- });
2372
- describe('multi-line text', () => {
2373
- const text = 'hello\nworld\n123';
2374
- it.each([
2375
- { offset: 0, expected: [0, 0], desc: 'start of first line' },
2376
- { offset: 3, expected: [0, 3], desc: 'middle of first line' },
2377
- { offset: 5, expected: [0, 5], desc: 'end of first line' },
2378
- { offset: 6, expected: [1, 0], desc: 'start of second line' },
2379
- { offset: 8, expected: [1, 2], desc: 'middle of second line' },
2380
- { offset: 11, expected: [1, 5], desc: 'end of second line' },
2381
- { offset: 12, expected: [2, 0], desc: 'start of third line' },
2382
- { offset: 13, expected: [2, 1], desc: 'middle of third line' },
2383
- { offset: 15, expected: [2, 3], desc: 'end of third line' },
2384
- { offset: 20, expected: [2, 3], desc: 'beyond end' },
2385
- ])('should return $expected for $desc (offset $offset)', ({ offset, expected }) => {
2386
- expect(offsetToLogicalPos(text, offset)).toEqual(expected);
2387
- });
2388
- });
2389
- });
2390
- describe('logicalPosToOffset', () => {
2391
- it('should convert row/col position to offset correctly', async () => {
2392
- const lines = ['hello', 'world', '123'];
2393
- // Line 0: "hello" (5 chars)
2394
- expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // Start of 'hello'
2395
- expect(logicalPosToOffset(lines, 0, 3)).toBe(3); // 'l' in 'hello'
2396
- expect(logicalPosToOffset(lines, 0, 5)).toBe(5); // End of 'hello'
2397
- // Line 1: "world" (5 chars), offset starts at 6 (5 + 1 for newline)
2398
- expect(logicalPosToOffset(lines, 1, 0)).toBe(6); // Start of 'world'
2399
- expect(logicalPosToOffset(lines, 1, 2)).toBe(8); // 'r' in 'world'
2400
- expect(logicalPosToOffset(lines, 1, 5)).toBe(11); // End of 'world'
2401
- // Line 2: "123" (3 chars), offset starts at 12 (5 + 1 + 5 + 1)
2402
- expect(logicalPosToOffset(lines, 2, 0)).toBe(12); // Start of '123'
2403
- expect(logicalPosToOffset(lines, 2, 1)).toBe(13); // '2' in '123'
2404
- expect(logicalPosToOffset(lines, 2, 3)).toBe(15); // End of '123'
2405
- });
2406
- it('should handle empty lines', async () => {
2407
- const lines = ['a', '', 'c'];
2408
- expect(logicalPosToOffset(lines, 0, 0)).toBe(0); // 'a'
2409
- expect(logicalPosToOffset(lines, 0, 1)).toBe(1); // End of 'a'
2410
- expect(logicalPosToOffset(lines, 1, 0)).toBe(2); // Empty line
2411
- expect(logicalPosToOffset(lines, 2, 0)).toBe(3); // 'c'
2412
- expect(logicalPosToOffset(lines, 2, 1)).toBe(4); // End of 'c'
2413
- });
2414
- it('should handle single empty line', async () => {
2415
- const lines = [''];
2416
- expect(logicalPosToOffset(lines, 0, 0)).toBe(0);
2417
- });
2418
- it('should be inverse of offsetToLogicalPos', async () => {
2419
- const lines = ['hello', 'world', '123'];
2420
- const text = lines.join('\n');
2421
- // Test round-trip conversion
2422
- for (let offset = 0; offset <= text.length; offset++) {
2423
- const [row, col] = offsetToLogicalPos(text, offset);
2424
- const convertedOffset = logicalPosToOffset(lines, row, col);
2425
- expect(convertedOffset).toBe(offset);
2426
- }
2427
- });
2428
- it('should handle out-of-bounds positions', async () => {
2429
- const lines = ['hello'];
2430
- // Beyond end of line
2431
- expect(logicalPosToOffset(lines, 0, 10)).toBe(5); // Clamps to end of line
2432
- // Beyond array bounds - should clamp to the last line
2433
- expect(logicalPosToOffset(lines, 5, 0)).toBe(0); // Clamps to start of last line (row 0)
2434
- expect(logicalPosToOffset(lines, 5, 10)).toBe(5); // Clamps to end of last line
2435
- });
2436
- });
2437
- const createTestState = (lines, cursorRow, cursorCol, viewportWidth = 80) => {
2438
- const text = lines.join('\n');
2439
- let state = textBufferReducer(initialState, {
2440
- type: 'set_text',
2441
- payload: text,
2442
- });
2443
- state = textBufferReducer(state, {
2444
- type: 'set_cursor',
2445
- payload: { cursorRow, cursorCol, preferredCol: null },
2446
- });
2447
- state = textBufferReducer(state, {
2448
- type: 'set_viewport',
2449
- payload: { width: viewportWidth, height: 24 },
2450
- });
2451
- return state;
2452
- };
2453
- describe('textBufferReducer vim operations', () => {
2454
- describe('vim_delete_line', () => {
2455
- it('should delete a single line including newline in multi-line text', async () => {
2456
- const state = createTestState(['line1', 'line2', 'line3'], 1, 2);
2457
- const action = {
2458
- type: 'vim_delete_line',
2459
- payload: { count: 1 },
2460
- };
2461
- const result = textBufferReducer(state, action);
2462
- expect(result).toHaveOnlyValidCharacters();
2463
- // After deleting line2, we should have line1 and line3, with cursor on line3 (now at index 1)
2464
- expect(result.lines).toEqual(['line1', 'line3']);
2465
- expect(result.cursorRow).toBe(1);
2466
- expect(result.cursorCol).toBe(0);
2467
- });
2468
- it('should delete multiple lines when count > 1', async () => {
2469
- const state = createTestState(['line1', 'line2', 'line3', 'line4'], 1, 0);
2470
- const action = {
2471
- type: 'vim_delete_line',
2472
- payload: { count: 2 },
2473
- };
2474
- const result = textBufferReducer(state, action);
2475
- expect(result).toHaveOnlyValidCharacters();
2476
- // Should delete line2 and line3, leaving line1 and line4
2477
- expect(result.lines).toEqual(['line1', 'line4']);
2478
- expect(result.cursorRow).toBe(1);
2479
- expect(result.cursorCol).toBe(0);
2480
- });
2481
- it('should clear single line content when only one line exists', async () => {
2482
- const state = createTestState(['only line'], 0, 5);
2483
- const action = {
2484
- type: 'vim_delete_line',
2485
- payload: { count: 1 },
2486
- };
2487
- const result = textBufferReducer(state, action);
2488
- expect(result).toHaveOnlyValidCharacters();
2489
- // Should clear the line content but keep the line
2490
- expect(result.lines).toEqual(['']);
2491
- expect(result.cursorRow).toBe(0);
2492
- expect(result.cursorCol).toBe(0);
2493
- });
2494
- it('should handle deleting the last line properly', async () => {
2495
- const state = createTestState(['line1', 'line2'], 1, 0);
2496
- const action = {
2497
- type: 'vim_delete_line',
2498
- payload: { count: 1 },
2499
- };
2500
- const result = textBufferReducer(state, action);
2501
- expect(result).toHaveOnlyValidCharacters();
2502
- // Should delete the last line completely, not leave empty line
2503
- expect(result.lines).toEqual(['line1']);
2504
- expect(result.cursorRow).toBe(0);
2505
- expect(result.cursorCol).toBe(0);
2506
- });
2507
- it('should handle deleting all lines and maintain valid state for subsequent paste', async () => {
2508
- const state = createTestState(['line1', 'line2', 'line3', 'line4'], 0, 0);
2509
- // Delete all 4 lines with 4dd
2510
- const deleteAction = {
2511
- type: 'vim_delete_line',
2512
- payload: { count: 4 },
2513
- };
2514
- const afterDelete = textBufferReducer(state, deleteAction);
2515
- expect(afterDelete).toHaveOnlyValidCharacters();
2516
- // After deleting all lines, should have one empty line
2517
- expect(afterDelete.lines).toEqual(['']);
2518
- expect(afterDelete.cursorRow).toBe(0);
2519
- expect(afterDelete.cursorCol).toBe(0);
2520
- // Now paste multiline content - this should work correctly
2521
- const pasteAction = {
2522
- type: 'insert',
2523
- payload: 'new1\nnew2\nnew3\nnew4',
2524
- };
2525
- const afterPaste = textBufferReducer(afterDelete, pasteAction);
2526
- expect(afterPaste).toHaveOnlyValidCharacters();
2527
- // All lines including the first one should be present
2528
- expect(afterPaste.lines).toEqual(['new1', 'new2', 'new3', 'new4']);
2529
- expect(afterPaste.cursorRow).toBe(3);
2530
- expect(afterPaste.cursorCol).toBe(4);
2531
- });
2532
- });
2533
- });
2534
- describe('Unicode helper functions', () => {
2535
- describe('findWordEndInLine with Unicode', () => {
2536
- it('should handle combining characters', async () => {
2537
- // café with combining accent
2538
- const cafeWithCombining = 'cafe\u0301';
2539
- const result = findWordEndInLine(cafeWithCombining + ' test', 0);
2540
- expect(result).toBe(3); // End of 'café' at base character 'e', not combining accent
2541
- });
2542
- it('should handle precomposed characters with diacritics', async () => {
2543
- // café with precomposed é (U+00E9)
2544
- const cafePrecomposed = 'café';
2545
- const result = findWordEndInLine(cafePrecomposed + ' test', 0);
2546
- expect(result).toBe(3); // End of 'café' at precomposed character 'é'
2547
- });
2548
- it('should return null when no word end found', async () => {
2549
- const result = findWordEndInLine(' ', 0);
2550
- expect(result).toBeNull(); // No word end found in whitespace-only string string
2551
- });
2552
- });
2553
- describe('findNextWordStartInLine with Unicode', () => {
2554
- it('should handle right-to-left text', async () => {
2555
- const result = findNextWordStartInLine('hello مرحبا world', 0);
2556
- expect(result).toBe(6); // Start of Arabic word
2557
- });
2558
- it('should handle Chinese characters', async () => {
2559
- const result = findNextWordStartInLine('hello 你好 world', 0);
2560
- expect(result).toBe(6); // Start of Chinese word
2561
- });
2562
- it('should return null at end of line', async () => {
2563
- const result = findNextWordStartInLine('hello', 10);
2564
- expect(result).toBeNull();
2565
- });
2566
- it('should handle combining characters', async () => {
2567
- // café with combining accent + next word
2568
- const textWithCombining = 'cafe\u0301 test';
2569
- const result = findNextWordStartInLine(textWithCombining, 0);
2570
- expect(result).toBe(6); // Start of 'test' after 'café ' (combining char makes string longer)
2571
- });
2572
- it('should handle precomposed characters with diacritics', async () => {
2573
- // café with precomposed é + next word
2574
- const textPrecomposed = 'café test';
2575
- const result = findNextWordStartInLine(textPrecomposed, 0);
2576
- expect(result).toBe(5); // Start of 'test' after 'café '
2577
- });
2578
- });
2579
- describe('isWordCharStrict with Unicode', () => {
2580
- it('should return true for ASCII word characters', async () => {
2581
- expect(isWordCharStrict('a')).toBe(true);
2582
- expect(isWordCharStrict('Z')).toBe(true);
2583
- expect(isWordCharStrict('0')).toBe(true);
2584
- expect(isWordCharStrict('_')).toBe(true);
2585
- });
2586
- it('should return false for punctuation', async () => {
2587
- expect(isWordCharStrict('.')).toBe(false);
2588
- expect(isWordCharStrict(',')).toBe(false);
2589
- expect(isWordCharStrict('!')).toBe(false);
2590
- });
2591
- it('should return true for non-Latin scripts', async () => {
2592
- expect(isWordCharStrict('你')).toBe(true); // Chinese character
2593
- expect(isWordCharStrict('م')).toBe(true); // Arabic character
2594
- });
2595
- it('should return false for whitespace', async () => {
2596
- expect(isWordCharStrict(' ')).toBe(false);
2597
- expect(isWordCharStrict('\t')).toBe(false);
2598
- });
2599
- });
2600
- describe('cpLen with Unicode', () => {
2601
- it('should handle combining characters', async () => {
2602
- expect(cpLen('é')).toBe(1); // Precomposed
2603
- expect(cpLen('e\u0301')).toBe(2); // e + combining acute
2604
- });
2605
- it('should handle Chinese and Arabic text', async () => {
2606
- expect(cpLen('hello 你好 world')).toBe(14); // 5 + 1 + 2 + 1 + 5 = 14
2607
- expect(cpLen('hello مرحبا world')).toBe(17);
2608
- });
2609
- });
2610
- describe('useTextBuffer CJK Navigation', () => {
2611
- const viewport = { width: 80, height: 24 };
2612
- it('should navigate by word in Chinese', async () => {
2613
- const { result } = await renderHook(() => useTextBuffer({
2614
- initialText: '你好世界',
2615
- initialCursorOffset: 4, // End of string
2616
- viewport,
2617
- }));
2618
- // Initial state: cursor at end (index 2 in code points if 4 is length? wait. length is 2 code points? No. '你好世界' length is 4.)
2619
- // '你好世界' length is 4. Code points length is 4.
2620
- // Move word left
2621
- act(() => {
2622
- result.current.move('wordLeft');
2623
- });
2624
- // Should be at start of "世界" (index 2)
2625
- // "你好世界" -> "你好" | "世界"
2626
- expect(result.current.cursor[1]).toBe(2);
2627
- // Move word left again
2628
- act(() => {
2629
- result.current.move('wordLeft');
2630
- });
2631
- // Should be at start of "你好" (index 0)
2632
- expect(result.current.cursor[1]).toBe(0);
2633
- // Move word left again (should stay at 0)
2634
- act(() => {
2635
- result.current.move('wordLeft');
2636
- });
2637
- expect(result.current.cursor[1]).toBe(0);
2638
- // Move word right
2639
- act(() => {
2640
- result.current.move('wordRight');
2641
- });
2642
- // Should be at end of "你好" (index 2)
2643
- expect(result.current.cursor[1]).toBe(2);
2644
- // Move word right again
2645
- act(() => {
2646
- result.current.move('wordRight');
2647
- });
2648
- // Should be at end of "世界" (index 4)
2649
- expect(result.current.cursor[1]).toBe(4);
2650
- // Move word right again (should stay at end)
2651
- act(() => {
2652
- result.current.move('wordRight');
2653
- });
2654
- expect(result.current.cursor[1]).toBe(4);
2655
- });
2656
- it('should navigate mixed English and Chinese', async () => {
2657
- const { result } = await renderHook(() => useTextBuffer({
2658
- initialText: 'Hello你好World',
2659
- initialCursorOffset: 10, // End
2660
- viewport,
2661
- }));
2662
- // Hello (5) + 你好 (2) + World (5) = 12 chars.
2663
- // initialCursorOffset 10? 'Hello你好World'.length is 12.
2664
- // Let's set it to end.
2665
- act(() => {
2666
- result.current.move('end');
2667
- });
2668
- expect(result.current.cursor[1]).toBe(12);
2669
- // wordLeft -> start of "World" (index 7)
2670
- act(() => result.current.move('wordLeft'));
2671
- expect(result.current.cursor[1]).toBe(7);
2672
- // wordLeft -> start of "你好" (index 5)
2673
- act(() => result.current.move('wordLeft'));
2674
- expect(result.current.cursor[1]).toBe(5);
2675
- // wordLeft -> start of "Hello" (index 0)
2676
- act(() => result.current.move('wordLeft'));
2677
- expect(result.current.cursor[1]).toBe(0);
2678
- // wordLeft -> start of line (should stay at 0)
2679
- act(() => result.current.move('wordLeft'));
2680
- expect(result.current.cursor[1]).toBe(0);
2681
- });
2682
- });
2683
- });
2684
- const mockPlatform = (platform) => {
2685
- vi.stubGlobal('process', Object.create(process, {
2686
- platform: {
2687
- get: () => platform,
2688
- },
2689
- }));
2690
- };
2691
- describe('Transformation Utilities', () => {
2692
- afterEach(() => {
2693
- vi.restoreAllMocks();
2694
- vi.unstubAllGlobals();
2695
- });
2696
- describe('getTransformedImagePath', () => {
2697
- beforeEach(() => mockPlatform('linux'));
2698
- it('should transform a simple image path', async () => {
2699
- expect(getTransformedImagePath('@test.png')).toBe('[Image test.png]');
2700
- });
2701
- it('should handle paths with directories', async () => {
2702
- expect(getTransformedImagePath('@path/to/image.jpg')).toBe('[Image image.jpg]');
2703
- });
2704
- it('should truncate long filenames', async () => {
2705
- expect(getTransformedImagePath('@verylongfilename1234567890.png')).toBe('[Image ...1234567890.png]');
2706
- });
2707
- it('should handle different image extensions', async () => {
2708
- expect(getTransformedImagePath('@test.jpg')).toBe('[Image test.jpg]');
2709
- expect(getTransformedImagePath('@test.jpeg')).toBe('[Image test.jpeg]');
2710
- expect(getTransformedImagePath('@test.gif')).toBe('[Image test.gif]');
2711
- expect(getTransformedImagePath('@test.webp')).toBe('[Image test.webp]');
2712
- expect(getTransformedImagePath('@test.svg')).toBe('[Image test.svg]');
2713
- expect(getTransformedImagePath('@test.bmp')).toBe('[Image test.bmp]');
2714
- });
2715
- it('should handle POSIX-style forward-slash paths on any platform', async () => {
2716
- const input = '@C:/Users/foo/screenshots/image2x.png';
2717
- expect(getTransformedImagePath(input)).toBe('[Image image2x.png]');
2718
- });
2719
- it('should handle escaped spaces in paths', async () => {
2720
- const input = '@path/to/my\\ file.png';
2721
- expect(getTransformedImagePath(input)).toBe('[Image my file.png]');
2722
- });
2723
- });
2724
- describe('getTransformationsForLine', () => {
2725
- it('should find transformations in a line', async () => {
2726
- const line = 'Check out @test.png and @another.jpg';
2727
- const result = calculateTransformationsForLine(line);
2728
- expect(result).toHaveLength(2);
2729
- expect(result[0]).toMatchObject({
2730
- logicalText: '@test.png',
2731
- collapsedText: '[Image test.png]',
2732
- });
2733
- expect(result[1]).toMatchObject({
2734
- logicalText: '@another.jpg',
2735
- collapsedText: '[Image another.jpg]',
2736
- });
2737
- });
2738
- it('should handle no transformations', async () => {
2739
- const line = 'Just some regular text';
2740
- const result = calculateTransformationsForLine(line);
2741
- expect(result).toEqual([]);
2742
- });
2743
- it('should handle empty line', async () => {
2744
- const result = calculateTransformationsForLine('');
2745
- expect(result).toEqual([]);
2746
- });
2747
- it('should keep adjacent image paths as separate transformations', async () => {
2748
- const line = '@a.png@b.png@c.png';
2749
- const result = calculateTransformationsForLine(line);
2750
- expect(result).toHaveLength(3);
2751
- expect(result[0].logicalText).toBe('@a.png');
2752
- expect(result[1].logicalText).toBe('@b.png');
2753
- expect(result[2].logicalText).toBe('@c.png');
2754
- });
2755
- it('should handle multiple transformations in a row', async () => {
2756
- const line = '@a.png @b.png @c.png';
2757
- const result = calculateTransformationsForLine(line);
2758
- expect(result).toHaveLength(3);
2759
- });
2760
- });
2761
- describe('getTransformUnderCursor', () => {
2762
- const transformations = [
2763
- {
2764
- logStart: 5,
2765
- logEnd: 14,
2766
- logicalText: '@test.png',
2767
- collapsedText: '[Image @test.png]',
2768
- type: 'image',
2769
- },
2770
- {
2771
- logStart: 20,
2772
- logEnd: 31,
2773
- logicalText: '@another.jpg',
2774
- collapsedText: '[Image @another.jpg]',
2775
- type: 'image',
2776
- },
2777
- ];
2778
- it('should find transformation when cursor is inside it', async () => {
2779
- const result = getTransformUnderCursor(0, 7, [transformations]);
2780
- expect(result).toEqual(transformations[0]);
2781
- });
2782
- it('should find transformation when cursor is at start', async () => {
2783
- const result = getTransformUnderCursor(0, 5, [transformations]);
2784
- expect(result).toEqual(transformations[0]);
2785
- });
2786
- it('should NOT find transformation when cursor is at end', async () => {
2787
- const result = getTransformUnderCursor(0, 14, [transformations]);
2788
- expect(result).toBeNull();
2789
- });
2790
- it('should return null when cursor is not on a transformation', async () => {
2791
- const result = getTransformUnderCursor(0, 2, [transformations]);
2792
- expect(result).toBeNull();
2793
- });
2794
- it('should handle empty transformations array', async () => {
2795
- const result = getTransformUnderCursor(0, 5, []);
2796
- expect(result).toBeNull();
2797
- });
2798
- it('regression: should not find paste transformation when clicking one character after it', async () => {
2799
- const pasteId = '[Pasted Text: 5 lines]';
2800
- const line = pasteId + ' suffix';
2801
- const transformations = calculateTransformationsForLine(line);
2802
- const pasteTransform = transformations.find((t) => t.type === 'paste');
2803
- expect(pasteTransform).toBeDefined();
2804
- const endPos = pasteTransform.logEnd;
2805
- // Position strictly at end should be null
2806
- expect(getTransformUnderCursor(0, endPos, [transformations])).toBeNull();
2807
- // Position inside should be found
2808
- expect(getTransformUnderCursor(0, endPos - 1, [transformations])).toEqual(pasteTransform);
2809
- });
2810
- });
2811
- describe('calculateTransformedLine', () => {
2812
- it('should transform a line with one transformation', async () => {
2813
- const line = 'Check out @test.png';
2814
- const transformations = calculateTransformationsForLine(line);
2815
- const result = calculateTransformedLine(line, 0, [0, 0], transformations);
2816
- expect(result.transformedLine).toBe('Check out [Image test.png]');
2817
- expect(result.transformedToLogMap).toHaveLength(27); // Length includes all characters in the transformed line
2818
- // Test that we have proper mappings
2819
- expect(result.transformedToLogMap[0]).toBe(0); // 'C'
2820
- expect(result.transformedToLogMap[9]).toBe(9); // ' ' before transformation
2821
- });
2822
- it('should handle cursor inside transformation', async () => {
2823
- const line = 'Check out @test.png';
2824
- const transformations = calculateTransformationsForLine(line);
2825
- // Cursor at '@' (position 10 in the line)
2826
- const result = calculateTransformedLine(line, 0, [0, 10], transformations);
2827
- // Should show full path when cursor is on it
2828
- expect(result.transformedLine).toBe('Check out @test.png');
2829
- // When expanded, each character maps to itself
2830
- expect(result.transformedToLogMap[10]).toBe(10); // '@'
2831
- });
2832
- it('should handle line with no transformations', async () => {
2833
- const line = 'Just some text';
2834
- const result = calculateTransformedLine(line, 0, [0, 0], []);
2835
- expect(result.transformedLine).toBe(line);
2836
- // Each visual position should map directly to logical position + trailing
2837
- expect(result.transformedToLogMap).toHaveLength(15); // 14 chars + 1 trailing
2838
- expect(result.transformedToLogMap[0]).toBe(0);
2839
- expect(result.transformedToLogMap[13]).toBe(13);
2840
- expect(result.transformedToLogMap[14]).toBe(14); // Trailing position
2841
- });
2842
- it('should handle empty line', async () => {
2843
- const result = calculateTransformedLine('', 0, [0, 0], []);
2844
- expect(result.transformedLine).toBe('');
2845
- expect(result.transformedToLogMap).toEqual([0]); // Just the trailing position
2846
- });
2847
- });
2848
- describe('Layout Caching and Invalidation', () => {
2849
- it.each([
2850
- {
2851
- desc: 'via setText',
2852
- actFn: (result) => result.current.setText('changed line'),
2853
- expected: 'changed line',
2854
- },
2855
- {
2856
- desc: 'via replaceRange',
2857
- actFn: (result) => result.current.replaceRange(0, 0, 0, 13, 'changed line'),
2858
- expected: 'changed line',
2859
- },
2860
- ])('should invalidate cache when line content changes $desc', async ({ actFn, expected }) => {
2861
- const viewport = { width: 80, height: 24 };
2862
- const { result } = await renderHookWithProviders(() => useTextBuffer({
2863
- initialText: 'original line',
2864
- viewport,
2865
- escapePastedPaths: true,
2866
- }));
2867
- const originalLayout = result.current.visualLayout;
2868
- act(() => {
2869
- actFn(result);
2870
- });
2871
- expect(result.current.visualLayout).not.toBe(originalLayout);
2872
- expect(result.current.allVisualLines[0]).toBe(expected);
2873
- });
2874
- it('should invalidate cache when viewport width changes', async () => {
2875
- const viewport = { width: 80, height: 24 };
2876
- const { result, rerender } = await renderHookWithProviders(({ vp }) => useTextBuffer({
2877
- initialText: 'a very long line that will wrap when the viewport is small',
2878
- viewport: vp,
2879
- escapePastedPaths: true,
2880
- }), { initialProps: { vp: viewport } });
2881
- const originalLayout = result.current.visualLayout;
2882
- // Shrink viewport to force wrapping change
2883
- rerender({ vp: { width: 10, height: 24 } });
2884
- expect(result.current.visualLayout).not.toBe(originalLayout);
2885
- expect(result.current.allVisualLines.length).toBeGreaterThan(1);
2886
- });
2887
- it('should correctly handle cursor expansion/collapse in cached layout', async () => {
2888
- const viewport = { width: 80, height: 24 };
2889
- const text = 'Check @image.png here';
2890
- const { result } = await renderHookWithProviders(() => useTextBuffer({
2891
- initialText: text,
2892
- viewport,
2893
- escapePastedPaths: true,
2894
- }));
2895
- // Cursor at start (collapsed)
2896
- act(() => {
2897
- result.current.moveToOffset(0);
2898
- });
2899
- expect(result.current.allVisualLines[0]).toContain('[Image image.png]');
2900
- // Move cursor onto the @path (expanded)
2901
- act(() => {
2902
- result.current.moveToOffset(7); // onto @
2903
- });
2904
- expect(result.current.allVisualLines[0]).toContain('@image.png');
2905
- expect(result.current.allVisualLines[0]).not.toContain('[Image image.png]');
2906
- // Move cursor away (collapsed again)
2907
- act(() => {
2908
- result.current.moveToOffset(0);
2909
- });
2910
- expect(result.current.allVisualLines[0]).toContain('[Image image.png]');
2911
- });
2912
- it('should reuse cache for unchanged lines during editing', async () => {
2913
- const viewport = { width: 80, height: 24 };
2914
- const initialText = 'line 1\nline 2\nline 3';
2915
- const { result } = await renderHookWithProviders(() => useTextBuffer({
2916
- initialText,
2917
- viewport,
2918
- escapePastedPaths: true,
2919
- }));
2920
- const layout1 = result.current.visualLayout;
2921
- // Edit line 1
2922
- act(() => {
2923
- result.current.moveToOffset(0);
2924
- result.current.insert('X');
2925
- });
2926
- const layout2 = result.current.visualLayout;
2927
- expect(layout2).not.toBe(layout1);
2928
- // Verify that visual lines for line 2 and 3 (indices 1 and 2 in visualLines)
2929
- // are identical in content if not in object reference (the arrays are rebuilt, but contents are cached)
2930
- expect(result.current.allVisualLines[1]).toBe('line 2');
2931
- expect(result.current.allVisualLines[2]).toBe('line 3');
2932
- });
2933
- });
2934
- describe('Scroll Regressions', () => {
2935
- const scrollViewport = { width: 80, height: 5 };
2936
- it('should not show empty viewport when collapsing a large paste that was scrolled', async () => {
2937
- const largeContent = 'line1\nline2\nline3\nline4\nline5\nline6\nline7\nline8\nline9\nline10';
2938
- const placeholder = '[Pasted Text: 10 lines]';
2939
- const { result } = await renderHook(() => useTextBuffer({
2940
- initialText: placeholder,
2941
- viewport: scrollViewport,
2942
- }));
2943
- // Setup: paste large content
2944
- act(() => {
2945
- result.current.setText('');
2946
- result.current.insert(largeContent, { paste: true });
2947
- });
2948
- // Expand it
2949
- act(() => {
2950
- result.current.togglePasteExpansion(placeholder, 0, 0);
2951
- });
2952
- // Verify scrolled state
2953
- expect(result.current.visualScrollRow).toBe(5);
2954
- // Collapse it
2955
- act(() => {
2956
- result.current.togglePasteExpansion(placeholder, 9, 0);
2957
- });
2958
- // Verify viewport is NOT empty immediately (clamping in useMemo)
2959
- expect(result.current.allVisualLines.length).toBe(1);
2960
- expect(result.current.viewportVisualLines.length).toBe(1);
2961
- expect(result.current.viewportVisualLines[0]).toBe(placeholder);
2962
- });
2963
- });
2964
- });
2965
- //# sourceMappingURL=text-buffer.test.js.map