@zgsm/costrict-cli 0.0.1
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/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +93 -0
- package/dist/src/commands/extensions/disable.d.ts +13 -0
- package/dist/src/commands/extensions/disable.js +69 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/disable.test.d.ts +6 -0
- package/dist/src/commands/extensions/disable.test.js +169 -0
- package/dist/src/commands/extensions/disable.test.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +13 -0
- package/dist/src/commands/extensions/enable.js +71 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/enable.test.d.ts +6 -0
- package/dist/src/commands/extensions/enable.test.js +150 -0
- package/dist/src/commands/extensions/enable.test.js.map +1 -0
- package/dist/src/commands/extensions/examples/context/GEMINI.md +14 -0
- package/dist/src/commands/extensions/examples/context/gemini-extension.json +4 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/gemini-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/gemini-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.d.ts +6 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.js +46 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.js.map +1 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.d.ts +6 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js +111 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +1 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.test.ts +135 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/gemini-extension.json +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +16 -0
- package/dist/src/commands/extensions/install.js +111 -0
- package/dist/src/commands/extensions/install.js.map +1 -0
- package/dist/src/commands/extensions/install.test.d.ts +6 -0
- package/dist/src/commands/extensions/install.test.js +122 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/link.d.ts +13 -0
- package/dist/src/commands/extensions/link.js +64 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/link.test.d.ts +6 -0
- package/dist/src/commands/extensions/link.test.js +137 -0
- package/dist/src/commands/extensions/link.test.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +45 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/list.test.d.ts +6 -0
- package/dist/src/commands/extensions/list.test.js +111 -0
- package/dist/src/commands/extensions/list.test.js.map +1 -0
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +86 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.d.ts +6 -0
- package/dist/src/commands/extensions/new.test.js +62 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/settings.d.ts +7 -0
- package/dist/src/commands/extensions/settings.js +111 -0
- package/dist/src/commands/extensions/settings.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +67 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
- package/dist/src/commands/extensions/uninstall.test.js +199 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +13 -0
- package/dist/src/commands/extensions/update.js +107 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions/update.test.d.ts +6 -0
- package/dist/src/commands/extensions/update.test.js +170 -0
- package/dist/src/commands/extensions/update.test.js.map +1 -0
- package/dist/src/commands/extensions/utils.d.ts +13 -0
- package/dist/src/commands/extensions/utils.js +29 -0
- package/dist/src/commands/extensions/utils.js.map +1 -0
- package/dist/src/commands/extensions/validate.d.ts +12 -0
- package/dist/src/commands/extensions/validate.js +85 -0
- package/dist/src/commands/extensions/validate.js.map +1 -0
- package/dist/src/commands/extensions/validate.test.d.ts +6 -0
- package/dist/src/commands/extensions/validate.test.js +96 -0
- package/dist/src/commands/extensions/validate.test.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +40 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/extensions.test.d.ts +6 -0
- package/dist/src/commands/extensions.test.js +67 -0
- package/dist/src/commands/extensions.test.js.map +1 -0
- package/dist/src/commands/hooks/migrate.d.ts +11 -0
- package/dist/src/commands/hooks/migrate.js +206 -0
- package/dist/src/commands/hooks/migrate.js.map +1 -0
- package/dist/src/commands/hooks/migrate.test.d.ts +6 -0
- package/dist/src/commands/hooks/migrate.test.js +389 -0
- package/dist/src/commands/hooks/migrate.test.js.map +1 -0
- package/dist/src/commands/hooks.d.ts +7 -0
- package/dist/src/commands/hooks.js +22 -0
- package/dist/src/commands/hooks.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +178 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/add.test.d.ts +6 -0
- package/dist/src/commands/mcp/add.test.js +274 -0
- package/dist/src/commands/mcp/add.test.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +122 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/list.test.d.ts +6 -0
- package/dist/src/commands/mcp/list.test.js +126 -0
- package/dist/src/commands/mcp/list.test.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +47 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp/remove.test.d.ts +6 -0
- package/dist/src/commands/mcp/remove.test.js +189 -0
- package/dist/src/commands/mcp/remove.test.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +25 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/commands/mcp.test.d.ts +6 -0
- package/dist/src/commands/mcp.test.js +63 -0
- package/dist/src/commands/mcp.test.js.map +1 -0
- package/dist/src/commands/utils.d.ts +6 -0
- package/dist/src/commands/utils.js +11 -0
- package/dist/src/commands/utils.js.map +1 -0
- package/dist/src/commands/utils.test.d.ts +6 -0
- package/dist/src/commands/utils.test.js +35 -0
- package/dist/src/commands/utils.test.js.map +1 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +53 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/auth.test.d.ts +6 -0
- package/dist/src/config/auth.test.js +145 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +36 -0
- package/dist/src/config/config.integration.test.d.ts +6 -0
- package/dist/src/config/config.integration.test.js +204 -0
- package/dist/src/config/config.integration.test.js.map +1 -0
- package/dist/src/config/config.js +518 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/config.test.d.ts +6 -0
- package/dist/src/config/config.test.js +1953 -0
- package/dist/src/config/config.test.js.map +1 -0
- package/dist/src/config/extension-manager.d.ts +64 -0
- package/dist/src/config/extension-manager.js +517 -0
- package/dist/src/config/extension-manager.js.map +1 -0
- package/dist/src/config/extension.d.ts +28 -0
- package/dist/src/config/extension.js +20 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/extension.test.d.ts +6 -0
- package/dist/src/config/extension.test.js +1542 -0
- package/dist/src/config/extension.test.js.map +1 -0
- package/dist/src/config/extensions/consent.d.ts +38 -0
- package/dist/src/config/extensions/consent.js +126 -0
- package/dist/src/config/extensions/consent.js.map +1 -0
- package/dist/src/config/extensions/consent.test.d.ts +6 -0
- package/dist/src/config/extensions/consent.test.js +162 -0
- package/dist/src/config/extensions/consent.test.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +190 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +404 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/extensionSettings.d.ts +21 -0
- package/dist/src/config/extensions/extensionSettings.js +184 -0
- package/dist/src/config/extensions/extensionSettings.js.map +1 -0
- package/dist/src/config/extensions/extensionSettings.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionSettings.test.js +493 -0
- package/dist/src/config/extensions/extensionSettings.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +50 -0
- package/dist/src/config/extensions/github.js +416 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +441 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/github_fetch.d.ts +7 -0
- package/dist/src/config/extensions/github_fetch.js +46 -0
- package/dist/src/config/extensions/github_fetch.js.map +1 -0
- package/dist/src/config/extensions/github_fetch.test.d.ts +6 -0
- package/dist/src/config/extensions/github_fetch.test.js +169 -0
- package/dist/src/config/extensions/github_fetch.test.js.map +1 -0
- package/dist/src/config/extensions/storage.d.ts +14 -0
- package/dist/src/config/extensions/storage.js +32 -0
- package/dist/src/config/extensions/storage.js.map +1 -0
- package/dist/src/config/extensions/storage.test.d.ts +6 -0
- package/dist/src/config/extensions/storage.test.js +64 -0
- package/dist/src/config/extensions/storage.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +20 -0
- package/dist/src/config/extensions/update.js +120 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +231 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +32 -0
- package/dist/src/config/extensions/variableSchema.js +22 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -0
- package/dist/src/config/extensions/variables.d.ts +21 -0
- package/dist/src/config/extensions/variables.js +46 -0
- package/dist/src/config/extensions/variables.js.map +1 -0
- package/dist/src/config/extensions/variables.test.d.ts +6 -0
- package/dist/src/config/extensions/variables.test.js +103 -0
- package/dist/src/config/extensions/variables.test.js.map +1 -0
- package/dist/src/config/keyBindings.d.ts +93 -0
- package/dist/src/config/keyBindings.js +305 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/keyBindings.test.d.ts +6 -0
- package/dist/src/config/keyBindings.test.js +93 -0
- package/dist/src/config/keyBindings.test.js.map +1 -0
- package/dist/src/config/policy-engine.integration.test.d.ts +6 -0
- package/dist/src/config/policy-engine.integration.test.js +291 -0
- package/dist/src/config/policy-engine.integration.test.js.map +1 -0
- package/dist/src/config/policy.d.ts +9 -0
- package/dist/src/config/policy.js +21 -0
- package/dist/src/config/policy.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +12 -0
- package/dist/src/config/sandboxConfig.js +74 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/sandboxConfig.test.d.ts +6 -0
- package/dist/src/config/sandboxConfig.test.js +178 -0
- package/dist/src/config/sandboxConfig.test.js.map +1 -0
- package/dist/src/config/settingPaths.d.ts +10 -0
- package/dist/src/config/settingPaths.js +11 -0
- package/dist/src/config/settingPaths.js.map +1 -0
- package/dist/src/config/settingPaths.test.d.ts +6 -0
- package/dist/src/config/settingPaths.test.js +22 -0
- package/dist/src/config/settingPaths.test.js.map +1 -0
- package/dist/src/config/settings-validation.d.ts +23 -0
- package/dist/src/config/settings-validation.js +249 -0
- package/dist/src/config/settings-validation.js.map +1 -0
- package/dist/src/config/settings-validation.test.d.ts +6 -0
- package/dist/src/config/settings-validation.test.js +322 -0
- package/dist/src/config/settings-validation.test.js.map +1 -0
- package/dist/src/config/settings.d.ts +85 -0
- package/dist/src/config/settings.js +618 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settings.test.d.ts +6 -0
- package/dist/src/config/settings.test.js +1955 -0
- package/dist/src/config/settings.test.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +1511 -0
- package/dist/src/config/settingsSchema.js +1756 -0
- package/dist/src/config/settingsSchema.js.map +1 -0
- package/dist/src/config/settingsSchema.test.d.ts +6 -0
- package/dist/src/config/settingsSchema.test.js +271 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/settings_repro.test.d.ts +6 -0
- package/dist/src/config/settings_repro.test.js +162 -0
- package/dist/src/config/settings_repro.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +55 -0
- package/dist/src/config/trustedFolders.js +176 -0
- package/dist/src/config/trustedFolders.js.map +1 -0
- package/dist/src/config/trustedFolders.test.d.ts +6 -0
- package/dist/src/config/trustedFolders.test.js +340 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +27 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/auth.test.d.ts +6 -0
- package/dist/src/core/auth.test.js +43 -0
- package/dist/src/core/auth.test.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +36 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/initializer.test.d.ts +6 -0
- package/dist/src/core/initializer.test.js +101 -0
- package/dist/src/core/initializer.test.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +20 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/core/theme.test.d.ts +6 -0
- package/dist/src/core/theme.test.js +46 -0
- package/dist/src/core/theme.test.js.map +1 -0
- package/dist/src/gemini.d.ts +14 -0
- package/dist/src/gemini.js +494 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +1238 -0
- package/dist/src/gemini.test.js.map +1 -0
- package/dist/src/gemini_cleanup.test.d.ts +6 -0
- package/dist/src/gemini_cleanup.test.js +202 -0
- package/dist/src/gemini_cleanup.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +7 -0
- package/dist/src/generated/git-commit.js +10 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +17 -0
- package/dist/src/nonInteractiveCli.js +335 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/nonInteractiveCli.test.d.ts +6 -0
- package/dist/src/nonInteractiveCli.test.js +1333 -0
- package/dist/src/nonInteractiveCli.test.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.d.ts +17 -0
- package/dist/src/nonInteractiveCliCommands.js +78 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +110 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +6 -0
- package/dist/src/services/BuiltinCommandLoader.test.js +200 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +55 -0
- package/dist/src/services/CommandService.js +91 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/services/CommandService.test.d.ts +6 -0
- package/dist/src/services/CommandService.test.js +234 -0
- package/dist/src/services/CommandService.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader.d.ts +51 -0
- package/dist/src/services/FileCommandLoader.js +230 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/FileCommandLoader.test.d.ts +6 -0
- package/dist/src/services/FileCommandLoader.test.js +1046 -0
- package/dist/src/services/FileCommandLoader.test.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +35 -0
- package/dist/src/services/McpPromptLoader.js +256 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
- package/dist/src/services/McpPromptLoader.test.js +411 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +16 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/argumentProcessor.test.js +40 -0
- package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +63 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +174 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.d.ts +29 -0
- package/dist/src/services/prompt-processors/injectionParser.js +60 -0
- package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js +189 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +27 -0
- package/dist/src/services/prompt-processors/shellProcessor.js +128 -0
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/shellProcessor.test.js +482 -0
- package/dist/src/services/prompt-processors/shellProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +45 -0
- package/dist/src/services/prompt-processors/types.js +20 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/test-utils/async.d.ts +9 -0
- package/dist/src/test-utils/async.js +29 -0
- package/dist/src/test-utils/async.js.map +1 -0
- package/dist/src/test-utils/createExtension.d.ts +17 -0
- package/dist/src/test-utils/createExtension.js +25 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/customMatchers.d.ts +14 -0
- package/dist/src/test-utils/customMatchers.js +40 -0
- package/dist/src/test-utils/customMatchers.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.d.ts +18 -0
- package/dist/src/test-utils/mockCommandContext.js +88 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.test.d.ts +6 -0
- package/dist/src/test-utils/mockCommandContext.test.js +51 -0
- package/dist/src/test-utils/mockCommandContext.test.js.map +1 -0
- package/dist/src/test-utils/render.d.ts +58 -0
- package/dist/src/test-utils/render.js +222 -0
- package/dist/src/test-utils/render.js.map +1 -0
- package/dist/src/test-utils/render.test.d.ts +6 -0
- package/dist/src/test-utils/render.test.js +79 -0
- package/dist/src/test-utils/render.test.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.js +29 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/App.test.d.ts +6 -0
- package/dist/src/ui/App.test.js +160 -0
- package/dist/src/ui/App.test.js.map +1 -0
- package/dist/src/ui/AppContainer.d.ts +16 -0
- package/dist/src/ui/AppContainer.js +1256 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/AppContainer.test.d.ts +6 -0
- package/dist/src/ui/AppContainer.test.js +1580 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +16 -0
- package/dist/src/ui/IdeIntegrationNudge.js +50 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.test.d.ts +6 -0
- package/dist/src/ui/IdeIntegrationNudge.test.js +147 -0
- package/dist/src/ui/IdeIntegrationNudge.test.js.map +1 -0
- package/dist/src/ui/auth/ApiAuthDialog.d.ts +14 -0
- package/dist/src/ui/auth/ApiAuthDialog.js +59 -0
- package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.js +110 -0
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.d.ts +18 -0
- package/dist/src/ui/auth/AuthDialog.js +149 -0
- package/dist/src/ui/auth/AuthDialog.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/AuthDialog.test.js +288 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/auth/AuthInProgress.js +23 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.test.d.ts +6 -0
- package/dist/src/ui/auth/AuthInProgress.test.js +71 -0
- package/dist/src/ui/auth/AuthInProgress.test.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +17 -0
- package/dist/src/ui/auth/useAuth.js +114 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/auth/useAuth.test.d.ts +6 -0
- package/dist/src/ui/auth/useAuth.test.js +189 -0
- package/dist/src/ui/auth/useAuth.test.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +57 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +56 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/aboutCommand.test.js +131 -0
- package/dist/src/ui/commands/aboutCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +17 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/authCommand.test.js +30 -0
- package/dist/src/ui/commands/authCommand.test.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +76 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/bugCommand.test.js +105 -0
- package/dist/src/ui/commands/bugCommand.test.js.map +1 -0
- package/dist/src/ui/commands/builtin/agentCommand.d.ts +10 -0
- package/dist/src/ui/commands/builtin/agentCommand.js +160 -0
- package/dist/src/ui/commands/builtin/agentCommand.js.map +1 -0
- package/dist/src/ui/commands/builtin/agentCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/builtin/agentCommand.test.js +172 -0
- package/dist/src/ui/commands/builtin/agentCommand.test.js.map +1 -0
- package/dist/src/ui/commands/builtin/planApplyCommand.d.ts +10 -0
- package/dist/src/ui/commands/builtin/planApplyCommand.js +104 -0
- package/dist/src/ui/commands/builtin/planApplyCommand.js.map +1 -0
- package/dist/src/ui/commands/builtin/planCommand.d.ts +10 -0
- package/dist/src/ui/commands/builtin/planCommand.js +308 -0
- package/dist/src/ui/commands/builtin/planCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +9 -0
- package/dist/src/ui/commands/chatCommand.js +326 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/chatCommand.test.js +594 -0
- package/dist/src/ui/commands/chatCommand.test.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +57 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/clearCommand.test.js +83 -0
- package/dist/src/ui/commands/clearCommand.test.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +67 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/compressCommand.test.js +98 -0
- package/dist/src/ui/commands/compressCommand.test.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +61 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/copyCommand.test.js +242 -0
- package/dist/src/ui/commands/copyCommand.test.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +17 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/corgiCommand.test.js +28 -0
- package/dist/src/ui/commands/corgiCommand.test.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/directoryCommand.js +189 -0
- package/dist/src/ui/commands/directoryCommand.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/directoryCommand.test.js +235 -0
- package/dist/src/ui/commands/directoryCommand.test.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +32 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/docsCommand.test.js +72 -0
- package/dist/src/ui/commands/docsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +17 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/editorCommand.test.js +27 -0
- package/dist/src/ui/commands/editorCommand.test.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +12 -0
- package/dist/src/ui/commands/extensionsCommand.js +403 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/extensionsCommand.test.js +588 -0
- package/dist/src/ui/commands/extensionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +22 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/helpCommand.test.js +42 -0
- package/dist/src/ui/commands/helpCommand.test.js.map +1 -0
- package/dist/src/ui/commands/hooksCommand.d.ts +7 -0
- package/dist/src/ui/commands/hooksCommand.js +207 -0
- package/dist/src/ui/commands/hooksCommand.js.map +1 -0
- package/dist/src/ui/commands/hooksCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/hooksCommand.test.js +396 -0
- package/dist/src/ui/commands/hooksCommand.test.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.d.ts +7 -0
- package/dist/src/ui/commands/ideCommand.js +233 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/ideCommand.test.js +203 -0
- package/dist/src/ui/commands/ideCommand.test.js.map +1 -0
- package/dist/src/ui/commands/initCommand.d.ts +7 -0
- package/dist/src/ui/commands/initCommand.js +37 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/initCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/initCommand.test.js +80 -0
- package/dist/src/ui/commands/initCommand.test.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +285 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/mcpCommand.test.js +181 -0
- package/dist/src/ui/commands/mcpCommand.test.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +108 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/memoryCommand.test.js +254 -0
- package/dist/src/ui/commands/memoryCommand.test.js.map +1 -0
- package/dist/src/ui/commands/modeCommand.d.ts +7 -0
- package/dist/src/ui/commands/modeCommand.js +45 -0
- package/dist/src/ui/commands/modeCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.d.ts +7 -0
- package/dist/src/ui/commands/modelCommand.js +17 -0
- package/dist/src/ui/commands/modelCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/modelCommand.test.js +30 -0
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +75 -0
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/permissionsCommand.test.js +86 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.d.ts +7 -0
- package/dist/src/ui/commands/policiesCommand.js +61 -0
- package/dist/src/ui/commands/policiesCommand.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/policiesCommand.test.js +83 -0
- package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +17 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/privacyCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/privacyCommand.test.js +32 -0
- package/dist/src/ui/commands/privacyCommand.test.js.map +1 -0
- package/dist/src/ui/commands/profileCommand.d.ts +7 -0
- package/dist/src/ui/commands/profileCommand.js +24 -0
- package/dist/src/ui/commands/profileCommand.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +7 -0
- package/dist/src/ui/commands/quitCommand.js +35 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/quitCommand.test.js +50 -0
- package/dist/src/ui/commands/quitCommand.test.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +130 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/restoreCommand.test.js +190 -0
- package/dist/src/ui/commands/restoreCommand.test.js.map +1 -0
- package/dist/src/ui/commands/resumeCommand.d.ts +7 -0
- package/dist/src/ui/commands/resumeCommand.js +17 -0
- package/dist/src/ui/commands/resumeCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +17 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/settingsCommand.test.js +30 -0
- package/dist/src/ui/commands/settingsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.d.ts +10 -0
- package/dist/src/ui/commands/setupGithubCommand.js +195 -0
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js +238 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +79 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/statsCommand.test.js +56 -0
- package/dist/src/ui/commands/statsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +43 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/terminalSetupCommand.test.js +66 -0
- package/dist/src/ui/commands/terminalSetupCommand.test.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +17 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/themeCommand.test.js +32 -0
- package/dist/src/ui/commands/themeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +43 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/toolsCommand.test.js +100 -0
- package/dist/src/ui/commands/toolsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +135 -0
- package/dist/src/ui/commands/types.js +12 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +24 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +18 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AboutBox.test.d.ts +6 -0
- package/dist/src/ui/components/AboutBox.test.js +53 -0
- package/dist/src/ui/components/AboutBox.test.js.map +1 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +24 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +161 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.d.ts +14 -0
- package/dist/src/ui/components/AnsiOutput.js +12 -0
- package/dist/src/ui/components/AnsiOutput.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.d.ts +6 -0
- package/dist/src/ui/components/AnsiOutput.test.js +92 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +22 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/AppHeader.test.d.ts +6 -0
- package/dist/src/ui/components/AppHeader.test.js +144 -0
- package/dist/src/ui/components/AppHeader.test.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +11 -0
- package/dist/src/ui/components/AsciiArt.js +53 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/AutoAcceptIndicator.test.js +31 -0
- package/dist/src/ui/components/AutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/components/Banner.d.ts +14 -0
- package/dist/src/ui/components/Banner.js +28 -0
- package/dist/src/ui/components/Banner.js.map +1 -0
- package/dist/src/ui/components/Banner.test.d.ts +6 -0
- package/dist/src/ui/components/Banner.test.js +24 -0
- package/dist/src/ui/components/Banner.test.js.map +1 -0
- package/dist/src/ui/components/CliSpinner.d.ts +9 -0
- package/dist/src/ui/components/CliSpinner.js +19 -0
- package/dist/src/ui/components/CliSpinner.js.map +1 -0
- package/dist/src/ui/components/CliSpinner.test.d.ts +6 -0
- package/dist/src/ui/components/CliSpinner.test.js +23 -0
- package/dist/src/ui/components/CliSpinner.test.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +60 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Composer.test.d.ts +6 -0
- package/dist/src/ui/components/Composer.test.js +355 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.js +49 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.test.js +133 -0
- package/dist/src/ui/components/ConfigInitDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +77 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +26 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +19 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +56 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +71 -0
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +16 -0
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ContextUsageDisplay.test.js +39 -0
- package/dist/src/ui/components/ContextUsageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/CopyModeWarning.d.ts +7 -0
- package/dist/src/ui/components/CopyModeWarning.js +12 -0
- package/dist/src/ui/components/CopyModeWarning.js.map +1 -0
- package/dist/src/ui/components/CopyModeWarning.test.d.ts +6 -0
- package/dist/src/ui/components/CopyModeWarning.test.js +33 -0
- package/dist/src/ui/components/CopyModeWarning.test.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +25 -0
- package/dist/src/ui/components/DebugProfiler.js +162 -0
- package/dist/src/ui/components/DebugProfiler.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.test.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.test.js +201 -0
- package/dist/src/ui/components/DebugProfiler.test.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +15 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +54 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js +39 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +103 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/DialogManager.test.d.ts +6 -0
- package/dist/src/ui/components/DialogManager.test.js +167 -0
- package/dist/src/ui/components/DialogManager.test.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +80 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +6 -0
- package/dist/src/ui/components/EditorSettingsDialog.test.js +118 -0
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +1 -0
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/ExitWarning.test.d.ts +6 -0
- package/dist/src/ui/components/ExitWarning.test.js +54 -0
- package/dist/src/ui/components/ExitWarning.test.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +66 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js +90 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +7 -0
- package/dist/src/ui/components/Footer.js +49 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/Footer.test.d.ts +6 -0
- package/dist/src/ui/components/Footer.test.js +314 -0
- package/dist/src/ui/components/Footer.test.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +22 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +23 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +6 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +61 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +1 -0
- package/dist/src/ui/components/GradientRegression.test.d.ts +6 -0
- package/dist/src/ui/components/GradientRegression.test.js +105 -0
- package/dist/src/ui/components/GradientRegression.test.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +13 -0
- package/dist/src/ui/components/Header.js +29 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Header.test.d.ts +6 -0
- package/dist/src/ui/components/Header.test.js +145 -0
- package/dist/src/ui/components/Header.test.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +13 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +67 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +21 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +31 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +185 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +33 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +50 -0
- package/dist/src/ui/components/InputPrompt.js +833 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/InputPrompt.test.js +2124 -0
- package/dist/src/ui/components/InputPrompt.test.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +30 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +207 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +25 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.d.ts +6 -0
- package/dist/src/ui/components/MainContent.js +76 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MainContent.test.d.ts +6 -0
- package/dist/src/ui/components/MainContent.test.js +73 -0
- package/dist/src/ui/components/MainContent.test.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/MemoryUsageDisplay.test.js +49 -0
- package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +86 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelDialog.test.js +224 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js +292 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +23 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.js +91 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +161 -0
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +68 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/Notifications.test.d.ts +6 -0
- package/dist/src/ui/components/Notifications.test.js +153 -0
- package/dist/src/ui/components/Notifications.test.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +16 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +58 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +162 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +15 -0
- package/dist/src/ui/components/PrepareLabel.js +72 -0
- package/dist/src/ui/components/PrepareLabel.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.test.d.ts +6 -0
- package/dist/src/ui/components/PrepareLabel.test.js +77 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.d.ts +18 -0
- package/dist/src/ui/components/ProQuotaDialog.js +88 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js +172 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +20 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +65 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.js +20 -0
- package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/QuittingDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.test.js +49 -0
- package/dist/src/ui/components/QuittingDisplay.test.js.map +1 -0
- package/dist/src/ui/components/RawMarkdownIndicator.d.ts +7 -0
- package/dist/src/ui/components/RawMarkdownIndicator.js +8 -0
- package/dist/src/ui/components/RawMarkdownIndicator.js.map +1 -0
- package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/RawMarkdownIndicator.test.js +34 -0
- package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +1 -0
- package/dist/src/ui/components/SessionBrowser.d.ts +98 -0
- package/dist/src/ui/components/SessionBrowser.js +459 -0
- package/dist/src/ui/components/SessionBrowser.js.map +1 -0
- package/dist/src/ui/components/SessionBrowser.test.d.ts +6 -0
- package/dist/src/ui/components/SessionBrowser.test.js +250 -0
- package/dist/src/ui/components/SessionBrowser.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +75 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
- package/dist/src/ui/components/SettingsDialog.js +704 -0
- package/dist/src/ui/components/SettingsDialog.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.test.d.ts +6 -0
- package/dist/src/ui/components/SettingsDialog.test.js +1133 -0
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +15 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js +49 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +40 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +36 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellInputPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ShellInputPrompt.test.js +82 -0
- package/dist/src/ui/components/ShellInputPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/ShellModeIndicator.test.js +17 -0
- package/dist/src/ui/components/ShellModeIndicator.test.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.test.d.ts +6 -0
- package/dist/src/ui/components/ShowMoreLines.test.js +40 -0
- package/dist/src/ui/components/ShowMoreLines.test.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +14 -0
- package/dist/src/ui/components/StatsDisplay.js +119 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/StatsDisplay.test.js +438 -0
- package/dist/src/ui/components/StatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/StickyHeader.d.ts +14 -0
- package/dist/src/ui/components/StickyHeader.js +5 -0
- package/dist/src/ui/components/StickyHeader.js.map +1 -0
- package/dist/src/ui/components/StickyHeader.test.d.ts +6 -0
- package/dist/src/ui/components/StickyHeader.test.js +17 -0
- package/dist/src/ui/components/StickyHeader.test.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +27 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +40 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.js +56 -0
- package/dist/src/ui/components/SuggestionsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +21 -0
- package/dist/src/ui/components/ThemeDialog.js +135 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ThemeDialog.test.js +102 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/ThemedGradient.d.ts +8 -0
- package/dist/src/ui/components/ThemedGradient.js +16 -0
- package/dist/src/ui/components/ThemedGradient.js.map +1 -0
- package/dist/src/ui/components/ThemedGradient.test.d.ts +6 -0
- package/dist/src/ui/components/ThemedGradient.test.js +30 -0
- package/dist/src/ui/components/ThemedGradient.test.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +9 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/Tips.test.d.ts +6 -0
- package/dist/src/ui/components/Tips.test.js +23 -0
- package/dist/src/ui/components/Tips.test.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.js +227 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.test.d.ts +6 -0
- package/dist/src/ui/components/UpdateNotification.test.js +16 -0
- package/dist/src/ui/components/UpdateNotification.test.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +46 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +168 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +17 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +258 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +231 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ErrorMessage.test.js +23 -0
- package/dist/src/ui/components/messages/ErrorMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/GeminiMessage.test.js +35 -0
- package/dist/src/ui/components/messages/GeminiMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +19 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +13 -0
- package/dist/src/ui/components/messages/InfoMessage.js +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/InfoMessage.test.js +28 -0
- package/dist/src/ui/components/messages/InfoMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ModelMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ModelMessage.js +5 -0
- package/dist/src/ui/components/messages/ModelMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ShellToolMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/ShellToolMessage.js +76 -0
- package/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +123 -0
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/Todo.d.ts +7 -0
- package/dist/src/ui/components/messages/Todo.js +91 -0
- package/dist/src/ui/components/messages/Todo.js.map +1 -0
- package/dist/src/ui/components/messages/Todo.test.d.ts +6 -0
- package/dist/src/ui/components/messages/Todo.test.js +114 -0
- package/dist/src/ui/components/messages/Todo.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +240 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +113 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +80 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +300 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +24 -0
- package/dist/src/ui/components/messages/ToolMessage.js +36 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +153 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +62 -0
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.d.ts +13 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.js +54 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.js.map +1 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +96 -0
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolShared.d.ts +23 -0
- package/dist/src/ui/components/messages/ToolShared.js +40 -0
- package/dist/src/ui/components/messages/ToolShared.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +12 -0
- package/dist/src/ui/components/messages/UserMessage.js +13 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/UserMessage.test.js +32 -0
- package/dist/src/ui/components/messages/UserMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/messages/WarningMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/WarningMessage.js +10 -0
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
- package/dist/src/ui/components/messages/WarningMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/WarningMessage.test.js +23 -0
- package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +72 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +385 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +35 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +451 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +175 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +45 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +21 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +134 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +14 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/Scrollable.d.ts +18 -0
- package/dist/src/ui/components/shared/Scrollable.js +84 -0
- package/dist/src/ui/components/shared/Scrollable.js.map +1 -0
- package/dist/src/ui/components/shared/Scrollable.test.d.ts +6 -0
- package/dist/src/ui/components/shared/Scrollable.test.js +74 -0
- package/dist/src/ui/components/shared/Scrollable.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScrollableList.d.ts +26 -0
- package/dist/src/ui/components/shared/ScrollableList.js +152 -0
- package/dist/src/ui/components/shared/ScrollableList.js.map +1 -0
- package/dist/src/ui/components/shared/ScrollableList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/ScrollableList.test.js +228 -0
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.d.ts +15 -0
- package/dist/src/ui/components/shared/TextInput.js +38 -0
- package/dist/src/ui/components/shared/TextInput.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.test.d.ts +6 -0
- package/dist/src/ui/components/shared/TextInput.test.js +242 -0
- package/dist/src/ui/components/shared/TextInput.test.js.map +1 -0
- package/dist/src/ui/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/src/ui/components/shared/VirtualizedList.js +312 -0
- package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.js +171 -0
- package/dist/src/ui/components/shared/VirtualizedList.test.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +492 -0
- package/dist/src/ui/components/shared/text-buffer.js +1665 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.test.d.ts +6 -0
- package/dist/src/ui/components/shared/text-buffer.test.js +1916 -0
- package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +552 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +6 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js +951 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +1 -0
- package/dist/src/ui/components/views/ChatList.d.ts +12 -0
- package/dist/src/ui/components/views/ChatList.js +17 -0
- package/dist/src/ui/components/views/ChatList.js.map +1 -0
- package/dist/src/ui/components/views/ChatList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ChatList.test.js +45 -0
- package/dist/src/ui/components/views/ChatList.test.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.d.ts +12 -0
- package/dist/src/ui/components/views/ExtensionsList.js +44 -0
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +111 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/HooksList.d.ts +22 -0
- package/dist/src/ui/components/views/HooksList.js +23 -0
- package/dist/src/ui/components/views/HooksList.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +87 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +136 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +7 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/constants/tips.d.ts +6 -0
- package/dist/src/ui/constants/tips.js +167 -0
- package/dist/src/ui/constants/tips.js.map +1 -0
- package/dist/src/ui/constants/wittyPhrases.d.ts +6 -0
- package/dist/src/ui/constants/wittyPhrases.js +137 -0
- package/dist/src/ui/constants/wittyPhrases.js.map +1 -0
- package/dist/src/ui/constants.d.ts +20 -0
- package/dist/src/ui/constants.js +29 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/AppContext.d.ts +11 -0
- package/dist/src/ui/contexts/AppContext.js +15 -0
- package/dist/src/ui/contexts/AppContext.js.map +1 -0
- package/dist/src/ui/contexts/AppModeContext.d.ts +17 -0
- package/dist/src/ui/contexts/AppModeContext.js +35 -0
- package/dist/src/ui/contexts/AppModeContext.js.map +1 -0
- package/dist/src/ui/contexts/ConfigContext.d.ts +9 -0
- package/dist/src/ui/contexts/ConfigContext.js +16 -0
- package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +31 -0
- package/dist/src/ui/contexts/KeypressContext.js +529 -0
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/KeypressContext.test.js +711 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
- package/dist/src/ui/contexts/MouseContext.d.ts +21 -0
- package/dist/src/ui/contexts/MouseContext.js +104 -0
- package/dist/src/ui/contexts/MouseContext.js.map +1 -0
- package/dist/src/ui/contexts/MouseContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/MouseContext.test.js +198 -0
- package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +38 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/ScrollProvider.d.ts +25 -0
- package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +6 -0
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js +319 -0
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +1 -0
- package/dist/src/ui/contexts/ScrollProvider.js +242 -0
- package/dist/src/ui/contexts/ScrollProvider.js.map +1 -0
- package/dist/src/ui/contexts/ScrollProvider.test.d.ts +6 -0
- package/dist/src/ui/contexts/ScrollProvider.test.js +377 -0
- package/dist/src/ui/contexts/ScrollProvider.test.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +46 -0
- package/dist/src/ui/contexts/SessionContext.js +158 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/SessionContext.test.js +198 -0
- package/dist/src/ui/contexts/SessionContext.test.js.map +1 -0
- package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
- package/dist/src/ui/contexts/SettingsContext.js +15 -0
- package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
- package/dist/src/ui/contexts/ShellFocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
- package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +50 -0
- package/dist/src/ui/contexts/UIActionsContext.js +21 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +121 -0
- package/dist/src/ui/contexts/UIStateContext.js +17 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
- package/dist/src/ui/contexts/VimModeContext.js +48 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/debug.d.ts +8 -0
- package/dist/src/ui/debug.js +11 -0
- package/dist/src/ui/debug.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +18 -0
- package/dist/src/ui/editors/editorSettingsManager.js +37 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/README.md +81 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +32 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +499 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js +1026 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
- package/dist/src/ui/hooks/keyToAnsi.js +67 -0
- package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +19 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +285 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +521 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +49 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +455 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +846 -0
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/useAlternateBuffer.d.ts +8 -0
- package/dist/src/ui/hooks/useAlternateBuffer.js +12 -0
- package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.d.ts +10 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.js +91 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.js.map +1 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +85 -0
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +229 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAtCompletion.test.js +417 -0
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +13 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +60 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +410 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useBanner.d.ts +14 -0
- package/dist/src/ui/hooks/useBanner.js +48 -0
- package/dist/src/ui/hooks/useBanner.js.map +1 -0
- package/dist/src/ui/hooks/useBanner.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBanner.test.js +92 -0
- package/dist/src/ui/hooks/useBanner.test.js.map +1 -0
- package/dist/src/ui/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/src/ui/hooks/useBatchedScroll.js +27 -0
- package/dist/src/ui/hooks/useBatchedScroll.js.map +1 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +6 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.js +62 -0
- package/dist/src/ui/hooks/useBatchedScroll.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +31 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +41 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +232 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useCommandCompletion.test.js +376 -0
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +24 -0
- package/dist/src/ui/hooks/useCompletion.js +88 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +11 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +101 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +6 -0
- package/dist/src/ui/hooks/useConsoleMessages.test.js +159 -0
- package/dist/src/ui/hooks/useConsoleMessages.test.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +44 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js +179 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +31 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +175 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +263 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFlickerDetector.d.ts +14 -0
- package/dist/src/ui/hooks/useFlickerDetector.js +37 -0
- package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +6 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.js +106 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +10 -0
- package/dist/src/ui/hooks/useFocus.js +51 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.test.d.ts +6 -0
- package/dist/src/ui/hooks/useFocus.test.js +131 -0
- package/dist/src/ui/hooks/useFocus.test.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.d.ts +14 -0
- package/dist/src/ui/hooks/useFolderTrust.js +81 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/useFolderTrust.test.js +210 -0
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +36 -0
- package/dist/src/ui/hooks/useGeminiStream.js +824 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js +1827 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +65 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js +183 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +25 -0
- package/dist/src/ui/hooks/useHistoryManager.js +108 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js +172 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +16 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +67 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +214 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInactivityTimer.d.ts +14 -0
- package/dist/src/ui/hooks/useInactivityTimer.js +30 -0
- package/dist/src/ui/hooks/useInactivityTimer.js.map +1 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +8 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +121 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.js.map +1 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +151 -0
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistory.test.js +208 -0
- package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +82 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +238 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +17 -0
- package/dist/src/ui/hooks/useKeypress.js +27 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.test.d.ts +6 -0
- package/dist/src/ui/hooks/useKeypress.test.js +200 -0
- package/dist/src/ui/hooks/useKeypress.test.js.map +1 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +14 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +19 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +127 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +11 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.d.ts +13 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js +28 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +62 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +24 -0
- package/dist/src/ui/hooks/useMessageQueue.js +61 -0
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js +293 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.d.ts +12 -0
- package/dist/src/ui/hooks/useModelCommand.js +21 -0
- package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useModelCommand.test.js +45 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/useMouse.d.ts +17 -0
- package/dist/src/ui/hooks/useMouse.js +27 -0
- package/dist/src/ui/hooks/useMouse.js.map +1 -0
- package/dist/src/ui/hooks/useMouse.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMouse.test.js +57 -0
- package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
- package/dist/src/ui/hooks/useMouseClick.d.ts +12 -0
- package/dist/src/ui/hooks/useMouseClick.js +28 -0
- package/dist/src/ui/hooks/useMouseClick.js.map +1 -0
- package/dist/src/ui/hooks/useMouseClick.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMouseClick.test.js +59 -0
- package/dist/src/ui/hooks/useMouseClick.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +115 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +284 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +16 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +91 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePhraseCycler.test.js +237 -0
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
- package/dist/src/ui/hooks/usePrivacySettings.js +103 -0
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.js +104 -0
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -0
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/usePromptCompletion.js +171 -0
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +19 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +112 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +332 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +42 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +213 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +58 -0
- package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +103 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +169 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +273 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +819 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useSessionBrowser.d.ts +35 -0
- package/dist/src/ui/hooks/useSessionBrowser.js +224 -0
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.js +209 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -0
- package/dist/src/ui/hooks/useSessionResume.d.ts +30 -0
- package/dist/src/ui/hooks/useSessionResume.js +57 -0
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -0
- package/dist/src/ui/hooks/useSessionResume.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionResume.test.js +325 -0
- package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -0
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
- package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
- package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +14 -0
- package/dist/src/ui/hooks/useShellHistory.js +113 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useShellHistory.test.js +223 -0
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +59 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +382 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +9 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js +735 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +26 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +16 -0
- package/dist/src/ui/hooks/useThemeCommand.js +74 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTimer.test.js +119 -0
- package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +857 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +641 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/hooks/vim.test.d.ts +6 -0
- package/dist/src/ui/hooks/vim.test.js +1270 -0
- package/dist/src/ui/hooks/vim.test.js.map +1 -0
- package/dist/src/ui/keyMatchers.d.ts +27 -0
- package/dist/src/ui/keyMatchers.js +68 -0
- package/dist/src/ui/keyMatchers.js.map +1 -0
- package/dist/src/ui/keyMatchers.test.d.ts +6 -0
- package/dist/src/ui/keyMatchers.test.js +364 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -0
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +24 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +17 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +29 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +42 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +6 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +121 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +18 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +6 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +34 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +18 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +6 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +34 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +6 -0
- package/dist/src/ui/privacy/PrivacyNotice.test.js +62 -0
- package/dist/src/ui/privacy/PrivacyNotice.test.js.map +1 -0
- package/dist/src/ui/semantic-colors.d.ts +7 -0
- package/dist/src/ui/semantic-colors.js +24 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +67 -0
- package/dist/src/ui/state/extensions.js +97 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/state/extensions.test.d.ts +6 -0
- package/dist/src/ui/state/extensions.test.js +219 -0
- package/dist/src/ui/state/extensions.test.js.map +1 -0
- package/dist/src/ui/textConstants.d.ts +9 -0
- package/dist/src/ui/textConstants.js +10 -0
- package/dist/src/ui/textConstants.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +143 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +153 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +140 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +132 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +106 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/color-utils.d.ts +22 -0
- package/dist/src/ui/themes/color-utils.js +237 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/color-utils.test.d.ts +6 -0
- package/dist/src/ui/themes/color-utils.test.js +226 -0
- package/dist/src/ui/themes/color-utils.test.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +117 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +140 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +142 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +139 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/holiday.d.ts +7 -0
- package/dist/src/ui/themes/holiday.js +162 -0
- package/dist/src/ui/themes/holiday.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +118 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +39 -0
- package/dist/src/ui/themes/semantic-tokens.js +100 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +306 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +66 -0
- package/dist/src/ui/themes/theme-manager.js +265 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.test.d.ts +6 -0
- package/dist/src/ui/themes/theme-manager.test.js +143 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +133 -0
- package/dist/src/ui/themes/theme.js +390 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/theme.test.d.ts +6 -0
- package/dist/src/ui/themes/theme.test.js +151 -0
- package/dist/src/ui/themes/theme.test.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +147 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +313 -0
- package/dist/src/ui/types.js +66 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +25 -0
- package/dist/src/ui/utils/CodeColorizer.js +123 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.test.d.ts +6 -0
- package/dist/src/ui/utils/CodeColorizer.test.js +38 -0
- package/dist/src/ui/utils/CodeColorizer.test.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +25 -0
- package/dist/src/ui/utils/ConsolePatcher.js +49 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +17 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +112 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +6 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +21 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +15 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +242 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +159 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/bracketedPaste.d.ts +7 -0
- package/dist/src/ui/utils/bracketedPaste.js +15 -0
- package/dist/src/ui/utils/bracketedPaste.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +47 -0
- package/dist/src/ui/utils/clipboardUtils.js +212 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.test.js +187 -0
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +36 -0
- package/dist/src/ui/utils/commandUtils.js +189 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/commandUtils.test.js +309 -0
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +62 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/computeStats.test.d.ts +6 -0
- package/dist/src/ui/utils/computeStats.test.js +271 -0
- package/dist/src/ui/utils/computeStats.test.js.map +1 -0
- package/dist/src/ui/utils/directoryUtils.d.ts +6 -0
- package/dist/src/ui/utils/directoryUtils.js +21 -0
- package/dist/src/ui/utils/directoryUtils.js.map +1 -0
- package/dist/src/ui/utils/directoryUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/directoryUtils.test.js +52 -0
- package/dist/src/ui/utils/directoryUtils.test.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +18 -0
- package/dist/src/ui/utils/displayUtils.js +27 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/displayUtils.test.js +61 -0
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/formatters.test.d.ts +6 -0
- package/dist/src/ui/utils/formatters.test.js +56 -0
- package/dist/src/ui/utils/formatters.test.js.map +1 -0
- package/dist/src/ui/utils/highlight.d.ts +11 -0
- package/dist/src/ui/utils/highlight.js +82 -0
- package/dist/src/ui/utils/highlight.js.map +1 -0
- package/dist/src/ui/utils/highlight.test.d.ts +6 -0
- package/dist/src/ui/utils/highlight.test.js +120 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -0
- package/dist/src/ui/utils/input.d.ts +17 -0
- package/dist/src/ui/utils/input.js +51 -0
- package/dist/src/ui/utils/input.js.map +1 -0
- package/dist/src/ui/utils/input.test.d.ts +6 -0
- package/dist/src/ui/utils/input.test.js +44 -0
- package/dist/src/ui/utils/input.test.js.map +1 -0
- package/dist/src/ui/utils/isNarrowWidth.d.ts +6 -0
- package/dist/src/ui/utils/isNarrowWidth.js +9 -0
- package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +17 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +111 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.test.d.ts +6 -0
- package/dist/src/ui/utils/kittyProtocolDetector.test.js +113 -0
- package/dist/src/ui/utils/kittyProtocolDetector.test.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.test.js +42 -0
- package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
- package/dist/src/ui/utils/mouse.d.ts +32 -0
- package/dist/src/ui/utils/mouse.js +181 -0
- package/dist/src/ui/utils/mouse.js.map +1 -0
- package/dist/src/ui/utils/mouse.test.d.ts +6 -0
- package/dist/src/ui/utils/mouse.test.js +136 -0
- package/dist/src/ui/utils/mouse.test.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +34 -0
- package/dist/src/ui/utils/terminalSetup.js +290 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.test.d.ts +6 -0
- package/dist/src/ui/utils/terminalSetup.test.js +136 -0
- package/dist/src/ui/utils/terminalSetup.test.js.map +1 -0
- package/dist/src/ui/utils/textOutput.d.ts +27 -0
- package/dist/src/ui/utils/textOutput.js +53 -0
- package/dist/src/ui/utils/textOutput.js.map +1 -0
- package/dist/src/ui/utils/textOutput.test.d.ts +6 -0
- package/dist/src/ui/utils/textOutput.test.js +79 -0
- package/dist/src/ui/utils/textOutput.test.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +43 -0
- package/dist/src/ui/utils/textUtils.js +186 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +138 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/ui/utils/ui-sizing.d.ts +7 -0
- package/dist/src/ui/utils/ui-sizing.js +30 -0
- package/dist/src/ui/utils/ui-sizing.js.map +1 -0
- package/dist/src/ui/utils/ui-sizing.test.d.ts +6 -0
- package/dist/src/ui/utils/ui-sizing.test.js +56 -0
- package/dist/src/ui/utils/ui-sizing.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +19 -0
- package/dist/src/ui/utils/updateCheck.js +86 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.test.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.test.js +134 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
- package/dist/src/utils/checks.d.ts +19 -0
- package/dist/src/utils/checks.js +24 -0
- package/dist/src/utils/checks.js.map +1 -0
- package/dist/src/utils/checks.test.d.ts +6 -0
- package/dist/src/utils/checks.test.js +29 -0
- package/dist/src/utils/checks.test.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +16 -0
- package/dist/src/utils/cleanup.js +69 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/cleanup.test.d.ts +6 -0
- package/dist/src/utils/cleanup.test.js +102 -0
- package/dist/src/utils/cleanup.test.js.map +1 -0
- package/dist/src/utils/commands.d.ts +20 -0
- package/dist/src/utils/commands.js +53 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/commands.test.d.ts +6 -0
- package/dist/src/utils/commands.test.js +115 -0
- package/dist/src/utils/commands.test.js.map +1 -0
- package/dist/src/utils/commentJson.d.ts +9 -0
- package/dist/src/utils/commentJson.js +130 -0
- package/dist/src/utils/commentJson.js.map +1 -0
- package/dist/src/utils/commentJson.test.d.ts +6 -0
- package/dist/src/utils/commentJson.test.js +308 -0
- package/dist/src/utils/commentJson.test.js.map +1 -0
- package/dist/src/utils/deepMerge.d.ts +9 -0
- package/dist/src/utils/deepMerge.js +63 -0
- package/dist/src/utils/deepMerge.js.map +1 -0
- package/dist/src/utils/deepMerge.test.d.ts +6 -0
- package/dist/src/utils/deepMerge.test.js +201 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +25 -0
- package/dist/src/utils/dialogScopeUtils.js +50 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.test.d.ts +6 -0
- package/dist/src/utils/dialogScopeUtils.test.js +81 -0
- package/dist/src/utils/dialogScopeUtils.test.js.map +1 -0
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +100 -0
- package/dist/src/utils/envVarResolver.js.map +1 -0
- package/dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/dist/src/utils/envVarResolver.test.js +221 -0
- package/dist/src/utils/envVarResolver.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +33 -0
- package/dist/src/utils/errors.js +186 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +377 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +24 -0
- package/dist/src/utils/events.js +17 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/events.test.d.ts +6 -0
- package/dist/src/utils/events.test.js +24 -0
- package/dist/src/utils/events.test.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +30 -0
- package/dist/src/utils/gitUtils.js +90 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/gitUtils.test.d.ts +6 -0
- package/dist/src/utils/gitUtils.test.js +113 -0
- package/dist/src/utils/gitUtils.test.js.map +1 -0
- package/dist/src/utils/handleAutoUpdate.d.ts +11 -0
- package/dist/src/utils/handleAutoUpdate.js +113 -0
- package/dist/src/utils/handleAutoUpdate.js.map +1 -0
- package/dist/src/utils/handleAutoUpdate.test.d.ts +6 -0
- package/dist/src/utils/handleAutoUpdate.test.js +303 -0
- package/dist/src/utils/handleAutoUpdate.test.js.map +1 -0
- package/dist/src/utils/installationInfo.d.ts +24 -0
- package/dist/src/utils/installationInfo.js +156 -0
- package/dist/src/utils/installationInfo.js.map +1 -0
- package/dist/src/utils/installationInfo.test.d.ts +6 -0
- package/dist/src/utils/installationInfo.test.js +245 -0
- package/dist/src/utils/installationInfo.test.js.map +1 -0
- package/dist/src/utils/math.d.ts +13 -0
- package/dist/src/utils/math.js +14 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/math.test.d.ts +6 -0
- package/dist/src/utils/math.test.js +23 -0
- package/dist/src/utils/math.test.js.map +1 -0
- package/dist/src/utils/persistentState.d.ts +19 -0
- package/dist/src/utils/persistentState.js +65 -0
- package/dist/src/utils/persistentState.js.map +1 -0
- package/dist/src/utils/persistentState.test.d.ts +6 -0
- package/dist/src/utils/persistentState.test.js +68 -0
- package/dist/src/utils/persistentState.test.js.map +1 -0
- package/dist/src/utils/processUtils.d.ts +13 -0
- package/dist/src/utils/processUtils.js +18 -0
- package/dist/src/utils/processUtils.js.map +1 -0
- package/dist/src/utils/processUtils.test.d.ts +6 -0
- package/dist/src/utils/processUtils.test.js +20 -0
- package/dist/src/utils/processUtils.test.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +61 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/readStdin.test.d.ts +6 -0
- package/dist/src/utils/readStdin.test.js +113 -0
- package/dist/src/utils/readStdin.test.js.map +1 -0
- package/dist/src/utils/relaunch.d.ts +7 -0
- package/dist/src/utils/relaunch.js +57 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +273 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/resolvePath.d.ts +6 -0
- package/dist/src/utils/resolvePath.js +21 -0
- package/dist/src/utils/resolvePath.js.map +1 -0
- package/dist/src/utils/resolvePath.test.d.ts +6 -0
- package/dist/src/utils/resolvePath.test.js +31 -0
- package/dist/src/utils/resolvePath.test.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +32 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +27 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +37 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +93 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +96 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +98 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +616 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/sandbox.test.d.ts +6 -0
- package/dist/src/utils/sandbox.test.js +302 -0
- package/dist/src/utils/sandbox.test.js.map +1 -0
- package/dist/src/utils/sandboxUtils.d.ts +14 -0
- package/dist/src/utils/sandboxUtils.js +121 -0
- package/dist/src/utils/sandboxUtils.js.map +1 -0
- package/dist/src/utils/sandboxUtils.test.d.ts +6 -0
- package/dist/src/utils/sandboxUtils.test.js +122 -0
- package/dist/src/utils/sandboxUtils.test.js.map +1 -0
- package/dist/src/utils/sessionCleanup.d.ts +22 -0
- package/dist/src/utils/sessionCleanup.integration.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.integration.test.js +182 -0
- package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -0
- package/dist/src/utils/sessionCleanup.js +214 -0
- package/dist/src/utils/sessionCleanup.js.map +1 -0
- package/dist/src/utils/sessionCleanup.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.test.js +1348 -0
- package/dist/src/utils/sessionCleanup.test.js.map +1 -0
- package/dist/src/utils/sessionUtils.d.ts +150 -0
- package/dist/src/utils/sessionUtils.js +306 -0
- package/dist/src/utils/sessionUtils.js.map +1 -0
- package/dist/src/utils/sessionUtils.test.d.ts +6 -0
- package/dist/src/utils/sessionUtils.test.js +503 -0
- package/dist/src/utils/sessionUtils.test.js.map +1 -0
- package/dist/src/utils/sessions.d.ts +8 -0
- package/dist/src/utils/sessions.js +69 -0
- package/dist/src/utils/sessions.js.map +1 -0
- package/dist/src/utils/sessions.test.d.ts +6 -0
- package/dist/src/utils/sessions.test.js +584 -0
- package/dist/src/utils/sessions.test.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +144 -0
- package/dist/src/utils/settingsUtils.js +340 -0
- package/dist/src/utils/settingsUtils.js.map +1 -0
- package/dist/src/utils/settingsUtils.test.d.ts +6 -0
- package/dist/src/utils/settingsUtils.test.js +808 -0
- package/dist/src/utils/settingsUtils.test.js.map +1 -0
- package/dist/src/utils/spawnWrapper.d.ts +7 -0
- package/dist/src/utils/spawnWrapper.js +8 -0
- package/dist/src/utils/spawnWrapper.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/startupWarnings.test.d.ts +6 -0
- package/dist/src/utils/startupWarnings.test.js +61 -0
- package/dist/src/utils/startupWarnings.test.js.map +1 -0
- package/dist/src/utils/updateEventEmitter.d.ts +11 -0
- package/dist/src/utils/updateEventEmitter.js +12 -0
- package/dist/src/utils/updateEventEmitter.js.map +1 -0
- package/dist/src/utils/updateEventEmitter.test.d.ts +6 -0
- package/dist/src/utils/updateEventEmitter.test.js +18 -0
- package/dist/src/utils/updateEventEmitter.test.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +54 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.test.js +67 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.d.ts +9 -0
- package/dist/src/validateNonInterActiveAuth.js +59 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.test.d.ts +6 -0
- package/dist/src/validateNonInterActiveAuth.test.js +337 -0
- package/dist/src/validateNonInterActiveAuth.test.js.map +1 -0
- package/dist/src/zed-integration/acp.d.ts +41 -0
- package/dist/src/zed-integration/acp.js +72 -0
- package/dist/src/zed-integration/acp.js.map +1 -0
- package/dist/src/zed-integration/acp.test.d.ts +6 -0
- package/dist/src/zed-integration/acp.test.js +214 -0
- package/dist/src/zed-integration/acp.test.js.map +1 -0
- package/dist/src/zed-integration/connection.d.ts +28 -0
- package/dist/src/zed-integration/connection.js +165 -0
- package/dist/src/zed-integration/connection.js.map +1 -0
- package/dist/src/zed-integration/connection.test.d.ts +6 -0
- package/dist/src/zed-integration/connection.test.js +175 -0
- package/dist/src/zed-integration/connection.test.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.d.ts +19 -0
- package/dist/src/zed-integration/fileSystemService.js +43 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.test.d.ts +6 -0
- package/dist/src/zed-integration/fileSystemService.test.js +90 -0
- package/dist/src/zed-integration/fileSystemService.test.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +11792 -0
- package/dist/src/zed-integration/schema.js +311 -0
- package/dist/src/zed-integration/schema.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.d.ts +39 -0
- package/dist/src/zed-integration/zedIntegration.js +728 -0
- package/dist/src/zed-integration/zedIntegration.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.test.d.ts +6 -0
- package/dist/src/zed-integration/zedIntegration.test.js +614 -0
- package/dist/src/zed-integration/zedIntegration.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,2124 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { renderWithProviders } from '../../test-utils/render.js';
|
|
8
|
+
import { waitFor } from '../../test-utils/async.js';
|
|
9
|
+
import { act } from 'react';
|
|
10
|
+
import { InputPrompt } from './InputPrompt.js';
|
|
11
|
+
import { ApprovalMode } from '@google/gemini-cli-core';
|
|
12
|
+
import * as path from 'node:path';
|
|
13
|
+
import { CommandKind } from '../commands/types.js';
|
|
14
|
+
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
15
|
+
import { useShellHistory } from '../hooks/useShellHistory.js';
|
|
16
|
+
import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
|
|
17
|
+
import { useInputHistory } from '../hooks/useInputHistory.js';
|
|
18
|
+
import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.js';
|
|
19
|
+
import clipboardy from 'clipboardy';
|
|
20
|
+
import * as clipboardUtils from '../utils/clipboardUtils.js';
|
|
21
|
+
import { useKittyKeyboardProtocol } from '../hooks/useKittyKeyboardProtocol.js';
|
|
22
|
+
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
|
|
23
|
+
import stripAnsi from 'strip-ansi';
|
|
24
|
+
import chalk from 'chalk';
|
|
25
|
+
import { StreamingState } from '../types.js';
|
|
26
|
+
vi.mock('../hooks/useShellHistory.js');
|
|
27
|
+
vi.mock('../hooks/useCommandCompletion.js');
|
|
28
|
+
vi.mock('../hooks/useInputHistory.js');
|
|
29
|
+
vi.mock('../hooks/useReverseSearchCompletion.js');
|
|
30
|
+
vi.mock('clipboardy');
|
|
31
|
+
vi.mock('../utils/clipboardUtils.js');
|
|
32
|
+
vi.mock('../hooks/useKittyKeyboardProtocol.js');
|
|
33
|
+
const mockSlashCommands = [
|
|
34
|
+
{
|
|
35
|
+
name: 'clear',
|
|
36
|
+
kind: CommandKind.BUILT_IN,
|
|
37
|
+
description: 'Clear screen',
|
|
38
|
+
action: vi.fn(),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'memory',
|
|
42
|
+
kind: CommandKind.BUILT_IN,
|
|
43
|
+
description: 'Manage memory',
|
|
44
|
+
subCommands: [
|
|
45
|
+
{
|
|
46
|
+
name: 'show',
|
|
47
|
+
kind: CommandKind.BUILT_IN,
|
|
48
|
+
description: 'Show memory',
|
|
49
|
+
action: vi.fn(),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'add',
|
|
53
|
+
kind: CommandKind.BUILT_IN,
|
|
54
|
+
description: 'Add to memory',
|
|
55
|
+
action: vi.fn(),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'refresh',
|
|
59
|
+
kind: CommandKind.BUILT_IN,
|
|
60
|
+
description: 'Refresh memory',
|
|
61
|
+
action: vi.fn(),
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'chat',
|
|
67
|
+
description: 'Manage chats',
|
|
68
|
+
kind: CommandKind.BUILT_IN,
|
|
69
|
+
subCommands: [
|
|
70
|
+
{
|
|
71
|
+
name: 'resume',
|
|
72
|
+
description: 'Resume a chat',
|
|
73
|
+
kind: CommandKind.BUILT_IN,
|
|
74
|
+
action: vi.fn(),
|
|
75
|
+
completion: async () => ['fix-foo', 'fix-bar'],
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'resume',
|
|
81
|
+
description: 'Browse and resume sessions',
|
|
82
|
+
kind: CommandKind.BUILT_IN,
|
|
83
|
+
action: vi.fn(),
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
describe('InputPrompt', () => {
|
|
87
|
+
let props;
|
|
88
|
+
let mockShellHistory;
|
|
89
|
+
let mockCommandCompletion;
|
|
90
|
+
let mockInputHistory;
|
|
91
|
+
let mockReverseSearchCompletion;
|
|
92
|
+
let mockBuffer;
|
|
93
|
+
let mockCommandContext;
|
|
94
|
+
const mockedUseShellHistory = vi.mocked(useShellHistory);
|
|
95
|
+
const mockedUseCommandCompletion = vi.mocked(useCommandCompletion);
|
|
96
|
+
const mockedUseInputHistory = vi.mocked(useInputHistory);
|
|
97
|
+
const mockedUseReverseSearchCompletion = vi.mocked(useReverseSearchCompletion);
|
|
98
|
+
const mockedUseKittyKeyboardProtocol = vi.mocked(useKittyKeyboardProtocol);
|
|
99
|
+
const mockSetEmbeddedShellFocused = vi.fn();
|
|
100
|
+
const uiActions = {
|
|
101
|
+
setEmbeddedShellFocused: mockSetEmbeddedShellFocused,
|
|
102
|
+
};
|
|
103
|
+
beforeEach(() => {
|
|
104
|
+
vi.resetAllMocks();
|
|
105
|
+
mockCommandContext = createMockCommandContext();
|
|
106
|
+
mockBuffer = {
|
|
107
|
+
text: '',
|
|
108
|
+
cursor: [0, 0],
|
|
109
|
+
lines: [''],
|
|
110
|
+
setText: vi.fn((newText) => {
|
|
111
|
+
mockBuffer.text = newText;
|
|
112
|
+
mockBuffer.lines = [newText];
|
|
113
|
+
mockBuffer.cursor = [0, newText.length];
|
|
114
|
+
mockBuffer.viewportVisualLines = [newText];
|
|
115
|
+
mockBuffer.allVisualLines = [newText];
|
|
116
|
+
mockBuffer.visualToLogicalMap = [[0, 0]];
|
|
117
|
+
}),
|
|
118
|
+
replaceRangeByOffset: vi.fn(),
|
|
119
|
+
viewportVisualLines: [''],
|
|
120
|
+
allVisualLines: [''],
|
|
121
|
+
visualCursor: [0, 0],
|
|
122
|
+
visualScrollRow: 0,
|
|
123
|
+
handleInput: vi.fn(),
|
|
124
|
+
move: vi.fn(),
|
|
125
|
+
moveToOffset: vi.fn((offset) => {
|
|
126
|
+
mockBuffer.cursor = [0, offset];
|
|
127
|
+
}),
|
|
128
|
+
moveToVisualPosition: vi.fn(),
|
|
129
|
+
killLineRight: vi.fn(),
|
|
130
|
+
killLineLeft: vi.fn(),
|
|
131
|
+
openInExternalEditor: vi.fn(),
|
|
132
|
+
newline: vi.fn(),
|
|
133
|
+
undo: vi.fn(),
|
|
134
|
+
redo: vi.fn(),
|
|
135
|
+
backspace: vi.fn(),
|
|
136
|
+
preferredCol: null,
|
|
137
|
+
selectionAnchor: null,
|
|
138
|
+
insert: vi.fn(),
|
|
139
|
+
del: vi.fn(),
|
|
140
|
+
replaceRange: vi.fn(),
|
|
141
|
+
deleteWordLeft: vi.fn(),
|
|
142
|
+
deleteWordRight: vi.fn(),
|
|
143
|
+
visualToLogicalMap: [[0, 0]],
|
|
144
|
+
getOffset: vi.fn().mockReturnValue(0),
|
|
145
|
+
};
|
|
146
|
+
mockShellHistory = {
|
|
147
|
+
history: [],
|
|
148
|
+
addCommandToHistory: vi.fn(),
|
|
149
|
+
getPreviousCommand: vi.fn().mockReturnValue(null),
|
|
150
|
+
getNextCommand: vi.fn().mockReturnValue(null),
|
|
151
|
+
resetHistoryPosition: vi.fn(),
|
|
152
|
+
};
|
|
153
|
+
mockedUseShellHistory.mockReturnValue(mockShellHistory);
|
|
154
|
+
mockCommandCompletion = {
|
|
155
|
+
suggestions: [],
|
|
156
|
+
activeSuggestionIndex: -1,
|
|
157
|
+
isLoadingSuggestions: false,
|
|
158
|
+
showSuggestions: false,
|
|
159
|
+
visibleStartIndex: 0,
|
|
160
|
+
isPerfectMatch: false,
|
|
161
|
+
navigateUp: vi.fn(),
|
|
162
|
+
navigateDown: vi.fn(),
|
|
163
|
+
resetCompletionState: vi.fn(),
|
|
164
|
+
setActiveSuggestionIndex: vi.fn(),
|
|
165
|
+
setShowSuggestions: vi.fn(),
|
|
166
|
+
handleAutocomplete: vi.fn(),
|
|
167
|
+
promptCompletion: {
|
|
168
|
+
text: '',
|
|
169
|
+
accept: vi.fn(),
|
|
170
|
+
clear: vi.fn(),
|
|
171
|
+
isLoading: false,
|
|
172
|
+
isActive: false,
|
|
173
|
+
markSelected: vi.fn(),
|
|
174
|
+
},
|
|
175
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(undefined),
|
|
176
|
+
slashCompletionRange: {
|
|
177
|
+
completionStart: -1,
|
|
178
|
+
completionEnd: -1,
|
|
179
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(undefined),
|
|
180
|
+
isArgumentCompletion: false,
|
|
181
|
+
leafCommand: null,
|
|
182
|
+
},
|
|
183
|
+
getCompletedText: vi.fn().mockReturnValue(null),
|
|
184
|
+
};
|
|
185
|
+
mockedUseCommandCompletion.mockReturnValue(mockCommandCompletion);
|
|
186
|
+
mockInputHistory = {
|
|
187
|
+
navigateUp: vi.fn(),
|
|
188
|
+
navigateDown: vi.fn(),
|
|
189
|
+
handleSubmit: vi.fn(),
|
|
190
|
+
};
|
|
191
|
+
mockedUseInputHistory.mockReturnValue(mockInputHistory);
|
|
192
|
+
mockReverseSearchCompletion = {
|
|
193
|
+
suggestions: [],
|
|
194
|
+
activeSuggestionIndex: -1,
|
|
195
|
+
visibleStartIndex: 0,
|
|
196
|
+
showSuggestions: false,
|
|
197
|
+
isLoadingSuggestions: false,
|
|
198
|
+
navigateUp: vi.fn(),
|
|
199
|
+
navigateDown: vi.fn(),
|
|
200
|
+
handleAutocomplete: vi.fn(),
|
|
201
|
+
resetCompletionState: vi.fn(),
|
|
202
|
+
};
|
|
203
|
+
mockedUseReverseSearchCompletion.mockReturnValue(mockReverseSearchCompletion);
|
|
204
|
+
mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
205
|
+
enabled: false,
|
|
206
|
+
checking: false,
|
|
207
|
+
});
|
|
208
|
+
props = {
|
|
209
|
+
buffer: mockBuffer,
|
|
210
|
+
onSubmit: vi.fn(),
|
|
211
|
+
userMessages: [],
|
|
212
|
+
onClearScreen: vi.fn(),
|
|
213
|
+
config: {
|
|
214
|
+
getProjectRoot: () => path.join('test', 'project'),
|
|
215
|
+
getTargetDir: () => path.join('test', 'project', 'src'),
|
|
216
|
+
getVimMode: () => false,
|
|
217
|
+
getWorkspaceContext: () => ({
|
|
218
|
+
getDirectories: () => ['/test/project/src'],
|
|
219
|
+
}),
|
|
220
|
+
},
|
|
221
|
+
slashCommands: mockSlashCommands,
|
|
222
|
+
commandContext: mockCommandContext,
|
|
223
|
+
shellModeActive: false,
|
|
224
|
+
setShellModeActive: vi.fn(),
|
|
225
|
+
approvalMode: ApprovalMode.DEFAULT,
|
|
226
|
+
inputWidth: 80,
|
|
227
|
+
suggestionsWidth: 80,
|
|
228
|
+
focus: true,
|
|
229
|
+
setQueueErrorMessage: vi.fn(),
|
|
230
|
+
streamingState: StreamingState.Idle,
|
|
231
|
+
setBannerVisible: vi.fn(),
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
it('should call shellHistory.getPreviousCommand on up arrow in shell mode', async () => {
|
|
235
|
+
props.shellModeActive = true;
|
|
236
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
237
|
+
uiActions,
|
|
238
|
+
});
|
|
239
|
+
await act(async () => {
|
|
240
|
+
stdin.write('\u001B[A');
|
|
241
|
+
});
|
|
242
|
+
await waitFor(() => expect(mockShellHistory.getPreviousCommand).toHaveBeenCalled());
|
|
243
|
+
unmount();
|
|
244
|
+
});
|
|
245
|
+
it('should call shellHistory.getNextCommand on down arrow in shell mode', async () => {
|
|
246
|
+
props.shellModeActive = true;
|
|
247
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
248
|
+
uiActions,
|
|
249
|
+
});
|
|
250
|
+
await act(async () => {
|
|
251
|
+
stdin.write('\u001B[B');
|
|
252
|
+
await waitFor(() => expect(mockShellHistory.getNextCommand).toHaveBeenCalled());
|
|
253
|
+
});
|
|
254
|
+
unmount();
|
|
255
|
+
});
|
|
256
|
+
it('should set the buffer text when a shell history command is retrieved', async () => {
|
|
257
|
+
props.shellModeActive = true;
|
|
258
|
+
vi.mocked(mockShellHistory.getPreviousCommand).mockReturnValue('previous command');
|
|
259
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
260
|
+
uiActions,
|
|
261
|
+
});
|
|
262
|
+
await act(async () => {
|
|
263
|
+
stdin.write('\u001B[A');
|
|
264
|
+
});
|
|
265
|
+
await waitFor(() => {
|
|
266
|
+
expect(mockShellHistory.getPreviousCommand).toHaveBeenCalled();
|
|
267
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('previous command');
|
|
268
|
+
});
|
|
269
|
+
unmount();
|
|
270
|
+
});
|
|
271
|
+
it('should call shellHistory.addCommandToHistory on submit in shell mode', async () => {
|
|
272
|
+
props.shellModeActive = true;
|
|
273
|
+
props.buffer.setText('ls -l');
|
|
274
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
275
|
+
uiActions,
|
|
276
|
+
});
|
|
277
|
+
await act(async () => {
|
|
278
|
+
stdin.write('\r');
|
|
279
|
+
});
|
|
280
|
+
await waitFor(() => {
|
|
281
|
+
expect(mockShellHistory.addCommandToHistory).toHaveBeenCalledWith('ls -l');
|
|
282
|
+
expect(props.onSubmit).toHaveBeenCalledWith('ls -l');
|
|
283
|
+
});
|
|
284
|
+
unmount();
|
|
285
|
+
});
|
|
286
|
+
it('should NOT call shell history methods when not in shell mode', async () => {
|
|
287
|
+
props.buffer.setText('some text');
|
|
288
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
289
|
+
uiActions,
|
|
290
|
+
});
|
|
291
|
+
await act(async () => {
|
|
292
|
+
stdin.write('\u001B[A'); // Up arrow
|
|
293
|
+
});
|
|
294
|
+
await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
|
|
295
|
+
await act(async () => {
|
|
296
|
+
stdin.write('\u001B[B'); // Down arrow
|
|
297
|
+
});
|
|
298
|
+
await waitFor(() => expect(mockInputHistory.navigateDown).toHaveBeenCalled());
|
|
299
|
+
await act(async () => {
|
|
300
|
+
stdin.write('\r'); // Enter
|
|
301
|
+
});
|
|
302
|
+
await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('some text'));
|
|
303
|
+
expect(mockShellHistory.getPreviousCommand).not.toHaveBeenCalled();
|
|
304
|
+
expect(mockShellHistory.getNextCommand).not.toHaveBeenCalled();
|
|
305
|
+
expect(mockShellHistory.addCommandToHistory).not.toHaveBeenCalled();
|
|
306
|
+
unmount();
|
|
307
|
+
});
|
|
308
|
+
it('should call completion.navigateUp for both up arrow and Ctrl+P when suggestions are showing', async () => {
|
|
309
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
310
|
+
...mockCommandCompletion,
|
|
311
|
+
showSuggestions: true,
|
|
312
|
+
suggestions: [
|
|
313
|
+
{ label: 'memory', value: 'memory' },
|
|
314
|
+
{ label: 'memcache', value: 'memcache' },
|
|
315
|
+
],
|
|
316
|
+
});
|
|
317
|
+
props.buffer.setText('/mem');
|
|
318
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
319
|
+
uiActions,
|
|
320
|
+
});
|
|
321
|
+
// Test up arrow
|
|
322
|
+
await act(async () => {
|
|
323
|
+
stdin.write('\u001B[A'); // Up arrow
|
|
324
|
+
});
|
|
325
|
+
await waitFor(() => expect(mockCommandCompletion.navigateUp).toHaveBeenCalledTimes(1));
|
|
326
|
+
await act(async () => {
|
|
327
|
+
stdin.write('\u0010'); // Ctrl+P
|
|
328
|
+
});
|
|
329
|
+
await waitFor(() => expect(mockCommandCompletion.navigateUp).toHaveBeenCalledTimes(2));
|
|
330
|
+
expect(mockCommandCompletion.navigateDown).not.toHaveBeenCalled();
|
|
331
|
+
unmount();
|
|
332
|
+
});
|
|
333
|
+
it('should call completion.navigateDown for both down arrow and Ctrl+N when suggestions are showing', async () => {
|
|
334
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
335
|
+
...mockCommandCompletion,
|
|
336
|
+
showSuggestions: true,
|
|
337
|
+
suggestions: [
|
|
338
|
+
{ label: 'memory', value: 'memory' },
|
|
339
|
+
{ label: 'memcache', value: 'memcache' },
|
|
340
|
+
],
|
|
341
|
+
});
|
|
342
|
+
props.buffer.setText('/mem');
|
|
343
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
344
|
+
uiActions,
|
|
345
|
+
});
|
|
346
|
+
// Test down arrow
|
|
347
|
+
await act(async () => {
|
|
348
|
+
stdin.write('\u001B[B'); // Down arrow
|
|
349
|
+
});
|
|
350
|
+
await waitFor(() => expect(mockCommandCompletion.navigateDown).toHaveBeenCalledTimes(1));
|
|
351
|
+
await act(async () => {
|
|
352
|
+
stdin.write('\u000E'); // Ctrl+N
|
|
353
|
+
});
|
|
354
|
+
await waitFor(() => expect(mockCommandCompletion.navigateDown).toHaveBeenCalledTimes(2));
|
|
355
|
+
expect(mockCommandCompletion.navigateUp).not.toHaveBeenCalled();
|
|
356
|
+
unmount();
|
|
357
|
+
});
|
|
358
|
+
it('should NOT call completion navigation when suggestions are not showing', async () => {
|
|
359
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
360
|
+
...mockCommandCompletion,
|
|
361
|
+
showSuggestions: false,
|
|
362
|
+
});
|
|
363
|
+
props.buffer.setText('some text');
|
|
364
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
365
|
+
uiActions,
|
|
366
|
+
});
|
|
367
|
+
await act(async () => {
|
|
368
|
+
stdin.write('\u001B[A'); // Up arrow
|
|
369
|
+
});
|
|
370
|
+
await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
|
|
371
|
+
await act(async () => {
|
|
372
|
+
stdin.write('\u001B[B'); // Down arrow
|
|
373
|
+
});
|
|
374
|
+
await waitFor(() => expect(mockInputHistory.navigateDown).toHaveBeenCalled());
|
|
375
|
+
await act(async () => {
|
|
376
|
+
stdin.write('\u0010'); // Ctrl+P
|
|
377
|
+
});
|
|
378
|
+
await act(async () => {
|
|
379
|
+
stdin.write('\u000E'); // Ctrl+N
|
|
380
|
+
});
|
|
381
|
+
await waitFor(() => {
|
|
382
|
+
expect(mockCommandCompletion.navigateUp).not.toHaveBeenCalled();
|
|
383
|
+
expect(mockCommandCompletion.navigateDown).not.toHaveBeenCalled();
|
|
384
|
+
});
|
|
385
|
+
unmount();
|
|
386
|
+
});
|
|
387
|
+
describe('clipboard image paste', () => {
|
|
388
|
+
beforeEach(() => {
|
|
389
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
|
|
390
|
+
vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(null);
|
|
391
|
+
vi.mocked(clipboardUtils.cleanupOldClipboardImages).mockResolvedValue(undefined);
|
|
392
|
+
});
|
|
393
|
+
it('should handle Ctrl+V when clipboard has an image', async () => {
|
|
394
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
|
|
395
|
+
vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue('/test/.gemini-clipboard/clipboard-123.png');
|
|
396
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
397
|
+
// Send Ctrl+V
|
|
398
|
+
await act(async () => {
|
|
399
|
+
stdin.write('\x16'); // Ctrl+V
|
|
400
|
+
});
|
|
401
|
+
await waitFor(() => {
|
|
402
|
+
expect(clipboardUtils.clipboardHasImage).toHaveBeenCalled();
|
|
403
|
+
expect(clipboardUtils.saveClipboardImage).toHaveBeenCalledWith(props.config.getTargetDir());
|
|
404
|
+
expect(clipboardUtils.cleanupOldClipboardImages).toHaveBeenCalledWith(props.config.getTargetDir());
|
|
405
|
+
expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalled();
|
|
406
|
+
});
|
|
407
|
+
unmount();
|
|
408
|
+
});
|
|
409
|
+
it('should not insert anything when clipboard has no image', async () => {
|
|
410
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
|
|
411
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
412
|
+
await act(async () => {
|
|
413
|
+
stdin.write('\x16'); // Ctrl+V
|
|
414
|
+
});
|
|
415
|
+
await waitFor(() => {
|
|
416
|
+
expect(clipboardUtils.clipboardHasImage).toHaveBeenCalled();
|
|
417
|
+
});
|
|
418
|
+
expect(clipboardUtils.saveClipboardImage).not.toHaveBeenCalled();
|
|
419
|
+
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
420
|
+
unmount();
|
|
421
|
+
});
|
|
422
|
+
it('should handle image save failure gracefully', async () => {
|
|
423
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
|
|
424
|
+
vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(null);
|
|
425
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
426
|
+
await act(async () => {
|
|
427
|
+
stdin.write('\x16'); // Ctrl+V
|
|
428
|
+
});
|
|
429
|
+
await waitFor(() => {
|
|
430
|
+
expect(clipboardUtils.saveClipboardImage).toHaveBeenCalled();
|
|
431
|
+
});
|
|
432
|
+
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
433
|
+
unmount();
|
|
434
|
+
});
|
|
435
|
+
it('should insert image path at cursor position with proper spacing', async () => {
|
|
436
|
+
const imagePath = path.join('test', '.gemini-clipboard', 'clipboard-456.png');
|
|
437
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(true);
|
|
438
|
+
vi.mocked(clipboardUtils.saveClipboardImage).mockResolvedValue(imagePath);
|
|
439
|
+
// Set initial text and cursor position
|
|
440
|
+
mockBuffer.text = 'Hello world';
|
|
441
|
+
mockBuffer.cursor = [0, 5]; // Cursor after "Hello"
|
|
442
|
+
vi.mocked(mockBuffer.getOffset).mockReturnValue(5);
|
|
443
|
+
mockBuffer.lines = ['Hello world'];
|
|
444
|
+
mockBuffer.replaceRangeByOffset = vi.fn();
|
|
445
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
446
|
+
await act(async () => {
|
|
447
|
+
stdin.write('\x16'); // Ctrl+V
|
|
448
|
+
});
|
|
449
|
+
await waitFor(() => {
|
|
450
|
+
// Should insert at cursor position with spaces
|
|
451
|
+
expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalled();
|
|
452
|
+
});
|
|
453
|
+
// Get the actual call to see what path was used
|
|
454
|
+
const actualCall = vi.mocked(mockBuffer.replaceRangeByOffset).mock
|
|
455
|
+
.calls[0];
|
|
456
|
+
expect(actualCall[0]).toBe(5); // start offset
|
|
457
|
+
expect(actualCall[1]).toBe(5); // end offset
|
|
458
|
+
expect(actualCall[2]).toBe(' @' + path.relative(path.join('test', 'project', 'src'), imagePath));
|
|
459
|
+
unmount();
|
|
460
|
+
});
|
|
461
|
+
it('should handle errors during clipboard operations', async () => {
|
|
462
|
+
const consoleErrorSpy = vi
|
|
463
|
+
.spyOn(console, 'error')
|
|
464
|
+
.mockImplementation(() => { });
|
|
465
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockRejectedValue(new Error('Clipboard error'));
|
|
466
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
467
|
+
await act(async () => {
|
|
468
|
+
stdin.write('\x16'); // Ctrl+V
|
|
469
|
+
});
|
|
470
|
+
await waitFor(() => {
|
|
471
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('Error handling clipboard image:', expect.any(Error));
|
|
472
|
+
});
|
|
473
|
+
expect(mockBuffer.setText).not.toHaveBeenCalled();
|
|
474
|
+
consoleErrorSpy.mockRestore();
|
|
475
|
+
unmount();
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
describe('clipboard text paste', () => {
|
|
479
|
+
it('should insert text from clipboard on Ctrl+V', async () => {
|
|
480
|
+
vi.mocked(clipboardUtils.clipboardHasImage).mockResolvedValue(false);
|
|
481
|
+
vi.mocked(clipboardy.read).mockResolvedValue('pasted text');
|
|
482
|
+
vi.mocked(mockBuffer.replaceRangeByOffset).mockClear();
|
|
483
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
484
|
+
await act(async () => {
|
|
485
|
+
stdin.write('\x16'); // Ctrl+V
|
|
486
|
+
});
|
|
487
|
+
await waitFor(() => {
|
|
488
|
+
expect(clipboardy.read).toHaveBeenCalled();
|
|
489
|
+
expect(mockBuffer.replaceRangeByOffset).toHaveBeenCalledWith(expect.any(Number), expect.any(Number), 'pasted text');
|
|
490
|
+
});
|
|
491
|
+
unmount();
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
it.each([
|
|
495
|
+
{
|
|
496
|
+
name: 'should complete a partial parent command',
|
|
497
|
+
bufferText: '/mem',
|
|
498
|
+
suggestions: [{ label: 'memory', value: 'memory', description: '...' }],
|
|
499
|
+
activeIndex: 0,
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
name: 'should append a sub-command when parent command is complete',
|
|
503
|
+
bufferText: '/memory ',
|
|
504
|
+
suggestions: [
|
|
505
|
+
{ label: 'show', value: 'show' },
|
|
506
|
+
{ label: 'add', value: 'add' },
|
|
507
|
+
],
|
|
508
|
+
activeIndex: 1,
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: 'should handle the backspace edge case correctly',
|
|
512
|
+
bufferText: '/memory',
|
|
513
|
+
suggestions: [
|
|
514
|
+
{ label: 'show', value: 'show' },
|
|
515
|
+
{ label: 'add', value: 'add' },
|
|
516
|
+
],
|
|
517
|
+
activeIndex: 0,
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: 'should complete a partial argument for a command',
|
|
521
|
+
bufferText: '/chat resume fi-',
|
|
522
|
+
suggestions: [{ label: 'fix-foo', value: 'fix-foo' }],
|
|
523
|
+
activeIndex: 0,
|
|
524
|
+
},
|
|
525
|
+
])('$name', async ({ bufferText, suggestions, activeIndex }) => {
|
|
526
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
527
|
+
...mockCommandCompletion,
|
|
528
|
+
showSuggestions: true,
|
|
529
|
+
suggestions,
|
|
530
|
+
activeSuggestionIndex: activeIndex,
|
|
531
|
+
});
|
|
532
|
+
props.buffer.setText(bufferText);
|
|
533
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
534
|
+
uiActions,
|
|
535
|
+
});
|
|
536
|
+
await act(async () => stdin.write('\t'));
|
|
537
|
+
await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(activeIndex));
|
|
538
|
+
unmount();
|
|
539
|
+
});
|
|
540
|
+
it('should autocomplete on Enter when suggestions are active, without submitting', async () => {
|
|
541
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
542
|
+
...mockCommandCompletion,
|
|
543
|
+
showSuggestions: true,
|
|
544
|
+
suggestions: [{ label: 'memory', value: 'memory' }],
|
|
545
|
+
activeSuggestionIndex: 0,
|
|
546
|
+
});
|
|
547
|
+
props.buffer.setText('/mem');
|
|
548
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
549
|
+
uiActions,
|
|
550
|
+
});
|
|
551
|
+
await act(async () => {
|
|
552
|
+
stdin.write('\r');
|
|
553
|
+
});
|
|
554
|
+
await waitFor(() => {
|
|
555
|
+
// The app should autocomplete the text, NOT submit.
|
|
556
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
557
|
+
});
|
|
558
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
559
|
+
unmount();
|
|
560
|
+
});
|
|
561
|
+
it('should complete a command based on its altNames', async () => {
|
|
562
|
+
props.slashCommands = [
|
|
563
|
+
{
|
|
564
|
+
name: 'help',
|
|
565
|
+
altNames: ['?'],
|
|
566
|
+
kind: CommandKind.BUILT_IN,
|
|
567
|
+
description: '...',
|
|
568
|
+
},
|
|
569
|
+
];
|
|
570
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
571
|
+
...mockCommandCompletion,
|
|
572
|
+
showSuggestions: true,
|
|
573
|
+
suggestions: [{ label: 'help', value: 'help' }],
|
|
574
|
+
activeSuggestionIndex: 0,
|
|
575
|
+
});
|
|
576
|
+
props.buffer.setText('/?');
|
|
577
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
578
|
+
uiActions,
|
|
579
|
+
});
|
|
580
|
+
await act(async () => {
|
|
581
|
+
stdin.write('\t'); // Press Tab for autocomplete
|
|
582
|
+
});
|
|
583
|
+
await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0));
|
|
584
|
+
unmount();
|
|
585
|
+
});
|
|
586
|
+
it('should not submit on Enter when the buffer is empty or only contains whitespace', async () => {
|
|
587
|
+
props.buffer.setText(' '); // Set buffer to whitespace
|
|
588
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
589
|
+
uiActions,
|
|
590
|
+
});
|
|
591
|
+
await act(async () => {
|
|
592
|
+
stdin.write('\r'); // Press Enter
|
|
593
|
+
});
|
|
594
|
+
await waitFor(() => {
|
|
595
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
596
|
+
});
|
|
597
|
+
unmount();
|
|
598
|
+
});
|
|
599
|
+
it('should submit directly on Enter when isPerfectMatch is true', async () => {
|
|
600
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
601
|
+
...mockCommandCompletion,
|
|
602
|
+
showSuggestions: false,
|
|
603
|
+
isPerfectMatch: true,
|
|
604
|
+
});
|
|
605
|
+
props.buffer.setText('/clear');
|
|
606
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
607
|
+
uiActions,
|
|
608
|
+
});
|
|
609
|
+
await act(async () => {
|
|
610
|
+
stdin.write('\r');
|
|
611
|
+
});
|
|
612
|
+
await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('/clear'));
|
|
613
|
+
unmount();
|
|
614
|
+
});
|
|
615
|
+
it('should submit directly on Enter when a complete leaf command is typed', async () => {
|
|
616
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
617
|
+
...mockCommandCompletion,
|
|
618
|
+
showSuggestions: false,
|
|
619
|
+
isPerfectMatch: false, // Added explicit isPerfectMatch false
|
|
620
|
+
});
|
|
621
|
+
props.buffer.setText('/clear');
|
|
622
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
623
|
+
uiActions,
|
|
624
|
+
});
|
|
625
|
+
await act(async () => {
|
|
626
|
+
stdin.write('\r');
|
|
627
|
+
});
|
|
628
|
+
await waitFor(() => expect(props.onSubmit).toHaveBeenCalledWith('/clear'));
|
|
629
|
+
unmount();
|
|
630
|
+
});
|
|
631
|
+
it('should auto-execute commands with autoExecute: true on Enter', async () => {
|
|
632
|
+
const aboutCommand = {
|
|
633
|
+
name: 'about',
|
|
634
|
+
kind: CommandKind.BUILT_IN,
|
|
635
|
+
description: 'About command',
|
|
636
|
+
action: vi.fn(),
|
|
637
|
+
autoExecute: true,
|
|
638
|
+
};
|
|
639
|
+
const suggestion = { label: 'about', value: 'about' };
|
|
640
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
641
|
+
...mockCommandCompletion,
|
|
642
|
+
showSuggestions: true,
|
|
643
|
+
suggestions: [suggestion],
|
|
644
|
+
activeSuggestionIndex: 0,
|
|
645
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(aboutCommand),
|
|
646
|
+
getCompletedText: vi.fn().mockReturnValue('/about'),
|
|
647
|
+
slashCompletionRange: {
|
|
648
|
+
completionStart: 1,
|
|
649
|
+
completionEnd: 3, // "/ab" -> start at 1, end at 3
|
|
650
|
+
getCommandFromSuggestion: vi.fn(),
|
|
651
|
+
isArgumentCompletion: false,
|
|
652
|
+
leafCommand: null,
|
|
653
|
+
},
|
|
654
|
+
});
|
|
655
|
+
// User typed partial command
|
|
656
|
+
props.buffer.setText('/ab');
|
|
657
|
+
props.buffer.lines = ['/ab'];
|
|
658
|
+
props.buffer.cursor = [0, 3];
|
|
659
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
660
|
+
uiActions,
|
|
661
|
+
});
|
|
662
|
+
await act(async () => {
|
|
663
|
+
stdin.write('\r'); // Enter
|
|
664
|
+
});
|
|
665
|
+
await waitFor(() => {
|
|
666
|
+
// Should submit the full command constructed from buffer + suggestion
|
|
667
|
+
expect(props.onSubmit).toHaveBeenCalledWith('/about');
|
|
668
|
+
// Should NOT handle autocomplete (which just fills text)
|
|
669
|
+
expect(mockCommandCompletion.handleAutocomplete).not.toHaveBeenCalled();
|
|
670
|
+
});
|
|
671
|
+
unmount();
|
|
672
|
+
});
|
|
673
|
+
it('should autocomplete commands with autoExecute: false on Enter', async () => {
|
|
674
|
+
const shareCommand = {
|
|
675
|
+
name: 'share',
|
|
676
|
+
kind: CommandKind.BUILT_IN,
|
|
677
|
+
description: 'Share conversation to file',
|
|
678
|
+
action: vi.fn(),
|
|
679
|
+
autoExecute: false, // Explicitly set to false
|
|
680
|
+
};
|
|
681
|
+
const suggestion = { label: 'share', value: 'share' };
|
|
682
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
683
|
+
...mockCommandCompletion,
|
|
684
|
+
showSuggestions: true,
|
|
685
|
+
suggestions: [suggestion],
|
|
686
|
+
activeSuggestionIndex: 0,
|
|
687
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(shareCommand),
|
|
688
|
+
getCompletedText: vi.fn().mockReturnValue('/share'),
|
|
689
|
+
});
|
|
690
|
+
props.buffer.setText('/sh');
|
|
691
|
+
props.buffer.lines = ['/sh'];
|
|
692
|
+
props.buffer.cursor = [0, 3];
|
|
693
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
694
|
+
uiActions,
|
|
695
|
+
});
|
|
696
|
+
await act(async () => {
|
|
697
|
+
stdin.write('\r'); // Enter
|
|
698
|
+
});
|
|
699
|
+
await waitFor(() => {
|
|
700
|
+
// Should autocomplete to allow adding file argument
|
|
701
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
702
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
703
|
+
});
|
|
704
|
+
unmount();
|
|
705
|
+
});
|
|
706
|
+
it('should autocomplete on Tab, even for executable commands', async () => {
|
|
707
|
+
const executableCommand = {
|
|
708
|
+
name: 'about',
|
|
709
|
+
kind: CommandKind.BUILT_IN,
|
|
710
|
+
description: 'About info',
|
|
711
|
+
action: vi.fn(),
|
|
712
|
+
autoExecute: true,
|
|
713
|
+
};
|
|
714
|
+
const suggestion = { label: 'about', value: 'about' };
|
|
715
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
716
|
+
...mockCommandCompletion,
|
|
717
|
+
showSuggestions: true,
|
|
718
|
+
suggestions: [suggestion],
|
|
719
|
+
activeSuggestionIndex: 0,
|
|
720
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(executableCommand),
|
|
721
|
+
getCompletedText: vi.fn().mockReturnValue('/about'),
|
|
722
|
+
});
|
|
723
|
+
props.buffer.setText('/ab');
|
|
724
|
+
props.buffer.lines = ['/ab'];
|
|
725
|
+
props.buffer.cursor = [0, 3];
|
|
726
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
727
|
+
uiActions,
|
|
728
|
+
});
|
|
729
|
+
await act(async () => {
|
|
730
|
+
stdin.write('\t'); // Tab
|
|
731
|
+
});
|
|
732
|
+
await waitFor(() => {
|
|
733
|
+
// Tab always autocompletes, never executes
|
|
734
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
735
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
736
|
+
});
|
|
737
|
+
unmount();
|
|
738
|
+
});
|
|
739
|
+
it('should autocomplete custom commands from .toml files on Enter', async () => {
|
|
740
|
+
const customCommand = {
|
|
741
|
+
name: 'find-capital',
|
|
742
|
+
kind: CommandKind.FILE,
|
|
743
|
+
description: 'Find capital of a country',
|
|
744
|
+
action: vi.fn(),
|
|
745
|
+
// No autoExecute flag - custom commands default to undefined
|
|
746
|
+
};
|
|
747
|
+
const suggestion = { label: 'find-capital', value: 'find-capital' };
|
|
748
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
749
|
+
...mockCommandCompletion,
|
|
750
|
+
showSuggestions: true,
|
|
751
|
+
suggestions: [suggestion],
|
|
752
|
+
activeSuggestionIndex: 0,
|
|
753
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(customCommand),
|
|
754
|
+
getCompletedText: vi.fn().mockReturnValue('/find-capital'),
|
|
755
|
+
});
|
|
756
|
+
props.buffer.setText('/find');
|
|
757
|
+
props.buffer.lines = ['/find'];
|
|
758
|
+
props.buffer.cursor = [0, 5];
|
|
759
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
760
|
+
uiActions,
|
|
761
|
+
});
|
|
762
|
+
await act(async () => {
|
|
763
|
+
stdin.write('\r'); // Enter
|
|
764
|
+
});
|
|
765
|
+
await waitFor(() => {
|
|
766
|
+
// Should autocomplete (not execute) since autoExecute is undefined
|
|
767
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
768
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
769
|
+
});
|
|
770
|
+
unmount();
|
|
771
|
+
});
|
|
772
|
+
it('should auto-execute argument completion when command has autoExecute: true', async () => {
|
|
773
|
+
// Simulates: /mcp auth <server> where user selects a server from completions
|
|
774
|
+
const authCommand = {
|
|
775
|
+
name: 'auth',
|
|
776
|
+
kind: CommandKind.BUILT_IN,
|
|
777
|
+
description: 'Authenticate with MCP server',
|
|
778
|
+
action: vi.fn(),
|
|
779
|
+
autoExecute: true,
|
|
780
|
+
completion: vi.fn().mockResolvedValue(['server1', 'server2']),
|
|
781
|
+
};
|
|
782
|
+
const suggestion = { label: 'server1', value: 'server1' };
|
|
783
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
784
|
+
...mockCommandCompletion,
|
|
785
|
+
showSuggestions: true,
|
|
786
|
+
suggestions: [suggestion],
|
|
787
|
+
activeSuggestionIndex: 0,
|
|
788
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(authCommand),
|
|
789
|
+
getCompletedText: vi.fn().mockReturnValue('/mcp auth server1'),
|
|
790
|
+
slashCompletionRange: {
|
|
791
|
+
completionStart: 10,
|
|
792
|
+
completionEnd: 10,
|
|
793
|
+
getCommandFromSuggestion: vi.fn(),
|
|
794
|
+
isArgumentCompletion: true,
|
|
795
|
+
leafCommand: authCommand,
|
|
796
|
+
},
|
|
797
|
+
});
|
|
798
|
+
props.buffer.setText('/mcp auth ');
|
|
799
|
+
props.buffer.lines = ['/mcp auth '];
|
|
800
|
+
props.buffer.cursor = [0, 10];
|
|
801
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
802
|
+
uiActions,
|
|
803
|
+
});
|
|
804
|
+
await act(async () => {
|
|
805
|
+
stdin.write('\r'); // Enter
|
|
806
|
+
});
|
|
807
|
+
await waitFor(() => {
|
|
808
|
+
// Should auto-execute with the completed command
|
|
809
|
+
expect(props.onSubmit).toHaveBeenCalledWith('/mcp auth server1');
|
|
810
|
+
expect(mockCommandCompletion.handleAutocomplete).not.toHaveBeenCalled();
|
|
811
|
+
});
|
|
812
|
+
unmount();
|
|
813
|
+
});
|
|
814
|
+
it('should autocomplete argument completion when command has autoExecute: false', async () => {
|
|
815
|
+
// Simulates: /extensions enable <ext> where multi-arg completions should NOT auto-execute
|
|
816
|
+
const enableCommand = {
|
|
817
|
+
name: 'enable',
|
|
818
|
+
kind: CommandKind.BUILT_IN,
|
|
819
|
+
description: 'Enable an extension',
|
|
820
|
+
action: vi.fn(),
|
|
821
|
+
autoExecute: false,
|
|
822
|
+
completion: vi.fn().mockResolvedValue(['ext1 --scope user']),
|
|
823
|
+
};
|
|
824
|
+
const suggestion = {
|
|
825
|
+
label: 'ext1 --scope user',
|
|
826
|
+
value: 'ext1 --scope user',
|
|
827
|
+
};
|
|
828
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
829
|
+
...mockCommandCompletion,
|
|
830
|
+
showSuggestions: true,
|
|
831
|
+
suggestions: [suggestion],
|
|
832
|
+
activeSuggestionIndex: 0,
|
|
833
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(enableCommand),
|
|
834
|
+
getCompletedText: vi
|
|
835
|
+
.fn()
|
|
836
|
+
.mockReturnValue('/extensions enable ext1 --scope user'),
|
|
837
|
+
slashCompletionRange: {
|
|
838
|
+
completionStart: 19,
|
|
839
|
+
completionEnd: 19,
|
|
840
|
+
getCommandFromSuggestion: vi.fn(),
|
|
841
|
+
isArgumentCompletion: true,
|
|
842
|
+
leafCommand: enableCommand,
|
|
843
|
+
},
|
|
844
|
+
});
|
|
845
|
+
props.buffer.setText('/extensions enable ');
|
|
846
|
+
props.buffer.lines = ['/extensions enable '];
|
|
847
|
+
props.buffer.cursor = [0, 19];
|
|
848
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
849
|
+
uiActions,
|
|
850
|
+
});
|
|
851
|
+
await act(async () => {
|
|
852
|
+
stdin.write('\r'); // Enter
|
|
853
|
+
});
|
|
854
|
+
await waitFor(() => {
|
|
855
|
+
// Should autocomplete (not execute) to allow user to modify
|
|
856
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
857
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
858
|
+
});
|
|
859
|
+
unmount();
|
|
860
|
+
});
|
|
861
|
+
it('should autocomplete command name even with autoExecute: true if command has completion function', async () => {
|
|
862
|
+
// Simulates: /chat resu -> should NOT auto-execute, should autocomplete to show arg completions
|
|
863
|
+
const resumeCommand = {
|
|
864
|
+
name: 'resume',
|
|
865
|
+
kind: CommandKind.BUILT_IN,
|
|
866
|
+
description: 'Resume a conversation',
|
|
867
|
+
action: vi.fn(),
|
|
868
|
+
autoExecute: true,
|
|
869
|
+
completion: vi.fn().mockResolvedValue(['chat1', 'chat2']),
|
|
870
|
+
};
|
|
871
|
+
const suggestion = { label: 'resume', value: 'resume' };
|
|
872
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
873
|
+
...mockCommandCompletion,
|
|
874
|
+
showSuggestions: true,
|
|
875
|
+
suggestions: [suggestion],
|
|
876
|
+
activeSuggestionIndex: 0,
|
|
877
|
+
getCommandFromSuggestion: vi.fn().mockReturnValue(resumeCommand),
|
|
878
|
+
getCompletedText: vi.fn().mockReturnValue('/chat resume'),
|
|
879
|
+
slashCompletionRange: {
|
|
880
|
+
completionStart: 6,
|
|
881
|
+
completionEnd: 10,
|
|
882
|
+
getCommandFromSuggestion: vi.fn(),
|
|
883
|
+
isArgumentCompletion: false,
|
|
884
|
+
leafCommand: null,
|
|
885
|
+
},
|
|
886
|
+
});
|
|
887
|
+
props.buffer.setText('/chat resu');
|
|
888
|
+
props.buffer.lines = ['/chat resu'];
|
|
889
|
+
props.buffer.cursor = [0, 10];
|
|
890
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
891
|
+
uiActions,
|
|
892
|
+
});
|
|
893
|
+
await act(async () => {
|
|
894
|
+
stdin.write('\r'); // Enter
|
|
895
|
+
});
|
|
896
|
+
await waitFor(() => {
|
|
897
|
+
// Should autocomplete to allow selecting an argument, NOT auto-execute
|
|
898
|
+
expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0);
|
|
899
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
900
|
+
});
|
|
901
|
+
unmount();
|
|
902
|
+
});
|
|
903
|
+
it('should autocomplete an @-path on Enter without submitting', async () => {
|
|
904
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
905
|
+
...mockCommandCompletion,
|
|
906
|
+
showSuggestions: true,
|
|
907
|
+
suggestions: [{ label: 'index.ts', value: 'index.ts' }],
|
|
908
|
+
activeSuggestionIndex: 0,
|
|
909
|
+
});
|
|
910
|
+
props.buffer.setText('@src/components/');
|
|
911
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
912
|
+
uiActions,
|
|
913
|
+
});
|
|
914
|
+
await act(async () => {
|
|
915
|
+
stdin.write('\r');
|
|
916
|
+
});
|
|
917
|
+
await waitFor(() => expect(mockCommandCompletion.handleAutocomplete).toHaveBeenCalledWith(0));
|
|
918
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
919
|
+
unmount();
|
|
920
|
+
});
|
|
921
|
+
it('should add a newline on enter when the line ends with a backslash', async () => {
|
|
922
|
+
// This test simulates multi-line input, not submission
|
|
923
|
+
mockBuffer.text = 'first line\\';
|
|
924
|
+
mockBuffer.cursor = [0, 11];
|
|
925
|
+
mockBuffer.lines = ['first line\\'];
|
|
926
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
927
|
+
uiActions,
|
|
928
|
+
});
|
|
929
|
+
await act(async () => {
|
|
930
|
+
stdin.write('\r');
|
|
931
|
+
});
|
|
932
|
+
await waitFor(() => {
|
|
933
|
+
expect(props.buffer.backspace).toHaveBeenCalled();
|
|
934
|
+
expect(props.buffer.newline).toHaveBeenCalled();
|
|
935
|
+
});
|
|
936
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
937
|
+
unmount();
|
|
938
|
+
});
|
|
939
|
+
it('should clear the buffer on Ctrl+C if it has text', async () => {
|
|
940
|
+
await act(async () => {
|
|
941
|
+
props.buffer.setText('some text to clear');
|
|
942
|
+
});
|
|
943
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
944
|
+
uiActions,
|
|
945
|
+
});
|
|
946
|
+
await act(async () => {
|
|
947
|
+
stdin.write('\x03'); // Ctrl+C character
|
|
948
|
+
});
|
|
949
|
+
await waitFor(() => {
|
|
950
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('');
|
|
951
|
+
expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
|
|
952
|
+
});
|
|
953
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
954
|
+
unmount();
|
|
955
|
+
});
|
|
956
|
+
it('should NOT clear the buffer on Ctrl+C if it is empty', async () => {
|
|
957
|
+
props.buffer.text = '';
|
|
958
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
959
|
+
uiActions,
|
|
960
|
+
});
|
|
961
|
+
await act(async () => {
|
|
962
|
+
stdin.write('\x03'); // Ctrl+C character
|
|
963
|
+
});
|
|
964
|
+
await waitFor(() => {
|
|
965
|
+
expect(props.buffer.setText).not.toHaveBeenCalled();
|
|
966
|
+
});
|
|
967
|
+
unmount();
|
|
968
|
+
});
|
|
969
|
+
it('should call setBannerVisible(false) when clear screen key is pressed', async () => {
|
|
970
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
971
|
+
uiActions,
|
|
972
|
+
});
|
|
973
|
+
await act(async () => {
|
|
974
|
+
stdin.write('\x0C'); // Ctrl+L
|
|
975
|
+
});
|
|
976
|
+
await waitFor(() => {
|
|
977
|
+
expect(props.setBannerVisible).toHaveBeenCalledWith(false);
|
|
978
|
+
});
|
|
979
|
+
unmount();
|
|
980
|
+
});
|
|
981
|
+
describe('cursor-based completion trigger', () => {
|
|
982
|
+
it.each([
|
|
983
|
+
{
|
|
984
|
+
name: 'should trigger completion when cursor is after @ without spaces',
|
|
985
|
+
text: '@src/components',
|
|
986
|
+
cursor: [0, 15],
|
|
987
|
+
showSuggestions: true,
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
name: 'should trigger completion when cursor is after / without spaces',
|
|
991
|
+
text: '/memory',
|
|
992
|
+
cursor: [0, 7],
|
|
993
|
+
showSuggestions: true,
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
name: 'should NOT trigger completion when cursor is after space following @',
|
|
997
|
+
text: '@src/file.ts hello',
|
|
998
|
+
cursor: [0, 18],
|
|
999
|
+
showSuggestions: false,
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: 'should NOT trigger completion when cursor is after space following /',
|
|
1003
|
+
text: '/memory add',
|
|
1004
|
+
cursor: [0, 11],
|
|
1005
|
+
showSuggestions: false,
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
name: 'should NOT trigger completion when cursor is not after @ or /',
|
|
1009
|
+
text: 'hello world',
|
|
1010
|
+
cursor: [0, 5],
|
|
1011
|
+
showSuggestions: false,
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: 'should handle multiline text correctly',
|
|
1015
|
+
text: 'first line\n/memory',
|
|
1016
|
+
cursor: [1, 7],
|
|
1017
|
+
showSuggestions: false,
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
name: 'should handle Unicode characters (emojis) correctly in paths',
|
|
1021
|
+
text: '@src/file👍.txt',
|
|
1022
|
+
cursor: [0, 14],
|
|
1023
|
+
showSuggestions: true,
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
name: 'should handle Unicode characters with spaces after them',
|
|
1027
|
+
text: '@src/file👍.txt hello',
|
|
1028
|
+
cursor: [0, 20],
|
|
1029
|
+
showSuggestions: false,
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
name: 'should handle escaped spaces in paths correctly',
|
|
1033
|
+
text: '@src/my\\ file.txt',
|
|
1034
|
+
cursor: [0, 16],
|
|
1035
|
+
showSuggestions: true,
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
name: 'should NOT trigger completion after unescaped space following escaped space',
|
|
1039
|
+
text: '@path/my\\ file.txt hello',
|
|
1040
|
+
cursor: [0, 24],
|
|
1041
|
+
showSuggestions: false,
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
name: 'should handle multiple escaped spaces in paths',
|
|
1045
|
+
text: '@docs/my\\ long\\ file\\ name.md',
|
|
1046
|
+
cursor: [0, 29],
|
|
1047
|
+
showSuggestions: true,
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
name: 'should handle escaped spaces in slash commands',
|
|
1051
|
+
text: '/memory\\ test',
|
|
1052
|
+
cursor: [0, 13],
|
|
1053
|
+
showSuggestions: true,
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
name: 'should handle Unicode characters with escaped spaces',
|
|
1057
|
+
text: `@${path.join('files', 'emoji\\ 👍\\ test.txt')}`,
|
|
1058
|
+
cursor: [0, 25],
|
|
1059
|
+
showSuggestions: true,
|
|
1060
|
+
},
|
|
1061
|
+
])('$name', async ({ text, cursor, showSuggestions }) => {
|
|
1062
|
+
mockBuffer.text = text;
|
|
1063
|
+
mockBuffer.lines = text.split('\n');
|
|
1064
|
+
mockBuffer.cursor = cursor;
|
|
1065
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
1066
|
+
...mockCommandCompletion,
|
|
1067
|
+
showSuggestions,
|
|
1068
|
+
suggestions: showSuggestions
|
|
1069
|
+
? [{ label: 'suggestion', value: 'suggestion' }]
|
|
1070
|
+
: [],
|
|
1071
|
+
});
|
|
1072
|
+
const { unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
1073
|
+
uiActions,
|
|
1074
|
+
});
|
|
1075
|
+
await waitFor(() => {
|
|
1076
|
+
expect(mockedUseCommandCompletion).toHaveBeenCalledWith(mockBuffer, path.join('test', 'project', 'src'), mockSlashCommands, mockCommandContext, false, false, expect.any(Object));
|
|
1077
|
+
});
|
|
1078
|
+
unmount();
|
|
1079
|
+
});
|
|
1080
|
+
});
|
|
1081
|
+
describe('vim mode', () => {
|
|
1082
|
+
it.each([
|
|
1083
|
+
{
|
|
1084
|
+
name: 'should not call buffer.handleInput when vim handles input',
|
|
1085
|
+
vimHandled: true,
|
|
1086
|
+
expectBufferHandleInput: false,
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
name: 'should call buffer.handleInput when vim does not handle input',
|
|
1090
|
+
vimHandled: false,
|
|
1091
|
+
expectBufferHandleInput: true,
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
name: 'should call handleInput when vim mode is disabled',
|
|
1095
|
+
vimHandled: false,
|
|
1096
|
+
expectBufferHandleInput: true,
|
|
1097
|
+
},
|
|
1098
|
+
])('$name', async ({ vimHandled, expectBufferHandleInput }) => {
|
|
1099
|
+
props.vimHandleInput = vi.fn().mockReturnValue(vimHandled);
|
|
1100
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1101
|
+
await act(async () => stdin.write('i'));
|
|
1102
|
+
await waitFor(() => {
|
|
1103
|
+
expect(props.vimHandleInput).toHaveBeenCalled();
|
|
1104
|
+
if (expectBufferHandleInput) {
|
|
1105
|
+
expect(mockBuffer.handleInput).toHaveBeenCalled();
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
expect(mockBuffer.handleInput).not.toHaveBeenCalled();
|
|
1109
|
+
}
|
|
1110
|
+
});
|
|
1111
|
+
unmount();
|
|
1112
|
+
});
|
|
1113
|
+
});
|
|
1114
|
+
describe('unfocused paste', () => {
|
|
1115
|
+
it('should handle bracketed paste when not focused', async () => {
|
|
1116
|
+
props.focus = false;
|
|
1117
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1118
|
+
await act(async () => {
|
|
1119
|
+
stdin.write('\x1B[200~pasted text\x1B[201~');
|
|
1120
|
+
});
|
|
1121
|
+
await waitFor(() => {
|
|
1122
|
+
expect(mockBuffer.handleInput).toHaveBeenCalledWith(expect.objectContaining({
|
|
1123
|
+
paste: true,
|
|
1124
|
+
sequence: 'pasted text',
|
|
1125
|
+
}));
|
|
1126
|
+
});
|
|
1127
|
+
unmount();
|
|
1128
|
+
});
|
|
1129
|
+
it('should ignore regular keypresses when not focused', async () => {
|
|
1130
|
+
props.focus = false;
|
|
1131
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1132
|
+
await act(async () => {
|
|
1133
|
+
stdin.write('a');
|
|
1134
|
+
});
|
|
1135
|
+
await waitFor(() => { });
|
|
1136
|
+
expect(mockBuffer.handleInput).not.toHaveBeenCalled();
|
|
1137
|
+
unmount();
|
|
1138
|
+
});
|
|
1139
|
+
});
|
|
1140
|
+
describe('Highlighting and Cursor Display', () => {
|
|
1141
|
+
describe('single-line scenarios', () => {
|
|
1142
|
+
it.each([
|
|
1143
|
+
{
|
|
1144
|
+
name: 'mid-word',
|
|
1145
|
+
text: 'hello world',
|
|
1146
|
+
visualCursor: [0, 3],
|
|
1147
|
+
expected: `hel${chalk.inverse('l')}o world`,
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: 'at the beginning of the line',
|
|
1151
|
+
text: 'hello',
|
|
1152
|
+
visualCursor: [0, 0],
|
|
1153
|
+
expected: `${chalk.inverse('h')}ello`,
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
name: 'at the end of the line',
|
|
1157
|
+
text: 'hello',
|
|
1158
|
+
visualCursor: [0, 5],
|
|
1159
|
+
expected: `hello${chalk.inverse(' ')}`,
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: 'on a highlighted token',
|
|
1163
|
+
text: 'run @path/to/file',
|
|
1164
|
+
visualCursor: [0, 9],
|
|
1165
|
+
expected: `@path/${chalk.inverse('t')}o/file`,
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
name: 'for multi-byte unicode characters',
|
|
1169
|
+
text: 'hello 👍 world',
|
|
1170
|
+
visualCursor: [0, 6],
|
|
1171
|
+
expected: `hello ${chalk.inverse('👍')} world`,
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
name: 'at the end of a line with unicode characters',
|
|
1175
|
+
text: 'hello 👍',
|
|
1176
|
+
visualCursor: [0, 8],
|
|
1177
|
+
expected: `hello 👍${chalk.inverse(' ')}`,
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
name: 'on an empty line',
|
|
1181
|
+
text: '',
|
|
1182
|
+
visualCursor: [0, 0],
|
|
1183
|
+
expected: chalk.inverse(' '),
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: 'on a space between words',
|
|
1187
|
+
text: 'hello world',
|
|
1188
|
+
visualCursor: [0, 5],
|
|
1189
|
+
expected: `hello${chalk.inverse(' ')}world`,
|
|
1190
|
+
},
|
|
1191
|
+
])('should display cursor correctly $name', async ({ text, visualCursor, expected }) => {
|
|
1192
|
+
mockBuffer.text = text;
|
|
1193
|
+
mockBuffer.lines = [text];
|
|
1194
|
+
mockBuffer.viewportVisualLines = [text];
|
|
1195
|
+
mockBuffer.visualCursor = visualCursor;
|
|
1196
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1197
|
+
await waitFor(() => {
|
|
1198
|
+
const frame = stdout.lastFrame();
|
|
1199
|
+
expect(frame).toContain(expected);
|
|
1200
|
+
});
|
|
1201
|
+
unmount();
|
|
1202
|
+
});
|
|
1203
|
+
});
|
|
1204
|
+
describe('multi-line scenarios', () => {
|
|
1205
|
+
it.each([
|
|
1206
|
+
{
|
|
1207
|
+
name: 'in the middle of a line',
|
|
1208
|
+
text: 'first line\nsecond line\nthird line',
|
|
1209
|
+
visualCursor: [1, 3],
|
|
1210
|
+
visualToLogicalMap: [
|
|
1211
|
+
[0, 0],
|
|
1212
|
+
[1, 0],
|
|
1213
|
+
[2, 0],
|
|
1214
|
+
],
|
|
1215
|
+
expected: `sec${chalk.inverse('o')}nd line`,
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
name: 'at the beginning of a line',
|
|
1219
|
+
text: 'first line\nsecond line',
|
|
1220
|
+
visualCursor: [1, 0],
|
|
1221
|
+
visualToLogicalMap: [
|
|
1222
|
+
[0, 0],
|
|
1223
|
+
[1, 0],
|
|
1224
|
+
],
|
|
1225
|
+
expected: `${chalk.inverse('s')}econd line`,
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: 'at the end of a line',
|
|
1229
|
+
text: 'first line\nsecond line',
|
|
1230
|
+
visualCursor: [0, 10],
|
|
1231
|
+
visualToLogicalMap: [
|
|
1232
|
+
[0, 0],
|
|
1233
|
+
[1, 0],
|
|
1234
|
+
],
|
|
1235
|
+
expected: `first line${chalk.inverse(' ')}`,
|
|
1236
|
+
},
|
|
1237
|
+
])('should display cursor correctly $name in a multiline block', async ({ text, visualCursor, expected, visualToLogicalMap }) => {
|
|
1238
|
+
mockBuffer.text = text;
|
|
1239
|
+
mockBuffer.lines = text.split('\n');
|
|
1240
|
+
mockBuffer.viewportVisualLines = text.split('\n');
|
|
1241
|
+
mockBuffer.visualCursor = visualCursor;
|
|
1242
|
+
mockBuffer.visualToLogicalMap = visualToLogicalMap;
|
|
1243
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1244
|
+
await waitFor(() => {
|
|
1245
|
+
const frame = stdout.lastFrame();
|
|
1246
|
+
expect(frame).toContain(expected);
|
|
1247
|
+
});
|
|
1248
|
+
unmount();
|
|
1249
|
+
});
|
|
1250
|
+
it('should display cursor on a blank line in a multiline block', async () => {
|
|
1251
|
+
const text = 'first line\n\nthird line';
|
|
1252
|
+
mockBuffer.text = text;
|
|
1253
|
+
mockBuffer.lines = text.split('\n');
|
|
1254
|
+
mockBuffer.viewportVisualLines = text.split('\n');
|
|
1255
|
+
mockBuffer.visualCursor = [1, 0]; // cursor on the blank line
|
|
1256
|
+
mockBuffer.visualToLogicalMap = [
|
|
1257
|
+
[0, 0],
|
|
1258
|
+
[1, 0],
|
|
1259
|
+
[2, 0],
|
|
1260
|
+
];
|
|
1261
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1262
|
+
await waitFor(() => {
|
|
1263
|
+
const frame = stdout.lastFrame();
|
|
1264
|
+
const lines = frame.split('\n');
|
|
1265
|
+
// The line with the cursor should just be an inverted space inside the box border
|
|
1266
|
+
expect(lines.find((l) => l.includes(chalk.inverse(' ')))).not.toBeUndefined();
|
|
1267
|
+
});
|
|
1268
|
+
unmount();
|
|
1269
|
+
});
|
|
1270
|
+
});
|
|
1271
|
+
});
|
|
1272
|
+
describe('multiline rendering', () => {
|
|
1273
|
+
it('should correctly render multiline input including blank lines', async () => {
|
|
1274
|
+
const text = 'hello\n\nworld';
|
|
1275
|
+
mockBuffer.text = text;
|
|
1276
|
+
mockBuffer.lines = text.split('\n');
|
|
1277
|
+
mockBuffer.viewportVisualLines = text.split('\n');
|
|
1278
|
+
mockBuffer.allVisualLines = text.split('\n');
|
|
1279
|
+
mockBuffer.visualCursor = [2, 5]; // cursor at the end of "world"
|
|
1280
|
+
// Provide a visual-to-logical mapping for each visual line
|
|
1281
|
+
mockBuffer.visualToLogicalMap = [
|
|
1282
|
+
[0, 0], // 'hello' starts at col 0 of logical line 0
|
|
1283
|
+
[1, 0], // '' (blank) is logical line 1, col 0
|
|
1284
|
+
[2, 0], // 'world' is logical line 2, col 0
|
|
1285
|
+
];
|
|
1286
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1287
|
+
await waitFor(() => {
|
|
1288
|
+
const frame = stdout.lastFrame();
|
|
1289
|
+
// Check that all lines, including the empty one, are rendered.
|
|
1290
|
+
// This implicitly tests that the Box wrapper provides height for the empty line.
|
|
1291
|
+
expect(frame).toContain('hello');
|
|
1292
|
+
expect(frame).toContain(`world${chalk.inverse(' ')}`);
|
|
1293
|
+
const outputLines = frame.split('\n');
|
|
1294
|
+
// The number of lines should be 2 for the border plus 3 for the content.
|
|
1295
|
+
expect(outputLines.length).toBe(5);
|
|
1296
|
+
});
|
|
1297
|
+
unmount();
|
|
1298
|
+
});
|
|
1299
|
+
});
|
|
1300
|
+
describe('multiline paste', () => {
|
|
1301
|
+
it.each([
|
|
1302
|
+
{
|
|
1303
|
+
description: 'with \n newlines',
|
|
1304
|
+
pastedText: 'This \n is \n a \n multiline \n paste.',
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
description: 'with extra slashes before \n newlines',
|
|
1308
|
+
pastedText: 'This \\\n is \\\n a \\\n multiline \\\n paste.',
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
description: 'with \r\n newlines',
|
|
1312
|
+
pastedText: 'This\r\nis\r\na\r\nmultiline\r\npaste.',
|
|
1313
|
+
},
|
|
1314
|
+
])('should handle multiline paste $description', async ({ pastedText }) => {
|
|
1315
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1316
|
+
// Simulate a bracketed paste event from the terminal
|
|
1317
|
+
await act(async () => {
|
|
1318
|
+
stdin.write(`\x1b[200~${pastedText}\x1b[201~`);
|
|
1319
|
+
});
|
|
1320
|
+
await waitFor(() => {
|
|
1321
|
+
// Verify that the buffer's handleInput was called once with the full text
|
|
1322
|
+
expect(props.buffer.handleInput).toHaveBeenCalledTimes(1);
|
|
1323
|
+
expect(props.buffer.handleInput).toHaveBeenCalledWith(expect.objectContaining({
|
|
1324
|
+
paste: true,
|
|
1325
|
+
sequence: pastedText,
|
|
1326
|
+
}));
|
|
1327
|
+
});
|
|
1328
|
+
unmount();
|
|
1329
|
+
});
|
|
1330
|
+
});
|
|
1331
|
+
describe('paste auto-submission protection', () => {
|
|
1332
|
+
beforeEach(() => {
|
|
1333
|
+
vi.useFakeTimers();
|
|
1334
|
+
mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
1335
|
+
enabled: false,
|
|
1336
|
+
checking: false,
|
|
1337
|
+
});
|
|
1338
|
+
});
|
|
1339
|
+
afterEach(() => {
|
|
1340
|
+
vi.useRealTimers();
|
|
1341
|
+
});
|
|
1342
|
+
it('should prevent auto-submission immediately after an unsafe paste', async () => {
|
|
1343
|
+
// isTerminalPasteTrusted will be false due to beforeEach setup.
|
|
1344
|
+
props.buffer.text = 'some command';
|
|
1345
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1346
|
+
await act(async () => {
|
|
1347
|
+
await vi.runAllTimersAsync();
|
|
1348
|
+
});
|
|
1349
|
+
// Simulate a paste operation (this should set the paste protection)
|
|
1350
|
+
await act(async () => {
|
|
1351
|
+
stdin.write(`\x1b[200~pasted content\x1b[201~`);
|
|
1352
|
+
});
|
|
1353
|
+
// Simulate an Enter key press immediately after paste
|
|
1354
|
+
await act(async () => {
|
|
1355
|
+
stdin.write('\r');
|
|
1356
|
+
});
|
|
1357
|
+
await act(async () => {
|
|
1358
|
+
await vi.runAllTimersAsync();
|
|
1359
|
+
});
|
|
1360
|
+
// Verify that onSubmit was NOT called due to recent paste protection
|
|
1361
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
1362
|
+
// It should call newline() instead
|
|
1363
|
+
expect(props.buffer.newline).toHaveBeenCalled();
|
|
1364
|
+
unmount();
|
|
1365
|
+
});
|
|
1366
|
+
it('should allow submission after unsafe paste protection timeout', async () => {
|
|
1367
|
+
// isTerminalPasteTrusted will be false due to beforeEach setup.
|
|
1368
|
+
props.buffer.text = 'pasted text';
|
|
1369
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1370
|
+
await act(async () => {
|
|
1371
|
+
await vi.runAllTimersAsync();
|
|
1372
|
+
});
|
|
1373
|
+
// Simulate a paste operation (this sets the protection)
|
|
1374
|
+
await act(async () => {
|
|
1375
|
+
stdin.write('\x1b[200~pasted text\x1b[201~');
|
|
1376
|
+
});
|
|
1377
|
+
await act(async () => {
|
|
1378
|
+
await vi.runAllTimersAsync();
|
|
1379
|
+
});
|
|
1380
|
+
// Advance timers past the protection timeout
|
|
1381
|
+
await act(async () => {
|
|
1382
|
+
await vi.advanceTimersByTimeAsync(50);
|
|
1383
|
+
});
|
|
1384
|
+
// Now Enter should work normally
|
|
1385
|
+
await act(async () => {
|
|
1386
|
+
stdin.write('\r');
|
|
1387
|
+
});
|
|
1388
|
+
await act(async () => {
|
|
1389
|
+
await vi.runAllTimersAsync();
|
|
1390
|
+
});
|
|
1391
|
+
expect(props.onSubmit).toHaveBeenCalledWith('pasted text');
|
|
1392
|
+
expect(props.buffer.newline).not.toHaveBeenCalled();
|
|
1393
|
+
unmount();
|
|
1394
|
+
});
|
|
1395
|
+
it.each([
|
|
1396
|
+
{
|
|
1397
|
+
name: 'kitty',
|
|
1398
|
+
setup: () => mockedUseKittyKeyboardProtocol.mockReturnValue({
|
|
1399
|
+
enabled: true,
|
|
1400
|
+
checking: false,
|
|
1401
|
+
}),
|
|
1402
|
+
},
|
|
1403
|
+
])('should allow immediate submission for a trusted paste ($name)', async ({ setup }) => {
|
|
1404
|
+
setup();
|
|
1405
|
+
props.buffer.text = 'pasted command';
|
|
1406
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1407
|
+
await act(async () => {
|
|
1408
|
+
await vi.runAllTimersAsync();
|
|
1409
|
+
});
|
|
1410
|
+
// Simulate a paste operation
|
|
1411
|
+
await act(async () => {
|
|
1412
|
+
stdin.write('\x1b[200~some pasted stuff\x1b[201~');
|
|
1413
|
+
});
|
|
1414
|
+
await act(async () => {
|
|
1415
|
+
await vi.runAllTimersAsync();
|
|
1416
|
+
});
|
|
1417
|
+
// Simulate an Enter key press immediately after paste
|
|
1418
|
+
await act(async () => {
|
|
1419
|
+
stdin.write('\r');
|
|
1420
|
+
});
|
|
1421
|
+
await act(async () => {
|
|
1422
|
+
await vi.runAllTimersAsync();
|
|
1423
|
+
});
|
|
1424
|
+
// Verify that onSubmit was called
|
|
1425
|
+
expect(props.onSubmit).toHaveBeenCalledWith('pasted command');
|
|
1426
|
+
unmount();
|
|
1427
|
+
});
|
|
1428
|
+
it('should not interfere with normal Enter key submission when no recent paste', async () => {
|
|
1429
|
+
// Set up buffer with text before rendering to ensure submission works
|
|
1430
|
+
props.buffer.text = 'normal command';
|
|
1431
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1432
|
+
await act(async () => {
|
|
1433
|
+
await vi.runAllTimersAsync();
|
|
1434
|
+
});
|
|
1435
|
+
// Press Enter without any recent paste
|
|
1436
|
+
await act(async () => {
|
|
1437
|
+
stdin.write('\r');
|
|
1438
|
+
});
|
|
1439
|
+
await act(async () => {
|
|
1440
|
+
await vi.runAllTimersAsync();
|
|
1441
|
+
});
|
|
1442
|
+
// Verify that onSubmit was called normally
|
|
1443
|
+
expect(props.onSubmit).toHaveBeenCalledWith('normal command');
|
|
1444
|
+
unmount();
|
|
1445
|
+
});
|
|
1446
|
+
});
|
|
1447
|
+
describe('enhanced input UX - double ESC clear functionality', () => {
|
|
1448
|
+
beforeEach(() => vi.useFakeTimers());
|
|
1449
|
+
afterEach(() => vi.useRealTimers());
|
|
1450
|
+
it('should clear buffer on second ESC press', async () => {
|
|
1451
|
+
const onEscapePromptChange = vi.fn();
|
|
1452
|
+
props.onEscapePromptChange = onEscapePromptChange;
|
|
1453
|
+
props.buffer.setText('text to clear');
|
|
1454
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1455
|
+
await act(async () => {
|
|
1456
|
+
stdin.write('\x1B');
|
|
1457
|
+
vi.advanceTimersByTime(100);
|
|
1458
|
+
expect(onEscapePromptChange).toHaveBeenCalledWith(false);
|
|
1459
|
+
});
|
|
1460
|
+
await act(async () => {
|
|
1461
|
+
stdin.write('\x1B');
|
|
1462
|
+
vi.advanceTimersByTime(100);
|
|
1463
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('');
|
|
1464
|
+
expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
|
|
1465
|
+
});
|
|
1466
|
+
unmount();
|
|
1467
|
+
});
|
|
1468
|
+
it('should clear buffer on double ESC', async () => {
|
|
1469
|
+
const onEscapePromptChange = vi.fn();
|
|
1470
|
+
props.onEscapePromptChange = onEscapePromptChange;
|
|
1471
|
+
props.buffer.setText('text to clear');
|
|
1472
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1473
|
+
await act(async () => {
|
|
1474
|
+
stdin.write('\x1B\x1B');
|
|
1475
|
+
vi.advanceTimersByTime(100);
|
|
1476
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('');
|
|
1477
|
+
expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
|
|
1478
|
+
});
|
|
1479
|
+
unmount();
|
|
1480
|
+
});
|
|
1481
|
+
it('should reset escape state on any non-ESC key', async () => {
|
|
1482
|
+
const onEscapePromptChange = vi.fn();
|
|
1483
|
+
props.onEscapePromptChange = onEscapePromptChange;
|
|
1484
|
+
props.buffer.setText('some text');
|
|
1485
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1486
|
+
await act(async () => {
|
|
1487
|
+
stdin.write('\x1B');
|
|
1488
|
+
await waitFor(() => {
|
|
1489
|
+
expect(onEscapePromptChange).toHaveBeenCalledWith(false);
|
|
1490
|
+
});
|
|
1491
|
+
});
|
|
1492
|
+
await act(async () => {
|
|
1493
|
+
stdin.write('a');
|
|
1494
|
+
await waitFor(() => {
|
|
1495
|
+
expect(onEscapePromptChange).toHaveBeenCalledWith(false);
|
|
1496
|
+
});
|
|
1497
|
+
});
|
|
1498
|
+
unmount();
|
|
1499
|
+
});
|
|
1500
|
+
it('should handle ESC in shell mode by disabling shell mode', async () => {
|
|
1501
|
+
props.shellModeActive = true;
|
|
1502
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1503
|
+
await act(async () => {
|
|
1504
|
+
stdin.write('\x1B');
|
|
1505
|
+
vi.advanceTimersByTime(100);
|
|
1506
|
+
expect(props.setShellModeActive).toHaveBeenCalledWith(false);
|
|
1507
|
+
});
|
|
1508
|
+
unmount();
|
|
1509
|
+
});
|
|
1510
|
+
it('should handle ESC when completion suggestions are showing', async () => {
|
|
1511
|
+
mockedUseCommandCompletion.mockReturnValue({
|
|
1512
|
+
...mockCommandCompletion,
|
|
1513
|
+
showSuggestions: true,
|
|
1514
|
+
suggestions: [{ label: 'suggestion', value: 'suggestion' }],
|
|
1515
|
+
});
|
|
1516
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1517
|
+
await act(async () => {
|
|
1518
|
+
stdin.write('\x1B');
|
|
1519
|
+
vi.advanceTimersByTime(100);
|
|
1520
|
+
expect(mockCommandCompletion.resetCompletionState).toHaveBeenCalled();
|
|
1521
|
+
});
|
|
1522
|
+
unmount();
|
|
1523
|
+
});
|
|
1524
|
+
it('should not call onEscapePromptChange when not provided', async () => {
|
|
1525
|
+
props.onEscapePromptChange = undefined;
|
|
1526
|
+
props.buffer.setText('some text');
|
|
1527
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1528
|
+
await act(async () => {
|
|
1529
|
+
await vi.runAllTimersAsync();
|
|
1530
|
+
});
|
|
1531
|
+
await act(async () => {
|
|
1532
|
+
stdin.write('\x1B');
|
|
1533
|
+
});
|
|
1534
|
+
await act(async () => {
|
|
1535
|
+
await vi.runAllTimersAsync();
|
|
1536
|
+
});
|
|
1537
|
+
unmount();
|
|
1538
|
+
});
|
|
1539
|
+
it('should not interfere with existing keyboard shortcuts', async () => {
|
|
1540
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1541
|
+
await act(async () => {
|
|
1542
|
+
stdin.write('\x0C');
|
|
1543
|
+
});
|
|
1544
|
+
await waitFor(() => expect(props.onClearScreen).toHaveBeenCalled());
|
|
1545
|
+
await act(async () => {
|
|
1546
|
+
stdin.write('\x01');
|
|
1547
|
+
});
|
|
1548
|
+
await waitFor(() => expect(props.buffer.move).toHaveBeenCalledWith('home'));
|
|
1549
|
+
unmount();
|
|
1550
|
+
});
|
|
1551
|
+
});
|
|
1552
|
+
describe('reverse search', () => {
|
|
1553
|
+
beforeEach(async () => {
|
|
1554
|
+
props.shellModeActive = true;
|
|
1555
|
+
vi.mocked(useShellHistory).mockReturnValue({
|
|
1556
|
+
history: ['echo hello', 'echo world', 'ls'],
|
|
1557
|
+
getPreviousCommand: vi.fn(),
|
|
1558
|
+
getNextCommand: vi.fn(),
|
|
1559
|
+
addCommandToHistory: vi.fn(),
|
|
1560
|
+
resetHistoryPosition: vi.fn(),
|
|
1561
|
+
});
|
|
1562
|
+
});
|
|
1563
|
+
it('invokes reverse search on Ctrl+R', async () => {
|
|
1564
|
+
// Mock the reverse search completion to return suggestions
|
|
1565
|
+
mockedUseReverseSearchCompletion.mockReturnValue({
|
|
1566
|
+
...mockReverseSearchCompletion,
|
|
1567
|
+
suggestions: [
|
|
1568
|
+
{ label: 'echo hello', value: 'echo hello' },
|
|
1569
|
+
{ label: 'echo world', value: 'echo world' },
|
|
1570
|
+
{ label: 'ls', value: 'ls' },
|
|
1571
|
+
],
|
|
1572
|
+
showSuggestions: true,
|
|
1573
|
+
activeSuggestionIndex: 0,
|
|
1574
|
+
});
|
|
1575
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1576
|
+
// Trigger reverse search with Ctrl+R
|
|
1577
|
+
await act(async () => {
|
|
1578
|
+
stdin.write('\x12');
|
|
1579
|
+
});
|
|
1580
|
+
await waitFor(() => {
|
|
1581
|
+
const frame = stdout.lastFrame();
|
|
1582
|
+
expect(frame).toContain('(r:)');
|
|
1583
|
+
expect(frame).toContain('echo hello');
|
|
1584
|
+
expect(frame).toContain('echo world');
|
|
1585
|
+
expect(frame).toContain('ls');
|
|
1586
|
+
});
|
|
1587
|
+
unmount();
|
|
1588
|
+
});
|
|
1589
|
+
it.each([
|
|
1590
|
+
{ name: 'standard', escapeSequence: '\x1B' },
|
|
1591
|
+
{ name: 'kitty', escapeSequence: '\u001b[27u' },
|
|
1592
|
+
])('resets reverse search state on Escape ($name)', async ({ escapeSequence }) => {
|
|
1593
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1594
|
+
await act(async () => {
|
|
1595
|
+
stdin.write('\x12');
|
|
1596
|
+
});
|
|
1597
|
+
// Wait for reverse search to be active
|
|
1598
|
+
await waitFor(() => {
|
|
1599
|
+
expect(stdout.lastFrame()).toContain('(r:)');
|
|
1600
|
+
});
|
|
1601
|
+
await act(async () => {
|
|
1602
|
+
stdin.write(escapeSequence);
|
|
1603
|
+
});
|
|
1604
|
+
await waitFor(() => {
|
|
1605
|
+
expect(stdout.lastFrame()).not.toContain('(r:)');
|
|
1606
|
+
expect(stdout.lastFrame()).not.toContain('echo hello');
|
|
1607
|
+
});
|
|
1608
|
+
unmount();
|
|
1609
|
+
});
|
|
1610
|
+
it('completes the highlighted entry on Tab and exits reverse-search', async () => {
|
|
1611
|
+
// Mock the reverse search completion
|
|
1612
|
+
const mockHandleAutocomplete = vi.fn(() => {
|
|
1613
|
+
props.buffer.setText('echo hello');
|
|
1614
|
+
});
|
|
1615
|
+
mockedUseReverseSearchCompletion.mockImplementation((buffer, shellHistory, reverseSearchActive) => ({
|
|
1616
|
+
...mockReverseSearchCompletion,
|
|
1617
|
+
suggestions: reverseSearchActive
|
|
1618
|
+
? [
|
|
1619
|
+
{ label: 'echo hello', value: 'echo hello' },
|
|
1620
|
+
{ label: 'echo world', value: 'echo world' },
|
|
1621
|
+
{ label: 'ls', value: 'ls' },
|
|
1622
|
+
]
|
|
1623
|
+
: [],
|
|
1624
|
+
showSuggestions: reverseSearchActive,
|
|
1625
|
+
activeSuggestionIndex: reverseSearchActive ? 0 : -1,
|
|
1626
|
+
handleAutocomplete: mockHandleAutocomplete,
|
|
1627
|
+
}));
|
|
1628
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1629
|
+
// Enter reverse search mode with Ctrl+R
|
|
1630
|
+
await act(async () => {
|
|
1631
|
+
stdin.write('\x12');
|
|
1632
|
+
});
|
|
1633
|
+
// Verify reverse search is active
|
|
1634
|
+
await waitFor(() => {
|
|
1635
|
+
expect(stdout.lastFrame()).toContain('(r:)');
|
|
1636
|
+
});
|
|
1637
|
+
// Press Tab to complete the highlighted entry
|
|
1638
|
+
await act(async () => {
|
|
1639
|
+
stdin.write('\t');
|
|
1640
|
+
});
|
|
1641
|
+
await waitFor(() => {
|
|
1642
|
+
expect(mockHandleAutocomplete).toHaveBeenCalledWith(0);
|
|
1643
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('echo hello');
|
|
1644
|
+
});
|
|
1645
|
+
unmount();
|
|
1646
|
+
}, 15000);
|
|
1647
|
+
it('submits the highlighted entry on Enter and exits reverse-search', async () => {
|
|
1648
|
+
// Mock the reverse search completion to return suggestions
|
|
1649
|
+
mockedUseReverseSearchCompletion.mockReturnValue({
|
|
1650
|
+
...mockReverseSearchCompletion,
|
|
1651
|
+
suggestions: [
|
|
1652
|
+
{ label: 'echo hello', value: 'echo hello' },
|
|
1653
|
+
{ label: 'echo world', value: 'echo world' },
|
|
1654
|
+
{ label: 'ls', value: 'ls' },
|
|
1655
|
+
],
|
|
1656
|
+
showSuggestions: true,
|
|
1657
|
+
activeSuggestionIndex: 0,
|
|
1658
|
+
});
|
|
1659
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1660
|
+
await act(async () => {
|
|
1661
|
+
stdin.write('\x12');
|
|
1662
|
+
});
|
|
1663
|
+
await waitFor(() => {
|
|
1664
|
+
expect(stdout.lastFrame()).toContain('(r:)');
|
|
1665
|
+
});
|
|
1666
|
+
await act(async () => {
|
|
1667
|
+
stdin.write('\r');
|
|
1668
|
+
});
|
|
1669
|
+
await waitFor(() => {
|
|
1670
|
+
expect(stdout.lastFrame()).not.toContain('(r:)');
|
|
1671
|
+
});
|
|
1672
|
+
expect(props.onSubmit).toHaveBeenCalledWith('echo hello');
|
|
1673
|
+
unmount();
|
|
1674
|
+
});
|
|
1675
|
+
it('should restore text and cursor position after reverse search"', async () => {
|
|
1676
|
+
const initialText = 'initial text';
|
|
1677
|
+
const initialCursor = [0, 3];
|
|
1678
|
+
props.buffer.setText(initialText);
|
|
1679
|
+
props.buffer.cursor = initialCursor;
|
|
1680
|
+
// Mock the reverse search completion to be active and then reset
|
|
1681
|
+
mockedUseReverseSearchCompletion.mockImplementation((buffer, shellHistory, reverseSearchActiveFromInputPrompt) => ({
|
|
1682
|
+
...mockReverseSearchCompletion,
|
|
1683
|
+
suggestions: reverseSearchActiveFromInputPrompt
|
|
1684
|
+
? [{ label: 'history item', value: 'history item' }]
|
|
1685
|
+
: [],
|
|
1686
|
+
showSuggestions: reverseSearchActiveFromInputPrompt,
|
|
1687
|
+
}));
|
|
1688
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1689
|
+
// reverse search with Ctrl+R
|
|
1690
|
+
await act(async () => {
|
|
1691
|
+
stdin.write('\x12');
|
|
1692
|
+
});
|
|
1693
|
+
await waitFor(() => {
|
|
1694
|
+
expect(stdout.lastFrame()).toContain('(r:)');
|
|
1695
|
+
});
|
|
1696
|
+
// Press kitty escape key
|
|
1697
|
+
await act(async () => {
|
|
1698
|
+
stdin.write('\u001b[27u');
|
|
1699
|
+
});
|
|
1700
|
+
await waitFor(() => {
|
|
1701
|
+
expect(stdout.lastFrame()).not.toContain('(r:)');
|
|
1702
|
+
expect(props.buffer.text).toBe(initialText);
|
|
1703
|
+
expect(props.buffer.cursor).toEqual(initialCursor);
|
|
1704
|
+
});
|
|
1705
|
+
unmount();
|
|
1706
|
+
});
|
|
1707
|
+
});
|
|
1708
|
+
describe('Ctrl+E keyboard shortcut', () => {
|
|
1709
|
+
it('should move cursor to end of current line in multiline input', async () => {
|
|
1710
|
+
props.buffer.text = 'line 1\nline 2\nline 3';
|
|
1711
|
+
props.buffer.cursor = [1, 2];
|
|
1712
|
+
props.buffer.lines = ['line 1', 'line 2', 'line 3'];
|
|
1713
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1714
|
+
await act(async () => {
|
|
1715
|
+
stdin.write('\x05'); // Ctrl+E
|
|
1716
|
+
});
|
|
1717
|
+
await waitFor(() => {
|
|
1718
|
+
expect(props.buffer.move).toHaveBeenCalledWith('end');
|
|
1719
|
+
});
|
|
1720
|
+
expect(props.buffer.moveToOffset).not.toHaveBeenCalled();
|
|
1721
|
+
unmount();
|
|
1722
|
+
});
|
|
1723
|
+
it('should move cursor to end of current line for single line input', async () => {
|
|
1724
|
+
props.buffer.text = 'single line text';
|
|
1725
|
+
props.buffer.cursor = [0, 5];
|
|
1726
|
+
props.buffer.lines = ['single line text'];
|
|
1727
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1728
|
+
await act(async () => {
|
|
1729
|
+
stdin.write('\x05'); // Ctrl+E
|
|
1730
|
+
});
|
|
1731
|
+
await waitFor(() => {
|
|
1732
|
+
expect(props.buffer.move).toHaveBeenCalledWith('end');
|
|
1733
|
+
});
|
|
1734
|
+
expect(props.buffer.moveToOffset).not.toHaveBeenCalled();
|
|
1735
|
+
unmount();
|
|
1736
|
+
});
|
|
1737
|
+
});
|
|
1738
|
+
describe('command search (Ctrl+R when not in shell)', () => {
|
|
1739
|
+
it('enters command search on Ctrl+R and shows suggestions', async () => {
|
|
1740
|
+
props.shellModeActive = false;
|
|
1741
|
+
vi.mocked(useReverseSearchCompletion).mockImplementation((buffer, data, isActive) => ({
|
|
1742
|
+
...mockReverseSearchCompletion,
|
|
1743
|
+
suggestions: isActive
|
|
1744
|
+
? [
|
|
1745
|
+
{ label: 'git commit -m "msg"', value: 'git commit -m "msg"' },
|
|
1746
|
+
{ label: 'git push', value: 'git push' },
|
|
1747
|
+
]
|
|
1748
|
+
: [],
|
|
1749
|
+
showSuggestions: !!isActive,
|
|
1750
|
+
activeSuggestionIndex: isActive ? 0 : -1,
|
|
1751
|
+
}));
|
|
1752
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1753
|
+
await act(async () => {
|
|
1754
|
+
stdin.write('\x12'); // Ctrl+R
|
|
1755
|
+
});
|
|
1756
|
+
await waitFor(() => {
|
|
1757
|
+
const frame = stdout.lastFrame() ?? '';
|
|
1758
|
+
expect(frame).toContain('(r:)');
|
|
1759
|
+
expect(frame).toContain('git commit');
|
|
1760
|
+
expect(frame).toContain('git push');
|
|
1761
|
+
});
|
|
1762
|
+
unmount();
|
|
1763
|
+
});
|
|
1764
|
+
it('expands and collapses long suggestion via Right/Left arrows', async () => {
|
|
1765
|
+
props.shellModeActive = false;
|
|
1766
|
+
const longValue = 'l'.repeat(200);
|
|
1767
|
+
vi.mocked(useReverseSearchCompletion).mockReturnValue({
|
|
1768
|
+
...mockReverseSearchCompletion,
|
|
1769
|
+
suggestions: [{ label: longValue, value: longValue, matchedIndex: 0 }],
|
|
1770
|
+
showSuggestions: true,
|
|
1771
|
+
activeSuggestionIndex: 0,
|
|
1772
|
+
visibleStartIndex: 0,
|
|
1773
|
+
isLoadingSuggestions: false,
|
|
1774
|
+
});
|
|
1775
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1776
|
+
await act(async () => {
|
|
1777
|
+
stdin.write('\x12');
|
|
1778
|
+
});
|
|
1779
|
+
await waitFor(() => {
|
|
1780
|
+
expect(clean(stdout.lastFrame())).toContain('→');
|
|
1781
|
+
});
|
|
1782
|
+
await act(async () => {
|
|
1783
|
+
stdin.write('\u001B[C');
|
|
1784
|
+
});
|
|
1785
|
+
await waitFor(() => {
|
|
1786
|
+
expect(clean(stdout.lastFrame())).toContain('←');
|
|
1787
|
+
});
|
|
1788
|
+
expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-expanded-match');
|
|
1789
|
+
await act(async () => {
|
|
1790
|
+
stdin.write('\u001B[D');
|
|
1791
|
+
});
|
|
1792
|
+
await waitFor(() => {
|
|
1793
|
+
expect(clean(stdout.lastFrame())).toContain('→');
|
|
1794
|
+
});
|
|
1795
|
+
expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-collapsed-match');
|
|
1796
|
+
unmount();
|
|
1797
|
+
});
|
|
1798
|
+
it('renders match window and expanded view (snapshots)', async () => {
|
|
1799
|
+
props.shellModeActive = false;
|
|
1800
|
+
props.buffer.setText('commit');
|
|
1801
|
+
const label = 'git commit -m "feat: add search" in src/app';
|
|
1802
|
+
const matchedIndex = label.indexOf('commit');
|
|
1803
|
+
vi.mocked(useReverseSearchCompletion).mockReturnValue({
|
|
1804
|
+
...mockReverseSearchCompletion,
|
|
1805
|
+
suggestions: [{ label, value: label, matchedIndex }],
|
|
1806
|
+
showSuggestions: true,
|
|
1807
|
+
activeSuggestionIndex: 0,
|
|
1808
|
+
visibleStartIndex: 0,
|
|
1809
|
+
isLoadingSuggestions: false,
|
|
1810
|
+
});
|
|
1811
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1812
|
+
await act(async () => {
|
|
1813
|
+
stdin.write('\x12');
|
|
1814
|
+
});
|
|
1815
|
+
await waitFor(() => {
|
|
1816
|
+
expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-collapsed-match');
|
|
1817
|
+
});
|
|
1818
|
+
await act(async () => {
|
|
1819
|
+
stdin.write('\u001B[C');
|
|
1820
|
+
});
|
|
1821
|
+
await waitFor(() => {
|
|
1822
|
+
expect(stdout.lastFrame()).toMatchSnapshot('command-search-render-expanded-match');
|
|
1823
|
+
});
|
|
1824
|
+
unmount();
|
|
1825
|
+
});
|
|
1826
|
+
it('does not show expand/collapse indicator for short suggestions', async () => {
|
|
1827
|
+
props.shellModeActive = false;
|
|
1828
|
+
const shortValue = 'echo hello';
|
|
1829
|
+
vi.mocked(useReverseSearchCompletion).mockReturnValue({
|
|
1830
|
+
...mockReverseSearchCompletion,
|
|
1831
|
+
suggestions: [{ label: shortValue, value: shortValue }],
|
|
1832
|
+
showSuggestions: true,
|
|
1833
|
+
activeSuggestionIndex: 0,
|
|
1834
|
+
visibleStartIndex: 0,
|
|
1835
|
+
isLoadingSuggestions: false,
|
|
1836
|
+
});
|
|
1837
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1838
|
+
await act(async () => {
|
|
1839
|
+
stdin.write('\x12');
|
|
1840
|
+
});
|
|
1841
|
+
await waitFor(() => {
|
|
1842
|
+
const frame = clean(stdout.lastFrame());
|
|
1843
|
+
// Ensure it rendered the search mode
|
|
1844
|
+
expect(frame).toContain('(r:)');
|
|
1845
|
+
expect(frame).not.toContain('→');
|
|
1846
|
+
expect(frame).not.toContain('←');
|
|
1847
|
+
});
|
|
1848
|
+
unmount();
|
|
1849
|
+
});
|
|
1850
|
+
});
|
|
1851
|
+
describe('mouse interaction', () => {
|
|
1852
|
+
it.each([
|
|
1853
|
+
{
|
|
1854
|
+
name: 'first line, first char',
|
|
1855
|
+
relX: 0,
|
|
1856
|
+
relY: 0,
|
|
1857
|
+
mouseCol: 5,
|
|
1858
|
+
mouseRow: 2,
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
name: 'first line, middle char',
|
|
1862
|
+
relX: 6,
|
|
1863
|
+
relY: 0,
|
|
1864
|
+
mouseCol: 11,
|
|
1865
|
+
mouseRow: 2,
|
|
1866
|
+
},
|
|
1867
|
+
{
|
|
1868
|
+
name: 'second line, first char',
|
|
1869
|
+
relX: 0,
|
|
1870
|
+
relY: 1,
|
|
1871
|
+
mouseCol: 5,
|
|
1872
|
+
mouseRow: 3,
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
name: 'second line, end char',
|
|
1876
|
+
relX: 5,
|
|
1877
|
+
relY: 1,
|
|
1878
|
+
mouseCol: 10,
|
|
1879
|
+
mouseRow: 3,
|
|
1880
|
+
},
|
|
1881
|
+
])('should move cursor on mouse click - $name', async ({ relX, relY, mouseCol, mouseRow }) => {
|
|
1882
|
+
props.buffer.text = 'hello world\nsecond line';
|
|
1883
|
+
props.buffer.lines = ['hello world', 'second line'];
|
|
1884
|
+
props.buffer.viewportVisualLines = ['hello world', 'second line'];
|
|
1885
|
+
props.buffer.visualToLogicalMap = [
|
|
1886
|
+
[0, 0],
|
|
1887
|
+
[1, 0],
|
|
1888
|
+
];
|
|
1889
|
+
props.buffer.visualCursor = [0, 11];
|
|
1890
|
+
props.buffer.visualScrollRow = 0;
|
|
1891
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
|
|
1892
|
+
// Wait for initial render
|
|
1893
|
+
await waitFor(() => {
|
|
1894
|
+
expect(stdout.lastFrame()).toContain('hello world');
|
|
1895
|
+
});
|
|
1896
|
+
// Simulate left mouse press at calculated coordinates.
|
|
1897
|
+
// Assumes inner box is at x=4, y=1 based on border(1)+padding(1)+prompt(2) and border-top(1).
|
|
1898
|
+
await act(async () => {
|
|
1899
|
+
stdin.write(`\x1b[<0;${mouseCol};${mouseRow}M`);
|
|
1900
|
+
});
|
|
1901
|
+
await waitFor(() => {
|
|
1902
|
+
expect(props.buffer.moveToVisualPosition).toHaveBeenCalledWith(relY, relX);
|
|
1903
|
+
});
|
|
1904
|
+
unmount();
|
|
1905
|
+
});
|
|
1906
|
+
it('should unfocus embedded shell on click', async () => {
|
|
1907
|
+
props.buffer.text = 'hello';
|
|
1908
|
+
props.buffer.lines = ['hello'];
|
|
1909
|
+
props.buffer.viewportVisualLines = ['hello'];
|
|
1910
|
+
props.buffer.visualToLogicalMap = [[0, 0]];
|
|
1911
|
+
props.isEmbeddedShellFocused = true;
|
|
1912
|
+
const { stdin, stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), { mouseEventsEnabled: true, uiActions });
|
|
1913
|
+
await waitFor(() => {
|
|
1914
|
+
expect(stdout.lastFrame()).toContain('hello');
|
|
1915
|
+
});
|
|
1916
|
+
await act(async () => {
|
|
1917
|
+
// Click somewhere in the prompt
|
|
1918
|
+
stdin.write(`\x1b[<0;5;2M`);
|
|
1919
|
+
});
|
|
1920
|
+
await waitFor(() => {
|
|
1921
|
+
expect(mockSetEmbeddedShellFocused).toHaveBeenCalledWith(false);
|
|
1922
|
+
});
|
|
1923
|
+
unmount();
|
|
1924
|
+
});
|
|
1925
|
+
});
|
|
1926
|
+
describe('queued message editing', () => {
|
|
1927
|
+
it('should load all queued messages when up arrow is pressed with empty input', async () => {
|
|
1928
|
+
const mockPopAllMessages = vi.fn();
|
|
1929
|
+
mockPopAllMessages.mockReturnValue('Message 1\n\nMessage 2\n\nMessage 3');
|
|
1930
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1931
|
+
props.buffer.text = '';
|
|
1932
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1933
|
+
await act(async () => {
|
|
1934
|
+
stdin.write('\u001B[A');
|
|
1935
|
+
});
|
|
1936
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
1937
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('Message 1\n\nMessage 2\n\nMessage 3');
|
|
1938
|
+
unmount();
|
|
1939
|
+
});
|
|
1940
|
+
it('should not load queued messages when input is not empty', async () => {
|
|
1941
|
+
const mockPopAllMessages = vi.fn();
|
|
1942
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1943
|
+
props.buffer.text = 'some text';
|
|
1944
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1945
|
+
await act(async () => {
|
|
1946
|
+
stdin.write('\u001B[A');
|
|
1947
|
+
});
|
|
1948
|
+
await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
|
|
1949
|
+
expect(mockPopAllMessages).not.toHaveBeenCalled();
|
|
1950
|
+
unmount();
|
|
1951
|
+
});
|
|
1952
|
+
it('should handle undefined messages from popAllMessages', async () => {
|
|
1953
|
+
const mockPopAllMessages = vi.fn();
|
|
1954
|
+
mockPopAllMessages.mockReturnValue(undefined);
|
|
1955
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1956
|
+
props.buffer.text = '';
|
|
1957
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1958
|
+
await act(async () => {
|
|
1959
|
+
stdin.write('\u001B[A');
|
|
1960
|
+
});
|
|
1961
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
1962
|
+
expect(props.buffer.setText).not.toHaveBeenCalled();
|
|
1963
|
+
expect(mockInputHistory.navigateUp).toHaveBeenCalled();
|
|
1964
|
+
unmount();
|
|
1965
|
+
});
|
|
1966
|
+
it('should work with NAVIGATION_UP key as well', async () => {
|
|
1967
|
+
const mockPopAllMessages = vi.fn();
|
|
1968
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1969
|
+
props.buffer.text = '';
|
|
1970
|
+
props.buffer.allVisualLines = [''];
|
|
1971
|
+
props.buffer.visualCursor = [0, 0];
|
|
1972
|
+
props.buffer.visualScrollRow = 0;
|
|
1973
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1974
|
+
await act(async () => {
|
|
1975
|
+
stdin.write('\u001B[A');
|
|
1976
|
+
});
|
|
1977
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
1978
|
+
unmount();
|
|
1979
|
+
});
|
|
1980
|
+
it('should handle single queued message', async () => {
|
|
1981
|
+
const mockPopAllMessages = vi.fn();
|
|
1982
|
+
mockPopAllMessages.mockReturnValue('Single message');
|
|
1983
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1984
|
+
props.buffer.text = '';
|
|
1985
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1986
|
+
await act(async () => {
|
|
1987
|
+
stdin.write('\u001B[A');
|
|
1988
|
+
});
|
|
1989
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
1990
|
+
expect(props.buffer.setText).toHaveBeenCalledWith('Single message');
|
|
1991
|
+
unmount();
|
|
1992
|
+
});
|
|
1993
|
+
it('should only check for queued messages when buffer text is trimmed empty', async () => {
|
|
1994
|
+
const mockPopAllMessages = vi.fn();
|
|
1995
|
+
props.popAllMessages = mockPopAllMessages;
|
|
1996
|
+
props.buffer.text = ' '; // Whitespace only
|
|
1997
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
1998
|
+
await act(async () => {
|
|
1999
|
+
stdin.write('\u001B[A');
|
|
2000
|
+
});
|
|
2001
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
2002
|
+
unmount();
|
|
2003
|
+
});
|
|
2004
|
+
it('should not call popAllMessages if it is not provided', async () => {
|
|
2005
|
+
props.popAllMessages = undefined;
|
|
2006
|
+
props.buffer.text = '';
|
|
2007
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2008
|
+
await act(async () => {
|
|
2009
|
+
stdin.write('\u001B[A');
|
|
2010
|
+
});
|
|
2011
|
+
await waitFor(() => expect(mockInputHistory.navigateUp).toHaveBeenCalled());
|
|
2012
|
+
unmount();
|
|
2013
|
+
});
|
|
2014
|
+
it('should navigate input history on fresh start when no queued messages exist', async () => {
|
|
2015
|
+
const mockPopAllMessages = vi.fn();
|
|
2016
|
+
mockPopAllMessages.mockReturnValue(undefined);
|
|
2017
|
+
props.popAllMessages = mockPopAllMessages;
|
|
2018
|
+
props.buffer.text = '';
|
|
2019
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2020
|
+
await act(async () => {
|
|
2021
|
+
stdin.write('\u001B[A');
|
|
2022
|
+
});
|
|
2023
|
+
await waitFor(() => expect(mockPopAllMessages).toHaveBeenCalled());
|
|
2024
|
+
expect(mockInputHistory.navigateUp).toHaveBeenCalled();
|
|
2025
|
+
expect(props.buffer.setText).not.toHaveBeenCalled();
|
|
2026
|
+
unmount();
|
|
2027
|
+
});
|
|
2028
|
+
});
|
|
2029
|
+
describe('snapshots', () => {
|
|
2030
|
+
it('should render correctly in shell mode', async () => {
|
|
2031
|
+
props.shellModeActive = true;
|
|
2032
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2033
|
+
await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
|
|
2034
|
+
unmount();
|
|
2035
|
+
});
|
|
2036
|
+
it('should render correctly when accepting edits', async () => {
|
|
2037
|
+
props.approvalMode = ApprovalMode.AUTO_EDIT;
|
|
2038
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2039
|
+
await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
|
|
2040
|
+
unmount();
|
|
2041
|
+
});
|
|
2042
|
+
it('should render correctly in yolo mode', async () => {
|
|
2043
|
+
props.approvalMode = ApprovalMode.YOLO;
|
|
2044
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2045
|
+
await waitFor(() => expect(stdout.lastFrame()).toMatchSnapshot());
|
|
2046
|
+
unmount();
|
|
2047
|
+
});
|
|
2048
|
+
it('should not show inverted cursor when shell is focused', async () => {
|
|
2049
|
+
props.isEmbeddedShellFocused = true;
|
|
2050
|
+
props.focus = false;
|
|
2051
|
+
const { stdout, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2052
|
+
await waitFor(() => {
|
|
2053
|
+
expect(stdout.lastFrame()).not.toContain(`{chalk.inverse(' ')}`);
|
|
2054
|
+
expect(stdout.lastFrame()).toMatchSnapshot();
|
|
2055
|
+
});
|
|
2056
|
+
unmount();
|
|
2057
|
+
});
|
|
2058
|
+
});
|
|
2059
|
+
it('should still allow input when shell is not focused', async () => {
|
|
2060
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }), {
|
|
2061
|
+
shellFocus: false,
|
|
2062
|
+
});
|
|
2063
|
+
await act(async () => {
|
|
2064
|
+
stdin.write('a');
|
|
2065
|
+
});
|
|
2066
|
+
await waitFor(() => expect(mockBuffer.handleInput).toHaveBeenCalled());
|
|
2067
|
+
unmount();
|
|
2068
|
+
});
|
|
2069
|
+
describe('command queuing while streaming', () => {
|
|
2070
|
+
beforeEach(() => {
|
|
2071
|
+
props.streamingState = StreamingState.Responding;
|
|
2072
|
+
props.setQueueErrorMessage = vi.fn();
|
|
2073
|
+
props.onSubmit = vi.fn();
|
|
2074
|
+
});
|
|
2075
|
+
it.each([
|
|
2076
|
+
{
|
|
2077
|
+
name: 'should prevent slash commands',
|
|
2078
|
+
bufferText: '/help',
|
|
2079
|
+
shellMode: false,
|
|
2080
|
+
shouldSubmit: false,
|
|
2081
|
+
errorMessage: 'Slash commands cannot be queued',
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
name: 'should prevent shell commands',
|
|
2085
|
+
bufferText: 'ls',
|
|
2086
|
+
shellMode: true,
|
|
2087
|
+
shouldSubmit: false,
|
|
2088
|
+
errorMessage: 'Shell commands cannot be queued',
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
name: 'should allow regular messages',
|
|
2092
|
+
bufferText: 'regular message',
|
|
2093
|
+
shellMode: false,
|
|
2094
|
+
shouldSubmit: true,
|
|
2095
|
+
errorMessage: null,
|
|
2096
|
+
},
|
|
2097
|
+
])('$name', async ({ bufferText, shellMode, shouldSubmit, errorMessage }) => {
|
|
2098
|
+
props.buffer.text = bufferText;
|
|
2099
|
+
props.shellModeActive = shellMode;
|
|
2100
|
+
const { stdin, unmount } = renderWithProviders(_jsx(InputPrompt, { ...props }));
|
|
2101
|
+
await act(async () => {
|
|
2102
|
+
stdin.write('\r');
|
|
2103
|
+
});
|
|
2104
|
+
await waitFor(() => {
|
|
2105
|
+
if (shouldSubmit) {
|
|
2106
|
+
expect(props.onSubmit).toHaveBeenCalledWith(bufferText);
|
|
2107
|
+
expect(props.setQueueErrorMessage).not.toHaveBeenCalled();
|
|
2108
|
+
}
|
|
2109
|
+
else {
|
|
2110
|
+
expect(props.onSubmit).not.toHaveBeenCalled();
|
|
2111
|
+
expect(props.setQueueErrorMessage).toHaveBeenCalledWith(errorMessage);
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
2114
|
+
unmount();
|
|
2115
|
+
});
|
|
2116
|
+
});
|
|
2117
|
+
});
|
|
2118
|
+
function clean(str) {
|
|
2119
|
+
if (!str)
|
|
2120
|
+
return '';
|
|
2121
|
+
// Remove ANSI escape codes and trim whitespace
|
|
2122
|
+
return stripAnsi(str).trim();
|
|
2123
|
+
}
|
|
2124
|
+
//# sourceMappingURL=InputPrompt.test.js.map
|