@quantum-ai/gemini-cli 0.45.8 → 0.45.9

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 (2271) hide show
  1. package/dist/acp/acpCommandHandler.js +105 -0
  2. package/dist/acp/acpErrors.js +37 -0
  3. package/dist/acp/acpFileSystemService.js +80 -0
  4. package/dist/acp/acpRpcDispatcher.js +174 -0
  5. package/dist/acp/acpSession.js +1167 -0
  6. package/dist/acp/acpSessionManager.js +200 -0
  7. package/dist/acp/acpStdioTransport.js +22 -0
  8. package/dist/acp/acpUtils.js +287 -0
  9. package/dist/acp/commands/about.js +52 -0
  10. package/dist/acp/commands/commandRegistry.js +25 -0
  11. package/dist/acp/commands/extensions.js +330 -0
  12. package/dist/acp/commands/help.js +34 -0
  13. package/dist/acp/commands/init.js +46 -0
  14. package/dist/acp/commands/memory.js +95 -0
  15. package/dist/acp/commands/restore.js +140 -0
  16. package/dist/acp/commands/types.js +6 -0
  17. package/dist/commands/extensions/configure.js +63 -0
  18. package/dist/commands/extensions/disable.js +68 -0
  19. package/dist/commands/extensions/enable.js +84 -0
  20. package/dist/commands/extensions/install.js +171 -0
  21. package/dist/commands/extensions/link.js +65 -0
  22. package/dist/commands/extensions/list.js +62 -0
  23. package/dist/commands/extensions/new.js +87 -0
  24. package/dist/commands/extensions/uninstall.js +88 -0
  25. package/dist/commands/extensions/update.js +113 -0
  26. package/dist/commands/extensions/utils.js +122 -0
  27. package/dist/commands/extensions/validate.js +84 -0
  28. package/dist/commands/extensions.js +43 -0
  29. package/dist/commands/gemma/constants.js +34 -0
  30. package/dist/commands/gemma/logs.js +153 -0
  31. package/dist/commands/gemma/platform.js +219 -0
  32. package/dist/commands/gemma/setup.js +391 -0
  33. package/dist/commands/gemma/start.js +86 -0
  34. package/dist/commands/gemma/status.js +109 -0
  35. package/dist/commands/gemma/stop.js +109 -0
  36. package/dist/commands/gemma.js +29 -0
  37. package/dist/commands/hooks/migrate.js +214 -0
  38. package/dist/commands/hooks.js +24 -0
  39. package/dist/commands/mcp/add.js +194 -0
  40. package/dist/commands/mcp/enableDisable.js +105 -0
  41. package/dist/commands/mcp/list.js +206 -0
  42. package/dist/commands/mcp/remove.js +48 -0
  43. package/dist/commands/mcp.js +31 -0
  44. package/dist/commands/skills/disable.js +47 -0
  45. package/dist/commands/skills/enable.js +35 -0
  46. package/dist/commands/skills/install.js +78 -0
  47. package/dist/commands/skills/link.js +66 -0
  48. package/dist/commands/skills/list.js +59 -0
  49. package/dist/commands/skills/uninstall.js +56 -0
  50. package/dist/commands/skills.js +35 -0
  51. package/dist/commands/utils.js +10 -0
  52. package/dist/config/auth.js +43 -0
  53. package/dist/config/config.js +936 -0
  54. package/dist/config/extension-manager-themes.spec.js +202 -0
  55. package/dist/config/extension-manager.js +887 -0
  56. package/dist/config/extension.js +20 -0
  57. package/dist/config/extensionRegistryClient.js +93 -0
  58. package/dist/config/extensions/consent.js +195 -0
  59. package/dist/config/extensions/extensionEnablement.js +192 -0
  60. package/dist/config/extensions/extensionSettings.js +247 -0
  61. package/dist/config/extensions/github.js +425 -0
  62. package/dist/config/extensions/github_fetch.js +47 -0
  63. package/dist/config/extensions/storage.js +31 -0
  64. package/dist/config/extensions/update.js +143 -0
  65. package/dist/config/extensions/variableSchema.js +21 -0
  66. package/dist/config/extensions/variables.js +61 -0
  67. package/dist/config/footerItems.js +133 -0
  68. package/dist/config/mcp/index.js +6 -0
  69. package/dist/config/mcp/mcpServerEnablement.js +278 -0
  70. package/dist/config/policy.js +96 -0
  71. package/dist/config/sandboxConfig.js +116 -0
  72. package/dist/config/settingPaths.js +10 -0
  73. package/dist/config/settings-validation.js +272 -0
  74. package/dist/config/settings.js +942 -0
  75. package/dist/config/settingsSchema.js +3288 -0
  76. package/dist/config/trustedFolders.js +25 -0
  77. package/dist/core/auth.js +53 -0
  78. package/dist/core/initializer.js +41 -0
  79. package/dist/core/theme.js +18 -0
  80. package/dist/deferred.js +56 -0
  81. package/dist/gemini.js +699 -0
  82. package/dist/generated/git-commit.js +9 -0
  83. package/dist/index.mjs +8 -0
  84. package/dist/interactiveCli.js +187 -0
  85. package/dist/nonInteractiveCli.js +458 -0
  86. package/dist/nonInteractiveCliAgentSession.js +527 -0
  87. package/dist/nonInteractiveCliCommands.js +82 -0
  88. package/dist/patches/http-proxy-agent.js +7 -0
  89. package/dist/patches/https-proxy-agent.js +7 -0
  90. package/dist/patches/is-in-ci.js +14 -0
  91. package/dist/services/BuiltinCommandLoader.js +207 -0
  92. package/dist/services/CommandService.js +99 -0
  93. package/dist/services/FileCommandLoader.js +298 -0
  94. package/dist/services/McpPromptLoader.js +254 -0
  95. package/dist/services/SkillCommandLoader.js +52 -0
  96. package/dist/services/SlashCommandConflictHandler.js +127 -0
  97. package/dist/services/SlashCommandResolver.js +155 -0
  98. package/dist/services/liteRtServerManager.js +42 -0
  99. package/dist/services/prompt-processors/argumentProcessor.js +20 -0
  100. package/dist/services/prompt-processors/atFileProcessor.js +62 -0
  101. package/dist/services/prompt-processors/injectionParser.js +59 -0
  102. package/dist/services/prompt-processors/shellProcessor.js +129 -0
  103. package/dist/services/prompt-processors/types.js +19 -0
  104. package/dist/test-utils/AppRig.js +582 -0
  105. package/dist/test-utils/MockShellExecutionService.js +87 -0
  106. package/dist/test-utils/async.js +34 -0
  107. package/dist/test-utils/createExtension.js +30 -0
  108. package/dist/test-utils/customMatchers.js +85 -0
  109. package/dist/test-utils/mockCommandContext.js +102 -0
  110. package/dist/test-utils/mockConfig.js +202 -0
  111. package/dist/test-utils/mockDebugLogger.js +67 -0
  112. package/dist/test-utils/mockSpinner.js +20 -0
  113. package/dist/test-utils/persistentStateFake.js +38 -0
  114. package/dist/test-utils/render.js +606 -0
  115. package/dist/test-utils/settings.js +33 -0
  116. package/dist/test-utils/svg.js +181 -0
  117. package/dist/ui/App.js +29 -0
  118. package/dist/ui/AppContainer.js +2100 -0
  119. package/dist/ui/IdeIntegrationNudge.js +52 -0
  120. package/dist/ui/auth/ApiAuthDialog.js +62 -0
  121. package/dist/ui/auth/AuthDialog.js +141 -0
  122. package/dist/ui/auth/AuthInProgress.js +23 -0
  123. package/dist/ui/auth/BannedAccountDialog.js +66 -0
  124. package/dist/ui/auth/LoginRestartDialog.js +33 -0
  125. package/dist/ui/auth/useAuth.js +132 -0
  126. package/dist/ui/colors.js +62 -0
  127. package/dist/ui/commands/aboutCommand.js +58 -0
  128. package/dist/ui/commands/agentsCommand.js +327 -0
  129. package/dist/ui/commands/authCommand.js +45 -0
  130. package/dist/ui/commands/bugCommand.js +146 -0
  131. package/dist/ui/commands/bugMemoryCommand.js +61 -0
  132. package/dist/ui/commands/chatCommand.js +361 -0
  133. package/dist/ui/commands/clearCommand.js +67 -0
  134. package/dist/ui/commands/commandsCommand.js +103 -0
  135. package/dist/ui/commands/compressCommand.js +66 -0
  136. package/dist/ui/commands/copyCommand.js +61 -0
  137. package/dist/ui/commands/corgiCommand.js +16 -0
  138. package/dist/ui/commands/directoryCommand.js +222 -0
  139. package/dist/ui/commands/docsCommand.js +31 -0
  140. package/dist/ui/commands/editorCommand.js +16 -0
  141. package/dist/ui/commands/exportSessionCommand.js +73 -0
  142. package/dist/ui/commands/extensionsCommand.js +738 -0
  143. package/dist/ui/commands/footerCommand.js +19 -0
  144. package/dist/ui/commands/gemmaStatusCommand.js +33 -0
  145. package/dist/ui/commands/helpCommand.js +40 -0
  146. package/dist/ui/commands/hooksCommand.js +336 -0
  147. package/dist/ui/commands/ideCommand.js +232 -0
  148. package/dist/ui/commands/initCommand.js +37 -0
  149. package/dist/ui/commands/mcpCommand.js +446 -0
  150. package/dist/ui/commands/memoryCommand.js +124 -0
  151. package/dist/ui/commands/modelCommand.js +58 -0
  152. package/dist/ui/commands/oncallCommand.js +90 -0
  153. package/dist/ui/commands/permissionsCommand.js +74 -0
  154. package/dist/ui/commands/planCommand.js +82 -0
  155. package/dist/ui/commands/policiesCommand.js +82 -0
  156. package/dist/ui/commands/privacyCommand.js +16 -0
  157. package/dist/ui/commands/profileCommand.js +23 -0
  158. package/dist/ui/commands/quitCommand.js +36 -0
  159. package/dist/ui/commands/restoreCommand.js +131 -0
  160. package/dist/ui/commands/resumeCommand.js +18 -0
  161. package/dist/ui/commands/rewindCommand.js +136 -0
  162. package/dist/ui/commands/settingsCommand.js +16 -0
  163. package/dist/ui/commands/setupGithubCommand.js +195 -0
  164. package/dist/ui/commands/shortcutsCommand.js +16 -0
  165. package/dist/ui/commands/skillsCommand.js +296 -0
  166. package/dist/ui/commands/statsCommand.js +117 -0
  167. package/dist/ui/commands/tasksCommand.js +16 -0
  168. package/dist/ui/commands/terminalSetupCommand.js +41 -0
  169. package/dist/ui/commands/themeCommand.js +16 -0
  170. package/dist/ui/commands/toolsCommand.js +58 -0
  171. package/dist/ui/commands/types.js +15 -0
  172. package/dist/ui/commands/upgradeCommand.js +57 -0
  173. package/dist/ui/commands/vimCommand.js +24 -0
  174. package/dist/ui/commands/voiceCommand.js +28 -0
  175. package/dist/ui/components/AboutBox.js +16 -0
  176. package/dist/ui/components/AdminSettingsChangedDialog.js +26 -0
  177. package/dist/ui/components/AgentConfigDialog.js +297 -0
  178. package/dist/ui/components/AlternateBufferQuittingDisplay.js +29 -0
  179. package/dist/ui/components/AnsiOutput.js +23 -0
  180. package/dist/ui/components/AppHeader.js +73 -0
  181. package/dist/ui/components/ApprovalModeIndicator.js +40 -0
  182. package/dist/ui/components/AsciiArt.js +53 -0
  183. package/dist/ui/components/AskUserDialog.js +738 -0
  184. package/dist/ui/components/BackgroundTaskDisplay.js +251 -0
  185. package/dist/ui/components/Banner.js +28 -0
  186. package/dist/ui/components/Checklist.js +31 -0
  187. package/dist/ui/components/ChecklistItem.js +39 -0
  188. package/dist/ui/components/CliSpinner.js +27 -0
  189. package/dist/ui/components/ColorsDisplay.js +119 -0
  190. package/dist/ui/components/Composer.js +87 -0
  191. package/dist/ui/components/ConfigExtensionDialog.js +155 -0
  192. package/dist/ui/components/ConfigInitDisplay.js +54 -0
  193. package/dist/ui/components/ConsentPrompt.js +19 -0
  194. package/dist/ui/components/ConsoleSummaryDisplay.js +11 -0
  195. package/dist/ui/components/ContextSummaryDisplay.js +70 -0
  196. package/dist/ui/components/ContextUsageDisplay.js +28 -0
  197. package/dist/ui/components/CopyModeWarning.js +9 -0
  198. package/dist/ui/components/DebugProfiler.js +189 -0
  199. package/dist/ui/components/DetailedMessagesDisplay.js +59 -0
  200. package/dist/ui/components/DialogManager.js +162 -0
  201. package/dist/ui/components/EditorSettingsDialog.js +88 -0
  202. package/dist/ui/components/EmptyWalletDialog.js +33 -0
  203. package/dist/ui/components/ExitPlanModeDialog.js +179 -0
  204. package/dist/ui/components/ExitWarning.js +9 -0
  205. package/dist/ui/components/FolderTrustDialog.js +118 -0
  206. package/dist/ui/components/Footer.js +270 -0
  207. package/dist/ui/components/FooterConfigDialog.js +213 -0
  208. package/dist/ui/components/GeminiRespondingSpinner.js +22 -0
  209. package/dist/ui/components/GeminiSpinner.js +35 -0
  210. package/dist/ui/components/Header.js +29 -0
  211. package/dist/ui/components/Help.js +17 -0
  212. package/dist/ui/components/HistoryItemDisplay.js +52 -0
  213. package/dist/ui/components/HookStatusDisplay.js +26 -0
  214. package/dist/ui/components/HooksDialog.js +83 -0
  215. package/dist/ui/components/IdeTrustChangeDialog.js +35 -0
  216. package/dist/ui/components/InboxDialog.js +756 -0
  217. package/dist/ui/components/InputPrompt.js +1324 -0
  218. package/dist/ui/components/ListeningIndicator.js +30 -0
  219. package/dist/ui/components/LoadingIndicator.js +48 -0
  220. package/dist/ui/components/LogoutConfirmationDialog.js +39 -0
  221. package/dist/ui/components/LoopDetectionConfirmation.js +39 -0
  222. package/dist/ui/components/MainContent.js +176 -0
  223. package/dist/ui/components/MemoryUsageDisplay.js +25 -0
  224. package/dist/ui/components/ModelDialog.js +268 -0
  225. package/dist/ui/components/ModelQuotaDisplay.js +104 -0
  226. package/dist/ui/components/ModelStatsDisplay.js +157 -0
  227. package/dist/ui/components/MultiFolderTrustDialog.js +95 -0
  228. package/dist/ui/components/NewAgentsNotification.js +50 -0
  229. package/dist/ui/components/Notifications.js +107 -0
  230. package/dist/ui/components/OverageMenuDialog.js +32 -0
  231. package/dist/ui/components/PermissionsModifyTrustDialog.js +61 -0
  232. package/dist/ui/components/PolicyUpdateDialog.js +61 -0
  233. package/dist/ui/components/ProQuotaDialog.js +84 -0
  234. package/dist/ui/components/ProgressBar.js +17 -0
  235. package/dist/ui/components/QueuedMessageDisplay.js +20 -0
  236. package/dist/ui/components/QuittingDisplay.js +20 -0
  237. package/dist/ui/components/QuotaDisplay.js +36 -0
  238. package/dist/ui/components/QuotaStatsInfo.js +23 -0
  239. package/dist/ui/components/RawMarkdownIndicator.js +10 -0
  240. package/dist/ui/components/RewindConfirmation.js +73 -0
  241. package/dist/ui/components/RewindViewer.js +154 -0
  242. package/dist/ui/components/SessionBrowser/SessionBrowserEmpty.js +8 -0
  243. package/dist/ui/components/SessionBrowser/SessionBrowserError.js +8 -0
  244. package/dist/ui/components/SessionBrowser/SessionBrowserLoading.js +8 -0
  245. package/dist/ui/components/SessionBrowser/SessionBrowserNav.js +17 -0
  246. package/dist/ui/components/SessionBrowser/SessionListHeader.js +8 -0
  247. package/dist/ui/components/SessionBrowser/utils.js +99 -0
  248. package/dist/ui/components/SessionBrowser.js +370 -0
  249. package/dist/ui/components/SessionSummaryDisplay.js +24 -0
  250. package/dist/ui/components/SettingsDialog.js +283 -0
  251. package/dist/ui/components/ShellInputPrompt.js +64 -0
  252. package/dist/ui/components/ShellModeIndicator.js +5 -0
  253. package/dist/ui/components/ShortcutsHelp.js +58 -0
  254. package/dist/ui/components/ShowMoreLines.js +26 -0
  255. package/dist/ui/components/StatsDisplay.js +93 -0
  256. package/dist/ui/components/StatusDisplay.js +20 -0
  257. package/dist/ui/components/StatusRow.js +181 -0
  258. package/dist/ui/components/StickyHeader.js +5 -0
  259. package/dist/ui/components/SuggestionsDisplay.js +50 -0
  260. package/dist/ui/components/Table.js +7 -0
  261. package/dist/ui/components/ThemeDialog.constants.js +26 -0
  262. package/dist/ui/components/ThemeDialog.js +165 -0
  263. package/dist/ui/components/ThemedGradient.js +16 -0
  264. package/dist/ui/components/Tips.js +8 -0
  265. package/dist/ui/components/ToastDisplay.js +50 -0
  266. package/dist/ui/components/ToolConfirmationQueue.js +63 -0
  267. package/dist/ui/components/ToolStatsDisplay.js +41 -0
  268. package/dist/ui/components/UpdateNotification.js +10 -0
  269. package/dist/ui/components/UserIdentity.js +26 -0
  270. package/dist/ui/components/ValidationDialog.js +91 -0
  271. package/dist/ui/components/VoiceModelDialog.js +123 -0
  272. package/dist/ui/components/messages/CompressionMessage.js +48 -0
  273. package/dist/ui/components/messages/DenseToolMessage.js +257 -0
  274. package/dist/ui/components/messages/DiffRenderer.js +270 -0
  275. package/dist/ui/components/messages/ErrorMessage.js +9 -0
  276. package/dist/ui/components/messages/ExportSessionMessage.js +15 -0
  277. package/dist/ui/components/messages/GeminiMessage.js +15 -0
  278. package/dist/ui/components/messages/GeminiMessageContent.js +19 -0
  279. package/dist/ui/components/messages/HintMessage.js +15 -0
  280. package/dist/ui/components/messages/InfoMessage.js +11 -0
  281. package/dist/ui/components/messages/ModelMessage.js +6 -0
  282. package/dist/ui/components/messages/ShellToolMessage.js +84 -0
  283. package/dist/ui/components/messages/SubagentGroupDisplay.js +139 -0
  284. package/dist/ui/components/messages/SubagentHistoryMessage.js +4 -0
  285. package/dist/ui/components/messages/SubagentProgressDisplay.js +80 -0
  286. package/dist/ui/components/messages/ThinkingMessage.js +38 -0
  287. package/dist/ui/components/messages/Todo.js +40 -0
  288. package/dist/ui/components/messages/ToolConfirmationMessage.js +577 -0
  289. package/dist/ui/components/messages/ToolGroupDisplay.js +78 -0
  290. package/dist/ui/components/messages/ToolGroupMessage.js +268 -0
  291. package/dist/ui/components/messages/ToolMessage.js +25 -0
  292. package/dist/ui/components/messages/ToolResultDisplay.js +146 -0
  293. package/dist/ui/components/messages/ToolShared.js +125 -0
  294. package/dist/ui/components/messages/TopicMessage.js +56 -0
  295. package/dist/ui/components/messages/UserMessage.js +34 -0
  296. package/dist/ui/components/messages/UserShellMessage.js +14 -0
  297. package/dist/ui/components/messages/WarningMessage.js +10 -0
  298. package/dist/ui/components/shared/BaseSelectionList.js +97 -0
  299. package/dist/ui/components/shared/BaseSettingsDialog.js +281 -0
  300. package/dist/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
  301. package/dist/ui/components/shared/DialogFooter.js +17 -0
  302. package/dist/ui/components/shared/EnumSelector.js +39 -0
  303. package/dist/ui/components/shared/ExpandableText.js +87 -0
  304. package/dist/ui/components/shared/HalfLinePaddedBox.js +37 -0
  305. package/dist/ui/components/shared/HorizontalLine.js +5 -0
  306. package/dist/ui/components/shared/MaxSizedBox.js +81 -0
  307. package/dist/ui/components/shared/RadioButtonSelect.js +22 -0
  308. package/dist/ui/components/shared/ScopeSelector.js +14 -0
  309. package/dist/ui/components/shared/Scrollable.js +167 -0
  310. package/dist/ui/components/shared/ScrollableList.js +167 -0
  311. package/dist/ui/components/shared/SearchableList.js +86 -0
  312. package/dist/ui/components/shared/SectionHeader.js +5 -0
  313. package/dist/ui/components/shared/SlicingMaxSizedBox.js +74 -0
  314. package/dist/ui/components/shared/TabHeader.js +42 -0
  315. package/dist/ui/components/shared/TextInput.js +51 -0
  316. package/dist/ui/components/shared/VirtualizedList.js +473 -0
  317. package/dist/ui/components/shared/text-buffer.js +2770 -0
  318. package/dist/ui/components/shared/vim-buffer-actions.js +1306 -0
  319. package/dist/ui/components/triage/TriageDuplicates.js +624 -0
  320. package/dist/ui/components/triage/TriageIssues.js +380 -0
  321. package/dist/ui/components/views/AgentsStatus.js +23 -0
  322. package/dist/ui/components/views/ChatList.js +17 -0
  323. package/dist/ui/components/views/ExtensionDetails.js +85 -0
  324. package/dist/ui/components/views/ExtensionRegistryView.js +97 -0
  325. package/dist/ui/components/views/ExtensionsList.js +46 -0
  326. package/dist/ui/components/views/GemmaStatus.js +11 -0
  327. package/dist/ui/components/views/McpStatus.js +109 -0
  328. package/dist/ui/components/views/SkillsList.js +17 -0
  329. package/dist/ui/components/views/ToolsList.js +6 -0
  330. package/dist/ui/constants/tips.js +163 -0
  331. package/dist/ui/constants/wittyPhrases.js +137 -0
  332. package/dist/ui/constants.js +60 -0
  333. package/dist/ui/contexts/AppContext.js +14 -0
  334. package/dist/ui/contexts/AskUserActionsContext.js +24 -0
  335. package/dist/ui/contexts/ConfigContext.js +14 -0
  336. package/dist/ui/contexts/InputContext.js +14 -0
  337. package/dist/ui/contexts/KeypressContext.js +780 -0
  338. package/dist/ui/contexts/MouseContext.js +130 -0
  339. package/dist/ui/contexts/OverflowContext.js +66 -0
  340. package/dist/ui/contexts/QuotaContext.js +14 -0
  341. package/dist/ui/contexts/ScrollProvider.js +312 -0
  342. package/dist/ui/contexts/SessionContext.js +167 -0
  343. package/dist/ui/contexts/SettingsContext.js +47 -0
  344. package/dist/ui/contexts/ShellFocusContext.js +8 -0
  345. package/dist/ui/contexts/StreamingContext.js +14 -0
  346. package/dist/ui/contexts/TerminalContext.js +70 -0
  347. package/dist/ui/contexts/ToolActionsContext.js +96 -0
  348. package/dist/ui/contexts/UIActionsContext.js +14 -0
  349. package/dist/ui/contexts/UIStateContext.js +14 -0
  350. package/dist/ui/contexts/VimModeContext.js +38 -0
  351. package/dist/ui/debug.js +10 -0
  352. package/dist/ui/editors/editorSettingsManager.js +37 -0
  353. package/dist/ui/hooks/atCommandProcessor.js +557 -0
  354. package/dist/ui/hooks/creditsFlowHandler.js +157 -0
  355. package/dist/ui/hooks/shell-completions/gitProvider.js +72 -0
  356. package/dist/ui/hooks/shell-completions/index.js +15 -0
  357. package/dist/ui/hooks/shell-completions/npmProvider.js +66 -0
  358. package/dist/ui/hooks/shell-completions/types.js +6 -0
  359. package/dist/ui/hooks/shellReducer.js +124 -0
  360. package/dist/ui/hooks/slashCommandProcessor.js +556 -0
  361. package/dist/ui/hooks/toolMapping.js +103 -0
  362. package/dist/ui/hooks/useAgentStream.js +407 -0
  363. package/dist/ui/hooks/useAlternateBuffer.js +17 -0
  364. package/dist/ui/hooks/useAnimatedScrollbar.js +100 -0
  365. package/dist/ui/hooks/useApprovalModeIndicator.js +83 -0
  366. package/dist/ui/hooks/useAtCompletion.js +347 -0
  367. package/dist/ui/hooks/useBackgroundTaskManager.js +56 -0
  368. package/dist/ui/hooks/useBanner.js +55 -0
  369. package/dist/ui/hooks/useBatchedScroll.js +26 -0
  370. package/dist/ui/hooks/useCommandCompletion.js +343 -0
  371. package/dist/ui/hooks/useCompletion.js +83 -0
  372. package/dist/ui/hooks/useComposerStatus.js +79 -0
  373. package/dist/ui/hooks/useConfirmingTool.js +18 -0
  374. package/dist/ui/hooks/useConsoleMessages.js +139 -0
  375. package/dist/ui/hooks/useEditorSettings.js +45 -0
  376. package/dist/ui/hooks/useExecutionLifecycle.js +529 -0
  377. package/dist/ui/hooks/useExtensionRegistry.js +69 -0
  378. package/dist/ui/hooks/useExtensionUpdates.js +172 -0
  379. package/dist/ui/hooks/useFlickerDetector.js +37 -0
  380. package/dist/ui/hooks/useFocus.js +57 -0
  381. package/dist/ui/hooks/useFolderTrust.js +104 -0
  382. package/dist/ui/hooks/useGeminiStream.js +1422 -0
  383. package/dist/ui/hooks/useGitBranchName.js +77 -0
  384. package/dist/ui/hooks/useHistoryManager.js +113 -0
  385. package/dist/ui/hooks/useHookDisplayState.js +82 -0
  386. package/dist/ui/hooks/useIdeTrustListener.js +66 -0
  387. package/dist/ui/hooks/useInactivityTimer.js +29 -0
  388. package/dist/ui/hooks/useIncludeDirsTrust.js +109 -0
  389. package/dist/ui/hooks/useInlineEditBuffer.js +112 -0
  390. package/dist/ui/hooks/useInputHistory.js +90 -0
  391. package/dist/ui/hooks/useInputHistoryStore.js +81 -0
  392. package/dist/ui/hooks/useKeyMatchers.js +12 -0
  393. package/dist/ui/hooks/useKeypress.js +27 -0
  394. package/dist/ui/hooks/useKittyKeyboardProtocol.js +18 -0
  395. package/dist/ui/hooks/useLoadingIndicator.js +54 -0
  396. package/dist/ui/hooks/useLogger.js +26 -0
  397. package/dist/ui/hooks/useMcpStatus.js +33 -0
  398. package/dist/ui/hooks/useMemoryMonitor.js +27 -0
  399. package/dist/ui/hooks/useMessageQueue.js +69 -0
  400. package/dist/ui/hooks/useModelCommand.js +20 -0
  401. package/dist/ui/hooks/useMouse.js +26 -0
  402. package/dist/ui/hooks/useMouseClick.js +35 -0
  403. package/dist/ui/hooks/usePermissionsModifyTrust.js +113 -0
  404. package/dist/ui/hooks/usePhraseCycler.js +141 -0
  405. package/dist/ui/hooks/usePrivacySettings.js +109 -0
  406. package/dist/ui/hooks/usePromptCompletion.js +168 -0
  407. package/dist/ui/hooks/useQuotaAndFallback.js +220 -0
  408. package/dist/ui/hooks/useRegistrySearch.js +34 -0
  409. package/dist/ui/hooks/useRepeatedKeyPress.js +49 -0
  410. package/dist/ui/hooks/useReverseSearchCompletion.js +101 -0
  411. package/dist/ui/hooks/useRewind.js +30 -0
  412. package/dist/ui/hooks/useRunEventNotifications.js +94 -0
  413. package/dist/ui/hooks/useSearchBuffer.js +23 -0
  414. package/dist/ui/hooks/useSelectionList.js +317 -0
  415. package/dist/ui/hooks/useSessionBrowser.js +74 -0
  416. package/dist/ui/hooks/useSessionResume.js +74 -0
  417. package/dist/ui/hooks/useSettingsCommand.js +20 -0
  418. package/dist/ui/hooks/useSettingsNavigation.js +71 -0
  419. package/dist/ui/hooks/useShellCompletion.js +501 -0
  420. package/dist/ui/hooks/useShellHistory.js +113 -0
  421. package/dist/ui/hooks/useShellInactivityStatus.js +44 -0
  422. package/dist/ui/hooks/useSlashCompletion.js +434 -0
  423. package/dist/ui/hooks/useSnowfall.js +125 -0
  424. package/dist/ui/hooks/useStateAndRef.js +26 -0
  425. package/dist/ui/hooks/useSuspend.js +101 -0
  426. package/dist/ui/hooks/useTabbedNavigation.js +159 -0
  427. package/dist/ui/hooks/useTerminalSize.js +25 -0
  428. package/dist/ui/hooks/useTerminalTheme.js +78 -0
  429. package/dist/ui/hooks/useThemeCommand.js +79 -0
  430. package/dist/ui/hooks/useTimedMessage.js +31 -0
  431. package/dist/ui/hooks/useTimer.js +57 -0
  432. package/dist/ui/hooks/useTips.js +17 -0
  433. package/dist/ui/hooks/useToolScheduler.js +212 -0
  434. package/dist/ui/hooks/useTurnActivityMonitor.js +47 -0
  435. package/dist/ui/hooks/useVisibilityToggle.js +59 -0
  436. package/dist/ui/hooks/useVoiceMode.js +338 -0
  437. package/dist/ui/hooks/useVoiceModelCommand.js +20 -0
  438. package/dist/ui/hooks/vim.js +1311 -0
  439. package/dist/ui/key/keyBindings.js +703 -0
  440. package/dist/ui/key/keyMatchers.js +42 -0
  441. package/dist/ui/key/keyToAnsi.js +44 -0
  442. package/dist/ui/key/keybindingUtils.js +85 -0
  443. package/dist/ui/layouts/DefaultAppLayout.js +29 -0
  444. package/dist/ui/layouts/ScreenReaderAppLayout.js +17 -0
  445. package/dist/ui/noninteractive/nonInteractiveUi.js +46 -0
  446. package/dist/ui/privacy/CloudFreePrivacyNotice.js +44 -0
  447. package/dist/ui/privacy/CloudPaidPrivacyNotice.js +20 -0
  448. package/dist/ui/privacy/GeminiPrivacyNotice.js +20 -0
  449. package/dist/ui/privacy/PrivacyNotice.js +25 -0
  450. package/dist/ui/semantic-colors.js +23 -0
  451. package/dist/ui/state/extensions.js +96 -0
  452. package/dist/ui/textConstants.js +14 -0
  453. package/dist/ui/themes/builtin/dark/ansi-dark.js +153 -0
  454. package/dist/ui/themes/builtin/dark/atom-one-dark.js +139 -0
  455. package/dist/ui/themes/builtin/dark/ayu-dark.js +105 -0
  456. package/dist/ui/themes/builtin/dark/default-dark.js +142 -0
  457. package/dist/ui/themes/builtin/dark/dracula-dark.js +116 -0
  458. package/dist/ui/themes/builtin/dark/github-dark-colorblind.js +139 -0
  459. package/dist/ui/themes/builtin/dark/github-dark.js +139 -0
  460. package/dist/ui/themes/builtin/dark/holiday-dark.js +162 -0
  461. package/dist/ui/themes/builtin/dark/shades-of-purple-dark.js +305 -0
  462. package/dist/ui/themes/builtin/dark/solarized-dark.js +196 -0
  463. package/dist/ui/themes/builtin/dark/tokyonight-dark.js +146 -0
  464. package/dist/ui/themes/builtin/light/ansi-light.js +142 -0
  465. package/dist/ui/themes/builtin/light/ayu-light.js +131 -0
  466. package/dist/ui/themes/builtin/light/default-light.js +99 -0
  467. package/dist/ui/themes/builtin/light/github-light-colorblind.js +139 -0
  468. package/dist/ui/themes/builtin/light/github-light.js +142 -0
  469. package/dist/ui/themes/builtin/light/googlecode-light.js +138 -0
  470. package/dist/ui/themes/builtin/light/solarized-light.js +196 -0
  471. package/dist/ui/themes/builtin/light/xcode-light.js +147 -0
  472. package/dist/ui/themes/builtin/no-color.js +124 -0
  473. package/dist/ui/themes/color-utils.js +105 -0
  474. package/dist/ui/themes/semantic-tokens.js +76 -0
  475. package/dist/ui/themes/theme-manager.js +513 -0
  476. package/dist/ui/themes/theme.js +563 -0
  477. package/dist/ui/types.js +100 -0
  478. package/dist/ui/utils/CodeColorizer.js +130 -0
  479. package/dist/ui/utils/ConsolePatcher.js +56 -0
  480. package/dist/ui/utils/InlineMarkdownRenderer.js +17 -0
  481. package/dist/ui/utils/MarkdownDisplay.js +243 -0
  482. package/dist/ui/utils/TableRenderer.js +161 -0
  483. package/dist/ui/utils/antigravityUtils.js +40 -0
  484. package/dist/ui/utils/borderStyles.js +82 -0
  485. package/dist/ui/utils/clipboardUtils.js +484 -0
  486. package/dist/ui/utils/commandUtils.js +259 -0
  487. package/dist/ui/utils/computeStats.js +61 -0
  488. package/dist/ui/utils/confirmingTool.js +25 -0
  489. package/dist/ui/utils/contextUsage.js +19 -0
  490. package/dist/ui/utils/directoryUtils.js +124 -0
  491. package/dist/ui/utils/displayUtils.js +42 -0
  492. package/dist/ui/utils/editorUtils.js +150 -0
  493. package/dist/ui/utils/fileUtils.js +16 -0
  494. package/dist/ui/utils/formatters.js +126 -0
  495. package/dist/ui/utils/highlight.js +116 -0
  496. package/dist/ui/utils/historyExportUtils.js +58 -0
  497. package/dist/ui/utils/historyUtils.js +69 -0
  498. package/dist/ui/utils/inlineThinkingMode.js +8 -0
  499. package/dist/ui/utils/input.js +50 -0
  500. package/dist/ui/utils/isNarrowWidth.js +8 -0
  501. package/dist/ui/utils/latexToUnicode.js +537 -0
  502. package/dist/ui/utils/markdownParsingUtils.js +184 -0
  503. package/dist/ui/utils/markdownUtilities.js +109 -0
  504. package/dist/ui/utils/memorySnapshot.js +27 -0
  505. package/dist/ui/utils/mouse.js +182 -0
  506. package/dist/ui/utils/pendingAttentionNotification.js +97 -0
  507. package/dist/ui/utils/rewindFileOps.js +190 -0
  508. package/dist/ui/utils/shortcutsHelp.js +11 -0
  509. package/dist/ui/utils/terminalCapabilityManager.js +259 -0
  510. package/dist/ui/utils/terminalSetup.js +418 -0
  511. package/dist/ui/utils/terminalUtils.js +37 -0
  512. package/dist/ui/utils/textOutput.js +52 -0
  513. package/dist/ui/utils/textUtils.js +235 -0
  514. package/dist/ui/utils/toolLayoutUtils.js +79 -0
  515. package/dist/ui/utils/ui-sizing.js +12 -0
  516. package/dist/ui/utils/updateCheck.js +95 -0
  517. package/dist/ui/utils/urlSecurityUtils.js +70 -0
  518. package/dist/utils/activityLogger.js +795 -0
  519. package/dist/utils/agentSettings.js +44 -0
  520. package/dist/utils/agentUtils.js +49 -0
  521. package/dist/utils/autoMemory.js +14 -0
  522. package/dist/utils/cleanup.js +170 -0
  523. package/dist/utils/commands.js +66 -0
  524. package/dist/utils/commentJson.js +136 -0
  525. package/dist/utils/deepMerge.js +64 -0
  526. package/dist/utils/devtoolsService.js +185 -0
  527. package/dist/utils/dialogScopeUtils.js +49 -0
  528. package/dist/utils/envVarResolver.js +120 -0
  529. package/dist/utils/errors.js +179 -0
  530. package/dist/utils/events.js +22 -0
  531. package/dist/utils/featureToggleUtils.js +94 -0
  532. package/dist/utils/gitUtils.js +109 -0
  533. package/dist/utils/handleAutoUpdate.js +178 -0
  534. package/dist/utils/hookSettings.js +113 -0
  535. package/dist/utils/hookUtils.js +50 -0
  536. package/dist/utils/installationInfo.js +186 -0
  537. package/dist/utils/jsonoutput.js +41 -0
  538. package/dist/utils/logCleanup.js +57 -0
  539. package/dist/utils/math.js +13 -0
  540. package/dist/utils/persistentState.js +65 -0
  541. package/dist/utils/processUtils.js +98 -0
  542. package/dist/utils/readStdin.js +86 -0
  543. package/dist/utils/relaunch.js +60 -0
  544. package/dist/utils/resize-observer-polyfill.js +6 -0
  545. package/dist/utils/resolvePath.js +20 -0
  546. package/dist/utils/sandbox.js +926 -0
  547. package/dist/utils/sandboxUtils.js +125 -0
  548. package/dist/utils/sessionCleanup.js +480 -0
  549. package/dist/utils/sessionUtils.js +464 -0
  550. package/dist/utils/sessions.js +66 -0
  551. package/dist/utils/settingsUtils.js +283 -0
  552. package/dist/utils/skillSettings.js +51 -0
  553. package/dist/utils/skillUtils.js +231 -0
  554. package/dist/utils/spawnWrapper.js +7 -0
  555. package/dist/utils/startupWarnings.js +39 -0
  556. package/dist/utils/terminalNotifications.js +130 -0
  557. package/dist/utils/terminalTheme.js +49 -0
  558. package/dist/utils/tierUtils.js +14 -0
  559. package/dist/utils/updateEventEmitter.js +11 -0
  560. package/dist/utils/userStartupWarnings.js +102 -0
  561. package/dist/utils/windowTitle.js +83 -0
  562. package/dist/utils/worktreeSetup.js +31 -0
  563. package/dist/validateNonInterActiveAuth.js +44 -0
  564. package/package.json +77 -36
  565. package/LICENSE +0 -202
  566. package/dist/index.d.ts +0 -7
  567. package/dist/index.js +0 -203
  568. package/dist/index.js.map +0 -1
  569. package/dist/package.json +0 -106
  570. package/dist/src/acp/acpCommandHandler.d.ts +0 -26
  571. package/dist/src/acp/acpCommandHandler.js +0 -106
  572. package/dist/src/acp/acpCommandHandler.js.map +0 -1
  573. package/dist/src/acp/acpErrors.d.ts +0 -11
  574. package/dist/src/acp/acpErrors.js +0 -38
  575. package/dist/src/acp/acpErrors.js.map +0 -1
  576. package/dist/src/acp/acpFileSystemService.d.ts +0 -23
  577. package/dist/src/acp/acpFileSystemService.js +0 -81
  578. package/dist/src/acp/acpFileSystemService.js.map +0 -1
  579. package/dist/src/acp/acpRpcDispatcher.d.ts +0 -28
  580. package/dist/src/acp/acpRpcDispatcher.js +0 -175
  581. package/dist/src/acp/acpRpcDispatcher.js.map +0 -1
  582. package/dist/src/acp/acpSession.d.ts +0 -36
  583. package/dist/src/acp/acpSession.js +0 -1168
  584. package/dist/src/acp/acpSession.js.map +0 -1
  585. package/dist/src/acp/acpSessionManager.d.ts +0 -30
  586. package/dist/src/acp/acpSessionManager.js +0 -201
  587. package/dist/src/acp/acpSessionManager.js.map +0 -1
  588. package/dist/src/acp/acpStdioTransport.d.ts +0 -9
  589. package/dist/src/acp/acpStdioTransport.js +0 -23
  590. package/dist/src/acp/acpStdioTransport.js.map +0 -1
  591. package/dist/src/acp/acpUtils.d.ts +0 -56
  592. package/dist/src/acp/acpUtils.js +0 -288
  593. package/dist/src/acp/acpUtils.js.map +0 -1
  594. package/dist/src/acp/commands/about.d.ts +0 -11
  595. package/dist/src/acp/commands/about.js +0 -53
  596. package/dist/src/acp/commands/about.js.map +0 -1
  597. package/dist/src/acp/commands/commandRegistry.d.ts +0 -12
  598. package/dist/src/acp/commands/commandRegistry.js +0 -26
  599. package/dist/src/acp/commands/commandRegistry.js.map +0 -1
  600. package/dist/src/acp/commands/extensions.d.ts +0 -57
  601. package/dist/src/acp/commands/extensions.js +0 -331
  602. package/dist/src/acp/commands/extensions.js.map +0 -1
  603. package/dist/src/acp/commands/help.d.ts +0 -14
  604. package/dist/src/acp/commands/help.js +0 -35
  605. package/dist/src/acp/commands/help.js.map +0 -1
  606. package/dist/src/acp/commands/init.d.ts +0 -12
  607. package/dist/src/acp/commands/init.js +0 -47
  608. package/dist/src/acp/commands/init.js.map +0 -1
  609. package/dist/src/acp/commands/memory.d.ts +0 -34
  610. package/dist/src/acp/commands/memory.js +0 -96
  611. package/dist/src/acp/commands/memory.js.map +0 -1
  612. package/dist/src/acp/commands/restore.d.ts +0 -18
  613. package/dist/src/acp/commands/restore.js +0 -141
  614. package/dist/src/acp/commands/restore.js.map +0 -1
  615. package/dist/src/acp/commands/types.d.ts +0 -31
  616. package/dist/src/acp/commands/types.js +0 -7
  617. package/dist/src/acp/commands/types.js.map +0 -1
  618. package/dist/src/commands/extensions/configure.d.ts +0 -13
  619. package/dist/src/commands/extensions/configure.js +0 -64
  620. package/dist/src/commands/extensions/configure.js.map +0 -1
  621. package/dist/src/commands/extensions/disable.d.ts +0 -13
  622. package/dist/src/commands/extensions/disable.js +0 -70
  623. package/dist/src/commands/extensions/disable.js.map +0 -1
  624. package/dist/src/commands/extensions/enable.d.ts +0 -13
  625. package/dist/src/commands/extensions/enable.js +0 -86
  626. package/dist/src/commands/extensions/enable.js.map +0 -1
  627. package/dist/src/commands/extensions/install.d.ts +0 -17
  628. package/dist/src/commands/extensions/install.js +0 -172
  629. package/dist/src/commands/extensions/install.js.map +0 -1
  630. package/dist/src/commands/extensions/link.d.ts +0 -13
  631. package/dist/src/commands/extensions/link.js +0 -66
  632. package/dist/src/commands/extensions/link.js.map +0 -1
  633. package/dist/src/commands/extensions/list.d.ts +0 -10
  634. package/dist/src/commands/extensions/list.js +0 -63
  635. package/dist/src/commands/extensions/list.js.map +0 -1
  636. package/dist/src/commands/extensions/new.d.ts +0 -7
  637. package/dist/src/commands/extensions/new.js +0 -88
  638. package/dist/src/commands/extensions/new.js.map +0 -1
  639. package/dist/src/commands/extensions/uninstall.d.ts +0 -13
  640. package/dist/src/commands/extensions/uninstall.js +0 -89
  641. package/dist/src/commands/extensions/uninstall.js.map +0 -1
  642. package/dist/src/commands/extensions/update.d.ts +0 -13
  643. package/dist/src/commands/extensions/update.js +0 -114
  644. package/dist/src/commands/extensions/update.js.map +0 -1
  645. package/dist/src/commands/extensions/utils.d.ts +0 -26
  646. package/dist/src/commands/extensions/utils.js +0 -123
  647. package/dist/src/commands/extensions/utils.js.map +0 -1
  648. package/dist/src/commands/extensions/validate.d.ts +0 -12
  649. package/dist/src/commands/extensions/validate.js +0 -85
  650. package/dist/src/commands/extensions/validate.js.map +0 -1
  651. package/dist/src/commands/extensions.d.ts +0 -7
  652. package/dist/src/commands/extensions.js +0 -44
  653. package/dist/src/commands/extensions.js.map +0 -1
  654. package/dist/src/commands/gemma/constants.d.ts +0 -17
  655. package/dist/src/commands/gemma/constants.js +0 -35
  656. package/dist/src/commands/gemma/constants.js.map +0 -1
  657. package/dist/src/commands/gemma/logs.d.ts +0 -13
  658. package/dist/src/commands/gemma/logs.js +0 -154
  659. package/dist/src/commands/gemma/logs.js.map +0 -1
  660. package/dist/src/commands/gemma/platform.d.ts +0 -38
  661. package/dist/src/commands/gemma/platform.js +0 -220
  662. package/dist/src/commands/gemma/platform.js.map +0 -1
  663. package/dist/src/commands/gemma/setup.d.ts +0 -9
  664. package/dist/src/commands/gemma/setup.js +0 -392
  665. package/dist/src/commands/gemma/setup.js.map +0 -1
  666. package/dist/src/commands/gemma/start.d.ts +0 -8
  667. package/dist/src/commands/gemma/start.js +0 -87
  668. package/dist/src/commands/gemma/start.js.map +0 -1
  669. package/dist/src/commands/gemma/status.d.ts +0 -19
  670. package/dist/src/commands/gemma/status.js +0 -110
  671. package/dist/src/commands/gemma/status.js.map +0 -1
  672. package/dist/src/commands/gemma/stop.d.ts +0 -9
  673. package/dist/src/commands/gemma/stop.js +0 -110
  674. package/dist/src/commands/gemma/stop.js.map +0 -1
  675. package/dist/src/commands/gemma.d.ts +0 -7
  676. package/dist/src/commands/gemma.js +0 -30
  677. package/dist/src/commands/gemma.js.map +0 -1
  678. package/dist/src/commands/hooks/migrate.d.ts +0 -11
  679. package/dist/src/commands/hooks/migrate.js +0 -215
  680. package/dist/src/commands/hooks/migrate.js.map +0 -1
  681. package/dist/src/commands/hooks.d.ts +0 -7
  682. package/dist/src/commands/hooks.js +0 -25
  683. package/dist/src/commands/hooks.js.map +0 -1
  684. package/dist/src/commands/mcp/add.d.ts +0 -7
  685. package/dist/src/commands/mcp/add.js +0 -195
  686. package/dist/src/commands/mcp/add.js.map +0 -1
  687. package/dist/src/commands/mcp/enableDisable.d.ts +0 -13
  688. package/dist/src/commands/mcp/enableDisable.js +0 -106
  689. package/dist/src/commands/mcp/enableDisable.js.map +0 -1
  690. package/dist/src/commands/mcp/list.d.ts +0 -18
  691. package/dist/src/commands/mcp/list.js +0 -207
  692. package/dist/src/commands/mcp/list.js.map +0 -1
  693. package/dist/src/commands/mcp/remove.d.ts +0 -7
  694. package/dist/src/commands/mcp/remove.js +0 -49
  695. package/dist/src/commands/mcp/remove.js.map +0 -1
  696. package/dist/src/commands/mcp.d.ts +0 -7
  697. package/dist/src/commands/mcp.js +0 -32
  698. package/dist/src/commands/mcp.js.map +0 -1
  699. package/dist/src/commands/skills/disable.d.ts +0 -14
  700. package/dist/src/commands/skills/disable.js +0 -48
  701. package/dist/src/commands/skills/disable.js.map +0 -1
  702. package/dist/src/commands/skills/enable.d.ts +0 -12
  703. package/dist/src/commands/skills/enable.js +0 -36
  704. package/dist/src/commands/skills/enable.js.map +0 -1
  705. package/dist/src/commands/skills/install.d.ts +0 -15
  706. package/dist/src/commands/skills/install.js +0 -79
  707. package/dist/src/commands/skills/install.js.map +0 -1
  708. package/dist/src/commands/skills/link.d.ts +0 -14
  709. package/dist/src/commands/skills/link.js +0 -67
  710. package/dist/src/commands/skills/link.js.map +0 -1
  711. package/dist/src/commands/skills/list.d.ts +0 -10
  712. package/dist/src/commands/skills/list.js +0 -60
  713. package/dist/src/commands/skills/list.js.map +0 -1
  714. package/dist/src/commands/skills/uninstall.d.ts +0 -13
  715. package/dist/src/commands/skills/uninstall.js +0 -57
  716. package/dist/src/commands/skills/uninstall.js.map +0 -1
  717. package/dist/src/commands/skills.d.ts +0 -7
  718. package/dist/src/commands/skills.js +0 -36
  719. package/dist/src/commands/skills.js.map +0 -1
  720. package/dist/src/commands/utils.d.ts +0 -6
  721. package/dist/src/commands/utils.js +0 -11
  722. package/dist/src/commands/utils.js.map +0 -1
  723. package/dist/src/config/auth.d.ts +0 -6
  724. package/dist/src/config/auth.js +0 -44
  725. package/dist/src/config/auth.js.map +0 -1
  726. package/dist/src/config/config.d.ts +0 -69
  727. package/dist/src/config/config.js +0 -928
  728. package/dist/src/config/config.js.map +0 -1
  729. package/dist/src/config/extension-manager-themes.spec.js +0 -203
  730. package/dist/src/config/extension-manager-themes.spec.js.map +0 -1
  731. package/dist/src/config/extension-manager.d.ts +0 -87
  732. package/dist/src/config/extension-manager.js +0 -888
  733. package/dist/src/config/extension-manager.js.map +0 -1
  734. package/dist/src/config/extension.d.ts +0 -46
  735. package/dist/src/config/extension.js +0 -21
  736. package/dist/src/config/extension.js.map +0 -1
  737. package/dist/src/config/extensionRegistryClient.d.ts +0 -41
  738. package/dist/src/config/extensionRegistryClient.js +0 -95
  739. package/dist/src/config/extensionRegistryClient.js.map +0 -1
  740. package/dist/src/config/extensions/consent.d.ts +0 -54
  741. package/dist/src/config/extensions/consent.js +0 -196
  742. package/dist/src/config/extensions/consent.js.map +0 -1
  743. package/dist/src/config/extensions/extensionEnablement.d.ts +0 -47
  744. package/dist/src/config/extensions/extensionEnablement.js +0 -193
  745. package/dist/src/config/extensions/extensionEnablement.js.map +0 -1
  746. package/dist/src/config/extensions/extensionSettings.d.ts +0 -23
  747. package/dist/src/config/extensions/extensionSettings.js +0 -248
  748. package/dist/src/config/extensions/extensionSettings.js.map +0 -1
  749. package/dist/src/config/extensions/github.d.ts +0 -50
  750. package/dist/src/config/extensions/github.js +0 -426
  751. package/dist/src/config/extensions/github.js.map +0 -1
  752. package/dist/src/config/extensions/github_fetch.d.ts +0 -7
  753. package/dist/src/config/extensions/github_fetch.js +0 -48
  754. package/dist/src/config/extensions/github_fetch.js.map +0 -1
  755. package/dist/src/config/extensions/storage.d.ts +0 -14
  756. package/dist/src/config/extensions/storage.js +0 -32
  757. package/dist/src/config/extensions/storage.js.map +0 -1
  758. package/dist/src/config/extensions/update.d.ts +0 -20
  759. package/dist/src/config/extensions/update.js +0 -144
  760. package/dist/src/config/extensions/update.js.map +0 -1
  761. package/dist/src/config/extensions/variableSchema.d.ts +0 -32
  762. package/dist/src/config/extensions/variableSchema.js +0 -22
  763. package/dist/src/config/extensions/variableSchema.js.map +0 -1
  764. package/dist/src/config/extensions/variables.d.ts +0 -21
  765. package/dist/src/config/extensions/variables.js +0 -62
  766. package/dist/src/config/extensions/variables.js.map +0 -1
  767. package/dist/src/config/footerItems.d.ts +0 -66
  768. package/dist/src/config/footerItems.js +0 -134
  769. package/dist/src/config/footerItems.js.map +0 -1
  770. package/dist/src/config/mcp/index.d.ts +0 -6
  771. package/dist/src/config/mcp/index.js +0 -7
  772. package/dist/src/config/mcp/index.js.map +0 -1
  773. package/dist/src/config/mcp/mcpServerEnablement.d.ts +0 -150
  774. package/dist/src/config/mcp/mcpServerEnablement.js +0 -280
  775. package/dist/src/config/mcp/mcpServerEnablement.js.map +0 -1
  776. package/dist/src/config/policy.d.ts +0 -41
  777. package/dist/src/config/policy.js +0 -98
  778. package/dist/src/config/policy.js.map +0 -1
  779. package/dist/src/config/sandboxConfig.d.ts +0 -12
  780. package/dist/src/config/sandboxConfig.js +0 -117
  781. package/dist/src/config/sandboxConfig.js.map +0 -1
  782. package/dist/src/config/settingPaths.d.ts +0 -10
  783. package/dist/src/config/settingPaths.js +0 -11
  784. package/dist/src/config/settingPaths.js.map +0 -1
  785. package/dist/src/config/settings-validation.d.ts +0 -23
  786. package/dist/src/config/settings-validation.js +0 -273
  787. package/dist/src/config/settings-validation.js.map +0 -1
  788. package/dist/src/config/settings.d.ts +0 -155
  789. package/dist/src/config/settings.js +0 -943
  790. package/dist/src/config/settings.js.map +0 -1
  791. package/dist/src/config/settingsSchema.d.ts +0 -2891
  792. package/dist/src/config/settingsSchema.js +0 -3289
  793. package/dist/src/config/settingsSchema.js.map +0 -1
  794. package/dist/src/config/trustedFolders.d.ts +0 -19
  795. package/dist/src/config/trustedFolders.js +0 -26
  796. package/dist/src/config/trustedFolders.js.map +0 -1
  797. package/dist/src/core/auth.d.ts +0 -18
  798. package/dist/src/core/auth.js +0 -54
  799. package/dist/src/core/auth.js.map +0 -1
  800. package/dist/src/core/initializer.d.ts +0 -23
  801. package/dist/src/core/initializer.js +0 -43
  802. package/dist/src/core/initializer.js.map +0 -1
  803. package/dist/src/core/theme.d.ts +0 -12
  804. package/dist/src/core/theme.js +0 -20
  805. package/dist/src/core/theme.js.map +0 -1
  806. package/dist/src/deferred.d.ts +0 -19
  807. package/dist/src/deferred.js +0 -57
  808. package/dist/src/deferred.js.map +0 -1
  809. package/dist/src/gemini.d.ts +0 -18
  810. package/dist/src/gemini.js +0 -695
  811. package/dist/src/gemini.js.map +0 -1
  812. package/dist/src/generated/git-commit.d.ts +0 -7
  813. package/dist/src/generated/git-commit.js +0 -10
  814. package/dist/src/generated/git-commit.js.map +0 -1
  815. package/dist/src/index.d.ts +0 -9
  816. package/dist/src/index.js +0 -13
  817. package/dist/src/index.js.map +0 -1
  818. package/dist/src/interactiveCli.d.ts +0 -9
  819. package/dist/src/interactiveCli.js +0 -189
  820. package/dist/src/interactiveCli.js.map +0 -1
  821. package/dist/src/nonInteractiveCli.d.ts +0 -23
  822. package/dist/src/nonInteractiveCli.js +0 -459
  823. package/dist/src/nonInteractiveCli.js.map +0 -1
  824. package/dist/src/nonInteractiveCliAgentSession.d.ts +0 -23
  825. package/dist/src/nonInteractiveCliAgentSession.js +0 -528
  826. package/dist/src/nonInteractiveCliAgentSession.js.map +0 -1
  827. package/dist/src/nonInteractiveCliCommands.d.ts +0 -17
  828. package/dist/src/nonInteractiveCliCommands.js +0 -83
  829. package/dist/src/nonInteractiveCliCommands.js.map +0 -1
  830. package/dist/src/patches/http-proxy-agent.d.ts +0 -6
  831. package/dist/src/patches/http-proxy-agent.js +0 -8
  832. package/dist/src/patches/http-proxy-agent.js.map +0 -1
  833. package/dist/src/patches/https-proxy-agent.d.ts +0 -6
  834. package/dist/src/patches/https-proxy-agent.js +0 -8
  835. package/dist/src/patches/https-proxy-agent.js.map +0 -1
  836. package/dist/src/patches/is-in-ci.d.ts +0 -7
  837. package/dist/src/patches/is-in-ci.js +0 -15
  838. package/dist/src/patches/is-in-ci.js.map +0 -1
  839. package/dist/src/services/BuiltinCommandLoader.d.ts +0 -24
  840. package/dist/src/services/BuiltinCommandLoader.js +0 -208
  841. package/dist/src/services/BuiltinCommandLoader.js.map +0 -1
  842. package/dist/src/services/CommandService.d.ts +0 -62
  843. package/dist/src/services/CommandService.js +0 -100
  844. package/dist/src/services/CommandService.js.map +0 -1
  845. package/dist/src/services/FileCommandLoader.d.ts +0 -73
  846. package/dist/src/services/FileCommandLoader.js +0 -299
  847. package/dist/src/services/FileCommandLoader.js.map +0 -1
  848. package/dist/src/services/McpPromptLoader.d.ts +0 -35
  849. package/dist/src/services/McpPromptLoader.js +0 -255
  850. package/dist/src/services/McpPromptLoader.js.map +0 -1
  851. package/dist/src/services/SkillCommandLoader.d.ts +0 -23
  852. package/dist/src/services/SkillCommandLoader.js +0 -54
  853. package/dist/src/services/SkillCommandLoader.js.map +0 -1
  854. package/dist/src/services/SlashCommandConflictHandler.d.ts +0 -35
  855. package/dist/src/services/SlashCommandConflictHandler.js +0 -128
  856. package/dist/src/services/SlashCommandConflictHandler.js.map +0 -1
  857. package/dist/src/services/SlashCommandResolver.d.ts +0 -53
  858. package/dist/src/services/SlashCommandResolver.js +0 -156
  859. package/dist/src/services/SlashCommandResolver.js.map +0 -1
  860. package/dist/src/services/liteRtServerManager.d.ts +0 -9
  861. package/dist/src/services/liteRtServerManager.js +0 -43
  862. package/dist/src/services/liteRtServerManager.js.map +0 -1
  863. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +0 -16
  864. package/dist/src/services/prompt-processors/argumentProcessor.js +0 -21
  865. package/dist/src/services/prompt-processors/argumentProcessor.js.map +0 -1
  866. package/dist/src/services/prompt-processors/atFileProcessor.d.ts +0 -12
  867. package/dist/src/services/prompt-processors/atFileProcessor.js +0 -63
  868. package/dist/src/services/prompt-processors/atFileProcessor.js.map +0 -1
  869. package/dist/src/services/prompt-processors/injectionParser.d.ts +0 -29
  870. package/dist/src/services/prompt-processors/injectionParser.js +0 -60
  871. package/dist/src/services/prompt-processors/injectionParser.js.map +0 -1
  872. package/dist/src/services/prompt-processors/shellProcessor.d.ts +0 -27
  873. package/dist/src/services/prompt-processors/shellProcessor.js +0 -130
  874. package/dist/src/services/prompt-processors/shellProcessor.js.map +0 -1
  875. package/dist/src/services/prompt-processors/types.d.ts +0 -45
  876. package/dist/src/services/prompt-processors/types.js +0 -20
  877. package/dist/src/services/prompt-processors/types.js.map +0 -1
  878. package/dist/src/services/types.d.ts +0 -30
  879. package/dist/src/services/types.js +0 -7
  880. package/dist/src/services/types.js.map +0 -1
  881. package/dist/src/test-utils/AppRig.d.ts +0 -83
  882. package/dist/src/test-utils/AppRig.js +0 -583
  883. package/dist/src/test-utils/AppRig.js.map +0 -1
  884. package/dist/src/test-utils/MockShellExecutionService.d.ts +0 -37
  885. package/dist/src/test-utils/MockShellExecutionService.js +0 -89
  886. package/dist/src/test-utils/MockShellExecutionService.js.map +0 -1
  887. package/dist/src/test-utils/async.d.ts +0 -9
  888. package/dist/src/test-utils/async.js +0 -35
  889. package/dist/src/test-utils/async.js.map +0 -1
  890. package/dist/src/test-utils/createExtension.d.ts +0 -17
  891. package/dist/src/test-utils/createExtension.js +0 -32
  892. package/dist/src/test-utils/createExtension.js.map +0 -1
  893. package/dist/src/test-utils/customMatchers.d.ts +0 -34
  894. package/dist/src/test-utils/customMatchers.js +0 -86
  895. package/dist/src/test-utils/customMatchers.js.map +0 -1
  896. package/dist/src/test-utils/mockCommandContext.d.ts +0 -18
  897. package/dist/src/test-utils/mockCommandContext.js +0 -103
  898. package/dist/src/test-utils/mockCommandContext.js.map +0 -1
  899. package/dist/src/test-utils/mockConfig.d.ts +0 -15
  900. package/dist/src/test-utils/mockConfig.js +0 -203
  901. package/dist/src/test-utils/mockConfig.js.map +0 -1
  902. package/dist/src/test-utils/mockDebugLogger.d.ts +0 -35
  903. package/dist/src/test-utils/mockDebugLogger.js +0 -68
  904. package/dist/src/test-utils/mockDebugLogger.js.map +0 -1
  905. package/dist/src/test-utils/mockSpinner.d.ts +0 -6
  906. package/dist/src/test-utils/mockSpinner.js +0 -21
  907. package/dist/src/test-utils/mockSpinner.js.map +0 -1
  908. package/dist/src/test-utils/persistentStateFake.d.ts +0 -26
  909. package/dist/src/test-utils/persistentStateFake.js +0 -39
  910. package/dist/src/test-utils/persistentStateFake.js.map +0 -1
  911. package/dist/src/test-utils/render.d.ts +0 -163
  912. package/dist/src/test-utils/render.js +0 -609
  913. package/dist/src/test-utils/render.js.map +0 -1
  914. package/dist/src/test-utils/settings.d.ts +0 -31
  915. package/dist/src/test-utils/settings.js +0 -34
  916. package/dist/src/test-utils/settings.js.map +0 -1
  917. package/dist/src/test-utils/svg.d.ts +0 -7
  918. package/dist/src/test-utils/svg.js +0 -182
  919. package/dist/src/test-utils/svg.js.map +0 -1
  920. package/dist/src/ui/App.d.ts +0 -6
  921. package/dist/src/ui/App.js +0 -30
  922. package/dist/src/ui/App.js.map +0 -1
  923. package/dist/src/ui/AppContainer.d.ts +0 -16
  924. package/dist/src/ui/AppContainer.js +0 -2106
  925. package/dist/src/ui/AppContainer.js.map +0 -1
  926. package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -16
  927. package/dist/src/ui/IdeIntegrationNudge.js +0 -53
  928. package/dist/src/ui/IdeIntegrationNudge.js.map +0 -1
  929. package/dist/src/ui/auth/ApiAuthDialog.d.ts +0 -14
  930. package/dist/src/ui/auth/ApiAuthDialog.js +0 -63
  931. package/dist/src/ui/auth/ApiAuthDialog.js.map +0 -1
  932. package/dist/src/ui/auth/AuthDialog.d.ts +0 -21
  933. package/dist/src/ui/auth/AuthDialog.js +0 -142
  934. package/dist/src/ui/auth/AuthDialog.js.map +0 -1
  935. package/dist/src/ui/auth/AuthInProgress.d.ts +0 -11
  936. package/dist/src/ui/auth/AuthInProgress.js +0 -24
  937. package/dist/src/ui/auth/AuthInProgress.js.map +0 -1
  938. package/dist/src/ui/auth/BannedAccountDialog.d.ts +0 -14
  939. package/dist/src/ui/auth/BannedAccountDialog.js +0 -67
  940. package/dist/src/ui/auth/BannedAccountDialog.js.map +0 -1
  941. package/dist/src/ui/auth/LoginRestartDialog.d.ts +0 -13
  942. package/dist/src/ui/auth/LoginRestartDialog.js +0 -40
  943. package/dist/src/ui/auth/LoginRestartDialog.js.map +0 -1
  944. package/dist/src/ui/auth/useAuth.d.ts +0 -21
  945. package/dist/src/ui/auth/useAuth.js +0 -133
  946. package/dist/src/ui/auth/useAuth.js.map +0 -1
  947. package/dist/src/ui/colors.d.ts +0 -7
  948. package/dist/src/ui/colors.js +0 -63
  949. package/dist/src/ui/colors.js.map +0 -1
  950. package/dist/src/ui/commands/aboutCommand.d.ts +0 -7
  951. package/dist/src/ui/commands/aboutCommand.js +0 -59
  952. package/dist/src/ui/commands/aboutCommand.js.map +0 -1
  953. package/dist/src/ui/commands/agentsCommand.d.ts +0 -7
  954. package/dist/src/ui/commands/agentsCommand.js +0 -328
  955. package/dist/src/ui/commands/agentsCommand.js.map +0 -1
  956. package/dist/src/ui/commands/authCommand.d.ts +0 -7
  957. package/dist/src/ui/commands/authCommand.js +0 -46
  958. package/dist/src/ui/commands/authCommand.js.map +0 -1
  959. package/dist/src/ui/commands/bugCommand.d.ts +0 -7
  960. package/dist/src/ui/commands/bugCommand.js +0 -147
  961. package/dist/src/ui/commands/bugCommand.js.map +0 -1
  962. package/dist/src/ui/commands/bugMemoryCommand.d.ts +0 -7
  963. package/dist/src/ui/commands/bugMemoryCommand.js +0 -62
  964. package/dist/src/ui/commands/bugMemoryCommand.js.map +0 -1
  965. package/dist/src/ui/commands/chatCommand.d.ts +0 -10
  966. package/dist/src/ui/commands/chatCommand.js +0 -362
  967. package/dist/src/ui/commands/chatCommand.js.map +0 -1
  968. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  969. package/dist/src/ui/commands/clearCommand.js +0 -68
  970. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  971. package/dist/src/ui/commands/commandsCommand.d.ts +0 -7
  972. package/dist/src/ui/commands/commandsCommand.js +0 -104
  973. package/dist/src/ui/commands/commandsCommand.js.map +0 -1
  974. package/dist/src/ui/commands/compressCommand.d.ts +0 -7
  975. package/dist/src/ui/commands/compressCommand.js +0 -67
  976. package/dist/src/ui/commands/compressCommand.js.map +0 -1
  977. package/dist/src/ui/commands/copyCommand.d.ts +0 -7
  978. package/dist/src/ui/commands/copyCommand.js +0 -62
  979. package/dist/src/ui/commands/copyCommand.js.map +0 -1
  980. package/dist/src/ui/commands/corgiCommand.d.ts +0 -7
  981. package/dist/src/ui/commands/corgiCommand.js +0 -17
  982. package/dist/src/ui/commands/corgiCommand.js.map +0 -1
  983. package/dist/src/ui/commands/directoryCommand.d.ts +0 -7
  984. package/dist/src/ui/commands/directoryCommand.js +0 -224
  985. package/dist/src/ui/commands/directoryCommand.js.map +0 -1
  986. package/dist/src/ui/commands/docsCommand.d.ts +0 -7
  987. package/dist/src/ui/commands/docsCommand.js +0 -32
  988. package/dist/src/ui/commands/docsCommand.js.map +0 -1
  989. package/dist/src/ui/commands/editorCommand.d.ts +0 -7
  990. package/dist/src/ui/commands/editorCommand.js +0 -17
  991. package/dist/src/ui/commands/editorCommand.js.map +0 -1
  992. package/dist/src/ui/commands/exportSessionCommand.d.ts +0 -7
  993. package/dist/src/ui/commands/exportSessionCommand.js +0 -74
  994. package/dist/src/ui/commands/exportSessionCommand.js.map +0 -1
  995. package/dist/src/ui/commands/extensionsCommand.d.ts +0 -12
  996. package/dist/src/ui/commands/extensionsCommand.js +0 -740
  997. package/dist/src/ui/commands/extensionsCommand.js.map +0 -1
  998. package/dist/src/ui/commands/footerCommand.d.ts +0 -7
  999. package/dist/src/ui/commands/footerCommand.js +0 -20
  1000. package/dist/src/ui/commands/footerCommand.js.map +0 -1
  1001. package/dist/src/ui/commands/gemmaStatusCommand.d.ts +0 -7
  1002. package/dist/src/ui/commands/gemmaStatusCommand.js +0 -34
  1003. package/dist/src/ui/commands/gemmaStatusCommand.js.map +0 -1
  1004. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  1005. package/dist/src/ui/commands/helpCommand.js +0 -41
  1006. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  1007. package/dist/src/ui/commands/hooksCommand.d.ts +0 -7
  1008. package/dist/src/ui/commands/hooksCommand.js +0 -337
  1009. package/dist/src/ui/commands/hooksCommand.js.map +0 -1
  1010. package/dist/src/ui/commands/ideCommand.d.ts +0 -7
  1011. package/dist/src/ui/commands/ideCommand.js +0 -233
  1012. package/dist/src/ui/commands/ideCommand.js.map +0 -1
  1013. package/dist/src/ui/commands/initCommand.d.ts +0 -7
  1014. package/dist/src/ui/commands/initCommand.js +0 -38
  1015. package/dist/src/ui/commands/initCommand.js.map +0 -1
  1016. package/dist/src/ui/commands/mcpCommand.d.ts +0 -7
  1017. package/dist/src/ui/commands/mcpCommand.js +0 -447
  1018. package/dist/src/ui/commands/mcpCommand.js.map +0 -1
  1019. package/dist/src/ui/commands/memoryCommand.d.ts +0 -8
  1020. package/dist/src/ui/commands/memoryCommand.js +0 -125
  1021. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  1022. package/dist/src/ui/commands/modelCommand.d.ts +0 -7
  1023. package/dist/src/ui/commands/modelCommand.js +0 -59
  1024. package/dist/src/ui/commands/modelCommand.js.map +0 -1
  1025. package/dist/src/ui/commands/oncallCommand.d.ts +0 -7
  1026. package/dist/src/ui/commands/oncallCommand.js +0 -91
  1027. package/dist/src/ui/commands/oncallCommand.js.map +0 -1
  1028. package/dist/src/ui/commands/permissionsCommand.d.ts +0 -7
  1029. package/dist/src/ui/commands/permissionsCommand.js +0 -75
  1030. package/dist/src/ui/commands/permissionsCommand.js.map +0 -1
  1031. package/dist/src/ui/commands/planCommand.d.ts +0 -7
  1032. package/dist/src/ui/commands/planCommand.js +0 -83
  1033. package/dist/src/ui/commands/planCommand.js.map +0 -1
  1034. package/dist/src/ui/commands/policiesCommand.d.ts +0 -7
  1035. package/dist/src/ui/commands/policiesCommand.js +0 -83
  1036. package/dist/src/ui/commands/policiesCommand.js.map +0 -1
  1037. package/dist/src/ui/commands/privacyCommand.d.ts +0 -7
  1038. package/dist/src/ui/commands/privacyCommand.js +0 -17
  1039. package/dist/src/ui/commands/privacyCommand.js.map +0 -1
  1040. package/dist/src/ui/commands/profileCommand.d.ts +0 -7
  1041. package/dist/src/ui/commands/profileCommand.js +0 -24
  1042. package/dist/src/ui/commands/profileCommand.js.map +0 -1
  1043. package/dist/src/ui/commands/quitCommand.d.ts +0 -7
  1044. package/dist/src/ui/commands/quitCommand.js +0 -37
  1045. package/dist/src/ui/commands/quitCommand.js.map +0 -1
  1046. package/dist/src/ui/commands/restoreCommand.d.ts +0 -8
  1047. package/dist/src/ui/commands/restoreCommand.js +0 -132
  1048. package/dist/src/ui/commands/restoreCommand.js.map +0 -1
  1049. package/dist/src/ui/commands/resumeCommand.d.ts +0 -7
  1050. package/dist/src/ui/commands/resumeCommand.js +0 -19
  1051. package/dist/src/ui/commands/resumeCommand.js.map +0 -1
  1052. package/dist/src/ui/commands/rewindCommand.d.ts +0 -7
  1053. package/dist/src/ui/commands/rewindCommand.js +0 -138
  1054. package/dist/src/ui/commands/rewindCommand.js.map +0 -1
  1055. package/dist/src/ui/commands/settingsCommand.d.ts +0 -7
  1056. package/dist/src/ui/commands/settingsCommand.js +0 -17
  1057. package/dist/src/ui/commands/settingsCommand.js.map +0 -1
  1058. package/dist/src/ui/commands/setupGithubCommand.d.ts +0 -10
  1059. package/dist/src/ui/commands/setupGithubCommand.js +0 -196
  1060. package/dist/src/ui/commands/setupGithubCommand.js.map +0 -1
  1061. package/dist/src/ui/commands/shortcutsCommand.d.ts +0 -7
  1062. package/dist/src/ui/commands/shortcutsCommand.js +0 -17
  1063. package/dist/src/ui/commands/shortcutsCommand.js.map +0 -1
  1064. package/dist/src/ui/commands/skillsCommand.d.ts +0 -7
  1065. package/dist/src/ui/commands/skillsCommand.js +0 -297
  1066. package/dist/src/ui/commands/skillsCommand.js.map +0 -1
  1067. package/dist/src/ui/commands/statsCommand.d.ts +0 -7
  1068. package/dist/src/ui/commands/statsCommand.js +0 -118
  1069. package/dist/src/ui/commands/statsCommand.js.map +0 -1
  1070. package/dist/src/ui/commands/tasksCommand.d.ts +0 -7
  1071. package/dist/src/ui/commands/tasksCommand.js +0 -17
  1072. package/dist/src/ui/commands/tasksCommand.js.map +0 -1
  1073. package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
  1074. package/dist/src/ui/commands/terminalSetupCommand.js +0 -43
  1075. package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
  1076. package/dist/src/ui/commands/themeCommand.d.ts +0 -7
  1077. package/dist/src/ui/commands/themeCommand.js +0 -17
  1078. package/dist/src/ui/commands/themeCommand.js.map +0 -1
  1079. package/dist/src/ui/commands/toolsCommand.d.ts +0 -7
  1080. package/dist/src/ui/commands/toolsCommand.js +0 -59
  1081. package/dist/src/ui/commands/toolsCommand.js.map +0 -1
  1082. package/dist/src/ui/commands/types.d.ts +0 -179
  1083. package/dist/src/ui/commands/types.js +0 -16
  1084. package/dist/src/ui/commands/types.js.map +0 -1
  1085. package/dist/src/ui/commands/upgradeCommand.d.ts +0 -11
  1086. package/dist/src/ui/commands/upgradeCommand.js +0 -58
  1087. package/dist/src/ui/commands/upgradeCommand.js.map +0 -1
  1088. package/dist/src/ui/commands/vimCommand.d.ts +0 -7
  1089. package/dist/src/ui/commands/vimCommand.js +0 -25
  1090. package/dist/src/ui/commands/vimCommand.js.map +0 -1
  1091. package/dist/src/ui/commands/voiceCommand.d.ts +0 -7
  1092. package/dist/src/ui/commands/voiceCommand.js +0 -29
  1093. package/dist/src/ui/commands/voiceCommand.js.map +0 -1
  1094. package/dist/src/ui/components/AboutBox.d.ts +0 -19
  1095. package/dist/src/ui/components/AboutBox.js +0 -17
  1096. package/dist/src/ui/components/AboutBox.js.map +0 -1
  1097. package/dist/src/ui/components/AdminSettingsChangedDialog.d.ts +0 -6
  1098. package/dist/src/ui/components/AdminSettingsChangedDialog.js +0 -27
  1099. package/dist/src/ui/components/AdminSettingsChangedDialog.js.map +0 -1
  1100. package/dist/src/ui/components/AgentConfigDialog.d.ts +0 -20
  1101. package/dist/src/ui/components/AgentConfigDialog.js +0 -298
  1102. package/dist/src/ui/components/AgentConfigDialog.js.map +0 -1
  1103. package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +0 -6
  1104. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +0 -30
  1105. package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +0 -1
  1106. package/dist/src/ui/components/AnsiOutput.d.ts +0 -19
  1107. package/dist/src/ui/components/AnsiOutput.js +0 -24
  1108. package/dist/src/ui/components/AnsiOutput.js.map +0 -1
  1109. package/dist/src/ui/components/AppHeader.d.ts +0 -11
  1110. package/dist/src/ui/components/AppHeader.js +0 -74
  1111. package/dist/src/ui/components/AppHeader.js.map +0 -1
  1112. package/dist/src/ui/components/ApprovalModeIndicator.d.ts +0 -13
  1113. package/dist/src/ui/components/ApprovalModeIndicator.js +0 -41
  1114. package/dist/src/ui/components/ApprovalModeIndicator.js.map +0 -1
  1115. package/dist/src/ui/components/AsciiArt.d.ts +0 -11
  1116. package/dist/src/ui/components/AsciiArt.js +0 -54
  1117. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  1118. package/dist/src/ui/components/AskUserDialog.d.ts +0 -46
  1119. package/dist/src/ui/components/AskUserDialog.js +0 -739
  1120. package/dist/src/ui/components/AskUserDialog.js.map +0 -1
  1121. package/dist/src/ui/components/BackgroundTaskDisplay.d.ts +0 -16
  1122. package/dist/src/ui/components/BackgroundTaskDisplay.js +0 -253
  1123. package/dist/src/ui/components/BackgroundTaskDisplay.js.map +0 -1
  1124. package/dist/src/ui/components/Banner.d.ts +0 -14
  1125. package/dist/src/ui/components/Banner.js +0 -29
  1126. package/dist/src/ui/components/Banner.js.map +0 -1
  1127. package/dist/src/ui/components/Checklist.d.ts +0 -14
  1128. package/dist/src/ui/components/Checklist.js +0 -32
  1129. package/dist/src/ui/components/Checklist.js.map +0 -1
  1130. package/dist/src/ui/components/ChecklistItem.d.ts +0 -17
  1131. package/dist/src/ui/components/ChecklistItem.js +0 -40
  1132. package/dist/src/ui/components/ChecklistItem.js.map +0 -1
  1133. package/dist/src/ui/components/CliSpinner.d.ts +0 -9
  1134. package/dist/src/ui/components/CliSpinner.js +0 -28
  1135. package/dist/src/ui/components/CliSpinner.js.map +0 -1
  1136. package/dist/src/ui/components/ColorsDisplay.d.ts +0 -12
  1137. package/dist/src/ui/components/ColorsDisplay.js +0 -120
  1138. package/dist/src/ui/components/ColorsDisplay.js.map +0 -1
  1139. package/dist/src/ui/components/Composer.d.ts +0 -8
  1140. package/dist/src/ui/components/Composer.js +0 -88
  1141. package/dist/src/ui/components/Composer.js.map +0 -1
  1142. package/dist/src/ui/components/ConfigExtensionDialog.d.ts +0 -19
  1143. package/dist/src/ui/components/ConfigExtensionDialog.js +0 -156
  1144. package/dist/src/ui/components/ConfigExtensionDialog.js.map +0 -1
  1145. package/dist/src/ui/components/ConfigInitDisplay.d.ts +0 -8
  1146. package/dist/src/ui/components/ConfigInitDisplay.js +0 -55
  1147. package/dist/src/ui/components/ConfigInitDisplay.js.map +0 -1
  1148. package/dist/src/ui/components/ConsentPrompt.d.ts +0 -13
  1149. package/dist/src/ui/components/ConsentPrompt.js +0 -21
  1150. package/dist/src/ui/components/ConsentPrompt.js.map +0 -1
  1151. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  1152. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -12
  1153. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  1154. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -21
  1155. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -72
  1156. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  1157. package/dist/src/ui/components/ContextUsageDisplay.d.ts +0 -10
  1158. package/dist/src/ui/components/ContextUsageDisplay.js +0 -29
  1159. package/dist/src/ui/components/ContextUsageDisplay.js.map +0 -1
  1160. package/dist/src/ui/components/CopyModeWarning.d.ts +0 -7
  1161. package/dist/src/ui/components/CopyModeWarning.js +0 -10
  1162. package/dist/src/ui/components/CopyModeWarning.js.map +0 -1
  1163. package/dist/src/ui/components/DebugProfiler.d.ts +0 -25
  1164. package/dist/src/ui/components/DebugProfiler.js +0 -190
  1165. package/dist/src/ui/components/DebugProfiler.js.map +0 -1
  1166. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -13
  1167. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -60
  1168. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  1169. package/dist/src/ui/components/DialogManager.d.ts +0 -12
  1170. package/dist/src/ui/components/DialogManager.js +0 -164
  1171. package/dist/src/ui/components/DialogManager.js.map +0 -1
  1172. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
  1173. package/dist/src/ui/components/EditorSettingsDialog.js +0 -89
  1174. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  1175. package/dist/src/ui/components/EmptyWalletDialog.d.ts +0 -22
  1176. package/dist/src/ui/components/EmptyWalletDialog.js +0 -34
  1177. package/dist/src/ui/components/EmptyWalletDialog.js.map +0 -1
  1178. package/dist/src/ui/components/ExitPlanModeDialog.d.ts +0 -17
  1179. package/dist/src/ui/components/ExitPlanModeDialog.js +0 -180
  1180. package/dist/src/ui/components/ExitPlanModeDialog.js.map +0 -1
  1181. package/dist/src/ui/components/ExitWarning.d.ts +0 -7
  1182. package/dist/src/ui/components/ExitWarning.js +0 -10
  1183. package/dist/src/ui/components/ExitWarning.js.map +0 -1
  1184. package/dist/src/ui/components/FolderTrustDialog.d.ts +0 -19
  1185. package/dist/src/ui/components/FolderTrustDialog.js +0 -119
  1186. package/dist/src/ui/components/FolderTrustDialog.js.map +0 -1
  1187. package/dist/src/ui/components/Footer.d.ts +0 -20
  1188. package/dist/src/ui/components/Footer.js +0 -271
  1189. package/dist/src/ui/components/Footer.js.map +0 -1
  1190. package/dist/src/ui/components/FooterConfigDialog.d.ts +0 -11
  1191. package/dist/src/ui/components/FooterConfigDialog.js +0 -214
  1192. package/dist/src/ui/components/FooterConfigDialog.js.map +0 -1
  1193. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -23
  1194. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -23
  1195. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  1196. package/dist/src/ui/components/GeminiSpinner.d.ts +0 -13
  1197. package/dist/src/ui/components/GeminiSpinner.js +0 -36
  1198. package/dist/src/ui/components/GeminiSpinner.js.map +0 -1
  1199. package/dist/src/ui/components/Header.d.ts +0 -13
  1200. package/dist/src/ui/components/Header.js +0 -30
  1201. package/dist/src/ui/components/Header.js.map +0 -1
  1202. package/dist/src/ui/components/Help.d.ts +0 -12
  1203. package/dist/src/ui/components/Help.js +0 -18
  1204. package/dist/src/ui/components/Help.js.map +0 -1
  1205. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -22
  1206. package/dist/src/ui/components/HistoryItemDisplay.js +0 -53
  1207. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  1208. package/dist/src/ui/components/HookStatusDisplay.d.ts +0 -12
  1209. package/dist/src/ui/components/HookStatusDisplay.js +0 -28
  1210. package/dist/src/ui/components/HookStatusDisplay.js.map +0 -1
  1211. package/dist/src/ui/components/HooksDialog.d.ts +0 -36
  1212. package/dist/src/ui/components/HooksDialog.js +0 -84
  1213. package/dist/src/ui/components/HooksDialog.js.map +0 -1
  1214. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +0 -11
  1215. package/dist/src/ui/components/IdeTrustChangeDialog.js +0 -37
  1216. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +0 -1
  1217. package/dist/src/ui/components/InboxDialog.d.ts +0 -15
  1218. package/dist/src/ui/components/InboxDialog.js +0 -757
  1219. package/dist/src/ui/components/InboxDialog.js.map +0 -1
  1220. package/dist/src/ui/components/InputPrompt.d.ts +0 -66
  1221. package/dist/src/ui/components/InputPrompt.js +0 -1325
  1222. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  1223. package/dist/src/ui/components/ListeningIndicator.d.ts +0 -10
  1224. package/dist/src/ui/components/ListeningIndicator.js +0 -31
  1225. package/dist/src/ui/components/ListeningIndicator.js.map +0 -1
  1226. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -25
  1227. package/dist/src/ui/components/LoadingIndicator.js +0 -49
  1228. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  1229. package/dist/src/ui/components/LogoutConfirmationDialog.d.ts +0 -15
  1230. package/dist/src/ui/components/LogoutConfirmationDialog.js +0 -40
  1231. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +0 -1
  1232. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +0 -13
  1233. package/dist/src/ui/components/LoopDetectionConfirmation.js +0 -40
  1234. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +0 -1
  1235. package/dist/src/ui/components/MainContent.d.ts +0 -6
  1236. package/dist/src/ui/components/MainContent.js +0 -177
  1237. package/dist/src/ui/components/MainContent.js.map +0 -1
  1238. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -10
  1239. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -26
  1240. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  1241. package/dist/src/ui/components/ModelDialog.d.ts +0 -11
  1242. package/dist/src/ui/components/ModelDialog.js +0 -269
  1243. package/dist/src/ui/components/ModelDialog.js.map +0 -1
  1244. package/dist/src/ui/components/ModelQuotaDisplay.d.ts +0 -18
  1245. package/dist/src/ui/components/ModelQuotaDisplay.js +0 -105
  1246. package/dist/src/ui/components/ModelQuotaDisplay.js.map +0 -1
  1247. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -16
  1248. package/dist/src/ui/components/ModelStatsDisplay.js +0 -158
  1249. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  1250. package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +0 -23
  1251. package/dist/src/ui/components/MultiFolderTrustDialog.js +0 -97
  1252. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +0 -1
  1253. package/dist/src/ui/components/NewAgentsNotification.d.ts +0 -16
  1254. package/dist/src/ui/components/NewAgentsNotification.js +0 -52
  1255. package/dist/src/ui/components/NewAgentsNotification.js.map +0 -1
  1256. package/dist/src/ui/components/Notifications.d.ts +0 -6
  1257. package/dist/src/ui/components/Notifications.js +0 -108
  1258. package/dist/src/ui/components/Notifications.js.map +0 -1
  1259. package/dist/src/ui/components/OverageMenuDialog.d.ts +0 -22
  1260. package/dist/src/ui/components/OverageMenuDialog.js +0 -33
  1261. package/dist/src/ui/components/OverageMenuDialog.js.map +0 -1
  1262. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +0 -16
  1263. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +0 -63
  1264. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +0 -1
  1265. package/dist/src/ui/components/PolicyUpdateDialog.d.ts +0 -18
  1266. package/dist/src/ui/components/PolicyUpdateDialog.js +0 -62
  1267. package/dist/src/ui/components/PolicyUpdateDialog.js.map +0 -1
  1268. package/dist/src/ui/components/ProQuotaDialog.d.ts +0 -19
  1269. package/dist/src/ui/components/ProQuotaDialog.js +0 -85
  1270. package/dist/src/ui/components/ProQuotaDialog.js.map +0 -1
  1271. package/dist/src/ui/components/ProgressBar.d.ts +0 -13
  1272. package/dist/src/ui/components/ProgressBar.js +0 -18
  1273. package/dist/src/ui/components/ProgressBar.js.map +0 -1
  1274. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +0 -9
  1275. package/dist/src/ui/components/QueuedMessageDisplay.js +0 -21
  1276. package/dist/src/ui/components/QueuedMessageDisplay.js.map +0 -1
  1277. package/dist/src/ui/components/QuittingDisplay.d.ts +0 -6
  1278. package/dist/src/ui/components/QuittingDisplay.js +0 -21
  1279. package/dist/src/ui/components/QuittingDisplay.js.map +0 -1
  1280. package/dist/src/ui/components/QuotaDisplay.d.ts +0 -16
  1281. package/dist/src/ui/components/QuotaDisplay.js +0 -37
  1282. package/dist/src/ui/components/QuotaDisplay.js.map +0 -1
  1283. package/dist/src/ui/components/QuotaStatsInfo.d.ts +0 -14
  1284. package/dist/src/ui/components/QuotaStatsInfo.js +0 -24
  1285. package/dist/src/ui/components/QuotaStatsInfo.js.map +0 -1
  1286. package/dist/src/ui/components/RawMarkdownIndicator.d.ts +0 -7
  1287. package/dist/src/ui/components/RawMarkdownIndicator.js +0 -11
  1288. package/dist/src/ui/components/RawMarkdownIndicator.js.map +0 -1
  1289. package/dist/src/ui/components/RewindConfirmation.d.ts +0 -21
  1290. package/dist/src/ui/components/RewindConfirmation.js +0 -74
  1291. package/dist/src/ui/components/RewindConfirmation.js.map +0 -1
  1292. package/dist/src/ui/components/RewindViewer.d.ts +0 -15
  1293. package/dist/src/ui/components/RewindViewer.js +0 -155
  1294. package/dist/src/ui/components/RewindViewer.js.map +0 -1
  1295. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.d.ts +0 -10
  1296. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.js +0 -9
  1297. package/dist/src/ui/components/SessionBrowser/SessionBrowserEmpty.js.map +0 -1
  1298. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.d.ts +0 -13
  1299. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.js +0 -9
  1300. package/dist/src/ui/components/SessionBrowser/SessionBrowserError.js.map +0 -1
  1301. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.d.ts +0 -10
  1302. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.js +0 -9
  1303. package/dist/src/ui/components/SessionBrowser/SessionBrowserLoading.js.map +0 -1
  1304. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.d.ts +0 -23
  1305. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.js +0 -18
  1306. package/dist/src/ui/components/SessionBrowser/SessionBrowserNav.js.map +0 -1
  1307. package/dist/src/ui/components/SessionBrowser/SessionListHeader.d.ts +0 -13
  1308. package/dist/src/ui/components/SessionBrowser/SessionListHeader.js +0 -9
  1309. package/dist/src/ui/components/SessionBrowser/SessionListHeader.js.map +0 -1
  1310. package/dist/src/ui/components/SessionBrowser/utils.d.ts +0 -33
  1311. package/dist/src/ui/components/SessionBrowser/utils.js +0 -100
  1312. package/dist/src/ui/components/SessionBrowser/utils.js.map +0 -1
  1313. package/dist/src/ui/components/SessionBrowser.d.ts +0 -98
  1314. package/dist/src/ui/components/SessionBrowser.js +0 -371
  1315. package/dist/src/ui/components/SessionBrowser.js.map +0 -1
  1316. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  1317. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -25
  1318. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  1319. package/dist/src/ui/components/SettingsDialog.d.ts +0 -14
  1320. package/dist/src/ui/components/SettingsDialog.js +0 -285
  1321. package/dist/src/ui/components/SettingsDialog.js.map +0 -1
  1322. package/dist/src/ui/components/ShellInputPrompt.d.ts +0 -12
  1323. package/dist/src/ui/components/ShellInputPrompt.js +0 -65
  1324. package/dist/src/ui/components/ShellInputPrompt.js.map +0 -1
  1325. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  1326. package/dist/src/ui/components/ShellModeIndicator.js +0 -6
  1327. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  1328. package/dist/src/ui/components/ShortcutsHelp.d.ts +0 -7
  1329. package/dist/src/ui/components/ShortcutsHelp.js +0 -59
  1330. package/dist/src/ui/components/ShortcutsHelp.js.map +0 -1
  1331. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -11
  1332. package/dist/src/ui/components/ShowMoreLines.js +0 -27
  1333. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  1334. package/dist/src/ui/components/StatsDisplay.d.ts +0 -20
  1335. package/dist/src/ui/components/StatsDisplay.js +0 -94
  1336. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  1337. package/dist/src/ui/components/StatusDisplay.d.ts +0 -10
  1338. package/dist/src/ui/components/StatusDisplay.js +0 -21
  1339. package/dist/src/ui/components/StatusDisplay.js.map +0 -1
  1340. package/dist/src/ui/components/StatusRow.d.ts +0 -32
  1341. package/dist/src/ui/components/StatusRow.js +0 -183
  1342. package/dist/src/ui/components/StatusRow.js.map +0 -1
  1343. package/dist/src/ui/components/StickyHeader.d.ts +0 -16
  1344. package/dist/src/ui/components/StickyHeader.js +0 -6
  1345. package/dist/src/ui/components/StickyHeader.js.map +0 -1
  1346. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -30
  1347. package/dist/src/ui/components/SuggestionsDisplay.js +0 -51
  1348. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  1349. package/dist/src/ui/components/Table.d.ts +0 -21
  1350. package/dist/src/ui/components/Table.js +0 -8
  1351. package/dist/src/ui/components/Table.js.map +0 -1
  1352. package/dist/src/ui/components/ThemeDialog.constants.d.ts +0 -26
  1353. package/dist/src/ui/components/ThemeDialog.constants.js +0 -27
  1354. package/dist/src/ui/components/ThemeDialog.constants.js.map +0 -1
  1355. package/dist/src/ui/components/ThemeDialog.d.ts +0 -21
  1356. package/dist/src/ui/components/ThemeDialog.js +0 -166
  1357. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  1358. package/dist/src/ui/components/ThemedGradient.d.ts +0 -8
  1359. package/dist/src/ui/components/ThemedGradient.js +0 -17
  1360. package/dist/src/ui/components/ThemedGradient.js.map +0 -1
  1361. package/dist/src/ui/components/Tips.d.ts +0 -12
  1362. package/dist/src/ui/components/Tips.js +0 -10
  1363. package/dist/src/ui/components/Tips.js.map +0 -1
  1364. package/dist/src/ui/components/ToastDisplay.d.ts +0 -10
  1365. package/dist/src/ui/components/ToastDisplay.js +0 -51
  1366. package/dist/src/ui/components/ToastDisplay.js.map +0 -1
  1367. package/dist/src/ui/components/ToolConfirmationQueue.d.ts +0 -12
  1368. package/dist/src/ui/components/ToolConfirmationQueue.js +0 -64
  1369. package/dist/src/ui/components/ToolConfirmationQueue.js.map +0 -1
  1370. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  1371. package/dist/src/ui/components/ToolStatsDisplay.js +0 -42
  1372. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  1373. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  1374. package/dist/src/ui/components/UpdateNotification.js +0 -11
  1375. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  1376. package/dist/src/ui/components/UserIdentity.d.ts +0 -12
  1377. package/dist/src/ui/components/UserIdentity.js +0 -27
  1378. package/dist/src/ui/components/UserIdentity.js.map +0 -1
  1379. package/dist/src/ui/components/ValidationDialog.d.ts +0 -15
  1380. package/dist/src/ui/components/ValidationDialog.js +0 -92
  1381. package/dist/src/ui/components/ValidationDialog.js.map +0 -1
  1382. package/dist/src/ui/components/VoiceModelDialog.d.ts +0 -11
  1383. package/dist/src/ui/components/VoiceModelDialog.js +0 -124
  1384. package/dist/src/ui/components/VoiceModelDialog.js.map +0 -1
  1385. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
  1386. package/dist/src/ui/components/messages/CompressionMessage.js +0 -49
  1387. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  1388. package/dist/src/ui/components/messages/DenseToolMessage.d.ts +0 -13
  1389. package/dist/src/ui/components/messages/DenseToolMessage.js +0 -258
  1390. package/dist/src/ui/components/messages/DenseToolMessage.js.map +0 -1
  1391. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -35
  1392. package/dist/src/ui/components/messages/DiffRenderer.js +0 -271
  1393. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  1394. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  1395. package/dist/src/ui/components/messages/ErrorMessage.js +0 -10
  1396. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  1397. package/dist/src/ui/components/messages/ExportSessionMessage.d.ts +0 -11
  1398. package/dist/src/ui/components/messages/ExportSessionMessage.js +0 -16
  1399. package/dist/src/ui/components/messages/ExportSessionMessage.js.map +0 -1
  1400. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  1401. package/dist/src/ui/components/messages/GeminiMessage.js +0 -16
  1402. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  1403. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  1404. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -20
  1405. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  1406. package/dist/src/ui/components/messages/HintMessage.d.ts +0 -11
  1407. package/dist/src/ui/components/messages/HintMessage.js +0 -16
  1408. package/dist/src/ui/components/messages/HintMessage.js.map +0 -1
  1409. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -16
  1410. package/dist/src/ui/components/messages/InfoMessage.js +0 -12
  1411. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  1412. package/dist/src/ui/components/messages/ModelMessage.d.ts +0 -11
  1413. package/dist/src/ui/components/messages/ModelMessage.js +0 -7
  1414. package/dist/src/ui/components/messages/ModelMessage.js.map +0 -1
  1415. package/dist/src/ui/components/messages/ShellToolMessage.d.ts +0 -13
  1416. package/dist/src/ui/components/messages/ShellToolMessage.js +0 -85
  1417. package/dist/src/ui/components/messages/ShellToolMessage.js.map +0 -1
  1418. package/dist/src/ui/components/messages/SubagentGroupDisplay.d.ts +0 -17
  1419. package/dist/src/ui/components/messages/SubagentGroupDisplay.js +0 -140
  1420. package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +0 -1
  1421. package/dist/src/ui/components/messages/SubagentHistoryMessage.d.ts +0 -13
  1422. package/dist/src/ui/components/messages/SubagentHistoryMessage.js +0 -5
  1423. package/dist/src/ui/components/messages/SubagentHistoryMessage.js.map +0 -1
  1424. package/dist/src/ui/components/messages/SubagentProgressDisplay.d.ts +0 -14
  1425. package/dist/src/ui/components/messages/SubagentProgressDisplay.js +0 -81
  1426. package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +0 -1
  1427. package/dist/src/ui/components/messages/ThinkingMessage.d.ts +0 -18
  1428. package/dist/src/ui/components/messages/ThinkingMessage.js +0 -39
  1429. package/dist/src/ui/components/messages/ThinkingMessage.js.map +0 -1
  1430. package/dist/src/ui/components/messages/Todo.d.ts +0 -7
  1431. package/dist/src/ui/components/messages/Todo.js +0 -42
  1432. package/dist/src/ui/components/messages/Todo.js.map +0 -1
  1433. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -18
  1434. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -578
  1435. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  1436. package/dist/src/ui/components/messages/ToolGroupDisplay.d.ts +0 -13
  1437. package/dist/src/ui/components/messages/ToolGroupDisplay.js +0 -79
  1438. package/dist/src/ui/components/messages/ToolGroupDisplay.js.map +0 -1
  1439. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -21
  1440. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -269
  1441. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  1442. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -24
  1443. package/dist/src/ui/components/messages/ToolMessage.js +0 -26
  1444. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  1445. package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +0 -16
  1446. package/dist/src/ui/components/messages/ToolResultDisplay.js +0 -147
  1447. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +0 -1
  1448. package/dist/src/ui/components/messages/ToolShared.d.ts +0 -59
  1449. package/dist/src/ui/components/messages/ToolShared.js +0 -126
  1450. package/dist/src/ui/components/messages/ToolShared.js.map +0 -1
  1451. package/dist/src/ui/components/messages/TopicMessage.d.ts +0 -15
  1452. package/dist/src/ui/components/messages/TopicMessage.js +0 -57
  1453. package/dist/src/ui/components/messages/TopicMessage.js.map +0 -1
  1454. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -12
  1455. package/dist/src/ui/components/messages/UserMessage.js +0 -35
  1456. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  1457. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -12
  1458. package/dist/src/ui/components/messages/UserShellMessage.js +0 -15
  1459. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  1460. package/dist/src/ui/components/messages/WarningMessage.d.ts +0 -11
  1461. package/dist/src/ui/components/messages/WarningMessage.js +0 -11
  1462. package/dist/src/ui/components/messages/WarningMessage.js.map +0 -1
  1463. package/dist/src/ui/components/shared/BaseSelectionList.d.ts +0 -42
  1464. package/dist/src/ui/components/shared/BaseSelectionList.js +0 -98
  1465. package/dist/src/ui/components/shared/BaseSelectionList.js.map +0 -1
  1466. package/dist/src/ui/components/shared/BaseSettingsDialog.d.ts +0 -90
  1467. package/dist/src/ui/components/shared/BaseSettingsDialog.js +0 -282
  1468. package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +0 -1
  1469. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +0 -35
  1470. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +0 -14
  1471. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +0 -1
  1472. package/dist/src/ui/components/shared/DialogFooter.d.ts +0 -21
  1473. package/dist/src/ui/components/shared/DialogFooter.js +0 -18
  1474. package/dist/src/ui/components/shared/DialogFooter.js.map +0 -1
  1475. package/dist/src/ui/components/shared/EnumSelector.d.ts +0 -18
  1476. package/dist/src/ui/components/shared/EnumSelector.js +0 -40
  1477. package/dist/src/ui/components/shared/EnumSelector.js.map +0 -1
  1478. package/dist/src/ui/components/shared/ExpandableText.d.ts +0 -17
  1479. package/dist/src/ui/components/shared/ExpandableText.js +0 -88
  1480. package/dist/src/ui/components/shared/ExpandableText.js.map +0 -1
  1481. package/dist/src/ui/components/shared/HalfLinePaddedBox.d.ts +0 -26
  1482. package/dist/src/ui/components/shared/HalfLinePaddedBox.js +0 -38
  1483. package/dist/src/ui/components/shared/HalfLinePaddedBox.js.map +0 -1
  1484. package/dist/src/ui/components/shared/HorizontalLine.d.ts +0 -12
  1485. package/dist/src/ui/components/shared/HorizontalLine.js +0 -6
  1486. package/dist/src/ui/components/shared/HorizontalLine.js.map +0 -1
  1487. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -25
  1488. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -82
  1489. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  1490. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -51
  1491. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -23
  1492. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  1493. package/dist/src/ui/components/shared/ScopeSelector.d.ts +0 -19
  1494. package/dist/src/ui/components/shared/ScopeSelector.js +0 -15
  1495. package/dist/src/ui/components/shared/ScopeSelector.js.map +0 -1
  1496. package/dist/src/ui/components/shared/Scrollable.d.ts +0 -22
  1497. package/dist/src/ui/components/shared/Scrollable.js +0 -168
  1498. package/dist/src/ui/components/shared/Scrollable.js.map +0 -1
  1499. package/dist/src/ui/components/shared/ScrollableList.d.ts +0 -24
  1500. package/dist/src/ui/components/shared/ScrollableList.js +0 -168
  1501. package/dist/src/ui/components/shared/ScrollableList.js.map +0 -1
  1502. package/dist/src/ui/components/shared/SearchableList.d.ts +0 -61
  1503. package/dist/src/ui/components/shared/SearchableList.js +0 -87
  1504. package/dist/src/ui/components/shared/SearchableList.js.map +0 -1
  1505. package/dist/src/ui/components/shared/SectionHeader.d.ts +0 -10
  1506. package/dist/src/ui/components/shared/SectionHeader.js +0 -6
  1507. package/dist/src/ui/components/shared/SectionHeader.js.map +0 -1
  1508. package/dist/src/ui/components/shared/SlicingMaxSizedBox.d.ts +0 -19
  1509. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js +0 -75
  1510. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js.map +0 -1
  1511. package/dist/src/ui/components/shared/TabHeader.d.ts +0 -51
  1512. package/dist/src/ui/components/shared/TabHeader.js +0 -43
  1513. package/dist/src/ui/components/shared/TabHeader.js.map +0 -1
  1514. package/dist/src/ui/components/shared/TextInput.d.ts +0 -15
  1515. package/dist/src/ui/components/shared/TextInput.js +0 -52
  1516. package/dist/src/ui/components/shared/TextInput.js.map +0 -1
  1517. package/dist/src/ui/components/shared/VirtualizedList.d.ts +0 -56
  1518. package/dist/src/ui/components/shared/VirtualizedList.js +0 -474
  1519. package/dist/src/ui/components/shared/VirtualizedList.js.map +0 -1
  1520. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -868
  1521. package/dist/src/ui/components/shared/text-buffer.js +0 -2771
  1522. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  1523. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +0 -132
  1524. package/dist/src/ui/components/shared/vim-buffer-actions.js +0 -1307
  1525. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +0 -1
  1526. package/dist/src/ui/components/triage/TriageDuplicates.d.ts +0 -11
  1527. package/dist/src/ui/components/triage/TriageDuplicates.js +0 -625
  1528. package/dist/src/ui/components/triage/TriageDuplicates.js.map +0 -1
  1529. package/dist/src/ui/components/triage/TriageIssues.d.ts +0 -12
  1530. package/dist/src/ui/components/triage/TriageIssues.js +0 -381
  1531. package/dist/src/ui/components/triage/TriageIssues.js.map +0 -1
  1532. package/dist/src/ui/components/views/AgentsStatus.d.ts +0 -13
  1533. package/dist/src/ui/components/views/AgentsStatus.js +0 -24
  1534. package/dist/src/ui/components/views/AgentsStatus.js.map +0 -1
  1535. package/dist/src/ui/components/views/ChatList.d.ts +0 -12
  1536. package/dist/src/ui/components/views/ChatList.js +0 -18
  1537. package/dist/src/ui/components/views/ChatList.js.map +0 -1
  1538. package/dist/src/ui/components/views/ExtensionDetails.d.ts +0 -18
  1539. package/dist/src/ui/components/views/ExtensionDetails.js +0 -86
  1540. package/dist/src/ui/components/views/ExtensionDetails.js.map +0 -1
  1541. package/dist/src/ui/components/views/ExtensionRegistryView.d.ts +0 -15
  1542. package/dist/src/ui/components/views/ExtensionRegistryView.js +0 -98
  1543. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +0 -1
  1544. package/dist/src/ui/components/views/ExtensionsList.d.ts +0 -12
  1545. package/dist/src/ui/components/views/ExtensionsList.js +0 -47
  1546. package/dist/src/ui/components/views/ExtensionsList.js.map +0 -1
  1547. package/dist/src/ui/components/views/GemmaStatus.d.ts +0 -10
  1548. package/dist/src/ui/components/views/GemmaStatus.js +0 -12
  1549. package/dist/src/ui/components/views/GemmaStatus.js.map +0 -1
  1550. package/dist/src/ui/components/views/McpStatus.d.ts +0 -28
  1551. package/dist/src/ui/components/views/McpStatus.js +0 -110
  1552. package/dist/src/ui/components/views/McpStatus.js.map +0 -1
  1553. package/dist/src/ui/components/views/SkillsList.d.ts +0 -13
  1554. package/dist/src/ui/components/views/SkillsList.js +0 -19
  1555. package/dist/src/ui/components/views/SkillsList.js.map +0 -1
  1556. package/dist/src/ui/components/views/ToolsList.d.ts +0 -14
  1557. package/dist/src/ui/components/views/ToolsList.js +0 -8
  1558. package/dist/src/ui/components/views/ToolsList.js.map +0 -1
  1559. package/dist/src/ui/constants/tips.d.ts +0 -6
  1560. package/dist/src/ui/constants/tips.js +0 -164
  1561. package/dist/src/ui/constants/tips.js.map +0 -1
  1562. package/dist/src/ui/constants/wittyPhrases.d.ts +0 -6
  1563. package/dist/src/ui/constants/wittyPhrases.js +0 -138
  1564. package/dist/src/ui/constants/wittyPhrases.js.map +0 -1
  1565. package/dist/src/ui/constants.d.ts +0 -42
  1566. package/dist/src/ui/constants.js +0 -61
  1567. package/dist/src/ui/constants.js.map +0 -1
  1568. package/dist/src/ui/contexts/AppContext.d.ts +0 -13
  1569. package/dist/src/ui/contexts/AppContext.js +0 -15
  1570. package/dist/src/ui/contexts/AppContext.js.map +0 -1
  1571. package/dist/src/ui/contexts/AskUserActionsContext.d.ts +0 -42
  1572. package/dist/src/ui/contexts/AskUserActionsContext.js +0 -25
  1573. package/dist/src/ui/contexts/AskUserActionsContext.js.map +0 -1
  1574. package/dist/src/ui/contexts/ConfigContext.d.ts +0 -9
  1575. package/dist/src/ui/contexts/ConfigContext.js +0 -16
  1576. package/dist/src/ui/contexts/ConfigContext.js.map +0 -1
  1577. package/dist/src/ui/contexts/InputContext.d.ts +0 -18
  1578. package/dist/src/ui/contexts/InputContext.js +0 -15
  1579. package/dist/src/ui/contexts/InputContext.js.map +0 -1
  1580. package/dist/src/ui/contexts/KeypressContext.d.ts +0 -37
  1581. package/dist/src/ui/contexts/KeypressContext.js +0 -781
  1582. package/dist/src/ui/contexts/KeypressContext.js.map +0 -1
  1583. package/dist/src/ui/contexts/MouseContext.d.ts +0 -20
  1584. package/dist/src/ui/contexts/MouseContext.js +0 -131
  1585. package/dist/src/ui/contexts/MouseContext.js.map +0 -1
  1586. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  1587. package/dist/src/ui/contexts/OverflowContext.js +0 -67
  1588. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  1589. package/dist/src/ui/contexts/QuotaContext.d.ts +0 -19
  1590. package/dist/src/ui/contexts/QuotaContext.js +0 -15
  1591. package/dist/src/ui/contexts/QuotaContext.js.map +0 -1
  1592. package/dist/src/ui/contexts/ScrollProvider.d.ts +0 -25
  1593. package/dist/src/ui/contexts/ScrollProvider.js +0 -313
  1594. package/dist/src/ui/contexts/ScrollProvider.js.map +0 -1
  1595. package/dist/src/ui/contexts/SessionContext.d.ts +0 -47
  1596. package/dist/src/ui/contexts/SessionContext.js +0 -168
  1597. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  1598. package/dist/src/ui/contexts/SettingsContext.d.ts +0 -17
  1599. package/dist/src/ui/contexts/SettingsContext.js +0 -48
  1600. package/dist/src/ui/contexts/SettingsContext.js.map +0 -1
  1601. package/dist/src/ui/contexts/ShellFocusContext.d.ts +0 -8
  1602. package/dist/src/ui/contexts/ShellFocusContext.js +0 -9
  1603. package/dist/src/ui/contexts/ShellFocusContext.js.map +0 -1
  1604. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  1605. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  1606. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  1607. package/dist/src/ui/contexts/TerminalContext.d.ts +0 -17
  1608. package/dist/src/ui/contexts/TerminalContext.js +0 -71
  1609. package/dist/src/ui/contexts/TerminalContext.js.map +0 -1
  1610. package/dist/src/ui/contexts/ToolActionsContext.d.ts +0 -27
  1611. package/dist/src/ui/contexts/ToolActionsContext.js +0 -97
  1612. package/dist/src/ui/contexts/ToolActionsContext.js.map +0 -1
  1613. package/dist/src/ui/contexts/UIActionsContext.d.ts +0 -83
  1614. package/dist/src/ui/contexts/UIActionsContext.js +0 -22
  1615. package/dist/src/ui/contexts/UIActionsContext.js.map +0 -1
  1616. package/dist/src/ui/contexts/UIStateContext.d.ts +0 -184
  1617. package/dist/src/ui/contexts/UIStateContext.js +0 -18
  1618. package/dist/src/ui/contexts/UIStateContext.js.map +0 -1
  1619. package/dist/src/ui/contexts/VimModeContext.d.ts +0 -17
  1620. package/dist/src/ui/contexts/VimModeContext.js +0 -39
  1621. package/dist/src/ui/contexts/VimModeContext.js.map +0 -1
  1622. package/dist/src/ui/debug.d.ts +0 -8
  1623. package/dist/src/ui/debug.js +0 -11
  1624. package/dist/src/ui/debug.js.map +0 -1
  1625. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -18
  1626. package/dist/src/ui/editors/editorSettingsManager.js +0 -38
  1627. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  1628. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -56
  1629. package/dist/src/ui/hooks/atCommandProcessor.js +0 -558
  1630. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  1631. package/dist/src/ui/hooks/creditsFlowHandler.d.ts +0 -36
  1632. package/dist/src/ui/hooks/creditsFlowHandler.js +0 -158
  1633. package/dist/src/ui/hooks/creditsFlowHandler.js.map +0 -1
  1634. package/dist/src/ui/hooks/shell-completions/gitProvider.d.ts +0 -7
  1635. package/dist/src/ui/hooks/shell-completions/gitProvider.js +0 -73
  1636. package/dist/src/ui/hooks/shell-completions/gitProvider.js.map +0 -1
  1637. package/dist/src/ui/hooks/shell-completions/index.d.ts +0 -7
  1638. package/dist/src/ui/hooks/shell-completions/index.js +0 -16
  1639. package/dist/src/ui/hooks/shell-completions/index.js.map +0 -1
  1640. package/dist/src/ui/hooks/shell-completions/npmProvider.d.ts +0 -7
  1641. package/dist/src/ui/hooks/shell-completions/npmProvider.js +0 -67
  1642. package/dist/src/ui/hooks/shell-completions/npmProvider.js.map +0 -1
  1643. package/dist/src/ui/hooks/shell-completions/types.d.ts +0 -16
  1644. package/dist/src/ui/hooks/shell-completions/types.js +0 -7
  1645. package/dist/src/ui/hooks/shell-completions/types.js.map +0 -1
  1646. package/dist/src/ui/hooks/shellReducer.d.ts +0 -55
  1647. package/dist/src/ui/hooks/shellReducer.js +0 -125
  1648. package/dist/src/ui/hooks/shellReducer.js.map +0 -1
  1649. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -50
  1650. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -560
  1651. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  1652. package/dist/src/ui/hooks/toolMapping.d.ts +0 -18
  1653. package/dist/src/ui/hooks/toolMapping.js +0 -105
  1654. package/dist/src/ui/hooks/toolMapping.js.map +0 -1
  1655. package/dist/src/ui/hooks/useAgentStream.d.ts +0 -44
  1656. package/dist/src/ui/hooks/useAgentStream.js +0 -410
  1657. package/dist/src/ui/hooks/useAgentStream.js.map +0 -1
  1658. package/dist/src/ui/hooks/useAlternateBuffer.d.ts +0 -8
  1659. package/dist/src/ui/hooks/useAlternateBuffer.js +0 -18
  1660. package/dist/src/ui/hooks/useAlternateBuffer.js.map +0 -1
  1661. package/dist/src/ui/hooks/useAnimatedScrollbar.d.ts +0 -10
  1662. package/dist/src/ui/hooks/useAnimatedScrollbar.js +0 -101
  1663. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +0 -1
  1664. package/dist/src/ui/hooks/useApprovalModeIndicator.d.ts +0 -15
  1665. package/dist/src/ui/hooks/useApprovalModeIndicator.js +0 -84
  1666. package/dist/src/ui/hooks/useApprovalModeIndicator.js.map +0 -1
  1667. package/dist/src/ui/hooks/useAtCompletion.d.ts +0 -23
  1668. package/dist/src/ui/hooks/useAtCompletion.js +0 -348
  1669. package/dist/src/ui/hooks/useAtCompletion.js.map +0 -1
  1670. package/dist/src/ui/hooks/useBackgroundTaskManager.d.ts +0 -23
  1671. package/dist/src/ui/hooks/useBackgroundTaskManager.js +0 -58
  1672. package/dist/src/ui/hooks/useBackgroundTaskManager.js.map +0 -1
  1673. package/dist/src/ui/hooks/useBanner.d.ts +0 -14
  1674. package/dist/src/ui/hooks/useBanner.js +0 -56
  1675. package/dist/src/ui/hooks/useBanner.js.map +0 -1
  1676. package/dist/src/ui/hooks/useBatchedScroll.d.ts +0 -14
  1677. package/dist/src/ui/hooks/useBatchedScroll.js +0 -27
  1678. package/dist/src/ui/hooks/useBatchedScroll.js.map +0 -1
  1679. package/dist/src/ui/hooks/useCommandCompletion.d.ts +0 -56
  1680. package/dist/src/ui/hooks/useCommandCompletion.js +0 -344
  1681. package/dist/src/ui/hooks/useCommandCompletion.js.map +0 -1
  1682. package/dist/src/ui/hooks/useCompletion.d.ts +0 -23
  1683. package/dist/src/ui/hooks/useCompletion.js +0 -84
  1684. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  1685. package/dist/src/ui/hooks/useComposerStatus.d.ts +0 -21
  1686. package/dist/src/ui/hooks/useComposerStatus.js +0 -80
  1687. package/dist/src/ui/hooks/useComposerStatus.js.map +0 -1
  1688. package/dist/src/ui/hooks/useConfirmingTool.d.ts +0 -12
  1689. package/dist/src/ui/hooks/useConfirmingTool.js +0 -19
  1690. package/dist/src/ui/hooks/useConfirmingTool.js.map +0 -1
  1691. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -27
  1692. package/dist/src/ui/hooks/useConsoleMessages.js +0 -140
  1693. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  1694. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  1695. package/dist/src/ui/hooks/useEditorSettings.js +0 -46
  1696. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  1697. package/dist/src/ui/hooks/useExecutionLifecycle.d.ts +0 -28
  1698. package/dist/src/ui/hooks/useExecutionLifecycle.js +0 -532
  1699. package/dist/src/ui/hooks/useExecutionLifecycle.js.map +0 -1
  1700. package/dist/src/ui/hooks/useExtensionRegistry.d.ts +0 -13
  1701. package/dist/src/ui/hooks/useExtensionRegistry.js +0 -70
  1702. package/dist/src/ui/hooks/useExtensionRegistry.js.map +0 -1
  1703. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +0 -32
  1704. package/dist/src/ui/hooks/useExtensionUpdates.js +0 -174
  1705. package/dist/src/ui/hooks/useExtensionUpdates.js.map +0 -1
  1706. package/dist/src/ui/hooks/useFlickerDetector.d.ts +0 -15
  1707. package/dist/src/ui/hooks/useFlickerDetector.js +0 -38
  1708. package/dist/src/ui/hooks/useFlickerDetector.js.map +0 -1
  1709. package/dist/src/ui/hooks/useFocus.d.ts +0 -13
  1710. package/dist/src/ui/hooks/useFocus.js +0 -58
  1711. package/dist/src/ui/hooks/useFocus.js.map +0 -1
  1712. package/dist/src/ui/hooks/useFolderTrust.d.ts +0 -16
  1713. package/dist/src/ui/hooks/useFolderTrust.js +0 -105
  1714. package/dist/src/ui/hooks/useFolderTrust.js.map +0 -1
  1715. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -43
  1716. package/dist/src/ui/hooks/useGeminiStream.js +0 -1423
  1717. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  1718. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  1719. package/dist/src/ui/hooks/useGitBranchName.js +0 -78
  1720. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  1721. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -26
  1722. package/dist/src/ui/hooks/useHistoryManager.js +0 -114
  1723. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  1724. package/dist/src/ui/hooks/useHookDisplayState.d.ts +0 -7
  1725. package/dist/src/ui/hooks/useHookDisplayState.js +0 -84
  1726. package/dist/src/ui/hooks/useHookDisplayState.js.map +0 -1
  1727. package/dist/src/ui/hooks/useIdeTrustListener.d.ts +0 -16
  1728. package/dist/src/ui/hooks/useIdeTrustListener.js +0 -67
  1729. package/dist/src/ui/hooks/useIdeTrustListener.js.map +0 -1
  1730. package/dist/src/ui/hooks/useInactivityTimer.d.ts +0 -14
  1731. package/dist/src/ui/hooks/useInactivityTimer.js +0 -30
  1732. package/dist/src/ui/hooks/useInactivityTimer.js.map +0 -1
  1733. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +0 -9
  1734. package/dist/src/ui/hooks/useIncludeDirsTrust.js +0 -111
  1735. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +0 -1
  1736. package/dist/src/ui/hooks/useInlineEditBuffer.d.ts +0 -44
  1737. package/dist/src/ui/hooks/useInlineEditBuffer.js +0 -113
  1738. package/dist/src/ui/hooks/useInlineEditBuffer.js.map +0 -1
  1739. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -20
  1740. package/dist/src/ui/hooks/useInputHistory.js +0 -91
  1741. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  1742. package/dist/src/ui/hooks/useInputHistoryStore.d.ts +0 -19
  1743. package/dist/src/ui/hooks/useInputHistoryStore.js +0 -82
  1744. package/dist/src/ui/hooks/useInputHistoryStore.js.map +0 -1
  1745. package/dist/src/ui/hooks/useKeyMatchers.d.ts +0 -17
  1746. package/dist/src/ui/hooks/useKeyMatchers.js +0 -13
  1747. package/dist/src/ui/hooks/useKeyMatchers.js.map +0 -1
  1748. package/dist/src/ui/hooks/useKeypress.d.ts +0 -19
  1749. package/dist/src/ui/hooks/useKeypress.js +0 -28
  1750. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  1751. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -14
  1752. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -19
  1753. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
  1754. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -23
  1755. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -55
  1756. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  1757. package/dist/src/ui/hooks/useLogger.d.ts +0 -10
  1758. package/dist/src/ui/hooks/useLogger.js +0 -27
  1759. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  1760. package/dist/src/ui/hooks/useMcpStatus.d.ts +0 -11
  1761. package/dist/src/ui/hooks/useMcpStatus.js +0 -34
  1762. package/dist/src/ui/hooks/useMcpStatus.js.map +0 -1
  1763. package/dist/src/ui/hooks/useMemoryMonitor.d.ts +0 -13
  1764. package/dist/src/ui/hooks/useMemoryMonitor.js +0 -28
  1765. package/dist/src/ui/hooks/useMemoryMonitor.js.map +0 -1
  1766. package/dist/src/ui/hooks/useMessageQueue.d.ts +0 -26
  1767. package/dist/src/ui/hooks/useMessageQueue.js +0 -70
  1768. package/dist/src/ui/hooks/useMessageQueue.js.map +0 -1
  1769. package/dist/src/ui/hooks/useModelCommand.d.ts +0 -12
  1770. package/dist/src/ui/hooks/useModelCommand.js +0 -21
  1771. package/dist/src/ui/hooks/useModelCommand.js.map +0 -1
  1772. package/dist/src/ui/hooks/useMouse.d.ts +0 -17
  1773. package/dist/src/ui/hooks/useMouse.js +0 -27
  1774. package/dist/src/ui/hooks/useMouse.js.map +0 -1
  1775. package/dist/src/ui/hooks/useMouseClick.d.ts +0 -13
  1776. package/dist/src/ui/hooks/useMouseClick.js +0 -36
  1777. package/dist/src/ui/hooks/useMouseClick.js.map +0 -1
  1778. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +0 -17
  1779. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +0 -115
  1780. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +0 -1
  1781. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -23
  1782. package/dist/src/ui/hooks/usePhraseCycler.js +0 -142
  1783. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  1784. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  1785. package/dist/src/ui/hooks/usePrivacySettings.js +0 -110
  1786. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  1787. package/dist/src/ui/hooks/usePromptCompletion.d.ts +0 -22
  1788. package/dist/src/ui/hooks/usePromptCompletion.js +0 -169
  1789. package/dist/src/ui/hooks/usePromptCompletion.js.map +0 -1
  1790. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +0 -30
  1791. package/dist/src/ui/hooks/useQuotaAndFallback.js +0 -223
  1792. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +0 -1
  1793. package/dist/src/ui/hooks/useRegistrySearch.d.ts +0 -19
  1794. package/dist/src/ui/hooks/useRegistrySearch.js +0 -35
  1795. package/dist/src/ui/hooks/useRegistrySearch.js.map +0 -1
  1796. package/dist/src/ui/hooks/useRepeatedKeyPress.d.ts +0 -15
  1797. package/dist/src/ui/hooks/useRepeatedKeyPress.js +0 -50
  1798. package/dist/src/ui/hooks/useRepeatedKeyPress.js.map +0 -1
  1799. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +0 -19
  1800. package/dist/src/ui/hooks/useReverseSearchCompletion.js +0 -102
  1801. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +0 -1
  1802. package/dist/src/ui/hooks/useRewind.d.ts +0 -14
  1803. package/dist/src/ui/hooks/useRewind.js +0 -31
  1804. package/dist/src/ui/hooks/useRewind.js.map +0 -1
  1805. package/dist/src/ui/hooks/useRunEventNotifications.d.ts +0 -24
  1806. package/dist/src/ui/hooks/useRunEventNotifications.js +0 -95
  1807. package/dist/src/ui/hooks/useRunEventNotifications.js.map +0 -1
  1808. package/dist/src/ui/hooks/useSearchBuffer.d.ts +0 -11
  1809. package/dist/src/ui/hooks/useSearchBuffer.js +0 -24
  1810. package/dist/src/ui/hooks/useSearchBuffer.js.map +0 -1
  1811. package/dist/src/ui/hooks/useSelectionList.d.ts +0 -38
  1812. package/dist/src/ui/hooks/useSelectionList.js +0 -318
  1813. package/dist/src/ui/hooks/useSelectionList.js.map +0 -1
  1814. package/dist/src/ui/hooks/useSessionBrowser.d.ts +0 -26
  1815. package/dist/src/ui/hooks/useSessionBrowser.js +0 -75
  1816. package/dist/src/ui/hooks/useSessionBrowser.js.map +0 -1
  1817. package/dist/src/ui/hooks/useSessionResume.d.ts +0 -31
  1818. package/dist/src/ui/hooks/useSessionResume.js +0 -75
  1819. package/dist/src/ui/hooks/useSessionResume.js.map +0 -1
  1820. package/dist/src/ui/hooks/useSettingsCommand.d.ts +0 -10
  1821. package/dist/src/ui/hooks/useSettingsCommand.js +0 -21
  1822. package/dist/src/ui/hooks/useSettingsCommand.js.map +0 -1
  1823. package/dist/src/ui/hooks/useSettingsNavigation.d.ts +0 -18
  1824. package/dist/src/ui/hooks/useSettingsNavigation.js +0 -72
  1825. package/dist/src/ui/hooks/useSettingsNavigation.js.map +0 -1
  1826. package/dist/src/ui/hooks/useShellCompletion.d.ts +0 -50
  1827. package/dist/src/ui/hooks/useShellCompletion.js +0 -502
  1828. package/dist/src/ui/hooks/useShellCompletion.js.map +0 -1
  1829. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -14
  1830. package/dist/src/ui/hooks/useShellHistory.js +0 -114
  1831. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  1832. package/dist/src/ui/hooks/useShellInactivityStatus.d.ts +0 -26
  1833. package/dist/src/ui/hooks/useShellInactivityStatus.js +0 -45
  1834. package/dist/src/ui/hooks/useShellInactivityStatus.js.map +0 -1
  1835. package/dist/src/ui/hooks/useSlashCompletion.d.ts +0 -23
  1836. package/dist/src/ui/hooks/useSlashCompletion.js +0 -435
  1837. package/dist/src/ui/hooks/useSlashCompletion.js.map +0 -1
  1838. package/dist/src/ui/hooks/useSnowfall.d.ts +0 -6
  1839. package/dist/src/ui/hooks/useSnowfall.js +0 -126
  1840. package/dist/src/ui/hooks/useSnowfall.js.map +0 -1
  1841. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  1842. package/dist/src/ui/hooks/useStateAndRef.js +0 -27
  1843. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  1844. package/dist/src/ui/hooks/useSuspend.d.ts +0 -14
  1845. package/dist/src/ui/hooks/useSuspend.js +0 -102
  1846. package/dist/src/ui/hooks/useSuspend.js.map +0 -1
  1847. package/dist/src/ui/hooks/useTabbedNavigation.d.ts +0 -53
  1848. package/dist/src/ui/hooks/useTabbedNavigation.js +0 -160
  1849. package/dist/src/ui/hooks/useTabbedNavigation.js.map +0 -1
  1850. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  1851. package/dist/src/ui/hooks/useTerminalSize.js +0 -26
  1852. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  1853. package/dist/src/ui/hooks/useTerminalTheme.d.ts +0 -8
  1854. package/dist/src/ui/hooks/useTerminalTheme.js +0 -79
  1855. package/dist/src/ui/hooks/useTerminalTheme.js.map +0 -1
  1856. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -16
  1857. package/dist/src/ui/hooks/useThemeCommand.js +0 -80
  1858. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  1859. package/dist/src/ui/hooks/useTimedMessage.d.ts +0 -10
  1860. package/dist/src/ui/hooks/useTimedMessage.js +0 -32
  1861. package/dist/src/ui/hooks/useTimedMessage.js.map +0 -1
  1862. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  1863. package/dist/src/ui/hooks/useTimer.js +0 -58
  1864. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  1865. package/dist/src/ui/hooks/useTips.d.ts +0 -10
  1866. package/dist/src/ui/hooks/useTips.js +0 -18
  1867. package/dist/src/ui/hooks/useTips.js.map +0 -1
  1868. package/dist/src/ui/hooks/useToolScheduler.d.ts +0 -48
  1869. package/dist/src/ui/hooks/useToolScheduler.js +0 -213
  1870. package/dist/src/ui/hooks/useToolScheduler.js.map +0 -1
  1871. package/dist/src/ui/hooks/useTurnActivityMonitor.d.ts +0 -20
  1872. package/dist/src/ui/hooks/useTurnActivityMonitor.js +0 -48
  1873. package/dist/src/ui/hooks/useTurnActivityMonitor.js.map +0 -1
  1874. package/dist/src/ui/hooks/useVisibilityToggle.d.ts +0 -12
  1875. package/dist/src/ui/hooks/useVisibilityToggle.js +0 -60
  1876. package/dist/src/ui/hooks/useVisibilityToggle.js.map +0 -1
  1877. package/dist/src/ui/hooks/useVoiceMode.d.ts +0 -28
  1878. package/dist/src/ui/hooks/useVoiceMode.js +0 -339
  1879. package/dist/src/ui/hooks/useVoiceMode.js.map +0 -1
  1880. package/dist/src/ui/hooks/useVoiceModelCommand.d.ts +0 -12
  1881. package/dist/src/ui/hooks/useVoiceModelCommand.js +0 -21
  1882. package/dist/src/ui/hooks/useVoiceModelCommand.js.map +0 -1
  1883. package/dist/src/ui/hooks/vim.d.ts +0 -28
  1884. package/dist/src/ui/hooks/vim.js +0 -1312
  1885. package/dist/src/ui/hooks/vim.js.map +0 -1
  1886. package/dist/src/ui/key/keyBindings.d.ts +0 -137
  1887. package/dist/src/ui/key/keyBindings.js +0 -705
  1888. package/dist/src/ui/key/keyBindings.js.map +0 -1
  1889. package/dist/src/ui/key/keyMatchers.d.ts +0 -34
  1890. package/dist/src/ui/key/keyMatchers.js +0 -43
  1891. package/dist/src/ui/key/keyMatchers.js.map +0 -1
  1892. package/dist/src/ui/key/keyToAnsi.d.ts +0 -15
  1893. package/dist/src/ui/key/keyToAnsi.js +0 -45
  1894. package/dist/src/ui/key/keyToAnsi.js.map +0 -1
  1895. package/dist/src/ui/key/keybindingUtils.d.ts +0 -14
  1896. package/dist/src/ui/key/keybindingUtils.js +0 -86
  1897. package/dist/src/ui/key/keybindingUtils.js.map +0 -1
  1898. package/dist/src/ui/layouts/DefaultAppLayout.d.ts +0 -7
  1899. package/dist/src/ui/layouts/DefaultAppLayout.js +0 -30
  1900. package/dist/src/ui/layouts/DefaultAppLayout.js.map +0 -1
  1901. package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +0 -7
  1902. package/dist/src/ui/layouts/ScreenReaderAppLayout.js +0 -18
  1903. package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +0 -1
  1904. package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +0 -12
  1905. package/dist/src/ui/noninteractive/nonInteractiveUi.js +0 -47
  1906. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +0 -1
  1907. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  1908. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -45
  1909. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  1910. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  1911. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -21
  1912. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  1913. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  1914. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -21
  1915. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  1916. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  1917. package/dist/src/ui/privacy/PrivacyNotice.js +0 -26
  1918. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  1919. package/dist/src/ui/semantic-colors.d.ts +0 -7
  1920. package/dist/src/ui/semantic-colors.js +0 -24
  1921. package/dist/src/ui/semantic-colors.js.map +0 -1
  1922. package/dist/src/ui/state/extensions.d.ts +0 -67
  1923. package/dist/src/ui/state/extensions.js +0 -97
  1924. package/dist/src/ui/state/extensions.js.map +0 -1
  1925. package/dist/src/ui/textConstants.d.ts +0 -14
  1926. package/dist/src/ui/textConstants.js +0 -15
  1927. package/dist/src/ui/textConstants.js.map +0 -1
  1928. package/dist/src/ui/themes/builtin/dark/ansi-dark.d.ts +0 -7
  1929. package/dist/src/ui/themes/builtin/dark/ansi-dark.js +0 -154
  1930. package/dist/src/ui/themes/builtin/dark/ansi-dark.js.map +0 -1
  1931. package/dist/src/ui/themes/builtin/dark/atom-one-dark.d.ts +0 -7
  1932. package/dist/src/ui/themes/builtin/dark/atom-one-dark.js +0 -140
  1933. package/dist/src/ui/themes/builtin/dark/atom-one-dark.js.map +0 -1
  1934. package/dist/src/ui/themes/builtin/dark/ayu-dark.d.ts +0 -7
  1935. package/dist/src/ui/themes/builtin/dark/ayu-dark.js +0 -106
  1936. package/dist/src/ui/themes/builtin/dark/ayu-dark.js.map +0 -1
  1937. package/dist/src/ui/themes/builtin/dark/default-dark.d.ts +0 -7
  1938. package/dist/src/ui/themes/builtin/dark/default-dark.js +0 -143
  1939. package/dist/src/ui/themes/builtin/dark/default-dark.js.map +0 -1
  1940. package/dist/src/ui/themes/builtin/dark/dracula-dark.d.ts +0 -7
  1941. package/dist/src/ui/themes/builtin/dark/dracula-dark.js +0 -117
  1942. package/dist/src/ui/themes/builtin/dark/dracula-dark.js.map +0 -1
  1943. package/dist/src/ui/themes/builtin/dark/github-dark-colorblind.d.ts +0 -7
  1944. package/dist/src/ui/themes/builtin/dark/github-dark-colorblind.js +0 -140
  1945. package/dist/src/ui/themes/builtin/dark/github-dark-colorblind.js.map +0 -1
  1946. package/dist/src/ui/themes/builtin/dark/github-dark.d.ts +0 -7
  1947. package/dist/src/ui/themes/builtin/dark/github-dark.js +0 -140
  1948. package/dist/src/ui/themes/builtin/dark/github-dark.js.map +0 -1
  1949. package/dist/src/ui/themes/builtin/dark/holiday-dark.d.ts +0 -7
  1950. package/dist/src/ui/themes/builtin/dark/holiday-dark.js +0 -163
  1951. package/dist/src/ui/themes/builtin/dark/holiday-dark.js.map +0 -1
  1952. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.d.ts +0 -11
  1953. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js +0 -306
  1954. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js.map +0 -1
  1955. package/dist/src/ui/themes/builtin/dark/solarized-dark.d.ts +0 -7
  1956. package/dist/src/ui/themes/builtin/dark/solarized-dark.js +0 -198
  1957. package/dist/src/ui/themes/builtin/dark/solarized-dark.js.map +0 -1
  1958. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.d.ts +0 -7
  1959. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js +0 -147
  1960. package/dist/src/ui/themes/builtin/dark/tokyonight-dark.js.map +0 -1
  1961. package/dist/src/ui/themes/builtin/light/ansi-light.d.ts +0 -7
  1962. package/dist/src/ui/themes/builtin/light/ansi-light.js +0 -143
  1963. package/dist/src/ui/themes/builtin/light/ansi-light.js.map +0 -1
  1964. package/dist/src/ui/themes/builtin/light/ayu-light.d.ts +0 -7
  1965. package/dist/src/ui/themes/builtin/light/ayu-light.js +0 -132
  1966. package/dist/src/ui/themes/builtin/light/ayu-light.js.map +0 -1
  1967. package/dist/src/ui/themes/builtin/light/default-light.d.ts +0 -7
  1968. package/dist/src/ui/themes/builtin/light/default-light.js +0 -100
  1969. package/dist/src/ui/themes/builtin/light/default-light.js.map +0 -1
  1970. package/dist/src/ui/themes/builtin/light/github-light-colorblind.d.ts +0 -7
  1971. package/dist/src/ui/themes/builtin/light/github-light-colorblind.js +0 -140
  1972. package/dist/src/ui/themes/builtin/light/github-light-colorblind.js.map +0 -1
  1973. package/dist/src/ui/themes/builtin/light/github-light.d.ts +0 -7
  1974. package/dist/src/ui/themes/builtin/light/github-light.js +0 -143
  1975. package/dist/src/ui/themes/builtin/light/github-light.js.map +0 -1
  1976. package/dist/src/ui/themes/builtin/light/googlecode-light.d.ts +0 -7
  1977. package/dist/src/ui/themes/builtin/light/googlecode-light.js +0 -139
  1978. package/dist/src/ui/themes/builtin/light/googlecode-light.js.map +0 -1
  1979. package/dist/src/ui/themes/builtin/light/solarized-light.d.ts +0 -7
  1980. package/dist/src/ui/themes/builtin/light/solarized-light.js +0 -198
  1981. package/dist/src/ui/themes/builtin/light/solarized-light.js.map +0 -1
  1982. package/dist/src/ui/themes/builtin/light/xcode-light.d.ts +0 -7
  1983. package/dist/src/ui/themes/builtin/light/xcode-light.js +0 -148
  1984. package/dist/src/ui/themes/builtin/light/xcode-light.js.map +0 -1
  1985. package/dist/src/ui/themes/builtin/no-color.d.ts +0 -7
  1986. package/dist/src/ui/themes/builtin/no-color.js +0 -125
  1987. package/dist/src/ui/themes/builtin/no-color.js.map +0 -1
  1988. package/dist/src/ui/themes/color-utils.d.ts +0 -45
  1989. package/dist/src/ui/themes/color-utils.js +0 -106
  1990. package/dist/src/ui/themes/color-utils.js.map +0 -1
  1991. package/dist/src/ui/themes/semantic-tokens.d.ts +0 -42
  1992. package/dist/src/ui/themes/semantic-tokens.js +0 -77
  1993. package/dist/src/ui/themes/semantic-tokens.js.map +0 -1
  1994. package/dist/src/ui/themes/theme-manager.d.ts +0 -134
  1995. package/dist/src/ui/themes/theme-manager.js +0 -514
  1996. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  1997. package/dist/src/ui/themes/theme.d.ts +0 -125
  1998. package/dist/src/ui/themes/theme.js +0 -564
  1999. package/dist/src/ui/themes/theme.js.map +0 -1
  2000. package/dist/src/ui/types.d.ts +0 -422
  2001. package/dist/src/ui/types.js +0 -102
  2002. package/dist/src/ui/types.js.map +0 -1
  2003. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -33
  2004. package/dist/src/ui/utils/CodeColorizer.js +0 -131
  2005. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  2006. package/dist/src/ui/utils/ConsolePatcher.d.ts +0 -26
  2007. package/dist/src/ui/utils/ConsolePatcher.js +0 -57
  2008. package/dist/src/ui/utils/ConsolePatcher.js.map +0 -1
  2009. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -12
  2010. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -18
  2011. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  2012. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -15
  2013. package/dist/src/ui/utils/MarkdownDisplay.js +0 -244
  2014. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  2015. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  2016. package/dist/src/ui/utils/TableRenderer.js +0 -162
  2017. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  2018. package/dist/src/ui/utils/antigravityUtils.d.ts +0 -14
  2019. package/dist/src/ui/utils/antigravityUtils.js +0 -41
  2020. package/dist/src/ui/utils/antigravityUtils.js.map +0 -1
  2021. package/dist/src/ui/utils/borderStyles.d.ts +0 -18
  2022. package/dist/src/ui/utils/borderStyles.js +0 -83
  2023. package/dist/src/ui/utils/borderStyles.js.map +0 -1
  2024. package/dist/src/ui/utils/clipboardUtils.d.ts +0 -58
  2025. package/dist/src/ui/utils/clipboardUtils.js +0 -485
  2026. package/dist/src/ui/utils/clipboardUtils.js.map +0 -1
  2027. package/dist/src/ui/utils/commandUtils.d.ts +0 -41
  2028. package/dist/src/ui/utils/commandUtils.js +0 -260
  2029. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  2030. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  2031. package/dist/src/ui/utils/computeStats.js +0 -62
  2032. package/dist/src/ui/utils/computeStats.js.map +0 -1
  2033. package/dist/src/ui/utils/confirmingTool.d.ts +0 -15
  2034. package/dist/src/ui/utils/confirmingTool.js +0 -27
  2035. package/dist/src/ui/utils/confirmingTool.js.map +0 -1
  2036. package/dist/src/ui/utils/contextUsage.d.ts +0 -7
  2037. package/dist/src/ui/utils/contextUsage.js +0 -20
  2038. package/dist/src/ui/utils/contextUsage.js.map +0 -1
  2039. package/dist/src/ui/utils/directoryUtils.d.ts +0 -24
  2040. package/dist/src/ui/utils/directoryUtils.js +0 -125
  2041. package/dist/src/ui/utils/directoryUtils.js.map +0 -1
  2042. package/dist/src/ui/utils/displayUtils.d.ts +0 -29
  2043. package/dist/src/ui/utils/displayUtils.js +0 -43
  2044. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  2045. package/dist/src/ui/utils/editorUtils.d.ts +0 -19
  2046. package/dist/src/ui/utils/editorUtils.js +0 -151
  2047. package/dist/src/ui/utils/editorUtils.js.map +0 -1
  2048. package/dist/src/ui/utils/fileUtils.d.ts +0 -10
  2049. package/dist/src/ui/utils/fileUtils.js +0 -17
  2050. package/dist/src/ui/utils/fileUtils.js.map +0 -1
  2051. package/dist/src/ui/utils/formatters.d.ts +0 -23
  2052. package/dist/src/ui/utils/formatters.js +0 -127
  2053. package/dist/src/ui/utils/formatters.js.map +0 -1
  2054. package/dist/src/ui/utils/highlight.d.ts +0 -12
  2055. package/dist/src/ui/utils/highlight.js +0 -117
  2056. package/dist/src/ui/utils/highlight.js.map +0 -1
  2057. package/dist/src/ui/utils/historyExportUtils.d.ts +0 -21
  2058. package/dist/src/ui/utils/historyExportUtils.js +0 -59
  2059. package/dist/src/ui/utils/historyExportUtils.js.map +0 -1
  2060. package/dist/src/ui/utils/historyUtils.d.ts +0 -15
  2061. package/dist/src/ui/utils/historyUtils.js +0 -71
  2062. package/dist/src/ui/utils/historyUtils.js.map +0 -1
  2063. package/dist/src/ui/utils/inlineThinkingMode.d.ts +0 -8
  2064. package/dist/src/ui/utils/inlineThinkingMode.js +0 -9
  2065. package/dist/src/ui/utils/inlineThinkingMode.js.map +0 -1
  2066. package/dist/src/ui/utils/input.d.ts +0 -17
  2067. package/dist/src/ui/utils/input.js +0 -51
  2068. package/dist/src/ui/utils/input.js.map +0 -1
  2069. package/dist/src/ui/utils/isNarrowWidth.d.ts +0 -6
  2070. package/dist/src/ui/utils/isNarrowWidth.js +0 -9
  2071. package/dist/src/ui/utils/isNarrowWidth.js.map +0 -1
  2072. package/dist/src/ui/utils/latexToUnicode.d.ts +0 -21
  2073. package/dist/src/ui/utils/latexToUnicode.js +0 -538
  2074. package/dist/src/ui/utils/latexToUnicode.js.map +0 -1
  2075. package/dist/src/ui/utils/markdownParsingUtils.d.ts +0 -6
  2076. package/dist/src/ui/utils/markdownParsingUtils.js +0 -185
  2077. package/dist/src/ui/utils/markdownParsingUtils.js.map +0 -1
  2078. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  2079. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  2080. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  2081. package/dist/src/ui/utils/memorySnapshot.d.ts +0 -19
  2082. package/dist/src/ui/utils/memorySnapshot.js +0 -28
  2083. package/dist/src/ui/utils/memorySnapshot.js.map +0 -1
  2084. package/dist/src/ui/utils/mouse.d.ts +0 -34
  2085. package/dist/src/ui/utils/mouse.js +0 -183
  2086. package/dist/src/ui/utils/mouse.js.map +0 -1
  2087. package/dist/src/ui/utils/pendingAttentionNotification.d.ts +0 -12
  2088. package/dist/src/ui/utils/pendingAttentionNotification.js +0 -101
  2089. package/dist/src/ui/utils/pendingAttentionNotification.js.map +0 -1
  2090. package/dist/src/ui/utils/rewindFileOps.d.ts +0 -47
  2091. package/dist/src/ui/utils/rewindFileOps.js +0 -191
  2092. package/dist/src/ui/utils/rewindFileOps.js.map +0 -1
  2093. package/dist/src/ui/utils/shortcutsHelp.d.ts +0 -7
  2094. package/dist/src/ui/utils/shortcutsHelp.js +0 -12
  2095. package/dist/src/ui/utils/shortcutsHelp.js.map +0 -1
  2096. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +0 -59
  2097. package/dist/src/ui/utils/terminalCapabilityManager.js +0 -261
  2098. package/dist/src/ui/utils/terminalCapabilityManager.js.map +0 -1
  2099. package/dist/src/ui/utils/terminalSetup.d.ts +0 -58
  2100. package/dist/src/ui/utils/terminalSetup.js +0 -419
  2101. package/dist/src/ui/utils/terminalSetup.js.map +0 -1
  2102. package/dist/src/ui/utils/terminalUtils.d.ts +0 -23
  2103. package/dist/src/ui/utils/terminalUtils.js +0 -38
  2104. package/dist/src/ui/utils/terminalUtils.js.map +0 -1
  2105. package/dist/src/ui/utils/textOutput.d.ts +0 -28
  2106. package/dist/src/ui/utils/textOutput.js +0 -53
  2107. package/dist/src/ui/utils/textOutput.js.map +0 -1
  2108. package/dist/src/ui/utils/textUtils.d.ts +0 -68
  2109. package/dist/src/ui/utils/textUtils.js +0 -236
  2110. package/dist/src/ui/utils/textUtils.js.map +0 -1
  2111. package/dist/src/ui/utils/toolLayoutUtils.d.ts +0 -49
  2112. package/dist/src/ui/utils/toolLayoutUtils.js +0 -80
  2113. package/dist/src/ui/utils/toolLayoutUtils.js.map +0 -1
  2114. package/dist/src/ui/utils/ui-sizing.d.ts +0 -7
  2115. package/dist/src/ui/utils/ui-sizing.js +0 -13
  2116. package/dist/src/ui/utils/ui-sizing.js.map +0 -1
  2117. package/dist/src/ui/utils/updateCheck.d.ts +0 -20
  2118. package/dist/src/ui/utils/updateCheck.js +0 -96
  2119. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  2120. package/dist/src/ui/utils/urlSecurityUtils.d.ts +0 -32
  2121. package/dist/src/ui/utils/urlSecurityUtils.js +0 -71
  2122. package/dist/src/ui/utils/urlSecurityUtils.js.map +0 -1
  2123. package/dist/src/utils/activityLogger.d.ts +0 -99
  2124. package/dist/src/utils/activityLogger.js +0 -796
  2125. package/dist/src/utils/activityLogger.js.map +0 -1
  2126. package/dist/src/utils/agentSettings.d.ts +0 -24
  2127. package/dist/src/utils/agentSettings.js +0 -45
  2128. package/dist/src/utils/agentSettings.js.map +0 -1
  2129. package/dist/src/utils/agentUtils.d.ts +0 -15
  2130. package/dist/src/utils/agentUtils.js +0 -50
  2131. package/dist/src/utils/agentUtils.js.map +0 -1
  2132. package/dist/src/utils/autoMemory.d.ts +0 -7
  2133. package/dist/src/utils/autoMemory.js +0 -15
  2134. package/dist/src/utils/autoMemory.js.map +0 -1
  2135. package/dist/src/utils/cleanup.d.ts +0 -25
  2136. package/dist/src/utils/cleanup.js +0 -171
  2137. package/dist/src/utils/cleanup.js.map +0 -1
  2138. package/dist/src/utils/commands.d.ts +0 -20
  2139. package/dist/src/utils/commands.js +0 -68
  2140. package/dist/src/utils/commands.js.map +0 -1
  2141. package/dist/src/utils/commentJson.d.ts +0 -9
  2142. package/dist/src/utils/commentJson.js +0 -137
  2143. package/dist/src/utils/commentJson.js.map +0 -1
  2144. package/dist/src/utils/deepMerge.d.ts +0 -9
  2145. package/dist/src/utils/deepMerge.js +0 -65
  2146. package/dist/src/utils/deepMerge.js.map +0 -1
  2147. package/dist/src/utils/devtoolsService.d.ts +0 -30
  2148. package/dist/src/utils/devtoolsService.js +0 -186
  2149. package/dist/src/utils/devtoolsService.js.map +0 -1
  2150. package/dist/src/utils/dialogScopeUtils.d.ts +0 -29
  2151. package/dist/src/utils/dialogScopeUtils.js +0 -50
  2152. package/dist/src/utils/dialogScopeUtils.js.map +0 -1
  2153. package/dist/src/utils/envVarResolver.d.ts +0 -42
  2154. package/dist/src/utils/envVarResolver.js +0 -121
  2155. package/dist/src/utils/envVarResolver.js.map +0 -1
  2156. package/dist/src/utils/errors.d.ts +0 -32
  2157. package/dist/src/utils/errors.js +0 -180
  2158. package/dist/src/utils/errors.js.map +0 -1
  2159. package/dist/src/utils/events.d.ts +0 -34
  2160. package/dist/src/utils/events.js +0 -23
  2161. package/dist/src/utils/events.js.map +0 -1
  2162. package/dist/src/utils/featureToggleUtils.d.ts +0 -55
  2163. package/dist/src/utils/featureToggleUtils.js +0 -95
  2164. package/dist/src/utils/featureToggleUtils.js.map +0 -1
  2165. package/dist/src/utils/gitUtils.d.ts +0 -30
  2166. package/dist/src/utils/gitUtils.js +0 -110
  2167. package/dist/src/utils/gitUtils.js.map +0 -1
  2168. package/dist/src/utils/handleAutoUpdate.d.ts +0 -19
  2169. package/dist/src/utils/handleAutoUpdate.js +0 -179
  2170. package/dist/src/utils/handleAutoUpdate.js.map +0 -1
  2171. package/dist/src/utils/hookSettings.d.ts +0 -30
  2172. package/dist/src/utils/hookSettings.js +0 -114
  2173. package/dist/src/utils/hookSettings.js.map +0 -1
  2174. package/dist/src/utils/hookUtils.d.ts +0 -12
  2175. package/dist/src/utils/hookUtils.js +0 -51
  2176. package/dist/src/utils/hookUtils.js.map +0 -1
  2177. package/dist/src/utils/installationInfo.d.ts +0 -26
  2178. package/dist/src/utils/installationInfo.js +0 -187
  2179. package/dist/src/utils/installationInfo.js.map +0 -1
  2180. package/dist/src/utils/jsonoutput.d.ts +0 -7
  2181. package/dist/src/utils/jsonoutput.js +0 -42
  2182. package/dist/src/utils/jsonoutput.js.map +0 -1
  2183. package/dist/src/utils/logCleanup.d.ts +0 -12
  2184. package/dist/src/utils/logCleanup.js +0 -58
  2185. package/dist/src/utils/logCleanup.js.map +0 -1
  2186. package/dist/src/utils/math.d.ts +0 -13
  2187. package/dist/src/utils/math.js +0 -14
  2188. package/dist/src/utils/math.js.map +0 -1
  2189. package/dist/src/utils/persistentState.d.ts +0 -24
  2190. package/dist/src/utils/persistentState.js +0 -66
  2191. package/dist/src/utils/persistentState.js.map +0 -1
  2192. package/dist/src/utils/processUtils.d.ts +0 -41
  2193. package/dist/src/utils/processUtils.js +0 -99
  2194. package/dist/src/utils/processUtils.js.map +0 -1
  2195. package/dist/src/utils/readStdin.d.ts +0 -6
  2196. package/dist/src/utils/readStdin.js +0 -87
  2197. package/dist/src/utils/readStdin.js.map +0 -1
  2198. package/dist/src/utils/relaunch.d.ts +0 -8
  2199. package/dist/src/utils/relaunch.js +0 -61
  2200. package/dist/src/utils/relaunch.js.map +0 -1
  2201. package/dist/src/utils/resize-observer-polyfill.d.ts +0 -2
  2202. package/dist/src/utils/resize-observer-polyfill.js +0 -7
  2203. package/dist/src/utils/resize-observer-polyfill.js.map +0 -1
  2204. package/dist/src/utils/resolvePath.d.ts +0 -6
  2205. package/dist/src/utils/resolvePath.js +0 -21
  2206. package/dist/src/utils/resolvePath.js.map +0 -1
  2207. package/dist/src/utils/sandbox.d.ts +0 -7
  2208. package/dist/src/utils/sandbox.js +0 -927
  2209. package/dist/src/utils/sandbox.js.map +0 -1
  2210. package/dist/src/utils/sandboxUtils.d.ts +0 -14
  2211. package/dist/src/utils/sandboxUtils.js +0 -126
  2212. package/dist/src/utils/sandboxUtils.js.map +0 -1
  2213. package/dist/src/utils/sessionCleanup.d.ts +0 -41
  2214. package/dist/src/utils/sessionCleanup.js +0 -481
  2215. package/dist/src/utils/sessionCleanup.js.map +0 -1
  2216. package/dist/src/utils/sessionUtils.d.ts +0 -174
  2217. package/dist/src/utils/sessionUtils.js +0 -465
  2218. package/dist/src/utils/sessionUtils.js.map +0 -1
  2219. package/dist/src/utils/sessions.d.ts +0 -8
  2220. package/dist/src/utils/sessions.js +0 -67
  2221. package/dist/src/utils/sessions.js.map +0 -1
  2222. package/dist/src/utils/settingsUtils.d.ts +0 -78
  2223. package/dist/src/utils/settingsUtils.js +0 -284
  2224. package/dist/src/utils/settingsUtils.js.map +0 -1
  2225. package/dist/src/utils/skillSettings.d.ts +0 -23
  2226. package/dist/src/utils/skillSettings.js +0 -52
  2227. package/dist/src/utils/skillSettings.js.map +0 -1
  2228. package/dist/src/utils/skillUtils.d.ts +0 -37
  2229. package/dist/src/utils/skillUtils.js +0 -232
  2230. package/dist/src/utils/skillUtils.js.map +0 -1
  2231. package/dist/src/utils/spawnWrapper.d.ts +0 -8
  2232. package/dist/src/utils/spawnWrapper.js +0 -8
  2233. package/dist/src/utils/spawnWrapper.js.map +0 -1
  2234. package/dist/src/utils/startupWarnings.d.ts +0 -6
  2235. package/dist/src/utils/startupWarnings.js +0 -40
  2236. package/dist/src/utils/startupWarnings.js.map +0 -1
  2237. package/dist/src/utils/terminalNotifications.d.ts +0 -32
  2238. package/dist/src/utils/terminalNotifications.js +0 -131
  2239. package/dist/src/utils/terminalNotifications.js.map +0 -1
  2240. package/dist/src/utils/terminalTheme.d.ts +0 -15
  2241. package/dist/src/utils/terminalTheme.js +0 -50
  2242. package/dist/src/utils/terminalTheme.js.map +0 -1
  2243. package/dist/src/utils/tierUtils.d.ts +0 -12
  2244. package/dist/src/utils/tierUtils.js +0 -15
  2245. package/dist/src/utils/tierUtils.js.map +0 -1
  2246. package/dist/src/utils/updateEventEmitter.d.ts +0 -12
  2247. package/dist/src/utils/updateEventEmitter.js +0 -12
  2248. package/dist/src/utils/updateEventEmitter.js.map +0 -1
  2249. package/dist/src/utils/userStartupWarnings.d.ts +0 -10
  2250. package/dist/src/utils/userStartupWarnings.js +0 -103
  2251. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  2252. package/dist/src/utils/windowTitle.d.ts +0 -22
  2253. package/dist/src/utils/windowTitle.js +0 -84
  2254. package/dist/src/utils/windowTitle.js.map +0 -1
  2255. package/dist/src/utils/worktreeSetup.d.ts +0 -14
  2256. package/dist/src/utils/worktreeSetup.js +0 -32
  2257. package/dist/src/utils/worktreeSetup.js.map +0 -1
  2258. package/dist/src/validateNonInterActiveAuth.d.ts +0 -8
  2259. package/dist/src/validateNonInterActiveAuth.js +0 -45
  2260. package/dist/src/validateNonInterActiveAuth.js.map +0 -1
  2261. package/dist/tsconfig.tsbuildinfo +0 -1
  2262. /package/dist/{src/commands → commands}/extensions/examples/custom-commands/gemini-extension.json +0 -0
  2263. /package/dist/{src/commands → commands}/extensions/examples/exclude-tools/gemini-extension.json +0 -0
  2264. /package/dist/{src/commands → commands}/extensions/examples/hooks/gemini-extension.json +0 -0
  2265. /package/dist/{src/commands → commands}/extensions/examples/hooks/hooks/hooks.json +0 -0
  2266. /package/dist/{src/commands → commands}/extensions/examples/mcp-server/gemini-extension.json +0 -0
  2267. /package/dist/{src/commands → commands}/extensions/examples/mcp-server/package.json +0 -0
  2268. /package/dist/{src/commands → commands}/extensions/examples/policies/gemini-extension.json +0 -0
  2269. /package/dist/{src/commands → commands}/extensions/examples/skills/gemini-extension.json +0 -0
  2270. /package/dist/{src/commands → commands}/extensions/examples/themes-example/gemini-extension.json +0 -0
  2271. /package/dist/{src/config/extension-manager-themes.spec.d.ts → services/types.js} +0 -0
