@quantum-ai/gemini-cli 0.45.4 → 0.45.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1961) hide show
  1. package/README.md +394 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/package.json +17 -14
  5. package/dist/src/acp/acpCommandHandler.js.map +1 -1
  6. package/dist/src/acp/acpErrors.js.map +1 -1
  7. package/dist/src/acp/acpFileSystemService.js.map +1 -1
  8. package/dist/src/acp/acpRpcDispatcher.js.map +1 -1
  9. package/dist/src/acp/acpSession.js.map +1 -1
  10. package/dist/src/acp/acpSessionManager.js.map +1 -1
  11. package/dist/src/acp/acpUtils.js.map +1 -1
  12. package/dist/src/acp/commands/about.js.map +1 -1
  13. package/dist/src/acp/commands/commandRegistry.js.map +1 -1
  14. package/dist/src/acp/commands/extensions.js.map +1 -1
  15. package/dist/src/acp/commands/help.js.map +1 -1
  16. package/dist/src/acp/commands/init.js.map +1 -1
  17. package/dist/src/acp/commands/memory.js.map +1 -1
  18. package/dist/src/acp/commands/restore.js.map +1 -1
  19. package/dist/src/commands/extensions/configure.js.map +1 -1
  20. package/dist/src/commands/extensions/disable.js.map +1 -1
  21. package/dist/src/commands/extensions/enable.js.map +1 -1
  22. package/dist/src/commands/extensions/install.js.map +1 -1
  23. package/dist/src/commands/extensions/link.js.map +1 -1
  24. package/dist/src/commands/extensions/list.js.map +1 -1
  25. package/dist/src/commands/extensions/new.js.map +1 -1
  26. package/dist/src/commands/extensions/uninstall.js.map +1 -1
  27. package/dist/src/commands/extensions/update.js.map +1 -1
  28. package/dist/src/commands/extensions/utils.js.map +1 -1
  29. package/dist/src/commands/extensions/validate.js.map +1 -1
  30. package/dist/src/commands/gemma/logs.js.map +1 -1
  31. package/dist/src/commands/gemma/platform.js.map +1 -1
  32. package/dist/src/commands/gemma/setup.js.map +1 -1
  33. package/dist/src/commands/gemma/start.js.map +1 -1
  34. package/dist/src/commands/gemma/status.js.map +1 -1
  35. package/dist/src/commands/gemma/stop.js.map +1 -1
  36. package/dist/src/commands/hooks/migrate.js +1 -1
  37. package/dist/src/commands/hooks/migrate.js.map +1 -1
  38. package/dist/src/commands/mcp/add.js +1 -1
  39. package/dist/src/commands/mcp/add.js.map +1 -1
  40. package/dist/src/commands/mcp/enableDisable.js.map +1 -1
  41. package/dist/src/commands/mcp/list.js.map +1 -1
  42. package/dist/src/commands/mcp/remove.js.map +1 -1
  43. package/dist/src/commands/skills/install.js.map +1 -1
  44. package/dist/src/commands/skills/link.js.map +1 -1
  45. package/dist/src/commands/skills/list.js.map +1 -1
  46. package/dist/src/commands/skills/uninstall.js.map +1 -1
  47. package/dist/src/config/auth.js.map +1 -1
  48. package/dist/src/config/config.js.map +1 -1
  49. package/dist/src/config/extension-manager-themes.spec.js.map +1 -1
  50. package/dist/src/config/extension-manager.d.ts +1 -0
  51. package/dist/src/config/extension-manager.js.map +1 -1
  52. package/dist/src/config/extension.js.map +1 -1
  53. package/dist/src/config/extensionRegistryClient.js +2 -1
  54. package/dist/src/config/extensionRegistryClient.js.map +1 -1
  55. package/dist/src/config/extensions/consent.js.map +1 -1
  56. package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
  57. package/dist/src/config/extensions/extensionSettings.js +1 -1
  58. package/dist/src/config/extensions/extensionSettings.js.map +1 -1
  59. package/dist/src/config/extensions/github.js.map +1 -1
  60. package/dist/src/config/extensions/github_fetch.js.map +1 -1
  61. package/dist/src/config/extensions/update.js.map +1 -1
  62. package/dist/src/config/extensions/variables.js.map +1 -1
  63. package/dist/src/config/footerItems.js.map +1 -1
  64. package/dist/src/config/mcp/mcpServerEnablement.js +2 -1
  65. package/dist/src/config/mcp/mcpServerEnablement.js.map +1 -1
  66. package/dist/src/config/policy.js.map +1 -1
  67. package/dist/src/config/sandboxConfig.js.map +1 -1
  68. package/dist/src/config/settings-validation.js.map +1 -1
  69. package/dist/src/config/settings.js +1 -1
  70. package/dist/src/config/settings.js.map +1 -1
  71. package/dist/src/config/settingsSchema.d.ts +38 -21
  72. package/dist/src/config/settingsSchema.js +7 -7
  73. package/dist/src/config/settingsSchema.js.map +1 -1
  74. package/dist/src/core/auth.js.map +1 -1
  75. package/dist/src/core/initializer.js.map +1 -1
  76. package/dist/src/core/theme.js.map +1 -1
  77. package/dist/src/deferred.js.map +1 -1
  78. package/dist/src/gemini.js.map +1 -1
  79. package/dist/src/index.d.ts +1 -0
  80. package/dist/src/index.js +1 -0
  81. package/dist/src/index.js.map +1 -1
  82. package/dist/src/interactiveCli.js.map +1 -1
  83. package/dist/src/nonInteractiveCli.js.map +1 -1
  84. package/dist/src/nonInteractiveCliAgentSession.js.map +1 -1
  85. package/dist/src/nonInteractiveCliCommands.js.map +1 -1
  86. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  87. package/dist/src/services/CommandService.js.map +1 -1
  88. package/dist/src/services/FileCommandLoader.js.map +1 -1
  89. package/dist/src/services/McpPromptLoader.js.map +1 -1
  90. package/dist/src/services/SkillCommandLoader.js.map +1 -1
  91. package/dist/src/services/SlashCommandConflictHandler.js.map +1 -1
  92. package/dist/src/services/SlashCommandResolver.js.map +1 -1
  93. package/dist/src/services/liteRtServerManager.js.map +1 -1
  94. package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -1
  95. package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -1
  96. package/dist/src/services/prompt-processors/injectionParser.js.map +1 -1
  97. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
  98. package/dist/src/test-utils/AppRig.js.map +1 -1
  99. package/dist/src/test-utils/MockShellExecutionService.js +2 -1
  100. package/dist/src/test-utils/MockShellExecutionService.js.map +1 -1
  101. package/dist/src/test-utils/async.js.map +1 -1
  102. package/dist/src/test-utils/createExtension.js.map +1 -1
  103. package/dist/src/test-utils/customMatchers.js.map +1 -1
  104. package/dist/src/test-utils/mockCommandContext.js.map +1 -1
  105. package/dist/src/test-utils/mockDebugLogger.js.map +1 -1
  106. package/dist/src/test-utils/render.js.map +1 -1
  107. package/dist/src/test-utils/settings.js.map +1 -1
  108. package/dist/src/test-utils/svg.js.map +1 -1
  109. package/dist/src/ui/App.d.ts +1 -1
  110. package/dist/src/ui/App.js.map +1 -1
  111. package/dist/src/ui/AppContainer.d.ts +1 -1
  112. package/dist/src/ui/AppContainer.js.map +1 -1
  113. package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
  114. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  115. package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
  116. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  117. package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
  118. package/dist/src/ui/auth/BannedAccountDialog.js.map +1 -1
  119. package/dist/src/ui/auth/LoginRestartDialog.d.ts +1 -1
  120. package/dist/src/ui/auth/LoginRestartDialog.js.map +1 -1
  121. package/dist/src/ui/auth/useAuth.d.ts +1 -0
  122. package/dist/src/ui/auth/useAuth.js.map +1 -1
  123. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  124. package/dist/src/ui/commands/agentsCommand.js.map +1 -1
  125. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  126. package/dist/src/ui/commands/bugMemoryCommand.js.map +1 -1
  127. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  128. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  129. package/dist/src/ui/commands/commandsCommand.js.map +1 -1
  130. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  131. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  132. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  133. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  134. package/dist/src/ui/commands/exportSessionCommand.js.map +1 -1
  135. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  136. package/dist/src/ui/commands/helpCommand.js.map +1 -1
  137. package/dist/src/ui/commands/hooksCommand.js.map +1 -1
  138. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  139. package/dist/src/ui/commands/initCommand.js.map +1 -1
  140. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  141. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  142. package/dist/src/ui/commands/modelCommand.js.map +1 -1
  143. package/dist/src/ui/commands/oncallCommand.js.map +1 -1
  144. package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
  145. package/dist/src/ui/commands/planCommand.js.map +1 -1
  146. package/dist/src/ui/commands/policiesCommand.js.map +1 -1
  147. package/dist/src/ui/commands/quitCommand.js +1 -1
  148. package/dist/src/ui/commands/quitCommand.js.map +1 -1
  149. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  150. package/dist/src/ui/commands/rewindCommand.js.map +1 -1
  151. package/dist/src/ui/commands/setupGithubCommand.js +3 -3
  152. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  153. package/dist/src/ui/commands/skillsCommand.js.map +1 -1
  154. package/dist/src/ui/commands/statsCommand.js.map +1 -1
  155. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
  156. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  157. package/dist/src/ui/commands/types.js +1 -1
  158. package/dist/src/ui/commands/types.js.map +1 -1
  159. package/dist/src/ui/commands/upgradeCommand.js.map +1 -1
  160. package/dist/src/ui/components/AdminSettingsChangedDialog.d.ts +1 -1
  161. package/dist/src/ui/components/AdminSettingsChangedDialog.js.map +1 -1
  162. package/dist/src/ui/components/AgentConfigDialog.js.map +1 -1
  163. package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +1 -1
  164. package/dist/src/ui/components/AppHeader.d.ts +1 -1
  165. package/dist/src/ui/components/AppHeader.js.map +1 -1
  166. package/dist/src/ui/components/ApprovalModeIndicator.js.map +1 -1
  167. package/dist/src/ui/components/AskUserDialog.js +12 -12
  168. package/dist/src/ui/components/AskUserDialog.js.map +1 -1
  169. package/dist/src/ui/components/BackgroundTaskDisplay.d.ts +1 -1
  170. package/dist/src/ui/components/BackgroundTaskDisplay.js.map +1 -1
  171. package/dist/src/ui/components/Banner.d.ts +1 -1
  172. package/dist/src/ui/components/Banner.js.map +1 -1
  173. package/dist/src/ui/components/Checklist.js.map +1 -1
  174. package/dist/src/ui/components/ChecklistItem.js.map +1 -1
  175. package/dist/src/ui/components/CliSpinner.d.ts +1 -1
  176. package/dist/src/ui/components/CliSpinner.js.map +1 -1
  177. package/dist/src/ui/components/ColorsDisplay.js.map +1 -1
  178. package/dist/src/ui/components/Composer.d.ts +2 -2
  179. package/dist/src/ui/components/Composer.js.map +1 -1
  180. package/dist/src/ui/components/ConfigExtensionDialog.js.map +1 -1
  181. package/dist/src/ui/components/ConfigInitDisplay.d.ts +1 -1
  182. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
  183. package/dist/src/ui/components/ConsentPrompt.d.ts +1 -1
  184. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -1
  185. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  186. package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
  187. package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
  188. package/dist/src/ui/components/DebugProfiler.d.ts +1 -1
  189. package/dist/src/ui/components/DebugProfiler.js.map +1 -1
  190. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
  191. package/dist/src/ui/components/DialogManager.d.ts +1 -1
  192. package/dist/src/ui/components/DialogManager.js.map +1 -1
  193. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  194. package/dist/src/ui/components/EmptyWalletDialog.js.map +1 -1
  195. package/dist/src/ui/components/ExitPlanModeDialog.js.map +1 -1
  196. package/dist/src/ui/components/FolderTrustDialog.js +1 -1
  197. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  198. package/dist/src/ui/components/Footer.js.map +1 -1
  199. package/dist/src/ui/components/FooterConfigDialog.js.map +1 -1
  200. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
  201. package/dist/src/ui/components/GeminiSpinner.js.map +1 -1
  202. package/dist/src/ui/components/Header.js.map +1 -1
  203. package/dist/src/ui/components/HookStatusDisplay.js.map +1 -1
  204. package/dist/src/ui/components/HooksDialog.js.map +1 -1
  205. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +1 -1
  206. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -1
  207. package/dist/src/ui/components/InboxDialog.js.map +1 -1
  208. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  209. package/dist/src/ui/components/ListeningIndicator.js.map +1 -1
  210. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  211. package/dist/src/ui/components/LogoutConfirmationDialog.js +1 -1
  212. package/dist/src/ui/components/LogoutConfirmationDialog.js.map +1 -1
  213. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +1 -1
  214. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
  215. package/dist/src/ui/components/MainContent.d.ts +1 -1
  216. package/dist/src/ui/components/MainContent.js.map +1 -1
  217. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
  218. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  219. package/dist/src/ui/components/ModelQuotaDisplay.d.ts +1 -1
  220. package/dist/src/ui/components/ModelQuotaDisplay.js.map +1 -1
  221. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
  222. package/dist/src/ui/components/MultiFolderTrustDialog.js +1 -1
  223. package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -1
  224. package/dist/src/ui/components/NewAgentsNotification.d.ts +1 -1
  225. package/dist/src/ui/components/NewAgentsNotification.js +1 -1
  226. package/dist/src/ui/components/NewAgentsNotification.js.map +1 -1
  227. package/dist/src/ui/components/Notifications.d.ts +1 -1
  228. package/dist/src/ui/components/Notifications.js.map +1 -1
  229. package/dist/src/ui/components/OverageMenuDialog.js.map +1 -1
  230. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
  231. package/dist/src/ui/components/PolicyUpdateDialog.js +1 -1
  232. package/dist/src/ui/components/PolicyUpdateDialog.js.map +1 -1
  233. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  234. package/dist/src/ui/components/ProgressBar.js.map +1 -1
  235. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +1 -1
  236. package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -1
  237. package/dist/src/ui/components/QuittingDisplay.d.ts +1 -1
  238. package/dist/src/ui/components/QuittingDisplay.js.map +1 -1
  239. package/dist/src/ui/components/QuotaDisplay.js.map +1 -1
  240. package/dist/src/ui/components/QuotaStatsInfo.js.map +1 -1
  241. package/dist/src/ui/components/RewindConfirmation.js +1 -1
  242. package/dist/src/ui/components/RewindConfirmation.js.map +1 -1
  243. package/dist/src/ui/components/RewindViewer.js.map +1 -1
  244. package/dist/src/ui/components/SessionBrowser/utils.d.ts +2 -2
  245. package/dist/src/ui/components/SessionBrowser/utils.js.map +1 -1
  246. package/dist/src/ui/components/SessionBrowser.js.map +1 -1
  247. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
  248. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  249. package/dist/src/ui/components/ShellInputPrompt.js.map +1 -1
  250. package/dist/src/ui/components/ShowMoreLines.d.ts +1 -1
  251. package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
  252. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  253. package/dist/src/ui/components/StatusDisplay.js.map +1 -1
  254. package/dist/src/ui/components/StatusRow.js.map +1 -1
  255. package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -1
  256. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  257. package/dist/src/ui/components/Table.d.ts +1 -1
  258. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  259. package/dist/src/ui/components/ThemedGradient.js.map +1 -1
  260. package/dist/src/ui/components/ToastDisplay.js.map +1 -1
  261. package/dist/src/ui/components/ToolConfirmationQueue.js.map +1 -1
  262. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
  263. package/dist/src/ui/components/UpdateNotification.d.ts +1 -1
  264. package/dist/src/ui/components/UserIdentity.js.map +1 -1
  265. package/dist/src/ui/components/ValidationDialog.js.map +1 -1
  266. package/dist/src/ui/components/VoiceModelDialog.js.map +1 -1
  267. package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -0
  268. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
  269. package/dist/src/ui/components/messages/DenseToolMessage.js.map +1 -1
  270. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  271. package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
  272. package/dist/src/ui/components/messages/SubagentGroupDisplay.js.map +1 -1
  273. package/dist/src/ui/components/messages/SubagentProgressDisplay.js.map +1 -1
  274. package/dist/src/ui/components/messages/ThinkingMessage.js.map +1 -1
  275. package/dist/src/ui/components/messages/Todo.js.map +1 -1
  276. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  277. package/dist/src/ui/components/messages/ToolGroupDisplay.js.map +1 -1
  278. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  279. package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -1
  280. package/dist/src/ui/components/messages/ToolShared.js.map +1 -1
  281. package/dist/src/ui/components/messages/TopicMessage.js.map +1 -1
  282. package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -1
  283. package/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
  284. package/dist/src/ui/components/shared/DialogFooter.js.map +1 -1
  285. package/dist/src/ui/components/shared/EnumSelector.d.ts +1 -1
  286. package/dist/src/ui/components/shared/EnumSelector.js.map +1 -1
  287. package/dist/src/ui/components/shared/ExpandableText.js.map +1 -1
  288. package/dist/src/ui/components/shared/HalfLinePaddedBox.js.map +1 -1
  289. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
  290. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
  291. package/dist/src/ui/components/shared/Scrollable.js.map +1 -1
  292. package/dist/src/ui/components/shared/ScrollableList.d.ts +1 -1
  293. package/dist/src/ui/components/shared/ScrollableList.js.map +1 -1
  294. package/dist/src/ui/components/shared/SearchableList.js.map +1 -1
  295. package/dist/src/ui/components/shared/SlicingMaxSizedBox.d.ts +2 -1
  296. package/dist/src/ui/components/shared/SlicingMaxSizedBox.js.map +1 -1
  297. package/dist/src/ui/components/shared/TabHeader.js.map +1 -1
  298. package/dist/src/ui/components/shared/TextInput.js.map +1 -1
  299. package/dist/src/ui/components/shared/VirtualizedList.d.ts +1 -1
  300. package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
  301. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
  302. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  303. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
  304. package/dist/src/ui/components/triage/TriageDuplicates.d.ts +2 -2
  305. package/dist/src/ui/components/triage/TriageDuplicates.js +2 -2
  306. package/dist/src/ui/components/triage/TriageDuplicates.js.map +1 -1
  307. package/dist/src/ui/components/triage/TriageIssues.d.ts +3 -3
  308. package/dist/src/ui/components/triage/TriageIssues.js.map +1 -1
  309. package/dist/src/ui/components/views/AgentsStatus.js.map +1 -1
  310. package/dist/src/ui/components/views/ChatList.js.map +1 -1
  311. package/dist/src/ui/components/views/ExtensionDetails.js.map +1 -1
  312. package/dist/src/ui/components/views/ExtensionRegistryView.js.map +1 -1
  313. package/dist/src/ui/components/views/ExtensionsList.js.map +1 -1
  314. package/dist/src/ui/components/views/McpStatus.js.map +1 -1
  315. package/dist/src/ui/components/views/SkillsList.js.map +1 -1
  316. package/dist/src/ui/constants.js +2 -2
  317. package/dist/src/ui/constants.js.map +1 -1
  318. package/dist/src/ui/contexts/AppContext.d.ts +1 -0
  319. package/dist/src/ui/contexts/AppContext.js.map +1 -1
  320. package/dist/src/ui/contexts/AskUserActionsContext.js.map +1 -1
  321. package/dist/src/ui/contexts/ConfigContext.js.map +1 -1
  322. package/dist/src/ui/contexts/InputContext.d.ts +1 -0
  323. package/dist/src/ui/contexts/InputContext.js.map +1 -1
  324. package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
  325. package/dist/src/ui/contexts/KeypressContext.js +9 -9
  326. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  327. package/dist/src/ui/contexts/MouseContext.d.ts +1 -1
  328. package/dist/src/ui/contexts/MouseContext.js.map +1 -1
  329. package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
  330. package/dist/src/ui/contexts/QuotaContext.d.ts +1 -0
  331. package/dist/src/ui/contexts/QuotaContext.js.map +1 -1
  332. package/dist/src/ui/contexts/ScrollProvider.d.ts +1 -1
  333. package/dist/src/ui/contexts/ScrollProvider.js.map +1 -1
  334. package/dist/src/ui/contexts/SessionContext.js +1 -1
  335. package/dist/src/ui/contexts/SessionContext.js.map +1 -1
  336. package/dist/src/ui/contexts/SettingsContext.js.map +1 -1
  337. package/dist/src/ui/contexts/ShellFocusContext.d.ts +1 -0
  338. package/dist/src/ui/contexts/StreamingContext.js.map +1 -1
  339. package/dist/src/ui/contexts/TerminalContext.d.ts +1 -1
  340. package/dist/src/ui/contexts/TerminalContext.js.map +1 -1
  341. package/dist/src/ui/contexts/ToolActionsContext.js.map +1 -1
  342. package/dist/src/ui/contexts/UIActionsContext.d.ts +1 -0
  343. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  344. package/dist/src/ui/contexts/UIStateContext.d.ts +1 -0
  345. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  346. package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
  347. package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
  348. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  349. package/dist/src/ui/hooks/creditsFlowHandler.d.ts +1 -0
  350. package/dist/src/ui/hooks/creditsFlowHandler.js.map +1 -1
  351. package/dist/src/ui/hooks/shell-completions/gitProvider.js.map +1 -1
  352. package/dist/src/ui/hooks/shell-completions/index.js.map +1 -1
  353. package/dist/src/ui/hooks/shell-completions/npmProvider.js.map +1 -1
  354. package/dist/src/ui/hooks/shellReducer.js.map +1 -1
  355. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
  356. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  357. package/dist/src/ui/hooks/toolMapping.js.map +1 -1
  358. package/dist/src/ui/hooks/useAgentStream.js.map +1 -1
  359. package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -1
  360. package/dist/src/ui/hooks/useApprovalModeIndicator.js.map +1 -1
  361. package/dist/src/ui/hooks/useAtCompletion.js +1 -1
  362. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  363. package/dist/src/ui/hooks/useBackgroundTaskManager.d.ts +1 -0
  364. package/dist/src/ui/hooks/useBackgroundTaskManager.js.map +1 -1
  365. package/dist/src/ui/hooks/useBanner.js.map +1 -1
  366. package/dist/src/ui/hooks/useCommandCompletion.js +1 -1
  367. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  368. package/dist/src/ui/hooks/useCompletion.d.ts +1 -0
  369. package/dist/src/ui/hooks/useCompletion.js.map +1 -1
  370. package/dist/src/ui/hooks/useComposerStatus.js.map +1 -1
  371. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  372. package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
  373. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
  374. package/dist/src/ui/hooks/useExecutionLifecycle.d.ts +1 -1
  375. package/dist/src/ui/hooks/useExecutionLifecycle.js.map +1 -1
  376. package/dist/src/ui/hooks/useExtensionRegistry.js.map +1 -1
  377. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +4 -3
  378. package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
  379. package/dist/src/ui/hooks/useFlickerDetector.d.ts +1 -0
  380. package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -1
  381. package/dist/src/ui/hooks/useFocus.js.map +1 -1
  382. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  383. package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
  384. package/dist/src/ui/hooks/useGeminiStream.js +1 -1
  385. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  386. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
  387. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
  388. package/dist/src/ui/hooks/useHookDisplayState.js.map +1 -1
  389. package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -1
  390. package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -1
  391. package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +1 -0
  392. package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -1
  393. package/dist/src/ui/hooks/useInlineEditBuffer.d.ts +2 -1
  394. package/dist/src/ui/hooks/useInlineEditBuffer.js.map +1 -1
  395. package/dist/src/ui/hooks/useInputHistory.js.map +1 -1
  396. package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -1
  397. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  398. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
  399. package/dist/src/ui/hooks/useMcpStatus.js.map +1 -1
  400. package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -1
  401. package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
  402. package/dist/src/ui/hooks/useMouse.js.map +1 -1
  403. package/dist/src/ui/hooks/useMouseClick.d.ts +1 -1
  404. package/dist/src/ui/hooks/useMouseClick.js.map +1 -1
  405. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +1 -1
  406. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -1
  407. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  408. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
  409. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
  410. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
  411. package/dist/src/ui/hooks/useRegistrySearch.js.map +1 -1
  412. package/dist/src/ui/hooks/useRepeatedKeyPress.js.map +1 -1
  413. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -1
  414. package/dist/src/ui/hooks/useRewind.js.map +1 -1
  415. package/dist/src/ui/hooks/useRunEventNotifications.js +1 -1
  416. package/dist/src/ui/hooks/useRunEventNotifications.js.map +1 -1
  417. package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
  418. package/dist/src/ui/hooks/useSessionBrowser.d.ts +1 -1
  419. package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -1
  420. package/dist/src/ui/hooks/useSessionResume.d.ts +1 -1
  421. package/dist/src/ui/hooks/useSessionResume.js.map +1 -1
  422. package/dist/src/ui/hooks/useSettingsNavigation.js.map +1 -1
  423. package/dist/src/ui/hooks/useShellCompletion.js.map +1 -1
  424. package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
  425. package/dist/src/ui/hooks/useShellInactivityStatus.js.map +1 -1
  426. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  427. package/dist/src/ui/hooks/useSnowfall.js.map +1 -1
  428. package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
  429. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
  430. package/dist/src/ui/hooks/useSuspend.js.map +1 -1
  431. package/dist/src/ui/hooks/useTabbedNavigation.js.map +1 -1
  432. package/dist/src/ui/hooks/useTerminalTheme.js.map +1 -1
  433. package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
  434. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  435. package/dist/src/ui/hooks/useTimedMessage.js.map +1 -1
  436. package/dist/src/ui/hooks/useTimer.js.map +1 -1
  437. package/dist/src/ui/hooks/useTips.js.map +1 -1
  438. package/dist/src/ui/hooks/useToolScheduler.d.ts +1 -0
  439. package/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
  440. package/dist/src/ui/hooks/useTurnActivityMonitor.js.map +1 -1
  441. package/dist/src/ui/hooks/useVisibilityToggle.js.map +1 -1
  442. package/dist/src/ui/hooks/useVoiceMode.js.map +1 -1
  443. package/dist/src/ui/hooks/vim.js.map +1 -1
  444. package/dist/src/ui/key/keyBindings.js +5 -4
  445. package/dist/src/ui/key/keyBindings.js.map +1 -1
  446. package/dist/src/ui/key/keyMatchers.js.map +1 -1
  447. package/dist/src/ui/key/keyToAnsi.js.map +1 -1
  448. package/dist/src/ui/key/keybindingUtils.js.map +1 -1
  449. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
  450. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
  451. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
  452. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +1 -1
  453. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -1
  454. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +1 -1
  455. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -1
  456. package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
  457. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -1
  458. package/dist/src/ui/state/extensions.js +1 -1
  459. package/dist/src/ui/state/extensions.js.map +1 -1
  460. package/dist/src/ui/themes/builtin/dark/ansi-dark.js +1 -1
  461. package/dist/src/ui/themes/builtin/dark/ansi-dark.js.map +1 -1
  462. package/dist/src/ui/themes/builtin/dark/holiday-dark.js +1 -1
  463. package/dist/src/ui/themes/builtin/dark/holiday-dark.js.map +1 -1
  464. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js +17 -17
  465. package/dist/src/ui/themes/builtin/dark/shades-of-purple-dark.js.map +1 -1
  466. package/dist/src/ui/themes/builtin/light/github-light.js +1 -1
  467. package/dist/src/ui/themes/builtin/light/github-light.js.map +1 -1
  468. package/dist/src/ui/themes/builtin/light/xcode-light.js +1 -1
  469. package/dist/src/ui/themes/builtin/light/xcode-light.js.map +1 -1
  470. package/dist/src/ui/themes/color-utils.js.map +1 -1
  471. package/dist/src/ui/themes/theme-manager.d.ts +1 -0
  472. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  473. package/dist/src/ui/themes/theme.js.map +1 -1
  474. package/dist/src/ui/types.js +5 -5
  475. package/dist/src/ui/types.js.map +1 -1
  476. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  477. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
  478. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  479. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  480. package/dist/src/ui/utils/antigravityUtils.js.map +1 -1
  481. package/dist/src/ui/utils/borderStyles.js.map +1 -1
  482. package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
  483. package/dist/src/ui/utils/commandUtils.js +2 -2
  484. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  485. package/dist/src/ui/utils/computeStats.js.map +1 -1
  486. package/dist/src/ui/utils/confirmingTool.js.map +1 -1
  487. package/dist/src/ui/utils/contextUsage.js.map +1 -1
  488. package/dist/src/ui/utils/directoryUtils.js.map +1 -1
  489. package/dist/src/ui/utils/displayUtils.js.map +1 -1
  490. package/dist/src/ui/utils/editorUtils.d.ts +1 -0
  491. package/dist/src/ui/utils/editorUtils.js.map +1 -1
  492. package/dist/src/ui/utils/formatters.d.ts +1 -1
  493. package/dist/src/ui/utils/formatters.js.map +1 -1
  494. package/dist/src/ui/utils/highlight.js.map +1 -1
  495. package/dist/src/ui/utils/historyExportUtils.js.map +1 -1
  496. package/dist/src/ui/utils/historyUtils.js +1 -1
  497. package/dist/src/ui/utils/historyUtils.js.map +1 -1
  498. package/dist/src/ui/utils/input.d.ts +2 -2
  499. package/dist/src/ui/utils/latexToUnicode.js.map +1 -1
  500. package/dist/src/ui/utils/markdownParsingUtils.js.map +1 -1
  501. package/dist/src/ui/utils/markdownUtilities.js.map +1 -1
  502. package/dist/src/ui/utils/mouse.js.map +1 -1
  503. package/dist/src/ui/utils/pendingAttentionNotification.js.map +1 -1
  504. package/dist/src/ui/utils/rewindFileOps.js.map +1 -1
  505. package/dist/src/ui/utils/terminalCapabilityManager.d.ts +1 -0
  506. package/dist/src/ui/utils/terminalCapabilityManager.js +2 -1
  507. package/dist/src/ui/utils/terminalCapabilityManager.js.map +1 -1
  508. package/dist/src/ui/utils/terminalSetup.js.map +1 -1
  509. package/dist/src/ui/utils/terminalUtils.js.map +1 -1
  510. package/dist/src/ui/utils/textOutput.d.ts +1 -0
  511. package/dist/src/ui/utils/textOutput.js.map +1 -1
  512. package/dist/src/ui/utils/textUtils.js.map +1 -1
  513. package/dist/src/ui/utils/toolLayoutUtils.js.map +1 -1
  514. package/dist/src/ui/utils/ui-sizing.js.map +1 -1
  515. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  516. package/dist/src/ui/utils/urlSecurityUtils.js.map +1 -1
  517. package/dist/src/utils/activityLogger.d.ts +1 -0
  518. package/dist/src/utils/activityLogger.js.map +1 -1
  519. package/dist/src/utils/agentUtils.js.map +1 -1
  520. package/dist/src/utils/autoMemory.js.map +1 -1
  521. package/dist/src/utils/cleanup.js.map +1 -1
  522. package/dist/src/utils/commands.js.map +1 -1
  523. package/dist/src/utils/commentJson.js.map +1 -1
  524. package/dist/src/utils/deepMerge.js.map +1 -1
  525. package/dist/src/utils/devtoolsService.js +1 -1
  526. package/dist/src/utils/devtoolsService.js.map +1 -1
  527. package/dist/src/utils/dialogScopeUtils.js.map +1 -1
  528. package/dist/src/utils/envVarResolver.js.map +1 -1
  529. package/dist/src/utils/errors.js.map +1 -1
  530. package/dist/src/utils/events.d.ts +1 -0
  531. package/dist/src/utils/events.js +2 -2
  532. package/dist/src/utils/events.js.map +1 -1
  533. package/dist/src/utils/featureToggleUtils.js.map +1 -1
  534. package/dist/src/utils/gitUtils.js +1 -1
  535. package/dist/src/utils/gitUtils.js.map +1 -1
  536. package/dist/src/utils/handleAutoUpdate.d.ts +1 -0
  537. package/dist/src/utils/handleAutoUpdate.js.map +1 -1
  538. package/dist/src/utils/hookSettings.js.map +1 -1
  539. package/dist/src/utils/hookUtils.js.map +1 -1
  540. package/dist/src/utils/installationInfo.js +2 -2
  541. package/dist/src/utils/installationInfo.js.map +1 -1
  542. package/dist/src/utils/jsonoutput.js.map +1 -1
  543. package/dist/src/utils/logCleanup.js.map +1 -1
  544. package/dist/src/utils/persistentState.js.map +1 -1
  545. package/dist/src/utils/processUtils.d.ts +1 -0
  546. package/dist/src/utils/processUtils.js.map +1 -1
  547. package/dist/src/utils/readStdin.js.map +1 -1
  548. package/dist/src/utils/relaunch.js.map +1 -1
  549. package/dist/src/utils/resize-observer-polyfill.d.ts +2 -0
  550. package/dist/src/utils/resize-observer-polyfill.js +7 -0
  551. package/dist/src/utils/resize-observer-polyfill.js.map +1 -0
  552. package/dist/src/utils/resolvePath.js.map +1 -1
  553. package/dist/src/utils/sandbox.js +1 -1
  554. package/dist/src/utils/sandbox.js.map +1 -1
  555. package/dist/src/utils/sandboxUtils.js.map +1 -1
  556. package/dist/src/utils/sessionCleanup.js +3 -3
  557. package/dist/src/utils/sessionCleanup.js.map +1 -1
  558. package/dist/src/utils/sessionUtils.d.ts +1 -1
  559. package/dist/src/utils/sessionUtils.js +1 -1
  560. package/dist/src/utils/sessionUtils.js.map +1 -1
  561. package/dist/src/utils/sessions.js.map +1 -1
  562. package/dist/src/utils/settingsUtils.js.map +1 -1
  563. package/dist/src/utils/skillUtils.js.map +1 -1
  564. package/dist/src/utils/spawnWrapper.d.ts +1 -0
  565. package/dist/src/utils/startupWarnings.js.map +1 -1
  566. package/dist/src/utils/terminalNotifications.js +1 -1
  567. package/dist/src/utils/terminalNotifications.js.map +1 -1
  568. package/dist/src/utils/terminalTheme.js.map +1 -1
  569. package/dist/src/utils/updateEventEmitter.d.ts +1 -0
  570. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  571. package/dist/src/utils/windowTitle.js.map +1 -1
  572. package/dist/src/utils/worktreeSetup.js.map +1 -1
  573. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  574. package/dist/tsconfig.tsbuildinfo +1 -1
  575. package/package.json +17 -14
  576. package/dist/src/acp/acpCommandHandler.test.d.ts +0 -6
  577. package/dist/src/acp/acpCommandHandler.test.js +0 -28
  578. package/dist/src/acp/acpCommandHandler.test.js.map +0 -1
  579. package/dist/src/acp/acpErrors.test.d.ts +0 -6
  580. package/dist/src/acp/acpErrors.test.js +0 -38
  581. package/dist/src/acp/acpErrors.test.js.map +0 -1
  582. package/dist/src/acp/acpFileSystemService.test.d.ts +0 -6
  583. package/dist/src/acp/acpFileSystemService.test.js +0 -162
  584. package/dist/src/acp/acpFileSystemService.test.js.map +0 -1
  585. package/dist/src/acp/acpResume.test.d.ts +0 -6
  586. package/dist/src/acp/acpResume.test.js +0 -260
  587. package/dist/src/acp/acpResume.test.js.map +0 -1
  588. package/dist/src/acp/acpRpcDispatcher.test.d.ts +0 -6
  589. package/dist/src/acp/acpRpcDispatcher.test.js +0 -238
  590. package/dist/src/acp/acpRpcDispatcher.test.js.map +0 -1
  591. package/dist/src/acp/acpSession.test.d.ts +0 -6
  592. package/dist/src/acp/acpSession.test.js +0 -742
  593. package/dist/src/acp/acpSession.test.js.map +0 -1
  594. package/dist/src/acp/acpSessionManager.test.d.ts +0 -6
  595. package/dist/src/acp/acpSessionManager.test.js +0 -283
  596. package/dist/src/acp/acpSessionManager.test.js.map +0 -1
  597. package/dist/src/acp/commands/extensions.test.d.ts +0 -6
  598. package/dist/src/acp/commands/extensions.test.js +0 -70
  599. package/dist/src/acp/commands/extensions.test.js.map +0 -1
  600. package/dist/src/acp/commands/help.test.d.ts +0 -6
  601. package/dist/src/acp/commands/help.test.js +0 -40
  602. package/dist/src/acp/commands/help.test.js.map +0 -1
  603. package/dist/src/acp/commands/restore.test.d.ts +0 -6
  604. package/dist/src/acp/commands/restore.test.js +0 -173
  605. package/dist/src/acp/commands/restore.test.js.map +0 -1
  606. package/dist/src/commands/extensions/configure.test.d.ts +0 -1
  607. package/dist/src/commands/extensions/configure.test.js +0 -195
  608. package/dist/src/commands/extensions/configure.test.js.map +0 -1
  609. package/dist/src/commands/extensions/disable.test.d.ts +0 -6
  610. package/dist/src/commands/extensions/disable.test.js +0 -169
  611. package/dist/src/commands/extensions/disable.test.js.map +0 -1
  612. package/dist/src/commands/extensions/enable.test.d.ts +0 -6
  613. package/dist/src/commands/extensions/enable.test.js +0 -199
  614. package/dist/src/commands/extensions/enable.test.js.map +0 -1
  615. package/dist/src/commands/extensions/install.test.d.ts +0 -6
  616. package/dist/src/commands/extensions/install.test.js +0 -311
  617. package/dist/src/commands/extensions/install.test.js.map +0 -1
  618. package/dist/src/commands/extensions/link.test.d.ts +0 -6
  619. package/dist/src/commands/extensions/link.test.js +0 -121
  620. package/dist/src/commands/extensions/link.test.js.map +0 -1
  621. package/dist/src/commands/extensions/list.test.d.ts +0 -6
  622. package/dist/src/commands/extensions/list.test.js +0 -132
  623. package/dist/src/commands/extensions/list.test.js.map +0 -1
  624. package/dist/src/commands/extensions/new.test.d.ts +0 -6
  625. package/dist/src/commands/extensions/new.test.js +0 -62
  626. package/dist/src/commands/extensions/new.test.js.map +0 -1
  627. package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
  628. package/dist/src/commands/extensions/uninstall.test.js +0 -240
  629. package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
  630. package/dist/src/commands/extensions/update.test.d.ts +0 -6
  631. package/dist/src/commands/extensions/update.test.js +0 -196
  632. package/dist/src/commands/extensions/update.test.js.map +0 -1
  633. package/dist/src/commands/extensions/validate.test.d.ts +0 -6
  634. package/dist/src/commands/extensions/validate.test.js +0 -96
  635. package/dist/src/commands/extensions/validate.test.js.map +0 -1
  636. package/dist/src/commands/extensions.test.d.ts +0 -6
  637. package/dist/src/commands/extensions.test.js +0 -67
  638. package/dist/src/commands/extensions.test.js.map +0 -1
  639. package/dist/src/commands/gemma/logs.test.d.ts +0 -6
  640. package/dist/src/commands/gemma/logs.test.js +0 -122
  641. package/dist/src/commands/gemma/logs.test.js.map +0 -1
  642. package/dist/src/commands/gemma/platform.test.d.ts +0 -6
  643. package/dist/src/commands/gemma/platform.test.js +0 -108
  644. package/dist/src/commands/gemma/platform.test.js.map +0 -1
  645. package/dist/src/commands/gemma/setup.test.d.ts +0 -6
  646. package/dist/src/commands/gemma/setup.test.js +0 -36
  647. package/dist/src/commands/gemma/setup.test.js.map +0 -1
  648. package/dist/src/commands/gemma/stop.test.d.ts +0 -6
  649. package/dist/src/commands/gemma/stop.test.js +0 -89
  650. package/dist/src/commands/gemma/stop.test.js.map +0 -1
  651. package/dist/src/commands/hooks/migrate.test.d.ts +0 -6
  652. package/dist/src/commands/hooks/migrate.test.js +0 -388
  653. package/dist/src/commands/hooks/migrate.test.js.map +0 -1
  654. package/dist/src/commands/mcp/add.test.d.ts +0 -6
  655. package/dist/src/commands/mcp/add.test.js +0 -274
  656. package/dist/src/commands/mcp/add.test.js.map +0 -1
  657. package/dist/src/commands/mcp/list.test.d.ts +0 -6
  658. package/dist/src/commands/mcp/list.test.js +0 -477
  659. package/dist/src/commands/mcp/list.test.js.map +0 -1
  660. package/dist/src/commands/mcp/remove.test.d.ts +0 -6
  661. package/dist/src/commands/mcp/remove.test.js +0 -206
  662. package/dist/src/commands/mcp/remove.test.js.map +0 -1
  663. package/dist/src/commands/mcp.test.d.ts +0 -6
  664. package/dist/src/commands/mcp.test.js +0 -64
  665. package/dist/src/commands/mcp.test.js.map +0 -1
  666. package/dist/src/commands/skills/disable.test.d.ts +0 -6
  667. package/dist/src/commands/skills/disable.test.js +0 -93
  668. package/dist/src/commands/skills/disable.test.js.map +0 -1
  669. package/dist/src/commands/skills/enable.test.d.ts +0 -6
  670. package/dist/src/commands/skills/enable.test.js +0 -104
  671. package/dist/src/commands/skills/enable.test.js.map +0 -1
  672. package/dist/src/commands/skills/install.test.d.ts +0 -6
  673. package/dist/src/commands/skills/install.test.js +0 -99
  674. package/dist/src/commands/skills/install.test.js.map +0 -1
  675. package/dist/src/commands/skills/link.test.d.ts +0 -6
  676. package/dist/src/commands/skills/link.test.js +0 -53
  677. package/dist/src/commands/skills/link.test.js.map +0 -1
  678. package/dist/src/commands/skills/list.test.d.ts +0 -6
  679. package/dist/src/commands/skills/list.test.js +0 -127
  680. package/dist/src/commands/skills/list.test.js.map +0 -1
  681. package/dist/src/commands/skills/uninstall.test.d.ts +0 -6
  682. package/dist/src/commands/skills/uninstall.test.js +0 -65
  683. package/dist/src/commands/skills/uninstall.test.js.map +0 -1
  684. package/dist/src/commands/skills.test.d.ts +0 -6
  685. package/dist/src/commands/skills.test.js +0 -49
  686. package/dist/src/commands/skills.test.js.map +0 -1
  687. package/dist/src/commands/utils.test.d.ts +0 -6
  688. package/dist/src/commands/utils.test.js +0 -35
  689. package/dist/src/commands/utils.test.js.map +0 -1
  690. package/dist/src/config/auth.test.d.ts +0 -6
  691. package/dist/src/config/auth.test.js +0 -96
  692. package/dist/src/config/auth.test.js.map +0 -1
  693. package/dist/src/config/config.integration.test.d.ts +0 -6
  694. package/dist/src/config/config.integration.test.js +0 -205
  695. package/dist/src/config/config.integration.test.js.map +0 -1
  696. package/dist/src/config/config.test.d.ts +0 -6
  697. package/dist/src/config/config.test.js +0 -3124
  698. package/dist/src/config/config.test.js.map +0 -1
  699. package/dist/src/config/extension-manager-agents.test.d.ts +0 -6
  700. package/dist/src/config/extension-manager-agents.test.js +0 -116
  701. package/dist/src/config/extension-manager-agents.test.js.map +0 -1
  702. package/dist/src/config/extension-manager-hydration.test.d.ts +0 -6
  703. package/dist/src/config/extension-manager-hydration.test.js +0 -262
  704. package/dist/src/config/extension-manager-hydration.test.js.map +0 -1
  705. package/dist/src/config/extension-manager-permissions.test.d.ts +0 -6
  706. package/dist/src/config/extension-manager-permissions.test.js +0 -107
  707. package/dist/src/config/extension-manager-permissions.test.js.map +0 -1
  708. package/dist/src/config/extension-manager-scope.test.d.ts +0 -6
  709. package/dist/src/config/extension-manager-scope.test.js +0 -158
  710. package/dist/src/config/extension-manager-scope.test.js.map +0 -1
  711. package/dist/src/config/extension-manager-skills.test.d.ts +0 -6
  712. package/dist/src/config/extension-manager-skills.test.js +0 -157
  713. package/dist/src/config/extension-manager-skills.test.js.map +0 -1
  714. package/dist/src/config/extension-manager.test.d.ts +0 -6
  715. package/dist/src/config/extension-manager.test.js +0 -430
  716. package/dist/src/config/extension-manager.test.js.map +0 -1
  717. package/dist/src/config/extension.test.d.ts +0 -6
  718. package/dist/src/config/extension.test.js +0 -1800
  719. package/dist/src/config/extension.test.js.map +0 -1
  720. package/dist/src/config/extensionRegistryClient.test.d.ts +0 -6
  721. package/dist/src/config/extensionRegistryClient.test.js +0 -261
  722. package/dist/src/config/extensionRegistryClient.test.js.map +0 -1
  723. package/dist/src/config/extensions/consent.test.d.ts +0 -6
  724. package/dist/src/config/extensions/consent.test.js +0 -302
  725. package/dist/src/config/extensions/consent.test.js.map +0 -1
  726. package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
  727. package/dist/src/config/extensions/extensionEnablement.test.js +0 -404
  728. package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
  729. package/dist/src/config/extensions/extensionSettings.test.d.ts +0 -6
  730. package/dist/src/config/extensions/extensionSettings.test.js +0 -575
  731. package/dist/src/config/extensions/extensionSettings.test.js.map +0 -1
  732. package/dist/src/config/extensions/extensionUpdates.test.d.ts +0 -6
  733. package/dist/src/config/extensions/extensionUpdates.test.js +0 -265
  734. package/dist/src/config/extensions/extensionUpdates.test.js.map +0 -1
  735. package/dist/src/config/extensions/github.test.d.ts +0 -6
  736. package/dist/src/config/extensions/github.test.js +0 -454
  737. package/dist/src/config/extensions/github.test.js.map +0 -1
  738. package/dist/src/config/extensions/github_fetch.test.d.ts +0 -6
  739. package/dist/src/config/extensions/github_fetch.test.js +0 -171
  740. package/dist/src/config/extensions/github_fetch.test.js.map +0 -1
  741. package/dist/src/config/extensions/storage.test.d.ts +0 -6
  742. package/dist/src/config/extensions/storage.test.js +0 -64
  743. package/dist/src/config/extensions/storage.test.js.map +0 -1
  744. package/dist/src/config/extensions/update.test.d.ts +0 -6
  745. package/dist/src/config/extensions/update.test.js +0 -296
  746. package/dist/src/config/extensions/update.test.js.map +0 -1
  747. package/dist/src/config/extensions/variables.test.d.ts +0 -6
  748. package/dist/src/config/extensions/variables.test.js +0 -119
  749. package/dist/src/config/extensions/variables.test.js.map +0 -1
  750. package/dist/src/config/footerItems.test.d.ts +0 -6
  751. package/dist/src/config/footerItems.test.js +0 -180
  752. package/dist/src/config/footerItems.test.js.map +0 -1
  753. package/dist/src/config/mcp/mcpServerEnablement.test.d.ts +0 -6
  754. package/dist/src/config/mcp/mcpServerEnablement.test.js +0 -148
  755. package/dist/src/config/mcp/mcpServerEnablement.test.js.map +0 -1
  756. package/dist/src/config/mutual-exclusivity.test.d.ts +0 -6
  757. package/dist/src/config/mutual-exclusivity.test.js +0 -33
  758. package/dist/src/config/mutual-exclusivity.test.js.map +0 -1
  759. package/dist/src/config/policy-engine.integration.test.d.ts +0 -6
  760. package/dist/src/config/policy-engine.integration.test.js +0 -394
  761. package/dist/src/config/policy-engine.integration.test.js.map +0 -1
  762. package/dist/src/config/policy.test.d.ts +0 -6
  763. package/dist/src/config/policy.test.js +0 -199
  764. package/dist/src/config/policy.test.js.map +0 -1
  765. package/dist/src/config/sandboxConfig.test.d.ts +0 -6
  766. package/dist/src/config/sandboxConfig.test.js +0 -401
  767. package/dist/src/config/sandboxConfig.test.js.map +0 -1
  768. package/dist/src/config/settingPaths.test.d.ts +0 -6
  769. package/dist/src/config/settingPaths.test.js +0 -22
  770. package/dist/src/config/settingPaths.test.js.map +0 -1
  771. package/dist/src/config/settings-env-isolation.test.d.ts +0 -6
  772. package/dist/src/config/settings-env-isolation.test.js +0 -188
  773. package/dist/src/config/settings-env-isolation.test.js.map +0 -1
  774. package/dist/src/config/settings-validation.test.d.ts +0 -6
  775. package/dist/src/config/settings-validation.test.js +0 -464
  776. package/dist/src/config/settings-validation.test.js.map +0 -1
  777. package/dist/src/config/settings.test.d.ts +0 -6
  778. package/dist/src/config/settings.test.js +0 -2660
  779. package/dist/src/config/settings.test.js.map +0 -1
  780. package/dist/src/config/settingsSchema.test.d.ts +0 -6
  781. package/dist/src/config/settingsSchema.test.js +0 -450
  782. package/dist/src/config/settingsSchema.test.js.map +0 -1
  783. package/dist/src/config/settings_repro.test.d.ts +0 -6
  784. package/dist/src/config/settings_repro.test.js +0 -163
  785. package/dist/src/config/settings_repro.test.js.map +0 -1
  786. package/dist/src/config/settings_validation_warning.test.d.ts +0 -6
  787. package/dist/src/config/settings_validation_warning.test.js +0 -124
  788. package/dist/src/config/settings_validation_warning.test.js.map +0 -1
  789. package/dist/src/config/skipExtensions.test.d.ts +0 -6
  790. package/dist/src/config/skipExtensions.test.js +0 -49
  791. package/dist/src/config/skipExtensions.test.js.map +0 -1
  792. package/dist/src/config/trustedFolders.test.d.ts +0 -6
  793. package/dist/src/config/trustedFolders.test.js +0 -411
  794. package/dist/src/config/trustedFolders.test.js.map +0 -1
  795. package/dist/src/config/workspace-policy-cli.test.d.ts +0 -6
  796. package/dist/src/config/workspace-policy-cli.test.js +0 -204
  797. package/dist/src/config/workspace-policy-cli.test.js.map +0 -1
  798. package/dist/src/core/auth.test.d.ts +0 -6
  799. package/dist/src/core/auth.test.js +0 -93
  800. package/dist/src/core/auth.test.js.map +0 -1
  801. package/dist/src/core/initializer.test.d.ts +0 -6
  802. package/dist/src/core/initializer.test.js +0 -111
  803. package/dist/src/core/initializer.test.js.map +0 -1
  804. package/dist/src/core/theme.test.d.ts +0 -6
  805. package/dist/src/core/theme.test.js +0 -46
  806. package/dist/src/core/theme.test.js.map +0 -1
  807. package/dist/src/deferred.test.d.ts +0 -6
  808. package/dist/src/deferred.test.js +0 -180
  809. package/dist/src/deferred.test.js.map +0 -1
  810. package/dist/src/gemini.test.d.ts +0 -6
  811. package/dist/src/gemini.test.js +0 -1432
  812. package/dist/src/gemini.test.js.map +0 -1
  813. package/dist/src/gemini_cleanup.test.d.ts +0 -6
  814. package/dist/src/gemini_cleanup.test.js +0 -391
  815. package/dist/src/gemini_cleanup.test.js.map +0 -1
  816. package/dist/src/integration-tests/modelSteering.test.d.ts +0 -6
  817. package/dist/src/integration-tests/modelSteering.test.js +0 -62
  818. package/dist/src/integration-tests/modelSteering.test.js.map +0 -1
  819. package/dist/src/nonInteractiveCli.test.d.ts +0 -6
  820. package/dist/src/nonInteractiveCli.test.js +0 -1921
  821. package/dist/src/nonInteractiveCli.test.js.map +0 -1
  822. package/dist/src/nonInteractiveCliAgentSession.test.d.ts +0 -6
  823. package/dist/src/nonInteractiveCliAgentSession.test.js +0 -2015
  824. package/dist/src/nonInteractiveCliAgentSession.test.js.map +0 -1
  825. package/dist/src/output-redirection.test.d.ts +0 -6
  826. package/dist/src/output-redirection.test.js +0 -77
  827. package/dist/src/output-redirection.test.js.map +0 -1
  828. package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
  829. package/dist/src/services/BuiltinCommandLoader.test.js +0 -369
  830. package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
  831. package/dist/src/services/CommandService.test.d.ts +0 -6
  832. package/dist/src/services/CommandService.test.js +0 -74
  833. package/dist/src/services/CommandService.test.js.map +0 -1
  834. package/dist/src/services/FileCommandLoader.test.d.ts +0 -6
  835. package/dist/src/services/FileCommandLoader.test.js +0 -1128
  836. package/dist/src/services/FileCommandLoader.test.js.map +0 -1
  837. package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
  838. package/dist/src/services/McpPromptLoader.test.js +0 -411
  839. package/dist/src/services/McpPromptLoader.test.js.map +0 -1
  840. package/dist/src/services/SkillCommandLoader.test.d.ts +0 -6
  841. package/dist/src/services/SkillCommandLoader.test.js +0 -113
  842. package/dist/src/services/SkillCommandLoader.test.js.map +0 -1
  843. package/dist/src/services/SlashCommandConflictHandler.test.d.ts +0 -6
  844. package/dist/src/services/SlashCommandConflictHandler.test.js +0 -144
  845. package/dist/src/services/SlashCommandConflictHandler.test.js.map +0 -1
  846. package/dist/src/services/SlashCommandResolver.test.d.ts +0 -6
  847. package/dist/src/services/SlashCommandResolver.test.js +0 -186
  848. package/dist/src/services/SlashCommandResolver.test.js.map +0 -1
  849. package/dist/src/services/liteRtServerManager.test.d.ts +0 -6
  850. package/dist/src/services/liteRtServerManager.test.js +0 -54
  851. package/dist/src/services/liteRtServerManager.test.js.map +0 -1
  852. package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +0 -6
  853. package/dist/src/services/prompt-processors/argumentProcessor.test.js +0 -40
  854. package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +0 -1
  855. package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
  856. package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -177
  857. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
  858. package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
  859. package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
  860. package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
  861. package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +0 -6
  862. package/dist/src/services/prompt-processors/shellProcessor.test.js +0 -525
  863. package/dist/src/services/prompt-processors/shellProcessor.test.js.map +0 -1
  864. package/dist/src/test-utils/AppRig.test.d.ts +0 -6
  865. package/dist/src/test-utils/AppRig.test.js +0 -60
  866. package/dist/src/test-utils/AppRig.test.js.map +0 -1
  867. package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
  868. package/dist/src/test-utils/mockCommandContext.test.js +0 -51
  869. package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
  870. package/dist/src/test-utils/render.test.d.ts +0 -6
  871. package/dist/src/test-utils/render.test.js +0 -84
  872. package/dist/src/test-utils/render.test.js.map +0 -1
  873. package/dist/src/ui/App.test.d.ts +0 -6
  874. package/dist/src/ui/App.test.js +0 -244
  875. package/dist/src/ui/App.test.js.map +0 -1
  876. package/dist/src/ui/AppContainer.test.d.ts +0 -6
  877. package/dist/src/ui/AppContainer.test.js +0 -2824
  878. package/dist/src/ui/AppContainer.test.js.map +0 -1
  879. package/dist/src/ui/IdeIntegrationNudge.test.d.ts +0 -6
  880. package/dist/src/ui/IdeIntegrationNudge.test.js +0 -149
  881. package/dist/src/ui/IdeIntegrationNudge.test.js.map +0 -1
  882. package/dist/src/ui/ToolConfirmationFullFrame.test.d.ts +0 -1
  883. package/dist/src/ui/ToolConfirmationFullFrame.test.js +0 -153
  884. package/dist/src/ui/ToolConfirmationFullFrame.test.js.map +0 -1
  885. package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +0 -6
  886. package/dist/src/ui/auth/ApiAuthDialog.test.js +0 -127
  887. package/dist/src/ui/auth/ApiAuthDialog.test.js.map +0 -1
  888. package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
  889. package/dist/src/ui/auth/AuthDialog.test.js +0 -350
  890. package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
  891. package/dist/src/ui/auth/AuthInProgress.test.d.ts +0 -6
  892. package/dist/src/ui/auth/AuthInProgress.test.js +0 -99
  893. package/dist/src/ui/auth/AuthInProgress.test.js.map +0 -1
  894. package/dist/src/ui/auth/BannedAccountDialog.test.d.ts +0 -6
  895. package/dist/src/ui/auth/BannedAccountDialog.test.js +0 -141
  896. package/dist/src/ui/auth/BannedAccountDialog.test.js.map +0 -1
  897. package/dist/src/ui/auth/LoginRestartDialog.test.d.ts +0 -6
  898. package/dist/src/ui/auth/LoginRestartDialog.test.js +0 -79
  899. package/dist/src/ui/auth/LoginRestartDialog.test.js.map +0 -1
  900. package/dist/src/ui/auth/useAuth.test.d.ts +0 -6
  901. package/dist/src/ui/auth/useAuth.test.js +0 -214
  902. package/dist/src/ui/auth/useAuth.test.js.map +0 -1
  903. package/dist/src/ui/commands/aboutCommand.test.d.ts +0 -6
  904. package/dist/src/ui/commands/aboutCommand.test.js +0 -145
  905. package/dist/src/ui/commands/aboutCommand.test.js.map +0 -1
  906. package/dist/src/ui/commands/agentsCommand.test.d.ts +0 -6
  907. package/dist/src/ui/commands/agentsCommand.test.js +0 -382
  908. package/dist/src/ui/commands/agentsCommand.test.js.map +0 -1
  909. package/dist/src/ui/commands/authCommand.test.d.ts +0 -6
  910. package/dist/src/ui/commands/authCommand.test.js +0 -103
  911. package/dist/src/ui/commands/authCommand.test.js.map +0 -1
  912. package/dist/src/ui/commands/bugCommand.test.d.ts +0 -6
  913. package/dist/src/ui/commands/bugCommand.test.js +0 -305
  914. package/dist/src/ui/commands/bugCommand.test.js.map +0 -1
  915. package/dist/src/ui/commands/bugMemoryCommand.test.d.ts +0 -6
  916. package/dist/src/ui/commands/bugMemoryCommand.test.js +0 -100
  917. package/dist/src/ui/commands/bugMemoryCommand.test.js.map +0 -1
  918. package/dist/src/ui/commands/chatCommand.test.d.ts +0 -6
  919. package/dist/src/ui/commands/chatCommand.test.js +0 -627
  920. package/dist/src/ui/commands/chatCommand.test.js.map +0 -1
  921. package/dist/src/ui/commands/clearCommand.test.d.ts +0 -6
  922. package/dist/src/ui/commands/clearCommand.test.js +0 -98
  923. package/dist/src/ui/commands/clearCommand.test.js.map +0 -1
  924. package/dist/src/ui/commands/commandsCommand.test.d.ts +0 -6
  925. package/dist/src/ui/commands/commandsCommand.test.js +0 -115
  926. package/dist/src/ui/commands/commandsCommand.test.js.map +0 -1
  927. package/dist/src/ui/commands/compressCommand.test.d.ts +0 -6
  928. package/dist/src/ui/commands/compressCommand.test.js +0 -110
  929. package/dist/src/ui/commands/compressCommand.test.js.map +0 -1
  930. package/dist/src/ui/commands/copyCommand.test.d.ts +0 -6
  931. package/dist/src/ui/commands/copyCommand.test.js +0 -244
  932. package/dist/src/ui/commands/copyCommand.test.js.map +0 -1
  933. package/dist/src/ui/commands/corgiCommand.test.d.ts +0 -6
  934. package/dist/src/ui/commands/corgiCommand.test.js +0 -28
  935. package/dist/src/ui/commands/corgiCommand.test.js.map +0 -1
  936. package/dist/src/ui/commands/directoryCommand.test.d.ts +0 -6
  937. package/dist/src/ui/commands/directoryCommand.test.js +0 -365
  938. package/dist/src/ui/commands/directoryCommand.test.js.map +0 -1
  939. package/dist/src/ui/commands/docsCommand.test.d.ts +0 -6
  940. package/dist/src/ui/commands/docsCommand.test.js +0 -72
  941. package/dist/src/ui/commands/docsCommand.test.js.map +0 -1
  942. package/dist/src/ui/commands/editorCommand.test.d.ts +0 -6
  943. package/dist/src/ui/commands/editorCommand.test.js +0 -27
  944. package/dist/src/ui/commands/editorCommand.test.js.map +0 -1
  945. package/dist/src/ui/commands/exportSessionCommand.test.d.ts +0 -6
  946. package/dist/src/ui/commands/exportSessionCommand.test.js +0 -100
  947. package/dist/src/ui/commands/exportSessionCommand.test.js.map +0 -1
  948. package/dist/src/ui/commands/extensionsCommand.test.d.ts +0 -6
  949. package/dist/src/ui/commands/extensionsCommand.test.js +0 -947
  950. package/dist/src/ui/commands/extensionsCommand.test.js.map +0 -1
  951. package/dist/src/ui/commands/helpCommand.test.d.ts +0 -6
  952. package/dist/src/ui/commands/helpCommand.test.js +0 -94
  953. package/dist/src/ui/commands/helpCommand.test.js.map +0 -1
  954. package/dist/src/ui/commands/hooksCommand.test.d.ts +0 -6
  955. package/dist/src/ui/commands/hooksCommand.test.js +0 -562
  956. package/dist/src/ui/commands/hooksCommand.test.js.map +0 -1
  957. package/dist/src/ui/commands/ideCommand.test.d.ts +0 -6
  958. package/dist/src/ui/commands/ideCommand.test.js +0 -205
  959. package/dist/src/ui/commands/ideCommand.test.js.map +0 -1
  960. package/dist/src/ui/commands/initCommand.test.d.ts +0 -6
  961. package/dist/src/ui/commands/initCommand.test.js +0 -86
  962. package/dist/src/ui/commands/initCommand.test.js.map +0 -1
  963. package/dist/src/ui/commands/mcpCommand.test.d.ts +0 -6
  964. package/dist/src/ui/commands/mcpCommand.test.js +0 -231
  965. package/dist/src/ui/commands/mcpCommand.test.js.map +0 -1
  966. package/dist/src/ui/commands/memoryCommand.test.d.ts +0 -6
  967. package/dist/src/ui/commands/memoryCommand.test.js +0 -361
  968. package/dist/src/ui/commands/memoryCommand.test.js.map +0 -1
  969. package/dist/src/ui/commands/modelCommand.test.d.ts +0 -6
  970. package/dist/src/ui/commands/modelCommand.test.js +0 -135
  971. package/dist/src/ui/commands/modelCommand.test.js.map +0 -1
  972. package/dist/src/ui/commands/permissionsCommand.test.d.ts +0 -6
  973. package/dist/src/ui/commands/permissionsCommand.test.js +0 -86
  974. package/dist/src/ui/commands/permissionsCommand.test.js.map +0 -1
  975. package/dist/src/ui/commands/planCommand.test.d.ts +0 -6
  976. package/dist/src/ui/commands/planCommand.test.js +0 -146
  977. package/dist/src/ui/commands/planCommand.test.js.map +0 -1
  978. package/dist/src/ui/commands/policiesCommand.test.d.ts +0 -6
  979. package/dist/src/ui/commands/policiesCommand.test.js +0 -133
  980. package/dist/src/ui/commands/policiesCommand.test.js.map +0 -1
  981. package/dist/src/ui/commands/privacyCommand.test.d.ts +0 -6
  982. package/dist/src/ui/commands/privacyCommand.test.js +0 -32
  983. package/dist/src/ui/commands/privacyCommand.test.js.map +0 -1
  984. package/dist/src/ui/commands/quitCommand.test.d.ts +0 -6
  985. package/dist/src/ui/commands/quitCommand.test.js +0 -95
  986. package/dist/src/ui/commands/quitCommand.test.js.map +0 -1
  987. package/dist/src/ui/commands/restoreCommand.test.d.ts +0 -6
  988. package/dist/src/ui/commands/restoreCommand.test.js +0 -193
  989. package/dist/src/ui/commands/restoreCommand.test.js.map +0 -1
  990. package/dist/src/ui/commands/resumeCommand.test.d.ts +0 -6
  991. package/dist/src/ui/commands/resumeCommand.test.js +0 -28
  992. package/dist/src/ui/commands/resumeCommand.test.js.map +0 -1
  993. package/dist/src/ui/commands/rewindCommand.test.d.ts +0 -6
  994. package/dist/src/ui/commands/rewindCommand.test.js +0 -256
  995. package/dist/src/ui/commands/rewindCommand.test.js.map +0 -1
  996. package/dist/src/ui/commands/settingsCommand.test.d.ts +0 -6
  997. package/dist/src/ui/commands/settingsCommand.test.js +0 -30
  998. package/dist/src/ui/commands/settingsCommand.test.js.map +0 -1
  999. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
  1000. package/dist/src/ui/commands/setupGithubCommand.test.js +0 -238
  1001. package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
  1002. package/dist/src/ui/commands/skillsCommand.test.d.ts +0 -6
  1003. package/dist/src/ui/commands/skillsCommand.test.js +0 -500
  1004. package/dist/src/ui/commands/skillsCommand.test.js.map +0 -1
  1005. package/dist/src/ui/commands/statsCommand.test.d.ts +0 -6
  1006. package/dist/src/ui/commands/statsCommand.test.js +0 -122
  1007. package/dist/src/ui/commands/statsCommand.test.js.map +0 -1
  1008. package/dist/src/ui/commands/tasksCommand.test.d.ts +0 -6
  1009. package/dist/src/ui/commands/tasksCommand.test.js +0 -30
  1010. package/dist/src/ui/commands/tasksCommand.test.js.map +0 -1
  1011. package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +0 -6
  1012. package/dist/src/ui/commands/terminalSetupCommand.test.js +0 -66
  1013. package/dist/src/ui/commands/terminalSetupCommand.test.js.map +0 -1
  1014. package/dist/src/ui/commands/themeCommand.test.d.ts +0 -6
  1015. package/dist/src/ui/commands/themeCommand.test.js +0 -32
  1016. package/dist/src/ui/commands/themeCommand.test.js.map +0 -1
  1017. package/dist/src/ui/commands/toolsCommand.test.d.ts +0 -6
  1018. package/dist/src/ui/commands/toolsCommand.test.js +0 -187
  1019. package/dist/src/ui/commands/toolsCommand.test.js.map +0 -1
  1020. package/dist/src/ui/commands/upgradeCommand.test.d.ts +0 -6
  1021. package/dist/src/ui/commands/upgradeCommand.test.js +0 -102
  1022. package/dist/src/ui/commands/upgradeCommand.test.js.map +0 -1
  1023. package/dist/src/ui/components/AboutBox.test.d.ts +0 -6
  1024. package/dist/src/ui/components/AboutBox.test.js +0 -63
  1025. package/dist/src/ui/components/AboutBox.test.js.map +0 -1
  1026. package/dist/src/ui/components/AdminSettingsChangedDialog.test.d.ts +0 -6
  1027. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +0 -43
  1028. package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +0 -1
  1029. package/dist/src/ui/components/AgentConfigDialog.test.d.ts +0 -6
  1030. package/dist/src/ui/components/AgentConfigDialog.test.js +0 -267
  1031. package/dist/src/ui/components/AgentConfigDialog.test.js.map +0 -1
  1032. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +0 -6
  1033. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +0 -196
  1034. package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +0 -1
  1035. package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
  1036. package/dist/src/ui/components/AnsiOutput.test.js +0 -142
  1037. package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
  1038. package/dist/src/ui/components/AppHeader.test.d.ts +0 -6
  1039. package/dist/src/ui/components/AppHeader.test.js +0 -212
  1040. package/dist/src/ui/components/AppHeader.test.js.map +0 -1
  1041. package/dist/src/ui/components/AppHeaderIcon.test.d.ts +0 -6
  1042. package/dist/src/ui/components/AppHeaderIcon.test.js +0 -39
  1043. package/dist/src/ui/components/AppHeaderIcon.test.js.map +0 -1
  1044. package/dist/src/ui/components/ApprovalModeIndicator.test.d.ts +0 -6
  1045. package/dist/src/ui/components/ApprovalModeIndicator.test.js +0 -37
  1046. package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +0 -1
  1047. package/dist/src/ui/components/AskUserDialog.test.d.ts +0 -6
  1048. package/dist/src/ui/components/AskUserDialog.test.js +0 -1121
  1049. package/dist/src/ui/components/AskUserDialog.test.js.map +0 -1
  1050. package/dist/src/ui/components/BackgroundTaskDisplay.test.d.ts +0 -6
  1051. package/dist/src/ui/components/BackgroundTaskDisplay.test.js +0 -209
  1052. package/dist/src/ui/components/BackgroundTaskDisplay.test.js.map +0 -1
  1053. package/dist/src/ui/components/Banner.test.d.ts +0 -6
  1054. package/dist/src/ui/components/Banner.test.js +0 -29
  1055. package/dist/src/ui/components/Banner.test.js.map +0 -1
  1056. package/dist/src/ui/components/BubblingRegression.test.d.ts +0 -6
  1057. package/dist/src/ui/components/BubblingRegression.test.js +0 -60
  1058. package/dist/src/ui/components/BubblingRegression.test.js.map +0 -1
  1059. package/dist/src/ui/components/Checklist.test.d.ts +0 -6
  1060. package/dist/src/ui/components/Checklist.test.js +0 -46
  1061. package/dist/src/ui/components/Checklist.test.js.map +0 -1
  1062. package/dist/src/ui/components/ChecklistItem.test.d.ts +0 -6
  1063. package/dist/src/ui/components/ChecklistItem.test.js +0 -40
  1064. package/dist/src/ui/components/ChecklistItem.test.js.map +0 -1
  1065. package/dist/src/ui/components/CliSpinner.test.d.ts +0 -6
  1066. package/dist/src/ui/components/CliSpinner.test.js +0 -32
  1067. package/dist/src/ui/components/CliSpinner.test.js.map +0 -1
  1068. package/dist/src/ui/components/ColorsDisplay.test.d.ts +0 -6
  1069. package/dist/src/ui/components/ColorsDisplay.test.js +0 -107
  1070. package/dist/src/ui/components/ColorsDisplay.test.js.map +0 -1
  1071. package/dist/src/ui/components/Composer.test.d.ts +0 -6
  1072. package/dist/src/ui/components/Composer.test.js +0 -853
  1073. package/dist/src/ui/components/Composer.test.js.map +0 -1
  1074. package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +0 -6
  1075. package/dist/src/ui/components/ConfigInitDisplay.test.js +0 -118
  1076. package/dist/src/ui/components/ConfigInitDisplay.test.js.map +0 -1
  1077. package/dist/src/ui/components/ConsentPrompt.test.d.ts +0 -6
  1078. package/dist/src/ui/components/ConsentPrompt.test.js +0 -80
  1079. package/dist/src/ui/components/ConsentPrompt.test.js.map +0 -1
  1080. package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +0 -6
  1081. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +0 -28
  1082. package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +0 -1
  1083. package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +0 -6
  1084. package/dist/src/ui/components/ContextSummaryDisplay.test.js +0 -81
  1085. package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +0 -1
  1086. package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +0 -6
  1087. package/dist/src/ui/components/ContextUsageDisplay.test.js +0 -50
  1088. package/dist/src/ui/components/ContextUsageDisplay.test.js.map +0 -1
  1089. package/dist/src/ui/components/CopyModeWarning.test.d.ts +0 -6
  1090. package/dist/src/ui/components/CopyModeWarning.test.js +0 -35
  1091. package/dist/src/ui/components/CopyModeWarning.test.js.map +0 -1
  1092. package/dist/src/ui/components/DebugProfiler.test.d.ts +0 -6
  1093. package/dist/src/ui/components/DebugProfiler.test.js +0 -228
  1094. package/dist/src/ui/components/DebugProfiler.test.js.map +0 -1
  1095. package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +0 -6
  1096. package/dist/src/ui/components/DetailedMessagesDisplay.test.js +0 -81
  1097. package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +0 -1
  1098. package/dist/src/ui/components/DialogManager.test.d.ts +0 -6
  1099. package/dist/src/ui/components/DialogManager.test.js +0 -187
  1100. package/dist/src/ui/components/DialogManager.test.js.map +0 -1
  1101. package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +0 -6
  1102. package/dist/src/ui/components/EditorSettingsDialog.test.js +0 -145
  1103. package/dist/src/ui/components/EditorSettingsDialog.test.js.map +0 -1
  1104. package/dist/src/ui/components/EmptyWalletDialog.test.d.ts +0 -6
  1105. package/dist/src/ui/components/EmptyWalletDialog.test.js +0 -116
  1106. package/dist/src/ui/components/EmptyWalletDialog.test.js.map +0 -1
  1107. package/dist/src/ui/components/ExitPlanModeDialog.test.d.ts +0 -6
  1108. package/dist/src/ui/components/ExitPlanModeDialog.test.js +0 -443
  1109. package/dist/src/ui/components/ExitPlanModeDialog.test.js.map +0 -1
  1110. package/dist/src/ui/components/ExitWarning.test.d.ts +0 -6
  1111. package/dist/src/ui/components/ExitWarning.test.js +0 -58
  1112. package/dist/src/ui/components/ExitWarning.test.js.map +0 -1
  1113. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
  1114. package/dist/src/ui/components/FolderTrustDialog.test.js +0 -342
  1115. package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
  1116. package/dist/src/ui/components/Footer.test.d.ts +0 -6
  1117. package/dist/src/ui/components/Footer.test.js +0 -806
  1118. package/dist/src/ui/components/Footer.test.js.map +0 -1
  1119. package/dist/src/ui/components/FooterConfigDialog.test.d.ts +0 -6
  1120. package/dist/src/ui/components/FooterConfigDialog.test.js +0 -191
  1121. package/dist/src/ui/components/FooterConfigDialog.test.js.map +0 -1
  1122. package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +0 -6
  1123. package/dist/src/ui/components/GeminiRespondingSpinner.test.js +0 -63
  1124. package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +0 -1
  1125. package/dist/src/ui/components/GradientRegression.test.d.ts +0 -6
  1126. package/dist/src/ui/components/GradientRegression.test.js +0 -116
  1127. package/dist/src/ui/components/GradientRegression.test.js.map +0 -1
  1128. package/dist/src/ui/components/Header.test.d.ts +0 -6
  1129. package/dist/src/ui/components/Header.test.js +0 -131
  1130. package/dist/src/ui/components/Header.test.js.map +0 -1
  1131. package/dist/src/ui/components/Help.test.d.ts +0 -6
  1132. package/dist/src/ui/components/Help.test.js +0 -67
  1133. package/dist/src/ui/components/Help.test.js.map +0 -1
  1134. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  1135. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -302
  1136. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  1137. package/dist/src/ui/components/HookStatusDisplay.test.d.ts +0 -6
  1138. package/dist/src/ui/components/HookStatusDisplay.test.js +0 -77
  1139. package/dist/src/ui/components/HookStatusDisplay.test.js.map +0 -1
  1140. package/dist/src/ui/components/HooksDialog.test.d.ts +0 -6
  1141. package/dist/src/ui/components/HooksDialog.test.js +0 -175
  1142. package/dist/src/ui/components/HooksDialog.test.js.map +0 -1
  1143. package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +0 -6
  1144. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +0 -78
  1145. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
  1146. package/dist/src/ui/components/InboxDialog.test.d.ts +0 -6
  1147. package/dist/src/ui/components/InboxDialog.test.js +0 -804
  1148. package/dist/src/ui/components/InboxDialog.test.js.map +0 -1
  1149. package/dist/src/ui/components/InputPrompt.test.d.ts +0 -17
  1150. package/dist/src/ui/components/InputPrompt.test.js +0 -4078
  1151. package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
  1152. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  1153. package/dist/src/ui/components/LoadingIndicator.test.js +0 -325
  1154. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  1155. package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +0 -6
  1156. package/dist/src/ui/components/LogoutConfirmationDialog.test.js +0 -74
  1157. package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +0 -1
  1158. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
  1159. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -27
  1160. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
  1161. package/dist/src/ui/components/MainContent.test.d.ts +0 -6
  1162. package/dist/src/ui/components/MainContent.test.js +0 -750
  1163. package/dist/src/ui/components/MainContent.test.js.map +0 -1
  1164. package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +0 -6
  1165. package/dist/src/ui/components/MemoryUsageDisplay.test.js +0 -52
  1166. package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +0 -1
  1167. package/dist/src/ui/components/ModelDialog.test.d.ts +0 -6
  1168. package/dist/src/ui/components/ModelDialog.test.js +0 -356
  1169. package/dist/src/ui/components/ModelDialog.test.js.map +0 -1
  1170. package/dist/src/ui/components/ModelQuotaDisplay.test.d.ts +0 -6
  1171. package/dist/src/ui/components/ModelQuotaDisplay.test.js +0 -62
  1172. package/dist/src/ui/components/ModelQuotaDisplay.test.js.map +0 -1
  1173. package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
  1174. package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -651
  1175. package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
  1176. package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +0 -6
  1177. package/dist/src/ui/components/MultiFolderTrustDialog.test.js +0 -177
  1178. package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +0 -1
  1179. package/dist/src/ui/components/NewAgentsNotification.test.d.ts +0 -6
  1180. package/dist/src/ui/components/NewAgentsNotification.test.js +0 -83
  1181. package/dist/src/ui/components/NewAgentsNotification.test.js.map +0 -1
  1182. package/dist/src/ui/components/Notifications.test.d.ts +0 -6
  1183. package/dist/src/ui/components/Notifications.test.js +0 -285
  1184. package/dist/src/ui/components/Notifications.test.js.map +0 -1
  1185. package/dist/src/ui/components/OverageMenuDialog.test.d.ts +0 -6
  1186. package/dist/src/ui/components/OverageMenuDialog.test.js +0 -118
  1187. package/dist/src/ui/components/OverageMenuDialog.test.js.map +0 -1
  1188. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +0 -6
  1189. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -181
  1190. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +0 -1
  1191. package/dist/src/ui/components/PolicyUpdateDialog.test.d.ts +0 -6
  1192. package/dist/src/ui/components/PolicyUpdateDialog.test.js +0 -92
  1193. package/dist/src/ui/components/PolicyUpdateDialog.test.js.map +0 -1
  1194. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
  1195. package/dist/src/ui/components/ProQuotaDialog.test.js +0 -222
  1196. package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
  1197. package/dist/src/ui/components/ProgressBar.test.d.ts +0 -6
  1198. package/dist/src/ui/components/ProgressBar.test.js +0 -28
  1199. package/dist/src/ui/components/ProgressBar.test.js.map +0 -1
  1200. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
  1201. package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -65
  1202. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
  1203. package/dist/src/ui/components/QuittingDisplay.test.d.ts +0 -6
  1204. package/dist/src/ui/components/QuittingDisplay.test.js +0 -60
  1205. package/dist/src/ui/components/QuittingDisplay.test.js.map +0 -1
  1206. package/dist/src/ui/components/QuotaDisplay.test.d.ts +0 -6
  1207. package/dist/src/ui/components/QuotaDisplay.test.js +0 -68
  1208. package/dist/src/ui/components/QuotaDisplay.test.js.map +0 -1
  1209. package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +0 -6
  1210. package/dist/src/ui/components/RawMarkdownIndicator.test.js +0 -38
  1211. package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +0 -1
  1212. package/dist/src/ui/components/RewindConfirmation.test.d.ts +0 -6
  1213. package/dist/src/ui/components/RewindConfirmation.test.js +0 -57
  1214. package/dist/src/ui/components/RewindConfirmation.test.js.map +0 -1
  1215. package/dist/src/ui/components/RewindViewer.test.d.ts +0 -6
  1216. package/dist/src/ui/components/RewindViewer.test.js +0 -334
  1217. package/dist/src/ui/components/RewindViewer.test.js.map +0 -1
  1218. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.d.ts +0 -6
  1219. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js +0 -47
  1220. package/dist/src/ui/components/SessionBrowser/SessionBrowserSearchNav.test.js.map +0 -1
  1221. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.d.ts +0 -6
  1222. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js +0 -27
  1223. package/dist/src/ui/components/SessionBrowser/SessionBrowserStates.test.js.map +0 -1
  1224. package/dist/src/ui/components/SessionBrowser/utils.test.d.ts +0 -6
  1225. package/dist/src/ui/components/SessionBrowser/utils.test.js +0 -108
  1226. package/dist/src/ui/components/SessionBrowser/utils.test.js.map +0 -1
  1227. package/dist/src/ui/components/SessionBrowser.test.d.ts +0 -6
  1228. package/dist/src/ui/components/SessionBrowser.test.js +0 -266
  1229. package/dist/src/ui/components/SessionBrowser.test.js.map +0 -1
  1230. package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
  1231. package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -164
  1232. package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
  1233. package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
  1234. package/dist/src/ui/components/SettingsDialog.test.js +0 -1499
  1235. package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
  1236. package/dist/src/ui/components/ShellInputPrompt.test.d.ts +0 -6
  1237. package/dist/src/ui/components/ShellInputPrompt.test.js +0 -201
  1238. package/dist/src/ui/components/ShellInputPrompt.test.js.map +0 -1
  1239. package/dist/src/ui/components/ShellModeIndicator.test.d.ts +0 -6
  1240. package/dist/src/ui/components/ShellModeIndicator.test.js +0 -18
  1241. package/dist/src/ui/components/ShellModeIndicator.test.js.map +0 -1
  1242. package/dist/src/ui/components/ShortcutsHelp.test.d.ts +0 -6
  1243. package/dist/src/ui/components/ShortcutsHelp.test.js +0 -45
  1244. package/dist/src/ui/components/ShortcutsHelp.test.js.map +0 -1
  1245. package/dist/src/ui/components/ShowMoreLines.test.d.ts +0 -6
  1246. package/dist/src/ui/components/ShowMoreLines.test.js +0 -79
  1247. package/dist/src/ui/components/ShowMoreLines.test.js.map +0 -1
  1248. package/dist/src/ui/components/ShowMoreLinesLayout.test.d.ts +0 -1
  1249. package/dist/src/ui/components/ShowMoreLinesLayout.test.js +0 -68
  1250. package/dist/src/ui/components/ShowMoreLinesLayout.test.js.map +0 -1
  1251. package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
  1252. package/dist/src/ui/components/StatsDisplay.test.js +0 -489
  1253. package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
  1254. package/dist/src/ui/components/StatusDisplay.test.d.ts +0 -6
  1255. package/dist/src/ui/components/StatusDisplay.test.js +0 -117
  1256. package/dist/src/ui/components/StatusDisplay.test.js.map +0 -1
  1257. package/dist/src/ui/components/StatusRow.test.d.ts +0 -6
  1258. package/dist/src/ui/components/StatusRow.test.js +0 -99
  1259. package/dist/src/ui/components/StatusRow.test.js.map +0 -1
  1260. package/dist/src/ui/components/StickyHeader.test.d.ts +0 -6
  1261. package/dist/src/ui/components/StickyHeader.test.js +0 -19
  1262. package/dist/src/ui/components/StickyHeader.test.js.map +0 -1
  1263. package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +0 -6
  1264. package/dist/src/ui/components/SuggestionsDisplay.test.js +0 -82
  1265. package/dist/src/ui/components/SuggestionsDisplay.test.js.map +0 -1
  1266. package/dist/src/ui/components/Table.test.d.ts +0 -6
  1267. package/dist/src/ui/components/Table.test.js +0 -72
  1268. package/dist/src/ui/components/Table.test.js.map +0 -1
  1269. package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
  1270. package/dist/src/ui/components/ThemeDialog.test.js +0 -162
  1271. package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
  1272. package/dist/src/ui/components/ThemedGradient.test.d.ts +0 -6
  1273. package/dist/src/ui/components/ThemedGradient.test.js +0 -35
  1274. package/dist/src/ui/components/ThemedGradient.test.js.map +0 -1
  1275. package/dist/src/ui/components/Tips.test.d.ts +0 -6
  1276. package/dist/src/ui/components/Tips.test.js +0 -23
  1277. package/dist/src/ui/components/Tips.test.js.map +0 -1
  1278. package/dist/src/ui/components/ToastDisplay.test.d.ts +0 -6
  1279. package/dist/src/ui/components/ToastDisplay.test.js +0 -167
  1280. package/dist/src/ui/components/ToastDisplay.test.js.map +0 -1
  1281. package/dist/src/ui/components/ToolConfirmationQueue.test.d.ts +0 -6
  1282. package/dist/src/ui/components/ToolConfirmationQueue.test.js +0 -444
  1283. package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +0 -1
  1284. package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
  1285. package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -234
  1286. package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
  1287. package/dist/src/ui/components/UpdateNotification.test.d.ts +0 -6
  1288. package/dist/src/ui/components/UpdateNotification.test.js +0 -17
  1289. package/dist/src/ui/components/UpdateNotification.test.js.map +0 -1
  1290. package/dist/src/ui/components/UserIdentity.test.d.ts +0 -6
  1291. package/dist/src/ui/components/UserIdentity.test.js +0 -138
  1292. package/dist/src/ui/components/UserIdentity.test.js.map +0 -1
  1293. package/dist/src/ui/components/ValidationDialog.test.d.ts +0 -6
  1294. package/dist/src/ui/components/ValidationDialog.test.js +0 -162
  1295. package/dist/src/ui/components/ValidationDialog.test.js.map +0 -1
  1296. package/dist/src/ui/components/VoiceModelDialog.test.d.ts +0 -6
  1297. package/dist/src/ui/components/VoiceModelDialog.test.js +0 -68
  1298. package/dist/src/ui/components/VoiceModelDialog.test.js.map +0 -1
  1299. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
  1300. package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -180
  1301. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
  1302. package/dist/src/ui/components/messages/DenseToolMessage.test.d.ts +0 -6
  1303. package/dist/src/ui/components/messages/DenseToolMessage.test.js +0 -406
  1304. package/dist/src/ui/components/messages/DenseToolMessage.test.js.map +0 -1
  1305. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  1306. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -269
  1307. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  1308. package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +0 -6
  1309. package/dist/src/ui/components/messages/ErrorMessage.test.js +0 -25
  1310. package/dist/src/ui/components/messages/ErrorMessage.test.js.map +0 -1
  1311. package/dist/src/ui/components/messages/ExportSessionMessage.test.d.ts +0 -6
  1312. package/dist/src/ui/components/messages/ExportSessionMessage.test.js +0 -32
  1313. package/dist/src/ui/components/messages/ExportSessionMessage.test.js.map +0 -1
  1314. package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +0 -6
  1315. package/dist/src/ui/components/messages/GeminiMessage.test.js +0 -46
  1316. package/dist/src/ui/components/messages/GeminiMessage.test.js.map +0 -1
  1317. package/dist/src/ui/components/messages/HintMessage.test.d.ts +0 -6
  1318. package/dist/src/ui/components/messages/HintMessage.test.js +0 -42
  1319. package/dist/src/ui/components/messages/HintMessage.test.js.map +0 -1
  1320. package/dist/src/ui/components/messages/InfoMessage.test.d.ts +0 -6
  1321. package/dist/src/ui/components/messages/InfoMessage.test.js +0 -31
  1322. package/dist/src/ui/components/messages/InfoMessage.test.js.map +0 -1
  1323. package/dist/src/ui/components/messages/RedirectionConfirmation.test.d.ts +0 -6
  1324. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +0 -35
  1325. package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +0 -1
  1326. package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +0 -6
  1327. package/dist/src/ui/components/messages/ShellToolMessage.test.js +0 -290
  1328. package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +0 -1
  1329. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.d.ts +0 -1
  1330. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js +0 -92
  1331. package/dist/src/ui/components/messages/SubagentGroupDisplay.test.js.map +0 -1
  1332. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.d.ts +0 -6
  1333. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js +0 -69
  1334. package/dist/src/ui/components/messages/SubagentHistoryMessage.test.js.map +0 -1
  1335. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.d.ts +0 -6
  1336. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js +0 -164
  1337. package/dist/src/ui/components/messages/SubagentProgressDisplay.test.js.map +0 -1
  1338. package/dist/src/ui/components/messages/ThinkingMessage.test.d.ts +0 -6
  1339. package/dist/src/ui/components/messages/ThinkingMessage.test.js +0 -104
  1340. package/dist/src/ui/components/messages/ThinkingMessage.test.js.map +0 -1
  1341. package/dist/src/ui/components/messages/Todo.test.d.ts +0 -6
  1342. package/dist/src/ui/components/messages/Todo.test.js +0 -129
  1343. package/dist/src/ui/components/messages/Todo.test.js.map +0 -1
  1344. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  1345. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -558
  1346. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  1347. package/dist/src/ui/components/messages/ToolGroupDisplay.test.d.ts +0 -6
  1348. package/dist/src/ui/components/messages/ToolGroupDisplay.test.js +0 -210
  1349. package/dist/src/ui/components/messages/ToolGroupDisplay.test.js.map +0 -1
  1350. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.d.ts +0 -6
  1351. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js +0 -147
  1352. package/dist/src/ui/components/messages/ToolGroupMessage.compact.test.js.map +0 -1
  1353. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
  1354. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -828
  1355. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
  1356. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.d.ts +0 -6
  1357. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js +0 -101
  1358. package/dist/src/ui/components/messages/ToolGroupMessageRegression.test.js.map +0 -1
  1359. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  1360. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -292
  1361. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  1362. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.d.ts +0 -6
  1363. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +0 -96
  1364. package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +0 -1
  1365. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +0 -6
  1366. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +0 -72
  1367. package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +0 -1
  1368. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.d.ts +0 -6
  1369. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js +0 -88
  1370. package/dist/src/ui/components/messages/ToolOverflowConsistencyChecks.test.js.map +0 -1
  1371. package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +0 -6
  1372. package/dist/src/ui/components/messages/ToolResultDisplay.test.js +0 -333
  1373. package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +0 -1
  1374. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.d.ts +0 -6
  1375. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js +0 -77
  1376. package/dist/src/ui/components/messages/ToolResultDisplayOverflow.test.js.map +0 -1
  1377. package/dist/src/ui/components/messages/ToolShared.test.d.ts +0 -6
  1378. package/dist/src/ui/components/messages/ToolShared.test.js +0 -65
  1379. package/dist/src/ui/components/messages/ToolShared.test.js.map +0 -1
  1380. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +0 -6
  1381. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +0 -142
  1382. package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +0 -1
  1383. package/dist/src/ui/components/messages/TopicMessage.test.d.ts +0 -6
  1384. package/dist/src/ui/components/messages/TopicMessage.test.js +0 -77
  1385. package/dist/src/ui/components/messages/TopicMessage.test.js.map +0 -1
  1386. package/dist/src/ui/components/messages/UserMessage.test.d.ts +0 -6
  1387. package/dist/src/ui/components/messages/UserMessage.test.js +0 -67
  1388. package/dist/src/ui/components/messages/UserMessage.test.js.map +0 -1
  1389. package/dist/src/ui/components/messages/UserShellMessage.test.d.ts +0 -6
  1390. package/dist/src/ui/components/messages/UserShellMessage.test.js +0 -40
  1391. package/dist/src/ui/components/messages/UserShellMessage.test.js.map +0 -1
  1392. package/dist/src/ui/components/messages/WarningMessage.test.d.ts +0 -6
  1393. package/dist/src/ui/components/messages/WarningMessage.test.js +0 -25
  1394. package/dist/src/ui/components/messages/WarningMessage.test.js.map +0 -1
  1395. package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +0 -6
  1396. package/dist/src/ui/components/shared/BaseSelectionList.test.js +0 -441
  1397. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +0 -1
  1398. package/dist/src/ui/components/shared/BaseSettingsDialog.test.d.ts +0 -6
  1399. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +0 -710
  1400. package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +0 -1
  1401. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +0 -6
  1402. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +0 -89
  1403. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +0 -1
  1404. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
  1405. package/dist/src/ui/components/shared/EnumSelector.test.js +0 -83
  1406. package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
  1407. package/dist/src/ui/components/shared/ExpandableText.test.d.ts +0 -6
  1408. package/dist/src/ui/components/shared/ExpandableText.test.js +0 -95
  1409. package/dist/src/ui/components/shared/ExpandableText.test.js.map +0 -1
  1410. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.d.ts +0 -1
  1411. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +0 -47
  1412. package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +0 -1
  1413. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  1414. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -161
  1415. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  1416. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
  1417. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -146
  1418. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
  1419. package/dist/src/ui/components/shared/Scrollable.test.d.ts +0 -6
  1420. package/dist/src/ui/components/shared/Scrollable.test.js +0 -143
  1421. package/dist/src/ui/components/shared/Scrollable.test.js.map +0 -1
  1422. package/dist/src/ui/components/shared/ScrollableList.test.d.ts +0 -6
  1423. package/dist/src/ui/components/shared/ScrollableList.test.js +0 -438
  1424. package/dist/src/ui/components/shared/ScrollableList.test.js.map +0 -1
  1425. package/dist/src/ui/components/shared/SearchableList.test.d.ts +0 -6
  1426. package/dist/src/ui/components/shared/SearchableList.test.js +0 -169
  1427. package/dist/src/ui/components/shared/SearchableList.test.js.map +0 -1
  1428. package/dist/src/ui/components/shared/SectionHeader.test.d.ts +0 -6
  1429. package/dist/src/ui/components/shared/SectionHeader.test.js +0 -42
  1430. package/dist/src/ui/components/shared/SectionHeader.test.js.map +0 -1
  1431. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.d.ts +0 -6
  1432. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js +0 -54
  1433. package/dist/src/ui/components/shared/SlicingMaxSizedBox.test.js.map +0 -1
  1434. package/dist/src/ui/components/shared/TabHeader.test.d.ts +0 -6
  1435. package/dist/src/ui/components/shared/TabHeader.test.js +0 -144
  1436. package/dist/src/ui/components/shared/TabHeader.test.js.map +0 -1
  1437. package/dist/src/ui/components/shared/TextInput.test.d.ts +0 -6
  1438. package/dist/src/ui/components/shared/TextInput.test.js +0 -353
  1439. package/dist/src/ui/components/shared/TextInput.test.js.map +0 -1
  1440. package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +0 -6
  1441. package/dist/src/ui/components/shared/VirtualizedList.test.js +0 -174
  1442. package/dist/src/ui/components/shared/VirtualizedList.test.js.map +0 -1
  1443. package/dist/src/ui/components/shared/performance.test.d.ts +0 -1
  1444. package/dist/src/ui/components/shared/performance.test.js +0 -74
  1445. package/dist/src/ui/components/shared/performance.test.js.map +0 -1
  1446. package/dist/src/ui/components/shared/text-buffer.test.d.ts +0 -6
  1447. package/dist/src/ui/components/shared/text-buffer.test.js +0 -2965
  1448. package/dist/src/ui/components/shared/text-buffer.test.js.map +0 -1
  1449. package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +0 -6
  1450. package/dist/src/ui/components/shared/vim-buffer-actions.test.js +0 -2272
  1451. package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +0 -1
  1452. package/dist/src/ui/components/views/ChatList.test.d.ts +0 -6
  1453. package/dist/src/ui/components/views/ChatList.test.js +0 -45
  1454. package/dist/src/ui/components/views/ChatList.test.js.map +0 -1
  1455. package/dist/src/ui/components/views/ExtensionDetails.test.d.ts +0 -6
  1456. package/dist/src/ui/components/views/ExtensionDetails.test.js +0 -154
  1457. package/dist/src/ui/components/views/ExtensionDetails.test.js.map +0 -1
  1458. package/dist/src/ui/components/views/ExtensionRegistryView.test.d.ts +0 -6
  1459. package/dist/src/ui/components/views/ExtensionRegistryView.test.js +0 -222
  1460. package/dist/src/ui/components/views/ExtensionRegistryView.test.js.map +0 -1
  1461. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
  1462. package/dist/src/ui/components/views/ExtensionsList.test.js +0 -145
  1463. package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
  1464. package/dist/src/ui/components/views/McpStatus.test.d.ts +0 -6
  1465. package/dist/src/ui/components/views/McpStatus.test.js +0 -174
  1466. package/dist/src/ui/components/views/McpStatus.test.js.map +0 -1
  1467. package/dist/src/ui/components/views/SkillsList.test.d.ts +0 -6
  1468. package/dist/src/ui/components/views/SkillsList.test.js +0 -99
  1469. package/dist/src/ui/components/views/SkillsList.test.js.map +0 -1
  1470. package/dist/src/ui/components/views/ToolsList.test.d.ts +0 -6
  1471. package/dist/src/ui/components/views/ToolsList.test.js +0 -45
  1472. package/dist/src/ui/components/views/ToolsList.test.js.map +0 -1
  1473. package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
  1474. package/dist/src/ui/contexts/KeypressContext.test.js +0 -1133
  1475. package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
  1476. package/dist/src/ui/contexts/MouseContext.test.d.ts +0 -6
  1477. package/dist/src/ui/contexts/MouseContext.test.js +0 -269
  1478. package/dist/src/ui/contexts/MouseContext.test.js.map +0 -1
  1479. package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +0 -6
  1480. package/dist/src/ui/contexts/ScrollProvider.drag.test.js +0 -320
  1481. package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +0 -1
  1482. package/dist/src/ui/contexts/ScrollProvider.test.d.ts +0 -6
  1483. package/dist/src/ui/contexts/ScrollProvider.test.js +0 -478
  1484. package/dist/src/ui/contexts/ScrollProvider.test.js.map +0 -1
  1485. package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
  1486. package/dist/src/ui/contexts/SessionContext.test.js +0 -213
  1487. package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
  1488. package/dist/src/ui/contexts/SettingsContext.test.d.ts +0 -6
  1489. package/dist/src/ui/contexts/SettingsContext.test.js +0 -106
  1490. package/dist/src/ui/contexts/SettingsContext.test.js.map +0 -1
  1491. package/dist/src/ui/contexts/TerminalContext.test.d.ts +0 -6
  1492. package/dist/src/ui/contexts/TerminalContext.test.js +0 -75
  1493. package/dist/src/ui/contexts/TerminalContext.test.js.map +0 -1
  1494. package/dist/src/ui/contexts/ToolActionsContext.test.d.ts +0 -6
  1495. package/dist/src/ui/contexts/ToolActionsContext.test.js +0 -247
  1496. package/dist/src/ui/contexts/ToolActionsContext.test.js.map +0 -1
  1497. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
  1498. package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -1265
  1499. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
  1500. package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +0 -6
  1501. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +0 -210
  1502. package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +0 -1
  1503. package/dist/src/ui/hooks/creditsFlowHandler.test.d.ts +0 -6
  1504. package/dist/src/ui/hooks/creditsFlowHandler.test.js +0 -211
  1505. package/dist/src/ui/hooks/creditsFlowHandler.test.js.map +0 -1
  1506. package/dist/src/ui/hooks/shell-completions/gitProvider.test.d.ts +0 -6
  1507. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js +0 -73
  1508. package/dist/src/ui/hooks/shell-completions/gitProvider.test.js.map +0 -1
  1509. package/dist/src/ui/hooks/shell-completions/npmProvider.test.d.ts +0 -6
  1510. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js +0 -69
  1511. package/dist/src/ui/hooks/shell-completions/npmProvider.test.js.map +0 -1
  1512. package/dist/src/ui/hooks/shellReducer.test.d.ts +0 -6
  1513. package/dist/src/ui/hooks/shellReducer.test.js +0 -341
  1514. package/dist/src/ui/hooks/shellReducer.test.js.map +0 -1
  1515. package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +0 -6
  1516. package/dist/src/ui/hooks/slashCommandProcessor.test.js +0 -881
  1517. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +0 -1
  1518. package/dist/src/ui/hooks/toolMapping.test.d.ts +0 -6
  1519. package/dist/src/ui/hooks/toolMapping.test.js +0 -292
  1520. package/dist/src/ui/hooks/toolMapping.test.js.map +0 -1
  1521. package/dist/src/ui/hooks/useAgentStream.test.d.ts +0 -6
  1522. package/dist/src/ui/hooks/useAgentStream.test.js +0 -161
  1523. package/dist/src/ui/hooks/useAgentStream.test.js.map +0 -1
  1524. package/dist/src/ui/hooks/useAlternateBuffer.test.d.ts +0 -6
  1525. package/dist/src/ui/hooks/useAlternateBuffer.test.js +0 -62
  1526. package/dist/src/ui/hooks/useAlternateBuffer.test.js.map +0 -1
  1527. package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +0 -6
  1528. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +0 -85
  1529. package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +0 -1
  1530. package/dist/src/ui/hooks/useApprovalModeIndicator.test.d.ts +0 -6
  1531. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +0 -477
  1532. package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +0 -1
  1533. package/dist/src/ui/hooks/useAtCompletion.test.d.ts +0 -6
  1534. package/dist/src/ui/hooks/useAtCompletion.test.js +0 -567
  1535. package/dist/src/ui/hooks/useAtCompletion.test.js.map +0 -1
  1536. package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +0 -6
  1537. package/dist/src/ui/hooks/useAtCompletion_agents.test.js +0 -87
  1538. package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +0 -1
  1539. package/dist/src/ui/hooks/useBackgroundTaskManager.test.d.ts +0 -6
  1540. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js +0 -168
  1541. package/dist/src/ui/hooks/useBackgroundTaskManager.test.js.map +0 -1
  1542. package/dist/src/ui/hooks/useBanner.test.d.ts +0 -6
  1543. package/dist/src/ui/hooks/useBanner.test.js +0 -144
  1544. package/dist/src/ui/hooks/useBanner.test.js.map +0 -1
  1545. package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +0 -6
  1546. package/dist/src/ui/hooks/useBatchedScroll.test.js +0 -62
  1547. package/dist/src/ui/hooks/useBatchedScroll.test.js.map +0 -1
  1548. package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +0 -6
  1549. package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -722
  1550. package/dist/src/ui/hooks/useCommandCompletion.test.js.map +0 -1
  1551. package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +0 -6
  1552. package/dist/src/ui/hooks/useConsoleMessages.test.js +0 -201
  1553. package/dist/src/ui/hooks/useConsoleMessages.test.js.map +0 -1
  1554. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
  1555. package/dist/src/ui/hooks/useEditorSettings.test.js +0 -179
  1556. package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
  1557. package/dist/src/ui/hooks/useExecutionLifecycle.test.d.ts +0 -6
  1558. package/dist/src/ui/hooks/useExecutionLifecycle.test.js +0 -903
  1559. package/dist/src/ui/hooks/useExecutionLifecycle.test.js.map +0 -1
  1560. package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +0 -6
  1561. package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -280
  1562. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +0 -1
  1563. package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +0 -6
  1564. package/dist/src/ui/hooks/useFlickerDetector.test.js +0 -106
  1565. package/dist/src/ui/hooks/useFlickerDetector.test.js.map +0 -1
  1566. package/dist/src/ui/hooks/useFocus.test.d.ts +0 -6
  1567. package/dist/src/ui/hooks/useFocus.test.js +0 -140
  1568. package/dist/src/ui/hooks/useFocus.test.js.map +0 -1
  1569. package/dist/src/ui/hooks/useFolderTrust.test.d.ts +0 -6
  1570. package/dist/src/ui/hooks/useFolderTrust.test.js +0 -268
  1571. package/dist/src/ui/hooks/useFolderTrust.test.js.map +0 -1
  1572. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
  1573. package/dist/src/ui/hooks/useGeminiStream.test.js +0 -2855
  1574. package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
  1575. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
  1576. package/dist/src/ui/hooks/useGitBranchName.test.js +0 -237
  1577. package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
  1578. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
  1579. package/dist/src/ui/hooks/useHistoryManager.test.js +0 -259
  1580. package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
  1581. package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +0 -6
  1582. package/dist/src/ui/hooks/useHookDisplayState.test.js +0 -200
  1583. package/dist/src/ui/hooks/useHookDisplayState.test.js.map +0 -1
  1584. package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +0 -6
  1585. package/dist/src/ui/hooks/useIdeTrustListener.test.js +0 -225
  1586. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +0 -1
  1587. package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +0 -6
  1588. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +0 -174
  1589. package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +0 -1
  1590. package/dist/src/ui/hooks/useInlineEditBuffer.test.d.ts +0 -6
  1591. package/dist/src/ui/hooks/useInlineEditBuffer.test.js +0 -112
  1592. package/dist/src/ui/hooks/useInlineEditBuffer.test.js.map +0 -1
  1593. package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
  1594. package/dist/src/ui/hooks/useInputHistory.test.js +0 -389
  1595. package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
  1596. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
  1597. package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -238
  1598. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
  1599. package/dist/src/ui/hooks/useKeypress.test.d.ts +0 -6
  1600. package/dist/src/ui/hooks/useKeypress.test.js +0 -198
  1601. package/dist/src/ui/hooks/useKeypress.test.js.map +0 -1
  1602. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
  1603. package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -177
  1604. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
  1605. package/dist/src/ui/hooks/useLogger.test.d.ts +0 -6
  1606. package/dist/src/ui/hooks/useLogger.test.js +0 -44
  1607. package/dist/src/ui/hooks/useLogger.test.js.map +0 -1
  1608. package/dist/src/ui/hooks/useMcpStatus.test.d.ts +0 -6
  1609. package/dist/src/ui/hooks/useMcpStatus.test.js +0 -69
  1610. package/dist/src/ui/hooks/useMcpStatus.test.js.map +0 -1
  1611. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
  1612. package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -62
  1613. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
  1614. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
  1615. package/dist/src/ui/hooks/useMessageQueue.test.js +0 -365
  1616. package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
  1617. package/dist/src/ui/hooks/useModelCommand.test.d.ts +0 -6
  1618. package/dist/src/ui/hooks/useModelCommand.test.js +0 -45
  1619. package/dist/src/ui/hooks/useModelCommand.test.js.map +0 -1
  1620. package/dist/src/ui/hooks/useMouse.test.d.ts +0 -6
  1621. package/dist/src/ui/hooks/useMouse.test.js +0 -52
  1622. package/dist/src/ui/hooks/useMouse.test.js.map +0 -1
  1623. package/dist/src/ui/hooks/useMouseClick.test.d.ts +0 -6
  1624. package/dist/src/ui/hooks/useMouseClick.test.js +0 -68
  1625. package/dist/src/ui/hooks/useMouseClick.test.js.map +0 -1
  1626. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +0 -6
  1627. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +0 -291
  1628. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +0 -1
  1629. package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +0 -6
  1630. package/dist/src/ui/hooks/usePhraseCycler.test.js +0 -187
  1631. package/dist/src/ui/hooks/usePhraseCycler.test.js.map +0 -1
  1632. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
  1633. package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -113
  1634. package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
  1635. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
  1636. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -817
  1637. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
  1638. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
  1639. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -168
  1640. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
  1641. package/dist/src/ui/hooks/useRewind.test.d.ts +0 -6
  1642. package/dist/src/ui/hooks/useRewind.test.js +0 -100
  1643. package/dist/src/ui/hooks/useRewind.test.js.map +0 -1
  1644. package/dist/src/ui/hooks/useSelectionList.test.d.ts +0 -6
  1645. package/dist/src/ui/hooks/useSelectionList.test.js +0 -960
  1646. package/dist/src/ui/hooks/useSelectionList.test.js.map +0 -1
  1647. package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +0 -6
  1648. package/dist/src/ui/hooks/useSessionBrowser.test.js +0 -277
  1649. package/dist/src/ui/hooks/useSessionBrowser.test.js.map +0 -1
  1650. package/dist/src/ui/hooks/useSessionResume.test.d.ts +0 -6
  1651. package/dist/src/ui/hooks/useSessionResume.test.js +0 -402
  1652. package/dist/src/ui/hooks/useSessionResume.test.js.map +0 -1
  1653. package/dist/src/ui/hooks/useSettingsNavigation.test.d.ts +0 -6
  1654. package/dist/src/ui/hooks/useSettingsNavigation.test.js +0 -87
  1655. package/dist/src/ui/hooks/useSettingsNavigation.test.js.map +0 -1
  1656. package/dist/src/ui/hooks/useShellCompletion.test.d.ts +0 -6
  1657. package/dist/src/ui/hooks/useShellCompletion.test.js +0 -354
  1658. package/dist/src/ui/hooks/useShellCompletion.test.js.map +0 -1
  1659. package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
  1660. package/dist/src/ui/hooks/useShellHistory.test.js +0 -226
  1661. package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
  1662. package/dist/src/ui/hooks/useShellInactivityStatus.test.d.ts +0 -6
  1663. package/dist/src/ui/hooks/useShellInactivityStatus.test.js +0 -84
  1664. package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +0 -1
  1665. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -10
  1666. package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -977
  1667. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
  1668. package/dist/src/ui/hooks/useSnowfall.test.d.ts +0 -6
  1669. package/dist/src/ui/hooks/useSnowfall.test.js +0 -92
  1670. package/dist/src/ui/hooks/useSnowfall.test.js.map +0 -1
  1671. package/dist/src/ui/hooks/useSuspend.test.d.ts +0 -6
  1672. package/dist/src/ui/hooks/useSuspend.test.js +0 -136
  1673. package/dist/src/ui/hooks/useSuspend.test.js.map +0 -1
  1674. package/dist/src/ui/hooks/useTabbedNavigation.test.d.ts +0 -6
  1675. package/dist/src/ui/hooks/useTabbedNavigation.test.js +0 -243
  1676. package/dist/src/ui/hooks/useTabbedNavigation.test.js.map +0 -1
  1677. package/dist/src/ui/hooks/useTerminalTheme.test.d.ts +0 -6
  1678. package/dist/src/ui/hooks/useTerminalTheme.test.js +0 -169
  1679. package/dist/src/ui/hooks/useTerminalTheme.test.js.map +0 -1
  1680. package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
  1681. package/dist/src/ui/hooks/useTimer.test.js +0 -119
  1682. package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
  1683. package/dist/src/ui/hooks/useTips.test.d.ts +0 -6
  1684. package/dist/src/ui/hooks/useTips.test.js +0 -33
  1685. package/dist/src/ui/hooks/useTips.test.js.map +0 -1
  1686. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
  1687. package/dist/src/ui/hooks/useToolScheduler.test.js +0 -534
  1688. package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
  1689. package/dist/src/ui/hooks/useTurnActivityMonitor.test.d.ts +0 -6
  1690. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +0 -99
  1691. package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +0 -1
  1692. package/dist/src/ui/hooks/vim-passthrough.test.d.ts +0 -6
  1693. package/dist/src/ui/hooks/vim-passthrough.test.js +0 -84
  1694. package/dist/src/ui/hooks/vim-passthrough.test.js.map +0 -1
  1695. package/dist/src/ui/hooks/vim.test.d.ts +0 -6
  1696. package/dist/src/ui/hooks/vim.test.js +0 -2156
  1697. package/dist/src/ui/hooks/vim.test.js.map +0 -1
  1698. package/dist/src/ui/key/keyBindings.test.d.ts +0 -6
  1699. package/dist/src/ui/key/keyBindings.test.js +0 -225
  1700. package/dist/src/ui/key/keyBindings.test.js.map +0 -1
  1701. package/dist/src/ui/key/keyMatchers.test.d.ts +0 -6
  1702. package/dist/src/ui/key/keyMatchers.test.js +0 -524
  1703. package/dist/src/ui/key/keyMatchers.test.js.map +0 -1
  1704. package/dist/src/ui/key/keybindingUtils.test.d.ts +0 -6
  1705. package/dist/src/ui/key/keybindingUtils.test.js +0 -121
  1706. package/dist/src/ui/key/keybindingUtils.test.js.map +0 -1
  1707. package/dist/src/ui/layouts/DefaultAppLayout.test.d.ts +0 -6
  1708. package/dist/src/ui/layouts/DefaultAppLayout.test.js +0 -126
  1709. package/dist/src/ui/layouts/DefaultAppLayout.test.js.map +0 -1
  1710. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +0 -6
  1711. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +0 -134
  1712. package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +0 -1
  1713. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +0 -6
  1714. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +0 -43
  1715. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +0 -1
  1716. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +0 -6
  1717. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +0 -43
  1718. package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +0 -1
  1719. package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +0 -6
  1720. package/dist/src/ui/privacy/PrivacyNotice.test.js +0 -63
  1721. package/dist/src/ui/privacy/PrivacyNotice.test.js.map +0 -1
  1722. package/dist/src/ui/state/extensions.test.d.ts +0 -6
  1723. package/dist/src/ui/state/extensions.test.js +0 -219
  1724. package/dist/src/ui/state/extensions.test.js.map +0 -1
  1725. package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
  1726. package/dist/src/ui/themes/color-utils.test.js +0 -326
  1727. package/dist/src/ui/themes/color-utils.test.js.map +0 -1
  1728. package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
  1729. package/dist/src/ui/themes/theme-manager.test.js +0 -274
  1730. package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
  1731. package/dist/src/ui/themes/theme.test.d.ts +0 -6
  1732. package/dist/src/ui/themes/theme.test.js +0 -171
  1733. package/dist/src/ui/themes/theme.test.js.map +0 -1
  1734. package/dist/src/ui/utils/CodeColorizer.test.d.ts +0 -6
  1735. package/dist/src/ui/utils/CodeColorizer.test.js +0 -74
  1736. package/dist/src/ui/utils/CodeColorizer.test.js.map +0 -1
  1737. package/dist/src/ui/utils/ConsolePatcher.test.d.ts +0 -6
  1738. package/dist/src/ui/utils/ConsolePatcher.test.js +0 -199
  1739. package/dist/src/ui/utils/ConsolePatcher.test.js.map +0 -1
  1740. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  1741. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -175
  1742. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  1743. package/dist/src/ui/utils/TableRenderer.test.d.ts +0 -1
  1744. package/dist/src/ui/utils/TableRenderer.test.js +0 -396
  1745. package/dist/src/ui/utils/TableRenderer.test.js.map +0 -1
  1746. package/dist/src/ui/utils/antigravityUtils.test.d.ts +0 -6
  1747. package/dist/src/ui/utils/antigravityUtils.test.js +0 -54
  1748. package/dist/src/ui/utils/antigravityUtils.test.js.map +0 -1
  1749. package/dist/src/ui/utils/borderStyles.test.d.ts +0 -6
  1750. package/dist/src/ui/utils/borderStyles.test.js +0 -172
  1751. package/dist/src/ui/utils/borderStyles.test.js.map +0 -1
  1752. package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
  1753. package/dist/src/ui/utils/clipboardUtils.test.js +0 -442
  1754. package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
  1755. package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +0 -6
  1756. package/dist/src/ui/utils/clipboardUtils.windows.test.js +0 -56
  1757. package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +0 -1
  1758. package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
  1759. package/dist/src/ui/utils/commandUtils.test.js +0 -511
  1760. package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
  1761. package/dist/src/ui/utils/computeStats.test.d.ts +0 -6
  1762. package/dist/src/ui/utils/computeStats.test.js +0 -279
  1763. package/dist/src/ui/utils/computeStats.test.js.map +0 -1
  1764. package/dist/src/ui/utils/directoryUtils.test.d.ts +0 -6
  1765. package/dist/src/ui/utils/directoryUtils.test.js +0 -239
  1766. package/dist/src/ui/utils/directoryUtils.test.js.map +0 -1
  1767. package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
  1768. package/dist/src/ui/utils/displayUtils.test.js +0 -61
  1769. package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
  1770. package/dist/src/ui/utils/formatters.test.d.ts +0 -6
  1771. package/dist/src/ui/utils/formatters.test.js +0 -152
  1772. package/dist/src/ui/utils/formatters.test.js.map +0 -1
  1773. package/dist/src/ui/utils/highlight.test.d.ts +0 -6
  1774. package/dist/src/ui/utils/highlight.test.js +0 -205
  1775. package/dist/src/ui/utils/highlight.test.js.map +0 -1
  1776. package/dist/src/ui/utils/input.test.d.ts +0 -6
  1777. package/dist/src/ui/utils/input.test.js +0 -44
  1778. package/dist/src/ui/utils/input.test.js.map +0 -1
  1779. package/dist/src/ui/utils/latexToUnicode.test.d.ts +0 -6
  1780. package/dist/src/ui/utils/latexToUnicode.test.js +0 -222
  1781. package/dist/src/ui/utils/latexToUnicode.test.js.map +0 -1
  1782. package/dist/src/ui/utils/markdownParsingUtils.test.d.ts +0 -6
  1783. package/dist/src/ui/utils/markdownParsingUtils.test.js +0 -201
  1784. package/dist/src/ui/utils/markdownParsingUtils.test.js.map +0 -1
  1785. package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
  1786. package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
  1787. package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
  1788. package/dist/src/ui/utils/memorySnapshot.test.d.ts +0 -6
  1789. package/dist/src/ui/utils/memorySnapshot.test.js +0 -62
  1790. package/dist/src/ui/utils/memorySnapshot.test.js.map +0 -1
  1791. package/dist/src/ui/utils/mouse.test.d.ts +0 -6
  1792. package/dist/src/ui/utils/mouse.test.js +0 -136
  1793. package/dist/src/ui/utils/mouse.test.js.map +0 -1
  1794. package/dist/src/ui/utils/pendingAttentionNotification.test.d.ts +0 -6
  1795. package/dist/src/ui/utils/pendingAttentionNotification.test.js +0 -79
  1796. package/dist/src/ui/utils/pendingAttentionNotification.test.js.map +0 -1
  1797. package/dist/src/ui/utils/rewindFileOps.test.d.ts +0 -6
  1798. package/dist/src/ui/utils/rewindFileOps.test.js +0 -375
  1799. package/dist/src/ui/utils/rewindFileOps.test.js.map +0 -1
  1800. package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +0 -6
  1801. package/dist/src/ui/utils/terminalCapabilityManager.test.js +0 -400
  1802. package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +0 -1
  1803. package/dist/src/ui/utils/terminalSetup.test.d.ts +0 -6
  1804. package/dist/src/ui/utils/terminalSetup.test.js +0 -201
  1805. package/dist/src/ui/utils/terminalSetup.test.js.map +0 -1
  1806. package/dist/src/ui/utils/textOutput.test.d.ts +0 -6
  1807. package/dist/src/ui/utils/textOutput.test.js +0 -80
  1808. package/dist/src/ui/utils/textOutput.test.js.map +0 -1
  1809. package/dist/src/ui/utils/textUtils.test.d.ts +0 -6
  1810. package/dist/src/ui/utils/textUtils.test.js +0 -430
  1811. package/dist/src/ui/utils/textUtils.test.js.map +0 -1
  1812. package/dist/src/ui/utils/toolLayoutUtils.test.d.ts +0 -6
  1813. package/dist/src/ui/utils/toolLayoutUtils.test.js +0 -187
  1814. package/dist/src/ui/utils/toolLayoutUtils.test.js.map +0 -1
  1815. package/dist/src/ui/utils/ui-sizing.test.d.ts +0 -6
  1816. package/dist/src/ui/utils/ui-sizing.test.js +0 -25
  1817. package/dist/src/ui/utils/ui-sizing.test.js.map +0 -1
  1818. package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
  1819. package/dist/src/ui/utils/updateCheck.test.js +0 -207
  1820. package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
  1821. package/dist/src/ui/utils/urlSecurityUtils.test.d.ts +0 -6
  1822. package/dist/src/ui/utils/urlSecurityUtils.test.js +0 -49
  1823. package/dist/src/ui/utils/urlSecurityUtils.test.js.map +0 -1
  1824. package/dist/src/utils/activityLogger.test.d.ts +0 -6
  1825. package/dist/src/utils/activityLogger.test.js +0 -196
  1826. package/dist/src/utils/activityLogger.test.js.map +0 -1
  1827. package/dist/src/utils/agentSettings.test.d.ts +0 -6
  1828. package/dist/src/utils/agentSettings.test.js +0 -111
  1829. package/dist/src/utils/agentSettings.test.js.map +0 -1
  1830. package/dist/src/utils/agentUtils.test.d.ts +0 -6
  1831. package/dist/src/utils/agentUtils.test.js +0 -121
  1832. package/dist/src/utils/agentUtils.test.js.map +0 -1
  1833. package/dist/src/utils/cleanup.test.d.ts +0 -6
  1834. package/dist/src/utils/cleanup.test.js +0 -256
  1835. package/dist/src/utils/cleanup.test.js.map +0 -1
  1836. package/dist/src/utils/commands.test.d.ts +0 -6
  1837. package/dist/src/utils/commands.test.js +0 -194
  1838. package/dist/src/utils/commands.test.js.map +0 -1
  1839. package/dist/src/utils/commentJson.test.d.ts +0 -6
  1840. package/dist/src/utils/commentJson.test.js +0 -308
  1841. package/dist/src/utils/commentJson.test.js.map +0 -1
  1842. package/dist/src/utils/deepMerge.test.d.ts +0 -6
  1843. package/dist/src/utils/deepMerge.test.js +0 -211
  1844. package/dist/src/utils/deepMerge.test.js.map +0 -1
  1845. package/dist/src/utils/devtoolsService.test.d.ts +0 -6
  1846. package/dist/src/utils/devtoolsService.test.js +0 -346
  1847. package/dist/src/utils/devtoolsService.test.js.map +0 -1
  1848. package/dist/src/utils/dialogScopeUtils.test.d.ts +0 -6
  1849. package/dist/src/utils/dialogScopeUtils.test.js +0 -81
  1850. package/dist/src/utils/dialogScopeUtils.test.js.map +0 -1
  1851. package/dist/src/utils/envVarResolver.test.d.ts +0 -6
  1852. package/dist/src/utils/envVarResolver.test.js +0 -238
  1853. package/dist/src/utils/envVarResolver.test.js.map +0 -1
  1854. package/dist/src/utils/errors.test.d.ts +0 -6
  1855. package/dist/src/utils/errors.test.js +0 -420
  1856. package/dist/src/utils/errors.test.js.map +0 -1
  1857. package/dist/src/utils/events.test.d.ts +0 -6
  1858. package/dist/src/utils/events.test.js +0 -24
  1859. package/dist/src/utils/events.test.js.map +0 -1
  1860. package/dist/src/utils/featureToggleUtils.test.d.ts +0 -6
  1861. package/dist/src/utils/featureToggleUtils.test.js +0 -126
  1862. package/dist/src/utils/featureToggleUtils.test.js.map +0 -1
  1863. package/dist/src/utils/gitUtils.test.d.ts +0 -6
  1864. package/dist/src/utils/gitUtils.test.js +0 -172
  1865. package/dist/src/utils/gitUtils.test.js.map +0 -1
  1866. package/dist/src/utils/handleAutoUpdate.test.d.ts +0 -6
  1867. package/dist/src/utils/handleAutoUpdate.test.js +0 -399
  1868. package/dist/src/utils/handleAutoUpdate.test.js.map +0 -1
  1869. package/dist/src/utils/hookSettings.test.d.ts +0 -6
  1870. package/dist/src/utils/hookSettings.test.js +0 -117
  1871. package/dist/src/utils/hookSettings.test.js.map +0 -1
  1872. package/dist/src/utils/hookUtils.test.d.ts +0 -6
  1873. package/dist/src/utils/hookUtils.test.js +0 -113
  1874. package/dist/src/utils/hookUtils.test.js.map +0 -1
  1875. package/dist/src/utils/installationInfo.test.d.ts +0 -6
  1876. package/dist/src/utils/installationInfo.test.js +0 -322
  1877. package/dist/src/utils/installationInfo.test.js.map +0 -1
  1878. package/dist/src/utils/jsonoutput.test.d.ts +0 -6
  1879. package/dist/src/utils/jsonoutput.test.js +0 -74
  1880. package/dist/src/utils/jsonoutput.test.js.map +0 -1
  1881. package/dist/src/utils/logCleanup.test.d.ts +0 -6
  1882. package/dist/src/utils/logCleanup.test.js +0 -87
  1883. package/dist/src/utils/logCleanup.test.js.map +0 -1
  1884. package/dist/src/utils/math.test.d.ts +0 -6
  1885. package/dist/src/utils/math.test.js +0 -23
  1886. package/dist/src/utils/math.test.js.map +0 -1
  1887. package/dist/src/utils/persistentState.test.d.ts +0 -6
  1888. package/dist/src/utils/persistentState.test.js +0 -68
  1889. package/dist/src/utils/persistentState.test.js.map +0 -1
  1890. package/dist/src/utils/processUtils.test.d.ts +0 -6
  1891. package/dist/src/utils/processUtils.test.js +0 -150
  1892. package/dist/src/utils/processUtils.test.js.map +0 -1
  1893. package/dist/src/utils/readStdin.test.d.ts +0 -6
  1894. package/dist/src/utils/readStdin.test.js +0 -149
  1895. package/dist/src/utils/readStdin.test.js.map +0 -1
  1896. package/dist/src/utils/readStdin_safety.test.d.ts +0 -6
  1897. package/dist/src/utils/readStdin_safety.test.js +0 -68
  1898. package/dist/src/utils/readStdin_safety.test.js.map +0 -1
  1899. package/dist/src/utils/relaunch.test.d.ts +0 -6
  1900. package/dist/src/utils/relaunch.test.js +0 -275
  1901. package/dist/src/utils/relaunch.test.js.map +0 -1
  1902. package/dist/src/utils/resolvePath.test.d.ts +0 -6
  1903. package/dist/src/utils/resolvePath.test.js +0 -34
  1904. package/dist/src/utils/resolvePath.test.js.map +0 -1
  1905. package/dist/src/utils/sandbox.test.d.ts +0 -6
  1906. package/dist/src/utils/sandbox.test.js +0 -725
  1907. package/dist/src/utils/sandbox.test.js.map +0 -1
  1908. package/dist/src/utils/sandboxUtils.test.d.ts +0 -6
  1909. package/dist/src/utils/sandboxUtils.test.js +0 -190
  1910. package/dist/src/utils/sandboxUtils.test.js.map +0 -1
  1911. package/dist/src/utils/sessionCleanup.integration.test.d.ts +0 -6
  1912. package/dist/src/utils/sessionCleanup.integration.test.js +0 -276
  1913. package/dist/src/utils/sessionCleanup.integration.test.js.map +0 -1
  1914. package/dist/src/utils/sessionCleanup.test.d.ts +0 -6
  1915. package/dist/src/utils/sessionCleanup.test.js +0 -829
  1916. package/dist/src/utils/sessionCleanup.test.js.map +0 -1
  1917. package/dist/src/utils/sessionUtils.test.d.ts +0 -6
  1918. package/dist/src/utils/sessionUtils.test.js +0 -815
  1919. package/dist/src/utils/sessionUtils.test.js.map +0 -1
  1920. package/dist/src/utils/sessions.test.d.ts +0 -6
  1921. package/dist/src/utils/sessions.test.js +0 -580
  1922. package/dist/src/utils/sessions.test.js.map +0 -1
  1923. package/dist/src/utils/settingsUtils.test.d.ts +0 -6
  1924. package/dist/src/utils/settingsUtils.test.js +0 -673
  1925. package/dist/src/utils/settingsUtils.test.js.map +0 -1
  1926. package/dist/src/utils/skillSettings.test.d.ts +0 -6
  1927. package/dist/src/utils/skillSettings.test.js +0 -142
  1928. package/dist/src/utils/skillSettings.test.js.map +0 -1
  1929. package/dist/src/utils/skillUtils.test.d.ts +0 -6
  1930. package/dist/src/utils/skillUtils.test.js +0 -248
  1931. package/dist/src/utils/skillUtils.test.js.map +0 -1
  1932. package/dist/src/utils/startupWarnings.test.d.ts +0 -6
  1933. package/dist/src/utils/startupWarnings.test.js +0 -61
  1934. package/dist/src/utils/startupWarnings.test.js.map +0 -1
  1935. package/dist/src/utils/terminalNotifications.test.d.ts +0 -6
  1936. package/dist/src/utils/terminalNotifications.test.js +0 -219
  1937. package/dist/src/utils/terminalNotifications.test.js.map +0 -1
  1938. package/dist/src/utils/terminalTheme.test.d.ts +0 -6
  1939. package/dist/src/utils/terminalTheme.test.js +0 -91
  1940. package/dist/src/utils/terminalTheme.test.js.map +0 -1
  1941. package/dist/src/utils/tierUtils.test.d.ts +0 -6
  1942. package/dist/src/utils/tierUtils.test.js +0 -25
  1943. package/dist/src/utils/tierUtils.test.js.map +0 -1
  1944. package/dist/src/utils/toolOutputCleanup.test.d.ts +0 -6
  1945. package/dist/src/utils/toolOutputCleanup.test.js +0 -280
  1946. package/dist/src/utils/toolOutputCleanup.test.js.map +0 -1
  1947. package/dist/src/utils/updateEventEmitter.test.d.ts +0 -6
  1948. package/dist/src/utils/updateEventEmitter.test.js +0 -18
  1949. package/dist/src/utils/updateEventEmitter.test.js.map +0 -1
  1950. package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
  1951. package/dist/src/utils/userStartupWarnings.test.js +0 -225
  1952. package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
  1953. package/dist/src/utils/windowTitle.test.d.ts +0 -6
  1954. package/dist/src/utils/windowTitle.test.js +0 -216
  1955. package/dist/src/utils/windowTitle.test.js.map +0 -1
  1956. package/dist/src/utils/worktreeSetup.test.d.ts +0 -6
  1957. package/dist/src/utils/worktreeSetup.test.js +0 -89
  1958. package/dist/src/utils/worktreeSetup.test.js.map +0 -1
  1959. package/dist/src/validateNonInterActiveAuth.test.d.ts +0 -6
  1960. package/dist/src/validateNonInterActiveAuth.test.js +0 -319
  1961. package/dist/src/validateNonInterActiveAuth.test.js.map +0 -1
