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