@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,2015 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ToolErrorType, GeminiEventType, OutputFormat, uiTelemetryService, FatalInputError, CoreEvent, CoreToolCallStatus, JsonStreamEventType, } from '@google/gemini-cli-core';
7
- import { runNonInteractive } from './nonInteractiveCliAgentSession.js';
8
- import { describe, it, expect, beforeEach, afterEach, vi, } from 'vitest';
9
- // Mock core modules
10
- vi.mock('./ui/hooks/atCommandProcessor.js');
11
- const mockSetupInitialActivityLogger = vi.hoisted(() => vi.fn());
12
- vi.mock('./utils/devtoolsService.js', () => ({
13
- setupInitialActivityLogger: mockSetupInitialActivityLogger,
14
- }));
15
- const mockCoreEvents = vi.hoisted(() => ({
16
- on: vi.fn(),
17
- off: vi.fn(),
18
- emit: vi.fn(),
19
- emitConsoleLog: vi.fn(),
20
- emitFeedback: vi.fn(),
21
- drainBacklogs: vi.fn(),
22
- }));
23
- const mockSchedulerSchedule = vi.hoisted(() => vi.fn());
24
- vi.mock('@google/gemini-cli-core', async (importOriginal) => {
25
- const original = await importOriginal();
26
- class MockChatRecordingService {
27
- initialize = vi.fn();
28
- recordMessage = vi.fn();
29
- recordMessageTokens = vi.fn();
30
- recordToolCalls = vi.fn();
31
- }
32
- return {
33
- ...original,
34
- Scheduler: class {
35
- schedule = mockSchedulerSchedule;
36
- cancelAll = vi.fn();
37
- dispose = vi.fn();
38
- },
39
- isTelemetrySdkInitialized: vi.fn().mockReturnValue(true),
40
- ChatRecordingService: MockChatRecordingService,
41
- uiTelemetryService: {
42
- getMetrics: vi.fn(),
43
- },
44
- LegacyAgentSession: original.LegacyAgentSession,
45
- geminiPartsToContentParts: original.geminiPartsToContentParts,
46
- coreEvents: mockCoreEvents,
47
- createWorkingStdio: vi.fn(() => ({
48
- stdout: process.stdout,
49
- stderr: process.stderr,
50
- })),
51
- };
52
- });
53
- const mockGetCommands = vi.hoisted(() => vi.fn());
54
- const mockCommandServiceCreate = vi.hoisted(() => vi.fn());
55
- vi.mock('./services/CommandService.js', () => ({
56
- CommandService: {
57
- create: mockCommandServiceCreate,
58
- },
59
- }));
60
- vi.mock('./services/FileCommandLoader.js');
61
- vi.mock('./services/McpPromptLoader.js');
62
- vi.mock('./services/BuiltinCommandLoader.js');
63
- describe('runNonInteractive', () => {
64
- let mockConfig;
65
- let mockSettings;
66
- let mockToolRegistry;
67
- let consoleErrorSpy;
68
- let processStdoutSpy;
69
- let processStderrSpy;
70
- let mockGeminiClient;
71
- const MOCK_SESSION_METRICS = {
72
- models: {},
73
- tools: {
74
- totalCalls: 0,
75
- totalSuccess: 0,
76
- totalFail: 0,
77
- totalDurationMs: 0,
78
- totalDecisions: {
79
- accept: 0,
80
- reject: 0,
81
- modify: 0,
82
- auto_accept: 0,
83
- },
84
- byName: {},
85
- },
86
- files: {
87
- totalLinesAdded: 0,
88
- totalLinesRemoved: 0,
89
- },
90
- };
91
- beforeEach(async () => {
92
- mockSchedulerSchedule.mockReset();
93
- mockCommandServiceCreate.mockResolvedValue({
94
- getCommands: mockGetCommands,
95
- });
96
- consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => { });
97
- processStdoutSpy = vi
98
- .spyOn(process.stdout, 'write')
99
- .mockImplementation(() => true);
100
- vi.spyOn(process.stdout, 'on').mockImplementation(() => process.stdout);
101
- processStderrSpy = vi
102
- .spyOn(process.stderr, 'write')
103
- .mockImplementation(() => true);
104
- vi.spyOn(process, 'exit').mockImplementation((code) => {
105
- throw new Error(`process.exit(${code}) called`);
106
- });
107
- mockToolRegistry = {
108
- getTool: vi.fn(),
109
- getFunctionDeclarations: vi.fn().mockReturnValue([]),
110
- };
111
- mockGeminiClient = {
112
- sendMessageStream: vi.fn(),
113
- resumeChat: vi.fn().mockResolvedValue(undefined),
114
- getChatRecordingService: vi.fn(() => ({
115
- initialize: vi.fn(),
116
- recordMessage: vi.fn(),
117
- recordMessageTokens: vi.fn(),
118
- recordToolCalls: vi.fn(),
119
- })),
120
- getChat: vi.fn(() => ({ recordCompletedToolCalls: vi.fn() })),
121
- getCurrentSequenceModel: vi.fn().mockReturnValue(null),
122
- };
123
- mockConfig = {
124
- initialize: vi.fn().mockReturnValue(Promise.resolve(undefined)),
125
- getMessageBus: vi.fn().mockReturnValue({
126
- subscribe: vi.fn(),
127
- unsubscribe: vi.fn(),
128
- publish: vi.fn(),
129
- }),
130
- getGeminiClient: vi.fn().mockReturnValue(mockGeminiClient),
131
- getToolRegistry: vi.fn().mockReturnValue(mockToolRegistry),
132
- getMaxSessionTurns: vi.fn().mockReturnValue(10),
133
- getSessionId: vi.fn().mockReturnValue('test-session-id'),
134
- getProjectRoot: vi.fn().mockReturnValue('/test/project'),
135
- storage: {
136
- getProjectTempDir: vi.fn().mockReturnValue('/test/project/.gemini/tmp'),
137
- },
138
- getIdeMode: vi.fn().mockReturnValue(false),
139
- getContentGeneratorConfig: vi.fn().mockReturnValue({}),
140
- getDebugMode: vi.fn().mockReturnValue(false),
141
- getOutputFormat: vi.fn().mockReturnValue('text'),
142
- getModel: vi.fn().mockReturnValue('test-model'),
143
- getFolderTrust: vi.fn().mockReturnValue(false),
144
- isTrustedFolder: vi.fn().mockReturnValue(false),
145
- getRawOutput: vi.fn().mockReturnValue(false),
146
- getAcceptRawOutputRisk: vi.fn().mockReturnValue(false),
147
- getAgentSessionNoninteractiveEnabled: vi.fn().mockReturnValue(false),
148
- };
149
- mockSettings = {
150
- system: { path: '', settings: {} },
151
- systemDefaults: { path: '', settings: {} },
152
- user: { path: '', settings: {} },
153
- workspace: { path: '', settings: {} },
154
- errors: [],
155
- setValue: vi.fn(),
156
- merged: {
157
- security: {
158
- auth: {
159
- enforcedType: undefined,
160
- },
161
- },
162
- },
163
- isTrusted: true,
164
- migratedInMemoryScopes: new Set(),
165
- forScope: vi.fn(),
166
- computeMergedSettings: vi.fn(),
167
- };
168
- const { handleAtCommand } = await import('./ui/hooks/atCommandProcessor.js');
169
- vi.mocked(handleAtCommand).mockImplementation(async ({ query }) => ({
170
- processedQuery: [{ text: query }],
171
- }));
172
- });
173
- afterEach(() => {
174
- vi.restoreAllMocks();
175
- });
176
- async function* createStreamFromEvents(events) {
177
- for (const event of events) {
178
- yield event;
179
- }
180
- }
181
- const getWrittenOutput = () => processStdoutSpy.mock.calls.map((c) => c[0]).join('');
182
- it('should process input and write text output', async () => {
183
- const events = [
184
- { type: GeminiEventType.Content, value: 'Hello' },
185
- { type: GeminiEventType.Content, value: ' World' },
186
- {
187
- type: GeminiEventType.Finished,
188
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
189
- },
190
- ];
191
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
192
- await runNonInteractive({
193
- config: mockConfig,
194
- settings: mockSettings,
195
- input: 'Test input',
196
- prompt_id: 'prompt-id-1',
197
- });
198
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: 'Test input' }], expect.any(AbortSignal), 'prompt-id-1', undefined, 'Test input');
199
- expect(getWrittenOutput()).toBe('Hello World\n');
200
- // Note: Telemetry shutdown is now handled in runExitCleanup() in cleanup.ts
201
- // so we no longer expect shutdownTelemetry to be called directly here
202
- });
203
- it('should stream the specific stream started by send', async () => {
204
- const { LegacyAgentSession } = await import('@google/gemini-cli-core');
205
- const streamSpy = vi.spyOn(LegacyAgentSession.prototype, 'stream');
206
- const events = [
207
- { type: GeminiEventType.Content, value: 'Hello again' },
208
- {
209
- type: GeminiEventType.Finished,
210
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
211
- },
212
- ];
213
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
214
- await runNonInteractive({
215
- config: mockConfig,
216
- settings: mockSettings,
217
- input: 'Test input',
218
- prompt_id: 'prompt-id-stream',
219
- });
220
- expect(streamSpy).toHaveBeenCalledWith({ streamId: expect.any(String) });
221
- });
222
- it('fails fast if the session acknowledges a message send without a stream', async () => {
223
- const { LegacyAgentSession } = await import('@google/gemini-cli-core');
224
- const sendSpy = vi
225
- .spyOn(LegacyAgentSession.prototype, 'send')
226
- .mockResolvedValue({ streamId: null });
227
- const streamSpy = vi.spyOn(LegacyAgentSession.prototype, 'stream');
228
- await expect(runNonInteractive({
229
- config: mockConfig,
230
- settings: mockSettings,
231
- input: 'Test input',
232
- prompt_id: 'prompt-id-null-stream',
233
- })).rejects.toThrow('LegacyAgentSession.send() unexpectedly returned no stream for a message send.');
234
- expect(streamSpy).not.toHaveBeenCalled();
235
- sendSpy.mockRestore();
236
- streamSpy.mockRestore();
237
- });
238
- it('should register activity logger when GEMINI_CLI_ACTIVITY_LOG_TARGET is set', async () => {
239
- vi.stubEnv('GEMINI_CLI_ACTIVITY_LOG_TARGET', '/tmp/test.jsonl');
240
- const events = [
241
- {
242
- type: GeminiEventType.Finished,
243
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
244
- },
245
- ];
246
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
247
- await runNonInteractive({
248
- config: mockConfig,
249
- settings: mockSettings,
250
- input: 'test',
251
- prompt_id: 'prompt-id-activity-logger',
252
- });
253
- expect(mockSetupInitialActivityLogger).toHaveBeenCalledWith(mockConfig);
254
- vi.unstubAllEnvs();
255
- });
256
- it('should not register activity logger when GEMINI_CLI_ACTIVITY_LOG_TARGET is not set', async () => {
257
- vi.stubEnv('GEMINI_CLI_ACTIVITY_LOG_TARGET', '');
258
- const events = [
259
- {
260
- type: GeminiEventType.Finished,
261
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
262
- },
263
- ];
264
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
265
- await runNonInteractive({
266
- config: mockConfig,
267
- settings: mockSettings,
268
- input: 'test',
269
- prompt_id: 'prompt-id-activity-logger-off',
270
- });
271
- expect(mockSetupInitialActivityLogger).not.toHaveBeenCalled();
272
- vi.unstubAllEnvs();
273
- });
274
- it('should handle a single tool call and respond', async () => {
275
- const toolCallEvent = {
276
- type: GeminiEventType.ToolCallRequest,
277
- value: {
278
- callId: 'tool-1',
279
- name: 'testTool',
280
- args: { arg1: 'value1' },
281
- isClientInitiated: false,
282
- prompt_id: 'prompt-id-2',
283
- },
284
- };
285
- const toolResponse = [{ text: 'Tool response' }];
286
- mockSchedulerSchedule.mockResolvedValue([
287
- {
288
- status: CoreToolCallStatus.Success,
289
- request: {
290
- callId: 'tool-1',
291
- name: 'testTool',
292
- args: { arg1: 'value1' },
293
- isClientInitiated: false,
294
- prompt_id: 'prompt-id-2',
295
- },
296
- tool: {},
297
- invocation: {},
298
- response: {
299
- responseParts: toolResponse,
300
- callId: 'tool-1',
301
- error: undefined,
302
- errorType: undefined,
303
- contentLength: undefined,
304
- },
305
- },
306
- ]);
307
- const firstCallEvents = [toolCallEvent];
308
- const secondCallEvents = [
309
- { type: GeminiEventType.Content, value: 'Final answer' },
310
- {
311
- type: GeminiEventType.Finished,
312
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
313
- },
314
- ];
315
- mockGeminiClient.sendMessageStream
316
- .mockReturnValueOnce(createStreamFromEvents(firstCallEvents))
317
- .mockReturnValueOnce(createStreamFromEvents(secondCallEvents));
318
- await runNonInteractive({
319
- config: mockConfig,
320
- settings: mockSettings,
321
- input: 'Use a tool',
322
- prompt_id: 'prompt-id-2',
323
- });
324
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(2);
325
- expect(mockSchedulerSchedule).toHaveBeenCalledWith([expect.objectContaining({ name: 'testTool' })], expect.any(AbortSignal));
326
- expect(mockGeminiClient.sendMessageStream).toHaveBeenNthCalledWith(2, [{ text: 'Tool response' }], expect.any(AbortSignal), 'prompt-id-2', undefined, undefined);
327
- expect(getWrittenOutput()).toBe('Final answer\n');
328
- });
329
- it('should write a single newline between sequential text outputs from the model', async () => {
330
- // This test simulates a multi-turn conversation to ensure that a single newline
331
- // is printed between each block of text output from the model.
332
- // 1. Define the tool requests that the model will ask the CLI to run.
333
- const toolCallEvent = {
334
- type: GeminiEventType.ToolCallRequest,
335
- value: {
336
- callId: 'mock-tool',
337
- name: 'mockTool',
338
- args: {},
339
- isClientInitiated: false,
340
- prompt_id: 'prompt-id-multi',
341
- },
342
- };
343
- // 2. Mock the execution of the tools. We just need them to succeed.
344
- mockSchedulerSchedule.mockResolvedValue([
345
- {
346
- status: CoreToolCallStatus.Success,
347
- request: toolCallEvent.value, // This is generic enough for both calls
348
- tool: {},
349
- invocation: {},
350
- response: {
351
- responseParts: [],
352
- callId: 'mock-tool',
353
- },
354
- },
355
- ]);
356
- // 3. Define the sequence of events streamed from the mock model.
357
- // Turn 1: Model outputs text, then requests a tool call.
358
- const modelTurn1 = [
359
- { type: GeminiEventType.Content, value: 'Use mock tool' },
360
- toolCallEvent,
361
- ];
362
- // Turn 2: Model outputs more text, then requests another tool call.
363
- const modelTurn2 = [
364
- { type: GeminiEventType.Content, value: 'Use mock tool again' },
365
- toolCallEvent,
366
- ];
367
- // Turn 3: Model outputs a final answer.
368
- const modelTurn3 = [
369
- { type: GeminiEventType.Content, value: 'Finished.' },
370
- {
371
- type: GeminiEventType.Finished,
372
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
373
- },
374
- ];
375
- mockGeminiClient.sendMessageStream
376
- .mockReturnValueOnce(createStreamFromEvents(modelTurn1))
377
- .mockReturnValueOnce(createStreamFromEvents(modelTurn2))
378
- .mockReturnValueOnce(createStreamFromEvents(modelTurn3));
379
- // 4. Run the command.
380
- await runNonInteractive({
381
- config: mockConfig,
382
- settings: mockSettings,
383
- input: 'Use mock tool multiple times',
384
- prompt_id: 'prompt-id-multi',
385
- });
386
- // 5. Verify the output.
387
- // The rendered output should contain the text from each turn, separated by a
388
- // single newline, with a final newline at the end.
389
- expect(getWrittenOutput()).toMatchSnapshot();
390
- // Also verify the tools were called as expected.
391
- expect(mockSchedulerSchedule).toHaveBeenCalledTimes(2);
392
- });
393
- it('should handle error during tool execution and should send error back to the model', async () => {
394
- const toolCallEvent = {
395
- type: GeminiEventType.ToolCallRequest,
396
- value: {
397
- callId: 'tool-1',
398
- name: 'errorTool',
399
- args: {},
400
- isClientInitiated: false,
401
- prompt_id: 'prompt-id-3',
402
- },
403
- };
404
- mockSchedulerSchedule.mockResolvedValue([
405
- {
406
- status: CoreToolCallStatus.Error,
407
- request: {
408
- callId: 'tool-1',
409
- name: 'errorTool',
410
- args: {},
411
- isClientInitiated: false,
412
- prompt_id: 'prompt-id-3',
413
- },
414
- tool: {},
415
- response: {
416
- callId: 'tool-1',
417
- error: new Error('Execution failed'),
418
- errorType: ToolErrorType.EXECUTION_FAILED,
419
- responseParts: [
420
- {
421
- functionResponse: {
422
- name: 'errorTool',
423
- response: {
424
- output: 'Error: Execution failed',
425
- },
426
- },
427
- },
428
- ],
429
- resultDisplay: 'Execution failed',
430
- contentLength: undefined,
431
- },
432
- },
433
- ]);
434
- const finalResponse = [
435
- {
436
- type: GeminiEventType.Content,
437
- value: 'Sorry, let me try again.',
438
- },
439
- {
440
- type: GeminiEventType.Finished,
441
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
442
- },
443
- ];
444
- mockGeminiClient.sendMessageStream
445
- .mockReturnValueOnce(createStreamFromEvents([toolCallEvent]))
446
- .mockReturnValueOnce(createStreamFromEvents(finalResponse));
447
- await runNonInteractive({
448
- config: mockConfig,
449
- settings: mockSettings,
450
- input: 'Trigger tool error',
451
- prompt_id: 'prompt-id-3',
452
- });
453
- expect(mockSchedulerSchedule).toHaveBeenCalled();
454
- expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool errorTool: Execution failed');
455
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(2);
456
- expect(mockGeminiClient.sendMessageStream).toHaveBeenNthCalledWith(2, [
457
- {
458
- functionResponse: {
459
- name: 'errorTool',
460
- response: {
461
- output: 'Error: Execution failed',
462
- },
463
- },
464
- },
465
- ], expect.any(AbortSignal), 'prompt-id-3', undefined, undefined);
466
- expect(getWrittenOutput()).toBe('Sorry, let me try again.\n');
467
- });
468
- it('should exit with error if sendMessageStream throws initially', async () => {
469
- const apiError = new Error('API connection failed');
470
- mockGeminiClient.sendMessageStream.mockImplementation(() => {
471
- throw apiError;
472
- });
473
- await expect(runNonInteractive({
474
- config: mockConfig,
475
- settings: mockSettings,
476
- input: 'Initial fail',
477
- prompt_id: 'prompt-id-4',
478
- })).rejects.toThrow('API connection failed');
479
- });
480
- it('should not exit if a tool is not found, and should send error back to model', async () => {
481
- const toolCallEvent = {
482
- type: GeminiEventType.ToolCallRequest,
483
- value: {
484
- callId: 'tool-1',
485
- name: 'nonexistentTool',
486
- args: {},
487
- isClientInitiated: false,
488
- prompt_id: 'prompt-id-5',
489
- },
490
- };
491
- mockSchedulerSchedule.mockResolvedValue([
492
- {
493
- status: CoreToolCallStatus.Error,
494
- request: {
495
- callId: 'tool-1',
496
- name: 'nonexistentTool',
497
- args: {},
498
- isClientInitiated: false,
499
- prompt_id: 'prompt-id-5',
500
- },
501
- response: {
502
- callId: 'tool-1',
503
- error: new Error('Tool "nonexistentTool" not found in registry.'),
504
- resultDisplay: 'Tool "nonexistentTool" not found in registry.',
505
- responseParts: [],
506
- errorType: undefined,
507
- contentLength: undefined,
508
- },
509
- },
510
- ]);
511
- const finalResponse = [
512
- {
513
- type: GeminiEventType.Content,
514
- value: "Sorry, I can't find that tool.",
515
- },
516
- {
517
- type: GeminiEventType.Finished,
518
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
519
- },
520
- ];
521
- mockGeminiClient.sendMessageStream
522
- .mockReturnValueOnce(createStreamFromEvents([toolCallEvent]))
523
- .mockReturnValueOnce(createStreamFromEvents(finalResponse));
524
- await runNonInteractive({
525
- config: mockConfig,
526
- settings: mockSettings,
527
- input: 'Trigger tool not found',
528
- prompt_id: 'prompt-id-5',
529
- });
530
- expect(mockSchedulerSchedule).toHaveBeenCalled();
531
- expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool nonexistentTool: Tool "nonexistentTool" not found in registry.');
532
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(2);
533
- expect(getWrittenOutput()).toBe("Sorry, I can't find that tool.\n");
534
- });
535
- it('should exit when max session turns are exceeded', async () => {
536
- vi.mocked(mockConfig.getMaxSessionTurns).mockReturnValue(0);
537
- await expect(runNonInteractive({
538
- config: mockConfig,
539
- settings: mockSettings,
540
- input: 'Trigger loop',
541
- prompt_id: 'prompt-id-6',
542
- })).rejects.toThrow('Reached max session turns for this session');
543
- });
544
- it('should preprocess @include commands before sending to the model', async () => {
545
- // 1. Mock the imported atCommandProcessor
546
- const { handleAtCommand } = await import('./ui/hooks/atCommandProcessor.js');
547
- const mockHandleAtCommand = vi.mocked(handleAtCommand);
548
- // 2. Define the raw input and the expected processed output
549
- const rawInput = 'Summarize @file.txt';
550
- const processedParts = [
551
- { text: 'Summarize @file.txt' },
552
- { text: '\n--- Content from referenced files ---\n' },
553
- { text: 'This is the content of the file.' },
554
- { text: '\n--- End of content ---' },
555
- ];
556
- // 3. Setup the mock to return the processed parts
557
- mockHandleAtCommand.mockResolvedValue({
558
- processedQuery: processedParts,
559
- });
560
- // Mock a simple stream response from the Gemini client
561
- const events = [
562
- { type: GeminiEventType.Content, value: 'Summary complete.' },
563
- {
564
- type: GeminiEventType.Finished,
565
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
566
- },
567
- ];
568
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
569
- // 4. Run the non-interactive mode with the raw input
570
- await runNonInteractive({
571
- config: mockConfig,
572
- settings: mockSettings,
573
- input: rawInput,
574
- prompt_id: 'prompt-id-7',
575
- });
576
- // 5. Assert that sendMessageStream was called with the PROCESSED parts, not the raw input
577
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith(processedParts, expect.any(AbortSignal), 'prompt-id-7', undefined, rawInput);
578
- // 6. Assert the final output is correct
579
- expect(getWrittenOutput()).toBe('Summary complete.\n');
580
- });
581
- it('should process input and write JSON output with stats', async () => {
582
- const events = [
583
- { type: GeminiEventType.Content, value: 'Hello World' },
584
- {
585
- type: GeminiEventType.Finished,
586
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
587
- },
588
- ];
589
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
590
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
591
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
592
- await runNonInteractive({
593
- config: mockConfig,
594
- settings: mockSettings,
595
- input: 'Test input',
596
- prompt_id: 'prompt-id-1',
597
- });
598
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: 'Test input' }], expect.any(AbortSignal), 'prompt-id-1', undefined, 'Test input');
599
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
600
- session_id: 'test-session-id',
601
- response: 'Hello World',
602
- stats: MOCK_SESSION_METRICS,
603
- }, null, 2));
604
- });
605
- it('should write JSON output with stats for tool-only commands (no text response)', async () => {
606
- // Test the scenario where a command completes successfully with only tool calls
607
- // but no text response - this would have caught the original bug
608
- const toolCallEvent = {
609
- type: GeminiEventType.ToolCallRequest,
610
- value: {
611
- callId: 'tool-1',
612
- name: 'testTool',
613
- args: { arg1: 'value1' },
614
- isClientInitiated: false,
615
- prompt_id: 'prompt-id-tool-only',
616
- },
617
- };
618
- const toolResponse = [{ text: 'Tool executed successfully' }];
619
- mockSchedulerSchedule.mockResolvedValue([
620
- {
621
- status: CoreToolCallStatus.Success,
622
- request: {
623
- callId: 'tool-1',
624
- name: 'testTool',
625
- args: { arg1: 'value1' },
626
- isClientInitiated: false,
627
- prompt_id: 'prompt-id-tool-only',
628
- },
629
- tool: {},
630
- invocation: {},
631
- response: {
632
- responseParts: toolResponse,
633
- callId: 'tool-1',
634
- error: undefined,
635
- errorType: undefined,
636
- contentLength: undefined,
637
- },
638
- },
639
- ]);
640
- // First call returns only tool call, no content
641
- const firstCallEvents = [
642
- toolCallEvent,
643
- {
644
- type: GeminiEventType.Finished,
645
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
646
- },
647
- ];
648
- // Second call returns no content (tool-only completion)
649
- const secondCallEvents = [
650
- {
651
- type: GeminiEventType.Finished,
652
- value: { reason: undefined, usageMetadata: { totalTokenCount: 3 } },
653
- },
654
- ];
655
- mockGeminiClient.sendMessageStream
656
- .mockReturnValueOnce(createStreamFromEvents(firstCallEvents))
657
- .mockReturnValueOnce(createStreamFromEvents(secondCallEvents));
658
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
659
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
660
- await runNonInteractive({
661
- config: mockConfig,
662
- settings: mockSettings,
663
- input: 'Execute tool only',
664
- prompt_id: 'prompt-id-tool-only',
665
- });
666
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(2);
667
- expect(mockSchedulerSchedule).toHaveBeenCalledWith([expect.objectContaining({ name: 'testTool' })], expect.any(AbortSignal));
668
- // This should output JSON with empty response but include stats
669
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
670
- session_id: 'test-session-id',
671
- response: '',
672
- stats: MOCK_SESSION_METRICS,
673
- }, null, 2));
674
- });
675
- it('should keep only the final post-tool assistant text in JSON output', async () => {
676
- const toolCallEvent = {
677
- type: GeminiEventType.ToolCallRequest,
678
- value: {
679
- callId: 'tool-1',
680
- name: 'testTool',
681
- args: { arg1: 'value1' },
682
- isClientInitiated: false,
683
- prompt_id: 'prompt-id-json-tool-text',
684
- },
685
- };
686
- mockSchedulerSchedule.mockResolvedValue([
687
- {
688
- status: CoreToolCallStatus.Success,
689
- request: toolCallEvent.value,
690
- tool: {},
691
- invocation: {},
692
- response: {
693
- responseParts: [{ text: 'Tool executed successfully' }],
694
- callId: 'tool-1',
695
- error: undefined,
696
- errorType: undefined,
697
- contentLength: undefined,
698
- },
699
- },
700
- ]);
701
- mockGeminiClient.sendMessageStream
702
- .mockReturnValueOnce(createStreamFromEvents([
703
- { type: GeminiEventType.Content, value: 'Let me check that...' },
704
- toolCallEvent,
705
- {
706
- type: GeminiEventType.Finished,
707
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
708
- },
709
- ]))
710
- .mockReturnValueOnce(createStreamFromEvents([
711
- { type: GeminiEventType.Content, value: 'Final answer' },
712
- {
713
- type: GeminiEventType.Finished,
714
- value: { reason: undefined, usageMetadata: { totalTokenCount: 3 } },
715
- },
716
- ]));
717
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
718
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
719
- await runNonInteractive({
720
- config: mockConfig,
721
- settings: mockSettings,
722
- input: 'Use a tool',
723
- prompt_id: 'prompt-id-json-tool-text',
724
- });
725
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
726
- session_id: 'test-session-id',
727
- response: 'Final answer',
728
- stats: MOCK_SESSION_METRICS,
729
- }, null, 2));
730
- });
731
- it('should write JSON output with stats for empty response commands', async () => {
732
- // Test the scenario where a command completes but produces no content at all
733
- const events = [
734
- {
735
- type: GeminiEventType.Finished,
736
- value: { reason: undefined, usageMetadata: { totalTokenCount: 1 } },
737
- },
738
- ];
739
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
740
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
741
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
742
- await runNonInteractive({
743
- config: mockConfig,
744
- settings: mockSettings,
745
- input: 'Empty response test',
746
- prompt_id: 'prompt-id-empty',
747
- });
748
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: 'Empty response test' }], expect.any(AbortSignal), 'prompt-id-empty', undefined, 'Empty response test');
749
- // This should output JSON with empty response but include stats
750
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
751
- session_id: 'test-session-id',
752
- response: '',
753
- stats: MOCK_SESSION_METRICS,
754
- }, null, 2));
755
- });
756
- it('should handle errors in JSON format', async () => {
757
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
758
- const testError = new Error('Invalid input provided');
759
- mockGeminiClient.sendMessageStream.mockImplementation(() => {
760
- throw testError;
761
- });
762
- let thrownError = null;
763
- try {
764
- await runNonInteractive({
765
- config: mockConfig,
766
- settings: mockSettings,
767
- input: 'Test input',
768
- prompt_id: 'prompt-id-error',
769
- });
770
- // Should not reach here
771
- expect.fail('Expected process.exit to be called');
772
- }
773
- catch (error) {
774
- thrownError = error;
775
- }
776
- // Should throw because of mocked process.exit
777
- expect(thrownError?.message).toBe('process.exit(1) called');
778
- expect(mockCoreEvents.emitFeedback).toHaveBeenCalledWith('error', JSON.stringify({
779
- session_id: 'test-session-id',
780
- error: {
781
- type: 'Error',
782
- message: 'Invalid input provided',
783
- code: 1,
784
- },
785
- }, null, 2));
786
- });
787
- it('should handle FatalInputError with custom exit code in JSON format', async () => {
788
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
789
- const fatalError = new FatalInputError('Invalid command syntax provided');
790
- mockGeminiClient.sendMessageStream.mockImplementation(() => {
791
- throw fatalError;
792
- });
793
- let thrownError = null;
794
- try {
795
- await runNonInteractive({
796
- config: mockConfig,
797
- settings: mockSettings,
798
- input: 'Invalid syntax',
799
- prompt_id: 'prompt-id-fatal',
800
- });
801
- // Should not reach here
802
- expect.fail('Expected process.exit to be called');
803
- }
804
- catch (error) {
805
- thrownError = error;
806
- }
807
- // Should throw because of mocked process.exit with custom exit code
808
- expect(thrownError?.message).toBe('process.exit(42) called');
809
- expect(mockCoreEvents.emitFeedback).toHaveBeenCalledWith('error', JSON.stringify({
810
- session_id: 'test-session-id',
811
- error: {
812
- type: 'FatalInputError',
813
- message: 'Invalid command syntax provided',
814
- code: 42,
815
- },
816
- }, null, 2));
817
- });
818
- it('should execute a slash command that returns a prompt', async () => {
819
- const mockCommand = {
820
- name: 'testcommand',
821
- description: 'a test command',
822
- action: vi.fn().mockResolvedValue({
823
- type: 'submit_prompt',
824
- content: [{ text: 'Prompt from command' }],
825
- }),
826
- };
827
- mockGetCommands.mockReturnValue([mockCommand]);
828
- const events = [
829
- { type: GeminiEventType.Content, value: 'Response from command' },
830
- {
831
- type: GeminiEventType.Finished,
832
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
833
- },
834
- ];
835
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
836
- await runNonInteractive({
837
- config: mockConfig,
838
- settings: mockSettings,
839
- input: '/testcommand',
840
- prompt_id: 'prompt-id-slash',
841
- });
842
- // Ensure the prompt sent to the model is from the command, not the raw input
843
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: 'Prompt from command' }], expect.any(AbortSignal), 'prompt-id-slash', undefined, '/testcommand');
844
- expect(getWrittenOutput()).toBe('Response from command\n');
845
- });
846
- it('should handle slash commands', async () => {
847
- const nonInteractiveCliCommands = await import('./nonInteractiveCliCommands.js');
848
- const handleSlashCommandSpy = vi.spyOn(nonInteractiveCliCommands, 'handleSlashCommand');
849
- handleSlashCommandSpy.mockResolvedValue([{ text: 'Slash command output' }]);
850
- const events = [
851
- { type: GeminiEventType.Content, value: 'Response to slash command' },
852
- {
853
- type: GeminiEventType.Finished,
854
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
855
- },
856
- ];
857
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
858
- await runNonInteractive({
859
- config: mockConfig,
860
- settings: mockSettings,
861
- input: '/help',
862
- prompt_id: 'prompt-id-slash',
863
- });
864
- expect(handleSlashCommandSpy).toHaveBeenCalledWith('/help', expect.any(AbortController), mockConfig, mockSettings);
865
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: 'Slash command output' }], expect.any(AbortSignal), 'prompt-id-slash', undefined, '/help');
866
- expect(getWrittenOutput()).toBe('Response to slash command\n');
867
- handleSlashCommandSpy.mockRestore();
868
- });
869
- it('should handle cancellation (Ctrl+C)', async () => {
870
- // Mock isTTY and setRawMode safely
871
- const originalIsTTY = process.stdin.isTTY;
872
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
873
- const originalSetRawMode = process.stdin.setRawMode;
874
- Object.defineProperty(process.stdin, 'isTTY', {
875
- value: true,
876
- configurable: true,
877
- });
878
- if (!originalSetRawMode) {
879
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
880
- process.stdin.setRawMode = vi.fn();
881
- }
882
- const stdinOnSpy = vi
883
- .spyOn(process.stdin, 'on')
884
- .mockImplementation(() => process.stdin);
885
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
886
- vi.spyOn(process.stdin, 'setRawMode').mockImplementation(() => true);
887
- vi.spyOn(process.stdin, 'resume').mockImplementation(() => process.stdin);
888
- vi.spyOn(process.stdin, 'pause').mockImplementation(() => process.stdin);
889
- vi.spyOn(process.stdin, 'removeAllListeners').mockImplementation(() => process.stdin);
890
- // Cancellation will throw FatalCancellationError directly
891
- const events = [
892
- { type: GeminiEventType.Content, value: 'Thinking...' },
893
- ];
894
- // Create a stream that responds to abortion
895
- mockGeminiClient.sendMessageStream.mockImplementation((_messages, signal) => (async function* () {
896
- yield events[0];
897
- await new Promise((resolve, reject) => {
898
- const timeout = setTimeout(resolve, 1000);
899
- signal.addEventListener('abort', () => {
900
- clearTimeout(timeout);
901
- setTimeout(() => {
902
- reject(new Error('Aborted'));
903
- }, 300);
904
- });
905
- });
906
- })());
907
- const runPromise = runNonInteractive({
908
- config: mockConfig,
909
- settings: mockSettings,
910
- input: 'Long running query',
911
- prompt_id: 'prompt-id-cancel',
912
- });
913
- // Wait a bit for setup to complete and listeners to be registered
914
- await new Promise((resolve) => setTimeout(resolve, 100));
915
- // Find the keypress handler registered by runNonInteractive
916
- const keypressCall = stdinOnSpy.mock.calls.find(
917
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
918
- (call) => call[0] === 'keypress');
919
- expect(keypressCall).toBeDefined();
920
- const keypressHandler = keypressCall?.[1];
921
- if (keypressHandler) {
922
- // Simulate Ctrl+C
923
- keypressHandler('\u0003', { ctrl: true, name: 'c' });
924
- }
925
- await expect(runPromise).rejects.toThrow('Operation cancelled.');
926
- expect(processStderrSpy.mock.calls.some(
927
- // eslint-disable-next-line no-restricted-syntax
928
- (call) => typeof call[0] === 'string' && call[0].includes('Cancelling'))).toBe(true);
929
- // Restore original values
930
- Object.defineProperty(process.stdin, 'isTTY', {
931
- value: originalIsTTY,
932
- configurable: true,
933
- });
934
- if (originalSetRawMode) {
935
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
936
- process.stdin.setRawMode = originalSetRawMode;
937
- }
938
- else {
939
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
940
- delete process.stdin.setRawMode;
941
- }
942
- // Spies are automatically restored by vi.restoreAllMocks() in afterEach,
943
- // but we can also do it manually if needed.
944
- });
945
- it('should honor cancellation that happens before session.send()', async () => {
946
- const originalIsTTY = process.stdin.isTTY;
947
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
948
- const originalSetRawMode = process.stdin.setRawMode;
949
- Object.defineProperty(process.stdin, 'isTTY', {
950
- value: true,
951
- configurable: true,
952
- });
953
- if (!originalSetRawMode) {
954
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
955
- process.stdin.setRawMode = vi.fn();
956
- }
957
- const stdinOnSpy = vi
958
- .spyOn(process.stdin, 'on')
959
- .mockImplementation((event, listener) => {
960
- if (event === 'keypress') {
961
- listener('\u0003', { ctrl: true, name: 'c' });
962
- }
963
- return process.stdin;
964
- });
965
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
966
- vi.spyOn(process.stdin, 'setRawMode').mockImplementation(() => true);
967
- vi.spyOn(process.stdin, 'resume').mockImplementation(() => process.stdin);
968
- vi.spyOn(process.stdin, 'pause').mockImplementation(() => process.stdin);
969
- vi.spyOn(process.stdin, 'removeAllListeners').mockImplementation(() => process.stdin);
970
- // Cancellation will throw FatalCancellationError directly
971
- const { LegacyAgentSession } = await import('@google/gemini-cli-core');
972
- const sendSpy = vi.spyOn(LegacyAgentSession.prototype, 'send');
973
- await expect(runNonInteractive({
974
- config: mockConfig,
975
- settings: mockSettings,
976
- input: 'Cancelled query',
977
- prompt_id: 'prompt-id-pre-send-cancel',
978
- })).rejects.toThrow('Operation cancelled.');
979
- expect(sendSpy).not.toHaveBeenCalled();
980
- expect(stdinOnSpy).toHaveBeenCalled();
981
- sendSpy.mockRestore();
982
- Object.defineProperty(process.stdin, 'isTTY', {
983
- value: originalIsTTY,
984
- configurable: true,
985
- });
986
- if (originalSetRawMode) {
987
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
988
- process.stdin.setRawMode = originalSetRawMode;
989
- }
990
- else {
991
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
992
- delete process.stdin.setRawMode;
993
- }
994
- });
995
- it('should throw FatalInputError if a command requires confirmation', async () => {
996
- const mockCommand = {
997
- name: 'confirm',
998
- description: 'a command that needs confirmation',
999
- action: vi.fn().mockResolvedValue({
1000
- type: 'confirm_shell_commands',
1001
- commands: ['rm -rf /'],
1002
- }),
1003
- };
1004
- mockGetCommands.mockReturnValue([mockCommand]);
1005
- await expect(runNonInteractive({
1006
- config: mockConfig,
1007
- settings: mockSettings,
1008
- input: '/confirm',
1009
- prompt_id: 'prompt-id-confirm',
1010
- })).rejects.toThrow('Exiting due to a confirmation prompt requested by the command.');
1011
- });
1012
- it('should treat an unknown slash command as a regular prompt', async () => {
1013
- // No commands are mocked, so any slash command is "unknown"
1014
- mockGetCommands.mockReturnValue([]);
1015
- const events = [
1016
- { type: GeminiEventType.Content, value: 'Response to unknown' },
1017
- {
1018
- type: GeminiEventType.Finished,
1019
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1020
- },
1021
- ];
1022
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1023
- await runNonInteractive({
1024
- config: mockConfig,
1025
- settings: mockSettings,
1026
- input: '/unknowncommand',
1027
- prompt_id: 'prompt-id-unknown',
1028
- });
1029
- // Ensure the raw input is sent to the model
1030
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledWith([{ text: '/unknowncommand' }], expect.any(AbortSignal), 'prompt-id-unknown', undefined, '/unknowncommand');
1031
- expect(getWrittenOutput()).toBe('Response to unknown\n');
1032
- });
1033
- it('should throw for unhandled command result types', async () => {
1034
- const mockCommand = {
1035
- name: 'noaction',
1036
- description: 'unhandled type',
1037
- action: vi.fn().mockResolvedValue({
1038
- type: 'unhandled',
1039
- }),
1040
- };
1041
- mockGetCommands.mockReturnValue([mockCommand]);
1042
- await expect(runNonInteractive({
1043
- config: mockConfig,
1044
- settings: mockSettings,
1045
- input: '/noaction',
1046
- prompt_id: 'prompt-id-unhandled',
1047
- })).rejects.toThrow('Exiting due to command result that is not supported in non-interactive mode.');
1048
- });
1049
- it('should pass arguments to the slash command action', async () => {
1050
- const mockAction = vi.fn().mockResolvedValue({
1051
- type: 'submit_prompt',
1052
- content: [{ text: 'Prompt from command' }],
1053
- });
1054
- const mockCommand = {
1055
- name: 'testargs',
1056
- description: 'a test command',
1057
- action: mockAction,
1058
- };
1059
- mockGetCommands.mockReturnValue([mockCommand]);
1060
- const events = [
1061
- { type: GeminiEventType.Content, value: 'Acknowledged' },
1062
- {
1063
- type: GeminiEventType.Finished,
1064
- value: { reason: undefined, usageMetadata: { totalTokenCount: 1 } },
1065
- },
1066
- ];
1067
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1068
- await runNonInteractive({
1069
- config: mockConfig,
1070
- settings: mockSettings,
1071
- input: '/testargs arg1 arg2',
1072
- prompt_id: 'prompt-id-args',
1073
- });
1074
- expect(mockAction).toHaveBeenCalledWith(expect.any(Object), 'arg1 arg2');
1075
- expect(getWrittenOutput()).toBe('Acknowledged\n');
1076
- });
1077
- it('should instantiate CommandService with correct loaders for slash commands', async () => {
1078
- // This test indirectly checks that handleSlashCommand is using the right loaders.
1079
- const { FileCommandLoader } = await import('./services/FileCommandLoader.js');
1080
- const { McpPromptLoader } = await import('./services/McpPromptLoader.js');
1081
- const { BuiltinCommandLoader } = await import('./services/BuiltinCommandLoader.js');
1082
- mockGetCommands.mockReturnValue([]); // No commands found, so it will fall through
1083
- const events = [
1084
- { type: GeminiEventType.Content, value: 'Acknowledged' },
1085
- {
1086
- type: GeminiEventType.Finished,
1087
- value: { reason: undefined, usageMetadata: { totalTokenCount: 1 } },
1088
- },
1089
- ];
1090
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1091
- await runNonInteractive({
1092
- config: mockConfig,
1093
- settings: mockSettings,
1094
- input: '/mycommand',
1095
- prompt_id: 'prompt-id-loaders',
1096
- });
1097
- // Check that loaders were instantiated with the config
1098
- expect(FileCommandLoader).toHaveBeenCalledTimes(1);
1099
- expect(FileCommandLoader).toHaveBeenCalledWith(mockConfig);
1100
- expect(McpPromptLoader).toHaveBeenCalledTimes(1);
1101
- expect(McpPromptLoader).toHaveBeenCalledWith(mockConfig);
1102
- expect(BuiltinCommandLoader).toHaveBeenCalledWith(mockConfig);
1103
- // Check that instances were passed to CommandService.create
1104
- expect(mockCommandServiceCreate).toHaveBeenCalledTimes(1);
1105
- const loadersArg = mockCommandServiceCreate.mock.calls[0][0];
1106
- expect(loadersArg).toHaveLength(3);
1107
- expect(loadersArg[0]).toBe(vi.mocked(BuiltinCommandLoader).mock.instances[0]);
1108
- expect(loadersArg[1]).toBe(vi.mocked(McpPromptLoader).mock.instances[0]);
1109
- expect(loadersArg[2]).toBe(vi.mocked(FileCommandLoader).mock.instances[0]);
1110
- });
1111
- it('should allow a normally-excluded tool when --allowed-tools is set', async () => {
1112
- // By default, ShellTool is excluded in non-interactive mode.
1113
- // This test ensures that --allowed-tools overrides this exclusion.
1114
- vi.mocked(mockConfig.getToolRegistry).mockReturnValue({
1115
- getTool: vi.fn().mockReturnValue({
1116
- name: 'ShellTool',
1117
- description: 'A shell tool',
1118
- run: vi.fn(),
1119
- }),
1120
- getFunctionDeclarations: vi.fn().mockReturnValue([{ name: 'ShellTool' }]),
1121
- });
1122
- const toolCallEvent = {
1123
- type: GeminiEventType.ToolCallRequest,
1124
- value: {
1125
- callId: 'tool-shell-1',
1126
- name: 'ShellTool',
1127
- args: { command: 'ls' },
1128
- isClientInitiated: false,
1129
- prompt_id: 'prompt-id-allowed',
1130
- },
1131
- };
1132
- const toolResponse = [{ text: 'file.txt' }];
1133
- mockSchedulerSchedule.mockResolvedValue([
1134
- {
1135
- status: CoreToolCallStatus.Success,
1136
- request: {
1137
- callId: 'tool-shell-1',
1138
- name: 'ShellTool',
1139
- args: { command: 'ls' },
1140
- isClientInitiated: false,
1141
- prompt_id: 'prompt-id-allowed',
1142
- },
1143
- tool: {},
1144
- invocation: {},
1145
- response: {
1146
- responseParts: toolResponse,
1147
- callId: 'tool-shell-1',
1148
- error: undefined,
1149
- errorType: undefined,
1150
- contentLength: undefined,
1151
- },
1152
- },
1153
- ]);
1154
- const firstCallEvents = [toolCallEvent];
1155
- const secondCallEvents = [
1156
- { type: GeminiEventType.Content, value: 'file.txt' },
1157
- {
1158
- type: GeminiEventType.Finished,
1159
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1160
- },
1161
- ];
1162
- mockGeminiClient.sendMessageStream
1163
- .mockReturnValueOnce(createStreamFromEvents(firstCallEvents))
1164
- .mockReturnValueOnce(createStreamFromEvents(secondCallEvents));
1165
- await runNonInteractive({
1166
- config: mockConfig,
1167
- settings: mockSettings,
1168
- input: 'List the files',
1169
- prompt_id: 'prompt-id-allowed',
1170
- });
1171
- expect(mockSchedulerSchedule).toHaveBeenCalledWith([expect.objectContaining({ name: 'ShellTool' })], expect.any(AbortSignal));
1172
- expect(getWrittenOutput()).toBe('file.txt\n');
1173
- });
1174
- describe('CoreEvents Integration', () => {
1175
- it('subscribes to UserFeedback and drains backlog on start', async () => {
1176
- const events = [
1177
- {
1178
- type: GeminiEventType.Finished,
1179
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1180
- },
1181
- ];
1182
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1183
- await runNonInteractive({
1184
- config: mockConfig,
1185
- settings: mockSettings,
1186
- input: 'test',
1187
- prompt_id: 'prompt-id-events',
1188
- });
1189
- expect(mockCoreEvents.on).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
1190
- expect(mockCoreEvents.drainBacklogs).toHaveBeenCalledTimes(1);
1191
- });
1192
- it('unsubscribes from UserFeedback on finish', async () => {
1193
- const events = [
1194
- {
1195
- type: GeminiEventType.Finished,
1196
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1197
- },
1198
- ];
1199
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1200
- await runNonInteractive({
1201
- config: mockConfig,
1202
- settings: mockSettings,
1203
- input: 'test',
1204
- prompt_id: 'prompt-id-events',
1205
- });
1206
- expect(mockCoreEvents.off).toHaveBeenCalledWith(CoreEvent.UserFeedback, expect.any(Function));
1207
- });
1208
- it('logs to process.stderr when UserFeedback event is received', async () => {
1209
- const events = [
1210
- {
1211
- type: GeminiEventType.Finished,
1212
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1213
- },
1214
- ];
1215
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1216
- await runNonInteractive({
1217
- config: mockConfig,
1218
- settings: mockSettings,
1219
- input: 'test',
1220
- prompt_id: 'prompt-id-events',
1221
- });
1222
- // Get the registered handler
1223
- const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.UserFeedback)?.[1];
1224
- expect(handler).toBeDefined();
1225
- // Simulate an event
1226
- const payload = {
1227
- severity: 'error',
1228
- message: 'Test error message',
1229
- };
1230
- handler(payload);
1231
- expect(processStderrSpy).toHaveBeenCalledWith('[ERROR] Test error message\n');
1232
- });
1233
- it('logs optional error object to process.stderr in debug mode', async () => {
1234
- vi.mocked(mockConfig.getDebugMode).mockReturnValue(true);
1235
- const events = [
1236
- {
1237
- type: GeminiEventType.Finished,
1238
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1239
- },
1240
- ];
1241
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1242
- await runNonInteractive({
1243
- config: mockConfig,
1244
- settings: mockSettings,
1245
- input: 'test',
1246
- prompt_id: 'prompt-id-events',
1247
- });
1248
- // Get the registered handler
1249
- const handler = mockCoreEvents.on.mock.calls.find((call) => call[0] === CoreEvent.UserFeedback)?.[1];
1250
- expect(handler).toBeDefined();
1251
- // Simulate an event with error object
1252
- const errorObj = new Error('Original error');
1253
- // Mock stack for deterministic testing
1254
- errorObj.stack = 'Error: Original error\n at test';
1255
- const payload = {
1256
- severity: 'warning',
1257
- message: 'Test warning message',
1258
- error: errorObj,
1259
- };
1260
- handler(payload);
1261
- expect(processStderrSpy).toHaveBeenCalledWith('[WARNING] Test warning message\n');
1262
- expect(processStderrSpy).toHaveBeenCalledWith('Error: Original error\n at test\n');
1263
- });
1264
- });
1265
- it('should emit appropriate events for streaming JSON output', async () => {
1266
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1267
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1268
- const toolCallEvent = {
1269
- type: GeminiEventType.ToolCallRequest,
1270
- value: {
1271
- callId: 'tool-1',
1272
- name: 'testTool',
1273
- args: { arg1: 'value1' },
1274
- isClientInitiated: false,
1275
- prompt_id: 'prompt-id-stream',
1276
- },
1277
- };
1278
- mockSchedulerSchedule.mockResolvedValue([
1279
- {
1280
- status: CoreToolCallStatus.Success,
1281
- request: toolCallEvent.value,
1282
- tool: {},
1283
- invocation: {},
1284
- response: {
1285
- responseParts: [{ text: 'Tool response' }],
1286
- callId: 'tool-1',
1287
- error: undefined,
1288
- errorType: undefined,
1289
- contentLength: undefined,
1290
- resultDisplay: 'Tool executed successfully',
1291
- },
1292
- },
1293
- ]);
1294
- const firstCallEvents = [
1295
- { type: GeminiEventType.Content, value: 'Thinking...' },
1296
- toolCallEvent,
1297
- ];
1298
- const secondCallEvents = [
1299
- { type: GeminiEventType.Content, value: 'Final answer' },
1300
- {
1301
- type: GeminiEventType.Finished,
1302
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1303
- },
1304
- ];
1305
- mockGeminiClient.sendMessageStream
1306
- .mockReturnValueOnce(createStreamFromEvents(firstCallEvents))
1307
- .mockReturnValueOnce(createStreamFromEvents(secondCallEvents));
1308
- await runNonInteractive({
1309
- config: mockConfig,
1310
- settings: mockSettings,
1311
- input: 'Stream test',
1312
- prompt_id: 'prompt-id-stream',
1313
- });
1314
- const output = getWrittenOutput();
1315
- const sanitizedOutput = output
1316
- .replace(/"timestamp":"[^"]+"/g, '"timestamp":"<TIMESTAMP>"')
1317
- .replace(/"duration_ms":\d+/g, '"duration_ms":<DURATION>');
1318
- expect(sanitizedOutput).toMatchSnapshot();
1319
- });
1320
- it('should handle EPIPE error gracefully', async () => {
1321
- const events = [
1322
- { type: GeminiEventType.Content, value: 'Hello' },
1323
- { type: GeminiEventType.Content, value: ' World' },
1324
- ];
1325
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1326
- // Mock process.exit to track calls without throwing
1327
- vi.spyOn(process, 'exit').mockImplementation((_code) => undefined);
1328
- // Simulate EPIPE error on stdout
1329
- const stdoutErrorCallback = process.stdout.on.mock.calls.find((call) => call[0] === 'error')?.[1];
1330
- if (stdoutErrorCallback) {
1331
- stdoutErrorCallback({ code: 'EPIPE' });
1332
- }
1333
- await runNonInteractive({
1334
- config: mockConfig,
1335
- settings: mockSettings,
1336
- input: 'EPIPE test',
1337
- prompt_id: 'prompt-id-epipe',
1338
- });
1339
- // Since EPIPE is simulated, it might exit early or continue depending on timing,
1340
- // but our main goal is to verify the handler is registered and handles EPIPE.
1341
- expect(process.stdout.on).toHaveBeenCalledWith('error', expect.any(Function));
1342
- });
1343
- it('should resume chat when resumedSessionData is provided', async () => {
1344
- const events = [
1345
- { type: GeminiEventType.Content, value: 'Resumed' },
1346
- {
1347
- type: GeminiEventType.Finished,
1348
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1349
- },
1350
- ];
1351
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1352
- const resumedSessionData = {
1353
- conversation: {
1354
- sessionId: 'resumed-session-id',
1355
- messages: [
1356
- { role: 'user', parts: [{ text: 'Previous message' }] },
1357
- ], // eslint-disable-line @typescript-eslint/no-explicit-any
1358
- startTime: new Date().toISOString(),
1359
- lastUpdated: new Date().toISOString(),
1360
- firstUserMessage: 'Previous message',
1361
- projectHash: 'test-hash',
1362
- },
1363
- filePath: '/path/to/session.json',
1364
- };
1365
- await runNonInteractive({
1366
- config: mockConfig,
1367
- settings: mockSettings,
1368
- input: 'Continue',
1369
- prompt_id: 'prompt-id-resume',
1370
- resumedSessionData,
1371
- });
1372
- expect(mockGeminiClient.resumeChat).toHaveBeenCalledWith(expect.any(Array), resumedSessionData);
1373
- expect(getWrittenOutput()).toBe('Resumed\n');
1374
- });
1375
- it.each([
1376
- {
1377
- name: 'loop detected',
1378
- events: [
1379
- { type: GeminiEventType.LoopDetected },
1380
- ],
1381
- input: 'Loop test',
1382
- promptId: 'prompt-id-loop',
1383
- },
1384
- {
1385
- name: 'max session turns',
1386
- events: [
1387
- { type: GeminiEventType.MaxSessionTurns },
1388
- ],
1389
- input: 'Max turns test',
1390
- promptId: 'prompt-id-max-turns',
1391
- },
1392
- ])('should emit appropriate error event in streaming JSON mode: $name', async ({ events, input, promptId }) => {
1393
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1394
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1395
- const streamEvents = [
1396
- ...events,
1397
- {
1398
- type: GeminiEventType.Finished,
1399
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1400
- },
1401
- ];
1402
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(streamEvents));
1403
- try {
1404
- await runNonInteractive({
1405
- config: mockConfig,
1406
- settings: mockSettings,
1407
- input,
1408
- prompt_id: promptId,
1409
- });
1410
- }
1411
- catch {
1412
- // Expected exit
1413
- }
1414
- const output = getWrittenOutput();
1415
- const sanitizedOutput = output
1416
- .replace(/"timestamp":"[^"]+"/g, '"timestamp":"<TIMESTAMP>"')
1417
- .replace(/"duration_ms":\d+/g, '"duration_ms":<DURATION>');
1418
- expect(sanitizedOutput).toMatchSnapshot();
1419
- });
1420
- it.each([
1421
- {
1422
- name: 'loop detected',
1423
- events: [
1424
- { type: GeminiEventType.LoopDetected },
1425
- ],
1426
- expectedWarning: 'Loop detected, stopping execution',
1427
- },
1428
- ])('should include warning in JSON mode for: $name', async ({ events, expectedWarning }) => {
1429
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1430
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1431
- const streamEvents = [
1432
- ...events,
1433
- {
1434
- type: GeminiEventType.Finished,
1435
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1436
- },
1437
- ];
1438
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(streamEvents));
1439
- try {
1440
- await runNonInteractive({
1441
- config: mockConfig,
1442
- settings: mockSettings,
1443
- input: 'test',
1444
- prompt_id: 'test',
1445
- });
1446
- }
1447
- catch {
1448
- // Expected exit for max turns
1449
- }
1450
- const output = JSON.parse(getWrittenOutput());
1451
- expect(output.warnings).toBeDefined();
1452
- expect(output.warnings[0]).toContain(expectedWarning);
1453
- });
1454
- it('should log error when tool recording fails', async () => {
1455
- const toolCallEvent = {
1456
- type: GeminiEventType.ToolCallRequest,
1457
- value: {
1458
- callId: 'tool-1',
1459
- name: 'testTool',
1460
- args: {},
1461
- isClientInitiated: false,
1462
- prompt_id: 'prompt-id-tool-error',
1463
- },
1464
- };
1465
- mockSchedulerSchedule.mockResolvedValue([
1466
- {
1467
- status: CoreToolCallStatus.Success,
1468
- request: toolCallEvent.value,
1469
- tool: {},
1470
- invocation: {},
1471
- response: {
1472
- responseParts: [],
1473
- callId: 'tool-1',
1474
- error: undefined,
1475
- errorType: undefined,
1476
- contentLength: undefined,
1477
- },
1478
- },
1479
- ]);
1480
- const events = [
1481
- toolCallEvent,
1482
- { type: GeminiEventType.Content, value: 'Done' },
1483
- {
1484
- type: GeminiEventType.Finished,
1485
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1486
- },
1487
- ];
1488
- mockGeminiClient.sendMessageStream
1489
- .mockReturnValueOnce(createStreamFromEvents(events))
1490
- .mockReturnValueOnce(createStreamFromEvents([
1491
- { type: GeminiEventType.Content, value: 'Done' },
1492
- {
1493
- type: GeminiEventType.Finished,
1494
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1495
- },
1496
- ]));
1497
- // Mock getChat to throw when recording tool calls
1498
- const mockChat = {
1499
- recordCompletedToolCalls: vi.fn().mockImplementation(() => {
1500
- throw new Error('Recording failed');
1501
- }),
1502
- };
1503
- mockGeminiClient.getChat = vi.fn().mockReturnValue(mockChat);
1504
- mockGeminiClient.getCurrentSequenceModel = vi
1505
- .fn()
1506
- .mockReturnValue('model-1');
1507
- // Mock debugLogger.error
1508
- const { debugLogger } = await import('@google/gemini-cli-core');
1509
- const debugLoggerErrorSpy = vi
1510
- .spyOn(debugLogger, 'error')
1511
- .mockImplementation(() => { });
1512
- await runNonInteractive({
1513
- config: mockConfig,
1514
- settings: mockSettings,
1515
- input: 'Tool recording error test',
1516
- prompt_id: 'prompt-id-tool-error',
1517
- });
1518
- expect(debugLoggerErrorSpy).toHaveBeenCalledWith(expect.stringContaining('Error recording completed tool call information: Error: Recording failed'));
1519
- expect(getWrittenOutput()).toContain('Done');
1520
- });
1521
- it('should stop agent execution immediately when a tool call returns STOP_EXECUTION error', async () => {
1522
- const toolCallEvent = {
1523
- type: GeminiEventType.ToolCallRequest,
1524
- value: {
1525
- callId: 'stop-call',
1526
- name: 'stopTool',
1527
- args: {},
1528
- isClientInitiated: false,
1529
- prompt_id: 'prompt-id-stop',
1530
- },
1531
- };
1532
- // Mock tool execution returning STOP_EXECUTION
1533
- mockSchedulerSchedule.mockResolvedValue([
1534
- {
1535
- status: CoreToolCallStatus.Error,
1536
- request: toolCallEvent.value,
1537
- tool: {},
1538
- invocation: {},
1539
- response: {
1540
- callId: 'stop-call',
1541
- responseParts: [{ text: 'error occurred' }],
1542
- errorType: ToolErrorType.STOP_EXECUTION,
1543
- error: new Error('Stop reason from hook'),
1544
- resultDisplay: undefined,
1545
- },
1546
- },
1547
- ]);
1548
- const firstCallEvents = [
1549
- { type: GeminiEventType.Content, value: 'Executing tool...' },
1550
- toolCallEvent,
1551
- ];
1552
- // Setup the mock to return events for the first call.
1553
- // We expect the loop to terminate after the tool execution.
1554
- // If it doesn't, it might call sendMessageStream again, which we'll assert against.
1555
- mockGeminiClient.sendMessageStream
1556
- .mockReturnValueOnce(createStreamFromEvents(firstCallEvents))
1557
- .mockReturnValueOnce(createStreamFromEvents([]));
1558
- await runNonInteractive({
1559
- config: mockConfig,
1560
- settings: mockSettings,
1561
- input: 'Run stop tool',
1562
- prompt_id: 'prompt-id-stop',
1563
- });
1564
- expect(mockSchedulerSchedule).toHaveBeenCalled();
1565
- // The key assertion: sendMessageStream should have been called ONLY ONCE (initial user input).
1566
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(1);
1567
- expect(processStderrSpy).toHaveBeenCalledWith('Agent execution stopped: Stop reason from hook\n');
1568
- });
1569
- it('should write JSON output when a tool call returns STOP_EXECUTION error', async () => {
1570
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1571
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1572
- const toolCallEvent = {
1573
- type: GeminiEventType.ToolCallRequest,
1574
- value: {
1575
- callId: 'stop-call',
1576
- name: 'stopTool',
1577
- args: {},
1578
- isClientInitiated: false,
1579
- prompt_id: 'prompt-id-stop-json',
1580
- },
1581
- };
1582
- mockSchedulerSchedule.mockResolvedValue([
1583
- {
1584
- status: CoreToolCallStatus.Error,
1585
- request: toolCallEvent.value,
1586
- tool: {},
1587
- invocation: {},
1588
- response: {
1589
- callId: 'stop-call',
1590
- responseParts: [{ text: 'error occurred' }],
1591
- errorType: ToolErrorType.STOP_EXECUTION,
1592
- error: new Error('Stop reason'),
1593
- resultDisplay: undefined,
1594
- },
1595
- },
1596
- ]);
1597
- const firstCallEvents = [
1598
- { type: GeminiEventType.Content, value: 'Partial content' },
1599
- toolCallEvent,
1600
- ];
1601
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(firstCallEvents));
1602
- await runNonInteractive({
1603
- config: mockConfig,
1604
- settings: mockSettings,
1605
- input: 'Run stop tool',
1606
- prompt_id: 'prompt-id-stop-json',
1607
- });
1608
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
1609
- session_id: 'test-session-id',
1610
- response: 'Partial content',
1611
- stats: MOCK_SESSION_METRICS,
1612
- }, null, 2));
1613
- });
1614
- it('should emit result event when a tool call returns STOP_EXECUTION error in streaming JSON mode', async () => {
1615
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1616
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1617
- const toolCallEvent = {
1618
- type: GeminiEventType.ToolCallRequest,
1619
- value: {
1620
- callId: 'stop-call',
1621
- name: 'stopTool',
1622
- args: {},
1623
- isClientInitiated: false,
1624
- prompt_id: 'prompt-id-stop-stream',
1625
- },
1626
- };
1627
- mockSchedulerSchedule.mockResolvedValue([
1628
- {
1629
- status: CoreToolCallStatus.Error,
1630
- request: toolCallEvent.value,
1631
- tool: {},
1632
- invocation: {},
1633
- response: {
1634
- callId: 'stop-call',
1635
- responseParts: [{ text: 'error occurred' }],
1636
- errorType: ToolErrorType.STOP_EXECUTION,
1637
- error: new Error('Stop reason'),
1638
- resultDisplay: undefined,
1639
- },
1640
- },
1641
- ]);
1642
- const firstCallEvents = [toolCallEvent];
1643
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(firstCallEvents));
1644
- await runNonInteractive({
1645
- config: mockConfig,
1646
- settings: mockSettings,
1647
- input: 'Run stop tool',
1648
- prompt_id: 'prompt-id-stop-stream',
1649
- });
1650
- const output = getWrittenOutput();
1651
- expect(output).toContain('"type":"result"');
1652
- expect(output).toContain('"status":"success"');
1653
- });
1654
- describe('Agent Execution Events', () => {
1655
- it('should handle AgentExecutionStopped event', async () => {
1656
- const events = [
1657
- {
1658
- type: GeminiEventType.AgentExecutionStopped,
1659
- value: { reason: 'Stopped by hook' },
1660
- },
1661
- ];
1662
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1663
- await runNonInteractive({
1664
- config: mockConfig,
1665
- settings: mockSettings,
1666
- input: 'test stop',
1667
- prompt_id: 'prompt-id-stop',
1668
- });
1669
- expect(processStderrSpy).toHaveBeenCalledWith('Agent execution stopped: Stopped by hook\n');
1670
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(1);
1671
- });
1672
- it('should write JSON output when AgentExecutionStopped event occurs', async () => {
1673
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1674
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1675
- const events = [
1676
- { type: GeminiEventType.Content, value: 'Partial content' },
1677
- {
1678
- type: GeminiEventType.AgentExecutionStopped,
1679
- value: { reason: 'Stopped by hook' },
1680
- },
1681
- ];
1682
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1683
- await runNonInteractive({
1684
- config: mockConfig,
1685
- settings: mockSettings,
1686
- input: 'test stop',
1687
- prompt_id: 'prompt-id-stop-json',
1688
- });
1689
- expect(processStdoutSpy).toHaveBeenCalledWith(JSON.stringify({
1690
- session_id: 'test-session-id',
1691
- response: 'Partial content',
1692
- stats: MOCK_SESSION_METRICS,
1693
- }, null, 2));
1694
- });
1695
- it('should emit result event when AgentExecutionStopped event occurs in streaming JSON mode', async () => {
1696
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1697
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1698
- const events = [
1699
- { type: GeminiEventType.Content, value: 'Partial content' },
1700
- {
1701
- type: GeminiEventType.AgentExecutionStopped,
1702
- value: { reason: 'Stopped by hook' },
1703
- },
1704
- ];
1705
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1706
- await runNonInteractive({
1707
- config: mockConfig,
1708
- settings: mockSettings,
1709
- input: 'test stop',
1710
- prompt_id: 'prompt-id-stop-stream',
1711
- });
1712
- const output = getWrittenOutput();
1713
- expect(output).toContain('"type":"result"');
1714
- expect(output).toContain('"status":"success"');
1715
- });
1716
- it('should handle AgentExecutionBlocked event', async () => {
1717
- const allEvents = [
1718
- {
1719
- type: GeminiEventType.AgentExecutionBlocked,
1720
- value: { reason: 'Blocked by hook' },
1721
- },
1722
- { type: GeminiEventType.Content, value: 'Final answer' },
1723
- {
1724
- type: GeminiEventType.Finished,
1725
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1726
- },
1727
- ];
1728
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(allEvents));
1729
- await runNonInteractive({
1730
- config: mockConfig,
1731
- settings: mockSettings,
1732
- input: 'test block',
1733
- prompt_id: 'prompt-id-block',
1734
- });
1735
- expect(processStderrSpy).toHaveBeenCalledWith('[WARNING] Agent execution blocked: Blocked by hook\n');
1736
- // Stream continues after blocked event — content should be output
1737
- expect(getWrittenOutput()).toBe('Final answer\n');
1738
- expect(mockGeminiClient.sendMessageStream).toHaveBeenCalledTimes(1);
1739
- });
1740
- it('should emit ERROR event in STREAM_JSON mode when AgentExecutionBlocked occurs', async () => {
1741
- const allEvents = [
1742
- {
1743
- type: GeminiEventType.AgentExecutionBlocked,
1744
- value: { reason: 'Blocked by hook' },
1745
- },
1746
- { type: GeminiEventType.Content, value: 'Final answer' },
1747
- {
1748
- type: GeminiEventType.Finished,
1749
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1750
- },
1751
- ];
1752
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(allEvents));
1753
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1754
- // Setup stream-json format
1755
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1756
- await runNonInteractive({
1757
- config: mockConfig,
1758
- settings: mockSettings,
1759
- input: 'test block',
1760
- prompt_id: 'prompt-id-block',
1761
- });
1762
- const calls = processStdoutSpy.mock.calls.map((call) => JSON.parse(call[0]));
1763
- const errorEvent = calls.find((c) => c.type === JsonStreamEventType.ERROR);
1764
- expect(errorEvent).toBeDefined();
1765
- expect(errorEvent.message).toContain('Agent execution blocked: Blocked by hook');
1766
- expect(errorEvent.severity).toBe('warning');
1767
- });
1768
- it('should include warning in JSON mode when AgentExecutionBlocked occurs', async () => {
1769
- const allEvents = [
1770
- {
1771
- type: GeminiEventType.AgentExecutionBlocked,
1772
- value: { reason: 'Blocked by hook' },
1773
- },
1774
- { type: GeminiEventType.Content, value: 'Final answer' },
1775
- {
1776
- type: GeminiEventType.Finished,
1777
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1778
- },
1779
- ];
1780
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(allEvents));
1781
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1782
- await runNonInteractive({
1783
- config: mockConfig,
1784
- settings: mockSettings,
1785
- input: 'test block',
1786
- prompt_id: 'prompt-id-block',
1787
- });
1788
- const output = JSON.parse(getWrittenOutput());
1789
- expect(output.warnings).toBeDefined();
1790
- expect(output.warnings).toContain('Agent execution blocked: Blocked by hook');
1791
- });
1792
- it('should handle multiple AgentExecutionBlocked events and collect all warnings', async () => {
1793
- const allEvents = [
1794
- {
1795
- type: GeminiEventType.AgentExecutionBlocked,
1796
- value: { reason: 'Block 1', systemMessage: 'Reason 1' },
1797
- },
1798
- {
1799
- type: GeminiEventType.AgentExecutionBlocked,
1800
- value: { reason: 'Block 2', systemMessage: 'Reason 2' },
1801
- },
1802
- { type: GeminiEventType.Content, value: 'Final answer' },
1803
- {
1804
- type: GeminiEventType.Finished,
1805
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1806
- },
1807
- ];
1808
- mockGeminiClient.sendMessageStream.mockImplementation(() => createStreamFromEvents(allEvents));
1809
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1810
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1811
- await runNonInteractive({
1812
- config: mockConfig,
1813
- settings: mockSettings,
1814
- input: 'test',
1815
- prompt_id: 'test',
1816
- });
1817
- const output = JSON.parse(getWrittenOutput());
1818
- expect(output.warnings).toHaveLength(2);
1819
- expect(output.warnings).toContain('Agent execution blocked: Reason 1');
1820
- expect(output.warnings).toContain('Agent execution blocked: Reason 2');
1821
- });
1822
- it('should not include warnings field in JSON output if no blocks occur', async () => {
1823
- const allEvents = [
1824
- { type: GeminiEventType.Content, value: 'Clean answer' },
1825
- {
1826
- type: GeminiEventType.Finished,
1827
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1828
- },
1829
- ];
1830
- mockGeminiClient.sendMessageStream.mockImplementation(() => createStreamFromEvents(allEvents));
1831
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1832
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.JSON);
1833
- await runNonInteractive({
1834
- config: mockConfig,
1835
- settings: mockSettings,
1836
- input: 'test',
1837
- prompt_id: 'test',
1838
- });
1839
- const output = JSON.parse(getWrittenOutput());
1840
- expect(output.warnings).toBeUndefined();
1841
- });
1842
- });
1843
- describe('Output Sanitization', () => {
1844
- const ANSI_SEQUENCE = '\u001B[31mRed Text\u001B[0m';
1845
- const OSC_HYPERLINK = '\u001B]8;;http://example.com\u001B\\Link\u001B]8;;\u001B\\';
1846
- const PLAIN_TEXT_RED = 'Red Text';
1847
- const PLAIN_TEXT_LINK = 'Link';
1848
- it('should sanitize ANSI output by default', async () => {
1849
- const events = [
1850
- { type: GeminiEventType.Content, value: ANSI_SEQUENCE },
1851
- { type: GeminiEventType.Content, value: ' ' },
1852
- { type: GeminiEventType.Content, value: OSC_HYPERLINK },
1853
- {
1854
- type: GeminiEventType.Finished,
1855
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1856
- },
1857
- ];
1858
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1859
- vi.mocked(mockConfig.getRawOutput).mockReturnValue(false);
1860
- await runNonInteractive({
1861
- config: mockConfig,
1862
- settings: mockSettings,
1863
- input: 'Test input',
1864
- prompt_id: 'prompt-id-sanitization',
1865
- });
1866
- expect(getWrittenOutput()).toBe(`${PLAIN_TEXT_RED} ${PLAIN_TEXT_LINK}\n`);
1867
- });
1868
- it('should allow ANSI output when rawOutput is true', async () => {
1869
- const events = [
1870
- { type: GeminiEventType.Content, value: ANSI_SEQUENCE },
1871
- { type: GeminiEventType.Content, value: ' ' },
1872
- { type: GeminiEventType.Content, value: OSC_HYPERLINK },
1873
- {
1874
- type: GeminiEventType.Finished,
1875
- value: { reason: undefined, usageMetadata: { totalTokenCount: 10 } },
1876
- },
1877
- ];
1878
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1879
- vi.mocked(mockConfig.getRawOutput).mockReturnValue(true);
1880
- vi.mocked(mockConfig.getAcceptRawOutputRisk).mockReturnValue(true);
1881
- await runNonInteractive({
1882
- config: mockConfig,
1883
- settings: mockSettings,
1884
- input: 'Test input',
1885
- prompt_id: 'prompt-id-raw',
1886
- });
1887
- expect(getWrittenOutput()).toBe(`${ANSI_SEQUENCE} ${OSC_HYPERLINK}\n`);
1888
- });
1889
- it('should allow ANSI output when only acceptRawOutputRisk is true', async () => {
1890
- const events = [
1891
- { type: GeminiEventType.Content, value: ANSI_SEQUENCE },
1892
- {
1893
- type: GeminiEventType.Finished,
1894
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1895
- },
1896
- ];
1897
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1898
- vi.mocked(mockConfig.getRawOutput).mockReturnValue(false);
1899
- vi.mocked(mockConfig.getAcceptRawOutputRisk).mockReturnValue(true);
1900
- await runNonInteractive({
1901
- config: mockConfig,
1902
- settings: mockSettings,
1903
- input: 'Test input',
1904
- prompt_id: 'prompt-id-accept-only',
1905
- });
1906
- expect(getWrittenOutput()).toBe(`${ANSI_SEQUENCE}\n`);
1907
- });
1908
- it('should warn when rawOutput is true and acceptRisk is false', async () => {
1909
- const events = [
1910
- {
1911
- type: GeminiEventType.Finished,
1912
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1913
- },
1914
- ];
1915
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1916
- vi.mocked(mockConfig.getRawOutput).mockReturnValue(true);
1917
- vi.mocked(mockConfig.getAcceptRawOutputRisk).mockReturnValue(false);
1918
- await runNonInteractive({
1919
- config: mockConfig,
1920
- settings: mockSettings,
1921
- input: 'Test input',
1922
- prompt_id: 'prompt-id-warn',
1923
- });
1924
- expect(processStderrSpy).toHaveBeenCalledWith(expect.stringContaining('[WARNING] --raw-output is enabled'));
1925
- });
1926
- it('should not warn when rawOutput is true and acceptRisk is true', async () => {
1927
- const events = [
1928
- {
1929
- type: GeminiEventType.Finished,
1930
- value: { reason: undefined, usageMetadata: { totalTokenCount: 0 } },
1931
- },
1932
- ];
1933
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
1934
- vi.mocked(mockConfig.getRawOutput).mockReturnValue(true);
1935
- vi.mocked(mockConfig.getAcceptRawOutputRisk).mockReturnValue(true);
1936
- await runNonInteractive({
1937
- config: mockConfig,
1938
- settings: mockSettings,
1939
- input: 'Test input',
1940
- prompt_id: 'prompt-id-no-warn',
1941
- });
1942
- expect(processStderrSpy).not.toHaveBeenCalledWith(expect.stringContaining('[WARNING] --raw-output is enabled'));
1943
- });
1944
- it('should emit warning event for loop_detected in streaming JSON mode', async () => {
1945
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
1946
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
1947
- const streamEvents = [
1948
- { type: GeminiEventType.LoopDetected },
1949
- { type: GeminiEventType.Content, value: 'Continuing after loop' },
1950
- {
1951
- type: GeminiEventType.Finished,
1952
- value: { reason: undefined, usageMetadata: { totalTokenCount: 5 } },
1953
- },
1954
- ];
1955
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(streamEvents));
1956
- await runNonInteractive({
1957
- config: mockConfig,
1958
- settings: mockSettings,
1959
- input: 'Loop test explicit',
1960
- prompt_id: 'prompt-id-loop-explicit',
1961
- });
1962
- const output = getWrittenOutput();
1963
- // The STREAM_JSON output should contain an error event with warning severity
1964
- expect(output).toContain('"type":"error"');
1965
- expect(output).toContain('"severity":"warning"');
1966
- expect(output).toContain('Loop detected');
1967
- });
1968
- it('should report cancelled tool calls as success in stream-json mode (legacy parity)', async () => {
1969
- const toolCallEvent = {
1970
- type: GeminiEventType.ToolCallRequest,
1971
- value: {
1972
- callId: 'tool-1',
1973
- name: 'testTool',
1974
- args: { arg1: 'value1' },
1975
- isClientInitiated: false,
1976
- prompt_id: 'prompt-id-cancel',
1977
- },
1978
- };
1979
- // Mock the scheduler to return a cancelled status
1980
- mockSchedulerSchedule.mockResolvedValue([
1981
- {
1982
- status: CoreToolCallStatus.Cancelled,
1983
- request: toolCallEvent.value,
1984
- tool: {},
1985
- invocation: {},
1986
- response: {
1987
- callId: 'tool-1',
1988
- responseParts: [{ text: 'Operation cancelled' }],
1989
- resultDisplay: 'Cancelled',
1990
- },
1991
- },
1992
- ]);
1993
- const events = [
1994
- toolCallEvent,
1995
- {
1996
- type: GeminiEventType.Content,
1997
- value: 'Model continues...',
1998
- },
1999
- ];
2000
- mockGeminiClient.sendMessageStream.mockReturnValue(createStreamFromEvents(events));
2001
- vi.mocked(mockConfig.getOutputFormat).mockReturnValue(OutputFormat.STREAM_JSON);
2002
- vi.spyOn(uiTelemetryService, 'getMetrics').mockReturnValue(MOCK_SESSION_METRICS);
2003
- await runNonInteractive({
2004
- config: mockConfig,
2005
- settings: mockSettings,
2006
- input: 'Test input',
2007
- prompt_id: 'prompt-id-cancel',
2008
- });
2009
- const output = getWrittenOutput();
2010
- expect(output).toContain('"type":"tool_result"');
2011
- expect(output).toContain('"status":"success"');
2012
- });
2013
- });
2014
- });
2015
- //# sourceMappingURL=nonInteractiveCliAgentSession.test.js.map