@quantum-ai/gemini-cli 0.45.4 → 0.45.5
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 +12 -11
- package/dist/src/config/settingsSchema.d.ts +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/ui/App.d.ts +1 -1
- package/dist/src/ui/AppContainer.d.ts +1 -1
- package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
- package/dist/src/ui/auth/LoginRestartDialog.d.ts +1 -1
- package/dist/src/ui/components/AdminSettingsChangedDialog.d.ts +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/BackgroundTaskDisplay.d.ts +1 -1
- package/dist/src/ui/components/Banner.d.ts +1 -1
- package/dist/src/ui/components/CliSpinner.d.ts +1 -1
- package/dist/src/ui/components/Composer.d.ts +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +1 -1
- package/dist/src/ui/components/ConsentPrompt.d.ts +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
- package/dist/src/ui/components/DebugProfiler.d.ts +1 -1
- package/dist/src/ui/components/DialogManager.d.ts +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +1 -1
- package/dist/src/ui/components/MainContent.d.ts +1 -1
- package/dist/src/ui/components/ModelQuotaDisplay.d.ts +1 -1
- package/dist/src/ui/components/NewAgentsNotification.d.ts +1 -1
- package/dist/src/ui/components/Notifications.d.ts +1 -1
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +1 -1
- package/dist/src/ui/components/QuittingDisplay.d.ts +1 -1
- package/dist/src/ui/components/ShowMoreLines.d.ts +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -1
- package/dist/src/ui/components/Table.d.ts +1 -1
- package/dist/src/ui/components/UpdateNotification.d.ts +1 -1
- package/dist/src/ui/components/shared/SlicingMaxSizedBox.d.ts +1 -1
- package/dist/src/ui/components/triage/TriageDuplicates.d.ts +1 -1
- package/dist/src/ui/components/triage/TriageIssues.d.ts +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
- package/dist/src/ui/contexts/MouseContext.d.ts +1 -1
- package/dist/src/ui/contexts/TerminalContext.d.ts +1 -1
- package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +2 -2
- package/dist/src/ui/hooks/useInlineEditBuffer.d.ts +1 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
- package/dist/src/utils/devtoolsService.js +1 -1
- package/dist/src/utils/devtoolsService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -11
- 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,2156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
7
|
-
import { act } from 'react';
|
|
8
|
-
import { renderHook } from '../../test-utils/render.js';
|
|
9
|
-
import { waitFor } from '../../test-utils/async.js';
|
|
10
|
-
import { useVim } from './vim.js';
|
|
11
|
-
import { textBufferReducer, } from '../components/shared/text-buffer.js';
|
|
12
|
-
// Mock the VimModeContext
|
|
13
|
-
const mockVimContext = {
|
|
14
|
-
vimEnabled: true,
|
|
15
|
-
vimMode: 'INSERT',
|
|
16
|
-
toggleVimEnabled: vi.fn(),
|
|
17
|
-
setVimMode: vi.fn(),
|
|
18
|
-
};
|
|
19
|
-
vi.mock('../contexts/VimModeContext.js', () => ({
|
|
20
|
-
useVimMode: () => mockVimContext,
|
|
21
|
-
VimModeProvider: ({ children }) => children,
|
|
22
|
-
}));
|
|
23
|
-
// Helper to create a full Key object from partial data
|
|
24
|
-
const createKey = (partial) => ({
|
|
25
|
-
name: partial.name || '',
|
|
26
|
-
sequence: partial.sequence || '',
|
|
27
|
-
shift: partial.shift || false,
|
|
28
|
-
alt: partial.alt || false,
|
|
29
|
-
ctrl: partial.ctrl || false,
|
|
30
|
-
cmd: partial.cmd || false,
|
|
31
|
-
insertable: partial.insertable || false,
|
|
32
|
-
...partial,
|
|
33
|
-
});
|
|
34
|
-
const createMockTextBufferState = (partial) => {
|
|
35
|
-
const lines = partial.lines || [''];
|
|
36
|
-
return {
|
|
37
|
-
lines,
|
|
38
|
-
cursorRow: 0,
|
|
39
|
-
cursorCol: 0,
|
|
40
|
-
preferredCol: null,
|
|
41
|
-
undoStack: [],
|
|
42
|
-
redoStack: [],
|
|
43
|
-
clipboard: null,
|
|
44
|
-
selectionAnchor: null,
|
|
45
|
-
viewportWidth: 80,
|
|
46
|
-
viewportHeight: 24,
|
|
47
|
-
transformationsByLine: lines.map(() => []),
|
|
48
|
-
visualLayout: {
|
|
49
|
-
visualLines: lines,
|
|
50
|
-
logicalToVisualMap: lines.map((_, i) => [[i, 0]]),
|
|
51
|
-
visualToLogicalMap: lines.map((_, i) => [i, 0]),
|
|
52
|
-
transformedToLogicalMaps: lines.map(() => []),
|
|
53
|
-
visualToTransformedMap: [],
|
|
54
|
-
},
|
|
55
|
-
pastedContent: {},
|
|
56
|
-
expandedPaste: null,
|
|
57
|
-
yankRegister: null,
|
|
58
|
-
...partial,
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
// Test constants
|
|
62
|
-
const TEST_SEQUENCES = {
|
|
63
|
-
ESCAPE: createKey({ sequence: '\u001b', name: 'escape' }),
|
|
64
|
-
LEFT: createKey({ sequence: 'h' }),
|
|
65
|
-
RIGHT: createKey({ sequence: 'l' }),
|
|
66
|
-
UP: createKey({ sequence: 'k' }),
|
|
67
|
-
DOWN: createKey({ sequence: 'j' }),
|
|
68
|
-
INSERT: createKey({ sequence: 'i' }),
|
|
69
|
-
APPEND: createKey({ sequence: 'a' }),
|
|
70
|
-
DELETE_CHAR: createKey({ sequence: 'x' }),
|
|
71
|
-
DELETE: createKey({ sequence: 'd' }),
|
|
72
|
-
CHANGE: createKey({ sequence: 'c' }),
|
|
73
|
-
WORD_FORWARD: createKey({ sequence: 'w' }),
|
|
74
|
-
WORD_BACKWARD: createKey({ sequence: 'b' }),
|
|
75
|
-
WORD_END: createKey({ sequence: 'e' }),
|
|
76
|
-
LINE_START: createKey({ sequence: '0' }),
|
|
77
|
-
LINE_END: createKey({ sequence: '$' }),
|
|
78
|
-
REPEAT: createKey({ sequence: '.' }),
|
|
79
|
-
CTRL_C: createKey({ sequence: '\x03', name: 'c', ctrl: true }),
|
|
80
|
-
CTRL_X: createKey({ sequence: '\x18', name: 'x', ctrl: true }),
|
|
81
|
-
F12: createKey({ sequence: '\u001b[24~', name: 'f12' }),
|
|
82
|
-
};
|
|
83
|
-
describe('useVim hook', async () => {
|
|
84
|
-
let mockBuffer;
|
|
85
|
-
let mockHandleFinalSubmit;
|
|
86
|
-
const createMockBuffer = (text = 'hello world', cursor = [0, 5]) => {
|
|
87
|
-
const cursorState = { pos: cursor };
|
|
88
|
-
const lines = text.split('\n');
|
|
89
|
-
return {
|
|
90
|
-
lines,
|
|
91
|
-
get cursor() {
|
|
92
|
-
return cursorState.pos;
|
|
93
|
-
},
|
|
94
|
-
set cursor(newPos) {
|
|
95
|
-
cursorState.pos = newPos;
|
|
96
|
-
},
|
|
97
|
-
text,
|
|
98
|
-
move: vi.fn().mockImplementation((direction) => {
|
|
99
|
-
let [row, col] = cursorState.pos;
|
|
100
|
-
const line = lines[row] || '';
|
|
101
|
-
if (direction === 'left') {
|
|
102
|
-
col = Math.max(0, col - 1);
|
|
103
|
-
}
|
|
104
|
-
else if (direction === 'right') {
|
|
105
|
-
col = Math.min(line.length, col + 1);
|
|
106
|
-
}
|
|
107
|
-
else if (direction === 'home') {
|
|
108
|
-
col = 0;
|
|
109
|
-
}
|
|
110
|
-
else if (direction === 'end') {
|
|
111
|
-
col = line.length;
|
|
112
|
-
}
|
|
113
|
-
cursorState.pos = [row, col];
|
|
114
|
-
}),
|
|
115
|
-
del: vi.fn(),
|
|
116
|
-
moveToOffset: vi.fn(),
|
|
117
|
-
insert: vi.fn(),
|
|
118
|
-
newline: vi.fn(),
|
|
119
|
-
replaceRangeByOffset: vi.fn(),
|
|
120
|
-
handleInput: vi.fn(),
|
|
121
|
-
setText: vi.fn(),
|
|
122
|
-
openInExternalEditor: vi.fn(),
|
|
123
|
-
// Vim-specific methods
|
|
124
|
-
vimDeleteWordForward: vi.fn(),
|
|
125
|
-
vimDeleteWordBackward: vi.fn(),
|
|
126
|
-
vimDeleteWordEnd: vi.fn(),
|
|
127
|
-
vimChangeWordForward: vi.fn(),
|
|
128
|
-
vimChangeWordBackward: vi.fn(),
|
|
129
|
-
vimChangeWordEnd: vi.fn(),
|
|
130
|
-
vimDeleteLine: vi.fn(),
|
|
131
|
-
vimChangeLine: vi.fn(),
|
|
132
|
-
vimDeleteToEndOfLine: vi.fn(),
|
|
133
|
-
vimChangeToEndOfLine: vi.fn(),
|
|
134
|
-
vimChangeMovement: vi.fn(),
|
|
135
|
-
vimMoveLeft: vi.fn(),
|
|
136
|
-
vimMoveRight: vi.fn(),
|
|
137
|
-
vimMoveUp: vi.fn(),
|
|
138
|
-
vimMoveDown: vi.fn(),
|
|
139
|
-
vimMoveWordForward: vi.fn(),
|
|
140
|
-
vimMoveWordBackward: vi.fn(),
|
|
141
|
-
vimMoveWordEnd: vi.fn(),
|
|
142
|
-
vimMoveBigWordForward: vi.fn(),
|
|
143
|
-
vimMoveBigWordBackward: vi.fn(),
|
|
144
|
-
vimMoveBigWordEnd: vi.fn(),
|
|
145
|
-
vimDeleteBigWordForward: vi.fn(),
|
|
146
|
-
vimDeleteBigWordBackward: vi.fn(),
|
|
147
|
-
vimDeleteBigWordEnd: vi.fn(),
|
|
148
|
-
vimChangeBigWordForward: vi.fn(),
|
|
149
|
-
vimChangeBigWordBackward: vi.fn(),
|
|
150
|
-
vimChangeBigWordEnd: vi.fn(),
|
|
151
|
-
vimDeleteChar: vi.fn(),
|
|
152
|
-
vimDeleteCharBefore: vi.fn(),
|
|
153
|
-
vimToggleCase: vi.fn(),
|
|
154
|
-
vimReplaceChar: vi.fn(),
|
|
155
|
-
vimFindCharForward: vi.fn(),
|
|
156
|
-
vimFindCharBackward: vi.fn(),
|
|
157
|
-
vimDeleteToCharForward: vi.fn(),
|
|
158
|
-
vimDeleteToCharBackward: vi.fn(),
|
|
159
|
-
vimInsertAtCursor: vi.fn(),
|
|
160
|
-
vimAppendAtCursor: vi.fn().mockImplementation(() => {
|
|
161
|
-
// Append moves cursor right (vim 'a' behavior - position after current char)
|
|
162
|
-
const [row, col] = cursorState.pos;
|
|
163
|
-
// In vim, 'a' moves cursor to position after current character
|
|
164
|
-
// This allows inserting at the end of the line
|
|
165
|
-
cursorState.pos = [row, col + 1];
|
|
166
|
-
}),
|
|
167
|
-
vimOpenLineBelow: vi.fn(),
|
|
168
|
-
vimOpenLineAbove: vi.fn(),
|
|
169
|
-
vimAppendAtLineEnd: vi.fn(),
|
|
170
|
-
vimInsertAtLineStart: vi.fn(),
|
|
171
|
-
vimMoveToLineStart: vi.fn(),
|
|
172
|
-
vimMoveToLineEnd: vi.fn(),
|
|
173
|
-
vimMoveToFirstNonWhitespace: vi.fn(),
|
|
174
|
-
vimMoveToFirstLine: vi.fn(),
|
|
175
|
-
vimMoveToLastLine: vi.fn(),
|
|
176
|
-
vimMoveToLine: vi.fn(),
|
|
177
|
-
vimEscapeInsertMode: vi.fn().mockImplementation(() => {
|
|
178
|
-
// Escape moves cursor left unless at beginning of line
|
|
179
|
-
const [row, col] = cursorState.pos;
|
|
180
|
-
if (col > 0) {
|
|
181
|
-
cursorState.pos = [row, col - 1];
|
|
182
|
-
}
|
|
183
|
-
}),
|
|
184
|
-
vimYankLine: vi.fn(),
|
|
185
|
-
vimYankWordForward: vi.fn(),
|
|
186
|
-
vimYankBigWordForward: vi.fn(),
|
|
187
|
-
vimYankWordEnd: vi.fn(),
|
|
188
|
-
vimYankBigWordEnd: vi.fn(),
|
|
189
|
-
vimYankToEndOfLine: vi.fn(),
|
|
190
|
-
vimPasteAfter: vi.fn(),
|
|
191
|
-
vimPasteBefore: vi.fn(),
|
|
192
|
-
// Additional properties for transformations
|
|
193
|
-
transformedToLogicalMaps: lines.map(() => []),
|
|
194
|
-
visualToTransformedMap: [],
|
|
195
|
-
transformationsByLine: lines.map(() => []),
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
const renderVimHook = async (buffer) => renderHook(() => useVim((buffer || mockBuffer), mockHandleFinalSubmit));
|
|
199
|
-
const exitInsertMode = (result) => {
|
|
200
|
-
act(() => {
|
|
201
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
beforeEach(() => {
|
|
205
|
-
vi.clearAllMocks();
|
|
206
|
-
mockHandleFinalSubmit = vi.fn();
|
|
207
|
-
mockBuffer = createMockBuffer();
|
|
208
|
-
// Reset mock context to default state
|
|
209
|
-
mockVimContext.vimEnabled = true;
|
|
210
|
-
mockVimContext.vimMode = 'INSERT';
|
|
211
|
-
mockVimContext.toggleVimEnabled.mockClear();
|
|
212
|
-
mockVimContext.setVimMode.mockClear();
|
|
213
|
-
});
|
|
214
|
-
describe('Mode switching', async () => {
|
|
215
|
-
it('should start in INSERT mode', async () => {
|
|
216
|
-
const { result } = await renderVimHook();
|
|
217
|
-
expect(result.current.mode).toBe('INSERT');
|
|
218
|
-
});
|
|
219
|
-
it('should switch to INSERT mode with i command', async () => {
|
|
220
|
-
const { result } = await renderVimHook();
|
|
221
|
-
exitInsertMode(result);
|
|
222
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
223
|
-
act(() => {
|
|
224
|
-
result.current.handleInput(TEST_SEQUENCES.INSERT);
|
|
225
|
-
});
|
|
226
|
-
expect(result.current.mode).toBe('INSERT');
|
|
227
|
-
expect(mockVimContext.setVimMode).toHaveBeenCalledWith('INSERT');
|
|
228
|
-
});
|
|
229
|
-
it('should switch back to NORMAL mode with Escape', async () => {
|
|
230
|
-
const { result } = await renderVimHook();
|
|
231
|
-
act(() => {
|
|
232
|
-
result.current.handleInput(TEST_SEQUENCES.INSERT);
|
|
233
|
-
});
|
|
234
|
-
expect(result.current.mode).toBe('INSERT');
|
|
235
|
-
exitInsertMode(result);
|
|
236
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
237
|
-
});
|
|
238
|
-
it('should properly handle escape followed immediately by a command', async () => {
|
|
239
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
240
|
-
const { result } = await renderVimHook(testBuffer);
|
|
241
|
-
act(() => {
|
|
242
|
-
result.current.handleInput(createKey({ sequence: 'i' }));
|
|
243
|
-
});
|
|
244
|
-
expect(result.current.mode).toBe('INSERT');
|
|
245
|
-
vi.clearAllMocks();
|
|
246
|
-
exitInsertMode(result);
|
|
247
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
248
|
-
act(() => {
|
|
249
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
250
|
-
});
|
|
251
|
-
expect(testBuffer.vimMoveWordBackward).toHaveBeenCalledWith(1);
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
describe('Navigation commands', async () => {
|
|
255
|
-
it('should handle h (left movement)', async () => {
|
|
256
|
-
const { result } = await renderVimHook();
|
|
257
|
-
exitInsertMode(result);
|
|
258
|
-
act(() => {
|
|
259
|
-
result.current.handleInput(createKey({ sequence: 'h' }));
|
|
260
|
-
});
|
|
261
|
-
expect(mockBuffer.vimMoveLeft).toHaveBeenCalledWith(1);
|
|
262
|
-
});
|
|
263
|
-
it('should handle l (right movement)', async () => {
|
|
264
|
-
const { result } = await renderVimHook();
|
|
265
|
-
exitInsertMode(result);
|
|
266
|
-
act(() => {
|
|
267
|
-
result.current.handleInput(createKey({ sequence: 'l' }));
|
|
268
|
-
});
|
|
269
|
-
expect(mockBuffer.vimMoveRight).toHaveBeenCalledWith(1);
|
|
270
|
-
});
|
|
271
|
-
it('should handle j (down movement)', async () => {
|
|
272
|
-
const testBuffer = createMockBuffer('first line\nsecond line');
|
|
273
|
-
const { result } = await renderVimHook(testBuffer);
|
|
274
|
-
exitInsertMode(result);
|
|
275
|
-
act(() => {
|
|
276
|
-
result.current.handleInput(createKey({ sequence: 'j' }));
|
|
277
|
-
});
|
|
278
|
-
expect(testBuffer.vimMoveDown).toHaveBeenCalledWith(1);
|
|
279
|
-
});
|
|
280
|
-
it('should handle k (up movement)', async () => {
|
|
281
|
-
const testBuffer = createMockBuffer('first line\nsecond line');
|
|
282
|
-
const { result } = await renderVimHook(testBuffer);
|
|
283
|
-
exitInsertMode(result);
|
|
284
|
-
act(() => {
|
|
285
|
-
result.current.handleInput(createKey({ sequence: 'k' }));
|
|
286
|
-
});
|
|
287
|
-
expect(testBuffer.vimMoveUp).toHaveBeenCalledWith(1);
|
|
288
|
-
});
|
|
289
|
-
it('should handle 0 (move to start of line)', async () => {
|
|
290
|
-
const { result } = await renderVimHook();
|
|
291
|
-
exitInsertMode(result);
|
|
292
|
-
act(() => {
|
|
293
|
-
result.current.handleInput(createKey({ sequence: '0' }));
|
|
294
|
-
});
|
|
295
|
-
expect(mockBuffer.vimMoveToLineStart).toHaveBeenCalled();
|
|
296
|
-
});
|
|
297
|
-
it('should handle $ (move to end of line)', async () => {
|
|
298
|
-
const { result } = await renderVimHook();
|
|
299
|
-
exitInsertMode(result);
|
|
300
|
-
act(() => {
|
|
301
|
-
result.current.handleInput(createKey({ sequence: '$' }));
|
|
302
|
-
});
|
|
303
|
-
expect(mockBuffer.vimMoveToLineEnd).toHaveBeenCalled();
|
|
304
|
-
});
|
|
305
|
-
});
|
|
306
|
-
describe('Mode switching commands', async () => {
|
|
307
|
-
it('should handle a (append after cursor)', async () => {
|
|
308
|
-
const { result } = await renderVimHook();
|
|
309
|
-
exitInsertMode(result);
|
|
310
|
-
act(() => {
|
|
311
|
-
result.current.handleInput(createKey({ sequence: 'a' }));
|
|
312
|
-
});
|
|
313
|
-
expect(mockBuffer.vimAppendAtCursor).toHaveBeenCalled();
|
|
314
|
-
expect(result.current.mode).toBe('INSERT');
|
|
315
|
-
});
|
|
316
|
-
it('should handle A (append at end of line)', async () => {
|
|
317
|
-
const { result } = await renderVimHook();
|
|
318
|
-
exitInsertMode(result);
|
|
319
|
-
act(() => {
|
|
320
|
-
result.current.handleInput(createKey({ sequence: 'A' }));
|
|
321
|
-
});
|
|
322
|
-
expect(mockBuffer.vimAppendAtLineEnd).toHaveBeenCalled();
|
|
323
|
-
expect(result.current.mode).toBe('INSERT');
|
|
324
|
-
});
|
|
325
|
-
it('should handle o (open line below)', async () => {
|
|
326
|
-
const { result } = await renderVimHook();
|
|
327
|
-
exitInsertMode(result);
|
|
328
|
-
act(() => {
|
|
329
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
330
|
-
});
|
|
331
|
-
expect(mockBuffer.vimOpenLineBelow).toHaveBeenCalled();
|
|
332
|
-
expect(result.current.mode).toBe('INSERT');
|
|
333
|
-
});
|
|
334
|
-
it('should handle O (open line above)', async () => {
|
|
335
|
-
const { result } = await renderVimHook();
|
|
336
|
-
exitInsertMode(result);
|
|
337
|
-
act(() => {
|
|
338
|
-
result.current.handleInput(createKey({ sequence: 'O' }));
|
|
339
|
-
});
|
|
340
|
-
expect(mockBuffer.vimOpenLineAbove).toHaveBeenCalled();
|
|
341
|
-
expect(result.current.mode).toBe('INSERT');
|
|
342
|
-
});
|
|
343
|
-
});
|
|
344
|
-
describe('Edit commands', async () => {
|
|
345
|
-
it('should handle x (delete character)', async () => {
|
|
346
|
-
const { result } = await renderVimHook();
|
|
347
|
-
exitInsertMode(result);
|
|
348
|
-
vi.clearAllMocks();
|
|
349
|
-
act(() => {
|
|
350
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
351
|
-
});
|
|
352
|
-
expect(mockBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
353
|
-
});
|
|
354
|
-
it('should move cursor left when deleting last character on line (vim behavior)', async () => {
|
|
355
|
-
const testBuffer = createMockBuffer('hello', [0, 4]);
|
|
356
|
-
const { result } = await renderVimHook(testBuffer);
|
|
357
|
-
exitInsertMode(result);
|
|
358
|
-
act(() => {
|
|
359
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
360
|
-
});
|
|
361
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
362
|
-
});
|
|
363
|
-
it('should handle first d key (sets pending state)', async () => {
|
|
364
|
-
const { result } = await renderVimHook();
|
|
365
|
-
exitInsertMode(result);
|
|
366
|
-
act(() => {
|
|
367
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
368
|
-
});
|
|
369
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
describe('Count handling', async () => {
|
|
373
|
-
it('should handle count input and return to count 0 after command', async () => {
|
|
374
|
-
const { result } = await renderVimHook();
|
|
375
|
-
exitInsertMode(result);
|
|
376
|
-
act(() => {
|
|
377
|
-
const handled = result.current.handleInput(createKey({ sequence: '3' }));
|
|
378
|
-
expect(handled).toBe(true);
|
|
379
|
-
});
|
|
380
|
-
act(() => {
|
|
381
|
-
const handled = result.current.handleInput(createKey({ sequence: 'h' }));
|
|
382
|
-
expect(handled).toBe(true);
|
|
383
|
-
});
|
|
384
|
-
expect(mockBuffer.vimMoveLeft).toHaveBeenCalledWith(3);
|
|
385
|
-
});
|
|
386
|
-
it('should only delete 1 character with x command when no count is specified', async () => {
|
|
387
|
-
const testBuffer = createMockBuffer();
|
|
388
|
-
const { result } = await renderVimHook(testBuffer);
|
|
389
|
-
exitInsertMode(result);
|
|
390
|
-
act(() => {
|
|
391
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
392
|
-
});
|
|
393
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
describe('Word movement', async () => {
|
|
397
|
-
it('should properly initialize vim hook with word movement support', async () => {
|
|
398
|
-
const testBuffer = createMockBuffer('cat elephant mouse', [0, 0]);
|
|
399
|
-
const { result } = await renderVimHook(testBuffer);
|
|
400
|
-
expect(result.current.vimModeEnabled).toBe(true);
|
|
401
|
-
expect(result.current.mode).toBe('INSERT');
|
|
402
|
-
expect(result.current.handleInput).toBeDefined();
|
|
403
|
-
});
|
|
404
|
-
it('should support vim mode and basic operations across multiple lines', async () => {
|
|
405
|
-
const testBuffer = createMockBuffer('first line word\nsecond line word', [0, 11]);
|
|
406
|
-
const { result } = await renderVimHook(testBuffer);
|
|
407
|
-
expect(result.current.vimModeEnabled).toBe(true);
|
|
408
|
-
expect(result.current.mode).toBe('INSERT');
|
|
409
|
-
expect(result.current.handleInput).toBeDefined();
|
|
410
|
-
expect(testBuffer.replaceRangeByOffset).toBeDefined();
|
|
411
|
-
expect(testBuffer.moveToOffset).toBeDefined();
|
|
412
|
-
});
|
|
413
|
-
it('should handle w (next word)', async () => {
|
|
414
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
415
|
-
const { result } = await renderVimHook(testBuffer);
|
|
416
|
-
exitInsertMode(result);
|
|
417
|
-
act(() => {
|
|
418
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
419
|
-
});
|
|
420
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
421
|
-
});
|
|
422
|
-
it('should handle b (previous word)', async () => {
|
|
423
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
424
|
-
const { result } = await renderVimHook(testBuffer);
|
|
425
|
-
exitInsertMode(result);
|
|
426
|
-
act(() => {
|
|
427
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
428
|
-
});
|
|
429
|
-
expect(testBuffer.vimMoveWordBackward).toHaveBeenCalledWith(1);
|
|
430
|
-
});
|
|
431
|
-
it('should handle e (end of word)', async () => {
|
|
432
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
433
|
-
const { result } = await renderVimHook(testBuffer);
|
|
434
|
-
exitInsertMode(result);
|
|
435
|
-
act(() => {
|
|
436
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
437
|
-
});
|
|
438
|
-
expect(testBuffer.vimMoveWordEnd).toHaveBeenCalledWith(1);
|
|
439
|
-
});
|
|
440
|
-
it('should handle w when cursor is on the last word', async () => {
|
|
441
|
-
const testBuffer = createMockBuffer('hello world', [0, 8]);
|
|
442
|
-
const { result } = await renderVimHook(testBuffer);
|
|
443
|
-
exitInsertMode(result);
|
|
444
|
-
act(() => {
|
|
445
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
446
|
-
});
|
|
447
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
448
|
-
});
|
|
449
|
-
it('should handle first c key (sets pending change state)', async () => {
|
|
450
|
-
const { result } = await renderVimHook();
|
|
451
|
-
exitInsertMode(result);
|
|
452
|
-
act(() => {
|
|
453
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
454
|
-
});
|
|
455
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
456
|
-
expect(mockBuffer.del).not.toHaveBeenCalled();
|
|
457
|
-
});
|
|
458
|
-
it('should clear pending state on invalid command sequence (df)', async () => {
|
|
459
|
-
const { result } = await renderVimHook();
|
|
460
|
-
act(() => {
|
|
461
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
462
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
463
|
-
});
|
|
464
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
465
|
-
expect(mockBuffer.del).not.toHaveBeenCalled();
|
|
466
|
-
});
|
|
467
|
-
it('should clear pending state with Escape in NORMAL mode', async () => {
|
|
468
|
-
const { result } = await renderVimHook();
|
|
469
|
-
act(() => {
|
|
470
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
471
|
-
});
|
|
472
|
-
exitInsertMode(result);
|
|
473
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
474
|
-
});
|
|
475
|
-
});
|
|
476
|
-
describe('Big Word movement', async () => {
|
|
477
|
-
it('should handle W (next big word)', async () => {
|
|
478
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
479
|
-
const { result } = await renderVimHook(testBuffer);
|
|
480
|
-
exitInsertMode(result);
|
|
481
|
-
act(() => {
|
|
482
|
-
result.current.handleInput(createKey({ sequence: 'W' }));
|
|
483
|
-
});
|
|
484
|
-
expect(testBuffer.vimMoveBigWordForward).toHaveBeenCalledWith(1);
|
|
485
|
-
});
|
|
486
|
-
it('should handle B (previous big word)', async () => {
|
|
487
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
488
|
-
const { result } = await renderVimHook(testBuffer);
|
|
489
|
-
exitInsertMode(result);
|
|
490
|
-
act(() => {
|
|
491
|
-
result.current.handleInput(createKey({ sequence: 'B' }));
|
|
492
|
-
});
|
|
493
|
-
expect(testBuffer.vimMoveBigWordBackward).toHaveBeenCalledWith(1);
|
|
494
|
-
});
|
|
495
|
-
it('should handle E (end of big word)', async () => {
|
|
496
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
497
|
-
const { result } = await renderVimHook(testBuffer);
|
|
498
|
-
exitInsertMode(result);
|
|
499
|
-
act(() => {
|
|
500
|
-
result.current.handleInput(createKey({ sequence: 'E' }));
|
|
501
|
-
});
|
|
502
|
-
expect(testBuffer.vimMoveBigWordEnd).toHaveBeenCalledWith(1);
|
|
503
|
-
});
|
|
504
|
-
it('should handle dW (delete big word forward)', async () => {
|
|
505
|
-
const testBuffer = createMockBuffer('hello.world test', [0, 0]);
|
|
506
|
-
const { result } = await renderVimHook(testBuffer);
|
|
507
|
-
exitInsertMode(result);
|
|
508
|
-
act(() => {
|
|
509
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
510
|
-
});
|
|
511
|
-
act(() => {
|
|
512
|
-
result.current.handleInput(createKey({ sequence: 'W' }));
|
|
513
|
-
});
|
|
514
|
-
expect(testBuffer.vimDeleteBigWordForward).toHaveBeenCalledWith(1);
|
|
515
|
-
});
|
|
516
|
-
it('should handle cW (change big word forward)', async () => {
|
|
517
|
-
const testBuffer = createMockBuffer('hello.world test', [0, 0]);
|
|
518
|
-
const { result } = await renderVimHook(testBuffer);
|
|
519
|
-
exitInsertMode(result);
|
|
520
|
-
act(() => {
|
|
521
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
522
|
-
});
|
|
523
|
-
act(() => {
|
|
524
|
-
result.current.handleInput(createKey({ sequence: 'W' }));
|
|
525
|
-
});
|
|
526
|
-
expect(testBuffer.vimChangeBigWordForward).toHaveBeenCalledWith(1);
|
|
527
|
-
expect(result.current.mode).toBe('INSERT');
|
|
528
|
-
});
|
|
529
|
-
it('should handle dB (delete big word backward)', async () => {
|
|
530
|
-
const testBuffer = createMockBuffer('hello.world test', [0, 11]);
|
|
531
|
-
const { result } = await renderVimHook(testBuffer);
|
|
532
|
-
exitInsertMode(result);
|
|
533
|
-
act(() => {
|
|
534
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
535
|
-
});
|
|
536
|
-
act(() => {
|
|
537
|
-
result.current.handleInput(createKey({ sequence: 'B' }));
|
|
538
|
-
});
|
|
539
|
-
expect(testBuffer.vimDeleteBigWordBackward).toHaveBeenCalledWith(1);
|
|
540
|
-
});
|
|
541
|
-
it('should handle dE (delete big word end)', async () => {
|
|
542
|
-
const testBuffer = createMockBuffer('hello.world test', [0, 0]);
|
|
543
|
-
const { result } = await renderVimHook(testBuffer);
|
|
544
|
-
exitInsertMode(result);
|
|
545
|
-
act(() => {
|
|
546
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
547
|
-
});
|
|
548
|
-
act(() => {
|
|
549
|
-
result.current.handleInput(createKey({ sequence: 'E' }));
|
|
550
|
-
});
|
|
551
|
-
expect(testBuffer.vimDeleteBigWordEnd).toHaveBeenCalledWith(1);
|
|
552
|
-
});
|
|
553
|
-
});
|
|
554
|
-
describe('Disabled vim mode', async () => {
|
|
555
|
-
it('should not respond to vim commands when disabled', async () => {
|
|
556
|
-
mockVimContext.vimEnabled = false;
|
|
557
|
-
const { result } = await renderVimHook(mockBuffer);
|
|
558
|
-
act(() => {
|
|
559
|
-
result.current.handleInput(createKey({ sequence: 'h' }));
|
|
560
|
-
});
|
|
561
|
-
expect(mockBuffer.move).not.toHaveBeenCalled();
|
|
562
|
-
});
|
|
563
|
-
});
|
|
564
|
-
// These tests are no longer applicable at the hook level
|
|
565
|
-
describe('Command repeat system', async () => {
|
|
566
|
-
it('should repeat x command from current cursor position', async () => {
|
|
567
|
-
const testBuffer = createMockBuffer('abcd\nefgh\nijkl', [0, 1]);
|
|
568
|
-
const { result } = await renderVimHook(testBuffer);
|
|
569
|
-
exitInsertMode(result);
|
|
570
|
-
act(() => {
|
|
571
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
572
|
-
});
|
|
573
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
574
|
-
testBuffer.cursor = [1, 2];
|
|
575
|
-
act(() => {
|
|
576
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
577
|
-
});
|
|
578
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
579
|
-
});
|
|
580
|
-
it('should repeat dd command from current position', async () => {
|
|
581
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [1, 0]);
|
|
582
|
-
const { result } = await renderVimHook(testBuffer);
|
|
583
|
-
exitInsertMode(result);
|
|
584
|
-
act(() => {
|
|
585
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
586
|
-
});
|
|
587
|
-
act(() => {
|
|
588
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
589
|
-
});
|
|
590
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledTimes(1);
|
|
591
|
-
testBuffer.cursor = [0, 0];
|
|
592
|
-
act(() => {
|
|
593
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
594
|
-
});
|
|
595
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledTimes(2);
|
|
596
|
-
});
|
|
597
|
-
it('should repeat ce command from current position', async () => {
|
|
598
|
-
const testBuffer = createMockBuffer('word', [0, 0]);
|
|
599
|
-
const { result } = await renderVimHook(testBuffer);
|
|
600
|
-
exitInsertMode(result);
|
|
601
|
-
act(() => {
|
|
602
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
603
|
-
});
|
|
604
|
-
act(() => {
|
|
605
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
606
|
-
});
|
|
607
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledTimes(1);
|
|
608
|
-
// Exit INSERT mode to complete the command
|
|
609
|
-
exitInsertMode(result);
|
|
610
|
-
testBuffer.cursor = [0, 2];
|
|
611
|
-
act(() => {
|
|
612
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
613
|
-
});
|
|
614
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledTimes(2);
|
|
615
|
-
});
|
|
616
|
-
it('should repeat cc command from current position', async () => {
|
|
617
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [1, 2]);
|
|
618
|
-
const { result } = await renderVimHook(testBuffer);
|
|
619
|
-
exitInsertMode(result);
|
|
620
|
-
act(() => {
|
|
621
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
622
|
-
});
|
|
623
|
-
act(() => {
|
|
624
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
625
|
-
});
|
|
626
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledTimes(1);
|
|
627
|
-
// Exit INSERT mode to complete the command
|
|
628
|
-
exitInsertMode(result);
|
|
629
|
-
testBuffer.cursor = [0, 1];
|
|
630
|
-
act(() => {
|
|
631
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
632
|
-
});
|
|
633
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledTimes(2);
|
|
634
|
-
});
|
|
635
|
-
it('should repeat cw command from current position', async () => {
|
|
636
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
637
|
-
const { result } = await renderVimHook(testBuffer);
|
|
638
|
-
exitInsertMode(result);
|
|
639
|
-
act(() => {
|
|
640
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
641
|
-
});
|
|
642
|
-
act(() => {
|
|
643
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
644
|
-
});
|
|
645
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledTimes(1);
|
|
646
|
-
// Exit INSERT mode to complete the command
|
|
647
|
-
exitInsertMode(result);
|
|
648
|
-
testBuffer.cursor = [0, 0];
|
|
649
|
-
act(() => {
|
|
650
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
651
|
-
});
|
|
652
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledTimes(2);
|
|
653
|
-
});
|
|
654
|
-
it('should repeat D command from current position', async () => {
|
|
655
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
656
|
-
const { result } = await renderVimHook(testBuffer);
|
|
657
|
-
exitInsertMode(result);
|
|
658
|
-
act(() => {
|
|
659
|
-
result.current.handleInput(createKey({ sequence: 'D' }));
|
|
660
|
-
});
|
|
661
|
-
expect(testBuffer.vimDeleteToEndOfLine).toHaveBeenCalledTimes(1);
|
|
662
|
-
testBuffer.cursor = [0, 2];
|
|
663
|
-
vi.clearAllMocks(); // Clear all mocks instead of just one method
|
|
664
|
-
act(() => {
|
|
665
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
666
|
-
});
|
|
667
|
-
expect(testBuffer.vimDeleteToEndOfLine).toHaveBeenCalledTimes(1);
|
|
668
|
-
});
|
|
669
|
-
it('should repeat C command from current position', async () => {
|
|
670
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
671
|
-
const { result } = await renderVimHook(testBuffer);
|
|
672
|
-
exitInsertMode(result);
|
|
673
|
-
act(() => {
|
|
674
|
-
result.current.handleInput(createKey({ sequence: 'C' }));
|
|
675
|
-
});
|
|
676
|
-
expect(testBuffer.vimChangeToEndOfLine).toHaveBeenCalledTimes(1);
|
|
677
|
-
// Exit INSERT mode to complete the command
|
|
678
|
-
exitInsertMode(result);
|
|
679
|
-
testBuffer.cursor = [0, 2];
|
|
680
|
-
act(() => {
|
|
681
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
682
|
-
});
|
|
683
|
-
expect(testBuffer.vimChangeToEndOfLine).toHaveBeenCalledTimes(2);
|
|
684
|
-
});
|
|
685
|
-
it('should repeat command after cursor movement', async () => {
|
|
686
|
-
const testBuffer = createMockBuffer('test text', [0, 0]);
|
|
687
|
-
const { result } = await renderVimHook(testBuffer);
|
|
688
|
-
exitInsertMode(result);
|
|
689
|
-
act(() => {
|
|
690
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
691
|
-
});
|
|
692
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
693
|
-
testBuffer.cursor = [0, 2];
|
|
694
|
-
act(() => {
|
|
695
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
696
|
-
});
|
|
697
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
698
|
-
});
|
|
699
|
-
it('should move cursor to the correct position after exiting INSERT mode with "a"', async () => {
|
|
700
|
-
const testBuffer = createMockBuffer('hello world', [0, 11]);
|
|
701
|
-
const { result } = await renderVimHook(testBuffer);
|
|
702
|
-
exitInsertMode(result);
|
|
703
|
-
expect(testBuffer.cursor).toEqual([0, 10]);
|
|
704
|
-
act(() => {
|
|
705
|
-
result.current.handleInput(createKey({ sequence: 'a' }));
|
|
706
|
-
});
|
|
707
|
-
expect(result.current.mode).toBe('INSERT');
|
|
708
|
-
expect(testBuffer.cursor).toEqual([0, 11]);
|
|
709
|
-
exitInsertMode(result);
|
|
710
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
711
|
-
expect(testBuffer.cursor).toEqual([0, 10]);
|
|
712
|
-
});
|
|
713
|
-
});
|
|
714
|
-
describe('Special characters and edge cases', async () => {
|
|
715
|
-
it('should handle ^ (move to first non-whitespace character)', async () => {
|
|
716
|
-
const testBuffer = createMockBuffer(' hello world', [0, 5]);
|
|
717
|
-
const { result } = await renderVimHook(testBuffer);
|
|
718
|
-
exitInsertMode(result);
|
|
719
|
-
act(() => {
|
|
720
|
-
result.current.handleInput(createKey({ sequence: '^' }));
|
|
721
|
-
});
|
|
722
|
-
expect(testBuffer.vimMoveToFirstNonWhitespace).toHaveBeenCalled();
|
|
723
|
-
});
|
|
724
|
-
it('should handle G without count (go to last line)', async () => {
|
|
725
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [0, 0]);
|
|
726
|
-
const { result } = await renderVimHook(testBuffer);
|
|
727
|
-
exitInsertMode(result);
|
|
728
|
-
act(() => {
|
|
729
|
-
result.current.handleInput(createKey({ sequence: 'G' }));
|
|
730
|
-
});
|
|
731
|
-
expect(testBuffer.vimMoveToLastLine).toHaveBeenCalled();
|
|
732
|
-
});
|
|
733
|
-
it('should handle gg (go to first line)', async () => {
|
|
734
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [2, 0]);
|
|
735
|
-
const { result } = await renderVimHook(testBuffer);
|
|
736
|
-
exitInsertMode(result);
|
|
737
|
-
// First 'g' sets pending state
|
|
738
|
-
act(() => {
|
|
739
|
-
result.current.handleInput(createKey({ sequence: 'g' }));
|
|
740
|
-
});
|
|
741
|
-
// Second 'g' executes the command
|
|
742
|
-
act(() => {
|
|
743
|
-
result.current.handleInput(createKey({ sequence: 'g' }));
|
|
744
|
-
});
|
|
745
|
-
expect(testBuffer.vimMoveToFirstLine).toHaveBeenCalled();
|
|
746
|
-
});
|
|
747
|
-
it('should handle count with movement commands', async () => {
|
|
748
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
749
|
-
const { result } = await renderVimHook(testBuffer);
|
|
750
|
-
exitInsertMode(result);
|
|
751
|
-
act(() => {
|
|
752
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
753
|
-
});
|
|
754
|
-
act(() => {
|
|
755
|
-
result.current.handleInput(TEST_SEQUENCES.WORD_FORWARD);
|
|
756
|
-
});
|
|
757
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(3);
|
|
758
|
-
});
|
|
759
|
-
});
|
|
760
|
-
describe('Vim word operations', async () => {
|
|
761
|
-
describe('dw (delete word forward)', async () => {
|
|
762
|
-
it('should delete from cursor to start of next word', async () => {
|
|
763
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
764
|
-
const { result } = await renderVimHook(testBuffer);
|
|
765
|
-
exitInsertMode(result);
|
|
766
|
-
act(() => {
|
|
767
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
768
|
-
});
|
|
769
|
-
act(() => {
|
|
770
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
771
|
-
});
|
|
772
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(1);
|
|
773
|
-
});
|
|
774
|
-
it('should actually delete the complete word including trailing space', async () => {
|
|
775
|
-
// This test uses the real text-buffer reducer instead of mocks
|
|
776
|
-
const initialState = createMockTextBufferState({
|
|
777
|
-
lines: ['hello world test'],
|
|
778
|
-
cursorRow: 0,
|
|
779
|
-
cursorCol: 0,
|
|
780
|
-
preferredCol: null,
|
|
781
|
-
undoStack: [],
|
|
782
|
-
redoStack: [],
|
|
783
|
-
clipboard: null,
|
|
784
|
-
selectionAnchor: null,
|
|
785
|
-
});
|
|
786
|
-
const result = textBufferReducer(initialState, {
|
|
787
|
-
type: 'vim_delete_word_forward',
|
|
788
|
-
payload: { count: 1 },
|
|
789
|
-
});
|
|
790
|
-
// Should delete "hello " (word + space), leaving "world test"
|
|
791
|
-
expect(result.lines).toEqual(['world test']);
|
|
792
|
-
expect(result.cursorRow).toBe(0);
|
|
793
|
-
expect(result.cursorCol).toBe(0);
|
|
794
|
-
});
|
|
795
|
-
it('should delete word from middle of word correctly', async () => {
|
|
796
|
-
const initialState = createMockTextBufferState({
|
|
797
|
-
lines: ['hello world test'],
|
|
798
|
-
cursorRow: 0,
|
|
799
|
-
cursorCol: 2, // cursor on 'l' in "hello"
|
|
800
|
-
preferredCol: null,
|
|
801
|
-
undoStack: [],
|
|
802
|
-
redoStack: [],
|
|
803
|
-
clipboard: null,
|
|
804
|
-
selectionAnchor: null,
|
|
805
|
-
});
|
|
806
|
-
const result = textBufferReducer(initialState, {
|
|
807
|
-
type: 'vim_delete_word_forward',
|
|
808
|
-
payload: { count: 1 },
|
|
809
|
-
});
|
|
810
|
-
// Should delete "llo " (rest of word + space), leaving "he world test"
|
|
811
|
-
expect(result.lines).toEqual(['heworld test']);
|
|
812
|
-
expect(result.cursorRow).toBe(0);
|
|
813
|
-
expect(result.cursorCol).toBe(2);
|
|
814
|
-
});
|
|
815
|
-
it('should handle dw at end of line', async () => {
|
|
816
|
-
const initialState = createMockTextBufferState({
|
|
817
|
-
lines: ['hello world'],
|
|
818
|
-
cursorRow: 0,
|
|
819
|
-
cursorCol: 6, // cursor on 'w' in "world"
|
|
820
|
-
preferredCol: null,
|
|
821
|
-
undoStack: [],
|
|
822
|
-
redoStack: [],
|
|
823
|
-
clipboard: null,
|
|
824
|
-
selectionAnchor: null,
|
|
825
|
-
});
|
|
826
|
-
const result = textBufferReducer(initialState, {
|
|
827
|
-
type: 'vim_delete_word_forward',
|
|
828
|
-
payload: { count: 1 },
|
|
829
|
-
});
|
|
830
|
-
// Should delete "world" (no trailing space at end), leaving "hello "
|
|
831
|
-
// Cursor clamps to last valid index in NORMAL mode (col 5 = trailing space)
|
|
832
|
-
expect(result.lines).toEqual(['hello ']);
|
|
833
|
-
expect(result.cursorRow).toBe(0);
|
|
834
|
-
expect(result.cursorCol).toBe(5);
|
|
835
|
-
});
|
|
836
|
-
it('should delete multiple words with count', async () => {
|
|
837
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
838
|
-
const { result } = await renderVimHook(testBuffer);
|
|
839
|
-
exitInsertMode(result);
|
|
840
|
-
act(() => {
|
|
841
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
842
|
-
});
|
|
843
|
-
act(() => {
|
|
844
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
845
|
-
});
|
|
846
|
-
act(() => {
|
|
847
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
848
|
-
});
|
|
849
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(2);
|
|
850
|
-
});
|
|
851
|
-
it('should record command for repeat with dot', async () => {
|
|
852
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
853
|
-
const { result } = await renderVimHook(testBuffer);
|
|
854
|
-
exitInsertMode(result);
|
|
855
|
-
// Execute dw
|
|
856
|
-
act(() => {
|
|
857
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
858
|
-
});
|
|
859
|
-
act(() => {
|
|
860
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
861
|
-
});
|
|
862
|
-
vi.clearAllMocks();
|
|
863
|
-
// Execute dot repeat
|
|
864
|
-
act(() => {
|
|
865
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
866
|
-
});
|
|
867
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(1);
|
|
868
|
-
});
|
|
869
|
-
});
|
|
870
|
-
describe('de (delete word end)', async () => {
|
|
871
|
-
it('should delete from cursor to end of current word', async () => {
|
|
872
|
-
const testBuffer = createMockBuffer('hello world test', [0, 1]);
|
|
873
|
-
const { result } = await renderVimHook(testBuffer);
|
|
874
|
-
exitInsertMode(result);
|
|
875
|
-
act(() => {
|
|
876
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
877
|
-
});
|
|
878
|
-
act(() => {
|
|
879
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
880
|
-
});
|
|
881
|
-
expect(testBuffer.vimDeleteWordEnd).toHaveBeenCalledWith(1);
|
|
882
|
-
});
|
|
883
|
-
it('should handle count with de', async () => {
|
|
884
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
885
|
-
const { result } = await renderVimHook(testBuffer);
|
|
886
|
-
exitInsertMode(result);
|
|
887
|
-
act(() => {
|
|
888
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
889
|
-
});
|
|
890
|
-
act(() => {
|
|
891
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
892
|
-
});
|
|
893
|
-
act(() => {
|
|
894
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
895
|
-
});
|
|
896
|
-
expect(testBuffer.vimDeleteWordEnd).toHaveBeenCalledWith(3);
|
|
897
|
-
});
|
|
898
|
-
});
|
|
899
|
-
describe('cw (change word forward)', async () => {
|
|
900
|
-
it('should change from cursor to start of next word and enter INSERT mode', async () => {
|
|
901
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
902
|
-
const { result } = await renderVimHook(testBuffer);
|
|
903
|
-
exitInsertMode(result);
|
|
904
|
-
act(() => {
|
|
905
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
906
|
-
});
|
|
907
|
-
act(() => {
|
|
908
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
909
|
-
});
|
|
910
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(1);
|
|
911
|
-
expect(result.current.mode).toBe('INSERT');
|
|
912
|
-
expect(mockVimContext.setVimMode).toHaveBeenCalledWith('INSERT');
|
|
913
|
-
});
|
|
914
|
-
it('should handle count with cw', async () => {
|
|
915
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
916
|
-
const { result } = await renderVimHook(testBuffer);
|
|
917
|
-
exitInsertMode(result);
|
|
918
|
-
act(() => {
|
|
919
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
920
|
-
});
|
|
921
|
-
act(() => {
|
|
922
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
923
|
-
});
|
|
924
|
-
act(() => {
|
|
925
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
926
|
-
});
|
|
927
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(2);
|
|
928
|
-
expect(result.current.mode).toBe('INSERT');
|
|
929
|
-
});
|
|
930
|
-
it('should be repeatable with dot', async () => {
|
|
931
|
-
const testBuffer = createMockBuffer('hello world test more', [0, 0]);
|
|
932
|
-
const { result } = await renderVimHook(testBuffer);
|
|
933
|
-
exitInsertMode(result);
|
|
934
|
-
// Execute cw
|
|
935
|
-
act(() => {
|
|
936
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
937
|
-
});
|
|
938
|
-
act(() => {
|
|
939
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
940
|
-
});
|
|
941
|
-
// Exit INSERT mode
|
|
942
|
-
exitInsertMode(result);
|
|
943
|
-
vi.clearAllMocks();
|
|
944
|
-
mockVimContext.setVimMode.mockClear();
|
|
945
|
-
// Execute dot repeat
|
|
946
|
-
act(() => {
|
|
947
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
948
|
-
});
|
|
949
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(1);
|
|
950
|
-
expect(result.current.mode).toBe('INSERT');
|
|
951
|
-
});
|
|
952
|
-
});
|
|
953
|
-
describe('ce (change word end)', async () => {
|
|
954
|
-
it('should change from cursor to end of word and enter INSERT mode', async () => {
|
|
955
|
-
const testBuffer = createMockBuffer('hello world test', [0, 1]);
|
|
956
|
-
const { result } = await renderVimHook(testBuffer);
|
|
957
|
-
exitInsertMode(result);
|
|
958
|
-
act(() => {
|
|
959
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
960
|
-
});
|
|
961
|
-
act(() => {
|
|
962
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
963
|
-
});
|
|
964
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledWith(1);
|
|
965
|
-
expect(result.current.mode).toBe('INSERT');
|
|
966
|
-
});
|
|
967
|
-
it('should handle count with ce', async () => {
|
|
968
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
969
|
-
const { result } = await renderVimHook(testBuffer);
|
|
970
|
-
exitInsertMode(result);
|
|
971
|
-
act(() => {
|
|
972
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
973
|
-
});
|
|
974
|
-
act(() => {
|
|
975
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
976
|
-
});
|
|
977
|
-
act(() => {
|
|
978
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
979
|
-
});
|
|
980
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledWith(2);
|
|
981
|
-
expect(result.current.mode).toBe('INSERT');
|
|
982
|
-
});
|
|
983
|
-
});
|
|
984
|
-
describe('cc (change line)', async () => {
|
|
985
|
-
it('should change entire line and enter INSERT mode', async () => {
|
|
986
|
-
const testBuffer = createMockBuffer('hello world\nsecond line', [0, 5]);
|
|
987
|
-
const { result } = await renderVimHook(testBuffer);
|
|
988
|
-
exitInsertMode(result);
|
|
989
|
-
act(() => {
|
|
990
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
991
|
-
});
|
|
992
|
-
act(() => {
|
|
993
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
994
|
-
});
|
|
995
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
996
|
-
expect(result.current.mode).toBe('INSERT');
|
|
997
|
-
});
|
|
998
|
-
it('should change multiple lines with count', async () => {
|
|
999
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3\nline4', [1, 0]);
|
|
1000
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1001
|
-
exitInsertMode(result);
|
|
1002
|
-
act(() => {
|
|
1003
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
1004
|
-
});
|
|
1005
|
-
act(() => {
|
|
1006
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1007
|
-
});
|
|
1008
|
-
act(() => {
|
|
1009
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1010
|
-
});
|
|
1011
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(3);
|
|
1012
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1013
|
-
});
|
|
1014
|
-
it('should be repeatable with dot', async () => {
|
|
1015
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [0, 0]);
|
|
1016
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1017
|
-
exitInsertMode(result);
|
|
1018
|
-
// Execute cc
|
|
1019
|
-
act(() => {
|
|
1020
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1021
|
-
});
|
|
1022
|
-
act(() => {
|
|
1023
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1024
|
-
});
|
|
1025
|
-
// Exit INSERT mode
|
|
1026
|
-
exitInsertMode(result);
|
|
1027
|
-
vi.clearAllMocks();
|
|
1028
|
-
mockVimContext.setVimMode.mockClear();
|
|
1029
|
-
// Execute dot repeat
|
|
1030
|
-
act(() => {
|
|
1031
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
1032
|
-
});
|
|
1033
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
1034
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1035
|
-
});
|
|
1036
|
-
});
|
|
1037
|
-
describe('db (delete word backward)', async () => {
|
|
1038
|
-
it('should delete from cursor to start of previous word', async () => {
|
|
1039
|
-
const testBuffer = createMockBuffer('hello world test', [0, 11]);
|
|
1040
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1041
|
-
exitInsertMode(result);
|
|
1042
|
-
act(() => {
|
|
1043
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1044
|
-
});
|
|
1045
|
-
act(() => {
|
|
1046
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
1047
|
-
});
|
|
1048
|
-
expect(testBuffer.vimDeleteWordBackward).toHaveBeenCalledWith(1);
|
|
1049
|
-
});
|
|
1050
|
-
it('should handle count with db', async () => {
|
|
1051
|
-
const testBuffer = createMockBuffer('one two three four', [0, 18]);
|
|
1052
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1053
|
-
exitInsertMode(result);
|
|
1054
|
-
act(() => {
|
|
1055
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1056
|
-
});
|
|
1057
|
-
act(() => {
|
|
1058
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1059
|
-
});
|
|
1060
|
-
act(() => {
|
|
1061
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
1062
|
-
});
|
|
1063
|
-
expect(testBuffer.vimDeleteWordBackward).toHaveBeenCalledWith(2);
|
|
1064
|
-
});
|
|
1065
|
-
});
|
|
1066
|
-
describe('cb (change word backward)', async () => {
|
|
1067
|
-
it('should change from cursor to start of previous word and enter INSERT mode', async () => {
|
|
1068
|
-
const testBuffer = createMockBuffer('hello world test', [0, 11]);
|
|
1069
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1070
|
-
exitInsertMode(result);
|
|
1071
|
-
act(() => {
|
|
1072
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1073
|
-
});
|
|
1074
|
-
act(() => {
|
|
1075
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
1076
|
-
});
|
|
1077
|
-
expect(testBuffer.vimChangeWordBackward).toHaveBeenCalledWith(1);
|
|
1078
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1079
|
-
});
|
|
1080
|
-
it('should handle count with cb', async () => {
|
|
1081
|
-
const testBuffer = createMockBuffer('one two three four', [0, 18]);
|
|
1082
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1083
|
-
exitInsertMode(result);
|
|
1084
|
-
act(() => {
|
|
1085
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
1086
|
-
});
|
|
1087
|
-
act(() => {
|
|
1088
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1089
|
-
});
|
|
1090
|
-
act(() => {
|
|
1091
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
1092
|
-
});
|
|
1093
|
-
expect(testBuffer.vimChangeWordBackward).toHaveBeenCalledWith(3);
|
|
1094
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1095
|
-
});
|
|
1096
|
-
});
|
|
1097
|
-
describe('Pending state handling', async () => {
|
|
1098
|
-
it('should clear pending delete state after dw', async () => {
|
|
1099
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
1100
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1101
|
-
exitInsertMode(result);
|
|
1102
|
-
// Press 'd' to enter pending delete state
|
|
1103
|
-
act(() => {
|
|
1104
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1105
|
-
});
|
|
1106
|
-
// Complete with 'w'
|
|
1107
|
-
act(() => {
|
|
1108
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
1109
|
-
});
|
|
1110
|
-
// Next 'd' should start a new pending state, not continue the previous one
|
|
1111
|
-
act(() => {
|
|
1112
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1113
|
-
});
|
|
1114
|
-
// This should trigger dd (delete line), not an error
|
|
1115
|
-
act(() => {
|
|
1116
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1117
|
-
});
|
|
1118
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledWith(1);
|
|
1119
|
-
});
|
|
1120
|
-
it('should clear pending change state after cw', async () => {
|
|
1121
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
1122
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1123
|
-
exitInsertMode(result);
|
|
1124
|
-
// Execute cw
|
|
1125
|
-
act(() => {
|
|
1126
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1127
|
-
});
|
|
1128
|
-
act(() => {
|
|
1129
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
1130
|
-
});
|
|
1131
|
-
// Exit INSERT mode
|
|
1132
|
-
exitInsertMode(result);
|
|
1133
|
-
// Next 'c' should start a new pending state
|
|
1134
|
-
act(() => {
|
|
1135
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1136
|
-
});
|
|
1137
|
-
act(() => {
|
|
1138
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
1139
|
-
});
|
|
1140
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
1141
|
-
});
|
|
1142
|
-
it('should clear pending state with escape', async () => {
|
|
1143
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
1144
|
-
const { result } = await renderVimHook(testBuffer);
|
|
1145
|
-
exitInsertMode(result);
|
|
1146
|
-
// Enter pending delete state
|
|
1147
|
-
act(() => {
|
|
1148
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1149
|
-
});
|
|
1150
|
-
// Press escape to clear pending state
|
|
1151
|
-
act(() => {
|
|
1152
|
-
result.current.handleInput(createKey({ name: 'escape' }));
|
|
1153
|
-
});
|
|
1154
|
-
// Now 'w' should just move cursor, not delete
|
|
1155
|
-
act(() => {
|
|
1156
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
1157
|
-
});
|
|
1158
|
-
expect(testBuffer.vimDeleteWordForward).not.toHaveBeenCalled();
|
|
1159
|
-
// w should move to next word after clearing pending state
|
|
1160
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
1161
|
-
});
|
|
1162
|
-
});
|
|
1163
|
-
describe('NORMAL mode escape behavior', async () => {
|
|
1164
|
-
it('should pass escape through when no pending operator is active', async () => {
|
|
1165
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
1166
|
-
const { result } = await renderVimHook();
|
|
1167
|
-
const handled = result.current.handleInput(createKey({ name: 'escape' }));
|
|
1168
|
-
expect(handled).toBe(false);
|
|
1169
|
-
});
|
|
1170
|
-
it('should handle escape and clear pending operator', async () => {
|
|
1171
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
1172
|
-
const { result } = await renderVimHook();
|
|
1173
|
-
act(() => {
|
|
1174
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1175
|
-
});
|
|
1176
|
-
let handled;
|
|
1177
|
-
act(() => {
|
|
1178
|
-
handled = result.current.handleInput(createKey({ name: 'escape' }));
|
|
1179
|
-
});
|
|
1180
|
-
expect(handled).toBe(true);
|
|
1181
|
-
});
|
|
1182
|
-
});
|
|
1183
|
-
});
|
|
1184
|
-
describe('Shell command pass-through', async () => {
|
|
1185
|
-
it('should pass through ctrl+r in INSERT mode', async () => {
|
|
1186
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1187
|
-
const { result } = await renderVimHook();
|
|
1188
|
-
await waitFor(() => {
|
|
1189
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1190
|
-
});
|
|
1191
|
-
const handled = result.current.handleInput(createKey({ name: 'r', ctrl: true }));
|
|
1192
|
-
expect(handled).toBe(false);
|
|
1193
|
-
});
|
|
1194
|
-
it('should pass through ! in INSERT mode when buffer is empty', async () => {
|
|
1195
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1196
|
-
const emptyBuffer = createMockBuffer('');
|
|
1197
|
-
const { result } = await renderVimHook(emptyBuffer);
|
|
1198
|
-
await waitFor(() => {
|
|
1199
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1200
|
-
});
|
|
1201
|
-
const handled = result.current.handleInput(createKey({ sequence: '!' }));
|
|
1202
|
-
expect(handled).toBe(false);
|
|
1203
|
-
});
|
|
1204
|
-
it('should handle ! as input in INSERT mode when buffer is not empty', async () => {
|
|
1205
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1206
|
-
const nonEmptyBuffer = createMockBuffer('not empty');
|
|
1207
|
-
const { result } = await renderVimHook(nonEmptyBuffer);
|
|
1208
|
-
await waitFor(() => {
|
|
1209
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1210
|
-
});
|
|
1211
|
-
const key = createKey({ sequence: '!', name: '!' });
|
|
1212
|
-
act(() => {
|
|
1213
|
-
result.current.handleInput(key);
|
|
1214
|
-
});
|
|
1215
|
-
expect(nonEmptyBuffer.handleInput).toHaveBeenCalledWith(expect.objectContaining(key));
|
|
1216
|
-
});
|
|
1217
|
-
});
|
|
1218
|
-
// Line operations (dd, cc) are tested in text-buffer.test.ts
|
|
1219
|
-
describe('Reducer-based integration tests', async () => {
|
|
1220
|
-
const testCases = [
|
|
1221
|
-
{
|
|
1222
|
-
command: 'de',
|
|
1223
|
-
desc: 'delete from cursor to end of current word',
|
|
1224
|
-
lines: ['hello world test'],
|
|
1225
|
-
cursorRow: 0,
|
|
1226
|
-
cursorCol: 1,
|
|
1227
|
-
actionType: 'vim_delete_word_end',
|
|
1228
|
-
count: 1,
|
|
1229
|
-
expectedLines: ['h world test'],
|
|
1230
|
-
expectedCursorRow: 0,
|
|
1231
|
-
expectedCursorCol: 1,
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
command: 'de',
|
|
1235
|
-
desc: 'delete multiple word ends with count',
|
|
1236
|
-
lines: ['hello world test more'],
|
|
1237
|
-
cursorRow: 0,
|
|
1238
|
-
cursorCol: 1,
|
|
1239
|
-
actionType: 'vim_delete_word_end',
|
|
1240
|
-
count: 2,
|
|
1241
|
-
expectedLines: ['h test more'],
|
|
1242
|
-
expectedCursorRow: 0,
|
|
1243
|
-
expectedCursorCol: 1,
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
command: 'db',
|
|
1247
|
-
desc: 'delete from cursor to start of previous word',
|
|
1248
|
-
lines: ['hello world test'],
|
|
1249
|
-
cursorRow: 0,
|
|
1250
|
-
cursorCol: 11,
|
|
1251
|
-
actionType: 'vim_delete_word_backward',
|
|
1252
|
-
count: 1,
|
|
1253
|
-
expectedLines: ['hello test'],
|
|
1254
|
-
expectedCursorRow: 0,
|
|
1255
|
-
expectedCursorCol: 6,
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
command: 'db',
|
|
1259
|
-
desc: 'delete multiple words backward with count',
|
|
1260
|
-
lines: ['hello world test more'],
|
|
1261
|
-
cursorRow: 0,
|
|
1262
|
-
cursorCol: 17,
|
|
1263
|
-
actionType: 'vim_delete_word_backward',
|
|
1264
|
-
count: 2,
|
|
1265
|
-
expectedLines: ['hello more'],
|
|
1266
|
-
expectedCursorRow: 0,
|
|
1267
|
-
expectedCursorCol: 6,
|
|
1268
|
-
},
|
|
1269
|
-
{
|
|
1270
|
-
command: 'cw',
|
|
1271
|
-
desc: 'delete from cursor to start of next word',
|
|
1272
|
-
lines: ['hello world test'],
|
|
1273
|
-
cursorRow: 0,
|
|
1274
|
-
cursorCol: 0,
|
|
1275
|
-
actionType: 'vim_change_word_forward',
|
|
1276
|
-
count: 1,
|
|
1277
|
-
expectedLines: ['world test'],
|
|
1278
|
-
expectedCursorRow: 0,
|
|
1279
|
-
expectedCursorCol: 0,
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
command: 'cw',
|
|
1283
|
-
desc: 'change multiple words with count',
|
|
1284
|
-
lines: ['hello world test more'],
|
|
1285
|
-
cursorRow: 0,
|
|
1286
|
-
cursorCol: 0,
|
|
1287
|
-
actionType: 'vim_change_word_forward',
|
|
1288
|
-
count: 2,
|
|
1289
|
-
expectedLines: ['test more'],
|
|
1290
|
-
expectedCursorRow: 0,
|
|
1291
|
-
expectedCursorCol: 0,
|
|
1292
|
-
},
|
|
1293
|
-
{
|
|
1294
|
-
command: 'ce',
|
|
1295
|
-
desc: 'change from cursor to end of current word',
|
|
1296
|
-
lines: ['hello world test'],
|
|
1297
|
-
cursorRow: 0,
|
|
1298
|
-
cursorCol: 1,
|
|
1299
|
-
actionType: 'vim_change_word_end',
|
|
1300
|
-
count: 1,
|
|
1301
|
-
expectedLines: ['h world test'],
|
|
1302
|
-
expectedCursorRow: 0,
|
|
1303
|
-
expectedCursorCol: 1,
|
|
1304
|
-
},
|
|
1305
|
-
{
|
|
1306
|
-
command: 'ce',
|
|
1307
|
-
desc: 'change multiple word ends with count',
|
|
1308
|
-
lines: ['hello world test'],
|
|
1309
|
-
cursorRow: 0,
|
|
1310
|
-
cursorCol: 1,
|
|
1311
|
-
actionType: 'vim_change_word_end',
|
|
1312
|
-
count: 2,
|
|
1313
|
-
expectedLines: ['h test'],
|
|
1314
|
-
expectedCursorRow: 0,
|
|
1315
|
-
expectedCursorCol: 1,
|
|
1316
|
-
},
|
|
1317
|
-
{
|
|
1318
|
-
command: 'cb',
|
|
1319
|
-
desc: 'change from cursor to start of previous word',
|
|
1320
|
-
lines: ['hello world test'],
|
|
1321
|
-
cursorRow: 0,
|
|
1322
|
-
cursorCol: 11,
|
|
1323
|
-
actionType: 'vim_change_word_backward',
|
|
1324
|
-
count: 1,
|
|
1325
|
-
expectedLines: ['hello test'],
|
|
1326
|
-
expectedCursorRow: 0,
|
|
1327
|
-
expectedCursorCol: 6,
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
command: 'cc',
|
|
1331
|
-
desc: 'clear the line and place cursor at the start',
|
|
1332
|
-
lines: [' hello world'],
|
|
1333
|
-
cursorRow: 0,
|
|
1334
|
-
cursorCol: 5,
|
|
1335
|
-
actionType: 'vim_change_line',
|
|
1336
|
-
count: 1,
|
|
1337
|
-
expectedLines: [''],
|
|
1338
|
-
expectedCursorRow: 0,
|
|
1339
|
-
expectedCursorCol: 0,
|
|
1340
|
-
},
|
|
1341
|
-
{
|
|
1342
|
-
command: 'dd',
|
|
1343
|
-
desc: 'delete the current line',
|
|
1344
|
-
lines: ['line1', 'line2', 'line3'],
|
|
1345
|
-
cursorRow: 1,
|
|
1346
|
-
cursorCol: 2,
|
|
1347
|
-
actionType: 'vim_delete_line',
|
|
1348
|
-
count: 1,
|
|
1349
|
-
expectedLines: ['line1', 'line3'],
|
|
1350
|
-
expectedCursorRow: 1,
|
|
1351
|
-
expectedCursorCol: 0,
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
command: 'dd',
|
|
1355
|
-
desc: 'delete multiple lines with count',
|
|
1356
|
-
lines: ['line1', 'line2', 'line3', 'line4'],
|
|
1357
|
-
cursorRow: 1,
|
|
1358
|
-
cursorCol: 2,
|
|
1359
|
-
actionType: 'vim_delete_line',
|
|
1360
|
-
count: 2,
|
|
1361
|
-
expectedLines: ['line1', 'line4'],
|
|
1362
|
-
expectedCursorRow: 1,
|
|
1363
|
-
expectedCursorCol: 0,
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
command: 'dd',
|
|
1367
|
-
desc: 'handle deleting last line',
|
|
1368
|
-
lines: ['only line'],
|
|
1369
|
-
cursorRow: 0,
|
|
1370
|
-
cursorCol: 3,
|
|
1371
|
-
actionType: 'vim_delete_line',
|
|
1372
|
-
count: 1,
|
|
1373
|
-
expectedLines: [''],
|
|
1374
|
-
expectedCursorRow: 0,
|
|
1375
|
-
expectedCursorCol: 0,
|
|
1376
|
-
},
|
|
1377
|
-
{
|
|
1378
|
-
command: 'D',
|
|
1379
|
-
desc: 'delete from cursor to end of line',
|
|
1380
|
-
lines: ['hello world test'],
|
|
1381
|
-
cursorRow: 0,
|
|
1382
|
-
cursorCol: 6,
|
|
1383
|
-
actionType: 'vim_delete_to_end_of_line',
|
|
1384
|
-
count: 1,
|
|
1385
|
-
expectedLines: ['hello '],
|
|
1386
|
-
expectedCursorRow: 0,
|
|
1387
|
-
// Cursor clamps to last valid index in NORMAL mode (col 5 = trailing space)
|
|
1388
|
-
expectedCursorCol: 5,
|
|
1389
|
-
},
|
|
1390
|
-
{
|
|
1391
|
-
command: 'D',
|
|
1392
|
-
desc: 'handle D at end of line',
|
|
1393
|
-
lines: ['hello world'],
|
|
1394
|
-
cursorRow: 0,
|
|
1395
|
-
cursorCol: 11,
|
|
1396
|
-
actionType: 'vim_delete_to_end_of_line',
|
|
1397
|
-
count: 1,
|
|
1398
|
-
expectedLines: ['hello world'],
|
|
1399
|
-
expectedCursorRow: 0,
|
|
1400
|
-
expectedCursorCol: 11,
|
|
1401
|
-
},
|
|
1402
|
-
{
|
|
1403
|
-
command: 'C',
|
|
1404
|
-
desc: 'change from cursor to end of line',
|
|
1405
|
-
lines: ['hello world test'],
|
|
1406
|
-
cursorRow: 0,
|
|
1407
|
-
cursorCol: 6,
|
|
1408
|
-
actionType: 'vim_change_to_end_of_line',
|
|
1409
|
-
count: 1,
|
|
1410
|
-
expectedLines: ['hello '],
|
|
1411
|
-
expectedCursorRow: 0,
|
|
1412
|
-
expectedCursorCol: 6,
|
|
1413
|
-
},
|
|
1414
|
-
{
|
|
1415
|
-
command: 'C',
|
|
1416
|
-
desc: 'handle C at beginning of line',
|
|
1417
|
-
lines: ['hello world'],
|
|
1418
|
-
cursorRow: 0,
|
|
1419
|
-
cursorCol: 0,
|
|
1420
|
-
actionType: 'vim_change_to_end_of_line',
|
|
1421
|
-
count: 1,
|
|
1422
|
-
expectedLines: [''],
|
|
1423
|
-
expectedCursorRow: 0,
|
|
1424
|
-
expectedCursorCol: 0,
|
|
1425
|
-
},
|
|
1426
|
-
];
|
|
1427
|
-
it.each(testCases)('$command: should $desc', ({ lines, cursorRow, cursorCol, actionType, count, expectedLines, expectedCursorRow, expectedCursorCol, }) => {
|
|
1428
|
-
const initialState = createMockTextBufferState({
|
|
1429
|
-
lines,
|
|
1430
|
-
cursorRow,
|
|
1431
|
-
cursorCol,
|
|
1432
|
-
preferredCol: null,
|
|
1433
|
-
undoStack: [],
|
|
1434
|
-
redoStack: [],
|
|
1435
|
-
clipboard: null,
|
|
1436
|
-
selectionAnchor: null,
|
|
1437
|
-
});
|
|
1438
|
-
const action = (count
|
|
1439
|
-
? { type: actionType, payload: { count } }
|
|
1440
|
-
: { type: actionType });
|
|
1441
|
-
const result = textBufferReducer(initialState, action);
|
|
1442
|
-
expect(result.lines).toEqual(expectedLines);
|
|
1443
|
-
expect(result.cursorRow).toBe(expectedCursorRow);
|
|
1444
|
-
expect(result.cursorCol).toBe(expectedCursorCol);
|
|
1445
|
-
});
|
|
1446
|
-
});
|
|
1447
|
-
describe('double-escape to clear buffer', async () => {
|
|
1448
|
-
beforeEach(() => {
|
|
1449
|
-
mockBuffer = createMockBuffer('hello world');
|
|
1450
|
-
mockVimContext.vimEnabled = true;
|
|
1451
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1452
|
-
mockHandleFinalSubmit = vi.fn();
|
|
1453
|
-
vi.useFakeTimers();
|
|
1454
|
-
});
|
|
1455
|
-
afterEach(() => {
|
|
1456
|
-
vi.useRealTimers();
|
|
1457
|
-
});
|
|
1458
|
-
it('should clear buffer on double-escape in NORMAL mode', async () => {
|
|
1459
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1460
|
-
exitInsertMode(result);
|
|
1461
|
-
// Wait to clear escape history
|
|
1462
|
-
await act(async () => {
|
|
1463
|
-
vi.advanceTimersByTime(600);
|
|
1464
|
-
});
|
|
1465
|
-
// First escape - should pass through (return false)
|
|
1466
|
-
let handled;
|
|
1467
|
-
await act(async () => {
|
|
1468
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1469
|
-
});
|
|
1470
|
-
expect(handled).toBe(false);
|
|
1471
|
-
// Second escape within timeout - should clear buffer (return true)
|
|
1472
|
-
await act(async () => {
|
|
1473
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1474
|
-
});
|
|
1475
|
-
expect(handled).toBe(true);
|
|
1476
|
-
expect(mockBuffer.setText).toHaveBeenCalledWith('');
|
|
1477
|
-
});
|
|
1478
|
-
it('should clear buffer on double-escape in INSERT mode', async () => {
|
|
1479
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1480
|
-
// First escape - switches to NORMAL mode
|
|
1481
|
-
let handled;
|
|
1482
|
-
await act(async () => {
|
|
1483
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1484
|
-
});
|
|
1485
|
-
expect(handled).toBe(true);
|
|
1486
|
-
expect(mockBuffer.vimEscapeInsertMode).toHaveBeenCalled();
|
|
1487
|
-
// Second escape within timeout - should clear buffer
|
|
1488
|
-
await act(async () => {
|
|
1489
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1490
|
-
});
|
|
1491
|
-
expect(handled).toBe(true);
|
|
1492
|
-
expect(mockBuffer.setText).toHaveBeenCalledWith('');
|
|
1493
|
-
});
|
|
1494
|
-
it('should NOT clear buffer if escapes are too slow', async () => {
|
|
1495
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1496
|
-
exitInsertMode(result);
|
|
1497
|
-
// Wait to clear escape history
|
|
1498
|
-
await act(async () => {
|
|
1499
|
-
vi.advanceTimersByTime(600);
|
|
1500
|
-
});
|
|
1501
|
-
// First escape
|
|
1502
|
-
await act(async () => {
|
|
1503
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1504
|
-
});
|
|
1505
|
-
// Wait longer than timeout (500ms)
|
|
1506
|
-
await act(async () => {
|
|
1507
|
-
vi.advanceTimersByTime(600);
|
|
1508
|
-
});
|
|
1509
|
-
// Second escape - should NOT clear buffer because timeout expired
|
|
1510
|
-
let handled;
|
|
1511
|
-
await act(async () => {
|
|
1512
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1513
|
-
});
|
|
1514
|
-
// First escape of new sequence, passes through
|
|
1515
|
-
expect(handled).toBe(false);
|
|
1516
|
-
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
1517
|
-
});
|
|
1518
|
-
it('should clear escape history when clearing pending operator', async () => {
|
|
1519
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1520
|
-
exitInsertMode(result);
|
|
1521
|
-
// Wait to clear escape history
|
|
1522
|
-
await act(async () => {
|
|
1523
|
-
vi.advanceTimersByTime(600);
|
|
1524
|
-
});
|
|
1525
|
-
// First escape
|
|
1526
|
-
await act(async () => {
|
|
1527
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1528
|
-
});
|
|
1529
|
-
// Type 'd' to set pending operator
|
|
1530
|
-
await act(async () => {
|
|
1531
|
-
result.current.handleInput(TEST_SEQUENCES.DELETE);
|
|
1532
|
-
});
|
|
1533
|
-
// Escape to clear pending operator
|
|
1534
|
-
await act(async () => {
|
|
1535
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1536
|
-
});
|
|
1537
|
-
// Another escape - should NOT clear buffer (history was reset)
|
|
1538
|
-
let handled;
|
|
1539
|
-
await act(async () => {
|
|
1540
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1541
|
-
});
|
|
1542
|
-
expect(handled).toBe(false);
|
|
1543
|
-
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
1544
|
-
});
|
|
1545
|
-
it('should pass Ctrl+C through to InputPrompt in NORMAL mode', async () => {
|
|
1546
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1547
|
-
exitInsertMode(result);
|
|
1548
|
-
let handled;
|
|
1549
|
-
await act(async () => {
|
|
1550
|
-
handled = result.current.handleInput(TEST_SEQUENCES.CTRL_C);
|
|
1551
|
-
});
|
|
1552
|
-
// Should return false to let InputPrompt handle it
|
|
1553
|
-
expect(handled).toBe(false);
|
|
1554
|
-
});
|
|
1555
|
-
it('should pass Ctrl+C through to InputPrompt in INSERT mode', async () => {
|
|
1556
|
-
const { result } = await renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1557
|
-
let handled;
|
|
1558
|
-
await act(async () => {
|
|
1559
|
-
handled = result.current.handleInput(TEST_SEQUENCES.CTRL_C);
|
|
1560
|
-
});
|
|
1561
|
-
// Should return false to let InputPrompt handle it
|
|
1562
|
-
expect(handled).toBe(false);
|
|
1563
|
-
});
|
|
1564
|
-
});
|
|
1565
|
-
describe('Character deletion and case toggle (X, ~)', async () => {
|
|
1566
|
-
it('X: should call vimDeleteCharBefore', async () => {
|
|
1567
|
-
const { result } = await renderVimHook();
|
|
1568
|
-
exitInsertMode(result);
|
|
1569
|
-
let handled;
|
|
1570
|
-
act(() => {
|
|
1571
|
-
handled = result.current.handleInput(createKey({ sequence: 'X' }));
|
|
1572
|
-
});
|
|
1573
|
-
expect(handled).toBe(true);
|
|
1574
|
-
expect(mockBuffer.vimDeleteCharBefore).toHaveBeenCalledWith(1);
|
|
1575
|
-
});
|
|
1576
|
-
it('~: should call vimToggleCase', async () => {
|
|
1577
|
-
const { result } = await renderVimHook();
|
|
1578
|
-
exitInsertMode(result);
|
|
1579
|
-
let handled;
|
|
1580
|
-
act(() => {
|
|
1581
|
-
handled = result.current.handleInput(createKey({ sequence: '~' }));
|
|
1582
|
-
});
|
|
1583
|
-
expect(handled).toBe(true);
|
|
1584
|
-
expect(mockBuffer.vimToggleCase).toHaveBeenCalledWith(1);
|
|
1585
|
-
});
|
|
1586
|
-
it('X can be repeated with dot (.)', async () => {
|
|
1587
|
-
const { result } = await renderVimHook();
|
|
1588
|
-
exitInsertMode(result);
|
|
1589
|
-
act(() => {
|
|
1590
|
-
result.current.handleInput(createKey({ sequence: 'X' }));
|
|
1591
|
-
});
|
|
1592
|
-
expect(mockBuffer.vimDeleteCharBefore).toHaveBeenCalledTimes(1);
|
|
1593
|
-
act(() => {
|
|
1594
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
1595
|
-
});
|
|
1596
|
-
expect(mockBuffer.vimDeleteCharBefore).toHaveBeenCalledTimes(2);
|
|
1597
|
-
});
|
|
1598
|
-
it('~ can be repeated with dot (.)', async () => {
|
|
1599
|
-
const { result } = await renderVimHook();
|
|
1600
|
-
exitInsertMode(result);
|
|
1601
|
-
act(() => {
|
|
1602
|
-
result.current.handleInput(createKey({ sequence: '~' }));
|
|
1603
|
-
});
|
|
1604
|
-
expect(mockBuffer.vimToggleCase).toHaveBeenCalledTimes(1);
|
|
1605
|
-
act(() => {
|
|
1606
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
1607
|
-
});
|
|
1608
|
-
expect(mockBuffer.vimToggleCase).toHaveBeenCalledTimes(2);
|
|
1609
|
-
});
|
|
1610
|
-
it('3X calls vimDeleteCharBefore with count=3', async () => {
|
|
1611
|
-
const { result } = await renderVimHook();
|
|
1612
|
-
exitInsertMode(result);
|
|
1613
|
-
act(() => {
|
|
1614
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
1615
|
-
});
|
|
1616
|
-
act(() => {
|
|
1617
|
-
result.current.handleInput(createKey({ sequence: 'X' }));
|
|
1618
|
-
});
|
|
1619
|
-
expect(mockBuffer.vimDeleteCharBefore).toHaveBeenCalledWith(3);
|
|
1620
|
-
});
|
|
1621
|
-
it('2~ calls vimToggleCase with count=2', async () => {
|
|
1622
|
-
const { result } = await renderVimHook();
|
|
1623
|
-
exitInsertMode(result);
|
|
1624
|
-
act(() => {
|
|
1625
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1626
|
-
});
|
|
1627
|
-
act(() => {
|
|
1628
|
-
result.current.handleInput(createKey({ sequence: '~' }));
|
|
1629
|
-
});
|
|
1630
|
-
expect(mockBuffer.vimToggleCase).toHaveBeenCalledWith(2);
|
|
1631
|
-
});
|
|
1632
|
-
});
|
|
1633
|
-
describe('Replace character (r)', async () => {
|
|
1634
|
-
it('r{char}: should call vimReplaceChar with the next key', async () => {
|
|
1635
|
-
const { result } = await renderVimHook();
|
|
1636
|
-
exitInsertMode(result);
|
|
1637
|
-
act(() => {
|
|
1638
|
-
result.current.handleInput(createKey({ sequence: 'r' }));
|
|
1639
|
-
});
|
|
1640
|
-
act(() => {
|
|
1641
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
1642
|
-
});
|
|
1643
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenCalledWith('x', 1);
|
|
1644
|
-
});
|
|
1645
|
-
it('r: should consume the pending char without passing through', async () => {
|
|
1646
|
-
const { result } = await renderVimHook();
|
|
1647
|
-
exitInsertMode(result);
|
|
1648
|
-
let rHandled;
|
|
1649
|
-
let charHandled;
|
|
1650
|
-
act(() => {
|
|
1651
|
-
rHandled = result.current.handleInput(createKey({ sequence: 'r' }));
|
|
1652
|
-
});
|
|
1653
|
-
act(() => {
|
|
1654
|
-
charHandled = result.current.handleInput(createKey({ sequence: 'a' }));
|
|
1655
|
-
});
|
|
1656
|
-
expect(rHandled).toBe(true);
|
|
1657
|
-
expect(charHandled).toBe(true);
|
|
1658
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenCalledWith('a', 1);
|
|
1659
|
-
});
|
|
1660
|
-
it('Escape cancels pending r (pendingFindOp cleared on Esc)', async () => {
|
|
1661
|
-
const { result } = await renderVimHook();
|
|
1662
|
-
exitInsertMode(result);
|
|
1663
|
-
act(() => {
|
|
1664
|
-
result.current.handleInput(createKey({ sequence: 'r' }));
|
|
1665
|
-
});
|
|
1666
|
-
act(() => {
|
|
1667
|
-
result.current.handleInput(createKey({ sequence: '\u001b', name: 'escape' }));
|
|
1668
|
-
});
|
|
1669
|
-
act(() => {
|
|
1670
|
-
result.current.handleInput(createKey({ sequence: 'a' }));
|
|
1671
|
-
});
|
|
1672
|
-
expect(mockBuffer.vimReplaceChar).not.toHaveBeenCalled();
|
|
1673
|
-
});
|
|
1674
|
-
it('2rx calls vimReplaceChar with count=2', async () => {
|
|
1675
|
-
const { result } = await renderVimHook();
|
|
1676
|
-
exitInsertMode(result);
|
|
1677
|
-
act(() => {
|
|
1678
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1679
|
-
});
|
|
1680
|
-
act(() => {
|
|
1681
|
-
result.current.handleInput(createKey({ sequence: 'r' }));
|
|
1682
|
-
});
|
|
1683
|
-
act(() => {
|
|
1684
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
1685
|
-
});
|
|
1686
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenCalledWith('x', 2);
|
|
1687
|
-
});
|
|
1688
|
-
it('r{char} is dot-repeatable', async () => {
|
|
1689
|
-
const { result } = await renderVimHook();
|
|
1690
|
-
exitInsertMode(result);
|
|
1691
|
-
act(() => {
|
|
1692
|
-
result.current.handleInput(createKey({ sequence: 'r' }));
|
|
1693
|
-
});
|
|
1694
|
-
act(() => {
|
|
1695
|
-
result.current.handleInput(createKey({ sequence: 'z' }));
|
|
1696
|
-
});
|
|
1697
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenCalledWith('z', 1);
|
|
1698
|
-
act(() => {
|
|
1699
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
1700
|
-
});
|
|
1701
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenCalledTimes(2);
|
|
1702
|
-
expect(mockBuffer.vimReplaceChar).toHaveBeenLastCalledWith('z', 1);
|
|
1703
|
-
});
|
|
1704
|
-
});
|
|
1705
|
-
describe('Character find motions (f, F, t, T, ;, ,)', async () => {
|
|
1706
|
-
it.each([
|
|
1707
|
-
{ key: 'f', char: 'o', mockFn: 'vimFindCharForward', till: false },
|
|
1708
|
-
{ key: 'F', char: 'o', mockFn: 'vimFindCharBackward', till: false },
|
|
1709
|
-
{ key: 't', char: 'w', mockFn: 'vimFindCharForward', till: true },
|
|
1710
|
-
{ key: 'T', char: 'w', mockFn: 'vimFindCharBackward', till: true },
|
|
1711
|
-
])('$key{char}: calls $mockFn (till=$till)', async ({ key, char, mockFn, till }) => {
|
|
1712
|
-
const { result } = await renderVimHook();
|
|
1713
|
-
exitInsertMode(result);
|
|
1714
|
-
act(() => {
|
|
1715
|
-
result.current.handleInput(createKey({ sequence: key }));
|
|
1716
|
-
});
|
|
1717
|
-
act(() => {
|
|
1718
|
-
result.current.handleInput(createKey({ sequence: char }));
|
|
1719
|
-
});
|
|
1720
|
-
expect(mockBuffer[mockFn]).toHaveBeenCalledWith(char, 1, till);
|
|
1721
|
-
});
|
|
1722
|
-
it(';: should repeat last f forward find', async () => {
|
|
1723
|
-
const { result } = await renderVimHook();
|
|
1724
|
-
exitInsertMode(result);
|
|
1725
|
-
// f o
|
|
1726
|
-
act(() => {
|
|
1727
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1728
|
-
});
|
|
1729
|
-
act(() => {
|
|
1730
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1731
|
-
});
|
|
1732
|
-
// ;
|
|
1733
|
-
act(() => {
|
|
1734
|
-
result.current.handleInput(createKey({ sequence: ';' }));
|
|
1735
|
-
});
|
|
1736
|
-
expect(mockBuffer.vimFindCharForward).toHaveBeenCalledTimes(2);
|
|
1737
|
-
expect(mockBuffer.vimFindCharForward).toHaveBeenLastCalledWith('o', 1, false);
|
|
1738
|
-
});
|
|
1739
|
-
it(',: should repeat last f find in reverse direction', async () => {
|
|
1740
|
-
const { result } = await renderVimHook();
|
|
1741
|
-
exitInsertMode(result);
|
|
1742
|
-
// f o
|
|
1743
|
-
act(() => {
|
|
1744
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1745
|
-
});
|
|
1746
|
-
act(() => {
|
|
1747
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1748
|
-
});
|
|
1749
|
-
// ,
|
|
1750
|
-
act(() => {
|
|
1751
|
-
result.current.handleInput(createKey({ sequence: ',' }));
|
|
1752
|
-
});
|
|
1753
|
-
expect(mockBuffer.vimFindCharBackward).toHaveBeenCalledWith('o', 1, false);
|
|
1754
|
-
});
|
|
1755
|
-
it('; and , should do nothing if no prior find', async () => {
|
|
1756
|
-
const { result } = await renderVimHook();
|
|
1757
|
-
exitInsertMode(result);
|
|
1758
|
-
act(() => {
|
|
1759
|
-
result.current.handleInput(createKey({ sequence: ';' }));
|
|
1760
|
-
});
|
|
1761
|
-
act(() => {
|
|
1762
|
-
result.current.handleInput(createKey({ sequence: ',' }));
|
|
1763
|
-
});
|
|
1764
|
-
expect(mockBuffer.vimFindCharForward).not.toHaveBeenCalled();
|
|
1765
|
-
expect(mockBuffer.vimFindCharBackward).not.toHaveBeenCalled();
|
|
1766
|
-
});
|
|
1767
|
-
it('Escape cancels pending f (pendingFindOp cleared on Esc)', async () => {
|
|
1768
|
-
const { result } = await renderVimHook();
|
|
1769
|
-
exitInsertMode(result);
|
|
1770
|
-
act(() => {
|
|
1771
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1772
|
-
});
|
|
1773
|
-
act(() => {
|
|
1774
|
-
result.current.handleInput(createKey({ sequence: '\u001b', name: 'escape' }));
|
|
1775
|
-
});
|
|
1776
|
-
// o should NOT be consumed as find target
|
|
1777
|
-
act(() => {
|
|
1778
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1779
|
-
});
|
|
1780
|
-
expect(mockBuffer.vimFindCharForward).not.toHaveBeenCalled();
|
|
1781
|
-
});
|
|
1782
|
-
it('2fo calls vimFindCharForward with count=2', async () => {
|
|
1783
|
-
const { result } = await renderVimHook();
|
|
1784
|
-
exitInsertMode(result);
|
|
1785
|
-
act(() => {
|
|
1786
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1787
|
-
});
|
|
1788
|
-
act(() => {
|
|
1789
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1790
|
-
});
|
|
1791
|
-
act(() => {
|
|
1792
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1793
|
-
});
|
|
1794
|
-
expect(mockBuffer.vimFindCharForward).toHaveBeenCalledWith('o', 2, false);
|
|
1795
|
-
});
|
|
1796
|
-
});
|
|
1797
|
-
describe('should handle unmapped keys in Normal mode', () => {
|
|
1798
|
-
it.each([
|
|
1799
|
-
{ char: 'm', insertable: true },
|
|
1800
|
-
{ char: 'n', insertable: true },
|
|
1801
|
-
{ char: 'p', insertable: true },
|
|
1802
|
-
{ char: 'q', insertable: true },
|
|
1803
|
-
{ char: 's', insertable: true },
|
|
1804
|
-
{ char: 'v', insertable: true },
|
|
1805
|
-
{ char: 'y', insertable: true },
|
|
1806
|
-
{ char: 'z', insertable: true },
|
|
1807
|
-
{ char: 'H', insertable: true },
|
|
1808
|
-
{ char: 'J', insertable: true },
|
|
1809
|
-
{ char: 'K', insertable: true },
|
|
1810
|
-
{ char: 'L', insertable: true },
|
|
1811
|
-
{ char: 'M', insertable: true },
|
|
1812
|
-
{ char: 'N', insertable: true },
|
|
1813
|
-
{ char: 'P', insertable: true },
|
|
1814
|
-
{ char: 'Q', insertable: true },
|
|
1815
|
-
{ char: 'R', insertable: true },
|
|
1816
|
-
{ char: 'S', insertable: true },
|
|
1817
|
-
{ char: 'U', insertable: true },
|
|
1818
|
-
{ char: 'V', insertable: true },
|
|
1819
|
-
{ char: 'Y', insertable: true },
|
|
1820
|
-
{ char: 'Z', insertable: true },
|
|
1821
|
-
{ char: '/', insertable: true },
|
|
1822
|
-
{ char: '#', insertable: true },
|
|
1823
|
-
{ char: '%', insertable: true },
|
|
1824
|
-
{ char: '&', insertable: true },
|
|
1825
|
-
{ char: "'", insertable: true },
|
|
1826
|
-
{ char: '(', insertable: true },
|
|
1827
|
-
{ char: ')', insertable: true },
|
|
1828
|
-
{ char: '*', insertable: true },
|
|
1829
|
-
{ char: '+', insertable: true },
|
|
1830
|
-
{ char: '-', insertable: true },
|
|
1831
|
-
{ char: '/', insertable: true },
|
|
1832
|
-
{ char: ':', insertable: true },
|
|
1833
|
-
{ char: '<', insertable: true },
|
|
1834
|
-
{ char: '=', insertable: true },
|
|
1835
|
-
{ char: '>', insertable: true },
|
|
1836
|
-
{ char: '@', insertable: true },
|
|
1837
|
-
{ char: '[', insertable: true },
|
|
1838
|
-
{ char: '\\', insertable: true },
|
|
1839
|
-
{ char: ']', insertable: true },
|
|
1840
|
-
{ char: '_', insertable: true },
|
|
1841
|
-
{ char: '`', insertable: true },
|
|
1842
|
-
{ char: '{', insertable: true },
|
|
1843
|
-
{ char: '|', insertable: true },
|
|
1844
|
-
{ char: '}', insertable: true },
|
|
1845
|
-
])('$char: should be swallowed and do nothing in Normal mode', async ({ char, insertable }) => {
|
|
1846
|
-
const { result } = await renderVimHook();
|
|
1847
|
-
exitInsertMode(result);
|
|
1848
|
-
let handled = false;
|
|
1849
|
-
act(() => {
|
|
1850
|
-
handled = result.current.handleInput(createKey({ sequence: char, name: char, insertable }));
|
|
1851
|
-
});
|
|
1852
|
-
expect(handled).toBe(true);
|
|
1853
|
-
expect(mockVimContext.setVimMode).not.toHaveBeenCalledWith('INSERT');
|
|
1854
|
-
expect(mockBuffer.vimFindCharForward).not.toHaveBeenCalled();
|
|
1855
|
-
expect(mockBuffer.vimFindCharBackward).not.toHaveBeenCalled();
|
|
1856
|
-
});
|
|
1857
|
-
});
|
|
1858
|
-
describe('Operator + find motions (df, dt, dF, dT, cf, ct, cF, cT)', async () => {
|
|
1859
|
-
it('df{char}: executes delete-to-char, not a dangling operator', async () => {
|
|
1860
|
-
const { result } = await renderVimHook();
|
|
1861
|
-
exitInsertMode(result);
|
|
1862
|
-
act(() => {
|
|
1863
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1864
|
-
});
|
|
1865
|
-
act(() => {
|
|
1866
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1867
|
-
});
|
|
1868
|
-
act(() => {
|
|
1869
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
1870
|
-
});
|
|
1871
|
-
expect(mockBuffer.vimDeleteToCharForward).toHaveBeenCalledWith('x', 1, false);
|
|
1872
|
-
expect(mockBuffer.vimFindCharForward).not.toHaveBeenCalled();
|
|
1873
|
-
// Next key is a fresh normal-mode command — no dangling state
|
|
1874
|
-
act(() => {
|
|
1875
|
-
result.current.handleInput(createKey({ sequence: 'l' }));
|
|
1876
|
-
});
|
|
1877
|
-
expect(mockBuffer.vimMoveRight).toHaveBeenCalledWith(1);
|
|
1878
|
-
});
|
|
1879
|
-
it.each([
|
|
1880
|
-
{
|
|
1881
|
-
operator: 'd',
|
|
1882
|
-
findKey: 'f',
|
|
1883
|
-
mockFn: 'vimDeleteToCharForward',
|
|
1884
|
-
till: false,
|
|
1885
|
-
entersInsert: false,
|
|
1886
|
-
},
|
|
1887
|
-
{
|
|
1888
|
-
operator: 'd',
|
|
1889
|
-
findKey: 't',
|
|
1890
|
-
mockFn: 'vimDeleteToCharForward',
|
|
1891
|
-
till: true,
|
|
1892
|
-
entersInsert: false,
|
|
1893
|
-
},
|
|
1894
|
-
{
|
|
1895
|
-
operator: 'd',
|
|
1896
|
-
findKey: 'F',
|
|
1897
|
-
mockFn: 'vimDeleteToCharBackward',
|
|
1898
|
-
till: false,
|
|
1899
|
-
entersInsert: false,
|
|
1900
|
-
},
|
|
1901
|
-
{
|
|
1902
|
-
operator: 'd',
|
|
1903
|
-
findKey: 'T',
|
|
1904
|
-
mockFn: 'vimDeleteToCharBackward',
|
|
1905
|
-
till: true,
|
|
1906
|
-
entersInsert: false,
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
operator: 'c',
|
|
1910
|
-
findKey: 'f',
|
|
1911
|
-
mockFn: 'vimDeleteToCharForward',
|
|
1912
|
-
till: false,
|
|
1913
|
-
entersInsert: true,
|
|
1914
|
-
},
|
|
1915
|
-
{
|
|
1916
|
-
operator: 'c',
|
|
1917
|
-
findKey: 't',
|
|
1918
|
-
mockFn: 'vimDeleteToCharForward',
|
|
1919
|
-
till: true,
|
|
1920
|
-
entersInsert: true,
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
operator: 'c',
|
|
1924
|
-
findKey: 'F',
|
|
1925
|
-
mockFn: 'vimDeleteToCharBackward',
|
|
1926
|
-
till: false,
|
|
1927
|
-
entersInsert: true,
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
operator: 'c',
|
|
1931
|
-
findKey: 'T',
|
|
1932
|
-
mockFn: 'vimDeleteToCharBackward',
|
|
1933
|
-
till: true,
|
|
1934
|
-
entersInsert: true,
|
|
1935
|
-
},
|
|
1936
|
-
])('$operator$findKey{char}: calls $mockFn (till=$till, insert=$entersInsert)', async ({ operator, findKey, mockFn, till, entersInsert }) => {
|
|
1937
|
-
const { result } = await renderVimHook();
|
|
1938
|
-
exitInsertMode(result);
|
|
1939
|
-
act(() => {
|
|
1940
|
-
result.current.handleInput(createKey({ sequence: operator }));
|
|
1941
|
-
});
|
|
1942
|
-
act(() => {
|
|
1943
|
-
result.current.handleInput(createKey({ sequence: findKey }));
|
|
1944
|
-
});
|
|
1945
|
-
act(() => {
|
|
1946
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1947
|
-
});
|
|
1948
|
-
expect(mockBuffer[mockFn]).toHaveBeenCalledWith('o', 1, till);
|
|
1949
|
-
if (entersInsert) {
|
|
1950
|
-
expect(mockVimContext.setVimMode).toHaveBeenCalledWith('INSERT');
|
|
1951
|
-
}
|
|
1952
|
-
});
|
|
1953
|
-
it('2df{char}: count is passed through to vimDeleteToCharForward', async () => {
|
|
1954
|
-
const { result } = await renderVimHook();
|
|
1955
|
-
exitInsertMode(result);
|
|
1956
|
-
act(() => {
|
|
1957
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1958
|
-
});
|
|
1959
|
-
act(() => {
|
|
1960
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1961
|
-
});
|
|
1962
|
-
act(() => {
|
|
1963
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
1964
|
-
});
|
|
1965
|
-
act(() => {
|
|
1966
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
1967
|
-
});
|
|
1968
|
-
expect(mockBuffer.vimDeleteToCharForward).toHaveBeenCalledWith('o', 2, false);
|
|
1969
|
-
});
|
|
1970
|
-
});
|
|
1971
|
-
describe('Yank and paste (y/p/P)', async () => {
|
|
1972
|
-
it('should handle yy (yank line)', async () => {
|
|
1973
|
-
const { result } = await renderVimHook();
|
|
1974
|
-
exitInsertMode(result);
|
|
1975
|
-
act(() => {
|
|
1976
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
1977
|
-
});
|
|
1978
|
-
act(() => {
|
|
1979
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
1980
|
-
});
|
|
1981
|
-
expect(mockBuffer.vimYankLine).toHaveBeenCalledWith(1);
|
|
1982
|
-
});
|
|
1983
|
-
it('should handle 2yy (yank 2 lines)', async () => {
|
|
1984
|
-
const { result } = await renderVimHook();
|
|
1985
|
-
exitInsertMode(result);
|
|
1986
|
-
act(() => {
|
|
1987
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
1988
|
-
});
|
|
1989
|
-
act(() => {
|
|
1990
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
1991
|
-
});
|
|
1992
|
-
act(() => {
|
|
1993
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
1994
|
-
});
|
|
1995
|
-
expect(mockBuffer.vimYankLine).toHaveBeenCalledWith(2);
|
|
1996
|
-
});
|
|
1997
|
-
it('should handle Y (yank to end of line, equivalent to y$)', async () => {
|
|
1998
|
-
const { result } = await renderVimHook();
|
|
1999
|
-
exitInsertMode(result);
|
|
2000
|
-
act(() => {
|
|
2001
|
-
result.current.handleInput(createKey({ sequence: 'Y' }));
|
|
2002
|
-
});
|
|
2003
|
-
expect(mockBuffer.vimYankToEndOfLine).toHaveBeenCalledWith(1);
|
|
2004
|
-
});
|
|
2005
|
-
it('should handle yw (yank word forward)', async () => {
|
|
2006
|
-
const { result } = await renderVimHook();
|
|
2007
|
-
exitInsertMode(result);
|
|
2008
|
-
act(() => {
|
|
2009
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
2010
|
-
});
|
|
2011
|
-
act(() => {
|
|
2012
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
2013
|
-
});
|
|
2014
|
-
expect(mockBuffer.vimYankWordForward).toHaveBeenCalledWith(1);
|
|
2015
|
-
});
|
|
2016
|
-
it('should handle yW (yank big word forward)', async () => {
|
|
2017
|
-
const { result } = await renderVimHook();
|
|
2018
|
-
exitInsertMode(result);
|
|
2019
|
-
act(() => {
|
|
2020
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
2021
|
-
});
|
|
2022
|
-
act(() => {
|
|
2023
|
-
result.current.handleInput(createKey({ sequence: 'W' }));
|
|
2024
|
-
});
|
|
2025
|
-
expect(mockBuffer.vimYankBigWordForward).toHaveBeenCalledWith(1);
|
|
2026
|
-
});
|
|
2027
|
-
it('should handle ye (yank to end of word)', async () => {
|
|
2028
|
-
const { result } = await renderVimHook();
|
|
2029
|
-
exitInsertMode(result);
|
|
2030
|
-
act(() => {
|
|
2031
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
2032
|
-
});
|
|
2033
|
-
act(() => {
|
|
2034
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
2035
|
-
});
|
|
2036
|
-
expect(mockBuffer.vimYankWordEnd).toHaveBeenCalledWith(1);
|
|
2037
|
-
});
|
|
2038
|
-
it('should handle yE (yank to end of big word)', async () => {
|
|
2039
|
-
const { result } = await renderVimHook();
|
|
2040
|
-
exitInsertMode(result);
|
|
2041
|
-
act(() => {
|
|
2042
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
2043
|
-
});
|
|
2044
|
-
act(() => {
|
|
2045
|
-
result.current.handleInput(createKey({ sequence: 'E' }));
|
|
2046
|
-
});
|
|
2047
|
-
expect(mockBuffer.vimYankBigWordEnd).toHaveBeenCalledWith(1);
|
|
2048
|
-
});
|
|
2049
|
-
it('should handle y$ (yank to end of line)', async () => {
|
|
2050
|
-
const { result } = await renderVimHook();
|
|
2051
|
-
exitInsertMode(result);
|
|
2052
|
-
act(() => {
|
|
2053
|
-
result.current.handleInput(createKey({ sequence: 'y' }));
|
|
2054
|
-
});
|
|
2055
|
-
act(() => {
|
|
2056
|
-
result.current.handleInput(createKey({ sequence: '$' }));
|
|
2057
|
-
});
|
|
2058
|
-
expect(mockBuffer.vimYankToEndOfLine).toHaveBeenCalledWith(1);
|
|
2059
|
-
});
|
|
2060
|
-
it('should handle p (paste after)', async () => {
|
|
2061
|
-
const { result } = await renderVimHook();
|
|
2062
|
-
exitInsertMode(result);
|
|
2063
|
-
act(() => {
|
|
2064
|
-
result.current.handleInput(createKey({ sequence: 'p' }));
|
|
2065
|
-
});
|
|
2066
|
-
expect(mockBuffer.vimPasteAfter).toHaveBeenCalledWith(1);
|
|
2067
|
-
});
|
|
2068
|
-
it('should handle 2p (paste after, count 2)', async () => {
|
|
2069
|
-
const { result } = await renderVimHook();
|
|
2070
|
-
exitInsertMode(result);
|
|
2071
|
-
act(() => {
|
|
2072
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
2073
|
-
});
|
|
2074
|
-
act(() => {
|
|
2075
|
-
result.current.handleInput(createKey({ sequence: 'p' }));
|
|
2076
|
-
});
|
|
2077
|
-
expect(mockBuffer.vimPasteAfter).toHaveBeenCalledWith(2);
|
|
2078
|
-
});
|
|
2079
|
-
it('should handle P (paste before)', async () => {
|
|
2080
|
-
const { result } = await renderVimHook();
|
|
2081
|
-
exitInsertMode(result);
|
|
2082
|
-
act(() => {
|
|
2083
|
-
result.current.handleInput(createKey({ sequence: 'P' }));
|
|
2084
|
-
});
|
|
2085
|
-
expect(mockBuffer.vimPasteBefore).toHaveBeenCalledWith(1);
|
|
2086
|
-
});
|
|
2087
|
-
// Integration tests using actual textBufferReducer to verify full state changes
|
|
2088
|
-
it('should duplicate a line below with yy then p', async () => {
|
|
2089
|
-
const initialState = createMockTextBufferState({
|
|
2090
|
-
lines: ['hello', 'world'],
|
|
2091
|
-
cursorRow: 0,
|
|
2092
|
-
cursorCol: 0,
|
|
2093
|
-
});
|
|
2094
|
-
// Simulate yy action
|
|
2095
|
-
let state = textBufferReducer(initialState, {
|
|
2096
|
-
type: 'vim_yank_line',
|
|
2097
|
-
payload: { count: 1 },
|
|
2098
|
-
});
|
|
2099
|
-
expect(state.yankRegister).toEqual({ text: 'hello', linewise: true });
|
|
2100
|
-
expect(state.lines).toEqual(['hello', 'world']); // unchanged
|
|
2101
|
-
// Simulate p action
|
|
2102
|
-
state = textBufferReducer(state, {
|
|
2103
|
-
type: 'vim_paste_after',
|
|
2104
|
-
payload: { count: 1 },
|
|
2105
|
-
});
|
|
2106
|
-
expect(state.lines).toEqual(['hello', 'hello', 'world']);
|
|
2107
|
-
expect(state.cursorRow).toBe(1);
|
|
2108
|
-
expect(state.cursorCol).toBe(0);
|
|
2109
|
-
});
|
|
2110
|
-
it('should paste a yanked word after cursor with yw then p', async () => {
|
|
2111
|
-
const initialState = createMockTextBufferState({
|
|
2112
|
-
lines: ['hello world'],
|
|
2113
|
-
cursorRow: 0,
|
|
2114
|
-
cursorCol: 0,
|
|
2115
|
-
});
|
|
2116
|
-
// Simulate yw action
|
|
2117
|
-
let state = textBufferReducer(initialState, {
|
|
2118
|
-
type: 'vim_yank_word_forward',
|
|
2119
|
-
payload: { count: 1 },
|
|
2120
|
-
});
|
|
2121
|
-
expect(state.yankRegister).toEqual({ text: 'hello ', linewise: false });
|
|
2122
|
-
expect(state.lines).toEqual(['hello world']); // unchanged
|
|
2123
|
-
// Move cursor to col 6 (start of 'world') and paste
|
|
2124
|
-
state = { ...state, cursorCol: 6 };
|
|
2125
|
-
state = textBufferReducer(state, {
|
|
2126
|
-
type: 'vim_paste_after',
|
|
2127
|
-
payload: { count: 1 },
|
|
2128
|
-
});
|
|
2129
|
-
// 'hello world' with paste after col 6 (between 'w' and 'o')
|
|
2130
|
-
// insert 'hello ' at col 7, result: 'hello whello orld'
|
|
2131
|
-
expect(state.lines[0]).toContain('hello ');
|
|
2132
|
-
});
|
|
2133
|
-
it('should move a word forward with dw then p', async () => {
|
|
2134
|
-
const initialState = createMockTextBufferState({
|
|
2135
|
-
lines: ['hello world'],
|
|
2136
|
-
cursorRow: 0,
|
|
2137
|
-
cursorCol: 0,
|
|
2138
|
-
});
|
|
2139
|
-
// Simulate dw (delete word, populates register)
|
|
2140
|
-
let state = textBufferReducer(initialState, {
|
|
2141
|
-
type: 'vim_delete_word_forward',
|
|
2142
|
-
payload: { count: 1 },
|
|
2143
|
-
});
|
|
2144
|
-
expect(state.yankRegister).toEqual({ text: 'hello ', linewise: false });
|
|
2145
|
-
expect(state.lines[0]).toBe('world');
|
|
2146
|
-
// Paste at end of 'world' (after last char)
|
|
2147
|
-
state = { ...state, cursorCol: 4 };
|
|
2148
|
-
state = textBufferReducer(state, {
|
|
2149
|
-
type: 'vim_paste_after',
|
|
2150
|
-
payload: { count: 1 },
|
|
2151
|
-
});
|
|
2152
|
-
expect(state.lines[0]).toContain('hello');
|
|
2153
|
-
});
|
|
2154
|
-
});
|
|
2155
|
-
});
|
|
2156
|
-
//# sourceMappingURL=vim.test.js.map
|