@@ -1,2771 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import fs from 'node:fs';
7
- import os from 'node:os';
8
- import pathMod from 'node:path';
9
- import * as path from 'node:path';
10
- import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
11
- import { LRUCache } from 'mnemonist';
12
- import { coreEvents, debugLogger, getErrorMessage, unescapePath, } from '@google/gemini-cli-core';
13
- import { toCodePoints, cpLen, cpSlice, stripUnsafeCharacters, getCachedStringWidth, } from '../../utils/textUtils.js';
14
- import { parsePastedPaths } from '../../utils/clipboardUtils.js';
15
- import { Command } from '../../key/keyMatchers.js';
16
- import { handleVimAction } from './vim-buffer-actions.js';
17
- import { LRU_BUFFER_PERF_CACHE_LIMIT } from '../../constants.js';
18
- import { openFileInEditor } from '../../utils/editorUtils.js';
19
- import { useSettings } from '../../contexts/SettingsContext.js';
20
- import { useKeyMatchers } from '../../hooks/useKeyMatchers.js';
21
- export const LARGE_PASTE_LINE_THRESHOLD = 5;
22
- export const LARGE_PASTE_CHAR_THRESHOLD = 500;
23
- // Regex to match paste placeholders like [Pasted Text: 6 lines] or [Pasted Text: 501 chars #2]
24
- export const PASTED_TEXT_PLACEHOLDER_REGEX = /\[Pasted Text: \d+ (?:lines|chars)(?: #\d+)?\]/g;
25
- // Replace paste placeholder strings with their actual pasted content.
26
- export function expandPastePlaceholders(text, pastedContent) {
27
- return text.replace(PASTED_TEXT_PLACEHOLDER_REGEX, (match) => pastedContent[match] || match);
28
- }
29
- // Helper functions for line-based word navigation
30
- export const isWordCharStrict = (char) => /[\w\p{L}\p{N}]/u.test(char); // Matches a single character that is any Unicode letter, any Unicode number, or an underscore
31
- export const isWhitespace = (char) => /\s/.test(char);
32
- // Check if a character is a combining mark (only diacritics for now)
33
- export const isCombiningMark = (char) => /\p{M}/u.test(char);
34
- // Check if a character should be considered part of a word (including combining marks)
35
- export const isWordCharWithCombining = (char) => isWordCharStrict(char) || isCombiningMark(char);
36
- // Get the script of a character (simplified for common scripts)
37
- export const getCharScript = (char) => {
38
- if (/[\p{Script=Latin}]/u.test(char))
39
- return 'latin'; // All Latin script chars including diacritics
40
- if (/[\p{Script=Han}]/u.test(char))
41
- return 'han'; // Chinese
42
- if (/[\p{Script=Arabic}]/u.test(char))
43
- return 'arabic';
44
- if (/[\p{Script=Hiragana}]/u.test(char))
45
- return 'hiragana';
46
- if (/[\p{Script=Katakana}]/u.test(char))
47
- return 'katakana';
48
- if (/[\p{Script=Cyrillic}]/u.test(char))
49
- return 'cyrillic';
50
- return 'other';
51
- };
52
- // Check if two characters are from different scripts (indicating word boundary)
53
- export const isDifferentScript = (char1, char2) => {
54
- if (!isWordCharStrict(char1) || !isWordCharStrict(char2))
55
- return false;
56
- return getCharScript(char1) !== getCharScript(char2);
57
- };
58
- // Find next word start within a line, starting from col
59
- export const findNextWordStartInLine = (line, col) => {
60
- const chars = toCodePoints(line);
61
- let i = col;
62
- if (i >= chars.length)
63
- return null;
64
- const currentChar = chars[i];
65
- // Skip current word/sequence based on character type
66
- if (isWordCharStrict(currentChar)) {
67
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
68
- // Check for script boundary - if next character is from different script, stop here
69
- if (i + 1 < chars.length &&
70
- isWordCharStrict(chars[i + 1]) &&
71
- isDifferentScript(chars[i], chars[i + 1])) {
72
- i++; // Include current character
73
- break; // Stop at script boundary
74
- }
75
- i++;
76
- }
77
- }
78
- else if (!isWhitespace(currentChar)) {
79
- while (i < chars.length &&
80
- !isWordCharStrict(chars[i]) &&
81
- !isWhitespace(chars[i])) {
82
- i++;
83
- }
84
- }
85
- // Skip whitespace
86
- while (i < chars.length && isWhitespace(chars[i])) {
87
- i++;
88
- }
89
- return i < chars.length ? i : null;
90
- };
91
- // Find previous word start within a line
92
- export const findPrevWordStartInLine = (line, col) => {
93
- const chars = toCodePoints(line);
94
- let i = col;
95
- if (i <= 0)
96
- return null;
97
- i--;
98
- // Skip whitespace moving backwards
99
- while (i >= 0 && isWhitespace(chars[i])) {
100
- i--;
101
- }
102
- if (i < 0)
103
- return null;
104
- if (isWordCharStrict(chars[i])) {
105
- // We're in a word, move to its beginning
106
- while (i >= 0 && isWordCharStrict(chars[i])) {
107
- // Check for script boundary - if previous character is from different script, stop here
108
- if (i - 1 >= 0 &&
109
- isWordCharStrict(chars[i - 1]) &&
110
- isDifferentScript(chars[i], chars[i - 1])) {
111
- return i; // Return current position at script boundary
112
- }
113
- i--;
114
- }
115
- return i + 1;
116
- }
117
- else {
118
- // We're in punctuation, move to its beginning
119
- while (i >= 0 && !isWordCharStrict(chars[i]) && !isWhitespace(chars[i])) {
120
- i--;
121
- }
122
- return i + 1;
123
- }
124
- };
125
- // Find word end within a line
126
- export const findWordEndInLine = (line, col) => {
127
- const chars = toCodePoints(line);
128
- let i = col;
129
- // If we're already at the end of a word (including punctuation sequences), advance to next word
130
- // This includes both regular word endings and script boundaries
131
- let nextBaseCharIdx = i + 1;
132
- while (nextBaseCharIdx < chars.length &&
133
- isCombiningMark(chars[nextBaseCharIdx])) {
134
- nextBaseCharIdx++;
135
- }
136
- const atEndOfWordChar = i < chars.length &&
137
- isWordCharWithCombining(chars[i]) &&
138
- (nextBaseCharIdx >= chars.length ||
139
- !isWordCharStrict(chars[nextBaseCharIdx]) ||
140
- (isWordCharStrict(chars[i]) &&
141
- isDifferentScript(chars[i], chars[nextBaseCharIdx])));
142
- const atEndOfPunctuation = i < chars.length &&
143
- !isWordCharWithCombining(chars[i]) &&
144
- !isWhitespace(chars[i]) &&
145
- (i + 1 >= chars.length ||
146
- isWhitespace(chars[i + 1]) ||
147
- isWordCharWithCombining(chars[i + 1]));
148
- if (atEndOfWordChar || atEndOfPunctuation) {
149
- // We're at the end of a word or punctuation sequence, move forward to find next word
150
- i++;
151
- // Skip any combining marks that belong to the word we just finished
152
- while (i < chars.length && isCombiningMark(chars[i])) {
153
- i++;
154
- }
155
- // Skip whitespace to find next word or punctuation
156
- while (i < chars.length && isWhitespace(chars[i])) {
157
- i++;
158
- }
159
- }
160
- // If we're not on a word character, find the next word or punctuation sequence
161
- if (i < chars.length && !isWordCharWithCombining(chars[i])) {
162
- // Skip whitespace to find next word or punctuation
163
- while (i < chars.length && isWhitespace(chars[i])) {
164
- i++;
165
- }
166
- }
167
- // Move to end of current word (including combining marks, but stop at script boundaries)
168
- let foundWord = false;
169
- let lastBaseCharPos = -1;
170
- if (i < chars.length && isWordCharWithCombining(chars[i])) {
171
- // Handle word characters
172
- while (i < chars.length && isWordCharWithCombining(chars[i])) {
173
- foundWord = true;
174
- // Track the position of the last base character (not combining mark)
175
- if (isWordCharStrict(chars[i])) {
176
- lastBaseCharPos = i;
177
- }
178
- // Check if next character is from a different script (word boundary)
179
- if (i + 1 < chars.length &&
180
- isWordCharStrict(chars[i + 1]) &&
181
- isDifferentScript(chars[i], chars[i + 1])) {
182
- i++; // Include current character
183
- if (isWordCharStrict(chars[i - 1])) {
184
- lastBaseCharPos = i - 1;
185
- }
186
- break; // Stop at script boundary
187
- }
188
- i++;
189
- }
190
- }
191
- else if (i < chars.length && !isWhitespace(chars[i])) {
192
- // Handle punctuation sequences (like ████)
193
- while (i < chars.length &&
194
- !isWordCharStrict(chars[i]) &&
195
- !isWhitespace(chars[i])) {
196
- foundWord = true;
197
- lastBaseCharPos = i;
198
- i++;
199
- }
200
- }
201
- // Only return a position if we actually found a word
202
- // Return the position of the last base character, not combining marks
203
- if (foundWord && lastBaseCharPos >= col) {
204
- return lastBaseCharPos;
205
- }
206
- return null;
207
- };
208
- // Find next big word start within a line (W)
209
- export const findNextBigWordStartInLine = (line, col) => {
210
- const chars = toCodePoints(line);
211
- let i = col;
212
- if (i >= chars.length)
213
- return null;
214
- // If currently on non-whitespace, skip it
215
- if (!isWhitespace(chars[i])) {
216
- while (i < chars.length && !isWhitespace(chars[i])) {
217
- i++;
218
- }
219
- }
220
- // Skip whitespace
221
- while (i < chars.length && isWhitespace(chars[i])) {
222
- i++;
223
- }
224
- return i < chars.length ? i : null;
225
- };
226
- // Find previous big word start within a line (B)
227
- export const findPrevBigWordStartInLine = (line, col) => {
228
- const chars = toCodePoints(line);
229
- let i = col;
230
- if (i <= 0)
231
- return null;
232
- i--;
233
- // Skip whitespace moving backwards
234
- while (i >= 0 && isWhitespace(chars[i])) {
235
- i--;
236
- }
237
- if (i < 0)
238
- return null;
239
- // We're in a big word, move to its beginning
240
- while (i >= 0 && !isWhitespace(chars[i])) {
241
- i--;
242
- }
243
- return i + 1;
244
- };
245
- // Find big word end within a line (E)
246
- export const findBigWordEndInLine = (line, col) => {
247
- const chars = toCodePoints(line);
248
- let i = col;
249
- // If we're already at the end of a big word, advance to next
250
- const atEndOfBigWord = i < chars.length &&
251
- !isWhitespace(chars[i]) &&
252
- (i + 1 >= chars.length || isWhitespace(chars[i + 1]));
253
- if (atEndOfBigWord) {
254
- i++;
255
- }
256
- // Skip whitespace
257
- while (i < chars.length && isWhitespace(chars[i])) {
258
- i++;
259
- }
260
- // Move to end of current big word
261
- if (i < chars.length && !isWhitespace(chars[i])) {
262
- while (i < chars.length && !isWhitespace(chars[i])) {
263
- i++;
264
- }
265
- return i - 1;
266
- }
267
- return null;
268
- };
269
- // Initialize segmenter for word boundary detection
270
- const segmenter = new Intl.Segmenter(undefined, { granularity: 'word' });
271
- function findPrevWordBoundary(line, cursorCol) {
272
- const codePoints = toCodePoints(line);
273
- // Convert cursorCol (CP index) to string index
274
- const prefix = codePoints.slice(0, cursorCol).join('');
275
- const cursorIdx = prefix.length;
276
- let targetIdx = 0;
277
- for (const seg of segmenter.segment(line)) {
278
- // We want the last word start strictly before the cursor.
279
- // If we've reached or passed the cursor, we stop.
280
- if (seg.index >= cursorIdx)
281
- break;
282
- if (seg.isWordLike) {
283
- targetIdx = seg.index;
284
- }
285
- }
286
- return toCodePoints(line.slice(0, targetIdx)).length;
287
- }
288
- function findNextWordBoundary(line, cursorCol) {
289
- const codePoints = toCodePoints(line);
290
- const prefix = codePoints.slice(0, cursorCol).join('');
291
- const cursorIdx = prefix.length;
292
- let targetIdx = line.length;
293
- for (const seg of segmenter.segment(line)) {
294
- const segEnd = seg.index + seg.segment.length;
295
- if (segEnd > cursorIdx) {
296
- if (seg.isWordLike) {
297
- targetIdx = segEnd;
298
- break;
299
- }
300
- }
301
- }
302
- return toCodePoints(line.slice(0, targetIdx)).length;
303
- }
304
- // Find next word across lines
305
- export const findNextWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
306
- // First try current line
307
- const currentLine = lines[cursorRow] || '';
308
- const colInCurrentLine = searchForWordStart
309
- ? findNextWordStartInLine(currentLine, cursorCol)
310
- : findWordEndInLine(currentLine, cursorCol);
311
- if (colInCurrentLine !== null) {
312
- return { row: cursorRow, col: colInCurrentLine };
313
- }
314
- let firstEmptyRow = null;
315
- // Search subsequent lines
316
- for (let row = cursorRow + 1; row < lines.length; row++) {
317
- const line = lines[row] || '';
318
- const chars = toCodePoints(line);
319
- // For empty lines, if we haven't found any words yet, remember the first empty line
320
- if (chars.length === 0) {
321
- if (firstEmptyRow === null) {
322
- firstEmptyRow = row;
323
- }
324
- continue;
325
- }
326
- // Find first non-whitespace
327
- let firstNonWhitespace = 0;
328
- while (firstNonWhitespace < chars.length &&
329
- isWhitespace(chars[firstNonWhitespace])) {
330
- firstNonWhitespace++;
331
- }
332
- if (firstNonWhitespace < chars.length) {
333
- if (searchForWordStart) {
334
- return { row, col: firstNonWhitespace };
335
- }
336
- else {
337
- // For word end, find the end of the first word
338
- const endCol = findWordEndInLine(line, firstNonWhitespace);
339
- if (endCol !== null) {
340
- return { row, col: endCol };
341
- }
342
- }
343
- }
344
- }
345
- // If no words in later lines, return the first empty line we found
346
- if (firstEmptyRow !== null) {
347
- return { row: firstEmptyRow, col: 0 };
348
- }
349
- return null;
350
- };
351
- // Find previous word across lines
352
- export const findPrevWordAcrossLines = (lines, cursorRow, cursorCol) => {
353
- // First try current line
354
- const currentLine = lines[cursorRow] || '';
355
- const colInCurrentLine = findPrevWordStartInLine(currentLine, cursorCol);
356
- if (colInCurrentLine !== null) {
357
- return { row: cursorRow, col: colInCurrentLine };
358
- }
359
- // Search previous lines
360
- for (let row = cursorRow - 1; row >= 0; row--) {
361
- const line = lines[row] || '';
362
- const chars = toCodePoints(line);
363
- if (chars.length === 0)
364
- continue;
365
- // Find last word start
366
- let lastWordStart = chars.length;
367
- while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
368
- lastWordStart--;
369
- }
370
- if (lastWordStart > 0) {
371
- // Find start of this word
372
- const wordStart = findPrevWordStartInLine(line, lastWordStart);
373
- if (wordStart !== null) {
374
- return { row, col: wordStart };
375
- }
376
- }
377
- }
378
- return null;
379
- };
380
- // Find next big word across lines
381
- export const findNextBigWordAcrossLines = (lines, cursorRow, cursorCol, searchForWordStart) => {
382
- // First try current line
383
- const currentLine = lines[cursorRow] || '';
384
- const colInCurrentLine = searchForWordStart
385
- ? findNextBigWordStartInLine(currentLine, cursorCol)
386
- : findBigWordEndInLine(currentLine, cursorCol);
387
- if (colInCurrentLine !== null) {
388
- return { row: cursorRow, col: colInCurrentLine };
389
- }
390
- let firstEmptyRow = null;
391
- // Search subsequent lines
392
- for (let row = cursorRow + 1; row < lines.length; row++) {
393
- const line = lines[row] || '';
394
- const chars = toCodePoints(line);
395
- // For empty lines, if we haven't found any words yet, remember the first empty line
396
- if (chars.length === 0) {
397
- if (firstEmptyRow === null) {
398
- firstEmptyRow = row;
399
- }
400
- continue;
401
- }
402
- // Find first non-whitespace
403
- let firstNonWhitespace = 0;
404
- while (firstNonWhitespace < chars.length &&
405
- isWhitespace(chars[firstNonWhitespace])) {
406
- firstNonWhitespace++;
407
- }
408
- if (firstNonWhitespace < chars.length) {
409
- // Found a non-whitespace character (start of a big word)
410
- if (searchForWordStart) {
411
- return { row, col: firstNonWhitespace };
412
- }
413
- else {
414
- const endCol = findBigWordEndInLine(line, firstNonWhitespace);
415
- if (endCol !== null) {
416
- return { row, col: endCol };
417
- }
418
- }
419
- }
420
- }
421
- // If no words in later lines, return the first empty line we found
422
- if (firstEmptyRow !== null) {
423
- return { row: firstEmptyRow, col: 0 };
424
- }
425
- return null;
426
- };
427
- // Find previous big word across lines
428
- export const findPrevBigWordAcrossLines = (lines, cursorRow, cursorCol) => {
429
- // First try current line
430
- const currentLine = lines[cursorRow] || '';
431
- const colInCurrentLine = findPrevBigWordStartInLine(currentLine, cursorCol);
432
- if (colInCurrentLine !== null) {
433
- return { row: cursorRow, col: colInCurrentLine };
434
- }
435
- // Search previous lines
436
- for (let row = cursorRow - 1; row >= 0; row--) {
437
- const line = lines[row] || '';
438
- const chars = toCodePoints(line);
439
- if (chars.length === 0)
440
- continue;
441
- // Find last big word start
442
- let lastWordStart = chars.length;
443
- while (lastWordStart > 0 && isWhitespace(chars[lastWordStart - 1])) {
444
- lastWordStart--;
445
- }
446
- if (lastWordStart > 0) {
447
- const wordStart = findPrevBigWordStartInLine(line, lastWordStart);
448
- if (wordStart !== null) {
449
- return { row, col: wordStart };
450
- }
451
- }
452
- }
453
- return null;
454
- };
455
- // Helper functions for vim line operations
456
- export const getPositionFromOffsets = (startOffset, endOffset, lines) => {
457
- let offset = 0;
458
- let startRow = 0;
459
- let startCol = 0;
460
- let endRow = 0;
461
- let endCol = 0;
462
- // Find start position
463
- for (let i = 0; i < lines.length; i++) {
464
- const lineLength = lines[i].length + 1; // +1 for newline
465
- if (offset + lineLength > startOffset) {
466
- startRow = i;
467
- startCol = startOffset - offset;
468
- break;
469
- }
470
- offset += lineLength;
471
- }
472
- // Find end position
473
- offset = 0;
474
- for (let i = 0; i < lines.length; i++) {
475
- const lineLength = lines[i].length + (i < lines.length - 1 ? 1 : 0); // +1 for newline except last line
476
- if (offset + lineLength >= endOffset) {
477
- endRow = i;
478
- endCol = endOffset - offset;
479
- break;
480
- }
481
- offset += lineLength;
482
- }
483
- return { startRow, startCol, endRow, endCol };
484
- };
485
- export const getLineRangeOffsets = (startRow, lineCount, lines) => {
486
- let startOffset = 0;
487
- // Calculate start offset
488
- for (let i = 0; i < startRow; i++) {
489
- startOffset += lines[i].length + 1; // +1 for newline
490
- }
491
- // Calculate end offset
492
- let endOffset = startOffset;
493
- for (let i = 0; i < lineCount; i++) {
494
- const lineIndex = startRow + i;
495
- if (lineIndex < lines.length) {
496
- endOffset += lines[lineIndex].length;
497
- if (lineIndex < lines.length - 1) {
498
- endOffset += 1; // +1 for newline
499
- }
500
- }
501
- }
502
- return { startOffset, endOffset };
503
- };
504
- export const replaceRangeInternal = (state, startRow, startCol, endRow, endCol, text) => {
505
- const currentLine = (row) => state.lines[row] || '';
506
- const currentLineLen = (row) => cpLen(currentLine(row));
507
- const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
508
- if (startRow > endRow ||
509
- (startRow === endRow && startCol > endCol) ||
510
- startRow < 0 ||
511
- startCol < 0 ||
512
- endRow >= state.lines.length ||
513
- (endRow < state.lines.length && endCol > currentLineLen(endRow))) {
514
- return state; // Invalid range
515
- }
516
- const newLines = [...state.lines];
517
- const sCol = clamp(startCol, 0, currentLineLen(startRow));
518
- const eCol = clamp(endCol, 0, currentLineLen(endRow));
519
- const prefix = cpSlice(currentLine(startRow), 0, sCol);
520
- const suffix = cpSlice(currentLine(endRow), eCol);
521
- const normalisedReplacement = text
522
- .replace(/\r\n/g, '\n')
523
- .replace(/\r/g, '\n');
524
- const replacementParts = normalisedReplacement.split('\n');
525
- // The combined first line of the new text
526
- const firstLine = prefix + replacementParts[0];
527
- if (replacementParts.length === 1) {
528
- // No newlines in replacement: combine prefix, replacement, and suffix on one line.
529
- newLines.splice(startRow, endRow - startRow + 1, firstLine + suffix);
530
- }
531
- else {
532
- // Newlines in replacement: create new lines.
533
- const lastLine = replacementParts[replacementParts.length - 1] + suffix;
534
- const middleLines = replacementParts.slice(1, -1);
535
- newLines.splice(startRow, endRow - startRow + 1, firstLine, ...middleLines, lastLine);
536
- }
537
- const finalCursorRow = startRow + replacementParts.length - 1;
538
- const finalCursorCol = (replacementParts.length > 1 ? 0 : sCol) +
539
- cpLen(replacementParts[replacementParts.length - 1]);
540
- return {
541
- ...state,
542
- lines: newLines,
543
- cursorRow: Math.min(Math.max(finalCursorRow, 0), newLines.length - 1),
544
- cursorCol: Math.max(0, Math.min(finalCursorCol, cpLen(newLines[finalCursorRow] || ''))),
545
- preferredCol: null,
546
- };
547
- };
548
- function clamp(v, min, max) {
549
- return v < min ? min : v > max ? max : v;
550
- }
551
- function calculateInitialCursorPosition(initialLines, offset) {
552
- let remainingChars = offset;
553
- let row = 0;
554
- while (row < initialLines.length) {
555
- const lineLength = cpLen(initialLines[row]);
556
- // Add 1 for the newline character (except for the last line)
557
- const totalCharsInLineAndNewline = lineLength + (row < initialLines.length - 1 ? 1 : 0);
558
- if (remainingChars <= lineLength) {
559
- // Cursor is on this line
560
- return [row, remainingChars];
561
- }
562
- remainingChars -= totalCharsInLineAndNewline;
563
- row++;
564
- }
565
- // Offset is beyond the text, place cursor at the end of the last line
566
- if (initialLines.length > 0) {
567
- const lastRow = initialLines.length - 1;
568
- return [lastRow, cpLen(initialLines[lastRow])];
569
- }
570
- return [0, 0]; // Default for empty text
571
- }
572
- export function offsetToLogicalPos(text, offset) {
573
- let row = 0;
574
- let col = 0;
575
- let currentOffset = 0;
576
- if (offset === 0)
577
- return [0, 0];
578
- const lines = text.split('\n');
579
- for (let i = 0; i < lines.length; i++) {
580
- const line = lines[i];
581
- const lineLength = cpLen(line);
582
- const lineLengthWithNewline = lineLength + (i < lines.length - 1 ? 1 : 0);
583
- if (offset <= currentOffset + lineLength) {
584
- // Check against lineLength first
585
- row = i;
586
- col = offset - currentOffset;
587
- return [row, col];
588
- }
589
- else if (offset <= currentOffset + lineLengthWithNewline) {
590
- // Check if offset is the newline itself
591
- row = i;
592
- col = lineLength; // Position cursor at the end of the current line content
593
- // If the offset IS the newline, and it's not the last line, advance to next line, col 0
594
- if (offset === currentOffset + lineLengthWithNewline &&
595
- i < lines.length - 1) {
596
- return [i + 1, 0];
597
- }
598
- return [row, col]; // Otherwise, it's at the end of the current line content
599
- }
600
- currentOffset += lineLengthWithNewline;
601
- }
602
- // If offset is beyond the text length, place cursor at the end of the last line
603
- // or [0,0] if text is empty
604
- if (lines.length > 0) {
605
- row = lines.length - 1;
606
- col = cpLen(lines[row]);
607
- }
608
- else {
609
- row = 0;
610
- col = 0;
611
- }
612
- return [row, col];
613
- }
614
- /**
615
- * Converts logical row/col position to absolute text offset
616
- * Inverse operation of offsetToLogicalPos
617
- */
618
- export function logicalPosToOffset(lines, row, col) {
619
- let offset = 0;
620
- // Clamp row to valid range
621
- const actualRow = Math.min(row, lines.length - 1);
622
- // Add lengths of all lines before the target row
623
- for (let i = 0; i < actualRow; i++) {
624
- offset += cpLen(lines[i]) + 1; // +1 for newline
625
- }
626
- // Add column offset within the target row
627
- if (actualRow >= 0 && actualRow < lines.length) {
628
- offset += Math.min(col, cpLen(lines[actualRow]));
629
- }
630
- return offset;
631
- }
632
- export const imagePathRegex = /@((?:\\.|[^\s\r\n\\])+?\.(?:png|jpg|jpeg|gif|webp|svg|bmp))\b/gi;
633
- export function getTransformedImagePath(filePath) {
634
- const raw = filePath;
635
- // Ignore leading @ when stripping directories, but keep it for simple '@file.png'
636
- const withoutAt = raw.startsWith('@') ? raw.slice(1) : raw;
637
- // Unescape the path to handle escaped spaces and other characters
638
- const unescaped = unescapePath(withoutAt);
639
- // Find last directory separator, supporting both POSIX and Windows styles
640
- const lastSepIndex = Math.max(unescaped.lastIndexOf('/'), unescaped.lastIndexOf('\\'));
641
- // If we saw a separator, take the segment after it; otherwise fall back to the unescaped string
642
- const fileName = lastSepIndex >= 0 ? unescaped.slice(lastSepIndex + 1) : unescaped;
643
- const extension = path.extname(fileName);
644
- const baseName = path.basename(fileName, extension);
645
- const maxBaseLength = 10;
646
- const truncatedBase = baseName.length > maxBaseLength
647
- ? `...${baseName.slice(-maxBaseLength)}`
648
- : baseName;
649
- return `[Image ${truncatedBase}${extension}]`;
650
- }
651
- const transformationsCache = new LRUCache(LRU_BUFFER_PERF_CACHE_LIMIT);
652
- export function calculateTransformationsForLine(line) {
653
- const cached = transformationsCache.get(line);
654
- if (cached) {
655
- return cached;
656
- }
657
- const transformations = [];
658
- // 1. Detect image paths
659
- imagePathRegex.lastIndex = 0;
660
- let match;
661
- while ((match = imagePathRegex.exec(line)) !== null) {
662
- const logicalText = match[0];
663
- const logStart = cpLen(line.substring(0, match.index));
664
- const logEnd = logStart + cpLen(logicalText);
665
- transformations.push({
666
- logStart,
667
- logEnd,
668
- logicalText,
669
- collapsedText: getTransformedImagePath(logicalText),
670
- type: 'image',
671
- });
672
- }
673
- // 2. Detect paste placeholders
674
- const pasteRegex = new RegExp(PASTED_TEXT_PLACEHOLDER_REGEX.source, 'g');
675
- while ((match = pasteRegex.exec(line)) !== null) {
676
- const logicalText = match[0];
677
- const logStart = cpLen(line.substring(0, match.index));
678
- const logEnd = logStart + cpLen(logicalText);
679
- transformations.push({
680
- logStart,
681
- logEnd,
682
- logicalText,
683
- collapsedText: logicalText,
684
- type: 'paste',
685
- id: logicalText,
686
- });
687
- }
688
- // Sort transformations by logStart to maintain consistency
689
- transformations.sort((a, b) => a.logStart - b.logStart);
690
- transformationsCache.set(line, transformations);
691
- return transformations;
692
- }
693
- export function calculateTransformations(lines) {
694
- return lines.map((ln) => calculateTransformationsForLine(ln));
695
- }
696
- export function getTransformUnderCursor(row, col, spansByLine, options = {}) {
697
- const spans = spansByLine[row];
698
- if (!spans || spans.length === 0)
699
- return null;
700
- for (const span of spans) {
701
- if (col >= span.logStart &&
702
- (options.includeEdge ? col <= span.logEnd : col < span.logEnd)) {
703
- return span;
704
- }
705
- if (col < span.logStart)
706
- break;
707
- }
708
- return null;
709
- }
710
- /**
711
- * Check if a line index falls within an expanded paste region.
712
- * Returns the paste placeholder ID if found, null otherwise.
713
- */
714
- export function getExpandedPasteAtLine(lineIndex, expandedPaste) {
715
- if (expandedPaste &&
716
- lineIndex >= expandedPaste.startLine &&
717
- lineIndex < expandedPaste.startLine + expandedPaste.lineCount) {
718
- return expandedPaste.id;
719
- }
720
- return null;
721
- }
722
- /**
723
- * Surgery for expanded paste regions when lines are added or removed.
724
- * Adjusts startLine indices and detaches any region that is partially or fully deleted.
725
- */
726
- export function shiftExpandedRegions(expandedPaste, changeStartLine, lineDelta, changeEndLine) {
727
- if (!expandedPaste)
728
- return { newInfo: null, isDetached: false };
729
- const effectiveEndLine = changeEndLine ?? changeStartLine;
730
- const infoEndLine = expandedPaste.startLine + expandedPaste.lineCount - 1;
731
- // 1. Check for overlap/intersection with the changed range
732
- const isOverlapping = changeStartLine <= infoEndLine &&
733
- effectiveEndLine >= expandedPaste.startLine;
734
- if (isOverlapping) {
735
- // If the change is a deletion (lineDelta < 0) that touches this region, we detach.
736
- // If it's an insertion, we only detach if it's a multi-line insertion (lineDelta > 0)
737
- // that isn't at the very start of the region (which would shift it).
738
- // Regular character typing (lineDelta === 0) does NOT detach.
739
- if (lineDelta < 0 ||
740
- (lineDelta > 0 &&
741
- changeStartLine > expandedPaste.startLine &&
742
- changeStartLine <= infoEndLine)) {
743
- return { newInfo: null, isDetached: true };
744
- }
745
- }
746
- // 2. Shift regions that start at or after the change point
747
- if (expandedPaste.startLine >= changeStartLine) {
748
- return {
749
- newInfo: {
750
- ...expandedPaste,
751
- startLine: expandedPaste.startLine + lineDelta,
752
- },
753
- isDetached: false,
754
- };
755
- }
756
- return { newInfo: expandedPaste, isDetached: false };
757
- }
758
- /**
759
- * Detach any expanded paste region if the cursor is within it.
760
- * This converts the expanded content to regular text that can no longer be collapsed.
761
- * Returns the state unchanged if cursor is not in an expanded region.
762
- */
763
- export function detachExpandedPaste(state) {
764
- const expandedId = getExpandedPasteAtLine(state.cursorRow, state.expandedPaste);
765
- if (!expandedId)
766
- return state;
767
- const { [expandedId]: _, ...newPastedContent } = state.pastedContent;
768
- return {
769
- ...state,
770
- expandedPaste: null,
771
- pastedContent: newPastedContent,
772
- };
773
- }
774
- /**
775
- * Find atomic placeholder at cursor for backspace (cursor at end).
776
- * Checks all placeholder types in priority order.
777
- */
778
- function findAtomicPlaceholderForBackspace(line, cursorCol, transformations) {
779
- for (const transform of transformations) {
780
- if (cursorCol === transform.logEnd) {
781
- return {
782
- start: transform.logStart,
783
- end: transform.logEnd,
784
- type: transform.type,
785
- id: transform.id,
786
- };
787
- }
788
- }
789
- return null;
790
- }
791
- /**
792
- * Find atomic placeholder at cursor for delete (cursor at start).
793
- */
794
- function findAtomicPlaceholderForDelete(line, cursorCol, transformations) {
795
- for (const transform of transformations) {
796
- if (cursorCol === transform.logStart) {
797
- return {
798
- start: transform.logStart,
799
- end: transform.logEnd,
800
- type: transform.type,
801
- id: transform.id,
802
- };
803
- }
804
- }
805
- return null;
806
- }
807
- export function calculateTransformedLine(logLine, logIndex, logicalCursor, transformations) {
808
- let transformedLine = '';
809
- const transformedToLogMap = [];
810
- let lastLogPos = 0;
811
- const cursorIsOnThisLine = logIndex === logicalCursor[0];
812
- const cursorCol = logicalCursor[1];
813
- for (const transform of transformations) {
814
- const textBeforeTransformation = cpSlice(logLine, lastLogPos, transform.logStart);
815
- transformedLine += textBeforeTransformation;
816
- for (let i = 0; i < cpLen(textBeforeTransformation); i++) {
817
- transformedToLogMap.push(lastLogPos + i);
818
- }
819
- const isExpanded = transform.type === 'image' &&
820
- cursorIsOnThisLine &&
821
- cursorCol >= transform.logStart &&
822
- cursorCol <= transform.logEnd;
823
- const transformedText = isExpanded
824
- ? transform.logicalText
825
- : transform.collapsedText;
826
- transformedLine += transformedText;
827
- // Map transformed characters back to logical characters
828
- const transformedLen = cpLen(transformedText);
829
- if (isExpanded) {
830
- for (let i = 0; i < transformedLen; i++) {
831
- transformedToLogMap.push(transform.logStart + i);
832
- }
833
- }
834
- else {
835
- // Collapsed: distribute transformed positions monotonically across the raw span.
836
- // This preserves ordering across wrapped slices so logicalToVisualMap has
837
- // increasing startColInLogical and visual cursor mapping remains consistent.
838
- const logicalLength = Math.max(0, transform.logEnd - transform.logStart);
839
- for (let i = 0; i < transformedLen; i++) {
840
- // Map the i-th transformed code point into [logStart, logEnd)
841
- const transformationToLogicalOffset = logicalLength === 0
842
- ? 0
843
- : Math.floor((i * logicalLength) / transformedLen);
844
- const transformationToLogicalIndex = transform.logStart +
845
- Math.min(transformationToLogicalOffset, Math.max(logicalLength - 1, 0));
846
- transformedToLogMap.push(transformationToLogicalIndex);
847
- }
848
- }
849
- lastLogPos = transform.logEnd;
850
- }
851
- // Append text after last transform
852
- const remainingUntransformedText = cpSlice(logLine, lastLogPos);
853
- transformedLine += remainingUntransformedText;
854
- for (let i = 0; i < cpLen(remainingUntransformedText); i++) {
855
- transformedToLogMap.push(lastLogPos + i);
856
- }
857
- // For a cursor at the very end of the transformed line
858
- transformedToLogMap.push(cpLen(logLine));
859
- return { transformedLine, transformedToLogMap };
860
- }
861
- const lineLayoutCache = new LRUCache(LRU_BUFFER_PERF_CACHE_LIMIT);
862
- function getLineLayoutCacheKey(line, viewportWidth, isCursorOnLine, cursorCol) {
863
- // Most lines (99.9% in a large buffer) are not cursor lines.
864
- // We use a simpler key for them to reduce string allocation overhead.
865
- if (!isCursorOnLine) {
866
- return `${viewportWidth}:N:${line}`;
867
- }
868
- return `${viewportWidth}:C:${cursorCol}:${line}`;
869
- }
870
- // Calculates the visual wrapping of lines and the mapping between logical and visual coordinates.
871
- // This is an expensive operation and should be memoized.
872
- function calculateLayout(logicalLines, viewportWidth, logicalCursor) {
873
- const visualLines = [];
874
- const logicalToVisualMap = [];
875
- const visualToLogicalMap = [];
876
- const transformedToLogicalMaps = [];
877
- const visualToTransformedMap = [];
878
- logicalLines.forEach((logLine, logIndex) => {
879
- logicalToVisualMap[logIndex] = [];
880
- const isCursorOnLine = logIndex === logicalCursor[0];
881
- const cacheKey = getLineLayoutCacheKey(logLine, viewportWidth, isCursorOnLine, logicalCursor[1]);
882
- const cached = lineLayoutCache.get(cacheKey);
883
- if (cached) {
884
- const visualLineOffset = visualLines.length;
885
- visualLines.push(...cached.visualLines);
886
- cached.logicalToVisualMap.forEach(([relVisualIdx, logCol]) => {
887
- logicalToVisualMap[logIndex].push([
888
- visualLineOffset + relVisualIdx,
889
- logCol,
890
- ]);
891
- });
892
- cached.visualToLogicalMap.forEach(([, logCol]) => {
893
- visualToLogicalMap.push([logIndex, logCol]);
894
- });
895
- transformedToLogicalMaps[logIndex] = cached.transformedToLogMap;
896
- visualToTransformedMap.push(...cached.visualToTransformedMap);
897
- return;
898
- }
899
- // Not in cache, calculate
900
- const transformations = calculateTransformationsForLine(logLine);
901
- const { transformedLine, transformedToLogMap } = calculateTransformedLine(logLine, logIndex, logicalCursor, transformations);
902
- const lineVisualLines = [];
903
- const lineLogicalToVisualMap = [];
904
- const lineVisualToLogicalMap = [];
905
- const lineVisualToTransformedMap = [];
906
- if (transformedLine.length === 0) {
907
- // Handle empty logical line
908
- lineLogicalToVisualMap.push([0, 0]);
909
- lineVisualToLogicalMap.push([logIndex, 0]);
910
- lineVisualToTransformedMap.push(0);
911
- lineVisualLines.push('');
912
- }
913
- else {
914
- // Non-empty logical line
915
- let currentPosInLogLine = 0; // Tracks position within the current logical line (code point index)
916
- const codePointsInLogLine = toCodePoints(transformedLine);
917
- while (currentPosInLogLine < codePointsInLogLine.length) {
918
- let currentChunk = '';
919
- let currentChunkVisualWidth = 0;
920
- let numCodePointsInChunk = 0;
921
- let lastWordBreakPoint = -1; // Index in codePointsInLogLine for word break
922
- let numCodePointsAtLastWordBreak = 0;
923
- // Iterate through code points to build the current visual line (chunk)
924
- for (let i = currentPosInLogLine; i < codePointsInLogLine.length; i++) {
925
- const char = codePointsInLogLine[i];
926
- const charVisualWidth = getCachedStringWidth(char);
927
- if (currentChunkVisualWidth + charVisualWidth > viewportWidth) {
928
- // Character would exceed viewport width
929
- if (lastWordBreakPoint !== -1 &&
930
- numCodePointsAtLastWordBreak > 0 &&
931
- currentPosInLogLine + numCodePointsAtLastWordBreak < i) {
932
- // We have a valid word break point to use, and it's not the start of the current segment
933
- currentChunk = codePointsInLogLine
934
- .slice(currentPosInLogLine, currentPosInLogLine + numCodePointsAtLastWordBreak)
935
- .join('');
936
- numCodePointsInChunk = numCodePointsAtLastWordBreak;
937
- }
938
- else {
939
- // No word break, or word break is at the start of this potential chunk, or word break leads to empty chunk.
940
- // Hard break: take characters up to viewportWidth, or just the current char if it alone is too wide.
941
- if (numCodePointsInChunk === 0 &&
942
- charVisualWidth > viewportWidth) {
943
- // Single character is wider than viewport, take it anyway
944
- currentChunk = char;
945
- numCodePointsInChunk = 1;
946
- }
947
- }
948
- break; // Break from inner loop to finalize this chunk
949
- }
950
- currentChunk += char;
951
- currentChunkVisualWidth += charVisualWidth;
952
- numCodePointsInChunk++;
953
- // Check for word break opportunity (space)
954
- if (char === ' ') {
955
- lastWordBreakPoint = i; // Store code point index of the space
956
- // Store the state *before* adding the space, if we decide to break here.
957
- numCodePointsAtLastWordBreak = numCodePointsInChunk - 1; // Chars *before* the space
958
- }
959
- }
960
- if (numCodePointsInChunk === 0 &&
961
- currentPosInLogLine < codePointsInLogLine.length) {
962
- const firstChar = codePointsInLogLine[currentPosInLogLine];
963
- currentChunk = firstChar;
964
- numCodePointsInChunk = 1;
965
- }
966
- const logicalStartCol = transformedToLogMap[currentPosInLogLine] ?? 0;
967
- lineLogicalToVisualMap.push([lineVisualLines.length, logicalStartCol]);
968
- lineVisualToLogicalMap.push([logIndex, logicalStartCol]);
969
- lineVisualToTransformedMap.push(currentPosInLogLine);
970
- lineVisualLines.push(currentChunk);
971
- const logicalStartOfThisChunk = currentPosInLogLine;
972
- currentPosInLogLine += numCodePointsInChunk;
973
- if (logicalStartOfThisChunk + numCodePointsInChunk <
974
- codePointsInLogLine.length &&
975
- currentPosInLogLine < codePointsInLogLine.length &&
976
- codePointsInLogLine[currentPosInLogLine] === ' ') {
977
- currentPosInLogLine++;
978
- }
979
- }
980
- }
981
- // Cache the result for this line
982
- lineLayoutCache.set(cacheKey, {
983
- visualLines: lineVisualLines,
984
- logicalToVisualMap: lineLogicalToVisualMap,
985
- visualToLogicalMap: lineVisualToLogicalMap,
986
- transformedToLogMap,
987
- visualToTransformedMap: lineVisualToTransformedMap,
988
- });
989
- const visualLineOffset = visualLines.length;
990
- visualLines.push(...lineVisualLines);
991
- lineLogicalToVisualMap.forEach(([relVisualIdx, logCol]) => {
992
- logicalToVisualMap[logIndex].push([
993
- visualLineOffset + relVisualIdx,
994
- logCol,
995
- ]);
996
- });
997
- lineVisualToLogicalMap.forEach(([, logCol]) => {
998
- visualToLogicalMap.push([logIndex, logCol]);
999
- });
1000
- transformedToLogicalMaps[logIndex] = transformedToLogMap;
1001
- visualToTransformedMap.push(...lineVisualToTransformedMap);
1002
- });
1003
- // If the entire logical text was empty, ensure there's one empty visual line.
1004
- if (logicalLines.length === 0 ||
1005
- (logicalLines.length === 1 && logicalLines[0] === '')) {
1006
- if (visualLines.length === 0) {
1007
- visualLines.push('');
1008
- if (!logicalToVisualMap[0])
1009
- logicalToVisualMap[0] = [];
1010
- logicalToVisualMap[0].push([0, 0]);
1011
- visualToLogicalMap.push([0, 0]);
1012
- visualToTransformedMap.push(0);
1013
- }
1014
- }
1015
- return {
1016
- visualLines,
1017
- logicalToVisualMap,
1018
- visualToLogicalMap,
1019
- transformedToLogicalMaps,
1020
- visualToTransformedMap,
1021
- };
1022
- }
1023
- // Calculates the visual cursor position based on a pre-calculated layout.
1024
- // This is a lightweight operation.
1025
- function calculateVisualCursorFromLayout(layout, logicalCursor) {
1026
- const { logicalToVisualMap, visualLines, transformedToLogicalMaps } = layout;
1027
- const [logicalRow, logicalCol] = logicalCursor;
1028
- const segmentsForLogicalLine = logicalToVisualMap[logicalRow];
1029
- if (!segmentsForLogicalLine || segmentsForLogicalLine.length === 0) {
1030
- // This can happen for an empty document.
1031
- return [0, 0];
1032
- }
1033
- // Find the segment where the logical column fits.
1034
- // The segments are sorted by startColInLogical.
1035
- let targetSegmentIndex = segmentsForLogicalLine.findIndex(([, startColInLogical], index) => {
1036
- const nextStartColInLogical = index + 1 < segmentsForLogicalLine.length
1037
- ? segmentsForLogicalLine[index + 1][1]
1038
- : Infinity;
1039
- return (logicalCol >= startColInLogical && logicalCol < nextStartColInLogical);
1040
- });
1041
- // If not found, it means the cursor is at the end of the logical line.
1042
- if (targetSegmentIndex === -1) {
1043
- if (logicalCol === 0) {
1044
- targetSegmentIndex = 0;
1045
- }
1046
- else {
1047
- targetSegmentIndex = segmentsForLogicalLine.length - 1;
1048
- }
1049
- }
1050
- const [visualRow, startColInLogical] = segmentsForLogicalLine[targetSegmentIndex];
1051
- // Find the coordinates in transformed space in order to conver to visual
1052
- const transformedToLogicalMap = transformedToLogicalMaps[logicalRow] ?? [];
1053
- let transformedCol = 0;
1054
- for (let i = 0; i < transformedToLogicalMap.length; i++) {
1055
- if (transformedToLogicalMap[i] > logicalCol) {
1056
- transformedCol = Math.max(0, i - 1);
1057
- break;
1058
- }
1059
- if (i === transformedToLogicalMap.length - 1) {
1060
- transformedCol = transformedToLogicalMap.length - 1;
1061
- }
1062
- }
1063
- let startColInTransformed = 0;
1064
- while (startColInTransformed < transformedToLogicalMap.length &&
1065
- transformedToLogicalMap[startColInTransformed] < startColInLogical) {
1066
- startColInTransformed++;
1067
- }
1068
- const clampedTransformedCol = Math.min(transformedCol, Math.max(0, transformedToLogicalMap.length - 1));
1069
- const visualCol = clampedTransformedCol - startColInTransformed;
1070
- const clampedVisualCol = Math.min(Math.max(visualCol, 0), cpLen(visualLines[visualRow] ?? ''));
1071
- return [visualRow, clampedVisualCol];
1072
- }
1073
- const historyLimit = 100;
1074
- export const pushUndo = (currentState) => {
1075
- const snapshot = {
1076
- lines: [...currentState.lines],
1077
- cursorRow: currentState.cursorRow,
1078
- cursorCol: currentState.cursorCol,
1079
- pastedContent: { ...currentState.pastedContent },
1080
- expandedPaste: currentState.expandedPaste
1081
- ? { ...currentState.expandedPaste }
1082
- : null,
1083
- };
1084
- const newStack = [...currentState.undoStack, snapshot];
1085
- if (newStack.length > historyLimit) {
1086
- newStack.shift();
1087
- }
1088
- return { ...currentState, undoStack: newStack, redoStack: [] };
1089
- };
1090
- function generatePastedTextId(content, lineCount, pastedContent) {
1091
- const base = lineCount > LARGE_PASTE_LINE_THRESHOLD
1092
- ? `[Pasted Text: ${lineCount} lines]`
1093
- : `[Pasted Text: ${content.length} chars]`;
1094
- let id = base;
1095
- let suffix = 2;
1096
- while (pastedContent[id]) {
1097
- id = base.replace(']', ` #${suffix}]`);
1098
- suffix++;
1099
- }
1100
- return id;
1101
- }
1102
- function collectPlaceholderIdsFromLines(lines) {
1103
- const ids = new Set();
1104
- const pasteRegex = new RegExp(PASTED_TEXT_PLACEHOLDER_REGEX.source, 'g');
1105
- for (const line of lines) {
1106
- if (!line)
1107
- continue;
1108
- for (const match of line.matchAll(pasteRegex)) {
1109
- const placeholderId = match[0];
1110
- if (placeholderId) {
1111
- ids.add(placeholderId);
1112
- }
1113
- }
1114
- }
1115
- return ids;
1116
- }
1117
- function pruneOrphanedPastedContent(pastedContent, expandedPasteId, beforeChangedLines, allLines) {
1118
- if (Object.keys(pastedContent).length === 0)
1119
- return pastedContent;
1120
- const beforeIds = collectPlaceholderIdsFromLines(beforeChangedLines);
1121
- if (beforeIds.size === 0)
1122
- return pastedContent;
1123
- const afterIds = collectPlaceholderIdsFromLines(allLines);
1124
- const removedIds = [...beforeIds].filter((id) => !afterIds.has(id) && id !== expandedPasteId);
1125
- if (removedIds.length === 0)
1126
- return pastedContent;
1127
- const pruned = { ...pastedContent };
1128
- for (const id of removedIds) {
1129
- if (pruned[id]) {
1130
- delete pruned[id];
1131
- }
1132
- }
1133
- return pruned;
1134
- }
1135
- function textBufferReducerLogic(state, action, options = {}) {
1136
- const pushUndoLocal = pushUndo;
1137
- const currentLine = (r) => state.lines[r] ?? '';
1138
- const currentLineLen = (r) => cpLen(currentLine(r));
1139
- switch (action.type) {
1140
- case 'set_text': {
1141
- let nextState = state;
1142
- if (action.pushToUndo !== false) {
1143
- nextState = pushUndoLocal(state);
1144
- }
1145
- const newContentLines = action.payload
1146
- .replace(/\r\n?/g, '\n')
1147
- .split('\n');
1148
- const lines = newContentLines.length === 0 ? [''] : newContentLines;
1149
- let newCursorRow;
1150
- let newCursorCol;
1151
- if (typeof action.cursorPosition === 'number') {
1152
- [newCursorRow, newCursorCol] = offsetToLogicalPos(action.payload, action.cursorPosition);
1153
- }
1154
- else if (action.cursorPosition === 'start') {
1155
- newCursorRow = 0;
1156
- newCursorCol = 0;
1157
- }
1158
- else {
1159
- // Default to 'end'
1160
- newCursorRow = lines.length - 1;
1161
- newCursorCol = cpLen(lines[newCursorRow] ?? '');
1162
- }
1163
- return {
1164
- ...nextState,
1165
- lines,
1166
- cursorRow: newCursorRow,
1167
- cursorCol: newCursorCol,
1168
- preferredCol: null,
1169
- pastedContent: action.payload === '' ? {} : nextState.pastedContent,
1170
- };
1171
- }
1172
- case 'insert': {
1173
- const nextState = detachExpandedPaste(pushUndoLocal(state));
1174
- const newLines = [...nextState.lines];
1175
- let newCursorRow = nextState.cursorRow;
1176
- let newCursorCol = nextState.cursorCol;
1177
- const currentLine = (r) => newLines[r] ?? '';
1178
- let payload = action.payload;
1179
- let newPastedContent = nextState.pastedContent;
1180
- if (action.isPaste) {
1181
- // Normalize line endings for pastes
1182
- payload = payload.replace(/\r\n|\r/g, '\n');
1183
- const lineCount = payload.split('\n').length;
1184
- if (lineCount > LARGE_PASTE_LINE_THRESHOLD ||
1185
- payload.length > LARGE_PASTE_CHAR_THRESHOLD) {
1186
- const id = generatePastedTextId(payload, lineCount, newPastedContent);
1187
- newPastedContent = {
1188
- ...newPastedContent,
1189
- [id]: payload,
1190
- };
1191
- payload = id;
1192
- }
1193
- }
1194
- if (options.singleLine) {
1195
- payload = payload.replace(/[\r\n]/g, '');
1196
- }
1197
- if (options.inputFilter) {
1198
- payload = options.inputFilter(payload);
1199
- }
1200
- if (payload.length === 0) {
1201
- return state;
1202
- }
1203
- const str = stripUnsafeCharacters(payload.replace(/\r\n/g, '\n').replace(/\r/g, '\n'));
1204
- const parts = str.split('\n');
1205
- const lineContent = currentLine(newCursorRow);
1206
- const before = cpSlice(lineContent, 0, newCursorCol);
1207
- const after = cpSlice(lineContent, newCursorCol);
1208
- let lineDelta = 0;
1209
- if (parts.length > 1) {
1210
- newLines[newCursorRow] = before + parts[0];
1211
- const remainingParts = parts.slice(1);
1212
- const lastPartOriginal = remainingParts.pop() ?? '';
1213
- newLines.splice(newCursorRow + 1, 0, ...remainingParts);
1214
- newLines.splice(newCursorRow + parts.length - 1, 0, lastPartOriginal + after);
1215
- lineDelta = parts.length - 1;
1216
- newCursorRow = newCursorRow + parts.length - 1;
1217
- newCursorCol = cpLen(lastPartOriginal);
1218
- }
1219
- else {
1220
- newLines[newCursorRow] = before + parts[0] + after;
1221
- newCursorCol = cpLen(before) + cpLen(parts[0]);
1222
- }
1223
- const { newInfo: newExpandedPaste, isDetached } = shiftExpandedRegions(nextState.expandedPaste, nextState.cursorRow, lineDelta);
1224
- if (isDetached && newExpandedPaste === null && nextState.expandedPaste) {
1225
- delete newPastedContent[nextState.expandedPaste.id];
1226
- }
1227
- return {
1228
- ...nextState,
1229
- lines: newLines,
1230
- cursorRow: newCursorRow,
1231
- cursorCol: newCursorCol,
1232
- preferredCol: null,
1233
- pastedContent: newPastedContent,
1234
- expandedPaste: newExpandedPaste,
1235
- };
1236
- }
1237
- case 'add_pasted_content': {
1238
- const { id, text } = action.payload;
1239
- return {
1240
- ...state,
1241
- pastedContent: {
1242
- ...state.pastedContent,
1243
- [id]: text,
1244
- },
1245
- };
1246
- }
1247
- case 'backspace': {
1248
- const stateWithUndo = pushUndoLocal(state);
1249
- const currentState = detachExpandedPaste(stateWithUndo);
1250
- const { cursorRow, cursorCol, lines, transformationsByLine } = currentState;
1251
- // Early return if at start of buffer
1252
- if (cursorCol === 0 && cursorRow === 0)
1253
- return currentState;
1254
- // Check if cursor is at end of an atomic placeholder
1255
- const transformations = transformationsByLine[cursorRow] ?? [];
1256
- const placeholder = findAtomicPlaceholderForBackspace(lines[cursorRow], cursorCol, transformations);
1257
- if (placeholder) {
1258
- const nextState = currentState;
1259
- const newLines = [...nextState.lines];
1260
- newLines[cursorRow] =
1261
- cpSlice(newLines[cursorRow], 0, placeholder.start) +
1262
- cpSlice(newLines[cursorRow], placeholder.end);
1263
- // Recalculate transformations for the modified line
1264
- const newTransformations = [...nextState.transformationsByLine];
1265
- newTransformations[cursorRow] = calculateTransformationsForLine(newLines[cursorRow]);
1266
- // Clean up pastedContent if this was a paste placeholder
1267
- let newPastedContent = nextState.pastedContent;
1268
- if (placeholder.type === 'paste' && placeholder.id) {
1269
- const { [placeholder.id]: _, ...remaining } = nextState.pastedContent;
1270
- newPastedContent = remaining;
1271
- }
1272
- return {
1273
- ...nextState,
1274
- lines: newLines,
1275
- cursorCol: placeholder.start,
1276
- preferredCol: null,
1277
- transformationsByLine: newTransformations,
1278
- pastedContent: newPastedContent,
1279
- };
1280
- }
1281
- // Standard backspace logic
1282
- const nextState = currentState;
1283
- const newLines = [...nextState.lines];
1284
- let newCursorRow = nextState.cursorRow;
1285
- let newCursorCol = nextState.cursorCol;
1286
- const currentLine = (r) => newLines[r] ?? '';
1287
- let lineDelta = 0;
1288
- if (newCursorCol > 0) {
1289
- const lineContent = currentLine(newCursorRow);
1290
- newLines[newCursorRow] =
1291
- cpSlice(lineContent, 0, newCursorCol - 1) +
1292
- cpSlice(lineContent, newCursorCol);
1293
- newCursorCol--;
1294
- }
1295
- else if (newCursorRow > 0) {
1296
- const prevLineContent = currentLine(newCursorRow - 1);
1297
- const currentLineContentVal = currentLine(newCursorRow);
1298
- const newCol = cpLen(prevLineContent);
1299
- newLines[newCursorRow - 1] = prevLineContent + currentLineContentVal;
1300
- newLines.splice(newCursorRow, 1);
1301
- lineDelta = -1;
1302
- newCursorRow--;
1303
- newCursorCol = newCol;
1304
- }
1305
- const { newInfo: newExpandedPaste, isDetached } = shiftExpandedRegions(nextState.expandedPaste, nextState.cursorRow + lineDelta, // shift based on the line that was removed
1306
- lineDelta, nextState.cursorRow);
1307
- const newPastedContent = { ...nextState.pastedContent };
1308
- if (isDetached && nextState.expandedPaste) {
1309
- delete newPastedContent[nextState.expandedPaste.id];
1310
- }
1311
- return {
1312
- ...nextState,
1313
- lines: newLines,
1314
- cursorRow: newCursorRow,
1315
- cursorCol: newCursorCol,
1316
- preferredCol: null,
1317
- pastedContent: newPastedContent,
1318
- expandedPaste: newExpandedPaste,
1319
- };
1320
- }
1321
- case 'set_viewport': {
1322
- const { width, height } = action.payload;
1323
- if (width === state.viewportWidth && height === state.viewportHeight) {
1324
- return state;
1325
- }
1326
- return {
1327
- ...state,
1328
- viewportWidth: width,
1329
- viewportHeight: height,
1330
- };
1331
- }
1332
- case 'move': {
1333
- const { dir } = action.payload;
1334
- const { cursorRow, cursorCol, lines, visualLayout, preferredCol } = state;
1335
- // Visual movements
1336
- if (dir === 'left' ||
1337
- dir === 'right' ||
1338
- dir === 'up' ||
1339
- dir === 'down' ||
1340
- dir === 'home' ||
1341
- dir === 'end') {
1342
- const visualCursor = calculateVisualCursorFromLayout(visualLayout, [
1343
- cursorRow,
1344
- cursorCol,
1345
- ]);
1346
- const { visualLines, visualToLogicalMap } = visualLayout;
1347
- let newVisualRow = visualCursor[0];
1348
- let newVisualCol = visualCursor[1];
1349
- let newPreferredCol = preferredCol;
1350
- const currentVisLineLen = cpLen(visualLines[newVisualRow] ?? '');
1351
- switch (dir) {
1352
- case 'left':
1353
- newPreferredCol = null;
1354
- if (newVisualCol > 0) {
1355
- newVisualCol--;
1356
- }
1357
- else if (newVisualRow > 0) {
1358
- newVisualRow--;
1359
- newVisualCol = cpLen(visualLines[newVisualRow] ?? '');
1360
- }
1361
- break;
1362
- case 'right':
1363
- newPreferredCol = null;
1364
- if (newVisualCol < currentVisLineLen) {
1365
- newVisualCol++;
1366
- }
1367
- else if (newVisualRow < visualLines.length - 1) {
1368
- newVisualRow++;
1369
- newVisualCol = 0;
1370
- }
1371
- break;
1372
- case 'up':
1373
- if (newVisualRow > 0) {
1374
- if (newPreferredCol === null)
1375
- newPreferredCol = newVisualCol;
1376
- newVisualRow--;
1377
- newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
1378
- }
1379
- break;
1380
- case 'down':
1381
- if (newVisualRow < visualLines.length - 1) {
1382
- if (newPreferredCol === null)
1383
- newPreferredCol = newVisualCol;
1384
- newVisualRow++;
1385
- newVisualCol = clamp(newPreferredCol, 0, cpLen(visualLines[newVisualRow] ?? ''));
1386
- }
1387
- break;
1388
- case 'home':
1389
- newPreferredCol = null;
1390
- newVisualCol = 0;
1391
- break;
1392
- case 'end':
1393
- newPreferredCol = null;
1394
- newVisualCol = currentVisLineLen;
1395
- break;
1396
- default: {
1397
- const exhaustiveCheck = dir;
1398
- debugLogger.error(`Unknown visual movement direction: ${exhaustiveCheck}`);
1399
- return state;
1400
- }
1401
- }
1402
- if (visualToLogicalMap[newVisualRow]) {
1403
- const [logRow, logicalStartCol] = visualToLogicalMap[newVisualRow];
1404
- const transformedToLogicalMap = visualLayout.transformedToLogicalMaps?.[logRow] ?? [];
1405
- let transformedStartCol = 0;
1406
- while (transformedStartCol < transformedToLogicalMap.length &&
1407
- transformedToLogicalMap[transformedStartCol] < logicalStartCol) {
1408
- transformedStartCol++;
1409
- }
1410
- const clampedTransformedCol = Math.min(transformedStartCol + newVisualCol, Math.max(0, transformedToLogicalMap.length - 1));
1411
- const newLogicalCol = transformedToLogicalMap[clampedTransformedCol] ??
1412
- cpLen(lines[logRow] ?? '');
1413
- return {
1414
- ...state,
1415
- cursorRow: logRow,
1416
- cursorCol: newLogicalCol,
1417
- preferredCol: newPreferredCol,
1418
- };
1419
- }
1420
- return state;
1421
- }
1422
- // Logical movements
1423
- switch (dir) {
1424
- case 'wordLeft': {
1425
- if (cursorCol === 0 && cursorRow === 0)
1426
- return state;
1427
- let newCursorRow = cursorRow;
1428
- let newCursorCol = cursorCol;
1429
- if (cursorCol === 0) {
1430
- newCursorRow--;
1431
- newCursorCol = cpLen(lines[newCursorRow] ?? '');
1432
- }
1433
- else {
1434
- const lineContent = lines[cursorRow];
1435
- newCursorCol = findPrevWordBoundary(lineContent, cursorCol);
1436
- }
1437
- return {
1438
- ...state,
1439
- cursorRow: newCursorRow,
1440
- cursorCol: newCursorCol,
1441
- preferredCol: null,
1442
- };
1443
- }
1444
- case 'wordRight': {
1445
- const lineContent = lines[cursorRow] ?? '';
1446
- if (cursorRow === lines.length - 1 &&
1447
- cursorCol === cpLen(lineContent)) {
1448
- return state;
1449
- }
1450
- let newCursorRow = cursorRow;
1451
- let newCursorCol = cursorCol;
1452
- const lineLen = cpLen(lineContent);
1453
- if (cursorCol >= lineLen) {
1454
- newCursorRow++;
1455
- newCursorCol = 0;
1456
- }
1457
- else {
1458
- newCursorCol = findNextWordBoundary(lineContent, cursorCol);
1459
- }
1460
- return {
1461
- ...state,
1462
- cursorRow: newCursorRow,
1463
- cursorCol: newCursorCol,
1464
- preferredCol: null,
1465
- };
1466
- }
1467
- default:
1468
- return state;
1469
- }
1470
- }
1471
- case 'set_cursor': {
1472
- return {
1473
- ...state,
1474
- ...action.payload,
1475
- };
1476
- }
1477
- case 'delete': {
1478
- const stateWithUndo = pushUndoLocal(state);
1479
- const currentState = detachExpandedPaste(stateWithUndo);
1480
- const { cursorRow, cursorCol, lines, transformationsByLine } = currentState;
1481
- // Check if cursor is at start of an atomic placeholder
1482
- const transformations = transformationsByLine[cursorRow] ?? [];
1483
- const placeholder = findAtomicPlaceholderForDelete(lines[cursorRow], cursorCol, transformations);
1484
- if (placeholder) {
1485
- const nextState = currentState;
1486
- const newLines = [...nextState.lines];
1487
- newLines[cursorRow] =
1488
- cpSlice(newLines[cursorRow], 0, placeholder.start) +
1489
- cpSlice(newLines[cursorRow], placeholder.end);
1490
- // Recalculate transformations for the modified line
1491
- const newTransformations = [...nextState.transformationsByLine];
1492
- newTransformations[cursorRow] = calculateTransformationsForLine(newLines[cursorRow]);
1493
- // Clean up pastedContent if this was a paste placeholder
1494
- let newPastedContent = nextState.pastedContent;
1495
- if (placeholder.type === 'paste' && placeholder.id) {
1496
- const { [placeholder.id]: _, ...remaining } = nextState.pastedContent;
1497
- newPastedContent = remaining;
1498
- }
1499
- return {
1500
- ...nextState,
1501
- lines: newLines,
1502
- // cursorCol stays the same
1503
- preferredCol: null,
1504
- transformationsByLine: newTransformations,
1505
- pastedContent: newPastedContent,
1506
- };
1507
- }
1508
- // Standard delete logic
1509
- const lineContent = currentLine(cursorRow);
1510
- let lineDelta = 0;
1511
- const nextState = currentState;
1512
- const newLines = [...nextState.lines];
1513
- if (cursorCol < currentLineLen(cursorRow)) {
1514
- newLines[cursorRow] =
1515
- cpSlice(lineContent, 0, cursorCol) +
1516
- cpSlice(lineContent, cursorCol + 1);
1517
- }
1518
- else if (cursorRow < lines.length - 1) {
1519
- const nextLineContent = currentLine(cursorRow + 1);
1520
- newLines[cursorRow] = lineContent + nextLineContent;
1521
- newLines.splice(cursorRow + 1, 1);
1522
- lineDelta = -1;
1523
- }
1524
- else {
1525
- return currentState;
1526
- }
1527
- const { newInfo: newExpandedPaste, isDetached } = shiftExpandedRegions(nextState.expandedPaste, nextState.cursorRow, lineDelta, nextState.cursorRow + (lineDelta < 0 ? 1 : 0));
1528
- const newPastedContent = { ...nextState.pastedContent };
1529
- if (isDetached && nextState.expandedPaste) {
1530
- delete newPastedContent[nextState.expandedPaste.id];
1531
- }
1532
- return {
1533
- ...nextState,
1534
- lines: newLines,
1535
- preferredCol: null,
1536
- pastedContent: newPastedContent,
1537
- expandedPaste: newExpandedPaste,
1538
- };
1539
- }
1540
- case 'delete_word_left': {
1541
- const stateWithUndo = pushUndoLocal(state);
1542
- const currentState = detachExpandedPaste(stateWithUndo);
1543
- const { cursorRow, cursorCol } = currentState;
1544
- if (cursorCol === 0 && cursorRow === 0)
1545
- return currentState;
1546
- const nextState = currentState;
1547
- const newLines = [...nextState.lines];
1548
- let newCursorRow = cursorRow;
1549
- let newCursorCol = cursorCol;
1550
- let beforeChangedLines = [];
1551
- if (newCursorCol > 0) {
1552
- const lineContent = currentLine(newCursorRow);
1553
- beforeChangedLines = [lineContent];
1554
- const prevWordStart = findPrevWordStartInLine(lineContent, newCursorCol);
1555
- const start = prevWordStart === null ? 0 : prevWordStart;
1556
- newLines[newCursorRow] =
1557
- cpSlice(lineContent, 0, start) + cpSlice(lineContent, newCursorCol);
1558
- newCursorCol = start;
1559
- }
1560
- else {
1561
- // Act as a backspace
1562
- const prevLineContent = currentLine(cursorRow - 1);
1563
- const currentLineContentVal = currentLine(cursorRow);
1564
- beforeChangedLines = [prevLineContent, currentLineContentVal];
1565
- const newCol = cpLen(prevLineContent);
1566
- newLines[cursorRow - 1] = prevLineContent + currentLineContentVal;
1567
- newLines.splice(cursorRow, 1);
1568
- newCursorRow--;
1569
- newCursorCol = newCol;
1570
- }
1571
- const newPastedContent = pruneOrphanedPastedContent(nextState.pastedContent, nextState.expandedPaste?.id ?? null, beforeChangedLines, newLines);
1572
- return {
1573
- ...nextState,
1574
- lines: newLines,
1575
- cursorRow: newCursorRow,
1576
- cursorCol: newCursorCol,
1577
- preferredCol: null,
1578
- pastedContent: newPastedContent,
1579
- };
1580
- }
1581
- case 'delete_word_right': {
1582
- const stateWithUndo = pushUndoLocal(state);
1583
- const currentState = detachExpandedPaste(stateWithUndo);
1584
- const { cursorRow, cursorCol, lines } = currentState;
1585
- const lineContent = currentLine(cursorRow);
1586
- const lineLen = cpLen(lineContent);
1587
- if (cursorCol >= lineLen && cursorRow === lines.length - 1) {
1588
- return currentState;
1589
- }
1590
- const nextState = currentState;
1591
- const newLines = [...nextState.lines];
1592
- let beforeChangedLines = [];
1593
- if (cursorCol >= lineLen) {
1594
- // Act as a delete, joining with the next line
1595
- const nextLineContent = currentLine(cursorRow + 1);
1596
- beforeChangedLines = [lineContent, nextLineContent];
1597
- newLines[cursorRow] = lineContent + nextLineContent;
1598
- newLines.splice(cursorRow + 1, 1);
1599
- }
1600
- else {
1601
- beforeChangedLines = [lineContent];
1602
- const nextWordStart = findNextWordStartInLine(lineContent, cursorCol);
1603
- const end = nextWordStart === null ? lineLen : nextWordStart;
1604
- newLines[cursorRow] =
1605
- cpSlice(lineContent, 0, cursorCol) + cpSlice(lineContent, end);
1606
- }
1607
- const newPastedContent = pruneOrphanedPastedContent(nextState.pastedContent, nextState.expandedPaste?.id ?? null, beforeChangedLines, newLines);
1608
- return {
1609
- ...nextState,
1610
- lines: newLines,
1611
- preferredCol: null,
1612
- pastedContent: newPastedContent,
1613
- };
1614
- }
1615
- case 'kill_line_right': {
1616
- const stateWithUndo = pushUndoLocal(state);
1617
- const currentState = detachExpandedPaste(stateWithUndo);
1618
- const { cursorRow, cursorCol, lines } = currentState;
1619
- const lineContent = currentLine(cursorRow);
1620
- if (cursorCol < currentLineLen(cursorRow)) {
1621
- const nextState = currentState;
1622
- const newLines = [...nextState.lines];
1623
- const beforeChangedLines = [lineContent];
1624
- newLines[cursorRow] = cpSlice(lineContent, 0, cursorCol);
1625
- const newPastedContent = pruneOrphanedPastedContent(nextState.pastedContent, nextState.expandedPaste?.id ?? null, beforeChangedLines, newLines);
1626
- return {
1627
- ...nextState,
1628
- lines: newLines,
1629
- preferredCol: null,
1630
- pastedContent: newPastedContent,
1631
- };
1632
- }
1633
- else if (cursorRow < lines.length - 1) {
1634
- // Act as a delete
1635
- const nextState = currentState;
1636
- const nextLineContent = currentLine(cursorRow + 1);
1637
- const newLines = [...nextState.lines];
1638
- const beforeChangedLines = [lineContent, nextLineContent];
1639
- newLines[cursorRow] = lineContent + nextLineContent;
1640
- newLines.splice(cursorRow + 1, 1);
1641
- const newPastedContent = pruneOrphanedPastedContent(nextState.pastedContent, nextState.expandedPaste?.id ?? null, beforeChangedLines, newLines);
1642
- return {
1643
- ...nextState,
1644
- lines: newLines,
1645
- preferredCol: null,
1646
- pastedContent: newPastedContent,
1647
- };
1648
- }
1649
- return currentState;
1650
- }
1651
- case 'kill_line_left': {
1652
- const stateWithUndo = pushUndoLocal(state);
1653
- const currentState = detachExpandedPaste(stateWithUndo);
1654
- const { cursorRow, cursorCol } = currentState;
1655
- if (cursorCol > 0) {
1656
- const nextState = currentState;
1657
- const lineContent = currentLine(cursorRow);
1658
- const newLines = [...nextState.lines];
1659
- const beforeChangedLines = [lineContent];
1660
- newLines[cursorRow] = cpSlice(lineContent, cursorCol);
1661
- const newPastedContent = pruneOrphanedPastedContent(nextState.pastedContent, nextState.expandedPaste?.id ?? null, beforeChangedLines, newLines);
1662
- return {
1663
- ...nextState,
1664
- lines: newLines,
1665
- cursorCol: 0,
1666
- preferredCol: null,
1667
- pastedContent: newPastedContent,
1668
- };
1669
- }
1670
- return currentState;
1671
- }
1672
- case 'undo': {
1673
- const stateToRestore = state.undoStack[state.undoStack.length - 1];
1674
- if (!stateToRestore)
1675
- return state;
1676
- const currentSnapshot = {
1677
- lines: [...state.lines],
1678
- cursorRow: state.cursorRow,
1679
- cursorCol: state.cursorCol,
1680
- pastedContent: { ...state.pastedContent },
1681
- expandedPaste: state.expandedPaste ? { ...state.expandedPaste } : null,
1682
- };
1683
- return {
1684
- ...state,
1685
- ...stateToRestore,
1686
- undoStack: state.undoStack.slice(0, -1),
1687
- redoStack: [...state.redoStack, currentSnapshot],
1688
- };
1689
- }
1690
- case 'redo': {
1691
- const stateToRestore = state.redoStack[state.redoStack.length - 1];
1692
- if (!stateToRestore)
1693
- return state;
1694
- const currentSnapshot = {
1695
- lines: [...state.lines],
1696
- cursorRow: state.cursorRow,
1697
- cursorCol: state.cursorCol,
1698
- pastedContent: { ...state.pastedContent },
1699
- expandedPaste: state.expandedPaste ? { ...state.expandedPaste } : null,
1700
- };
1701
- return {
1702
- ...state,
1703
- ...stateToRestore,
1704
- redoStack: state.redoStack.slice(0, -1),
1705
- undoStack: [...state.undoStack, currentSnapshot],
1706
- };
1707
- }
1708
- case 'replace_range': {
1709
- const { startRow, startCol, endRow, endCol, text } = action.payload;
1710
- const nextState = pushUndoLocal(state);
1711
- const newState = replaceRangeInternal(nextState, startRow, startCol, endRow, endCol, text);
1712
- const oldLineCount = endRow - startRow + 1;
1713
- const newLineCount = newState.lines.length - (nextState.lines.length - oldLineCount);
1714
- const lineDelta = newLineCount - oldLineCount;
1715
- const { newInfo: newExpandedPaste, isDetached } = shiftExpandedRegions(nextState.expandedPaste, startRow, lineDelta, endRow);
1716
- const newPastedContent = { ...newState.pastedContent };
1717
- if (isDetached && nextState.expandedPaste) {
1718
- delete newPastedContent[nextState.expandedPaste.id];
1719
- }
1720
- return {
1721
- ...newState,
1722
- pastedContent: newPastedContent,
1723
- expandedPaste: newExpandedPaste,
1724
- };
1725
- }
1726
- case 'move_to_offset': {
1727
- const { offset } = action.payload;
1728
- const [newRow, newCol] = offsetToLogicalPos(state.lines.join('\n'), offset);
1729
- return {
1730
- ...state,
1731
- cursorRow: newRow,
1732
- cursorCol: newCol,
1733
- preferredCol: null,
1734
- };
1735
- }
1736
- case 'create_undo_snapshot': {
1737
- return pushUndoLocal(state);
1738
- }
1739
- // Vim-specific operations
1740
- case 'vim_delete_word_forward':
1741
- case 'vim_delete_word_backward':
1742
- case 'vim_delete_word_end':
1743
- case 'vim_delete_big_word_forward':
1744
- case 'vim_delete_big_word_backward':
1745
- case 'vim_delete_big_word_end':
1746
- case 'vim_change_word_forward':
1747
- case 'vim_change_word_backward':
1748
- case 'vim_change_word_end':
1749
- case 'vim_change_big_word_forward':
1750
- case 'vim_change_big_word_backward':
1751
- case 'vim_change_big_word_end':
1752
- case 'vim_delete_line':
1753
- case 'vim_change_line':
1754
- case 'vim_delete_to_end_of_line':
1755
- case 'vim_delete_to_start_of_line':
1756
- case 'vim_change_to_end_of_line':
1757
- case 'vim_change_movement':
1758
- case 'vim_move_left':
1759
- case 'vim_move_right':
1760
- case 'vim_move_up':
1761
- case 'vim_move_down':
1762
- case 'vim_move_word_forward':
1763
- case 'vim_move_word_backward':
1764
- case 'vim_move_word_end':
1765
- case 'vim_move_big_word_forward':
1766
- case 'vim_move_big_word_backward':
1767
- case 'vim_move_big_word_end':
1768
- case 'vim_delete_char':
1769
- case 'vim_insert_at_cursor':
1770
- case 'vim_append_at_cursor':
1771
- case 'vim_open_line_below':
1772
- case 'vim_open_line_above':
1773
- case 'vim_append_at_line_end':
1774
- case 'vim_insert_at_line_start':
1775
- case 'vim_move_to_line_start':
1776
- case 'vim_move_to_line_end':
1777
- case 'vim_move_to_first_nonwhitespace':
1778
- case 'vim_move_to_first_line':
1779
- case 'vim_move_to_last_line':
1780
- case 'vim_move_to_line':
1781
- case 'vim_escape_insert_mode':
1782
- case 'vim_delete_to_first_nonwhitespace':
1783
- case 'vim_change_to_start_of_line':
1784
- case 'vim_change_to_first_nonwhitespace':
1785
- case 'vim_delete_to_first_line':
1786
- case 'vim_delete_to_last_line':
1787
- case 'vim_delete_char_before':
1788
- case 'vim_toggle_case':
1789
- case 'vim_replace_char':
1790
- case 'vim_find_char_forward':
1791
- case 'vim_find_char_backward':
1792
- case 'vim_delete_to_char_forward':
1793
- case 'vim_delete_to_char_backward':
1794
- case 'vim_yank_line':
1795
- case 'vim_yank_word_forward':
1796
- case 'vim_yank_big_word_forward':
1797
- case 'vim_yank_word_end':
1798
- case 'vim_yank_big_word_end':
1799
- case 'vim_yank_to_end_of_line':
1800
- case 'vim_paste_after':
1801
- case 'vim_paste_before':
1802
- return handleVimAction(state, action);
1803
- case 'toggle_paste_expansion': {
1804
- const { id, row, col } = action.payload;
1805
- const expandedPaste = state.expandedPaste;
1806
- if (expandedPaste && expandedPaste.id === id) {
1807
- const nextState = pushUndoLocal(state);
1808
- // COLLAPSE: Restore original line with placeholder
1809
- const newLines = [...nextState.lines];
1810
- newLines.splice(expandedPaste.startLine, expandedPaste.lineCount, expandedPaste.prefix + id + expandedPaste.suffix);
1811
- // Move cursor to end of collapsed placeholder
1812
- const newCursorRow = expandedPaste.startLine;
1813
- const newCursorCol = cpLen(expandedPaste.prefix) + cpLen(id);
1814
- return {
1815
- ...nextState,
1816
- lines: newLines,
1817
- cursorRow: newCursorRow,
1818
- cursorCol: newCursorCol,
1819
- preferredCol: null,
1820
- expandedPaste: null,
1821
- };
1822
- }
1823
- else {
1824
- // EXPAND: Replace placeholder with content
1825
- // Collapse any existing expanded paste first
1826
- let currentState = state;
1827
- let targetRow = row;
1828
- if (state.expandedPaste) {
1829
- const existingInfo = state.expandedPaste;
1830
- const lineDelta = 1 - existingInfo.lineCount;
1831
- if (targetRow !== undefined && targetRow > existingInfo.startLine) {
1832
- // If we collapsed something above our target, our target row shifted up
1833
- targetRow += lineDelta;
1834
- }
1835
- currentState = textBufferReducerLogic(state, {
1836
- type: 'toggle_paste_expansion',
1837
- payload: {
1838
- id: existingInfo.id,
1839
- row: existingInfo.startLine,
1840
- col: 0,
1841
- },
1842
- });
1843
- // Update transformations because they are needed for finding the next placeholder
1844
- currentState.transformationsByLine = calculateTransformations(currentState.lines);
1845
- }
1846
- const content = currentState.pastedContent[id];
1847
- if (!content)
1848
- return currentState;
1849
- // Find line and position containing exactly this placeholder
1850
- let lineIndex = -1;
1851
- let placeholderStart = -1;
1852
- const tryFindOnLine = (idx) => {
1853
- const transforms = currentState.transformationsByLine[idx] ?? [];
1854
- // Precise match by col
1855
- let transform = transforms.find((t) => t.type === 'paste' &&
1856
- t.id === id &&
1857
- col >= t.logStart &&
1858
- col <= t.logEnd);
1859
- if (!transform) {
1860
- // Fallback to first match on line
1861
- transform = transforms.find((t) => t.type === 'paste' && t.id === id);
1862
- }
1863
- if (transform) {
1864
- lineIndex = idx;
1865
- placeholderStart = transform.logStart;
1866
- return true;
1867
- }
1868
- return false;
1869
- };
1870
- // Try provided row first for precise targeting
1871
- if (targetRow >= 0 && targetRow < currentState.lines.length) {
1872
- tryFindOnLine(targetRow);
1873
- }
1874
- if (lineIndex === -1) {
1875
- for (let i = 0; i < currentState.lines.length; i++) {
1876
- if (tryFindOnLine(i))
1877
- break;
1878
- }
1879
- }
1880
- if (lineIndex === -1)
1881
- return currentState;
1882
- const nextState = pushUndoLocal(currentState);
1883
- const line = nextState.lines[lineIndex];
1884
- const prefix = cpSlice(line, 0, placeholderStart);
1885
- const suffix = cpSlice(line, placeholderStart + cpLen(id));
1886
- // Split content into lines
1887
- const contentLines = content.split('\n');
1888
- const newLines = [...nextState.lines];
1889
- let expandedLines;
1890
- if (contentLines.length === 1) {
1891
- // Single-line content
1892
- expandedLines = [prefix + contentLines[0] + suffix];
1893
- }
1894
- else {
1895
- // Multi-line content
1896
- expandedLines = [
1897
- prefix + contentLines[0],
1898
- ...contentLines.slice(1, -1),
1899
- contentLines[contentLines.length - 1] + suffix,
1900
- ];
1901
- }
1902
- newLines.splice(lineIndex, 1, ...expandedLines);
1903
- // Move cursor to end of expanded content (before suffix)
1904
- const newCursorRow = lineIndex + expandedLines.length - 1;
1905
- const lastExpandedLine = expandedLines[expandedLines.length - 1];
1906
- const newCursorCol = cpLen(lastExpandedLine) - cpLen(suffix);
1907
- return {
1908
- ...nextState,
1909
- lines: newLines,
1910
- cursorRow: newCursorRow,
1911
- cursorCol: newCursorCol,
1912
- preferredCol: null,
1913
- expandedPaste: {
1914
- id,
1915
- startLine: lineIndex,
1916
- lineCount: expandedLines.length,
1917
- prefix,
1918
- suffix,
1919
- },
1920
- };
1921
- }
1922
- }
1923
- default: {
1924
- const exhaustiveCheck = action;
1925
- debugLogger.error(`Unknown action encountered: ${exhaustiveCheck}`);
1926
- return state;
1927
- }
1928
- }
1929
- }
1930
- export function textBufferReducer(state, action, options = {}) {
1931
- const newState = textBufferReducerLogic(state, action, options);
1932
- const newTransformedLines = newState.lines !== state.lines
1933
- ? calculateTransformations(newState.lines)
1934
- : state.transformationsByLine;
1935
- const oldTransform = getTransformUnderCursor(state.cursorRow, state.cursorCol, state.transformationsByLine);
1936
- const newTransform = getTransformUnderCursor(newState.cursorRow, newState.cursorCol, newTransformedLines);
1937
- const oldInside = oldTransform !== null;
1938
- const newInside = newTransform !== null;
1939
- const movedBetweenTransforms = oldTransform !== newTransform &&
1940
- (oldTransform !== null || newTransform !== null);
1941
- if (newState.lines !== state.lines ||
1942
- newState.viewportWidth !== state.viewportWidth ||
1943
- oldInside !== newInside ||
1944
- movedBetweenTransforms) {
1945
- const shouldResetPreferred = oldInside !== newInside || movedBetweenTransforms;
1946
- return {
1947
- ...newState,
1948
- preferredCol: shouldResetPreferred ? null : newState.preferredCol,
1949
- visualLayout: calculateLayout(newState.lines, newState.viewportWidth, [
1950
- newState.cursorRow,
1951
- newState.cursorCol,
1952
- ]),
1953
- transformationsByLine: newTransformedLines,
1954
- };
1955
- }
1956
- return newState;
1957
- }
1958
- // --- End of reducer logic ---
1959
- export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewport, stdin, setRawMode, onChange, escapePastedPaths = false, shellModeActive = false, inputFilter, singleLine = false, getPreferredEditor, }) {
1960
- const settings = useSettings();
1961
- const keyMatchers = useKeyMatchers();
1962
- const initialState = useMemo(() => {
1963
- const lines = initialText.split('\n');
1964
- const [initialCursorRow, initialCursorCol] = calculateInitialCursorPosition(lines.length === 0 ? [''] : lines, initialCursorOffset);
1965
- const transformationsByLine = calculateTransformations(lines.length === 0 ? [''] : lines);
1966
- const visualLayout = calculateLayout(lines.length === 0 ? [''] : lines, viewport.width, [initialCursorRow, initialCursorCol]);
1967
- return {
1968
- lines: lines.length === 0 ? [''] : lines,
1969
- cursorRow: initialCursorRow,
1970
- cursorCol: initialCursorCol,
1971
- transformationsByLine,
1972
- preferredCol: null,
1973
- undoStack: [],
1974
- redoStack: [],
1975
- clipboard: null,
1976
- selectionAnchor: null,
1977
- viewportWidth: viewport.width,
1978
- viewportHeight: viewport.height,
1979
- visualLayout,
1980
- pastedContent: {},
1981
- expandedPaste: null,
1982
- yankRegister: null,
1983
- };
1984
- }, [initialText, initialCursorOffset, viewport.width, viewport.height]);
1985
- const [state, dispatch] = useReducer((s, a) => textBufferReducer(s, a, { inputFilter, singleLine }), initialState);
1986
- const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor, visualLayout, transformationsByLine, pastedContent, expandedPaste, undoStack, redoStack, } = state;
1987
- const text = useMemo(() => lines.join('\n'), [lines]);
1988
- const visualCursor = useMemo(() => calculateVisualCursorFromLayout(visualLayout, [cursorRow, cursorCol]), [visualLayout, cursorRow, cursorCol]);
1989
- const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
1990
- const [scrollRowState, setScrollRowState] = useState(0);
1991
- const { height } = viewport;
1992
- const totalVisualLines = visualLines.length;
1993
- const maxScrollStart = Math.max(0, totalVisualLines - height);
1994
- let newVisualScrollRow = scrollRowState;
1995
- if (visualCursor[0] < scrollRowState) {
1996
- newVisualScrollRow = visualCursor[0];
1997
- }
1998
- else if (visualCursor[0] >= scrollRowState + height) {
1999
- newVisualScrollRow = visualCursor[0] - height + 1;
2000
- }
2001
- newVisualScrollRow = clamp(newVisualScrollRow, 0, maxScrollStart);
2002
- if (newVisualScrollRow !== scrollRowState) {
2003
- setScrollRowState(newVisualScrollRow);
2004
- }
2005
- const actualScrollRowState = newVisualScrollRow;
2006
- useEffect(() => {
2007
- if (onChange) {
2008
- onChange(text);
2009
- }
2010
- }, [text, onChange]);
2011
- useEffect(() => {
2012
- dispatch({
2013
- type: 'set_viewport',
2014
- payload: { width: viewport.width, height: viewport.height },
2015
- });
2016
- }, [viewport.width, viewport.height]);
2017
- const insert = useCallback((ch, { paste = false } = {}) => {
2018
- if (typeof ch !== 'string') {
2019
- return;
2020
- }
2021
- let textToInsert = ch;
2022
- const minLengthToInferAsDragDrop = 3;
2023
- if (ch.length >= minLengthToInferAsDragDrop &&
2024
- !shellModeActive &&
2025
- paste &&
2026
- escapePastedPaths) {
2027
- const processed = parsePastedPaths(ch.trim());
2028
- if (processed) {
2029
- textToInsert = processed;
2030
- }
2031
- }
2032
- let currentText = '';
2033
- for (const char of toCodePoints(textToInsert)) {
2034
- if (char.codePointAt(0) === 127) {
2035
- if (currentText.length > 0) {
2036
- dispatch({ type: 'insert', payload: currentText, isPaste: paste });
2037
- currentText = '';
2038
- }
2039
- dispatch({ type: 'backspace' });
2040
- }
2041
- else {
2042
- currentText += char;
2043
- }
2044
- }
2045
- if (currentText.length > 0) {
2046
- dispatch({ type: 'insert', payload: currentText, isPaste: paste });
2047
- }
2048
- }, [shellModeActive, escapePastedPaths]);
2049
- const newline = useCallback(() => {
2050
- if (singleLine) {
2051
- return;
2052
- }
2053
- dispatch({ type: 'insert', payload: '\n' });
2054
- }, [singleLine]);
2055
- const backspace = useCallback(() => {
2056
- dispatch({ type: 'backspace' });
2057
- }, []);
2058
- const del = useCallback(() => {
2059
- dispatch({ type: 'delete' });
2060
- }, []);
2061
- const move = useCallback((dir) => {
2062
- dispatch({ type: 'move', payload: { dir } });
2063
- }, [dispatch]);
2064
- const undo = useCallback(() => {
2065
- dispatch({ type: 'undo' });
2066
- }, []);
2067
- const redo = useCallback(() => {
2068
- dispatch({ type: 'redo' });
2069
- }, []);
2070
- const setText = useCallback((newText, cursorPosition) => {
2071
- dispatch({ type: 'set_text', payload: newText, cursorPosition });
2072
- }, []);
2073
- const deleteWordLeft = useCallback(() => {
2074
- dispatch({ type: 'delete_word_left' });
2075
- }, []);
2076
- const deleteWordRight = useCallback(() => {
2077
- dispatch({ type: 'delete_word_right' });
2078
- }, []);
2079
- const killLineRight = useCallback(() => {
2080
- dispatch({ type: 'kill_line_right' });
2081
- }, []);
2082
- const killLineLeft = useCallback(() => {
2083
- dispatch({ type: 'kill_line_left' });
2084
- }, []);
2085
- // Vim-specific operations
2086
- const vimDeleteWordForward = useCallback((count) => {
2087
- dispatch({ type: 'vim_delete_word_forward', payload: { count } });
2088
- }, []);
2089
- const vimDeleteWordBackward = useCallback((count) => {
2090
- dispatch({ type: 'vim_delete_word_backward', payload: { count } });
2091
- }, []);
2092
- const vimDeleteWordEnd = useCallback((count) => {
2093
- dispatch({ type: 'vim_delete_word_end', payload: { count } });
2094
- }, []);
2095
- const vimDeleteBigWordForward = useCallback((count) => {
2096
- dispatch({ type: 'vim_delete_big_word_forward', payload: { count } });
2097
- }, []);
2098
- const vimDeleteBigWordBackward = useCallback((count) => {
2099
- dispatch({ type: 'vim_delete_big_word_backward', payload: { count } });
2100
- }, []);
2101
- const vimDeleteBigWordEnd = useCallback((count) => {
2102
- dispatch({ type: 'vim_delete_big_word_end', payload: { count } });
2103
- }, []);
2104
- const vimChangeWordForward = useCallback((count) => {
2105
- dispatch({ type: 'vim_change_word_forward', payload: { count } });
2106
- }, []);
2107
- const vimChangeWordBackward = useCallback((count) => {
2108
- dispatch({ type: 'vim_change_word_backward', payload: { count } });
2109
- }, []);
2110
- const vimChangeWordEnd = useCallback((count) => {
2111
- dispatch({ type: 'vim_change_word_end', payload: { count } });
2112
- }, []);
2113
- const vimChangeBigWordForward = useCallback((count) => {
2114
- dispatch({ type: 'vim_change_big_word_forward', payload: { count } });
2115
- }, []);
2116
- const vimChangeBigWordBackward = useCallback((count) => {
2117
- dispatch({ type: 'vim_change_big_word_backward', payload: { count } });
2118
- }, []);
2119
- const vimChangeBigWordEnd = useCallback((count) => {
2120
- dispatch({ type: 'vim_change_big_word_end', payload: { count } });
2121
- }, []);
2122
- const vimDeleteLine = useCallback((count) => {
2123
- dispatch({ type: 'vim_delete_line', payload: { count } });
2124
- }, []);
2125
- const vimChangeLine = useCallback((count) => {
2126
- dispatch({ type: 'vim_change_line', payload: { count } });
2127
- }, []);
2128
- const vimDeleteToEndOfLine = useCallback((count = 1) => {
2129
- dispatch({ type: 'vim_delete_to_end_of_line', payload: { count } });
2130
- }, []);
2131
- const vimDeleteToStartOfLine = useCallback(() => {
2132
- dispatch({ type: 'vim_delete_to_start_of_line' });
2133
- }, []);
2134
- const vimChangeToEndOfLine = useCallback((count = 1) => {
2135
- dispatch({ type: 'vim_change_to_end_of_line', payload: { count } });
2136
- }, []);
2137
- const vimDeleteToFirstNonWhitespace = useCallback(() => {
2138
- dispatch({ type: 'vim_delete_to_first_nonwhitespace' });
2139
- }, []);
2140
- const vimChangeToStartOfLine = useCallback(() => {
2141
- dispatch({ type: 'vim_change_to_start_of_line' });
2142
- }, []);
2143
- const vimChangeToFirstNonWhitespace = useCallback(() => {
2144
- dispatch({ type: 'vim_change_to_first_nonwhitespace' });
2145
- }, []);
2146
- const vimDeleteToFirstLine = useCallback((count) => {
2147
- dispatch({ type: 'vim_delete_to_first_line', payload: { count } });
2148
- }, []);
2149
- const vimDeleteToLastLine = useCallback((count) => {
2150
- dispatch({ type: 'vim_delete_to_last_line', payload: { count } });
2151
- }, []);
2152
- const vimChangeMovement = useCallback((movement, count) => {
2153
- dispatch({ type: 'vim_change_movement', payload: { movement, count } });
2154
- }, []);
2155
- // New vim navigation and operation methods
2156
- const vimMoveLeft = useCallback((count) => {
2157
- dispatch({ type: 'vim_move_left', payload: { count } });
2158
- }, []);
2159
- const vimMoveRight = useCallback((count) => {
2160
- dispatch({ type: 'vim_move_right', payload: { count } });
2161
- }, []);
2162
- const vimMoveUp = useCallback((count) => {
2163
- dispatch({ type: 'vim_move_up', payload: { count } });
2164
- }, []);
2165
- const vimMoveDown = useCallback((count) => {
2166
- dispatch({ type: 'vim_move_down', payload: { count } });
2167
- }, []);
2168
- const vimMoveWordForward = useCallback((count) => {
2169
- dispatch({ type: 'vim_move_word_forward', payload: { count } });
2170
- }, []);
2171
- const vimMoveWordBackward = useCallback((count) => {
2172
- dispatch({ type: 'vim_move_word_backward', payload: { count } });
2173
- }, []);
2174
- const vimMoveWordEnd = useCallback((count) => {
2175
- dispatch({ type: 'vim_move_word_end', payload: { count } });
2176
- }, []);
2177
- const vimMoveBigWordForward = useCallback((count) => {
2178
- dispatch({ type: 'vim_move_big_word_forward', payload: { count } });
2179
- }, []);
2180
- const vimMoveBigWordBackward = useCallback((count) => {
2181
- dispatch({ type: 'vim_move_big_word_backward', payload: { count } });
2182
- }, []);
2183
- const vimMoveBigWordEnd = useCallback((count) => {
2184
- dispatch({ type: 'vim_move_big_word_end', payload: { count } });
2185
- }, []);
2186
- const vimDeleteChar = useCallback((count) => {
2187
- dispatch({ type: 'vim_delete_char', payload: { count } });
2188
- }, []);
2189
- const vimDeleteCharBefore = useCallback((count) => {
2190
- dispatch({ type: 'vim_delete_char_before', payload: { count } });
2191
- }, []);
2192
- const vimToggleCase = useCallback((count) => {
2193
- dispatch({ type: 'vim_toggle_case', payload: { count } });
2194
- }, []);
2195
- const vimReplaceChar = useCallback((char, count) => {
2196
- dispatch({ type: 'vim_replace_char', payload: { char, count } });
2197
- }, []);
2198
- const vimFindCharForward = useCallback((char, count, till) => {
2199
- dispatch({
2200
- type: 'vim_find_char_forward',
2201
- payload: { char, count, till },
2202
- });
2203
- }, []);
2204
- const vimFindCharBackward = useCallback((char, count, till) => {
2205
- dispatch({
2206
- type: 'vim_find_char_backward',
2207
- payload: { char, count, till },
2208
- });
2209
- }, []);
2210
- const vimDeleteToCharForward = useCallback((char, count, till) => {
2211
- dispatch({
2212
- type: 'vim_delete_to_char_forward',
2213
- payload: { char, count, till },
2214
- });
2215
- }, []);
2216
- const vimDeleteToCharBackward = useCallback((char, count, till) => {
2217
- dispatch({
2218
- type: 'vim_delete_to_char_backward',
2219
- payload: { char, count, till },
2220
- });
2221
- }, []);
2222
- const vimInsertAtCursor = useCallback(() => {
2223
- dispatch({ type: 'vim_insert_at_cursor' });
2224
- }, []);
2225
- const vimAppendAtCursor = useCallback(() => {
2226
- dispatch({ type: 'vim_append_at_cursor' });
2227
- }, []);
2228
- const vimOpenLineBelow = useCallback(() => {
2229
- dispatch({ type: 'vim_open_line_below' });
2230
- }, []);
2231
- const vimOpenLineAbove = useCallback(() => {
2232
- dispatch({ type: 'vim_open_line_above' });
2233
- }, []);
2234
- const vimAppendAtLineEnd = useCallback(() => {
2235
- dispatch({ type: 'vim_append_at_line_end' });
2236
- }, []);
2237
- const vimInsertAtLineStart = useCallback(() => {
2238
- dispatch({ type: 'vim_insert_at_line_start' });
2239
- }, []);
2240
- const vimMoveToLineStart = useCallback(() => {
2241
- dispatch({ type: 'vim_move_to_line_start' });
2242
- }, []);
2243
- const vimMoveToLineEnd = useCallback(() => {
2244
- dispatch({ type: 'vim_move_to_line_end' });
2245
- }, []);
2246
- const vimMoveToFirstNonWhitespace = useCallback(() => {
2247
- dispatch({ type: 'vim_move_to_first_nonwhitespace' });
2248
- }, []);
2249
- const vimMoveToFirstLine = useCallback(() => {
2250
- dispatch({ type: 'vim_move_to_first_line' });
2251
- }, []);
2252
- const vimMoveToLastLine = useCallback(() => {
2253
- dispatch({ type: 'vim_move_to_last_line' });
2254
- }, []);
2255
- const vimMoveToLine = useCallback((lineNumber) => {
2256
- dispatch({ type: 'vim_move_to_line', payload: { lineNumber } });
2257
- }, []);
2258
- const vimEscapeInsertMode = useCallback(() => {
2259
- dispatch({ type: 'vim_escape_insert_mode' });
2260
- }, []);
2261
- const vimYankLine = useCallback((count) => {
2262
- dispatch({ type: 'vim_yank_line', payload: { count } });
2263
- }, []);
2264
- const vimYankWordForward = useCallback((count) => {
2265
- dispatch({ type: 'vim_yank_word_forward', payload: { count } });
2266
- }, []);
2267
- const vimYankBigWordForward = useCallback((count) => {
2268
- dispatch({ type: 'vim_yank_big_word_forward', payload: { count } });
2269
- }, []);
2270
- const vimYankWordEnd = useCallback((count) => {
2271
- dispatch({ type: 'vim_yank_word_end', payload: { count } });
2272
- }, []);
2273
- const vimYankBigWordEnd = useCallback((count) => {
2274
- dispatch({ type: 'vim_yank_big_word_end', payload: { count } });
2275
- }, []);
2276
- const vimYankToEndOfLine = useCallback((count) => {
2277
- dispatch({ type: 'vim_yank_to_end_of_line', payload: { count } });
2278
- }, []);
2279
- const vimPasteAfter = useCallback((count) => {
2280
- dispatch({ type: 'vim_paste_after', payload: { count } });
2281
- }, []);
2282
- const vimPasteBefore = useCallback((count) => {
2283
- dispatch({ type: 'vim_paste_before', payload: { count } });
2284
- }, []);
2285
- const openInExternalEditor = useCallback(async () => {
2286
- const tmpDir = fs.mkdtempSync(pathMod.join(os.tmpdir(), 'gemini-edit-'));
2287
- const filePath = pathMod.join(tmpDir, 'buffer.txt');
2288
- // Expand paste placeholders so user sees full content in editor
2289
- const expandedText = expandPastePlaceholders(text, pastedContent);
2290
- fs.writeFileSync(filePath, expandedText, 'utf8');
2291
- dispatch({ type: 'create_undo_snapshot' });
2292
- try {
2293
- await openFileInEditor(filePath, stdin, setRawMode, getPreferredEditor?.(), settings.merged.general.openEditorInNewWindow);
2294
- let newText = fs.readFileSync(filePath, 'utf8');
2295
- newText = newText.replace(/\r\n?/g, '\n');
2296
- // Attempt to re-collapse unchanged pasted content back into placeholders
2297
- const sortedPlaceholders = Object.entries(pastedContent).sort((a, b) => b[1].length - a[1].length);
2298
- for (const [id, content] of sortedPlaceholders) {
2299
- if (newText.includes(content)) {
2300
- newText = newText.replace(content, id);
2301
- }
2302
- }
2303
- dispatch({ type: 'set_text', payload: newText, pushToUndo: false });
2304
- }
2305
- catch (err) {
2306
- coreEvents.emitFeedback('error', getErrorMessage(err), err);
2307
- }
2308
- finally {
2309
- try {
2310
- fs.unlinkSync(filePath);
2311
- }
2312
- catch {
2313
- /* ignore */
2314
- }
2315
- try {
2316
- fs.rmdirSync(tmpDir);
2317
- }
2318
- catch {
2319
- /* ignore */
2320
- }
2321
- }
2322
- }, [
2323
- text,
2324
- pastedContent,
2325
- stdin,
2326
- setRawMode,
2327
- getPreferredEditor,
2328
- settings.merged.general.openEditorInNewWindow,
2329
- ]);
2330
- const handleInput = useCallback((key) => {
2331
- const { sequence: input } = key;
2332
- if (key.name === 'paste') {
2333
- insert(input, { paste: true });
2334
- return true;
2335
- }
2336
- if (keyMatchers[Command.RETURN](key)) {
2337
- if (singleLine) {
2338
- return false;
2339
- }
2340
- newline();
2341
- return true;
2342
- }
2343
- if (keyMatchers[Command.NEWLINE](key)) {
2344
- if (singleLine) {
2345
- return false;
2346
- }
2347
- newline();
2348
- return true;
2349
- }
2350
- if (keyMatchers[Command.MOVE_LEFT](key)) {
2351
- if (cursorRow === 0 && cursorCol === 0)
2352
- return false;
2353
- move('left');
2354
- return true;
2355
- }
2356
- if (keyMatchers[Command.MOVE_RIGHT](key)) {
2357
- const lastLineIdx = lines.length - 1;
2358
- if (cursorRow === lastLineIdx &&
2359
- cursorCol === cpLen(lines[lastLineIdx] ?? '')) {
2360
- return false;
2361
- }
2362
- move('right');
2363
- return true;
2364
- }
2365
- if (keyMatchers[Command.MOVE_UP](key)) {
2366
- if (visualCursor[0] === 0)
2367
- return false;
2368
- move('up');
2369
- return true;
2370
- }
2371
- if (keyMatchers[Command.MOVE_DOWN](key)) {
2372
- if (visualCursor[0] === visualLines.length - 1)
2373
- return false;
2374
- move('down');
2375
- return true;
2376
- }
2377
- if (keyMatchers[Command.MOVE_WORD_LEFT](key)) {
2378
- move('wordLeft');
2379
- return true;
2380
- }
2381
- if (keyMatchers[Command.MOVE_WORD_RIGHT](key)) {
2382
- move('wordRight');
2383
- return true;
2384
- }
2385
- if (keyMatchers[Command.HOME](key)) {
2386
- move('home');
2387
- return true;
2388
- }
2389
- if (keyMatchers[Command.END](key)) {
2390
- move('end');
2391
- return true;
2392
- }
2393
- if (keyMatchers[Command.CLEAR_INPUT](key)) {
2394
- if (text.length > 0) {
2395
- setText('');
2396
- return true;
2397
- }
2398
- return false;
2399
- }
2400
- if (keyMatchers[Command.DELETE_WORD_BACKWARD](key)) {
2401
- deleteWordLeft();
2402
- return true;
2403
- }
2404
- if (keyMatchers[Command.DELETE_WORD_FORWARD](key)) {
2405
- deleteWordRight();
2406
- return true;
2407
- }
2408
- if (keyMatchers[Command.DELETE_CHAR_LEFT](key)) {
2409
- backspace();
2410
- return true;
2411
- }
2412
- if (keyMatchers[Command.DELETE_CHAR_RIGHT](key)) {
2413
- const lastLineIdx = lines.length - 1;
2414
- if (cursorRow === lastLineIdx &&
2415
- cursorCol === cpLen(lines[lastLineIdx] ?? '')) {
2416
- return false;
2417
- }
2418
- del();
2419
- return true;
2420
- }
2421
- if (keyMatchers[Command.UNDO](key)) {
2422
- if (undoStack.length === 0) {
2423
- return false;
2424
- }
2425
- undo();
2426
- return true;
2427
- }
2428
- if (keyMatchers[Command.REDO](key)) {
2429
- if (redoStack.length === 0) {
2430
- return false;
2431
- }
2432
- redo();
2433
- return true;
2434
- }
2435
- if (key.insertable) {
2436
- insert(input, { paste: false });
2437
- return true;
2438
- }
2439
- return false;
2440
- }, [
2441
- newline,
2442
- move,
2443
- deleteWordLeft,
2444
- deleteWordRight,
2445
- backspace,
2446
- del,
2447
- insert,
2448
- undo,
2449
- redo,
2450
- cursorRow,
2451
- cursorCol,
2452
- lines,
2453
- singleLine,
2454
- setText,
2455
- text,
2456
- visualCursor,
2457
- visualLines,
2458
- keyMatchers,
2459
- undoStack.length,
2460
- redoStack.length,
2461
- ]);
2462
- const visualScrollRow = useMemo(() => {
2463
- const totalVisualLines = visualLines.length;
2464
- return Math.min(actualScrollRowState, Math.max(0, totalVisualLines - viewport.height));
2465
- }, [visualLines.length, actualScrollRowState, viewport.height]);
2466
- const renderedVisualLines = useMemo(() => visualLines.slice(visualScrollRow, visualScrollRow + viewport.height), [visualLines, visualScrollRow, viewport.height]);
2467
- const replaceRange = useCallback((startRow, startCol, endRow, endCol, text) => {
2468
- dispatch({
2469
- type: 'replace_range',
2470
- payload: { startRow, startCol, endRow, endCol, text },
2471
- });
2472
- }, []);
2473
- const replaceRangeByOffset = useCallback((startOffset, endOffset, replacementText) => {
2474
- const [startRow, startCol] = offsetToLogicalPos(text, startOffset);
2475
- const [endRow, endCol] = offsetToLogicalPos(text, endOffset);
2476
- replaceRange(startRow, startCol, endRow, endCol, replacementText);
2477
- }, [text, replaceRange]);
2478
- const moveToOffset = useCallback((offset) => {
2479
- dispatch({ type: 'move_to_offset', payload: { offset } });
2480
- }, []);
2481
- const moveToVisualPosition = useCallback((visRow, visCol) => {
2482
- const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
2483
- // Clamp visRow to valid range
2484
- const clampedVisRow = Math.max(0, Math.min(visRow, visualLines.length - 1));
2485
- const visualLine = visualLines[clampedVisRow] || '';
2486
- if (visualToLogicalMap[clampedVisRow]) {
2487
- const [logRow] = visualToLogicalMap[clampedVisRow];
2488
- const transformedToLogicalMap = transformedToLogicalMaps?.[logRow] ?? [];
2489
- // Where does this visual line begin within the transformed line?
2490
- const startColInTransformed = visualToTransformedMap?.[clampedVisRow] ?? 0;
2491
- // Handle wide characters: convert visual X position to character offset
2492
- const codePoints = toCodePoints(visualLine);
2493
- let currentVisX = 0;
2494
- let charOffset = 0;
2495
- for (const char of codePoints) {
2496
- const charWidth = getCachedStringWidth(char);
2497
- // If the click is within this character
2498
- if (visCol < currentVisX + charWidth) {
2499
- // Check if we clicked the second half of a wide character
2500
- if (charWidth > 1 && visCol >= currentVisX + charWidth / 2) {
2501
- charOffset++;
2502
- }
2503
- break;
2504
- }
2505
- currentVisX += charWidth;
2506
- charOffset++;
2507
- }
2508
- // Clamp charOffset to length
2509
- charOffset = Math.min(charOffset, codePoints.length);
2510
- // Map character offset through transformations to get logical position
2511
- const transformedCol = Math.min(startColInTransformed + charOffset, Math.max(0, transformedToLogicalMap.length - 1));
2512
- const newCursorRow = logRow;
2513
- const newCursorCol = transformedToLogicalMap[transformedCol] ?? cpLen(lines[logRow] ?? '');
2514
- dispatch({
2515
- type: 'set_cursor',
2516
- payload: {
2517
- cursorRow: newCursorRow,
2518
- cursorCol: newCursorCol,
2519
- preferredCol: charOffset,
2520
- },
2521
- });
2522
- }
2523
- }, [visualLayout, lines]);
2524
- const getLogicalPositionFromVisual = useCallback((visRow, visCol) => {
2525
- const { visualLines, visualToLogicalMap, transformedToLogicalMaps, visualToTransformedMap, } = visualLayout;
2526
- // Clamp visRow to valid range
2527
- const clampedVisRow = Math.max(0, Math.min(visRow, visualLines.length - 1));
2528
- const visualLine = visualLines[clampedVisRow] || '';
2529
- if (!visualToLogicalMap[clampedVisRow]) {
2530
- return null;
2531
- }
2532
- const [logRow] = visualToLogicalMap[clampedVisRow];
2533
- const transformedToLogicalMap = transformedToLogicalMaps?.[logRow] ?? [];
2534
- // Where does this visual line begin within the transformed line?
2535
- const startColInTransformed = visualToTransformedMap?.[clampedVisRow] ?? 0;
2536
- // Handle wide characters: convert visual X position to character offset
2537
- const codePoints = toCodePoints(visualLine);
2538
- let currentVisX = 0;
2539
- let charOffset = 0;
2540
- for (const char of codePoints) {
2541
- const charWidth = getCachedStringWidth(char);
2542
- if (visCol < currentVisX + charWidth) {
2543
- if (charWidth > 1 && visCol >= currentVisX + charWidth / 2) {
2544
- charOffset++;
2545
- }
2546
- break;
2547
- }
2548
- currentVisX += charWidth;
2549
- charOffset++;
2550
- }
2551
- charOffset = Math.min(charOffset, codePoints.length);
2552
- const transformedCol = Math.min(startColInTransformed + charOffset, Math.max(0, transformedToLogicalMap.length - 1));
2553
- const row = logRow;
2554
- const col = transformedToLogicalMap[transformedCol] ?? cpLen(lines[logRow] ?? '');
2555
- return { row, col };
2556
- }, [visualLayout, lines]);
2557
- const getOffset = useCallback(() => logicalPosToOffset(lines, cursorRow, cursorCol), [lines, cursorRow, cursorCol]);
2558
- const togglePasteExpansion = useCallback((id, row, col) => {
2559
- dispatch({ type: 'toggle_paste_expansion', payload: { id, row, col } });
2560
- }, []);
2561
- const getExpandedPasteAtLineCallback = useCallback((lineIndex) => getExpandedPasteAtLine(lineIndex, expandedPaste), [expandedPaste]);
2562
- const returnValue = useMemo(() => ({
2563
- lines,
2564
- text,
2565
- cursor: [cursorRow, cursorCol],
2566
- preferredCol,
2567
- selectionAnchor,
2568
- pastedContent,
2569
- allVisualLines: visualLines,
2570
- viewportVisualLines: renderedVisualLines,
2571
- visualCursor,
2572
- visualScrollRow,
2573
- viewportHeight: viewport.height,
2574
- visualToLogicalMap,
2575
- transformedToLogicalMaps,
2576
- visualToTransformedMap,
2577
- transformationsByLine,
2578
- visualLayout,
2579
- setText,
2580
- insert,
2581
- newline,
2582
- backspace,
2583
- del,
2584
- move,
2585
- undo,
2586
- redo,
2587
- replaceRange,
2588
- replaceRangeByOffset,
2589
- moveToOffset,
2590
- getOffset,
2591
- moveToVisualPosition,
2592
- getLogicalPositionFromVisual,
2593
- getExpandedPasteAtLine: getExpandedPasteAtLineCallback,
2594
- togglePasteExpansion,
2595
- expandedPaste,
2596
- deleteWordLeft,
2597
- deleteWordRight,
2598
- killLineRight,
2599
- killLineLeft,
2600
- handleInput,
2601
- openInExternalEditor,
2602
- // Vim-specific operations
2603
- vimDeleteWordForward,
2604
- vimDeleteWordBackward,
2605
- vimDeleteWordEnd,
2606
- vimDeleteBigWordForward,
2607
- vimDeleteBigWordBackward,
2608
- vimDeleteBigWordEnd,
2609
- vimChangeWordForward,
2610
- vimChangeWordBackward,
2611
- vimChangeWordEnd,
2612
- vimChangeBigWordForward,
2613
- vimChangeBigWordBackward,
2614
- vimChangeBigWordEnd,
2615
- vimDeleteLine,
2616
- vimChangeLine,
2617
- vimDeleteToEndOfLine,
2618
- vimDeleteToStartOfLine,
2619
- vimChangeToEndOfLine,
2620
- vimDeleteToFirstNonWhitespace,
2621
- vimChangeToStartOfLine,
2622
- vimChangeToFirstNonWhitespace,
2623
- vimDeleteToFirstLine,
2624
- vimDeleteToLastLine,
2625
- vimChangeMovement,
2626
- vimMoveLeft,
2627
- vimMoveRight,
2628
- vimMoveUp,
2629
- vimMoveDown,
2630
- vimMoveWordForward,
2631
- vimMoveWordBackward,
2632
- vimMoveWordEnd,
2633
- vimMoveBigWordForward,
2634
- vimMoveBigWordBackward,
2635
- vimMoveBigWordEnd,
2636
- vimDeleteChar,
2637
- vimDeleteCharBefore,
2638
- vimToggleCase,
2639
- vimReplaceChar,
2640
- vimFindCharForward,
2641
- vimFindCharBackward,
2642
- vimDeleteToCharForward,
2643
- vimDeleteToCharBackward,
2644
- vimInsertAtCursor,
2645
- vimAppendAtCursor,
2646
- vimOpenLineBelow,
2647
- vimOpenLineAbove,
2648
- vimAppendAtLineEnd,
2649
- vimInsertAtLineStart,
2650
- vimMoveToLineStart,
2651
- vimMoveToLineEnd,
2652
- vimMoveToFirstNonWhitespace,
2653
- vimMoveToFirstLine,
2654
- vimMoveToLastLine,
2655
- vimMoveToLine,
2656
- vimEscapeInsertMode,
2657
- vimYankLine,
2658
- vimYankWordForward,
2659
- vimYankBigWordForward,
2660
- vimYankWordEnd,
2661
- vimYankBigWordEnd,
2662
- vimYankToEndOfLine,
2663
- vimPasteAfter,
2664
- vimPasteBefore,
2665
- }), [
2666
- lines,
2667
- text,
2668
- cursorRow,
2669
- cursorCol,
2670
- preferredCol,
2671
- selectionAnchor,
2672
- pastedContent,
2673
- visualLines,
2674
- renderedVisualLines,
2675
- visualCursor,
2676
- visualScrollRow,
2677
- viewport.height,
2678
- visualToLogicalMap,
2679
- transformedToLogicalMaps,
2680
- visualToTransformedMap,
2681
- transformationsByLine,
2682
- visualLayout,
2683
- setText,
2684
- insert,
2685
- newline,
2686
- backspace,
2687
- del,
2688
- move,
2689
- undo,
2690
- redo,
2691
- replaceRange,
2692
- replaceRangeByOffset,
2693
- moveToOffset,
2694
- getOffset,
2695
- moveToVisualPosition,
2696
- getLogicalPositionFromVisual,
2697
- getExpandedPasteAtLineCallback,
2698
- togglePasteExpansion,
2699
- expandedPaste,
2700
- deleteWordLeft,
2701
- deleteWordRight,
2702
- killLineRight,
2703
- killLineLeft,
2704
- handleInput,
2705
- openInExternalEditor,
2706
- vimDeleteWordForward,
2707
- vimDeleteWordBackward,
2708
- vimDeleteWordEnd,
2709
- vimDeleteBigWordForward,
2710
- vimDeleteBigWordBackward,
2711
- vimDeleteBigWordEnd,
2712
- vimChangeWordForward,
2713
- vimChangeWordBackward,
2714
- vimChangeWordEnd,
2715
- vimChangeBigWordForward,
2716
- vimChangeBigWordBackward,
2717
- vimChangeBigWordEnd,
2718
- vimDeleteLine,
2719
- vimChangeLine,
2720
- vimDeleteToEndOfLine,
2721
- vimDeleteToStartOfLine,
2722
- vimChangeToEndOfLine,
2723
- vimDeleteToFirstNonWhitespace,
2724
- vimChangeToStartOfLine,
2725
- vimChangeToFirstNonWhitespace,
2726
- vimDeleteToFirstLine,
2727
- vimDeleteToLastLine,
2728
- vimChangeMovement,
2729
- vimMoveLeft,
2730
- vimMoveRight,
2731
- vimMoveUp,
2732
- vimMoveDown,
2733
- vimMoveWordForward,
2734
- vimMoveWordBackward,
2735
- vimMoveWordEnd,
2736
- vimMoveBigWordForward,
2737
- vimMoveBigWordBackward,
2738
- vimMoveBigWordEnd,
2739
- vimDeleteChar,
2740
- vimDeleteCharBefore,
2741
- vimToggleCase,
2742
- vimReplaceChar,
2743
- vimFindCharForward,
2744
- vimFindCharBackward,
2745
- vimDeleteToCharForward,
2746
- vimDeleteToCharBackward,
2747
- vimInsertAtCursor,
2748
- vimAppendAtCursor,
2749
- vimOpenLineBelow,
2750
- vimOpenLineAbove,
2751
- vimAppendAtLineEnd,
2752
- vimInsertAtLineStart,
2753
- vimMoveToLineStart,
2754
- vimMoveToLineEnd,
2755
- vimMoveToFirstNonWhitespace,
2756
- vimMoveToFirstLine,
2757
- vimMoveToLastLine,
2758
- vimMoveToLine,
2759
- vimEscapeInsertMode,
2760
- vimYankLine,
2761
- vimYankWordForward,
2762
- vimYankBigWordForward,
2763
- vimYankWordEnd,
2764
- vimYankBigWordEnd,
2765
- vimYankToEndOfLine,
2766
- vimPasteAfter,
2767
- vimPasteBefore,
2768
- ]);
2769
- return returnValue;
2770
- }
2771
- //# sourceMappingURL=text-buffer.js.map