@didim365/agent-cli 0.1.1 → 0.1.3
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/dist/package.json +5 -2
- package/dist/src/config/settingsSchema.d.ts +85 -0
- package/dist/src/config/settingsSchema.js +85 -0
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/core/initializer.js +42 -3
- package/dist/src/core/initializer.js.map +1 -1
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +79 -5
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/test-utils/render.js +9 -0
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/AppContainer.js +182 -9
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.d.ts +3 -1
- package/dist/src/ui/auth/ApiAuthDialog.js +7 -5
- package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.d.ts +3 -1
- package/dist/src/ui/auth/AuthDialog.js +6 -6
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/ProviderSelectDialog.d.ts +15 -0
- package/dist/src/ui/auth/ProviderSelectDialog.js +39 -0
- package/dist/src/ui/auth/ProviderSelectDialog.js.map +1 -0
- package/dist/src/ui/auth/SlmConfigDialog.d.ts +21 -0
- package/dist/src/ui/auth/SlmConfigDialog.js +170 -0
- package/dist/src/ui/auth/SlmConfigDialog.js.map +1 -0
- package/dist/src/ui/auth/VertexConfigDialog.d.ts +18 -0
- package/dist/src/ui/auth/VertexConfigDialog.js +97 -0
- package/dist/src/ui/auth/VertexConfigDialog.js.map +1 -0
- package/dist/src/ui/auth/providerMetadata.d.ts +38 -0
- package/dist/src/ui/auth/providerMetadata.js +71 -0
- package/dist/src/ui/auth/providerMetadata.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +3 -0
- package/dist/src/ui/auth/useAuth.js +243 -39
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/commands/authCommand.js +18 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.js +1 -1
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/rewindCommand.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +27 -2
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +1 -1
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +14 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +4 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/useRewind.js.map +1 -1
- package/dist/src/ui/types.d.ts +4 -1
- package/dist/src/ui/types.js +6 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/mouse.js +1 -1
- package/dist/src/ui/utils/mouse.js.map +1 -1
- package/dist/src/ui/utils/rewindFileOps.js.map +1 -1
- package/package.json +6 -3
- package/dist/src/commands/extensions/configure.test.d.ts +0 -1
- package/dist/src/commands/extensions/configure.test.js +0 -197
- 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 -140
- 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 -137
- 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 -148
- 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 -199
- 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 -170
- 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/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 -150
- 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 -189
- 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 -65
- 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 -96
- 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 -107
- 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 -95
- package/dist/src/commands/skills/install.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 -136
- 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 -61
- 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 -89
- 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 -2413
- 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 -114
- package/dist/src/config/extension-manager-agents.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 -153
- 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 -148
- package/dist/src/config/extension-manager-skills.test.js.map +0 -1
- package/dist/src/config/extension.test.d.ts +0 -6
- package/dist/src/config/extension.test.js +0 -1671
- package/dist/src/config/extension.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 -280
- 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 -493
- 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 -230
- 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 -441
- 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 -169
- 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 -231
- 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 -103
- package/dist/src/config/extensions/variables.test.js.map +0 -1
- package/dist/src/config/keyBindings.test.d.ts +0 -6
- package/dist/src/config/keyBindings.test.js +0 -108
- package/dist/src/config/keyBindings.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 -147
- package/dist/src/config/mcp/mcpServerEnablement.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 -353
- package/dist/src/config/policy-engine.integration.test.js.map +0 -1
- package/dist/src/config/sandboxConfig.test.d.ts +0 -6
- package/dist/src/config/sandboxConfig.test.js +0 -184
- 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-validation.test.d.ts +0 -6
- package/dist/src/config/settings-validation.test.js +0 -370
- 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 -1822
- 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 -309
- 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 -166
- 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 -123
- package/dist/src/config/settings_validation_warning.test.js.map +0 -1
- package/dist/src/config/skills-backward-compatibility.test.d.ts +0 -6
- package/dist/src/config/skills-backward-compatibility.test.js +0 -99
- package/dist/src/config/skills-backward-compatibility.test.js.map +0 -1
- package/dist/src/config/trustedFolders.test.d.ts +0 -6
- package/dist/src/config/trustedFolders.test.js +0 -385
- package/dist/src/config/trustedFolders.test.js.map +0 -1
- package/dist/src/core/auth.test.d.ts +0 -6
- package/dist/src/core/auth.test.js +0 -47
- 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 -101
- 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 -164
- 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 -1334
- 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 -208
- package/dist/src/gemini_cleanup.test.js.map +0 -1
- package/dist/src/nonInteractiveCli.test.d.ts +0 -6
- package/dist/src/nonInteractiveCli.test.js +0 -1687
- package/dist/src/nonInteractiveCli.test.js.map +0 -1
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
- package/dist/src/services/BuiltinCommandLoader.test.js +0 -254
- 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 -234
- 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 -1102
- 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/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 -174
- 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 -514
- package/dist/src/services/prompt-processors/shellProcessor.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 -79
- 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 -218
- 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 -2072
- 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 -158
- package/dist/src/ui/IdeIntegrationNudge.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 -109
- 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 -309
- 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 -81
- package/dist/src/ui/auth/AuthInProgress.test.js.map +0 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +0 -66
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.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 -189
- 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 -143
- 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 -344
- 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 -98
- 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 -186
- package/dist/src/ui/commands/bugCommand.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 -620
- 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 -87
- package/dist/src/ui/commands/clearCommand.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 -98
- 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 -242
- 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 -353
- 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/extensionsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/extensionsCommand.test.js +0 -778
- 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 -42
- 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 -572
- 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 -203
- 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 -84
- 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 -189
- 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 -350
- 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 -41
- 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/policiesCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/policiesCommand.test.js +0 -87
- 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 -50
- 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 -190
- package/dist/src/ui/commands/restoreCommand.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 -242
- 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 -426
- 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 -70
- package/dist/src/ui/commands/statsCommand.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 -100
- package/dist/src/ui/commands/toolsCommand.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 -59
- 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 -241
- 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 -190
- 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 -92
- 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 -225
- package/dist/src/ui/components/AppHeader.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 -598
- package/dist/src/ui/components/AskUserDialog.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 -24
- package/dist/src/ui/components/Banner.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 -28
- package/dist/src/ui/components/CliSpinner.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 -383
- 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 -117
- 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 -77
- 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 -26
- 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 -102
- 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 -43
- 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 -33
- 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 -229
- 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 -39
- 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 -177
- 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 -119
- package/dist/src/ui/components/EditorSettingsDialog.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 -54
- 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 -102
- 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 -321
- package/dist/src/ui/components/Footer.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 -61
- 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 -105
- 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 -147
- 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 -207
- 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 -51
- package/dist/src/ui/components/HookStatusDisplay.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 -58
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
- package/dist/src/ui/components/InputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/InputPrompt.test.js +0 -2596
- 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 -207
- 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 -59
- 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 -25
- 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 -83
- 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 -49
- 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 -197
- package/dist/src/ui/components/ModelDialog.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 -343
- 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 -162
- 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 -48
- 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 -164
- package/dist/src/ui/components/Notifications.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 -162
- package/dist/src/ui/components/PermissionsModifyTrustDialog.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 -191
- package/dist/src/ui/components/ProQuotaDialog.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 -49
- package/dist/src/ui/components/QuittingDisplay.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 -34
- 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 -53
- 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 -241
- package/dist/src/ui/components/RewindViewer.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 -256
- 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 -75
- 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 -1150
- 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 -91
- 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 -17
- package/dist/src/ui/components/ShellModeIndicator.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 -40
- package/dist/src/ui/components/ShowMoreLines.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 -438
- 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 -155
- package/dist/src/ui/components/StatusDisplay.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 -17
- 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 -56
- 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 -53
- 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 -167
- 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 -30
- 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/ToolConfirmationQueue.test.d.ts +0 -6
- package/dist/src/ui/components/ToolConfirmationQueue.test.js +0 -71
- 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 -227
- 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 -16
- package/dist/src/ui/components/UpdateNotification.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 -153
- package/dist/src/ui/components/ValidationDialog.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 -191
- package/dist/src/ui/components/messages/CompressionMessage.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 -240
- 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 -23
- package/dist/src/ui/components/messages/ErrorMessage.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 -35
- package/dist/src/ui/components/messages/GeminiMessage.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 -28
- 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 -33
- 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 -123
- package/dist/src/ui/components/messages/ShellToolMessage.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 -114
- 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 -232
- package/dist/src/ui/components/messages/ToolConfirmationMessage.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 -529
- package/dist/src/ui/components/messages/ToolGroupMessage.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 -217
- 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 -89
- 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 -62
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.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 -114
- package/dist/src/ui/components/messages/ToolResultDisplay.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 -134
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.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 -32
- package/dist/src/ui/components/messages/UserMessage.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 -23
- 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 -386
- 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 -434
- 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 -79
- 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 -70
- 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 -88
- package/dist/src/ui/components/shared/ExpandableText.test.js.map +0 -1
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +0 -34
- 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 -90
- 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 -134
- 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 -74
- 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 -241
- package/dist/src/ui/components/shared/ScrollableList.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 -106
- 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 -242
- 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 -171
- 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 -67
- 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 -2490
- 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 -964
- 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/ExtensionsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ExtensionsList.test.js +0 -148
- 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 -153
- 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 -97
- 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 -957
- 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 -198
- 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 -319
- 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 -377
- 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 -198
- package/dist/src/ui/contexts/SessionContext.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 -166
- 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 -1032
- 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 -183
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +0 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -521
- package/dist/src/ui/hooks/shellCommandProcessor.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 -796
- 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 -209
- package/dist/src/ui/hooks/toolMapping.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 -435
- 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 -417
- 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/useBanner.test.d.ts +0 -6
- package/dist/src/ui/hooks/useBanner.test.js +0 -92
- 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 -462
- 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 -159
- 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/useExtensionUpdates.test.d.ts +0 -6
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -279
- 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 -131
- 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 -218
- 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 -2149
- 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 -183
- 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 -188
- 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 -180
- 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 -214
- 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 -172
- package/dist/src/ui/hooks/useIncludeDirsTrust.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 -208
- 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 -205
- 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 -145
- package/dist/src/ui/hooks/useLoadingIndicator.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 -327
- 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 -57
- 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 -59
- package/dist/src/ui/hooks/useMouseClick.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouseDoubleClick.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouseDoubleClick.test.js +0 -125
- package/dist/src/ui/hooks/useMouseDoubleClick.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 -208
- 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 -104
- 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 -477
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +0 -58
- package/dist/src/ui/hooks/useReactToolScheduler.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 -169
- 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 -848
- 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 -203
- 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 -336
- package/dist/src/ui/hooks/useSessionResume.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 -223
- 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 -9
- package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -845
- 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 -88
- package/dist/src/ui/hooks/useSnowfall.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 -187
- package/dist/src/ui/hooks/useTabbedNavigation.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/useToolExecutionScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.js +0 -376
- package/dist/src/ui/hooks/useToolExecutionScheduler.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 -881
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.js +0 -45
- package/dist/src/ui/hooks/useToolSchedulerFacade.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 -97
- package/dist/src/ui/hooks/useTurnActivityMonitor.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 -1384
- package/dist/src/ui/hooks/vim.test.js.map +0 -1
- package/dist/src/ui/keyMatchers.test.d.ts +0 -6
- package/dist/src/ui/keyMatchers.test.js +0 -386
- package/dist/src/ui/keyMatchers.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 -121
- 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 -34
- 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 -34
- 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 -62
- 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 -245
- 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 -150
- 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 -174
- 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 -38
- package/dist/src/ui/utils/CodeColorizer.test.js.map +0 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +0 -6
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +0 -21
- package/dist/src/ui/utils/InlineMarkdownRenderer.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 -159
- package/dist/src/ui/utils/MarkdownDisplay.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 -359
- 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 -55
- 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 -479
- 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 -271
- 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 -244
- 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 -124
- 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 -198
- 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/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/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/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 -220
- 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 -147
- package/dist/src/ui/utils/terminalSetup.test.js.map +0 -1
- package/dist/src/ui/utils/terminalUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalUtils.test.js +0 -40
- package/dist/src/ui/utils/terminalUtils.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 -79
- 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 -168
- package/dist/src/ui/utils/textUtils.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 -38
- 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 -134
- package/dist/src/ui/utils/updateCheck.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/checks.test.d.ts +0 -6
- package/dist/src/utils/checks.test.js +0 -29
- package/dist/src/utils/checks.test.js.map +0 -1
- package/dist/src/utils/cleanup.test.d.ts +0 -6
- package/dist/src/utils/cleanup.test.js +0 -92
- 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 -115
- 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 -201
- package/dist/src/utils/deepMerge.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 -221
- 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 -435
- 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/gitUtils.test.d.ts +0 -6
- package/dist/src/utils/gitUtils.test.js +0 -113
- 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 -310
- package/dist/src/utils/handleAutoUpdate.test.js.map +0 -1
- package/dist/src/utils/installationInfo.test.d.ts +0 -6
- package/dist/src/utils/installationInfo.test.js +0 -296
- 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/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 -20
- 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 -117
- 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 -279
- 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 -314
- 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 -122
- 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 -182
- 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 -1298
- 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 -503
- 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 -581
- 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 -808
- package/dist/src/utils/settingsUtils.test.js.map +0 -1
- package/dist/src/utils/skillUtils.test.d.ts +0 -6
- package/dist/src/utils/skillUtils.test.js +0 -70
- 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/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 -98
- 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/validateNonInterActiveAuth.test.d.ts +0 -6
- package/dist/src/validateNonInterActiveAuth.test.js +0 -319
- package/dist/src/validateNonInterActiveAuth.test.js.map +0 -1
- package/dist/src/zed-integration/fileSystemService.test.d.ts +0 -6
- package/dist/src/zed-integration/fileSystemService.test.js +0 -88
- package/dist/src/zed-integration/fileSystemService.test.js.map +0 -1
- package/dist/src/zed-integration/zedIntegration.test.d.ts +0 -6
- package/dist/src/zed-integration/zedIntegration.test.js +0 -625
- package/dist/src/zed-integration/zedIntegration.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,1384 +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 } 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: 'NORMAL',
|
|
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
|
-
expandedPasteInfo: new Map(),
|
|
57
|
-
...partial,
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
// Test constants
|
|
61
|
-
const TEST_SEQUENCES = {
|
|
62
|
-
ESCAPE: createKey({ sequence: '\u001b', name: 'escape' }),
|
|
63
|
-
LEFT: createKey({ sequence: 'h' }),
|
|
64
|
-
RIGHT: createKey({ sequence: 'l' }),
|
|
65
|
-
UP: createKey({ sequence: 'k' }),
|
|
66
|
-
DOWN: createKey({ sequence: 'j' }),
|
|
67
|
-
INSERT: createKey({ sequence: 'i' }),
|
|
68
|
-
APPEND: createKey({ sequence: 'a' }),
|
|
69
|
-
DELETE_CHAR: createKey({ sequence: 'x' }),
|
|
70
|
-
DELETE: createKey({ sequence: 'd' }),
|
|
71
|
-
CHANGE: createKey({ sequence: 'c' }),
|
|
72
|
-
WORD_FORWARD: createKey({ sequence: 'w' }),
|
|
73
|
-
WORD_BACKWARD: createKey({ sequence: 'b' }),
|
|
74
|
-
WORD_END: createKey({ sequence: 'e' }),
|
|
75
|
-
LINE_START: createKey({ sequence: '0' }),
|
|
76
|
-
LINE_END: createKey({ sequence: '$' }),
|
|
77
|
-
REPEAT: createKey({ sequence: '.' }),
|
|
78
|
-
CTRL_C: createKey({ sequence: '\x03', name: 'c', ctrl: true }),
|
|
79
|
-
};
|
|
80
|
-
describe('useVim hook', () => {
|
|
81
|
-
let mockBuffer;
|
|
82
|
-
let mockHandleFinalSubmit;
|
|
83
|
-
const createMockBuffer = (text = 'hello world', cursor = [0, 5]) => {
|
|
84
|
-
const cursorState = { pos: cursor };
|
|
85
|
-
const lines = text.split('\n');
|
|
86
|
-
return {
|
|
87
|
-
lines,
|
|
88
|
-
get cursor() {
|
|
89
|
-
return cursorState.pos;
|
|
90
|
-
},
|
|
91
|
-
set cursor(newPos) {
|
|
92
|
-
cursorState.pos = newPos;
|
|
93
|
-
},
|
|
94
|
-
text,
|
|
95
|
-
move: vi.fn().mockImplementation((direction) => {
|
|
96
|
-
let [row, col] = cursorState.pos;
|
|
97
|
-
const line = lines[row] || '';
|
|
98
|
-
if (direction === 'left') {
|
|
99
|
-
col = Math.max(0, col - 1);
|
|
100
|
-
}
|
|
101
|
-
else if (direction === 'right') {
|
|
102
|
-
col = Math.min(line.length, col + 1);
|
|
103
|
-
}
|
|
104
|
-
else if (direction === 'home') {
|
|
105
|
-
col = 0;
|
|
106
|
-
}
|
|
107
|
-
else if (direction === 'end') {
|
|
108
|
-
col = line.length;
|
|
109
|
-
}
|
|
110
|
-
cursorState.pos = [row, col];
|
|
111
|
-
}),
|
|
112
|
-
del: vi.fn(),
|
|
113
|
-
moveToOffset: vi.fn(),
|
|
114
|
-
insert: vi.fn(),
|
|
115
|
-
newline: vi.fn(),
|
|
116
|
-
replaceRangeByOffset: vi.fn(),
|
|
117
|
-
handleInput: vi.fn(),
|
|
118
|
-
setText: vi.fn(),
|
|
119
|
-
// Vim-specific methods
|
|
120
|
-
vimDeleteWordForward: vi.fn(),
|
|
121
|
-
vimDeleteWordBackward: vi.fn(),
|
|
122
|
-
vimDeleteWordEnd: vi.fn(),
|
|
123
|
-
vimChangeWordForward: vi.fn(),
|
|
124
|
-
vimChangeWordBackward: vi.fn(),
|
|
125
|
-
vimChangeWordEnd: vi.fn(),
|
|
126
|
-
vimDeleteLine: vi.fn(),
|
|
127
|
-
vimChangeLine: vi.fn(),
|
|
128
|
-
vimDeleteToEndOfLine: vi.fn(),
|
|
129
|
-
vimChangeToEndOfLine: vi.fn(),
|
|
130
|
-
vimChangeMovement: vi.fn(),
|
|
131
|
-
vimMoveLeft: vi.fn(),
|
|
132
|
-
vimMoveRight: vi.fn(),
|
|
133
|
-
vimMoveUp: vi.fn(),
|
|
134
|
-
vimMoveDown: vi.fn(),
|
|
135
|
-
vimMoveWordForward: vi.fn(),
|
|
136
|
-
vimMoveWordBackward: vi.fn(),
|
|
137
|
-
vimMoveWordEnd: vi.fn(),
|
|
138
|
-
vimDeleteChar: vi.fn(),
|
|
139
|
-
vimInsertAtCursor: vi.fn(),
|
|
140
|
-
vimAppendAtCursor: vi.fn().mockImplementation(() => {
|
|
141
|
-
// Append moves cursor right (vim 'a' behavior - position after current char)
|
|
142
|
-
const [row, col] = cursorState.pos;
|
|
143
|
-
// In vim, 'a' moves cursor to position after current character
|
|
144
|
-
// This allows inserting at the end of the line
|
|
145
|
-
cursorState.pos = [row, col + 1];
|
|
146
|
-
}),
|
|
147
|
-
vimOpenLineBelow: vi.fn(),
|
|
148
|
-
vimOpenLineAbove: vi.fn(),
|
|
149
|
-
vimAppendAtLineEnd: vi.fn(),
|
|
150
|
-
vimInsertAtLineStart: vi.fn(),
|
|
151
|
-
vimMoveToLineStart: vi.fn(),
|
|
152
|
-
vimMoveToLineEnd: vi.fn(),
|
|
153
|
-
vimMoveToFirstNonWhitespace: vi.fn(),
|
|
154
|
-
vimMoveToFirstLine: vi.fn(),
|
|
155
|
-
vimMoveToLastLine: vi.fn(),
|
|
156
|
-
vimMoveToLine: vi.fn(),
|
|
157
|
-
vimEscapeInsertMode: vi.fn().mockImplementation(() => {
|
|
158
|
-
// Escape moves cursor left unless at beginning of line
|
|
159
|
-
const [row, col] = cursorState.pos;
|
|
160
|
-
if (col > 0) {
|
|
161
|
-
cursorState.pos = [row, col - 1];
|
|
162
|
-
}
|
|
163
|
-
}),
|
|
164
|
-
// Additional properties for transformations
|
|
165
|
-
transformedToLogicalMaps: lines.map(() => []),
|
|
166
|
-
visualToTransformedMap: [],
|
|
167
|
-
transformationsByLine: lines.map(() => []),
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
const renderVimHook = (buffer) => renderHook(() => useVim((buffer || mockBuffer), mockHandleFinalSubmit));
|
|
171
|
-
const exitInsertMode = (result) => {
|
|
172
|
-
act(() => {
|
|
173
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
beforeEach(() => {
|
|
177
|
-
vi.clearAllMocks();
|
|
178
|
-
mockHandleFinalSubmit = vi.fn();
|
|
179
|
-
mockBuffer = createMockBuffer();
|
|
180
|
-
// Reset mock context to default state
|
|
181
|
-
mockVimContext.vimEnabled = true;
|
|
182
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
183
|
-
mockVimContext.toggleVimEnabled.mockClear();
|
|
184
|
-
mockVimContext.setVimMode.mockClear();
|
|
185
|
-
});
|
|
186
|
-
describe('Mode switching', () => {
|
|
187
|
-
it('should start in NORMAL mode', () => {
|
|
188
|
-
const { result } = renderVimHook();
|
|
189
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
190
|
-
});
|
|
191
|
-
it('should switch to INSERT mode with i command', () => {
|
|
192
|
-
const { result } = renderVimHook();
|
|
193
|
-
act(() => {
|
|
194
|
-
result.current.handleInput(TEST_SEQUENCES.INSERT);
|
|
195
|
-
});
|
|
196
|
-
expect(result.current.mode).toBe('INSERT');
|
|
197
|
-
expect(mockVimContext.setVimMode).toHaveBeenCalledWith('INSERT');
|
|
198
|
-
});
|
|
199
|
-
it('should switch back to NORMAL mode with Escape', () => {
|
|
200
|
-
const { result } = renderVimHook();
|
|
201
|
-
act(() => {
|
|
202
|
-
result.current.handleInput(TEST_SEQUENCES.INSERT);
|
|
203
|
-
});
|
|
204
|
-
expect(result.current.mode).toBe('INSERT');
|
|
205
|
-
exitInsertMode(result);
|
|
206
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
207
|
-
});
|
|
208
|
-
it('should properly handle escape followed immediately by a command', () => {
|
|
209
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
210
|
-
const { result } = renderVimHook(testBuffer);
|
|
211
|
-
act(() => {
|
|
212
|
-
result.current.handleInput(createKey({ sequence: 'i' }));
|
|
213
|
-
});
|
|
214
|
-
expect(result.current.mode).toBe('INSERT');
|
|
215
|
-
vi.clearAllMocks();
|
|
216
|
-
exitInsertMode(result);
|
|
217
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
218
|
-
act(() => {
|
|
219
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
220
|
-
});
|
|
221
|
-
expect(testBuffer.vimMoveWordBackward).toHaveBeenCalledWith(1);
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
describe('Navigation commands', () => {
|
|
225
|
-
it('should handle h (left movement)', () => {
|
|
226
|
-
const { result } = renderVimHook();
|
|
227
|
-
act(() => {
|
|
228
|
-
result.current.handleInput(createKey({ sequence: 'h' }));
|
|
229
|
-
});
|
|
230
|
-
expect(mockBuffer.vimMoveLeft).toHaveBeenCalledWith(1);
|
|
231
|
-
});
|
|
232
|
-
it('should handle l (right movement)', () => {
|
|
233
|
-
const { result } = renderVimHook();
|
|
234
|
-
act(() => {
|
|
235
|
-
result.current.handleInput(createKey({ sequence: 'l' }));
|
|
236
|
-
});
|
|
237
|
-
expect(mockBuffer.vimMoveRight).toHaveBeenCalledWith(1);
|
|
238
|
-
});
|
|
239
|
-
it('should handle j (down movement)', () => {
|
|
240
|
-
const testBuffer = createMockBuffer('first line\nsecond line');
|
|
241
|
-
const { result } = renderVimHook(testBuffer);
|
|
242
|
-
act(() => {
|
|
243
|
-
result.current.handleInput(createKey({ sequence: 'j' }));
|
|
244
|
-
});
|
|
245
|
-
expect(testBuffer.vimMoveDown).toHaveBeenCalledWith(1);
|
|
246
|
-
});
|
|
247
|
-
it('should handle k (up movement)', () => {
|
|
248
|
-
const testBuffer = createMockBuffer('first line\nsecond line');
|
|
249
|
-
const { result } = renderVimHook(testBuffer);
|
|
250
|
-
act(() => {
|
|
251
|
-
result.current.handleInput(createKey({ sequence: 'k' }));
|
|
252
|
-
});
|
|
253
|
-
expect(testBuffer.vimMoveUp).toHaveBeenCalledWith(1);
|
|
254
|
-
});
|
|
255
|
-
it('should handle 0 (move to start of line)', () => {
|
|
256
|
-
const { result } = renderVimHook();
|
|
257
|
-
act(() => {
|
|
258
|
-
result.current.handleInput(createKey({ sequence: '0' }));
|
|
259
|
-
});
|
|
260
|
-
expect(mockBuffer.vimMoveToLineStart).toHaveBeenCalled();
|
|
261
|
-
});
|
|
262
|
-
it('should handle $ (move to end of line)', () => {
|
|
263
|
-
const { result } = renderVimHook();
|
|
264
|
-
act(() => {
|
|
265
|
-
result.current.handleInput(createKey({ sequence: '$' }));
|
|
266
|
-
});
|
|
267
|
-
expect(mockBuffer.vimMoveToLineEnd).toHaveBeenCalled();
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
describe('Mode switching commands', () => {
|
|
271
|
-
it('should handle a (append after cursor)', () => {
|
|
272
|
-
const { result } = renderVimHook();
|
|
273
|
-
act(() => {
|
|
274
|
-
result.current.handleInput(createKey({ sequence: 'a' }));
|
|
275
|
-
});
|
|
276
|
-
expect(mockBuffer.vimAppendAtCursor).toHaveBeenCalled();
|
|
277
|
-
expect(result.current.mode).toBe('INSERT');
|
|
278
|
-
});
|
|
279
|
-
it('should handle A (append at end of line)', () => {
|
|
280
|
-
const { result } = renderVimHook();
|
|
281
|
-
act(() => {
|
|
282
|
-
result.current.handleInput(createKey({ sequence: 'A' }));
|
|
283
|
-
});
|
|
284
|
-
expect(mockBuffer.vimAppendAtLineEnd).toHaveBeenCalled();
|
|
285
|
-
expect(result.current.mode).toBe('INSERT');
|
|
286
|
-
});
|
|
287
|
-
it('should handle o (open line below)', () => {
|
|
288
|
-
const { result } = renderVimHook();
|
|
289
|
-
act(() => {
|
|
290
|
-
result.current.handleInput(createKey({ sequence: 'o' }));
|
|
291
|
-
});
|
|
292
|
-
expect(mockBuffer.vimOpenLineBelow).toHaveBeenCalled();
|
|
293
|
-
expect(result.current.mode).toBe('INSERT');
|
|
294
|
-
});
|
|
295
|
-
it('should handle O (open line above)', () => {
|
|
296
|
-
const { result } = renderVimHook();
|
|
297
|
-
act(() => {
|
|
298
|
-
result.current.handleInput(createKey({ sequence: 'O' }));
|
|
299
|
-
});
|
|
300
|
-
expect(mockBuffer.vimOpenLineAbove).toHaveBeenCalled();
|
|
301
|
-
expect(result.current.mode).toBe('INSERT');
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
describe('Edit commands', () => {
|
|
305
|
-
it('should handle x (delete character)', () => {
|
|
306
|
-
const { result } = renderVimHook();
|
|
307
|
-
vi.clearAllMocks();
|
|
308
|
-
act(() => {
|
|
309
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
310
|
-
});
|
|
311
|
-
expect(mockBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
312
|
-
});
|
|
313
|
-
it('should move cursor left when deleting last character on line (vim behavior)', () => {
|
|
314
|
-
const testBuffer = createMockBuffer('hello', [0, 4]);
|
|
315
|
-
const { result } = renderVimHook(testBuffer);
|
|
316
|
-
act(() => {
|
|
317
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
318
|
-
});
|
|
319
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
320
|
-
});
|
|
321
|
-
it('should handle first d key (sets pending state)', () => {
|
|
322
|
-
const { result } = renderVimHook();
|
|
323
|
-
act(() => {
|
|
324
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
325
|
-
});
|
|
326
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
describe('Count handling', () => {
|
|
330
|
-
it('should handle count input and return to count 0 after command', () => {
|
|
331
|
-
const { result } = renderVimHook();
|
|
332
|
-
act(() => {
|
|
333
|
-
const handled = result.current.handleInput(createKey({ sequence: '3' }));
|
|
334
|
-
expect(handled).toBe(true);
|
|
335
|
-
});
|
|
336
|
-
act(() => {
|
|
337
|
-
const handled = result.current.handleInput(createKey({ sequence: 'h' }));
|
|
338
|
-
expect(handled).toBe(true);
|
|
339
|
-
});
|
|
340
|
-
expect(mockBuffer.vimMoveLeft).toHaveBeenCalledWith(3);
|
|
341
|
-
});
|
|
342
|
-
it('should only delete 1 character with x command when no count is specified', () => {
|
|
343
|
-
const testBuffer = createMockBuffer();
|
|
344
|
-
const { result } = renderVimHook(testBuffer);
|
|
345
|
-
act(() => {
|
|
346
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
347
|
-
});
|
|
348
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
describe('Word movement', () => {
|
|
352
|
-
it('should properly initialize vim hook with word movement support', () => {
|
|
353
|
-
const testBuffer = createMockBuffer('cat elephant mouse', [0, 0]);
|
|
354
|
-
const { result } = renderVimHook(testBuffer);
|
|
355
|
-
expect(result.current.vimModeEnabled).toBe(true);
|
|
356
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
357
|
-
expect(result.current.handleInput).toBeDefined();
|
|
358
|
-
});
|
|
359
|
-
it('should support vim mode and basic operations across multiple lines', () => {
|
|
360
|
-
const testBuffer = createMockBuffer('first line word\nsecond line word', [0, 11]);
|
|
361
|
-
const { result } = renderVimHook(testBuffer);
|
|
362
|
-
expect(result.current.vimModeEnabled).toBe(true);
|
|
363
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
364
|
-
expect(result.current.handleInput).toBeDefined();
|
|
365
|
-
expect(testBuffer.replaceRangeByOffset).toBeDefined();
|
|
366
|
-
expect(testBuffer.moveToOffset).toBeDefined();
|
|
367
|
-
});
|
|
368
|
-
it('should handle w (next word)', () => {
|
|
369
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
370
|
-
const { result } = renderVimHook(testBuffer);
|
|
371
|
-
act(() => {
|
|
372
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
373
|
-
});
|
|
374
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
375
|
-
});
|
|
376
|
-
it('should handle b (previous word)', () => {
|
|
377
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
378
|
-
const { result } = renderVimHook(testBuffer);
|
|
379
|
-
act(() => {
|
|
380
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
381
|
-
});
|
|
382
|
-
expect(testBuffer.vimMoveWordBackward).toHaveBeenCalledWith(1);
|
|
383
|
-
});
|
|
384
|
-
it('should handle e (end of word)', () => {
|
|
385
|
-
const testBuffer = createMockBuffer('hello world test');
|
|
386
|
-
const { result } = renderVimHook(testBuffer);
|
|
387
|
-
act(() => {
|
|
388
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
389
|
-
});
|
|
390
|
-
expect(testBuffer.vimMoveWordEnd).toHaveBeenCalledWith(1);
|
|
391
|
-
});
|
|
392
|
-
it('should handle w when cursor is on the last word', () => {
|
|
393
|
-
const testBuffer = createMockBuffer('hello world', [0, 8]);
|
|
394
|
-
const { result } = renderVimHook(testBuffer);
|
|
395
|
-
act(() => {
|
|
396
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
397
|
-
});
|
|
398
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
399
|
-
});
|
|
400
|
-
it('should handle first c key (sets pending change state)', () => {
|
|
401
|
-
const { result } = renderVimHook();
|
|
402
|
-
act(() => {
|
|
403
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
404
|
-
});
|
|
405
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
406
|
-
expect(mockBuffer.del).not.toHaveBeenCalled();
|
|
407
|
-
});
|
|
408
|
-
it('should clear pending state on invalid command sequence (df)', () => {
|
|
409
|
-
const { result } = renderVimHook();
|
|
410
|
-
act(() => {
|
|
411
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
412
|
-
result.current.handleInput(createKey({ sequence: 'f' }));
|
|
413
|
-
});
|
|
414
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
415
|
-
expect(mockBuffer.del).not.toHaveBeenCalled();
|
|
416
|
-
});
|
|
417
|
-
it('should clear pending state with Escape in NORMAL mode', () => {
|
|
418
|
-
const { result } = renderVimHook();
|
|
419
|
-
act(() => {
|
|
420
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
421
|
-
});
|
|
422
|
-
exitInsertMode(result);
|
|
423
|
-
expect(mockBuffer.replaceRangeByOffset).not.toHaveBeenCalled();
|
|
424
|
-
});
|
|
425
|
-
});
|
|
426
|
-
describe('Disabled vim mode', () => {
|
|
427
|
-
it('should not respond to vim commands when disabled', () => {
|
|
428
|
-
mockVimContext.vimEnabled = false;
|
|
429
|
-
const { result } = renderVimHook(mockBuffer);
|
|
430
|
-
act(() => {
|
|
431
|
-
result.current.handleInput(createKey({ sequence: 'h' }));
|
|
432
|
-
});
|
|
433
|
-
expect(mockBuffer.move).not.toHaveBeenCalled();
|
|
434
|
-
});
|
|
435
|
-
});
|
|
436
|
-
// These tests are no longer applicable at the hook level
|
|
437
|
-
describe('Command repeat system', () => {
|
|
438
|
-
it('should repeat x command from current cursor position', () => {
|
|
439
|
-
const testBuffer = createMockBuffer('abcd\nefgh\nijkl', [0, 1]);
|
|
440
|
-
const { result } = renderVimHook(testBuffer);
|
|
441
|
-
act(() => {
|
|
442
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
443
|
-
});
|
|
444
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
445
|
-
testBuffer.cursor = [1, 2];
|
|
446
|
-
act(() => {
|
|
447
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
448
|
-
});
|
|
449
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
450
|
-
});
|
|
451
|
-
it('should repeat dd command from current position', () => {
|
|
452
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [1, 0]);
|
|
453
|
-
const { result } = renderVimHook(testBuffer);
|
|
454
|
-
act(() => {
|
|
455
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
456
|
-
});
|
|
457
|
-
act(() => {
|
|
458
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
459
|
-
});
|
|
460
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledTimes(1);
|
|
461
|
-
testBuffer.cursor = [0, 0];
|
|
462
|
-
act(() => {
|
|
463
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
464
|
-
});
|
|
465
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledTimes(2);
|
|
466
|
-
});
|
|
467
|
-
it('should repeat ce command from current position', () => {
|
|
468
|
-
const testBuffer = createMockBuffer('word', [0, 0]);
|
|
469
|
-
const { result } = renderVimHook(testBuffer);
|
|
470
|
-
act(() => {
|
|
471
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
472
|
-
});
|
|
473
|
-
act(() => {
|
|
474
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
475
|
-
});
|
|
476
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledTimes(1);
|
|
477
|
-
// Exit INSERT mode to complete the command
|
|
478
|
-
exitInsertMode(result);
|
|
479
|
-
testBuffer.cursor = [0, 2];
|
|
480
|
-
act(() => {
|
|
481
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
482
|
-
});
|
|
483
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledTimes(2);
|
|
484
|
-
});
|
|
485
|
-
it('should repeat cc command from current position', () => {
|
|
486
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [1, 2]);
|
|
487
|
-
const { result } = renderVimHook(testBuffer);
|
|
488
|
-
act(() => {
|
|
489
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
490
|
-
});
|
|
491
|
-
act(() => {
|
|
492
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
493
|
-
});
|
|
494
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledTimes(1);
|
|
495
|
-
// Exit INSERT mode to complete the command
|
|
496
|
-
exitInsertMode(result);
|
|
497
|
-
testBuffer.cursor = [0, 1];
|
|
498
|
-
act(() => {
|
|
499
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
500
|
-
});
|
|
501
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledTimes(2);
|
|
502
|
-
});
|
|
503
|
-
it('should repeat cw command from current position', () => {
|
|
504
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
505
|
-
const { result } = renderVimHook(testBuffer);
|
|
506
|
-
act(() => {
|
|
507
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
508
|
-
});
|
|
509
|
-
act(() => {
|
|
510
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
511
|
-
});
|
|
512
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledTimes(1);
|
|
513
|
-
// Exit INSERT mode to complete the command
|
|
514
|
-
exitInsertMode(result);
|
|
515
|
-
testBuffer.cursor = [0, 0];
|
|
516
|
-
act(() => {
|
|
517
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
518
|
-
});
|
|
519
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledTimes(2);
|
|
520
|
-
});
|
|
521
|
-
it('should repeat D command from current position', () => {
|
|
522
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
523
|
-
const { result } = renderVimHook(testBuffer);
|
|
524
|
-
act(() => {
|
|
525
|
-
result.current.handleInput(createKey({ sequence: 'D' }));
|
|
526
|
-
});
|
|
527
|
-
expect(testBuffer.vimDeleteToEndOfLine).toHaveBeenCalledTimes(1);
|
|
528
|
-
testBuffer.cursor = [0, 2];
|
|
529
|
-
vi.clearAllMocks(); // Clear all mocks instead of just one method
|
|
530
|
-
act(() => {
|
|
531
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
532
|
-
});
|
|
533
|
-
expect(testBuffer.vimDeleteToEndOfLine).toHaveBeenCalledTimes(1);
|
|
534
|
-
});
|
|
535
|
-
it('should repeat C command from current position', () => {
|
|
536
|
-
const testBuffer = createMockBuffer('hello world test', [0, 6]);
|
|
537
|
-
const { result } = renderVimHook(testBuffer);
|
|
538
|
-
act(() => {
|
|
539
|
-
result.current.handleInput(createKey({ sequence: 'C' }));
|
|
540
|
-
});
|
|
541
|
-
expect(testBuffer.vimChangeToEndOfLine).toHaveBeenCalledTimes(1);
|
|
542
|
-
// Exit INSERT mode to complete the command
|
|
543
|
-
exitInsertMode(result);
|
|
544
|
-
testBuffer.cursor = [0, 2];
|
|
545
|
-
act(() => {
|
|
546
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
547
|
-
});
|
|
548
|
-
expect(testBuffer.vimChangeToEndOfLine).toHaveBeenCalledTimes(2);
|
|
549
|
-
});
|
|
550
|
-
it('should repeat command after cursor movement', () => {
|
|
551
|
-
const testBuffer = createMockBuffer('test text', [0, 0]);
|
|
552
|
-
const { result } = renderVimHook(testBuffer);
|
|
553
|
-
act(() => {
|
|
554
|
-
result.current.handleInput(createKey({ sequence: 'x' }));
|
|
555
|
-
});
|
|
556
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
557
|
-
testBuffer.cursor = [0, 2];
|
|
558
|
-
act(() => {
|
|
559
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
560
|
-
});
|
|
561
|
-
expect(testBuffer.vimDeleteChar).toHaveBeenCalledWith(1);
|
|
562
|
-
});
|
|
563
|
-
it('should move cursor to the correct position after exiting INSERT mode with "a"', () => {
|
|
564
|
-
const testBuffer = createMockBuffer('hello world', [0, 10]);
|
|
565
|
-
const { result } = renderVimHook(testBuffer);
|
|
566
|
-
act(() => {
|
|
567
|
-
result.current.handleInput(createKey({ sequence: 'a' }));
|
|
568
|
-
});
|
|
569
|
-
expect(result.current.mode).toBe('INSERT');
|
|
570
|
-
expect(testBuffer.cursor).toEqual([0, 11]);
|
|
571
|
-
exitInsertMode(result);
|
|
572
|
-
expect(result.current.mode).toBe('NORMAL');
|
|
573
|
-
expect(testBuffer.cursor).toEqual([0, 10]);
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
describe('Special characters and edge cases', () => {
|
|
577
|
-
it('should handle ^ (move to first non-whitespace character)', () => {
|
|
578
|
-
const testBuffer = createMockBuffer(' hello world', [0, 5]);
|
|
579
|
-
const { result } = renderVimHook(testBuffer);
|
|
580
|
-
act(() => {
|
|
581
|
-
result.current.handleInput(createKey({ sequence: '^' }));
|
|
582
|
-
});
|
|
583
|
-
expect(testBuffer.vimMoveToFirstNonWhitespace).toHaveBeenCalled();
|
|
584
|
-
});
|
|
585
|
-
it('should handle G without count (go to last line)', () => {
|
|
586
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [0, 0]);
|
|
587
|
-
const { result } = renderVimHook(testBuffer);
|
|
588
|
-
act(() => {
|
|
589
|
-
result.current.handleInput(createKey({ sequence: 'G' }));
|
|
590
|
-
});
|
|
591
|
-
expect(testBuffer.vimMoveToLastLine).toHaveBeenCalled();
|
|
592
|
-
});
|
|
593
|
-
it('should handle gg (go to first line)', () => {
|
|
594
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [2, 0]);
|
|
595
|
-
const { result } = renderVimHook(testBuffer);
|
|
596
|
-
// First 'g' sets pending state
|
|
597
|
-
act(() => {
|
|
598
|
-
result.current.handleInput(createKey({ sequence: 'g' }));
|
|
599
|
-
});
|
|
600
|
-
// Second 'g' executes the command
|
|
601
|
-
act(() => {
|
|
602
|
-
result.current.handleInput(createKey({ sequence: 'g' }));
|
|
603
|
-
});
|
|
604
|
-
expect(testBuffer.vimMoveToFirstLine).toHaveBeenCalled();
|
|
605
|
-
});
|
|
606
|
-
it('should handle count with movement commands', () => {
|
|
607
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
608
|
-
const { result } = renderVimHook(testBuffer);
|
|
609
|
-
act(() => {
|
|
610
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
611
|
-
});
|
|
612
|
-
act(() => {
|
|
613
|
-
result.current.handleInput(TEST_SEQUENCES.WORD_FORWARD);
|
|
614
|
-
});
|
|
615
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(3);
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
describe('Vim word operations', () => {
|
|
619
|
-
describe('dw (delete word forward)', () => {
|
|
620
|
-
it('should delete from cursor to start of next word', () => {
|
|
621
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
622
|
-
const { result } = renderVimHook(testBuffer);
|
|
623
|
-
act(() => {
|
|
624
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
625
|
-
});
|
|
626
|
-
act(() => {
|
|
627
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
628
|
-
});
|
|
629
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(1);
|
|
630
|
-
});
|
|
631
|
-
it('should actually delete the complete word including trailing space', () => {
|
|
632
|
-
// This test uses the real text-buffer reducer instead of mocks
|
|
633
|
-
const initialState = createMockTextBufferState({
|
|
634
|
-
lines: ['hello world test'],
|
|
635
|
-
cursorRow: 0,
|
|
636
|
-
cursorCol: 0,
|
|
637
|
-
preferredCol: null,
|
|
638
|
-
undoStack: [],
|
|
639
|
-
redoStack: [],
|
|
640
|
-
clipboard: null,
|
|
641
|
-
selectionAnchor: null,
|
|
642
|
-
});
|
|
643
|
-
const result = textBufferReducer(initialState, {
|
|
644
|
-
type: 'vim_delete_word_forward',
|
|
645
|
-
payload: { count: 1 },
|
|
646
|
-
});
|
|
647
|
-
// Should delete "hello " (word + space), leaving "world test"
|
|
648
|
-
expect(result.lines).toEqual(['world test']);
|
|
649
|
-
expect(result.cursorRow).toBe(0);
|
|
650
|
-
expect(result.cursorCol).toBe(0);
|
|
651
|
-
});
|
|
652
|
-
it('should delete word from middle of word correctly', () => {
|
|
653
|
-
const initialState = createMockTextBufferState({
|
|
654
|
-
lines: ['hello world test'],
|
|
655
|
-
cursorRow: 0,
|
|
656
|
-
cursorCol: 2, // cursor on 'l' in "hello"
|
|
657
|
-
preferredCol: null,
|
|
658
|
-
undoStack: [],
|
|
659
|
-
redoStack: [],
|
|
660
|
-
clipboard: null,
|
|
661
|
-
selectionAnchor: null,
|
|
662
|
-
});
|
|
663
|
-
const result = textBufferReducer(initialState, {
|
|
664
|
-
type: 'vim_delete_word_forward',
|
|
665
|
-
payload: { count: 1 },
|
|
666
|
-
});
|
|
667
|
-
// Should delete "llo " (rest of word + space), leaving "he world test"
|
|
668
|
-
expect(result.lines).toEqual(['heworld test']);
|
|
669
|
-
expect(result.cursorRow).toBe(0);
|
|
670
|
-
expect(result.cursorCol).toBe(2);
|
|
671
|
-
});
|
|
672
|
-
it('should handle dw at end of line', () => {
|
|
673
|
-
const initialState = createMockTextBufferState({
|
|
674
|
-
lines: ['hello world'],
|
|
675
|
-
cursorRow: 0,
|
|
676
|
-
cursorCol: 6, // cursor on 'w' in "world"
|
|
677
|
-
preferredCol: null,
|
|
678
|
-
undoStack: [],
|
|
679
|
-
redoStack: [],
|
|
680
|
-
clipboard: null,
|
|
681
|
-
selectionAnchor: null,
|
|
682
|
-
});
|
|
683
|
-
const result = textBufferReducer(initialState, {
|
|
684
|
-
type: 'vim_delete_word_forward',
|
|
685
|
-
payload: { count: 1 },
|
|
686
|
-
});
|
|
687
|
-
// Should delete "world" (no trailing space at end), leaving "hello "
|
|
688
|
-
expect(result.lines).toEqual(['hello ']);
|
|
689
|
-
expect(result.cursorRow).toBe(0);
|
|
690
|
-
expect(result.cursorCol).toBe(6);
|
|
691
|
-
});
|
|
692
|
-
it('should delete multiple words with count', () => {
|
|
693
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
694
|
-
const { result } = renderVimHook(testBuffer);
|
|
695
|
-
act(() => {
|
|
696
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
697
|
-
});
|
|
698
|
-
act(() => {
|
|
699
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
700
|
-
});
|
|
701
|
-
act(() => {
|
|
702
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
703
|
-
});
|
|
704
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(2);
|
|
705
|
-
});
|
|
706
|
-
it('should record command for repeat with dot', () => {
|
|
707
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
708
|
-
const { result } = renderVimHook(testBuffer);
|
|
709
|
-
// Execute dw
|
|
710
|
-
act(() => {
|
|
711
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
712
|
-
});
|
|
713
|
-
act(() => {
|
|
714
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
715
|
-
});
|
|
716
|
-
vi.clearAllMocks();
|
|
717
|
-
// Execute dot repeat
|
|
718
|
-
act(() => {
|
|
719
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
720
|
-
});
|
|
721
|
-
expect(testBuffer.vimDeleteWordForward).toHaveBeenCalledWith(1);
|
|
722
|
-
});
|
|
723
|
-
});
|
|
724
|
-
describe('de (delete word end)', () => {
|
|
725
|
-
it('should delete from cursor to end of current word', () => {
|
|
726
|
-
const testBuffer = createMockBuffer('hello world test', [0, 1]);
|
|
727
|
-
const { result } = renderVimHook(testBuffer);
|
|
728
|
-
act(() => {
|
|
729
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
730
|
-
});
|
|
731
|
-
act(() => {
|
|
732
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
733
|
-
});
|
|
734
|
-
expect(testBuffer.vimDeleteWordEnd).toHaveBeenCalledWith(1);
|
|
735
|
-
});
|
|
736
|
-
it('should handle count with de', () => {
|
|
737
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
738
|
-
const { result } = renderVimHook(testBuffer);
|
|
739
|
-
act(() => {
|
|
740
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
741
|
-
});
|
|
742
|
-
act(() => {
|
|
743
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
744
|
-
});
|
|
745
|
-
act(() => {
|
|
746
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
747
|
-
});
|
|
748
|
-
expect(testBuffer.vimDeleteWordEnd).toHaveBeenCalledWith(3);
|
|
749
|
-
});
|
|
750
|
-
});
|
|
751
|
-
describe('cw (change word forward)', () => {
|
|
752
|
-
it('should change from cursor to start of next word and enter INSERT mode', () => {
|
|
753
|
-
const testBuffer = createMockBuffer('hello world test', [0, 0]);
|
|
754
|
-
const { result } = renderVimHook(testBuffer);
|
|
755
|
-
act(() => {
|
|
756
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
757
|
-
});
|
|
758
|
-
act(() => {
|
|
759
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
760
|
-
});
|
|
761
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(1);
|
|
762
|
-
expect(result.current.mode).toBe('INSERT');
|
|
763
|
-
expect(mockVimContext.setVimMode).toHaveBeenCalledWith('INSERT');
|
|
764
|
-
});
|
|
765
|
-
it('should handle count with cw', () => {
|
|
766
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
767
|
-
const { result } = renderVimHook(testBuffer);
|
|
768
|
-
act(() => {
|
|
769
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
770
|
-
});
|
|
771
|
-
act(() => {
|
|
772
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
773
|
-
});
|
|
774
|
-
act(() => {
|
|
775
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
776
|
-
});
|
|
777
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(2);
|
|
778
|
-
expect(result.current.mode).toBe('INSERT');
|
|
779
|
-
});
|
|
780
|
-
it('should be repeatable with dot', () => {
|
|
781
|
-
const testBuffer = createMockBuffer('hello world test more', [0, 0]);
|
|
782
|
-
const { result } = renderVimHook(testBuffer);
|
|
783
|
-
// Execute cw
|
|
784
|
-
act(() => {
|
|
785
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
786
|
-
});
|
|
787
|
-
act(() => {
|
|
788
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
789
|
-
});
|
|
790
|
-
// Exit INSERT mode
|
|
791
|
-
exitInsertMode(result);
|
|
792
|
-
vi.clearAllMocks();
|
|
793
|
-
mockVimContext.setVimMode.mockClear();
|
|
794
|
-
// Execute dot repeat
|
|
795
|
-
act(() => {
|
|
796
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
797
|
-
});
|
|
798
|
-
expect(testBuffer.vimChangeWordForward).toHaveBeenCalledWith(1);
|
|
799
|
-
expect(result.current.mode).toBe('INSERT');
|
|
800
|
-
});
|
|
801
|
-
});
|
|
802
|
-
describe('ce (change word end)', () => {
|
|
803
|
-
it('should change from cursor to end of word and enter INSERT mode', () => {
|
|
804
|
-
const testBuffer = createMockBuffer('hello world test', [0, 1]);
|
|
805
|
-
const { result } = renderVimHook(testBuffer);
|
|
806
|
-
act(() => {
|
|
807
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
808
|
-
});
|
|
809
|
-
act(() => {
|
|
810
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
811
|
-
});
|
|
812
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledWith(1);
|
|
813
|
-
expect(result.current.mode).toBe('INSERT');
|
|
814
|
-
});
|
|
815
|
-
it('should handle count with ce', () => {
|
|
816
|
-
const testBuffer = createMockBuffer('one two three four', [0, 0]);
|
|
817
|
-
const { result } = renderVimHook(testBuffer);
|
|
818
|
-
act(() => {
|
|
819
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
820
|
-
});
|
|
821
|
-
act(() => {
|
|
822
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
823
|
-
});
|
|
824
|
-
act(() => {
|
|
825
|
-
result.current.handleInput(createKey({ sequence: 'e' }));
|
|
826
|
-
});
|
|
827
|
-
expect(testBuffer.vimChangeWordEnd).toHaveBeenCalledWith(2);
|
|
828
|
-
expect(result.current.mode).toBe('INSERT');
|
|
829
|
-
});
|
|
830
|
-
});
|
|
831
|
-
describe('cc (change line)', () => {
|
|
832
|
-
it('should change entire line and enter INSERT mode', () => {
|
|
833
|
-
const testBuffer = createMockBuffer('hello world\nsecond line', [0, 5]);
|
|
834
|
-
const { result } = renderVimHook(testBuffer);
|
|
835
|
-
act(() => {
|
|
836
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
837
|
-
});
|
|
838
|
-
act(() => {
|
|
839
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
840
|
-
});
|
|
841
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
842
|
-
expect(result.current.mode).toBe('INSERT');
|
|
843
|
-
});
|
|
844
|
-
it('should change multiple lines with count', () => {
|
|
845
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3\nline4', [1, 0]);
|
|
846
|
-
const { result } = renderVimHook(testBuffer);
|
|
847
|
-
act(() => {
|
|
848
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
849
|
-
});
|
|
850
|
-
act(() => {
|
|
851
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
852
|
-
});
|
|
853
|
-
act(() => {
|
|
854
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
855
|
-
});
|
|
856
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(3);
|
|
857
|
-
expect(result.current.mode).toBe('INSERT');
|
|
858
|
-
});
|
|
859
|
-
it('should be repeatable with dot', () => {
|
|
860
|
-
const testBuffer = createMockBuffer('line1\nline2\nline3', [0, 0]);
|
|
861
|
-
const { result } = renderVimHook(testBuffer);
|
|
862
|
-
// Execute cc
|
|
863
|
-
act(() => {
|
|
864
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
865
|
-
});
|
|
866
|
-
act(() => {
|
|
867
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
868
|
-
});
|
|
869
|
-
// Exit INSERT mode
|
|
870
|
-
exitInsertMode(result);
|
|
871
|
-
vi.clearAllMocks();
|
|
872
|
-
mockVimContext.setVimMode.mockClear();
|
|
873
|
-
// Execute dot repeat
|
|
874
|
-
act(() => {
|
|
875
|
-
result.current.handleInput(createKey({ sequence: '.' }));
|
|
876
|
-
});
|
|
877
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
878
|
-
expect(result.current.mode).toBe('INSERT');
|
|
879
|
-
});
|
|
880
|
-
});
|
|
881
|
-
describe('db (delete word backward)', () => {
|
|
882
|
-
it('should delete from cursor to start of previous word', () => {
|
|
883
|
-
const testBuffer = createMockBuffer('hello world test', [0, 11]);
|
|
884
|
-
const { result } = renderVimHook(testBuffer);
|
|
885
|
-
act(() => {
|
|
886
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
887
|
-
});
|
|
888
|
-
act(() => {
|
|
889
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
890
|
-
});
|
|
891
|
-
expect(testBuffer.vimDeleteWordBackward).toHaveBeenCalledWith(1);
|
|
892
|
-
});
|
|
893
|
-
it('should handle count with db', () => {
|
|
894
|
-
const testBuffer = createMockBuffer('one two three four', [0, 18]);
|
|
895
|
-
const { result } = renderVimHook(testBuffer);
|
|
896
|
-
act(() => {
|
|
897
|
-
result.current.handleInput(createKey({ sequence: '2' }));
|
|
898
|
-
});
|
|
899
|
-
act(() => {
|
|
900
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
901
|
-
});
|
|
902
|
-
act(() => {
|
|
903
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
904
|
-
});
|
|
905
|
-
expect(testBuffer.vimDeleteWordBackward).toHaveBeenCalledWith(2);
|
|
906
|
-
});
|
|
907
|
-
});
|
|
908
|
-
describe('cb (change word backward)', () => {
|
|
909
|
-
it('should change from cursor to start of previous word and enter INSERT mode', () => {
|
|
910
|
-
const testBuffer = createMockBuffer('hello world test', [0, 11]);
|
|
911
|
-
const { result } = renderVimHook(testBuffer);
|
|
912
|
-
act(() => {
|
|
913
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
914
|
-
});
|
|
915
|
-
act(() => {
|
|
916
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
917
|
-
});
|
|
918
|
-
expect(testBuffer.vimChangeWordBackward).toHaveBeenCalledWith(1);
|
|
919
|
-
expect(result.current.mode).toBe('INSERT');
|
|
920
|
-
});
|
|
921
|
-
it('should handle count with cb', () => {
|
|
922
|
-
const testBuffer = createMockBuffer('one two three four', [0, 18]);
|
|
923
|
-
const { result } = renderVimHook(testBuffer);
|
|
924
|
-
act(() => {
|
|
925
|
-
result.current.handleInput(createKey({ sequence: '3' }));
|
|
926
|
-
});
|
|
927
|
-
act(() => {
|
|
928
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
929
|
-
});
|
|
930
|
-
act(() => {
|
|
931
|
-
result.current.handleInput(createKey({ sequence: 'b' }));
|
|
932
|
-
});
|
|
933
|
-
expect(testBuffer.vimChangeWordBackward).toHaveBeenCalledWith(3);
|
|
934
|
-
expect(result.current.mode).toBe('INSERT');
|
|
935
|
-
});
|
|
936
|
-
});
|
|
937
|
-
describe('Pending state handling', () => {
|
|
938
|
-
it('should clear pending delete state after dw', () => {
|
|
939
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
940
|
-
const { result } = renderVimHook(testBuffer);
|
|
941
|
-
// Press 'd' to enter pending delete state
|
|
942
|
-
act(() => {
|
|
943
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
944
|
-
});
|
|
945
|
-
// Complete with 'w'
|
|
946
|
-
act(() => {
|
|
947
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
948
|
-
});
|
|
949
|
-
// Next 'd' should start a new pending state, not continue the previous one
|
|
950
|
-
act(() => {
|
|
951
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
952
|
-
});
|
|
953
|
-
// This should trigger dd (delete line), not an error
|
|
954
|
-
act(() => {
|
|
955
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
956
|
-
});
|
|
957
|
-
expect(testBuffer.vimDeleteLine).toHaveBeenCalledWith(1);
|
|
958
|
-
});
|
|
959
|
-
it('should clear pending change state after cw', () => {
|
|
960
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
961
|
-
const { result } = renderVimHook(testBuffer);
|
|
962
|
-
// Execute cw
|
|
963
|
-
act(() => {
|
|
964
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
965
|
-
});
|
|
966
|
-
act(() => {
|
|
967
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
968
|
-
});
|
|
969
|
-
// Exit INSERT mode
|
|
970
|
-
exitInsertMode(result);
|
|
971
|
-
// Next 'c' should start a new pending state
|
|
972
|
-
act(() => {
|
|
973
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
974
|
-
});
|
|
975
|
-
act(() => {
|
|
976
|
-
result.current.handleInput(createKey({ sequence: 'c' }));
|
|
977
|
-
});
|
|
978
|
-
expect(testBuffer.vimChangeLine).toHaveBeenCalledWith(1);
|
|
979
|
-
});
|
|
980
|
-
it('should clear pending state with escape', () => {
|
|
981
|
-
const testBuffer = createMockBuffer('hello world', [0, 0]);
|
|
982
|
-
const { result } = renderVimHook(testBuffer);
|
|
983
|
-
// Enter pending delete state
|
|
984
|
-
act(() => {
|
|
985
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
986
|
-
});
|
|
987
|
-
// Press escape to clear pending state
|
|
988
|
-
act(() => {
|
|
989
|
-
result.current.handleInput(createKey({ name: 'escape' }));
|
|
990
|
-
});
|
|
991
|
-
// Now 'w' should just move cursor, not delete
|
|
992
|
-
act(() => {
|
|
993
|
-
result.current.handleInput(createKey({ sequence: 'w' }));
|
|
994
|
-
});
|
|
995
|
-
expect(testBuffer.vimDeleteWordForward).not.toHaveBeenCalled();
|
|
996
|
-
// w should move to next word after clearing pending state
|
|
997
|
-
expect(testBuffer.vimMoveWordForward).toHaveBeenCalledWith(1);
|
|
998
|
-
});
|
|
999
|
-
});
|
|
1000
|
-
describe('NORMAL mode escape behavior', () => {
|
|
1001
|
-
it('should pass escape through when no pending operator is active', () => {
|
|
1002
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
1003
|
-
const { result } = renderVimHook();
|
|
1004
|
-
const handled = result.current.handleInput(createKey({ name: 'escape' }));
|
|
1005
|
-
expect(handled).toBe(false);
|
|
1006
|
-
});
|
|
1007
|
-
it('should handle escape and clear pending operator', () => {
|
|
1008
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
1009
|
-
const { result } = renderVimHook();
|
|
1010
|
-
act(() => {
|
|
1011
|
-
result.current.handleInput(createKey({ sequence: 'd' }));
|
|
1012
|
-
});
|
|
1013
|
-
let handled;
|
|
1014
|
-
act(() => {
|
|
1015
|
-
handled = result.current.handleInput(createKey({ name: 'escape' }));
|
|
1016
|
-
});
|
|
1017
|
-
expect(handled).toBe(true);
|
|
1018
|
-
});
|
|
1019
|
-
});
|
|
1020
|
-
});
|
|
1021
|
-
describe('Shell command pass-through', () => {
|
|
1022
|
-
it('should pass through ctrl+r in INSERT mode', async () => {
|
|
1023
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1024
|
-
const { result } = renderVimHook();
|
|
1025
|
-
await waitFor(() => {
|
|
1026
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1027
|
-
});
|
|
1028
|
-
const handled = result.current.handleInput(createKey({ name: 'r', ctrl: true }));
|
|
1029
|
-
expect(handled).toBe(false);
|
|
1030
|
-
});
|
|
1031
|
-
it('should pass through ! in INSERT mode when buffer is empty', async () => {
|
|
1032
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1033
|
-
const emptyBuffer = createMockBuffer('');
|
|
1034
|
-
const { result } = renderVimHook(emptyBuffer);
|
|
1035
|
-
await waitFor(() => {
|
|
1036
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1037
|
-
});
|
|
1038
|
-
const handled = result.current.handleInput(createKey({ sequence: '!' }));
|
|
1039
|
-
expect(handled).toBe(false);
|
|
1040
|
-
});
|
|
1041
|
-
it('should handle ! as input in INSERT mode when buffer is not empty', async () => {
|
|
1042
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1043
|
-
const nonEmptyBuffer = createMockBuffer('not empty');
|
|
1044
|
-
const { result } = renderVimHook(nonEmptyBuffer);
|
|
1045
|
-
await waitFor(() => {
|
|
1046
|
-
expect(result.current.mode).toBe('INSERT');
|
|
1047
|
-
});
|
|
1048
|
-
const key = createKey({ sequence: '!', name: '!' });
|
|
1049
|
-
act(() => {
|
|
1050
|
-
result.current.handleInput(key);
|
|
1051
|
-
});
|
|
1052
|
-
expect(nonEmptyBuffer.handleInput).toHaveBeenCalledWith(expect.objectContaining(key));
|
|
1053
|
-
});
|
|
1054
|
-
});
|
|
1055
|
-
// Line operations (dd, cc) are tested in text-buffer.test.ts
|
|
1056
|
-
describe('Reducer-based integration tests', () => {
|
|
1057
|
-
const testCases = [
|
|
1058
|
-
{
|
|
1059
|
-
command: 'de',
|
|
1060
|
-
desc: 'delete from cursor to end of current word',
|
|
1061
|
-
lines: ['hello world test'],
|
|
1062
|
-
cursorRow: 0,
|
|
1063
|
-
cursorCol: 1,
|
|
1064
|
-
actionType: 'vim_delete_word_end',
|
|
1065
|
-
count: 1,
|
|
1066
|
-
expectedLines: ['h world test'],
|
|
1067
|
-
expectedCursorRow: 0,
|
|
1068
|
-
expectedCursorCol: 1,
|
|
1069
|
-
},
|
|
1070
|
-
{
|
|
1071
|
-
command: 'de',
|
|
1072
|
-
desc: 'delete multiple word ends with count',
|
|
1073
|
-
lines: ['hello world test more'],
|
|
1074
|
-
cursorRow: 0,
|
|
1075
|
-
cursorCol: 1,
|
|
1076
|
-
actionType: 'vim_delete_word_end',
|
|
1077
|
-
count: 2,
|
|
1078
|
-
expectedLines: ['h test more'],
|
|
1079
|
-
expectedCursorRow: 0,
|
|
1080
|
-
expectedCursorCol: 1,
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
command: 'db',
|
|
1084
|
-
desc: 'delete from cursor to start of previous word',
|
|
1085
|
-
lines: ['hello world test'],
|
|
1086
|
-
cursorRow: 0,
|
|
1087
|
-
cursorCol: 11,
|
|
1088
|
-
actionType: 'vim_delete_word_backward',
|
|
1089
|
-
count: 1,
|
|
1090
|
-
expectedLines: ['hello test'],
|
|
1091
|
-
expectedCursorRow: 0,
|
|
1092
|
-
expectedCursorCol: 6,
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
command: 'db',
|
|
1096
|
-
desc: 'delete multiple words backward with count',
|
|
1097
|
-
lines: ['hello world test more'],
|
|
1098
|
-
cursorRow: 0,
|
|
1099
|
-
cursorCol: 17,
|
|
1100
|
-
actionType: 'vim_delete_word_backward',
|
|
1101
|
-
count: 2,
|
|
1102
|
-
expectedLines: ['hello more'],
|
|
1103
|
-
expectedCursorRow: 0,
|
|
1104
|
-
expectedCursorCol: 6,
|
|
1105
|
-
},
|
|
1106
|
-
{
|
|
1107
|
-
command: 'cw',
|
|
1108
|
-
desc: 'delete from cursor to start of next word',
|
|
1109
|
-
lines: ['hello world test'],
|
|
1110
|
-
cursorRow: 0,
|
|
1111
|
-
cursorCol: 0,
|
|
1112
|
-
actionType: 'vim_change_word_forward',
|
|
1113
|
-
count: 1,
|
|
1114
|
-
expectedLines: ['world test'],
|
|
1115
|
-
expectedCursorRow: 0,
|
|
1116
|
-
expectedCursorCol: 0,
|
|
1117
|
-
},
|
|
1118
|
-
{
|
|
1119
|
-
command: 'cw',
|
|
1120
|
-
desc: 'change multiple words with count',
|
|
1121
|
-
lines: ['hello world test more'],
|
|
1122
|
-
cursorRow: 0,
|
|
1123
|
-
cursorCol: 0,
|
|
1124
|
-
actionType: 'vim_change_word_forward',
|
|
1125
|
-
count: 2,
|
|
1126
|
-
expectedLines: ['test more'],
|
|
1127
|
-
expectedCursorRow: 0,
|
|
1128
|
-
expectedCursorCol: 0,
|
|
1129
|
-
},
|
|
1130
|
-
{
|
|
1131
|
-
command: 'ce',
|
|
1132
|
-
desc: 'change from cursor to end of current word',
|
|
1133
|
-
lines: ['hello world test'],
|
|
1134
|
-
cursorRow: 0,
|
|
1135
|
-
cursorCol: 1,
|
|
1136
|
-
actionType: 'vim_change_word_end',
|
|
1137
|
-
count: 1,
|
|
1138
|
-
expectedLines: ['h world test'],
|
|
1139
|
-
expectedCursorRow: 0,
|
|
1140
|
-
expectedCursorCol: 1,
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
command: 'ce',
|
|
1144
|
-
desc: 'change multiple word ends with count',
|
|
1145
|
-
lines: ['hello world test'],
|
|
1146
|
-
cursorRow: 0,
|
|
1147
|
-
cursorCol: 1,
|
|
1148
|
-
actionType: 'vim_change_word_end',
|
|
1149
|
-
count: 2,
|
|
1150
|
-
expectedLines: ['h test'],
|
|
1151
|
-
expectedCursorRow: 0,
|
|
1152
|
-
expectedCursorCol: 1,
|
|
1153
|
-
},
|
|
1154
|
-
{
|
|
1155
|
-
command: 'cb',
|
|
1156
|
-
desc: 'change from cursor to start of previous word',
|
|
1157
|
-
lines: ['hello world test'],
|
|
1158
|
-
cursorRow: 0,
|
|
1159
|
-
cursorCol: 11,
|
|
1160
|
-
actionType: 'vim_change_word_backward',
|
|
1161
|
-
count: 1,
|
|
1162
|
-
expectedLines: ['hello test'],
|
|
1163
|
-
expectedCursorRow: 0,
|
|
1164
|
-
expectedCursorCol: 6,
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
command: 'cc',
|
|
1168
|
-
desc: 'clear the line and place cursor at the start',
|
|
1169
|
-
lines: [' hello world'],
|
|
1170
|
-
cursorRow: 0,
|
|
1171
|
-
cursorCol: 5,
|
|
1172
|
-
actionType: 'vim_change_line',
|
|
1173
|
-
count: 1,
|
|
1174
|
-
expectedLines: [''],
|
|
1175
|
-
expectedCursorRow: 0,
|
|
1176
|
-
expectedCursorCol: 0,
|
|
1177
|
-
},
|
|
1178
|
-
{
|
|
1179
|
-
command: 'dd',
|
|
1180
|
-
desc: 'delete the current line',
|
|
1181
|
-
lines: ['line1', 'line2', 'line3'],
|
|
1182
|
-
cursorRow: 1,
|
|
1183
|
-
cursorCol: 2,
|
|
1184
|
-
actionType: 'vim_delete_line',
|
|
1185
|
-
count: 1,
|
|
1186
|
-
expectedLines: ['line1', 'line3'],
|
|
1187
|
-
expectedCursorRow: 1,
|
|
1188
|
-
expectedCursorCol: 0,
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
command: 'dd',
|
|
1192
|
-
desc: 'delete multiple lines with count',
|
|
1193
|
-
lines: ['line1', 'line2', 'line3', 'line4'],
|
|
1194
|
-
cursorRow: 1,
|
|
1195
|
-
cursorCol: 2,
|
|
1196
|
-
actionType: 'vim_delete_line',
|
|
1197
|
-
count: 2,
|
|
1198
|
-
expectedLines: ['line1', 'line4'],
|
|
1199
|
-
expectedCursorRow: 1,
|
|
1200
|
-
expectedCursorCol: 0,
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
command: 'dd',
|
|
1204
|
-
desc: 'handle deleting last line',
|
|
1205
|
-
lines: ['only line'],
|
|
1206
|
-
cursorRow: 0,
|
|
1207
|
-
cursorCol: 3,
|
|
1208
|
-
actionType: 'vim_delete_line',
|
|
1209
|
-
count: 1,
|
|
1210
|
-
expectedLines: [''],
|
|
1211
|
-
expectedCursorRow: 0,
|
|
1212
|
-
expectedCursorCol: 0,
|
|
1213
|
-
},
|
|
1214
|
-
{
|
|
1215
|
-
command: 'D',
|
|
1216
|
-
desc: 'delete from cursor to end of line',
|
|
1217
|
-
lines: ['hello world test'],
|
|
1218
|
-
cursorRow: 0,
|
|
1219
|
-
cursorCol: 6,
|
|
1220
|
-
actionType: 'vim_delete_to_end_of_line',
|
|
1221
|
-
expectedLines: ['hello '],
|
|
1222
|
-
expectedCursorRow: 0,
|
|
1223
|
-
expectedCursorCol: 6,
|
|
1224
|
-
},
|
|
1225
|
-
{
|
|
1226
|
-
command: 'D',
|
|
1227
|
-
desc: 'handle D at end of line',
|
|
1228
|
-
lines: ['hello world'],
|
|
1229
|
-
cursorRow: 0,
|
|
1230
|
-
cursorCol: 11,
|
|
1231
|
-
actionType: 'vim_delete_to_end_of_line',
|
|
1232
|
-
expectedLines: ['hello world'],
|
|
1233
|
-
expectedCursorRow: 0,
|
|
1234
|
-
expectedCursorCol: 11,
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
command: 'C',
|
|
1238
|
-
desc: 'change from cursor to end of line',
|
|
1239
|
-
lines: ['hello world test'],
|
|
1240
|
-
cursorRow: 0,
|
|
1241
|
-
cursorCol: 6,
|
|
1242
|
-
actionType: 'vim_change_to_end_of_line',
|
|
1243
|
-
expectedLines: ['hello '],
|
|
1244
|
-
expectedCursorRow: 0,
|
|
1245
|
-
expectedCursorCol: 6,
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
command: 'C',
|
|
1249
|
-
desc: 'handle C at beginning of line',
|
|
1250
|
-
lines: ['hello world'],
|
|
1251
|
-
cursorRow: 0,
|
|
1252
|
-
cursorCol: 0,
|
|
1253
|
-
actionType: 'vim_change_to_end_of_line',
|
|
1254
|
-
expectedLines: [''],
|
|
1255
|
-
expectedCursorRow: 0,
|
|
1256
|
-
expectedCursorCol: 0,
|
|
1257
|
-
},
|
|
1258
|
-
];
|
|
1259
|
-
it.each(testCases)('$command: should $desc', ({ lines, cursorRow, cursorCol, actionType, count, expectedLines, expectedCursorRow, expectedCursorCol, }) => {
|
|
1260
|
-
const initialState = createMockTextBufferState({
|
|
1261
|
-
lines,
|
|
1262
|
-
cursorRow,
|
|
1263
|
-
cursorCol,
|
|
1264
|
-
preferredCol: null,
|
|
1265
|
-
undoStack: [],
|
|
1266
|
-
redoStack: [],
|
|
1267
|
-
clipboard: null,
|
|
1268
|
-
selectionAnchor: null,
|
|
1269
|
-
});
|
|
1270
|
-
const action = (count
|
|
1271
|
-
? { type: actionType, payload: { count } }
|
|
1272
|
-
: { type: actionType });
|
|
1273
|
-
const result = textBufferReducer(initialState, action);
|
|
1274
|
-
expect(result.lines).toEqual(expectedLines);
|
|
1275
|
-
expect(result.cursorRow).toBe(expectedCursorRow);
|
|
1276
|
-
expect(result.cursorCol).toBe(expectedCursorCol);
|
|
1277
|
-
});
|
|
1278
|
-
});
|
|
1279
|
-
describe('double-escape to clear buffer', () => {
|
|
1280
|
-
beforeEach(() => {
|
|
1281
|
-
mockBuffer = createMockBuffer('hello world');
|
|
1282
|
-
mockVimContext.vimEnabled = true;
|
|
1283
|
-
mockVimContext.vimMode = 'NORMAL';
|
|
1284
|
-
mockHandleFinalSubmit = vi.fn();
|
|
1285
|
-
vi.useFakeTimers();
|
|
1286
|
-
});
|
|
1287
|
-
afterEach(() => {
|
|
1288
|
-
vi.useRealTimers();
|
|
1289
|
-
});
|
|
1290
|
-
it('should clear buffer on double-escape in NORMAL mode', async () => {
|
|
1291
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1292
|
-
// First escape - should pass through (return false)
|
|
1293
|
-
let handled;
|
|
1294
|
-
await act(async () => {
|
|
1295
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1296
|
-
});
|
|
1297
|
-
expect(handled).toBe(false);
|
|
1298
|
-
// Second escape within timeout - should clear buffer (return true)
|
|
1299
|
-
await act(async () => {
|
|
1300
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1301
|
-
});
|
|
1302
|
-
expect(handled).toBe(true);
|
|
1303
|
-
expect(mockBuffer.setText).toHaveBeenCalledWith('');
|
|
1304
|
-
});
|
|
1305
|
-
it('should clear buffer on double-escape in INSERT mode', async () => {
|
|
1306
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1307
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1308
|
-
// First escape - switches to NORMAL mode
|
|
1309
|
-
let handled;
|
|
1310
|
-
await act(async () => {
|
|
1311
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1312
|
-
});
|
|
1313
|
-
expect(handled).toBe(true);
|
|
1314
|
-
expect(mockBuffer.vimEscapeInsertMode).toHaveBeenCalled();
|
|
1315
|
-
// Second escape within timeout - should clear buffer
|
|
1316
|
-
await act(async () => {
|
|
1317
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1318
|
-
});
|
|
1319
|
-
expect(handled).toBe(true);
|
|
1320
|
-
expect(mockBuffer.setText).toHaveBeenCalledWith('');
|
|
1321
|
-
});
|
|
1322
|
-
it('should NOT clear buffer if escapes are too slow', async () => {
|
|
1323
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1324
|
-
// First escape
|
|
1325
|
-
await act(async () => {
|
|
1326
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1327
|
-
});
|
|
1328
|
-
// Wait longer than timeout (500ms)
|
|
1329
|
-
await act(async () => {
|
|
1330
|
-
vi.advanceTimersByTime(600);
|
|
1331
|
-
});
|
|
1332
|
-
// Second escape - should NOT clear buffer because timeout expired
|
|
1333
|
-
let handled;
|
|
1334
|
-
await act(async () => {
|
|
1335
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1336
|
-
});
|
|
1337
|
-
// First escape of new sequence, passes through
|
|
1338
|
-
expect(handled).toBe(false);
|
|
1339
|
-
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
1340
|
-
});
|
|
1341
|
-
it('should clear escape history when clearing pending operator', async () => {
|
|
1342
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1343
|
-
// First escape
|
|
1344
|
-
await act(async () => {
|
|
1345
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1346
|
-
});
|
|
1347
|
-
// Type 'd' to set pending operator
|
|
1348
|
-
await act(async () => {
|
|
1349
|
-
result.current.handleInput(TEST_SEQUENCES.DELETE);
|
|
1350
|
-
});
|
|
1351
|
-
// Escape to clear pending operator
|
|
1352
|
-
await act(async () => {
|
|
1353
|
-
result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1354
|
-
});
|
|
1355
|
-
// Another escape - should NOT clear buffer (history was reset)
|
|
1356
|
-
let handled;
|
|
1357
|
-
await act(async () => {
|
|
1358
|
-
handled = result.current.handleInput(TEST_SEQUENCES.ESCAPE);
|
|
1359
|
-
});
|
|
1360
|
-
expect(handled).toBe(false);
|
|
1361
|
-
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
1362
|
-
});
|
|
1363
|
-
it('should pass Ctrl+C through to InputPrompt in NORMAL mode', async () => {
|
|
1364
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1365
|
-
let handled;
|
|
1366
|
-
await act(async () => {
|
|
1367
|
-
handled = result.current.handleInput(TEST_SEQUENCES.CTRL_C);
|
|
1368
|
-
});
|
|
1369
|
-
// Should return false to let InputPrompt handle it
|
|
1370
|
-
expect(handled).toBe(false);
|
|
1371
|
-
});
|
|
1372
|
-
it('should pass Ctrl+C through to InputPrompt in INSERT mode', async () => {
|
|
1373
|
-
mockVimContext.vimMode = 'INSERT';
|
|
1374
|
-
const { result } = renderHook(() => useVim(mockBuffer, mockHandleFinalSubmit));
|
|
1375
|
-
let handled;
|
|
1376
|
-
await act(async () => {
|
|
1377
|
-
handled = result.current.handleInput(TEST_SEQUENCES.CTRL_C);
|
|
1378
|
-
});
|
|
1379
|
-
// Should return false to let InputPrompt handle it
|
|
1380
|
-
expect(handled).toBe(false);
|
|
1381
|
-
});
|
|
1382
|
-
});
|
|
1383
|
-
});
|
|
1384
|
-
//# sourceMappingURL=vim.test.js.map
|