@@ -1,2855 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /* eslint-disable @typescript-eslint/no-explicit-any */
7
- import { describe, it, expect, vi, beforeEach, } from 'vitest';
8
- import { act } from 'react';
9
- import { renderHookWithProviders } from '../../test-utils/render.js';
10
- import { waitFor } from '../../test-utils/async.js';
11
- import { useGeminiStream } from './useGeminiStream.js';
12
- import { useKeypress } from './useKeypress.js';
13
- import * as atCommandProcessor from './atCommandProcessor.js';
14
- import { useToolScheduler, } from './useToolScheduler.js';
15
- import { CoreToolCallStatus, ApprovalMode, AuthType, GeminiEventType as ServerGeminiEventType, ToolErrorType, ToolConfirmationOutcome, MessageBusType, tokenLimit, debugLogger, coreEvents, CoreEvent, SHELL_TOOL_NAME, MCPDiscoveryState, GeminiCliOperation, getPlanModeExitMessage, UPDATE_TOPIC_TOOL_NAME, } from '@google/gemini-cli-core';
16
- import { MessageType, StreamingState } from '../types.js';
17
- import { findLastSafeSplitPoint } from '../utils/markdownUtilities.js';
18
- import { theme } from '../semantic-colors.js';
19
- // --- MOCKS ---
20
- const mockSendMessageStream = vi
21
- .fn()
22
- .mockReturnValue((async function* () { })());
23
- const mockStartChat = vi.fn();
24
- const mockMessageBus = {
25
- publish: vi.fn(),
26
- subscribe: vi.fn(),
27
- unsubscribe: vi.fn(),
28
- };
29
- const MockedGeminiClientClass = vi.hoisted(() => vi.fn().mockImplementation(function (_config) {
30
- // _config
31
- this.startChat = mockStartChat;
32
- this.sendMessageStream = mockSendMessageStream;
33
- this.addHistory = vi.fn();
34
- this.generateContent = vi.fn().mockResolvedValue({
35
- candidates: [
36
- { content: { parts: [{ text: 'Got it. Focusing on tests only.' }] } },
37
- ],
38
- });
39
- this.getCurrentSequenceModel = vi.fn().mockReturnValue('test-model');
40
- this.getChat = vi.fn().mockReturnValue({
41
- recordCompletedToolCalls: vi.fn(),
42
- });
43
- this.getChatRecordingService = vi.fn().mockReturnValue({
44
- recordThought: vi.fn(),
45
- initialize: vi.fn(),
46
- recordMessage: vi.fn(),
47
- recordMessageTokens: vi.fn(),
48
- recordToolCalls: vi.fn(),
49
- getConversationFile: vi.fn(),
50
- });
51
- this.getCurrentSequenceModel = vi
52
- .fn()
53
- .mockReturnValue('gemini-2.0-flash-exp');
54
- }));
55
- const MockedUserPromptEvent = vi.hoisted(() => vi.fn().mockImplementation(() => { }));
56
- const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
57
- const mockIsBackgroundExecutionData = vi.hoisted(() => (data) => {
58
- if (typeof data !== 'object' || data === null) {
59
- return false;
60
- }
61
- const value = data;
62
- return ((value.pid === undefined || typeof value.pid === 'number') &&
63
- (value.command === undefined || typeof value.command === 'string') &&
64
- (value.initialOutput === undefined ||
65
- typeof value.initialOutput === 'string'));
66
- });
67
- const MockValidationRequiredError = vi.hoisted(() => class extends Error {
68
- userHandled = false;
69
- });
70
- const mockRunInDevTraceSpan = vi.hoisted(() => vi.fn(async (opts, fn) => {
71
- const metadata = {
72
- name: opts.operation,
73
- attributes: opts.attributes || {},
74
- };
75
- return await fn({
76
- metadata,
77
- });
78
- }));
79
- vi.mock('@google/gemini-cli-core', async (importOriginal) => {
80
- const actualCoreModule = (await importOriginal());
81
- return {
82
- ...actualCoreModule,
83
- isBackgroundExecutionData: mockIsBackgroundExecutionData,
84
- GitService: vi.fn(),
85
- GeminiClient: MockedGeminiClientClass,
86
- UserPromptEvent: MockedUserPromptEvent,
87
- ValidationRequiredError: MockValidationRequiredError,
88
- parseAndFormatApiError: mockParseAndFormatApiError,
89
- tokenLimit: vi.fn().mockReturnValue(100), // Mock tokenLimit
90
- recordToolCallInteractions: vi.fn().mockResolvedValue(undefined),
91
- getCodeAssistServer: vi.fn().mockReturnValue(undefined),
92
- runInDevTraceSpan: mockRunInDevTraceSpan,
93
- };
94
- });
95
- const mockUseToolScheduler = useToolScheduler;
96
- vi.mock('./useToolScheduler.js', async (importOriginal) => {
97
- const actualSchedulerModule = (await importOriginal());
98
- return {
99
- ...(actualSchedulerModule || {}),
100
- useToolScheduler: vi.fn(),
101
- };
102
- });
103
- vi.mock('./useKeypress.js', () => ({
104
- useKeypress: vi.fn(),
105
- }));
106
- vi.mock('./useExecutionLifecycle.js', () => ({
107
- useExecutionLifecycle: vi.fn().mockReturnValue({
108
- handleShellCommand: vi.fn(),
109
- activeShellPtyId: null,
110
- lastShellOutputTime: 0,
111
- backgroundTaskCount: 0,
112
- isBackgroundTaskVisible: false,
113
- toggleBackgroundTasks: vi.fn(),
114
- backgroundCurrentExecution: vi.fn(),
115
- backgroundTasks: new Map(),
116
- dismissBackgroundTask: vi.fn(),
117
- registerBackgroundTask: vi.fn(),
118
- }),
119
- }));
120
- vi.mock('./atCommandProcessor.js');
121
- vi.mock('../utils/markdownUtilities.js', () => ({
122
- findLastSafeSplitPoint: vi.fn((s) => s.length),
123
- }));
124
- vi.mock('./useStateAndRef.js', async () => {
125
- const React = await vi.importActual('react');
126
- return {
127
- useStateAndRef: vi.fn((initial) => {
128
- // Keep the heavyweight test file lightweight, but still let
129
- // `isResponding` participate in real rerenders.
130
- if (initial === false) {
131
- const [state, setState] = React.useState(initial);
132
- const ref = React.useRef(initial);
133
- const setStateInternal = (updater) => {
134
- const nextValue = typeof updater === 'function'
135
- ? updater(ref.current)
136
- : updater;
137
- ref.current = nextValue;
138
- setState(nextValue);
139
- };
140
- return [state, ref, setStateInternal];
141
- }
142
- let val = initial;
143
- const ref = { current: val };
144
- const setVal = vi.fn((updater) => {
145
- if (typeof updater === 'function') {
146
- val = updater(val);
147
- }
148
- else {
149
- val = updater;
150
- }
151
- ref.current = val;
152
- });
153
- return [val, ref, setVal];
154
- }),
155
- };
156
- });
157
- vi.mock('./useLogger.js', () => ({
158
- useLogger: vi.fn().mockReturnValue({
159
- logMessage: vi.fn().mockResolvedValue(undefined),
160
- }),
161
- }));
162
- const mockStartNewPrompt = vi.fn();
163
- const mockAddUsage = vi.fn();
164
- vi.mock('../contexts/SessionContext.js', async (importOriginal) => {
165
- const actual = (await importOriginal());
166
- return {
167
- ...actual,
168
- useSessionStats: vi.fn(() => ({
169
- startNewPrompt: mockStartNewPrompt,
170
- addUsage: mockAddUsage,
171
- getPromptCount: vi.fn(() => 5),
172
- })),
173
- };
174
- });
175
- vi.mock('./slashCommandProcessor.js', () => ({
176
- handleSlashCommand: vi.fn().mockReturnValue(false),
177
- }));
178
- vi.mock('./useAlternateBuffer.js', () => ({
179
- useAlternateBuffer: vi.fn(() => false),
180
- }));
181
- // --- END MOCKS ---
182
- // --- Tests for useGeminiStream Hook ---
183
- describe('useGeminiStream', () => {
184
- let mockAddItem = vi.fn();
185
- let mockOnDebugMessage = vi.fn();
186
- let mockHandleSlashCommand = vi.fn().mockResolvedValue(false);
187
- let mockScheduleToolCalls;
188
- let mockCancelAllToolCalls;
189
- let mockMarkToolsAsSubmitted;
190
- let handleAtCommandSpy;
191
- const emptyHistory = [];
192
- let capturedOnComplete = null;
193
- const mockGetPreferredEditor = vi.fn(() => 'vscode');
194
- const mockOnAuthError = vi.fn();
195
- const mockPerformMemoryRefresh = vi.fn(() => Promise.resolve());
196
- const mockSetModelSwitchedFromQuotaError = vi.fn();
197
- const mockOnCancelSubmit = vi.fn();
198
- const mockSetShellInputFocused = vi.fn();
199
- const mockGetGeminiClient = vi.fn().mockImplementation(() => {
200
- const clientInstance = new MockedGeminiClientClass(mockConfig);
201
- return clientInstance;
202
- });
203
- const mockMcpClientManager = {
204
- getDiscoveryState: vi.fn().mockReturnValue(MCPDiscoveryState.COMPLETED),
205
- getMcpServerCount: vi.fn().mockReturnValue(0),
206
- };
207
- const mockConfig = {
208
- apiKey: 'test-api-key',
209
- model: 'gemini-pro',
210
- sandbox: false,
211
- targetDir: '/test/dir',
212
- debugMode: false,
213
- question: undefined,
214
- coreTools: [],
215
- toolDiscoveryCommand: undefined,
216
- toolCallCommand: undefined,
217
- mcpServerCommand: undefined,
218
- mcpServers: undefined,
219
- userAgent: 'test-agent',
220
- userMemory: '',
221
- geminiMdFileCount: 0,
222
- alwaysSkipModificationConfirmation: false,
223
- vertexai: false,
224
- showMemoryUsage: false,
225
- contextFileName: undefined,
226
- storage: {
227
- getProjectTempDir: vi.fn(() => '/test/temp'),
228
- getProjectTempCheckpointsDir: vi.fn(() => '/test/temp/checkpoints'),
229
- },
230
- getToolRegistry: vi.fn(() => ({ getToolSchemaList: vi.fn(() => []) })),
231
- getProjectRoot: vi.fn(() => '/test/dir'),
232
- getCheckpointingEnabled: vi.fn(() => false),
233
- getGeminiClient: mockGetGeminiClient,
234
- getMcpClientManager: () => mockMcpClientManager,
235
- getApprovalMode: vi.fn(() => ApprovalMode.DEFAULT),
236
- getUsageStatisticsEnabled: () => true,
237
- getDebugMode: () => false,
238
- addHistory: vi.fn(),
239
- getSessionId: vi.fn(() => 'test-session-id'),
240
- setQuotaErrorOccurred: vi.fn(),
241
- resetBillingTurnState: vi.fn(),
242
- getQuotaErrorOccurred: vi.fn(() => false),
243
- getModel: vi.fn(() => 'gemini-2.5-pro'),
244
- getContentGeneratorConfig: vi.fn(() => ({
245
- model: 'test-model',
246
- apiKey: 'test-key',
247
- vertexai: false,
248
- authType: AuthType.USE_GEMINI,
249
- })),
250
- getContentGenerator: vi.fn(),
251
- isInteractive: () => false,
252
- getExperiments: () => { },
253
- getMaxSessionTurns: vi.fn(() => 100),
254
- getGlobalMemory: vi.fn(() => ''),
255
- getUserMemory: vi.fn(() => ''),
256
- getMessageBus: vi.fn(() => mockMessageBus),
257
- getBaseLlmClient: vi.fn(() => ({
258
- generateContent: vi.fn().mockResolvedValue({
259
- candidates: [
260
- { content: { parts: [{ text: 'Got it. Focusing on tests only.' }] } },
261
- ],
262
- }),
263
- })),
264
- getIdeMode: vi.fn(() => false),
265
- getEnableHooks: vi.fn(() => false),
266
- };
267
- beforeEach(() => {
268
- vi.clearAllMocks(); // Clear mocks before each test
269
- mockAddItem = vi.fn();
270
- mockOnDebugMessage = vi.fn();
271
- mockHandleSlashCommand = vi.fn().mockResolvedValue(false);
272
- // Mock return value for useReactToolScheduler
273
- mockScheduleToolCalls = vi.fn();
274
- mockCancelAllToolCalls = vi.fn();
275
- mockMarkToolsAsSubmitted = vi.fn();
276
- // Reset properties of mockConfig if needed
277
- mockConfig.getCheckpointingEnabled.mockReturnValue(false);
278
- mockConfig.getApprovalMode.mockReturnValue(ApprovalMode.DEFAULT);
279
- // Default mock for useReactToolScheduler to prevent toolCalls being undefined initially
280
- mockUseToolScheduler.mockReturnValue([
281
- [], // Default to empty array for toolCalls
282
- mockScheduleToolCalls,
283
- mockMarkToolsAsSubmitted,
284
- vi.fn(), // setToolCallsForDisplay
285
- mockCancelAllToolCalls,
286
- 0, // lastToolOutputTime
287
- ]);
288
- // Reset mocks for GeminiClient instance methods (startChat and sendMessageStream)
289
- // The GeminiClient constructor itself is mocked at the module level.
290
- mockStartChat.mockClear().mockResolvedValue({
291
- sendMessageStream: mockSendMessageStream,
292
- }); // GeminiChat -> any
293
- mockSendMessageStream
294
- .mockClear()
295
- .mockReturnValue((async function* () { })());
296
- handleAtCommandSpy = vi.spyOn(atCommandProcessor, 'handleAtCommand');
297
- vi.spyOn(coreEvents, 'emitFeedback');
298
- });
299
- const mockLoadedSettings = {
300
- merged: {
301
- preferredEditor: 'vscode',
302
- ui: { errorVerbosity: 'full' },
303
- },
304
- user: { path: '/user/settings.json', settings: {} },
305
- workspace: { path: '/workspace/.gemini/settings.json', settings: {} },
306
- errors: [],
307
- forScope: vi.fn(),
308
- setValue: vi.fn(),
309
- };
310
- const renderTestHook = async (initialToolCalls = [], geminiClient, loadedSettings = mockLoadedSettings) => {
311
- const client = geminiClient || mockConfig.getGeminiClient();
312
- let lastToolCalls = initialToolCalls;
313
- const initialProps = {
314
- client,
315
- history: emptyHistory,
316
- addItem: mockAddItem,
317
- config: mockConfig,
318
- onDebugMessage: mockOnDebugMessage,
319
- handleSlashCommand: mockHandleSlashCommand,
320
- shellModeActive: false,
321
- loadedSettings,
322
- toolCalls: initialToolCalls,
323
- };
324
- mockUseToolScheduler.mockImplementation((onComplete) => {
325
- capturedOnComplete = onComplete;
326
- return [
327
- lastToolCalls,
328
- mockScheduleToolCalls,
329
- mockMarkToolsAsSubmitted,
330
- (updater) => {
331
- lastToolCalls =
332
- typeof updater === 'function' ? updater(lastToolCalls) : updater;
333
- rerender({ ...initialProps, toolCalls: lastToolCalls });
334
- },
335
- (signal) => {
336
- mockCancelAllToolCalls(signal);
337
- lastToolCalls = lastToolCalls.map((tc) => {
338
- if (tc.status === CoreToolCallStatus.AwaitingApproval ||
339
- tc.status === CoreToolCallStatus.Executing ||
340
- tc.status === CoreToolCallStatus.Scheduled ||
341
- tc.status === CoreToolCallStatus.Validating) {
342
- return {
343
- ...tc,
344
- status: CoreToolCallStatus.Cancelled,
345
- response: {
346
- callId: tc.request.callId,
347
- responseParts: [],
348
- resultDisplay: 'Request cancelled.',
349
- },
350
- responseSubmittedToGemini: true,
351
- };
352
- }
353
- return tc;
354
- });
355
- rerender({ ...initialProps, toolCalls: lastToolCalls });
356
- },
357
- 0,
358
- ];
359
- });
360
- const { result, rerender } = await renderHookWithProviders((props) => useGeminiStream(props.client, props.history, props.addItem, props.config, props.loadedSettings, props.onDebugMessage, props.handleSlashCommand, props.shellModeActive, mockGetPreferredEditor, mockOnAuthError, mockPerformMemoryRefresh, false, mockSetModelSwitchedFromQuotaError, mockOnCancelSubmit, mockSetShellInputFocused, 80, 24), {
361
- initialProps,
362
- });
363
- return {
364
- result,
365
- rerender,
366
- mockMarkToolsAsSubmitted,
367
- mockSendMessageStream,
368
- client,
369
- };
370
- };
371
- // Helper to create mock tool calls - reduces boilerplate
372
- const createMockToolCall = (toolName, callId, confirmationType, status = CoreToolCallStatus.AwaitingApproval, mockOnConfirm = vi.fn()) => ({
373
- request: {
374
- callId,
375
- name: toolName,
376
- args: {},
377
- isClientInitiated: false,
378
- prompt_id: 'prompt-id-1',
379
- },
380
- status: status,
381
- responseSubmittedToGemini: false,
382
- confirmationDetails: confirmationType === 'edit'
383
- ? {
384
- type: 'edit',
385
- title: 'Confirm Edit',
386
- fileName: 'file.txt',
387
- filePath: '/test/file.txt',
388
- fileDiff: 'fake diff',
389
- originalContent: 'old',
390
- newContent: 'new',
391
- onConfirm: mockOnConfirm,
392
- }
393
- : {
394
- type: 'info',
395
- title: `${toolName} confirmation`,
396
- prompt: `Execute ${toolName}?`,
397
- onConfirm: mockOnConfirm,
398
- },
399
- tool: {
400
- name: toolName,
401
- displayName: toolName,
402
- description: `${toolName} description`,
403
- build: vi.fn(),
404
- },
405
- invocation: {
406
- getDescription: () => 'Mock description',
407
- },
408
- correlationId: `corr-${callId}`,
409
- });
410
- // Helper to render hook with default parameters - reduces boilerplate
411
- const renderHookWithDefaults = async (options = {}) => {
412
- const { shellModeActive = false, onCancelSubmit = () => { }, setShellInputFocused = () => { }, performMemoryRefresh = () => Promise.resolve(), onAuthError = () => { }, setModelSwitched = vi.fn(), modelSwitched = false, } = options;
413
- return renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, shellModeActive, () => 'vscode', onAuthError, performMemoryRefresh, modelSwitched, setModelSwitched, onCancelSubmit, setShellInputFocused, 80, 24));
414
- };
415
- it('should not submit tool responses if not all tool calls are completed', async () => {
416
- const toolCalls = [
417
- {
418
- request: {
419
- callId: 'call1',
420
- name: 'tool1',
421
- args: {},
422
- isClientInitiated: false,
423
- prompt_id: 'prompt-id-1',
424
- },
425
- status: CoreToolCallStatus.Success,
426
- responseSubmittedToGemini: false,
427
- response: {
428
- callId: 'call1',
429
- responseParts: [{ text: 'tool 1 response' }],
430
- error: undefined,
431
- errorType: undefined, // FIX: Added missing property
432
- resultDisplay: 'Tool 1 success display',
433
- },
434
- tool: {
435
- name: 'tool1',
436
- displayName: 'tool1',
437
- description: 'desc1',
438
- build: vi.fn(),
439
- },
440
- invocation: {
441
- getDescription: () => `Mock description`,
442
- },
443
- startTime: Date.now(),
444
- endTime: Date.now(),
445
- },
446
- {
447
- request: {
448
- callId: 'call2',
449
- name: 'tool2',
450
- args: {},
451
- prompt_id: 'prompt-id-1',
452
- },
453
- status: CoreToolCallStatus.Executing,
454
- responseSubmittedToGemini: false,
455
- tool: {
456
- name: 'tool2',
457
- displayName: 'tool2',
458
- description: 'desc2',
459
- build: vi.fn(),
460
- },
461
- invocation: {
462
- getDescription: () => `Mock description`,
463
- },
464
- startTime: Date.now(),
465
- liveOutput: '...',
466
- },
467
- ];
468
- const { mockMarkToolsAsSubmitted, mockSendMessageStream } = await renderTestHook(toolCalls);
469
- // Effect for submitting tool responses depends on toolCalls and isResponding
470
- // isResponding is initially false, so the effect should run.
471
- expect(mockMarkToolsAsSubmitted).not.toHaveBeenCalled();
472
- expect(mockSendMessageStream).not.toHaveBeenCalled(); // submitQuery uses this
473
- });
474
- it('should expose activePtyId for non-shell executing tools that report an execution ID', async () => {
475
- const remoteExecutingTool = {
476
- request: {
477
- callId: 'remote-call-1',
478
- name: 'remote_agent_call',
479
- args: {},
480
- isClientInitiated: false,
481
- prompt_id: 'prompt-id-remote',
482
- },
483
- status: CoreToolCallStatus.Executing,
484
- responseSubmittedToGemini: false,
485
- tool: {
486
- name: 'remote_agent_call',
487
- displayName: 'Remote Agent',
488
- description: 'Remote agent execution',
489
- build: vi.fn(),
490
- },
491
- invocation: {
492
- getDescription: () => 'Calling remote agent',
493
- },
494
- startTime: Date.now(),
495
- liveOutput: 'working...',
496
- pid: 4242,
497
- };
498
- const { result } = await renderTestHook([remoteExecutingTool]);
499
- expect(result.current.activePtyId).toBe(4242);
500
- });
501
- it('should submit tool responses when all tool calls are completed and ready', async () => {
502
- const toolCall1ResponseParts = [{ text: 'tool 1 final response' }];
503
- const toolCall2ResponseParts = [{ text: 'tool 2 final response' }];
504
- const completedToolCalls = [
505
- {
506
- request: {
507
- callId: 'call1',
508
- name: 'tool1',
509
- args: {},
510
- isClientInitiated: false,
511
- prompt_id: 'prompt-id-2',
512
- },
513
- status: CoreToolCallStatus.Success,
514
- responseSubmittedToGemini: false,
515
- response: {
516
- callId: 'call1',
517
- responseParts: toolCall1ResponseParts,
518
- errorType: undefined, // FIX: Added missing property
519
- },
520
- tool: {
521
- displayName: 'MockTool',
522
- },
523
- invocation: {
524
- getDescription: () => `Mock description`,
525
- },
526
- },
527
- {
528
- request: {
529
- callId: 'call2',
530
- name: 'tool2',
531
- args: {},
532
- isClientInitiated: false,
533
- prompt_id: 'prompt-id-2',
534
- },
535
- status: CoreToolCallStatus.Error,
536
- responseSubmittedToGemini: false,
537
- response: {
538
- callId: 'call2',
539
- responseParts: toolCall2ResponseParts,
540
- errorType: ToolErrorType.UNHANDLED_EXCEPTION, // FIX: Added missing property
541
- },
542
- },
543
- ];
544
- // Capture the onComplete callback
545
- let capturedOnComplete = null;
546
- mockUseToolScheduler.mockImplementation((onComplete) => {
547
- capturedOnComplete = onComplete;
548
- return [
549
- [],
550
- mockScheduleToolCalls,
551
- mockMarkToolsAsSubmitted,
552
- vi.fn(),
553
- mockCancelAllToolCalls,
554
- 0,
555
- ];
556
- });
557
- await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
558
- // Trigger the onComplete callback with completed tools
559
- await act(async () => {
560
- if (capturedOnComplete) {
561
- // Wait a tick for refs to be set up
562
- await new Promise((resolve) => setTimeout(resolve, 0));
563
- await capturedOnComplete(completedToolCalls);
564
- }
565
- });
566
- await waitFor(() => {
567
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledTimes(1);
568
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
569
- });
570
- const expectedMergedResponse = [
571
- ...toolCall1ResponseParts,
572
- ...toolCall2ResponseParts,
573
- ];
574
- expect(mockSendMessageStream).toHaveBeenCalledWith(expectedMergedResponse, expect.any(AbortSignal), 'prompt-id-2', undefined, expectedMergedResponse);
575
- });
576
- it('should inject steering hint prompt for continuation', async () => {
577
- const toolCallResponseParts = [{ text: 'tool final response' }];
578
- const completedToolCalls = [
579
- {
580
- request: {
581
- callId: 'call1',
582
- name: 'tool1',
583
- args: {},
584
- isClientInitiated: false,
585
- prompt_id: 'prompt-id-ack',
586
- },
587
- status: 'success',
588
- responseSubmittedToGemini: false,
589
- response: {
590
- callId: 'call1',
591
- responseParts: toolCallResponseParts,
592
- errorType: undefined,
593
- },
594
- tool: {
595
- displayName: 'MockTool',
596
- },
597
- invocation: {
598
- getDescription: () => `Mock description`,
599
- },
600
- },
601
- ];
602
- mockSendMessageStream.mockReturnValue((async function* () {
603
- yield {
604
- type: ServerGeminiEventType.Content,
605
- value: 'Applied the requested adjustment.',
606
- };
607
- })());
608
- let capturedOnComplete = null;
609
- mockUseToolScheduler.mockImplementation((onComplete) => {
610
- capturedOnComplete = onComplete;
611
- return [
612
- [],
613
- mockScheduleToolCalls,
614
- mockMarkToolsAsSubmitted,
615
- vi.fn(),
616
- mockCancelAllToolCalls,
617
- 0,
618
- ];
619
- });
620
- await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24, undefined, () => 'focus on tests only'));
621
- await act(async () => {
622
- if (capturedOnComplete) {
623
- await new Promise((resolve) => setTimeout(resolve, 0));
624
- await capturedOnComplete(completedToolCalls);
625
- }
626
- });
627
- await waitFor(() => {
628
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
629
- });
630
- const sentParts = mockSendMessageStream.mock.calls[0][0];
631
- const injectedHintPart = sentParts[0];
632
- expect(injectedHintPart.text).toContain('User steering update:');
633
- expect(injectedHintPart.text).toContain('<user_input>\nfocus on tests only\n</user_input>');
634
- expect(injectedHintPart.text).toContain('Classify it as ADD_TASK, MODIFY_TASK, CANCEL_TASK, or EXTRA_CONTEXT.');
635
- expect(injectedHintPart.text).toContain('Do not cancel/skip tasks unless the user explicitly cancels them.');
636
- expect(mockRunInDevTraceSpan).toHaveBeenCalledWith(expect.objectContaining({
637
- operation: GeminiCliOperation.SystemPrompt,
638
- }), expect.any(Function));
639
- const spanArgs = mockRunInDevTraceSpan.mock.calls[0];
640
- const fn = spanArgs[1];
641
- const metadata = { attributes: {} };
642
- await act(async () => {
643
- await fn({ metadata });
644
- });
645
- expect(metadata).toMatchObject({
646
- input: sentParts,
647
- });
648
- });
649
- it('should handle all tool calls being cancelled', async () => {
650
- const cancelledToolCalls = [
651
- {
652
- request: {
653
- callId: 'topic1',
654
- name: UPDATE_TOPIC_TOOL_NAME,
655
- args: {},
656
- isClientInitiated: false,
657
- prompt_id: 'prompt-id-3',
658
- },
659
- status: CoreToolCallStatus.Success,
660
- response: {
661
- callId: 'topic1',
662
- responseParts: [
663
- {
664
- functionResponse: {
665
- name: UPDATE_TOPIC_TOOL_NAME,
666
- id: 'topic1',
667
- response: {},
668
- },
669
- },
670
- ],
671
- },
672
- tool: { displayName: 'Update Topic Context' },
673
- invocation: { getDescription: () => 'Updating topic' },
674
- },
675
- {
676
- request: {
677
- callId: '1',
678
- name: 'testTool',
679
- args: {},
680
- isClientInitiated: false,
681
- prompt_id: 'prompt-id-3',
682
- },
683
- status: CoreToolCallStatus.Cancelled,
684
- response: {
685
- callId: '1',
686
- responseParts: [{ text: CoreToolCallStatus.Cancelled }],
687
- errorType: undefined, // FIX: Added missing property
688
- },
689
- responseSubmittedToGemini: false,
690
- tool: {
691
- displayName: 'mock tool',
692
- },
693
- invocation: {
694
- getDescription: () => `Mock description`,
695
- },
696
- },
697
- ];
698
- const client = new MockedGeminiClientClass(mockConfig);
699
- // Capture the onComplete callback
700
- let capturedOnComplete = null;
701
- mockUseToolScheduler.mockImplementation((onComplete) => {
702
- capturedOnComplete = onComplete;
703
- return [
704
- [],
705
- mockScheduleToolCalls,
706
- mockMarkToolsAsSubmitted,
707
- vi.fn(),
708
- mockCancelAllToolCalls,
709
- 0,
710
- ];
711
- });
712
- await renderHookWithProviders(() => useGeminiStream(client, [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
713
- // Trigger the onComplete callback with cancelled tools
714
- await act(async () => {
715
- if (capturedOnComplete) {
716
- // Wait a tick for refs to be set up
717
- await new Promise((resolve) => setTimeout(resolve, 0));
718
- await capturedOnComplete(cancelledToolCalls);
719
- }
720
- });
721
- await waitFor(() => {
722
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith(['topic1', '1']);
723
- expect(client.addHistory).toHaveBeenCalledWith({
724
- role: 'user',
725
- parts: [
726
- {
727
- functionResponse: {
728
- name: UPDATE_TOPIC_TOOL_NAME,
729
- id: 'topic1',
730
- response: {},
731
- },
732
- },
733
- { text: CoreToolCallStatus.Cancelled },
734
- ],
735
- });
736
- // Ensure we do NOT call back to the API
737
- expect(mockSendMessageStream).not.toHaveBeenCalled();
738
- });
739
- });
740
- it('should NOT stop responding when only update_topic is called', async () => {
741
- const topicToolCalls = [
742
- {
743
- request: {
744
- callId: 'topic1',
745
- name: UPDATE_TOPIC_TOOL_NAME,
746
- args: {},
747
- isClientInitiated: false,
748
- prompt_id: 'prompt-id-3',
749
- },
750
- status: CoreToolCallStatus.Success,
751
- response: {
752
- callId: 'topic1',
753
- responseParts: [
754
- {
755
- functionResponse: {
756
- name: UPDATE_TOPIC_TOOL_NAME,
757
- id: 'topic1',
758
- response: {},
759
- },
760
- },
761
- ],
762
- },
763
- tool: { displayName: 'Update Topic Context' },
764
- invocation: { getDescription: () => 'Updating topic' },
765
- },
766
- ];
767
- const client = new MockedGeminiClientClass(mockConfig);
768
- // Capture the onComplete callback
769
- let capturedOnComplete = null;
770
- mockUseToolScheduler.mockImplementation((onComplete) => {
771
- capturedOnComplete = onComplete;
772
- return [
773
- topicToolCalls,
774
- vi.fn(),
775
- mockMarkToolsAsSubmitted,
776
- vi.fn(),
777
- vi.fn(),
778
- 0,
779
- ];
780
- });
781
- await renderHookWithProviders(() => useGeminiStream(client, [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
782
- // Trigger the onComplete callback with the topic tool
783
- await act(async () => {
784
- if (capturedOnComplete) {
785
- await capturedOnComplete(topicToolCalls);
786
- }
787
- });
788
- await waitFor(() => {
789
- // The streaming state should still be Responding because we didn't cancel anything important
790
- // and we expect a continuation.
791
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith(['topic1']);
792
- // Should HAVE called back to the API for continuation
793
- expect(mockSendMessageStream).toHaveBeenCalled();
794
- });
795
- });
796
- it('should stop agent execution immediately when a tool call returns STOP_EXECUTION error', async () => {
797
- const stopExecutionToolCalls = [
798
- {
799
- request: {
800
- callId: 'stop-call',
801
- name: 'stopTool',
802
- args: {},
803
- isClientInitiated: false,
804
- prompt_id: 'prompt-id-stop',
805
- },
806
- status: CoreToolCallStatus.Error,
807
- response: {
808
- callId: 'stop-call',
809
- responseParts: [{ text: 'error occurred' }],
810
- errorType: ToolErrorType.STOP_EXECUTION,
811
- error: new Error('Stop reason from hook'),
812
- resultDisplay: undefined,
813
- },
814
- responseSubmittedToGemini: false,
815
- tool: {
816
- displayName: 'stop tool',
817
- },
818
- invocation: {
819
- getDescription: () => `Mock description`,
820
- },
821
- },
822
- ];
823
- const client = new MockedGeminiClientClass(mockConfig);
824
- const { result } = await renderTestHook([], client);
825
- // Trigger the onComplete callback with STOP_EXECUTION tool
826
- await act(async () => {
827
- if (capturedOnComplete) {
828
- await capturedOnComplete(stopExecutionToolCalls);
829
- }
830
- });
831
- await waitFor(() => {
832
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith(['stop-call']);
833
- // Should add an info message to history
834
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
835
- type: MessageType.INFO,
836
- text: expect.stringContaining('Agent execution stopped: Stop reason from hook'),
837
- }));
838
- // Ensure we do NOT call back to the API
839
- expect(mockSendMessageStream).not.toHaveBeenCalled();
840
- // Streaming state should be Idle
841
- expect(result.current.streamingState).toBe(StreamingState.Idle);
842
- });
843
- const infoTexts = mockAddItem.mock.calls.map(([item]) => item.text ?? '');
844
- expect(infoTexts.some((text) => text.includes('Some internal tool attempts failed before this final error'))).toBe(false);
845
- expect(infoTexts.some((text) => text.includes('This request failed. Press F12 for diagnostics'))).toBe(false);
846
- });
847
- it('should add a compact suppressed-error note before STOP_EXECUTION terminal info in low verbosity mode', async () => {
848
- const stopExecutionToolCalls = [
849
- {
850
- request: {
851
- callId: 'stop-call',
852
- name: 'stopTool',
853
- args: {},
854
- isClientInitiated: false,
855
- prompt_id: 'prompt-id-stop',
856
- },
857
- status: CoreToolCallStatus.Error,
858
- response: {
859
- callId: 'stop-call',
860
- responseParts: [{ text: 'error occurred' }],
861
- errorType: ToolErrorType.STOP_EXECUTION,
862
- error: new Error('Stop reason from hook'),
863
- resultDisplay: undefined,
864
- },
865
- responseSubmittedToGemini: false,
866
- tool: {
867
- displayName: 'stop tool',
868
- },
869
- invocation: {
870
- getDescription: () => `Mock description`,
871
- },
872
- },
873
- ];
874
- const lowVerbositySettings = {
875
- // eslint-disable-next-line @typescript-eslint/no-misused-spread
876
- ...mockLoadedSettings,
877
- merged: {
878
- ...mockLoadedSettings.merged,
879
- ui: { errorVerbosity: 'low' },
880
- },
881
- };
882
- const client = new MockedGeminiClientClass(mockConfig);
883
- const { result } = await renderTestHook([], client, lowVerbositySettings);
884
- await act(async () => {
885
- if (capturedOnComplete) {
886
- await capturedOnComplete(stopExecutionToolCalls);
887
- }
888
- });
889
- await waitFor(() => {
890
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith(['stop-call']);
891
- expect(mockSendMessageStream).not.toHaveBeenCalled();
892
- expect(result.current.streamingState).toBe(StreamingState.Idle);
893
- });
894
- const infoTexts = mockAddItem.mock.calls.map(([item]) => item.text ?? '');
895
- const noteIndex = infoTexts.findIndex((text) => text.includes('Some internal tool attempts failed before this final error'));
896
- const stopIndex = infoTexts.findIndex((text) => text.includes('Agent execution stopped: Stop reason from hook'));
897
- const failureHintIndex = infoTexts.findIndex((text) => text.includes('This request failed. Press F12 for diagnostics'));
898
- expect(noteIndex).toBeGreaterThanOrEqual(0);
899
- expect(stopIndex).toBeGreaterThanOrEqual(0);
900
- // The failure hint should NOT be present if the suppressed error note was shown
901
- expect(failureHintIndex).toBe(-1);
902
- expect(noteIndex).toBeLessThan(stopIndex);
903
- });
904
- it('should group multiple cancelled tool call responses into a single history entry', async () => {
905
- const cancelledToolCall1 = {
906
- request: {
907
- callId: 'cancel-1',
908
- name: 'toolA',
909
- args: {},
910
- isClientInitiated: false,
911
- prompt_id: 'prompt-id-7',
912
- },
913
- tool: {
914
- name: 'toolA',
915
- displayName: 'toolA',
916
- description: 'descA',
917
- build: vi.fn(),
918
- },
919
- invocation: {
920
- getDescription: () => `Mock description`,
921
- },
922
- status: CoreToolCallStatus.Cancelled,
923
- response: {
924
- callId: 'cancel-1',
925
- responseParts: [
926
- { functionResponse: { name: 'toolA', id: 'cancel-1' } },
927
- ],
928
- resultDisplay: undefined,
929
- error: undefined,
930
- errorType: undefined, // FIX: Added missing property
931
- },
932
- responseSubmittedToGemini: false,
933
- };
934
- const cancelledToolCall2 = {
935
- request: {
936
- callId: 'cancel-2',
937
- name: 'toolB',
938
- args: {},
939
- isClientInitiated: false,
940
- prompt_id: 'prompt-id-8',
941
- },
942
- tool: {
943
- name: 'toolB',
944
- displayName: 'toolB',
945
- description: 'descB',
946
- build: vi.fn(),
947
- },
948
- invocation: {
949
- getDescription: () => `Mock description`,
950
- },
951
- status: CoreToolCallStatus.Cancelled,
952
- response: {
953
- callId: 'cancel-2',
954
- responseParts: [
955
- { functionResponse: { name: 'toolB', id: 'cancel-2' } },
956
- ],
957
- resultDisplay: undefined,
958
- error: undefined,
959
- errorType: undefined, // FIX: Added missing property
960
- },
961
- responseSubmittedToGemini: false,
962
- };
963
- const allCancelledTools = [cancelledToolCall1, cancelledToolCall2];
964
- const client = new MockedGeminiClientClass(mockConfig);
965
- let capturedOnComplete = null;
966
- mockUseToolScheduler.mockImplementation((onComplete) => {
967
- capturedOnComplete = onComplete;
968
- return [
969
- [],
970
- mockScheduleToolCalls,
971
- mockMarkToolsAsSubmitted,
972
- vi.fn(),
973
- mockCancelAllToolCalls,
974
- 0,
975
- ];
976
- });
977
- await renderHookWithProviders(() => useGeminiStream(client, [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
978
- // Trigger the onComplete callback with multiple cancelled tools
979
- await act(async () => {
980
- if (capturedOnComplete) {
981
- // Wait a tick for refs to be set up
982
- await new Promise((resolve) => setTimeout(resolve, 0));
983
- await capturedOnComplete(allCancelledTools);
984
- }
985
- });
986
- await waitFor(() => {
987
- // The tools should be marked as submitted locally
988
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith([
989
- 'cancel-1',
990
- 'cancel-2',
991
- ]);
992
- // Crucially, addHistory should be called only ONCE
993
- expect(client.addHistory).toHaveBeenCalledTimes(1);
994
- // And that single call should contain BOTH function responses
995
- expect(client.addHistory).toHaveBeenCalledWith({
996
- role: 'user',
997
- parts: [
998
- ...cancelledToolCall1.response.responseParts,
999
- ...cancelledToolCall2.response.responseParts,
1000
- ],
1001
- });
1002
- // No message should be sent back to the API for a turn with only cancellations
1003
- expect(mockSendMessageStream).not.toHaveBeenCalled();
1004
- });
1005
- });
1006
- it('should not flicker streaming state to Idle between tool completion and submission', async () => {
1007
- const toolCallResponseParts = [
1008
- { text: 'tool 1 final response' },
1009
- ];
1010
- const initialToolCalls = [
1011
- {
1012
- request: {
1013
- callId: 'call1',
1014
- name: 'tool1',
1015
- args: {},
1016
- isClientInitiated: false,
1017
- prompt_id: 'prompt-id-4',
1018
- },
1019
- status: CoreToolCallStatus.Executing,
1020
- responseSubmittedToGemini: false,
1021
- tool: {
1022
- name: 'tool1',
1023
- displayName: 'tool1',
1024
- description: 'desc',
1025
- build: vi.fn(),
1026
- },
1027
- invocation: {
1028
- getDescription: () => `Mock description`,
1029
- },
1030
- startTime: Date.now(),
1031
- },
1032
- ];
1033
- const completedToolCalls = [
1034
- {
1035
- ...initialToolCalls[0],
1036
- status: CoreToolCallStatus.Success,
1037
- response: {
1038
- callId: 'call1',
1039
- responseParts: toolCallResponseParts,
1040
- error: undefined,
1041
- errorType: undefined, // FIX: Added missing property
1042
- resultDisplay: 'Tool 1 success display',
1043
- },
1044
- endTime: Date.now(),
1045
- },
1046
- ];
1047
- // Capture the onComplete callback
1048
- let capturedOnComplete = null;
1049
- let currentToolCalls = initialToolCalls;
1050
- mockUseToolScheduler.mockImplementation((onComplete) => {
1051
- capturedOnComplete = onComplete;
1052
- return [
1053
- currentToolCalls,
1054
- mockScheduleToolCalls,
1055
- mockMarkToolsAsSubmitted,
1056
- vi.fn(), // setToolCallsForDisplay
1057
- mockCancelAllToolCalls,
1058
- 0,
1059
- ];
1060
- });
1061
- const { result, rerender } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
1062
- // 1. Initial state should be Responding because a tool is executing.
1063
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1064
- // 2. Update the tool calls to completed state and rerender
1065
- currentToolCalls = completedToolCalls;
1066
- mockUseToolScheduler.mockImplementation((onComplete) => {
1067
- capturedOnComplete = onComplete;
1068
- return [
1069
- completedToolCalls,
1070
- mockScheduleToolCalls,
1071
- mockMarkToolsAsSubmitted,
1072
- vi.fn(), // setToolCallsForDisplay
1073
- mockCancelAllToolCalls,
1074
- 0,
1075
- ];
1076
- });
1077
- act(() => {
1078
- rerender();
1079
- });
1080
- // 3. The state should *still* be Responding, not Idle.
1081
- // This is because the completed tool's response has not been submitted yet.
1082
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1083
- // 4. Trigger the onComplete callback to simulate tool completion
1084
- await act(async () => {
1085
- if (capturedOnComplete) {
1086
- // Wait a tick for refs to be set up
1087
- await new Promise((resolve) => setTimeout(resolve, 0));
1088
- await capturedOnComplete(completedToolCalls);
1089
- }
1090
- });
1091
- // 5. Wait for submitQuery to be called
1092
- await waitFor(() => {
1093
- expect(mockSendMessageStream).toHaveBeenCalledWith(toolCallResponseParts, expect.any(AbortSignal), 'prompt-id-4', undefined, toolCallResponseParts);
1094
- });
1095
- // 6. After submission, the state should remain Responding until the stream completes.
1096
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1097
- });
1098
- describe('User Cancellation', () => {
1099
- let keypressCallback;
1100
- const mockUseKeypress = useKeypress;
1101
- beforeEach(() => {
1102
- // Capture the callback passed to useKeypress
1103
- mockUseKeypress.mockImplementation((callback, options) => {
1104
- if (options.isActive) {
1105
- keypressCallback = callback;
1106
- }
1107
- else {
1108
- keypressCallback = () => { };
1109
- }
1110
- });
1111
- });
1112
- const simulateEscapeKeyPress = () => {
1113
- act(() => {
1114
- keypressCallback({ name: 'escape' });
1115
- });
1116
- };
1117
- it('should cancel an in-progress stream when escape is pressed', async () => {
1118
- const mockStream = (async function* () {
1119
- yield { type: 'content', value: 'Part 1' };
1120
- // Keep the stream open
1121
- await new Promise(() => { });
1122
- })();
1123
- mockSendMessageStream.mockReturnValue(mockStream);
1124
- const { result } = await renderTestHook();
1125
- // Start a query
1126
- await act(async () => {
1127
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1128
- result.current.submitQuery('test query');
1129
- });
1130
- // Wait for the first part of the response
1131
- await waitFor(() => {
1132
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1133
- });
1134
- // Simulate escape key press
1135
- simulateEscapeKeyPress();
1136
- // Verify cancellation message is added
1137
- await waitFor(() => {
1138
- expect(mockAddItem).toHaveBeenCalledWith({
1139
- type: MessageType.INFO,
1140
- text: 'Request cancelled.',
1141
- });
1142
- });
1143
- // Verify state is reset
1144
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1145
- });
1146
- it('should call onCancelSubmit handler when escape is pressed', async () => {
1147
- const cancelSubmitSpy = vi.fn();
1148
- const mockStream = (async function* () {
1149
- yield { type: 'content', value: 'Part 1' };
1150
- // Keep the stream open
1151
- await new Promise(() => { });
1152
- })();
1153
- mockSendMessageStream.mockReturnValue(mockStream);
1154
- const { result } = await renderHookWithProviders(() => useGeminiStream(mockConfig.getGeminiClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, cancelSubmitSpy, () => { }, 80, 24));
1155
- // Start a query
1156
- await act(async () => {
1157
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1158
- result.current.submitQuery('test query');
1159
- });
1160
- simulateEscapeKeyPress();
1161
- expect(cancelSubmitSpy).toHaveBeenCalledWith(false, false);
1162
- });
1163
- it('should call setShellInputFocused(false) when escape is pressed', async () => {
1164
- const setShellInputFocusedSpy = vi.fn();
1165
- const mockStream = (async function* () {
1166
- yield { type: 'content', value: 'Part 1' };
1167
- await new Promise(() => { }); // Keep stream open
1168
- })();
1169
- mockSendMessageStream.mockReturnValue(mockStream);
1170
- const { result } = await renderHookWithProviders(() => useGeminiStream(mockConfig.getGeminiClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, vi.fn(), setShellInputFocusedSpy, // Pass the spy here
1171
- 80, 24));
1172
- // Start a query
1173
- await act(async () => {
1174
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1175
- result.current.submitQuery('test query');
1176
- });
1177
- simulateEscapeKeyPress();
1178
- expect(setShellInputFocusedSpy).toHaveBeenCalledWith(false);
1179
- });
1180
- it('should not do anything if escape is pressed when not responding', async () => {
1181
- const { result } = await renderTestHook();
1182
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1183
- // Simulate escape key press
1184
- simulateEscapeKeyPress();
1185
- // No change should happen, no cancellation message
1186
- expect(mockAddItem).not.toHaveBeenCalledWith(expect.objectContaining({
1187
- text: 'Request cancelled.',
1188
- }));
1189
- });
1190
- it('should prevent further processing after cancellation', async () => {
1191
- let continueStream;
1192
- const streamPromise = new Promise((resolve) => {
1193
- continueStream = resolve;
1194
- });
1195
- const mockStream = (async function* () {
1196
- yield { type: 'content', value: 'Initial' };
1197
- await streamPromise; // Wait until we manually continue
1198
- yield { type: 'content', value: ' Canceled' };
1199
- })();
1200
- mockSendMessageStream.mockReturnValue(mockStream);
1201
- const { result } = await renderTestHook();
1202
- await act(async () => {
1203
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1204
- result.current.submitQuery('long running query');
1205
- });
1206
- await waitFor(() => {
1207
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1208
- });
1209
- // Cancel the request
1210
- simulateEscapeKeyPress();
1211
- // Allow the stream to continue
1212
- await act(async () => {
1213
- continueStream();
1214
- // Wait a bit to see if the second part is processed
1215
- await new Promise((resolve) => setTimeout(resolve, 50));
1216
- });
1217
- // The text should not have been updated with " Canceled"
1218
- const lastCall = mockAddItem.mock.calls.find((call) => call[0].type === 'gemini');
1219
- expect(lastCall?.[0].text).toBe('Initial');
1220
- // The final state should be idle after cancellation
1221
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1222
- });
1223
- it('should cancel if a tool call is in progress', async () => {
1224
- const toolCalls = [
1225
- {
1226
- request: { callId: 'call1', name: 'tool1', args: {} },
1227
- status: CoreToolCallStatus.Executing,
1228
- responseSubmittedToGemini: false,
1229
- tool: {
1230
- name: 'tool1',
1231
- description: 'desc1',
1232
- build: vi.fn().mockImplementation((_) => ({
1233
- getDescription: () => `Mock description`,
1234
- })),
1235
- },
1236
- invocation: {
1237
- getDescription: () => `Mock description`,
1238
- },
1239
- startTime: Date.now(),
1240
- liveOutput: '...',
1241
- },
1242
- ];
1243
- const { result } = await renderTestHook(toolCalls);
1244
- // State is `Responding` because a tool is running
1245
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1246
- // Try to cancel
1247
- simulateEscapeKeyPress();
1248
- // The cancel function should be called
1249
- expect(mockCancelAllToolCalls).toHaveBeenCalled();
1250
- });
1251
- it('should cancel a request when a tool is awaiting confirmation', async () => {
1252
- const mockOnConfirm = vi.fn().mockResolvedValue(undefined);
1253
- const toolCalls = [
1254
- {
1255
- request: {
1256
- callId: 'confirm-call',
1257
- name: 'some_tool',
1258
- args: {},
1259
- isClientInitiated: false,
1260
- prompt_id: 'prompt-id-1',
1261
- },
1262
- status: CoreToolCallStatus.AwaitingApproval,
1263
- responseSubmittedToGemini: false,
1264
- tool: {
1265
- name: 'some_tool',
1266
- description: 'a tool',
1267
- build: vi.fn().mockImplementation((_) => ({
1268
- getDescription: () => `Mock description`,
1269
- })),
1270
- },
1271
- invocation: {
1272
- getDescription: () => `Mock description`,
1273
- },
1274
- confirmationDetails: {
1275
- type: 'edit',
1276
- title: 'Confirm Edit',
1277
- onConfirm: mockOnConfirm,
1278
- fileName: 'file.txt',
1279
- filePath: '/test/file.txt',
1280
- fileDiff: 'fake diff',
1281
- originalContent: 'old',
1282
- newContent: 'new',
1283
- },
1284
- },
1285
- ];
1286
- const { result } = await renderTestHook(toolCalls);
1287
- // State is `WaitingForConfirmation` because a tool is awaiting approval
1288
- expect(result.current.streamingState).toBe(StreamingState.WaitingForConfirmation);
1289
- // Try to cancel
1290
- simulateEscapeKeyPress();
1291
- // The imperative cancel function should be called on the scheduler
1292
- expect(mockCancelAllToolCalls).toHaveBeenCalled();
1293
- // A cancellation message should be added to history
1294
- await waitFor(() => {
1295
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1296
- text: 'Request cancelled.',
1297
- }));
1298
- });
1299
- // The final state should be idle
1300
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1301
- });
1302
- });
1303
- describe('Retry Handling', () => {
1304
- it('should ignore retryStatus updates when not responding', async () => {
1305
- const { result } = await renderHookWithDefaults();
1306
- const retryPayload = {
1307
- model: 'gemini-2.5-pro',
1308
- attempt: 2,
1309
- maxAttempts: 3,
1310
- delayMs: 1000,
1311
- };
1312
- await act(async () => {
1313
- coreEvents.emit(CoreEvent.RetryAttempt, retryPayload);
1314
- });
1315
- expect(result.current.retryStatus).toBeNull();
1316
- });
1317
- it('should reset retryStatus when isResponding becomes false', async () => {
1318
- const { result } = await renderTestHook();
1319
- const retryPayload = {
1320
- model: 'gemini-2.5-pro',
1321
- attempt: 2,
1322
- maxAttempts: 3,
1323
- delayMs: 1000,
1324
- };
1325
- // Start a query to make isResponding true
1326
- const mockStream = (async function* () {
1327
- yield { type: ServerGeminiEventType.Content, value: 'Part 1' };
1328
- await new Promise(() => { }); // Keep stream open
1329
- })();
1330
- mockSendMessageStream.mockReturnValue(mockStream);
1331
- await act(async () => {
1332
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1333
- result.current.submitQuery('test query');
1334
- });
1335
- await waitFor(() => {
1336
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1337
- });
1338
- // Emit retry event
1339
- await act(async () => {
1340
- coreEvents.emit(CoreEvent.RetryAttempt, retryPayload);
1341
- });
1342
- expect(result.current.retryStatus).toEqual(retryPayload);
1343
- // Cancel to make isResponding false
1344
- await act(async () => {
1345
- result.current.cancelOngoingRequest();
1346
- });
1347
- expect(result.current.retryStatus).toBeNull();
1348
- });
1349
- it('should ignore late retry events after cancellation', async () => {
1350
- const { result } = await renderTestHook();
1351
- const retryPayload = {
1352
- model: 'gemini-2.5-pro',
1353
- attempt: 2,
1354
- maxAttempts: 3,
1355
- delayMs: 1000,
1356
- };
1357
- const lateRetryPayload = {
1358
- model: 'gemini-2.5-pro',
1359
- attempt: 3,
1360
- maxAttempts: 3,
1361
- delayMs: 2000,
1362
- };
1363
- const mockStream = (async function* () {
1364
- yield { type: ServerGeminiEventType.Content, value: 'Part 1' };
1365
- await new Promise(() => { }); // Keep stream open
1366
- })();
1367
- mockSendMessageStream.mockReturnValue(mockStream);
1368
- await act(async () => {
1369
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
1370
- result.current.submitQuery('test query');
1371
- });
1372
- await waitFor(() => {
1373
- expect(result.current.streamingState).toBe(StreamingState.Responding);
1374
- });
1375
- await act(async () => {
1376
- coreEvents.emit(CoreEvent.RetryAttempt, retryPayload);
1377
- });
1378
- expect(result.current.retryStatus).toEqual(retryPayload);
1379
- await act(async () => {
1380
- result.current.cancelOngoingRequest();
1381
- });
1382
- await waitFor(() => {
1383
- expect(result.current.retryStatus).toBeNull();
1384
- });
1385
- await act(async () => {
1386
- coreEvents.emit(CoreEvent.RetryAttempt, lateRetryPayload);
1387
- });
1388
- expect(result.current.retryStatus).toBeNull();
1389
- });
1390
- });
1391
- describe('Slash Command Handling', () => {
1392
- it('should schedule a tool call when the command processor returns a schedule_tool action', async () => {
1393
- const clientToolRequest = {
1394
- type: 'schedule_tool',
1395
- toolName: 'activate_skill',
1396
- toolArgs: { name: 'test-skill' },
1397
- };
1398
- mockHandleSlashCommand.mockResolvedValue(clientToolRequest);
1399
- const { result } = await renderTestHook();
1400
- await act(async () => {
1401
- await result.current.submitQuery('/memory show');
1402
- });
1403
- await waitFor(() => {
1404
- expect(mockScheduleToolCalls).toHaveBeenCalledWith([
1405
- expect.objectContaining({
1406
- name: 'activate_skill',
1407
- args: { name: 'test-skill' },
1408
- isClientInitiated: true,
1409
- }),
1410
- ], expect.any(AbortSignal));
1411
- expect(mockSendMessageStream).not.toHaveBeenCalled();
1412
- });
1413
- });
1414
- it('should stop processing and not call Gemini when a command is handled without a tool call', async () => {
1415
- const uiOnlyCommandResult = {
1416
- type: 'handled',
1417
- };
1418
- mockHandleSlashCommand.mockResolvedValue(uiOnlyCommandResult);
1419
- const { result } = await renderTestHook();
1420
- await act(async () => {
1421
- await result.current.submitQuery('/help');
1422
- });
1423
- await waitFor(() => {
1424
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/help');
1425
- expect(mockScheduleToolCalls).not.toHaveBeenCalled();
1426
- expect(mockSendMessageStream).not.toHaveBeenCalled(); // No LLM call made
1427
- });
1428
- });
1429
- it('should call Gemini with prompt content when slash command returns a `submit_prompt` action', async () => {
1430
- const customCommandResult = {
1431
- type: 'submit_prompt',
1432
- content: 'This is the actual prompt from the command file.',
1433
- };
1434
- mockHandleSlashCommand.mockResolvedValue(customCommandResult);
1435
- const { result, mockSendMessageStream: localMockSendMessageStream } = await renderTestHook();
1436
- await act(async () => {
1437
- await result.current.submitQuery('/my-custom-command');
1438
- });
1439
- await waitFor(() => {
1440
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/my-custom-command');
1441
- expect(localMockSendMessageStream).not.toHaveBeenCalledWith('/my-custom-command', expect.anything(), expect.anything());
1442
- expect(localMockSendMessageStream).toHaveBeenCalledWith('This is the actual prompt from the command file.', expect.any(AbortSignal), expect.any(String), undefined, '/my-custom-command');
1443
- expect(mockScheduleToolCalls).not.toHaveBeenCalled();
1444
- });
1445
- });
1446
- it('should correctly handle a submit_prompt action with empty content', async () => {
1447
- const emptyPromptResult = {
1448
- type: 'submit_prompt',
1449
- content: '',
1450
- };
1451
- mockHandleSlashCommand.mockResolvedValue(emptyPromptResult);
1452
- const { result, mockSendMessageStream: localMockSendMessageStream } = await renderTestHook();
1453
- await act(async () => {
1454
- await result.current.submitQuery('/emptycmd');
1455
- });
1456
- await waitFor(() => {
1457
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/emptycmd');
1458
- expect(localMockSendMessageStream).toHaveBeenCalledWith('', expect.any(AbortSignal), expect.any(String), undefined, '/emptycmd');
1459
- });
1460
- });
1461
- it('should not call handleSlashCommand for line comments', async () => {
1462
- const { result, mockSendMessageStream: localMockSendMessageStream } = await renderTestHook();
1463
- await act(async () => {
1464
- await result.current.submitQuery('// This is a line comment');
1465
- });
1466
- await waitFor(() => {
1467
- expect(mockHandleSlashCommand).not.toHaveBeenCalled();
1468
- expect(localMockSendMessageStream).toHaveBeenCalledWith('// This is a line comment', expect.any(AbortSignal), expect.any(String), undefined, '// This is a line comment');
1469
- });
1470
- });
1471
- it('should not call handleSlashCommand for block comments', async () => {
1472
- const { result, mockSendMessageStream: localMockSendMessageStream } = await renderTestHook();
1473
- await act(async () => {
1474
- await result.current.submitQuery('/* This is a block comment */');
1475
- });
1476
- await waitFor(() => {
1477
- expect(mockHandleSlashCommand).not.toHaveBeenCalled();
1478
- expect(localMockSendMessageStream).toHaveBeenCalledWith('/* This is a block comment */', expect.any(AbortSignal), expect.any(String), undefined, '/* This is a block comment */');
1479
- });
1480
- });
1481
- it('should not call handleSlashCommand is shell mode is active', async () => {
1482
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, () => { }, mockHandleSlashCommand, true, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
1483
- await act(async () => {
1484
- await result.current.submitQuery('/about');
1485
- });
1486
- await waitFor(() => {
1487
- expect(mockHandleSlashCommand).not.toHaveBeenCalled();
1488
- });
1489
- });
1490
- it('should record client-initiated tool calls in GeminiChat history', async () => {
1491
- const { result, client: mockGeminiClient } = await renderTestHook();
1492
- mockHandleSlashCommand.mockResolvedValue({
1493
- type: 'schedule_tool',
1494
- toolName: 'activate_skill',
1495
- toolArgs: { name: 'test-skill' },
1496
- });
1497
- await act(async () => {
1498
- await result.current.submitQuery('/test-skill');
1499
- });
1500
- // Simulate tool completion
1501
- const completedTool = {
1502
- request: {
1503
- callId: 'test-call-id',
1504
- name: 'activate_skill',
1505
- args: { name: 'test-skill' },
1506
- isClientInitiated: true,
1507
- },
1508
- status: CoreToolCallStatus.Success,
1509
- invocation: {
1510
- getDescription: () => 'Activating skill test-skill',
1511
- },
1512
- tool: {
1513
- isOutputMarkdown: true,
1514
- },
1515
- response: {
1516
- responseParts: [
1517
- {
1518
- functionResponse: {
1519
- name: 'activate_skill',
1520
- response: { content: 'skill instructions' },
1521
- },
1522
- },
1523
- ],
1524
- },
1525
- };
1526
- await act(async () => {
1527
- if (capturedOnComplete) {
1528
- await capturedOnComplete([completedTool]);
1529
- }
1530
- });
1531
- // Verify that the tool call and response were added to GeminiChat history
1532
- expect(mockGeminiClient.addHistory).toHaveBeenCalledWith({
1533
- role: 'model',
1534
- parts: [
1535
- {
1536
- functionCall: {
1537
- name: 'activate_skill',
1538
- args: { name: 'test-skill' },
1539
- },
1540
- },
1541
- ],
1542
- });
1543
- expect(mockGeminiClient.addHistory).toHaveBeenCalledWith({
1544
- role: 'user',
1545
- parts: completedTool.response.responseParts,
1546
- });
1547
- });
1548
- it('should NOT record other client-initiated tool calls in history', async () => {
1549
- const { result, client: mockGeminiClient } = await renderTestHook();
1550
- mockHandleSlashCommand.mockResolvedValue({
1551
- type: 'schedule_tool',
1552
- toolName: 'write_todos',
1553
- toolArgs: { todos: [] },
1554
- });
1555
- await act(async () => {
1556
- await result.current.submitQuery('/todos');
1557
- });
1558
- // Simulate tool completion
1559
- const completedTool = {
1560
- request: {
1561
- callId: 'test-call-id',
1562
- name: 'write_todos',
1563
- args: { todos: [] },
1564
- isClientInitiated: true,
1565
- },
1566
- status: CoreToolCallStatus.Success,
1567
- invocation: {
1568
- getDescription: () => 'Saving memory',
1569
- },
1570
- tool: {
1571
- isOutputMarkdown: true,
1572
- },
1573
- response: {
1574
- responseParts: [
1575
- {
1576
- functionResponse: {
1577
- name: 'write_todos',
1578
- response: { success: true },
1579
- },
1580
- },
1581
- ],
1582
- },
1583
- };
1584
- await act(async () => {
1585
- if (capturedOnComplete) {
1586
- await capturedOnComplete([completedTool]);
1587
- }
1588
- });
1589
- // Verify that addHistory was NOT called
1590
- expect(mockGeminiClient.addHistory).not.toHaveBeenCalled();
1591
- });
1592
- });
1593
- describe('Error Handling', () => {
1594
- it('should call parseAndFormatApiError with the correct authType on stream initialization failure', async () => {
1595
- // 1. Setup
1596
- const mockError = new Error('Rate limit exceeded');
1597
- const mockAuthType = AuthType.LOGIN_WITH_GOOGLE;
1598
- mockParseAndFormatApiError.mockClear();
1599
- mockSendMessageStream.mockReturnValue((async function* () {
1600
- yield { type: 'content', value: '' };
1601
- throw mockError;
1602
- })());
1603
- const testConfig = {
1604
- // eslint-disable-next-line @typescript-eslint/no-misused-spread
1605
- ...mockConfig,
1606
- getContentGenerator: vi.fn(),
1607
- getContentGeneratorConfig: vi.fn(() => ({
1608
- authType: mockAuthType,
1609
- })),
1610
- getModel: vi.fn(() => 'gemini-2.5-pro'),
1611
- };
1612
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(testConfig), [], mockAddItem, testConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
1613
- // 2. Action
1614
- await act(async () => {
1615
- await result.current.submitQuery('test query');
1616
- });
1617
- // 3. Assertion
1618
- await waitFor(() => {
1619
- expect(mockParseAndFormatApiError).toHaveBeenCalledWith('Rate limit exceeded', mockAuthType, undefined, 'gemini-2.5-pro', 'gemini-2.5-flash');
1620
- });
1621
- });
1622
- });
1623
- describe('handleApprovalModeChange', () => {
1624
- it('should auto-approve all pending tool calls when switching to YOLO mode', async () => {
1625
- const awaitingApprovalToolCalls = [
1626
- createMockToolCall('replace', 'call1', 'edit'),
1627
- createMockToolCall('read_file', 'call2', 'info'),
1628
- ];
1629
- const { result } = await renderTestHook(awaitingApprovalToolCalls);
1630
- await act(async () => {
1631
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1632
- });
1633
- // Both tool calls should be auto-approved
1634
- expect(mockMessageBus.publish).toHaveBeenCalledTimes(2);
1635
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({
1636
- type: MessageBusType.TOOL_CONFIRMATION_RESPONSE,
1637
- correlationId: 'corr-call1',
1638
- outcome: ToolConfirmationOutcome.ProceedOnce,
1639
- }));
1640
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({
1641
- correlationId: 'corr-call2',
1642
- outcome: ToolConfirmationOutcome.ProceedOnce,
1643
- }));
1644
- });
1645
- it('should only auto-approve edit tools when switching to AUTO_EDIT mode', async () => {
1646
- const awaitingApprovalToolCalls = [
1647
- createMockToolCall('replace', 'call1', 'edit'),
1648
- createMockToolCall('write_file', 'call2', 'edit'),
1649
- createMockToolCall('read_file', 'call3', 'info'),
1650
- ];
1651
- const { result } = await renderTestHook(awaitingApprovalToolCalls);
1652
- await act(async () => {
1653
- await result.current.handleApprovalModeChange(ApprovalMode.AUTO_EDIT);
1654
- });
1655
- // Only replace and write_file should be auto-approved
1656
- expect(mockMessageBus.publish).toHaveBeenCalledTimes(2);
1657
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call1' }));
1658
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call2' }));
1659
- expect(mockMessageBus.publish).not.toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call3' }));
1660
- });
1661
- it('should auto-approve shell commands with redirection when switching to AUTO_EDIT mode', async () => {
1662
- const shellCall = createMockToolCall(SHELL_TOOL_NAME, 'call-shell', 'info');
1663
- shellCall.request.args = { command: 'ls > files.txt' };
1664
- const { result } = await renderTestHook([shellCall]);
1665
- await act(async () => {
1666
- await result.current.handleApprovalModeChange(ApprovalMode.AUTO_EDIT);
1667
- });
1668
- // Shell command with redirection should be auto-approved
1669
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call-shell' }));
1670
- });
1671
- it('should NOT auto-approve shell commands without redirection when switching to AUTO_EDIT mode', async () => {
1672
- const shellCall = createMockToolCall(SHELL_TOOL_NAME, 'call-shell', 'info');
1673
- shellCall.request.args = { command: 'ls -la' };
1674
- const { result } = await renderTestHook([shellCall]);
1675
- await act(async () => {
1676
- await result.current.handleApprovalModeChange(ApprovalMode.AUTO_EDIT);
1677
- });
1678
- // Regular shell command should NOT be auto-approved
1679
- expect(mockMessageBus.publish).not.toHaveBeenCalled();
1680
- });
1681
- it('should not auto-approve any tools when switching to REQUIRE_CONFIRMATION mode', async () => {
1682
- const awaitingApprovalToolCalls = [
1683
- createMockToolCall('replace', 'call1', 'edit'),
1684
- ];
1685
- const { result } = await renderTestHook(awaitingApprovalToolCalls);
1686
- await act(async () => {
1687
- await result.current.handleApprovalModeChange(ApprovalMode.DEFAULT);
1688
- });
1689
- // No tools should be auto-approved
1690
- expect(mockMessageBus.publish).not.toHaveBeenCalled();
1691
- });
1692
- it('should handle errors gracefully when auto-approving tool calls', async () => {
1693
- const debuggerSpy = vi
1694
- .spyOn(debugLogger, 'warn')
1695
- .mockImplementation(() => { });
1696
- mockMessageBus.publish.mockRejectedValueOnce(new Error('Bus error'));
1697
- const awaitingApprovalToolCalls = [
1698
- createMockToolCall('replace', 'call1', 'edit'),
1699
- createMockToolCall('write_file', 'call2', 'edit'),
1700
- ];
1701
- const { result } = await renderTestHook(awaitingApprovalToolCalls);
1702
- await act(async () => {
1703
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1704
- });
1705
- // Both should be attempted despite first error
1706
- expect(mockMessageBus.publish).toHaveBeenCalledTimes(2);
1707
- expect(debuggerSpy).toHaveBeenCalledWith('Failed to auto-approve tool call call1:', expect.any(Error));
1708
- debuggerSpy.mockRestore();
1709
- });
1710
- it('should skip tool calls without confirmationDetails', async () => {
1711
- const awaitingApprovalToolCalls = [
1712
- {
1713
- request: {
1714
- callId: 'call1',
1715
- name: 'replace',
1716
- args: { old_string: 'old', new_string: 'new' },
1717
- isClientInitiated: false,
1718
- prompt_id: 'prompt-id-1',
1719
- },
1720
- status: CoreToolCallStatus.AwaitingApproval,
1721
- responseSubmittedToGemini: false,
1722
- // No confirmationDetails
1723
- tool: {
1724
- name: 'replace',
1725
- displayName: 'replace',
1726
- description: 'Replace text',
1727
- build: vi.fn(),
1728
- },
1729
- invocation: {
1730
- getDescription: () => 'Mock description',
1731
- },
1732
- correlationId: 'corr-1',
1733
- },
1734
- ];
1735
- const { result } = await renderTestHook(awaitingApprovalToolCalls);
1736
- // Should not throw an error
1737
- await act(async () => {
1738
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1739
- });
1740
- });
1741
- it('should only process tool calls with awaiting_approval status', async () => {
1742
- const mockOnConfirmAwaiting = vi.fn().mockResolvedValue(undefined);
1743
- const mixedStatusToolCalls = [
1744
- createMockToolCall('replace', 'call1', 'edit', CoreToolCallStatus.AwaitingApproval, mockOnConfirmAwaiting),
1745
- {
1746
- request: {
1747
- callId: 'call2',
1748
- name: 'write_file',
1749
- args: { path: '/test/file.txt', content: 'content' },
1750
- isClientInitiated: false,
1751
- prompt_id: 'prompt-id-1',
1752
- },
1753
- status: CoreToolCallStatus.Executing,
1754
- responseSubmittedToGemini: false,
1755
- tool: {
1756
- name: 'write_file',
1757
- displayName: 'write_file',
1758
- description: 'Write file',
1759
- build: vi.fn(),
1760
- },
1761
- invocation: {
1762
- getDescription: () => 'Mock description',
1763
- },
1764
- startTime: Date.now(),
1765
- liveOutput: 'Writing...',
1766
- correlationId: 'corr-call2',
1767
- },
1768
- ];
1769
- const { result } = await renderTestHook(mixedStatusToolCalls);
1770
- await act(async () => {
1771
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1772
- });
1773
- // Only the awaiting_approval tool should be processed.
1774
- expect(mockMessageBus.publish).toHaveBeenCalledTimes(1);
1775
- expect(mockMessageBus.publish).toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call1' }));
1776
- expect(mockMessageBus.publish).not.toHaveBeenCalledWith(expect.objectContaining({ correlationId: 'corr-call2' }));
1777
- });
1778
- it('should inject a notification message when manually exiting Plan Mode', async () => {
1779
- // Setup mockConfig to return PLAN mode initially
1780
- mockConfig.getApprovalMode.mockReturnValue(ApprovalMode.PLAN);
1781
- // Render the hook, which will initialize the previousApprovalModeRef with PLAN
1782
- const { result, client } = await renderTestHook([]);
1783
- // Update mockConfig to return DEFAULT mode (new mode)
1784
- mockConfig.getApprovalMode.mockReturnValue(ApprovalMode.DEFAULT);
1785
- await act(async () => {
1786
- // Trigger manual exit from Plan Mode
1787
- await result.current.handleApprovalModeChange(ApprovalMode.DEFAULT);
1788
- });
1789
- // Verify that addHistory was called with the notification message
1790
- expect(client.addHistory).toHaveBeenCalledWith({
1791
- role: 'user',
1792
- parts: [
1793
- {
1794
- text: getPlanModeExitMessage(ApprovalMode.DEFAULT, true),
1795
- },
1796
- ],
1797
- });
1798
- });
1799
- });
1800
- describe('handleFinishedEvent', () => {
1801
- it('should add info message for MAX_TOKENS finish reason', async () => {
1802
- // Setup mock to return a stream with MAX_TOKENS finish reason
1803
- mockSendMessageStream.mockReturnValue((async function* () {
1804
- yield {
1805
- type: ServerGeminiEventType.Content,
1806
- value: 'This is a truncated response...',
1807
- };
1808
- yield {
1809
- type: ServerGeminiEventType.Finished,
1810
- value: { reason: 'MAX_TOKENS', usageMetadata: undefined },
1811
- };
1812
- })());
1813
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
1814
- // Submit a query
1815
- await act(async () => {
1816
- await result.current.submitQuery('Generate long text');
1817
- });
1818
- // Check that the info message was added
1819
- await waitFor(() => {
1820
- expect(mockAddItem).toHaveBeenCalledWith({
1821
- type: 'info',
1822
- text: '⚠️ Response truncated due to token limits.',
1823
- }, expect.any(Number));
1824
- });
1825
- });
1826
- describe('ContextWindowWillOverflow event', () => {
1827
- beforeEach(() => {
1828
- vi.mocked(tokenLimit).mockReturnValue(100);
1829
- });
1830
- it.each([
1831
- {
1832
- name: 'without suggestion when remaining tokens are > 75% of limit',
1833
- requestTokens: 20,
1834
- remainingTokens: 80,
1835
- expectedMessage: 'Sending this message (20 tokens) might exceed the context window limit (80 tokens left).',
1836
- },
1837
- {
1838
- name: 'with suggestion when remaining tokens are < 75% of limit',
1839
- requestTokens: 30,
1840
- remainingTokens: 70,
1841
- expectedMessage: 'Sending this message (30 tokens) might exceed the context window limit (70 tokens left). Please try reducing the size of your message or use the `/compress` command to compress the chat history.',
1842
- },
1843
- ])('should add message $name', async ({ requestTokens, remainingTokens, expectedMessage }) => {
1844
- mockSendMessageStream.mockReturnValue((async function* () {
1845
- yield {
1846
- type: ServerGeminiEventType.ContextWindowWillOverflow,
1847
- value: {
1848
- estimatedRequestTokenCount: requestTokens,
1849
- remainingTokenCount: remainingTokens,
1850
- },
1851
- };
1852
- })());
1853
- const { result } = await renderHookWithDefaults();
1854
- await act(async () => {
1855
- await result.current.submitQuery('Test overflow');
1856
- });
1857
- await waitFor(() => {
1858
- expect(mockAddItem).toHaveBeenCalledWith({
1859
- type: 'info',
1860
- text: expectedMessage,
1861
- });
1862
- });
1863
- });
1864
- });
1865
- it('should call onCancelSubmit when ContextWindowWillOverflow event is received', async () => {
1866
- const onCancelSubmitSpy = vi.fn();
1867
- // Setup mock to return a stream with ContextWindowWillOverflow event
1868
- mockSendMessageStream.mockReturnValue((async function* () {
1869
- yield {
1870
- type: ServerGeminiEventType.ContextWindowWillOverflow,
1871
- value: {
1872
- estimatedRequestTokenCount: 100,
1873
- remainingTokenCount: 50,
1874
- },
1875
- };
1876
- })());
1877
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, onCancelSubmitSpy, () => { }, 80, 24));
1878
- // Submit a query
1879
- await act(async () => {
1880
- await result.current.submitQuery('Test overflow');
1881
- });
1882
- // Check that onCancelSubmit was called
1883
- await waitFor(() => {
1884
- expect(onCancelSubmitSpy).toHaveBeenCalledWith(true);
1885
- });
1886
- });
1887
- it('should add informational messages when ChatCompressed event is received', async () => {
1888
- vi.mocked(tokenLimit).mockReturnValue(10000);
1889
- // Setup mock to return a stream with ChatCompressed event
1890
- mockSendMessageStream.mockReturnValue((async function* () {
1891
- yield {
1892
- type: ServerGeminiEventType.ChatCompressed,
1893
- value: {
1894
- originalTokenCount: 1000,
1895
- newTokenCount: 500,
1896
- compressionStatus: 'compressed',
1897
- },
1898
- };
1899
- })());
1900
- const { result } = await renderHookWithDefaults();
1901
- // Submit a query
1902
- await act(async () => {
1903
- await result.current.submitQuery('Test compression');
1904
- });
1905
- // Check that the succinct info message was added
1906
- await waitFor(() => {
1907
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1908
- type: MessageType.INFO,
1909
- text: 'Context compressed from 10% to 5%.',
1910
- secondaryText: 'Change threshold in /settings.',
1911
- color: theme.status.warning,
1912
- }), expect.any(Number));
1913
- });
1914
- });
1915
- it.each([
1916
- {
1917
- reason: 'STOP',
1918
- shouldAddMessage: false,
1919
- },
1920
- {
1921
- reason: 'FINISH_REASON_UNSPECIFIED',
1922
- shouldAddMessage: false,
1923
- },
1924
- {
1925
- reason: 'SAFETY',
1926
- message: '⚠️ Response stopped due to safety reasons.',
1927
- },
1928
- {
1929
- reason: 'RECITATION',
1930
- message: '⚠️ Response stopped due to recitation policy.',
1931
- },
1932
- {
1933
- reason: 'LANGUAGE',
1934
- message: '⚠️ Response stopped due to unsupported language.',
1935
- },
1936
- {
1937
- reason: 'BLOCKLIST',
1938
- message: '⚠️ Response stopped due to forbidden terms.',
1939
- },
1940
- {
1941
- reason: 'PROHIBITED_CONTENT',
1942
- message: '⚠️ Response stopped due to prohibited content.',
1943
- },
1944
- {
1945
- reason: 'SPII',
1946
- message: '⚠️ Response stopped due to sensitive personally identifiable information.',
1947
- },
1948
- {
1949
- reason: 'OTHER',
1950
- message: '⚠️ Response stopped for other reasons.',
1951
- },
1952
- {
1953
- reason: 'MALFORMED_FUNCTION_CALL',
1954
- message: '⚠️ Response stopped due to malformed function call.',
1955
- },
1956
- {
1957
- reason: 'IMAGE_SAFETY',
1958
- message: '⚠️ Response stopped due to image safety violations.',
1959
- },
1960
- {
1961
- reason: 'UNEXPECTED_TOOL_CALL',
1962
- message: '⚠️ Response stopped due to unexpected tool call.',
1963
- },
1964
- ])('should handle $reason finish reason correctly', async ({ reason, shouldAddMessage = true, message }) => {
1965
- mockSendMessageStream.mockReturnValue((async function* () {
1966
- yield {
1967
- type: ServerGeminiEventType.Content,
1968
- value: `Response for ${reason}`,
1969
- };
1970
- yield {
1971
- type: ServerGeminiEventType.Finished,
1972
- value: { reason, usageMetadata: undefined },
1973
- };
1974
- })());
1975
- const { result } = await renderHookWithDefaults();
1976
- await act(async () => {
1977
- await result.current.submitQuery(`Test ${reason}`);
1978
- });
1979
- if (shouldAddMessage) {
1980
- await waitFor(() => {
1981
- expect(mockAddItem).toHaveBeenCalledWith({
1982
- type: 'info',
1983
- text: message,
1984
- }, expect.any(Number));
1985
- });
1986
- }
1987
- else {
1988
- // Verify state returns to idle without any info messages
1989
- await waitFor(() => {
1990
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1991
- });
1992
- const infoMessages = mockAddItem.mock.calls.filter((call) => call[0].type === 'info');
1993
- expect(infoMessages).toHaveLength(0);
1994
- }
1995
- });
1996
- });
1997
- it('should flush pending text rationale before scheduling tool calls to ensure correct history order', async () => {
1998
- const addItemOrder = [];
1999
- let capturedOnComplete;
2000
- const mockScheduleToolCalls = vi.fn(async (requests) => {
2001
- addItemOrder.push('scheduleToolCalls_START');
2002
- // Simulate tools completing and triggering onComplete immediately.
2003
- // This mimics the behavior that caused the regression where tool results
2004
- // were added to history during the await scheduleToolCalls(...) block.
2005
- const tools = requests.map((r) => ({
2006
- request: r,
2007
- status: CoreToolCallStatus.Success,
2008
- tool: { displayName: r.name, name: r.name },
2009
- invocation: { getDescription: () => 'desc' },
2010
- response: { responseParts: [], resultDisplay: 'done' },
2011
- startTime: Date.now(),
2012
- endTime: Date.now(),
2013
- }));
2014
- // Wait a tick for refs to be set up
2015
- await new Promise((resolve) => setTimeout(resolve, 0));
2016
- await capturedOnComplete(tools);
2017
- addItemOrder.push('scheduleToolCalls_END');
2018
- });
2019
- mockAddItem.mockImplementation((item) => {
2020
- addItemOrder.push(`addItem:${item.type}`);
2021
- });
2022
- // We need to capture the onComplete callback from useToolScheduler
2023
- mockUseToolScheduler.mockImplementation((onComplete) => {
2024
- capturedOnComplete = onComplete;
2025
- return [
2026
- [], // toolCalls
2027
- mockScheduleToolCalls,
2028
- vi.fn(), // markToolsAsSubmitted
2029
- vi.fn(), // setToolCallsForDisplay
2030
- vi.fn(), // cancelAllToolCalls
2031
- 0, // lastToolOutputTime
2032
- ];
2033
- });
2034
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, vi.fn(), vi.fn(), false, () => 'vscode', vi.fn(), vi.fn(), false, vi.fn(), vi.fn(), vi.fn(), 80, 24));
2035
- const mockStream = (async function* () {
2036
- yield {
2037
- type: ServerGeminiEventType.Content,
2038
- value: 'Rationale rationale.',
2039
- };
2040
- yield {
2041
- type: ServerGeminiEventType.ToolCallRequest,
2042
- value: { callId: '1', name: 'test_tool', args: {} },
2043
- };
2044
- })();
2045
- mockSendMessageStream.mockReturnValue(mockStream);
2046
- await act(async () => {
2047
- await result.current.submitQuery('test input');
2048
- });
2049
- // Expectation: addItem:gemini (rationale) MUST happen before scheduleToolCalls_START
2050
- const rationaleIndex = addItemOrder.indexOf('addItem:gemini');
2051
- const scheduleIndex = addItemOrder.indexOf('scheduleToolCalls_START');
2052
- const toolGroupIndex = addItemOrder.indexOf('addItem:tool_group');
2053
- expect(rationaleIndex).toBeGreaterThan(-1);
2054
- expect(scheduleIndex).toBeGreaterThan(-1);
2055
- expect(toolGroupIndex).toBeGreaterThan(-1);
2056
- // This is the core fix validation: Rationale comes before tools are even scheduled (awaited)
2057
- expect(rationaleIndex).toBeLessThan(scheduleIndex);
2058
- expect(rationaleIndex).toBeLessThan(toolGroupIndex);
2059
- // Ensure all state updates from recursive submitQuery are settled
2060
- await waitFor(() => {
2061
- expect(result.current.streamingState).toBe(StreamingState.Idle);
2062
- });
2063
- });
2064
- it('should process @include commands, adding user turn after processing to prevent race conditions', async () => {
2065
- const rawQuery = '@include file.txt Summarize this.';
2066
- const processedQueryParts = [
2067
- { text: 'Summarize this with content from @file.txt' },
2068
- { text: 'File content...' },
2069
- ];
2070
- const userMessageTimestamp = Date.now();
2071
- vi.spyOn(Date, 'now').mockReturnValue(userMessageTimestamp);
2072
- handleAtCommandSpy.mockResolvedValue({
2073
- processedQuery: processedQueryParts,
2074
- shouldProceed: true,
2075
- });
2076
- const { result } = await renderHookWithProviders(() => useGeminiStream(mockConfig.getGeminiClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, // shellModeActive
2077
- vi.fn(), // getPreferredEditor
2078
- vi.fn(), // onAuthError
2079
- vi.fn(), // performMemoryRefresh
2080
- false, // modelSwitched
2081
- vi.fn(), // setModelSwitched
2082
- vi.fn(), // onCancelSubmit
2083
- vi.fn(), // setShellInputFocused
2084
- 80, // terminalWidth
2085
- 24));
2086
- await act(async () => {
2087
- await result.current.submitQuery(rawQuery);
2088
- });
2089
- expect(handleAtCommandSpy).toHaveBeenCalledWith(expect.objectContaining({
2090
- query: rawQuery,
2091
- }));
2092
- expect(mockAddItem).toHaveBeenCalledWith({
2093
- type: MessageType.USER,
2094
- text: rawQuery,
2095
- }, userMessageTimestamp);
2096
- // FIX: The expectation now matches the actual call signature.
2097
- expect(mockSendMessageStream).toHaveBeenCalledWith(processedQueryParts, // Argument 1: The parts array directly
2098
- expect.any(AbortSignal), // Argument 2: An AbortSignal
2099
- expect.any(String), // Argument 3: The prompt_id string
2100
- undefined, rawQuery);
2101
- });
2102
- it('should display user query, then tool execution, then model response', async () => {
2103
- const userQuery = 'read this @file(test.txt)';
2104
- const toolExecutionMessage = 'Reading file: test.txt';
2105
- const modelResponseContent = 'The content of test.txt is: Hello World!';
2106
- // Mock handleAtCommand to simulate a tool call and add a tool_group message
2107
- handleAtCommandSpy.mockImplementation(async ({ addItem: atCommandAddItem, messageId }) => {
2108
- atCommandAddItem({
2109
- type: 'tool_group',
2110
- tools: [
2111
- {
2112
- callId: 'client-read-123',
2113
- name: 'read_file',
2114
- description: toolExecutionMessage,
2115
- status: CoreToolCallStatus.Success,
2116
- resultDisplay: toolExecutionMessage,
2117
- confirmationDetails: undefined,
2118
- },
2119
- ],
2120
- }, messageId);
2121
- return { shouldProceed: true, processedQuery: userQuery };
2122
- });
2123
- // Mock the Gemini stream to return a model response after the tool
2124
- mockSendMessageStream.mockReturnValue((async function* () {
2125
- yield {
2126
- type: ServerGeminiEventType.Content,
2127
- value: modelResponseContent,
2128
- };
2129
- yield {
2130
- type: ServerGeminiEventType.Finished,
2131
- value: { reason: 'STOP' },
2132
- };
2133
- })());
2134
- const { result } = await renderTestHook();
2135
- await act(async () => {
2136
- await result.current.submitQuery(userQuery);
2137
- });
2138
- // Assert the order of messages added to the history
2139
- await waitFor(() => {
2140
- expect(mockAddItem).toHaveBeenCalledTimes(3); // User prompt + tool execution + model response
2141
- // 1. User's prompt
2142
- expect(mockAddItem).toHaveBeenNthCalledWith(1, expect.objectContaining({
2143
- type: MessageType.USER,
2144
- text: userQuery,
2145
- }), expect.any(Number));
2146
- // 2. Tool execution message
2147
- expect(mockAddItem).toHaveBeenNthCalledWith(2, expect.objectContaining({
2148
- type: 'tool_group',
2149
- tools: expect.arrayContaining([
2150
- expect.objectContaining({
2151
- name: 'read_file',
2152
- status: CoreToolCallStatus.Success,
2153
- }),
2154
- ]),
2155
- }), expect.any(Number));
2156
- // 3. Model's response
2157
- expect(mockAddItem).toHaveBeenNthCalledWith(3, expect.objectContaining({
2158
- type: 'gemini',
2159
- text: modelResponseContent,
2160
- }), expect.any(Number));
2161
- });
2162
- });
2163
- describe('Thought Reset', () => {
2164
- it('should keep full thinking entries in history when mode is full', async () => {
2165
- const fullThinkingSettings = {
2166
- // eslint-disable-next-line @typescript-eslint/no-misused-spread
2167
- ...mockLoadedSettings,
2168
- merged: {
2169
- ...mockLoadedSettings.merged,
2170
- ui: { inlineThinkingMode: 'full' },
2171
- },
2172
- };
2173
- mockSendMessageStream.mockReturnValue((async function* () {
2174
- yield {
2175
- type: ServerGeminiEventType.Thought,
2176
- value: {
2177
- subject: 'Full thought',
2178
- description: 'Detailed thinking',
2179
- },
2180
- };
2181
- yield {
2182
- type: ServerGeminiEventType.Content,
2183
- value: 'Response',
2184
- };
2185
- })());
2186
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, fullThinkingSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2187
- await act(async () => {
2188
- await result.current.submitQuery('Test query');
2189
- });
2190
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2191
- type: 'thinking',
2192
- thought: expect.objectContaining({ subject: 'Full thought' }),
2193
- }));
2194
- });
2195
- it('keeps thought transient and clears it on first non-thought event', async () => {
2196
- mockSendMessageStream.mockReturnValue((async function* () {
2197
- yield {
2198
- type: ServerGeminiEventType.Thought,
2199
- value: {
2200
- subject: 'Assessing intent',
2201
- description: 'Inspecting context',
2202
- },
2203
- };
2204
- yield {
2205
- type: ServerGeminiEventType.Content,
2206
- value: 'Model response content',
2207
- };
2208
- yield {
2209
- type: ServerGeminiEventType.Finished,
2210
- value: { reason: 'STOP', usageMetadata: undefined },
2211
- };
2212
- })());
2213
- const { result } = await renderTestHook();
2214
- await act(async () => {
2215
- await result.current.submitQuery('Test query');
2216
- });
2217
- await waitFor(() => {
2218
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2219
- type: 'gemini',
2220
- text: 'Model response content',
2221
- }), expect.any(Number));
2222
- });
2223
- expect(result.current.thought).toBeNull();
2224
- expect(mockAddItem).not.toHaveBeenCalledWith(expect.objectContaining({ type: 'thinking' }), expect.any(Number));
2225
- });
2226
- it('should reset thought to null when starting a new prompt', async () => {
2227
- // First, simulate a response with a thought
2228
- mockSendMessageStream.mockReturnValue((async function* () {
2229
- yield {
2230
- type: ServerGeminiEventType.Thought,
2231
- value: {
2232
- subject: 'Previous thought',
2233
- description: 'Old description',
2234
- },
2235
- };
2236
- yield {
2237
- type: ServerGeminiEventType.Content,
2238
- value: 'Some response content',
2239
- };
2240
- yield {
2241
- type: ServerGeminiEventType.Finished,
2242
- value: { reason: 'STOP', usageMetadata: undefined },
2243
- };
2244
- })());
2245
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2246
- // Submit first query to set a thought
2247
- await act(async () => {
2248
- await result.current.submitQuery('First query');
2249
- });
2250
- // Wait for the first response to complete
2251
- await waitFor(() => {
2252
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2253
- type: 'gemini',
2254
- text: 'Some response content',
2255
- }), expect.any(Number));
2256
- });
2257
- // Now simulate a new response without a thought
2258
- mockSendMessageStream.mockReturnValue((async function* () {
2259
- yield {
2260
- type: ServerGeminiEventType.Content,
2261
- value: 'New response content',
2262
- };
2263
- yield {
2264
- type: ServerGeminiEventType.Finished,
2265
- value: { reason: 'STOP', usageMetadata: undefined },
2266
- };
2267
- })());
2268
- // Submit second query - thought should be reset
2269
- await act(async () => {
2270
- await result.current.submitQuery('Second query');
2271
- });
2272
- // The thought should be reset to null when starting the new prompt
2273
- // We can verify this by checking that the LoadingIndicator would not show the previous thought
2274
- // The actual thought state is internal to the hook, but we can verify the behavior
2275
- // by ensuring the second response doesn't show the previous thought
2276
- await waitFor(() => {
2277
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2278
- type: 'gemini',
2279
- text: 'New response content',
2280
- }), expect.any(Number));
2281
- });
2282
- });
2283
- it('should memoize pendingHistoryItems', async () => {
2284
- mockUseToolScheduler.mockReturnValue([
2285
- [],
2286
- mockScheduleToolCalls,
2287
- mockMarkToolsAsSubmitted,
2288
- vi.fn(),
2289
- mockCancelAllToolCalls,
2290
- 0,
2291
- ]);
2292
- const { result, rerender } = await renderHookWithProviders(() => useGeminiStream(mockConfig.getGeminiClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2293
- const firstResult = result.current.pendingHistoryItems;
2294
- rerender();
2295
- const secondResult = result.current.pendingHistoryItems;
2296
- expect(firstResult).toStrictEqual(secondResult);
2297
- const newToolCalls = [
2298
- {
2299
- request: { callId: 'call1', name: 'tool1', args: {} },
2300
- status: CoreToolCallStatus.Executing,
2301
- tool: {
2302
- name: 'tool1',
2303
- displayName: 'tool1',
2304
- description: 'desc1',
2305
- build: vi.fn(),
2306
- },
2307
- invocation: {
2308
- getDescription: () => 'Mock description',
2309
- },
2310
- },
2311
- ];
2312
- mockUseToolScheduler.mockReturnValue([
2313
- newToolCalls,
2314
- mockScheduleToolCalls,
2315
- mockMarkToolsAsSubmitted,
2316
- vi.fn(),
2317
- mockCancelAllToolCalls,
2318
- 0,
2319
- ]);
2320
- rerender();
2321
- const thirdResult = result.current.pendingHistoryItems;
2322
- expect(thirdResult).not.toStrictEqual(secondResult);
2323
- });
2324
- it('should reset thought to null when user cancels', async () => {
2325
- // Mock a stream that yields a thought then gets cancelled
2326
- mockSendMessageStream.mockReturnValue((async function* () {
2327
- yield {
2328
- type: ServerGeminiEventType.Thought,
2329
- value: { subject: 'Some thought', description: 'Description' },
2330
- };
2331
- yield { type: ServerGeminiEventType.UserCancelled };
2332
- })());
2333
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2334
- // Submit query
2335
- await act(async () => {
2336
- await result.current.submitQuery('Test query');
2337
- });
2338
- // Verify cancellation message was added
2339
- await waitFor(() => {
2340
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2341
- type: 'info',
2342
- text: 'User cancelled the request.',
2343
- }), expect.any(Number));
2344
- });
2345
- // Verify state is reset to idle
2346
- expect(result.current.streamingState).toBe(StreamingState.Idle);
2347
- });
2348
- it('should reset thought to null when there is an error', async () => {
2349
- // Mock a stream that yields a thought then encounters an error
2350
- mockSendMessageStream.mockReturnValue((async function* () {
2351
- yield {
2352
- type: ServerGeminiEventType.Thought,
2353
- value: { subject: 'Some thought', description: 'Description' },
2354
- };
2355
- yield {
2356
- type: ServerGeminiEventType.Error,
2357
- value: { error: { message: 'Test error' } },
2358
- };
2359
- })());
2360
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2361
- // Submit query
2362
- await act(async () => {
2363
- await result.current.submitQuery('Test query');
2364
- });
2365
- // Verify error message was added
2366
- await waitFor(() => {
2367
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2368
- type: CoreToolCallStatus.Error,
2369
- }), expect.any(Number));
2370
- });
2371
- // Verify parseAndFormatApiError was called
2372
- expect(mockParseAndFormatApiError).toHaveBeenCalledWith({ message: 'Test error' }, expect.any(String), undefined, 'gemini-2.5-pro', 'gemini-2.5-flash');
2373
- });
2374
- it('should update lastOutputTime on Gemini thought and content events', async () => {
2375
- vi.useFakeTimers();
2376
- const startTime = 1000000;
2377
- vi.setSystemTime(startTime);
2378
- // Mock a stream that yields a thought then content
2379
- mockSendMessageStream.mockReturnValue((async function* () {
2380
- yield {
2381
- type: ServerGeminiEventType.Thought,
2382
- value: { subject: 'Thinking...', description: '' },
2383
- };
2384
- // Advance time for the next event
2385
- vi.advanceTimersByTime(1000);
2386
- yield {
2387
- type: ServerGeminiEventType.Content,
2388
- value: 'Hello',
2389
- };
2390
- })());
2391
- const { result } = await renderHookWithProviders(() => useGeminiStream(new MockedGeminiClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, 80, 24));
2392
- // Reset fake timers to startTime because the asynchronous render lifecycle
2393
- // (via waitUntilReady) advances the mock clock while waiting for initial
2394
- // components to settle.
2395
- vi.setSystemTime(startTime);
2396
- // Submit query
2397
- await act(async () => {
2398
- await result.current.submitQuery('Test query');
2399
- });
2400
- // Verify lastOutputTime was updated
2401
- // It should be the time of the last event (startTime + 1000)
2402
- expect(result.current.lastOutputTime).toBe(startTime + 1000);
2403
- vi.useRealTimers();
2404
- });
2405
- });
2406
- describe('Loop Detection Confirmation', () => {
2407
- beforeEach(() => {
2408
- // Add mock for getLoopDetectionService to the config
2409
- const mockLoopDetectionService = {
2410
- disableForSession: vi.fn(),
2411
- };
2412
- mockConfig.getGeminiClient = vi.fn().mockReturnValue({
2413
- ...new MockedGeminiClientClass(mockConfig),
2414
- getLoopDetectionService: () => mockLoopDetectionService,
2415
- });
2416
- });
2417
- it('should set loopDetectionConfirmationRequest when LoopDetected event is received', async () => {
2418
- mockSendMessageStream.mockReturnValue((async function* () {
2419
- yield {
2420
- type: ServerGeminiEventType.Content,
2421
- value: 'Some content',
2422
- };
2423
- yield {
2424
- type: ServerGeminiEventType.LoopDetected,
2425
- };
2426
- })());
2427
- const { result } = await renderTestHook();
2428
- await act(async () => {
2429
- await result.current.submitQuery('test query');
2430
- });
2431
- await waitFor(() => {
2432
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2433
- expect(typeof result.current.loopDetectionConfirmationRequest?.onComplete).toBe('function');
2434
- });
2435
- });
2436
- it('should disable loop detection and show message when user selects "disable"', async () => {
2437
- const mockLoopDetectionService = {
2438
- disableForSession: vi.fn(),
2439
- };
2440
- const mockClient = {
2441
- ...new MockedGeminiClientClass(mockConfig),
2442
- getLoopDetectionService: () => mockLoopDetectionService,
2443
- };
2444
- mockConfig.getGeminiClient = vi.fn().mockReturnValue(mockClient);
2445
- // Mock for the initial request
2446
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2447
- yield {
2448
- type: ServerGeminiEventType.LoopDetected,
2449
- };
2450
- })());
2451
- // Mock for the retry request
2452
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2453
- yield {
2454
- type: ServerGeminiEventType.Content,
2455
- value: 'Retry successful',
2456
- };
2457
- yield {
2458
- type: ServerGeminiEventType.Finished,
2459
- value: { reason: 'STOP' },
2460
- };
2461
- })());
2462
- const { result } = await renderTestHook();
2463
- await act(async () => {
2464
- await result.current.submitQuery('test query');
2465
- });
2466
- // Wait for confirmation request to be set
2467
- await waitFor(() => {
2468
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2469
- });
2470
- // Simulate user selecting "disable"
2471
- await act(async () => {
2472
- result.current.loopDetectionConfirmationRequest?.onComplete({
2473
- userSelection: 'disable',
2474
- });
2475
- });
2476
- // Verify loop detection was disabled
2477
- expect(mockLoopDetectionService.disableForSession).toHaveBeenCalledTimes(1);
2478
- // Verify confirmation request was cleared
2479
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
2480
- // Verify appropriate message was added
2481
- expect(mockAddItem).toHaveBeenCalledWith({
2482
- type: 'info',
2483
- text: 'Loop detection has been disabled for this session. Retrying request...',
2484
- });
2485
- // Verify that the request was retried
2486
- await waitFor(() => {
2487
- expect(mockSendMessageStream).toHaveBeenCalledTimes(2);
2488
- expect(mockSendMessageStream).toHaveBeenNthCalledWith(2, 'test query', expect.any(AbortSignal), expect.any(String), undefined, 'test query');
2489
- });
2490
- });
2491
- it('should keep loop detection enabled and show message when user selects "keep"', async () => {
2492
- const mockLoopDetectionService = {
2493
- disableForSession: vi.fn(),
2494
- };
2495
- const mockClient = {
2496
- ...new MockedGeminiClientClass(mockConfig),
2497
- getLoopDetectionService: () => mockLoopDetectionService,
2498
- };
2499
- mockConfig.getGeminiClient = vi.fn().mockReturnValue(mockClient);
2500
- mockSendMessageStream.mockReturnValue((async function* () {
2501
- yield {
2502
- type: ServerGeminiEventType.LoopDetected,
2503
- };
2504
- })());
2505
- const { result } = await renderTestHook();
2506
- await act(async () => {
2507
- await result.current.submitQuery('test query');
2508
- });
2509
- // Wait for confirmation request to be set
2510
- await waitFor(() => {
2511
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2512
- });
2513
- // Simulate user selecting "keep"
2514
- await act(async () => {
2515
- result.current.loopDetectionConfirmationRequest?.onComplete({
2516
- userSelection: 'keep',
2517
- });
2518
- });
2519
- // Verify loop detection was NOT disabled
2520
- expect(mockLoopDetectionService.disableForSession).not.toHaveBeenCalled();
2521
- // Verify confirmation request was cleared
2522
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
2523
- // Verify appropriate message was added
2524
- expect(mockAddItem).toHaveBeenCalledWith({
2525
- type: 'info',
2526
- text: 'A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.',
2527
- });
2528
- // Verify that the request was NOT retried
2529
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
2530
- });
2531
- it('should handle multiple loop detection events properly', async () => {
2532
- const { result } = await renderTestHook();
2533
- // First loop detection - set up fresh mock for first call
2534
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2535
- yield {
2536
- type: ServerGeminiEventType.LoopDetected,
2537
- };
2538
- })());
2539
- // First loop detection
2540
- await act(async () => {
2541
- await result.current.submitQuery('first query');
2542
- });
2543
- await waitFor(() => {
2544
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2545
- });
2546
- // Simulate user selecting "keep" for first request
2547
- await act(async () => {
2548
- result.current.loopDetectionConfirmationRequest?.onComplete({
2549
- userSelection: 'keep',
2550
- });
2551
- });
2552
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
2553
- // Verify first message was added
2554
- expect(mockAddItem).toHaveBeenCalledWith({
2555
- type: 'info',
2556
- text: 'A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.',
2557
- });
2558
- // Second loop detection - set up fresh mock for second call
2559
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2560
- yield {
2561
- type: ServerGeminiEventType.LoopDetected,
2562
- };
2563
- })());
2564
- // Mock for the retry request
2565
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2566
- yield {
2567
- type: ServerGeminiEventType.Content,
2568
- value: 'Retry successful',
2569
- };
2570
- yield {
2571
- type: ServerGeminiEventType.Finished,
2572
- value: { reason: 'STOP' },
2573
- };
2574
- })());
2575
- // Second loop detection
2576
- await act(async () => {
2577
- await result.current.submitQuery('second query');
2578
- });
2579
- await waitFor(() => {
2580
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2581
- });
2582
- // Simulate user selecting "disable" for second request
2583
- await act(async () => {
2584
- result.current.loopDetectionConfirmationRequest?.onComplete({
2585
- userSelection: 'disable',
2586
- });
2587
- });
2588
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
2589
- // Verify second message was added
2590
- expect(mockAddItem).toHaveBeenCalledWith({
2591
- type: 'info',
2592
- text: 'Loop detection has been disabled for this session. Retrying request...',
2593
- });
2594
- // Verify that the request was retried
2595
- await waitFor(() => {
2596
- expect(mockSendMessageStream).toHaveBeenCalledTimes(3); // 1st query, 2nd query, retry of 2nd query
2597
- expect(mockSendMessageStream).toHaveBeenNthCalledWith(3, 'second query', expect.any(AbortSignal), expect.any(String), undefined, 'second query');
2598
- });
2599
- });
2600
- it('should process LoopDetected event after moving pending history to history', async () => {
2601
- mockSendMessageStream.mockReturnValue((async function* () {
2602
- yield {
2603
- type: ServerGeminiEventType.Content,
2604
- value: 'Some response content',
2605
- };
2606
- yield {
2607
- type: ServerGeminiEventType.LoopDetected,
2608
- };
2609
- })());
2610
- const { result } = await renderTestHook();
2611
- await act(async () => {
2612
- await result.current.submitQuery('test query');
2613
- });
2614
- // Verify that the content was added to history before the loop detection dialog
2615
- await waitFor(() => {
2616
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2617
- type: 'gemini',
2618
- text: 'Some response content',
2619
- }), expect.any(Number));
2620
- });
2621
- // Then verify loop detection confirmation request was set
2622
- await waitFor(() => {
2623
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2624
- });
2625
- });
2626
- describe('Race Condition Prevention', () => {
2627
- it('should reject concurrent submitQuery when already responding', async () => {
2628
- // Stream that stays open (simulates "still responding")
2629
- mockSendMessageStream.mockReturnValue((async function* () {
2630
- yield {
2631
- type: ServerGeminiEventType.Content,
2632
- value: 'First response',
2633
- };
2634
- // Keep the stream open
2635
- await new Promise(() => { });
2636
- })());
2637
- const { result } = await renderTestHook();
2638
- // Start first query without awaiting (fire-and-forget, like existing tests)
2639
- await act(async () => {
2640
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
2641
- result.current.submitQuery('first query');
2642
- });
2643
- // Wait for the stream to start responding
2644
- await waitFor(() => {
2645
- expect(result.current.streamingState).toBe(StreamingState.Responding);
2646
- });
2647
- // Try a second query while first is still responding
2648
- await act(async () => {
2649
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
2650
- result.current.submitQuery('second query');
2651
- });
2652
- // Should have only called sendMessageStream once (second was rejected)
2653
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
2654
- });
2655
- it('should allow continuation queries via loop detection retry', async () => {
2656
- const mockLoopDetectionService = {
2657
- disableForSession: vi.fn(),
2658
- };
2659
- const mockClient = {
2660
- ...new MockedGeminiClientClass(mockConfig),
2661
- getLoopDetectionService: () => mockLoopDetectionService,
2662
- };
2663
- mockConfig.getGeminiClient = vi.fn().mockReturnValue(mockClient);
2664
- // First call triggers loop detection
2665
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2666
- yield {
2667
- type: ServerGeminiEventType.LoopDetected,
2668
- };
2669
- })());
2670
- // Retry call succeeds
2671
- mockSendMessageStream.mockReturnValueOnce((async function* () {
2672
- yield {
2673
- type: ServerGeminiEventType.Content,
2674
- value: 'Retry success',
2675
- };
2676
- yield {
2677
- type: ServerGeminiEventType.Finished,
2678
- value: { reason: 'STOP' },
2679
- };
2680
- })());
2681
- const { result } = await renderTestHook();
2682
- await act(async () => {
2683
- await result.current.submitQuery('test query');
2684
- });
2685
- await waitFor(() => {
2686
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2687
- });
2688
- // User selects "disable" which triggers a continuation query
2689
- await act(async () => {
2690
- result.current.loopDetectionConfirmationRequest?.onComplete({
2691
- userSelection: 'disable',
2692
- });
2693
- });
2694
- // Verify disableForSession was called
2695
- expect(mockLoopDetectionService.disableForSession).toHaveBeenCalledTimes(1);
2696
- // Continuation query should have gone through (2 total calls)
2697
- await waitFor(() => {
2698
- expect(mockSendMessageStream).toHaveBeenCalledTimes(2);
2699
- expect(mockSendMessageStream).toHaveBeenNthCalledWith(2, 'test query', expect.any(AbortSignal), expect.any(String), undefined, 'test query');
2700
- });
2701
- });
2702
- });
2703
- });
2704
- describe('Agent Execution Events', () => {
2705
- it('should handle AgentExecutionStopped event with systemMessage', async () => {
2706
- mockSendMessageStream.mockReturnValue((async function* () {
2707
- yield {
2708
- type: ServerGeminiEventType.AgentExecutionStopped,
2709
- value: {
2710
- reason: 'hook-reason',
2711
- systemMessage: 'Custom stop message',
2712
- },
2713
- };
2714
- })());
2715
- const { result } = await renderTestHook();
2716
- await act(async () => {
2717
- await result.current.submitQuery('test stop');
2718
- });
2719
- await waitFor(() => {
2720
- expect(mockAddItem).toHaveBeenCalledWith({
2721
- type: MessageType.INFO,
2722
- text: 'Agent execution stopped: Custom stop message',
2723
- }, expect.any(Number));
2724
- expect(result.current.streamingState).toBe(StreamingState.Idle);
2725
- });
2726
- });
2727
- it('should handle AgentExecutionStopped event by falling back to reason when systemMessage is missing', async () => {
2728
- mockSendMessageStream.mockReturnValue((async function* () {
2729
- yield {
2730
- type: ServerGeminiEventType.AgentExecutionStopped,
2731
- value: { reason: 'Stopped by hook' },
2732
- };
2733
- })());
2734
- const { result } = await renderTestHook();
2735
- await act(async () => {
2736
- await result.current.submitQuery('test stop');
2737
- });
2738
- await waitFor(() => {
2739
- expect(mockAddItem).toHaveBeenCalledWith({
2740
- type: MessageType.INFO,
2741
- text: 'Agent execution stopped: Stopped by hook',
2742
- }, expect.any(Number));
2743
- expect(result.current.streamingState).toBe(StreamingState.Idle);
2744
- });
2745
- });
2746
- it('should handle AgentExecutionBlocked event with systemMessage', async () => {
2747
- mockSendMessageStream.mockReturnValue((async function* () {
2748
- yield {
2749
- type: ServerGeminiEventType.AgentExecutionBlocked,
2750
- value: {
2751
- reason: 'hook-reason',
2752
- systemMessage: 'Custom block message',
2753
- },
2754
- };
2755
- })());
2756
- const { result } = await renderTestHook();
2757
- await act(async () => {
2758
- await result.current.submitQuery('test block');
2759
- });
2760
- await waitFor(() => {
2761
- expect(mockAddItem).toHaveBeenCalledWith({
2762
- type: MessageType.WARNING,
2763
- text: 'Agent execution blocked: Custom block message',
2764
- }, expect.any(Number));
2765
- });
2766
- });
2767
- it('should handle AgentExecutionBlocked event by falling back to reason when systemMessage is missing', async () => {
2768
- mockSendMessageStream.mockReturnValue((async function* () {
2769
- yield {
2770
- type: ServerGeminiEventType.AgentExecutionBlocked,
2771
- value: { reason: 'Blocked by hook' },
2772
- };
2773
- })());
2774
- const { result } = await renderTestHook();
2775
- await act(async () => {
2776
- await result.current.submitQuery('test block');
2777
- });
2778
- await waitFor(() => {
2779
- expect(mockAddItem).toHaveBeenCalledWith({
2780
- type: MessageType.WARNING,
2781
- text: 'Agent execution blocked: Blocked by hook',
2782
- }, expect.any(Number));
2783
- });
2784
- });
2785
- });
2786
- describe('Stream Splitting', () => {
2787
- it('should not add empty history item when splitting message results in empty or whitespace-only beforeText', async () => {
2788
- // Mock split point to always be 0, causing beforeText to be empty
2789
- vi.mocked(findLastSafeSplitPoint).mockReturnValue(0);
2790
- mockSendMessageStream.mockReturnValue((async function* () {
2791
- yield { type: ServerGeminiEventType.Content, value: 'test content' };
2792
- })());
2793
- const { result } = await renderTestHook();
2794
- await act(async () => {
2795
- await result.current.submitQuery('user query');
2796
- });
2797
- await waitFor(() => {
2798
- // We expect the stream to be processed.
2799
- // Since beforeText is empty (0 split), addItem should NOT be called for it.
2800
- // addItem IS called for the user query "user query".
2801
- });
2802
- // Check addItem calls.
2803
- // It should be called for user query and for the content.
2804
- expect(mockAddItem).toHaveBeenCalledTimes(2);
2805
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({ type: 'user', text: 'user query' }), expect.any(Number));
2806
- expect(mockAddItem).toHaveBeenLastCalledWith(expect.objectContaining({
2807
- type: 'gemini_content',
2808
- text: 'test content',
2809
- }), expect.any(Number));
2810
- // Verify that pendingHistoryItem is empty after (afterText).
2811
- expect(result.current.pendingHistoryItems.length).toEqual(0);
2812
- // Reset mock
2813
- vi.mocked(findLastSafeSplitPoint).mockReset();
2814
- vi.mocked(findLastSafeSplitPoint).mockImplementation((s) => s.length);
2815
- });
2816
- it('should add whitespace-only history item when splitting message', async () => {
2817
- // Input: " content"
2818
- // Split at 3 -> before: " ", after: "content"
2819
- vi.mocked(findLastSafeSplitPoint).mockReturnValue(3);
2820
- mockSendMessageStream.mockReturnValue((async function* () {
2821
- yield { type: ServerGeminiEventType.Content, value: ' content' };
2822
- })());
2823
- const { result } = await renderTestHook();
2824
- await act(async () => {
2825
- await result.current.submitQuery('user query');
2826
- });
2827
- await waitFor(() => { });
2828
- expect(mockAddItem).toHaveBeenCalledTimes(3);
2829
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({ type: 'user', text: 'user query' }), expect.any(Number));
2830
- expect(mockAddItem).toHaveBeenLastCalledWith(expect.objectContaining({
2831
- type: 'gemini_content',
2832
- text: 'content',
2833
- }), expect.any(Number));
2834
- expect(result.current.pendingHistoryItems.length).toEqual(0);
2835
- });
2836
- });
2837
- it('should trace UserPrompt telemetry on submitQuery', async () => {
2838
- const { result } = await renderTestHook();
2839
- mockSendMessageStream.mockReturnValue((async function* () {
2840
- yield { type: ServerGeminiEventType.Content, value: 'Response' };
2841
- })());
2842
- await act(async () => {
2843
- await result.current.submitQuery('telemetry test query');
2844
- });
2845
- const userPromptCall = mockRunInDevTraceSpan.mock.calls.find((call) => call[0].operation === GeminiCliOperation.UserPrompt ||
2846
- call[0].operation === 'UserPrompt');
2847
- expect(userPromptCall).toBeDefined();
2848
- const spanMetadata = {};
2849
- await act(async () => {
2850
- await userPromptCall[1]({ metadata: spanMetadata });
2851
- });
2852
- expect(spanMetadata.input).toBe('telemetry test query');
2853
- });
2854
- });
2855
- //# sourceMappingURL=useGeminiStream.test.js.map