@hibanacloud/cli 0.3.15
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 +29 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +115 -0
- package/dist/src/commands/extensions/disable.d.ts +13 -0
- package/dist/src/commands/extensions/disable.js +56 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +13 -0
- package/dist/src/commands/extensions/enable.js +59 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-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/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +14 -0
- package/dist/src/commands/extensions/install.js +78 -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 +102 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +37 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +32 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +90 -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 +59 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +38 -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 +18 -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 +104 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +33 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +171 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +111 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +44 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +23 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +28 -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 +37 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +58 -0
- package/dist/src/config/config.js +678 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +83 -0
- package/dist/src/config/extension.js +534 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +189 -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 +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +30 -0
- package/dist/src/config/extensions/github.js +322 -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 +334 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +113 -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 +342 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +36 -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 +17 -0
- package/dist/src/config/extensions/variables.js +40 -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 +17 -0
- package/dist/src/config/extensions/variables.test.js.map +1 -0
- package/dist/src/config/keyBindings.d.ts +70 -0
- package/dist/src/config/keyBindings.js +130 -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 +51 -0
- package/dist/src/config/keyBindings.test.js.map +1 -0
- package/dist/src/config/migration.d.ts +10 -0
- package/dist/src/config/migration.js +45 -0
- package/dist/src/config/migration.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +73 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +72 -0
- package/dist/src/config/settings.js +631 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +1174 -0
- package/dist/src/config/settingsSchema.js +1118 -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 +201 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +56 -0
- package/dist/src/config/trustedFolders.js +168 -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/config/webSearch.d.ts +35 -0
- package/dist/src/config/webSearch.js +87 -0
- package/dist/src/config/webSearch.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +34 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +48 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +23 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +14 -0
- package/dist/src/gemini.js +327 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +507 -0
- package/dist/src/gemini.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/i18n/index.d.ts +18 -0
- package/dist/src/i18n/index.js +184 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/locales/en.js +1129 -0
- package/dist/src/i18n/locales/zh.js +1052 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
- package/dist/src/nonInteractive/control/ControlContext.js +31 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js +549 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
- package/dist/src/nonInteractive/control/ControlService.js +154 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +102 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js +42 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +446 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1197 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js +56 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +624 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +69 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +808 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +23 -0
- package/dist/src/nonInteractive/session.js +549 -0
- package/dist/src/nonInteractive/session.js.map +1 -0
- package/dist/src/nonInteractive/session.test.d.ts +6 -0
- package/dist/src/nonInteractive/session.test.js +407 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +344 -0
- package/dist/src/nonInteractive/types.js +78 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +28 -0
- package/dist/src/nonInteractiveCli.js +268 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.d.ts +35 -0
- package/dist/src/nonInteractiveCliCommands.js +144 -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/patches/punycode-shim.d.ts +6 -0
- package/dist/src/patches/punycode-shim.js +20 -0
- package/dist/src/patches/punycode-shim.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +99 -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 +167 -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 +90 -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 +233 -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/McpPromptLoader.d.ts +35 -0
- package/dist/src/services/McpPromptLoader.js +254 -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 +341 -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/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +62 -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/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/createExtension.d.ts +15 -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 +93 -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 +12 -0
- package/dist/src/test-utils/render.js +14 -0
- package/dist/src/test-utils/render.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.js +37 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/AppContainer.d.ts +17 -0
- package/dist/src/ui/AppContainer.js +1074 -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 +831 -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/auth/AuthDialog.d.ts +7 -0
- package/dist/src/ui/auth/AuthDialog.js +63 -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 +391 -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 +24 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/OAuthFlow.d.ts +14 -0
- package/dist/src/ui/auth/OAuthFlow.js +48 -0
- package/dist/src/ui/auth/OAuthFlow.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +27 -0
- package/dist/src/ui/auth/useAuth.js +244 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +54 -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 +25 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +39 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.d.ts +7 -0
- package/dist/src/ui/commands/approvalModeCommand.js +19 -0
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js +49 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +19 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +51 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +9 -0
- package/dist/src/ui/commands/chatCommand.js +351 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +30 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +71 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +62 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +16 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.d.ts +8 -0
- package/dist/src/ui/commands/directoryCommand.js +153 -0
- package/dist/src/ui/commands/directoryCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +39 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +19 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/extensionsCommand.js +115 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +24 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.d.ts +7 -0
- package/dist/src/ui/commands/ideCommand.js +241 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/initCommand.d.ts +7 -0
- package/dist/src/ui/commands/initCommand.js +118 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/languageCommand.d.ts +7 -0
- package/dist/src/ui/commands/languageCommand.js +386 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +269 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +254 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.d.ts +7 -0
- package/dist/src/ui/commands/modelCommand.js +48 -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 +137 -0
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
- package/dist/src/ui/commands/openaiProfileCommand.d.ts +7 -0
- package/dist/src/ui/commands/openaiProfileCommand.js +135 -0
- package/dist/src/ui/commands/openaiProfileCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +19 -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 +30 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +8 -0
- package/dist/src/ui/commands/quitCommand.js +64 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +124 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +19 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.d.ts +9 -0
- package/dist/src/ui/commands/setupGithubCommand.js +157 -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 +167 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
- package/dist/src/ui/commands/spCommand.d.ts +7 -0
- package/dist/src/ui/commands/spCommand.js +352 -0
- package/dist/src/ui/commands/spCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +61 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/summaryCommand.d.ts +7 -0
- package/dist/src/ui/commands/summaryCommand.js +156 -0
- package/dist/src/ui/commands/summaryCommand.js.map +1 -0
- package/dist/src/ui/commands/systemPromptCommand.d.ts +7 -0
- package/dist/src/ui/commands/systemPromptCommand.js +322 -0
- package/dist/src/ui/commands/systemPromptCommand.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +47 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +19 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +45 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +160 -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 +26 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +10 -0
- package/dist/src/ui/components/AboutBox.js +10 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.d.ts +13 -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 +97 -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 +19 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +8 -0
- package/dist/src/ui/components/AsciiArt.js +30 -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 +32 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +55 -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 +337 -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 +42 -0
- package/dist/src/ui/components/ConfigInitDisplay.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 +67 -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/ContextSummaryDisplay.d.ts +20 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +90 -0
- package/dist/src/ui/components/ContextSummaryDisplay.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/DebugProfiler.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.js +27 -0
- package/dist/src/ui/components/DebugProfiler.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +158 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +16 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +85 -0
- package/dist/src/ui/components/EditorSettingsDialog.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/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +58 -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 +88 -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 +48 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +21 -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/Header.d.ts +13 -0
- package/dist/src/ui/components/Header.js +28 -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 +37 -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 +23 -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 +57 -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 +183 -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 +32 -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 +37 -0
- package/dist/src/ui/components/InputPrompt.js +583 -0
- package/dist/src/ui/components/InputPrompt.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 +194 -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 +28 -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 +28 -0
- package/dist/src/ui/components/MainContent.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/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +99 -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 +158 -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 +34 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.d.ts +15 -0
- package/dist/src/ui/components/ModelSwitchDialog.js +40 -0
- package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js +128 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js.map +1 -0
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +23 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +25 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js +90 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +51 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +13 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +48 -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 +154 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PlanSummaryDisplay.d.ts +14 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js +9 -0
- package/dist/src/ui/components/PlanSummaryDisplay.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 +71 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.d.ts +13 -0
- package/dist/src/ui/components/ProQuotaDialog.js +24 -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 +58 -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 +56 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuitConfirmationDialog.d.ts +17 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js +49 -0
- package/dist/src/ui/components/QuitConfirmationDialog.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/QwenOAuthProgress.d.ts +16 -0
- package/dist/src/ui/components/QwenOAuthProgress.js +111 -0
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +6 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js +364 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +5 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
- package/dist/src/ui/components/SettingsDialog.js +647 -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 +1037 -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 +50 -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/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/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/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +44 -0
- package/dist/src/ui/components/StatsDisplay.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/ThemeDialog.d.ts +20 -0
- package/dist/src/ui/components/ThemeDialog.js +126 -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 +75 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +10 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.d.ts +16 -0
- package/dist/src/ui/components/TodoDisplay.js +27 -0
- package/dist/src/ui/components/TodoDisplay.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/TodoDisplay.test.js +77 -0
- package/dist/src/ui/components/TodoDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +42 -0
- package/dist/src/ui/components/ToolStatsDisplay.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/WelcomeBackDialog.d.ts +13 -0
- package/dist/src/ui/components/WelcomeBackDialog.js +43 -0
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +45 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +50 -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 +160 -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 +218 -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 +239 -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/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +11 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +14 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/SummaryMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/SummaryMessage.js +35 -0
- package/dist/src/ui/components/messages/SummaryMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +245 -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 +165 -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 +58 -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 +261 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolMessage.js +180 -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 +182 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -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/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/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 +376 -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 +154 -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 +16 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.d.ts +16 -0
- package/dist/src/ui/components/shared/TextInput.js +127 -0
- package/dist/src/ui/components/shared/TextInput.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +490 -0
- package/dist/src/ui/components/shared/text-buffer.js +1598 -0
- package/dist/src/ui/components/shared/text-buffer.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/subagents/constants.d.ts +23 -0
- package/dist/src/ui/components/subagents/constants.js +67 -0
- package/dist/src/ui/components/subagents/constants.js.map +1 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +186 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js +43 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js +174 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +107 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +26 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +28 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +16 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js +145 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/index.d.ts +8 -0
- package/dist/src/ui/components/subagents/index.js +12 -0
- package/dist/src/ui/components/subagents/index.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +71 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +36 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +73 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +12 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +231 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +11 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +20 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +212 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/subagents/reducers.d.ts +14 -0
- package/dist/src/ui/components/subagents/reducers.js +162 -0
- package/dist/src/ui/components/subagents/reducers.js.map +1 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +20 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +193 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -0
- package/dist/src/ui/components/subagents/types.d.ts +137 -0
- package/dist/src/ui/components/subagents/types.js +15 -0
- package/dist/src/ui/components/subagents/types.js.map +1 -0
- package/dist/src/ui/components/subagents/utils.d.ts +15 -0
- package/dist/src/ui/components/subagents/utils.js +79 -0
- package/dist/src/ui/components/subagents/utils.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +47 -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 +97 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +90 -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 +117 -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 +8 -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.d.ts +18 -0
- package/dist/src/ui/constants.js +23 -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/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 +35 -0
- package/dist/src/ui/contexts/KeypressContext.js +636 -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 +1180 -0
- package/dist/src/ui/contexts/KeypressContext.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/SessionContext.d.ts +45 -0
- package/dist/src/ui/contexts/SessionContext.js +157 -0
- package/dist/src/ui/contexts/SessionContext.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 +46 -0
- package/dist/src/ui/contexts/UIActionsContext.js +22 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +117 -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/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +48 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +364 -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 +836 -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 +18 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +284 -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 +508 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +52 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +503 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +179 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.d.ts +14 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +13 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +40 -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 +306 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +29 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +164 -0
- package/dist/src/ui/hooks/useCommandCompletion.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 +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +76 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useDialogClose.d.ts +35 -0
- package/dist/src/ui/hooks/useDialogClose.js +53 -0
- package/dist/src/ui/hooks/useDialogClose.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -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 +164 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +116 -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 +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.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/useFolderTrust.d.ts +13 -0
- package/dist/src/ui/hooks/useFolderTrust.js +60 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +39 -0
- package/dist/src/ui/hooks/useGeminiStream.js +781 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -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 +189 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -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 +171 -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 +65 -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 +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
- package/dist/src/ui/hooks/useInitializationAuthError.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 +207 -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 +81 -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 +234 -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/useKittyKeyboardProtocol.d.ts +15 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
- package/dist/src/ui/hooks/useLaunchEditor.d.ts +10 -0
- package/dist/src/ui/hooks/useLaunchEditor.js +70 -0
- package/dist/src/ui/hooks/useLaunchEditor.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 +91 -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 +57 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +23 -0
- package/dist/src/ui/hooks/useMessageQueue.js +51 -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 +167 -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 +35 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +78 -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 +182 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +192 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/useQuitConfirmation.d.ts +14 -0
- package/dist/src/ui/hooks/useQuitConfirmation.js +36 -0
- package/dist/src/ui/hooks/useQuitConfirmation.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +21 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +122 -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 +269 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.d.ts +15 -0
- package/dist/src/ui/hooks/useQwenAuth.js +74 -0
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js +266 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +34 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +192 -0
- package/dist/src/ui/hooks/useReactToolScheduler.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 +163 -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 +245 -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 +701 -0
- package/dist/src/ui/hooks/useSelectionList.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 +111 -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 +187 -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 +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +20 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +349 -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 +597 -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/useSubagentCreateDialog.d.ts +10 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js +21 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +73 -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 +90 -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 +623 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.d.ts +47 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js +262 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.d.ts +6 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js +515 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js.map +1 -0
- package/dist/src/ui/hooks/useWelcomeBack.d.ts +23 -0
- package/dist/src/ui/hooks/useWelcomeBack.js +79 -0
- package/dist/src/ui/hooks/useWelcomeBack.js.map +1 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js +54 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +639 -0
- package/dist/src/ui/hooks/vim.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 +293 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -0
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +9 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -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 +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +49 -0
- package/dist/src/ui/models/availableModels.js +130 -0
- package/dist/src/ui/models/availableModels.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/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 +42 -0
- package/dist/src/ui/state/extensions.js +62 -0
- package/dist/src/ui/state/extensions.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 +142 -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 +152 -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 +138 -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 +130 -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 +104 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +221 -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 +197 -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 +115 -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 +138 -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 +140 -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 +137 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/hibana-dark.d.ts +7 -0
- package/dist/src/ui/themes/hibana-dark.js +105 -0
- package/dist/src/ui/themes/hibana-dark.js.map +1 -0
- package/dist/src/ui/themes/hibana-light.d.ts +7 -0
- package/dist/src/ui/themes/hibana-light.js +131 -0
- package/dist/src/ui/themes/hibana-light.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +115 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/qwen-dark.d.ts +7 -0
- package/dist/src/ui/themes/qwen-dark.js +105 -0
- package/dist/src/ui/themes/qwen-dark.js.map +1 -0
- package/dist/src/ui/themes/qwen-light.d.ts +7 -0
- package/dist/src/ui/themes/qwen-light.js +131 -0
- package/dist/src/ui/themes/qwen-light.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +37 -0
- package/dist/src/ui/themes/semantic-tokens.js +94 -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 +304 -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 +270 -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 +142 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +130 -0
- package/dist/src/ui/themes/theme.js +379 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +145 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +311 -0
- package/dist/src/ui/types.js +60 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +17 -0
- package/dist/src/ui/utils/CodeColorizer.js +111 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +25 -0
- package/dist/src/ui/utils/ConsolePatcher.js +52 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +111 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +207 -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 +169 -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/clipboardUtils.d.ts +22 -0
- package/dist/src/ui/utils/clipboardUtils.js +126 -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 +65 -0
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +40 -0
- package/dist/src/ui/utils/commandUtils.js +146 -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 +352 -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 +57 -0
- package/dist/src/ui/utils/computeStats.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 +78 -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/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 +13 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +98 -0
- package/dist/src/ui/utils/kittyProtocolDetector.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/platformConstants.d.ts +75 -0
- package/dist/src/ui/utils/platformConstants.js +78 -0
- package/dist/src/ui/utils/platformConstants.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +30 -0
- package/dist/src/ui/utils/terminalSetup.js +308 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +42 -0
- package/dist/src/ui/utils/textUtils.js +185 -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 +132 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +12 -0
- package/dist/src/ui/utils/updateCheck.js +78 -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 +145 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
- package/dist/src/utils/attentionNotification.d.ts +20 -0
- package/dist/src/utils/attentionNotification.js +34 -0
- package/dist/src/utils/attentionNotification.js.map +1 -0
- package/dist/src/utils/attentionNotification.test.d.ts +6 -0
- package/dist/src/utils/attentionNotification.test.js +46 -0
- package/dist/src/utils/attentionNotification.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/cleanup.d.ts +8 -0
- package/dist/src/utils/cleanup.js +35 -0
- package/dist/src/utils/cleanup.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 +55 -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 +146 -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 +58 -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 +143 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +28 -0
- package/dist/src/utils/dialogScopeUtils.js +51 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +97 -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 +35 -0
- package/dist/src/utils/errors.js +106 -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 +340 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +12 -0
- package/dist/src/utils/events.js +14 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +30 -0
- package/dist/src/utils/gitUtils.js +89 -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 +102 -0
- package/dist/src/utils/handleAutoUpdate.js.map +1 -0
- package/dist/src/utils/installationInfo.d.ts +23 -0
- package/dist/src/utils/installationInfo.js +153 -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 +242 -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/nonInteractiveHelpers.d.ts +88 -0
- package/dist/src/utils/nonInteractiveHelpers.js +470 -0
- package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js +945 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.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 +59 -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 +88 -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/sandbox-macos-permissive-closed.sb +32 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +25 -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 +763 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +144 -0
- package/dist/src/utils/settingsUtils.js +346 -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/systemInfo.d.ts +66 -0
- package/dist/src/utils/systemInfo.js +125 -0
- package/dist/src/utils/systemInfo.js.map +1 -0
- package/dist/src/utils/systemInfo.test.d.ts +6 -0
- package/dist/src/utils/systemInfo.test.js +259 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +22 -0
- package/dist/src/utils/systemInfoFields.js +96 -0
- package/dist/src/utils/systemInfoFields.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/userStartupWarnings.d.ts +12 -0
- package/dist/src/utils/userStartupWarnings.js +74 -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 +88 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.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 +73 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/src/zed-integration/acp.d.ts +63 -0
- package/dist/src/zed-integration/acp.js +225 -0
- package/dist/src/zed-integration/acp.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.d.ts +20 -0
- package/dist/src/zed-integration/fileSystemService.js +46 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +12024 -0
- package/dist/src/zed-integration/schema.js +324 -0
- package/dist/src/zed-integration/schema.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.d.ts +17 -0
- package/dist/src/zed-integration/zedIntegration.js +1135 -0
- package/dist/src/zed-integration/zedIntegration.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,1180 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { renderHook, act, waitFor } from '@testing-library/react';
|
|
3
|
+
import { vi } from 'vitest';
|
|
4
|
+
import { KeypressProvider, useKeypressContext, DRAG_COMPLETION_TIMEOUT_MS,
|
|
5
|
+
// CSI_END_O,
|
|
6
|
+
// SS3_END,
|
|
7
|
+
SINGLE_QUOTE, DOUBLE_QUOTE, } from './KeypressContext.js';
|
|
8
|
+
import { useStdin } from 'ink';
|
|
9
|
+
import { EventEmitter } from 'node:events';
|
|
10
|
+
// Mock the 'ink' module to control stdin
|
|
11
|
+
vi.mock('ink', async (importOriginal) => {
|
|
12
|
+
const original = await importOriginal();
|
|
13
|
+
return {
|
|
14
|
+
...original,
|
|
15
|
+
useStdin: vi.fn(),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
class MockStdin extends EventEmitter {
|
|
19
|
+
isTTY = true;
|
|
20
|
+
setRawMode = vi.fn();
|
|
21
|
+
on = this.addListener;
|
|
22
|
+
removeListener = super.removeListener;
|
|
23
|
+
write = vi.fn();
|
|
24
|
+
resume = vi.fn();
|
|
25
|
+
pause = vi.fn();
|
|
26
|
+
// Helper to simulate a keypress event
|
|
27
|
+
pressKey(key) {
|
|
28
|
+
this.emit('keypress', null, key);
|
|
29
|
+
}
|
|
30
|
+
// Helper to simulate a kitty protocol sequence
|
|
31
|
+
sendKittySequence(sequence) {
|
|
32
|
+
this.emit('data', Buffer.from(sequence));
|
|
33
|
+
}
|
|
34
|
+
// Helper to simulate a paste event
|
|
35
|
+
sendPaste(text) {
|
|
36
|
+
const PASTE_MODE_PREFIX = `\x1b[200~`;
|
|
37
|
+
const PASTE_MODE_SUFFIX = `\x1b[201~`;
|
|
38
|
+
this.emit('data', Buffer.from(PASTE_MODE_PREFIX));
|
|
39
|
+
this.emit('data', Buffer.from(text));
|
|
40
|
+
this.emit('data', Buffer.from(PASTE_MODE_SUFFIX));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
describe('KeypressContext - Kitty Protocol', () => {
|
|
44
|
+
let stdin;
|
|
45
|
+
const mockSetRawMode = vi.fn();
|
|
46
|
+
const wrapper = ({ children, kittyProtocolEnabled = true, pasteWorkaround = false, }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: kittyProtocolEnabled, pasteWorkaround: pasteWorkaround, children: children }));
|
|
47
|
+
beforeEach(() => {
|
|
48
|
+
vi.clearAllMocks();
|
|
49
|
+
stdin = new MockStdin();
|
|
50
|
+
useStdin.mockReturnValue({
|
|
51
|
+
stdin,
|
|
52
|
+
setRawMode: mockSetRawMode,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe('Enter key handling', () => {
|
|
56
|
+
it('should recognize regular enter key (keycode 13) in kitty protocol', async () => {
|
|
57
|
+
const keyHandler = vi.fn();
|
|
58
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
59
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
60
|
+
});
|
|
61
|
+
act(() => {
|
|
62
|
+
result.current.subscribe(keyHandler);
|
|
63
|
+
});
|
|
64
|
+
// Send kitty protocol sequence for regular enter: ESC[13u
|
|
65
|
+
act(() => {
|
|
66
|
+
stdin.sendKittySequence(`\x1b[13u`);
|
|
67
|
+
});
|
|
68
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
69
|
+
name: 'return',
|
|
70
|
+
kittyProtocol: true,
|
|
71
|
+
ctrl: false,
|
|
72
|
+
meta: false,
|
|
73
|
+
shift: false,
|
|
74
|
+
}));
|
|
75
|
+
});
|
|
76
|
+
it('should recognize numpad enter key (keycode 57414) in kitty protocol', async () => {
|
|
77
|
+
const keyHandler = vi.fn();
|
|
78
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
79
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
80
|
+
});
|
|
81
|
+
act(() => {
|
|
82
|
+
result.current.subscribe(keyHandler);
|
|
83
|
+
});
|
|
84
|
+
// Send kitty protocol sequence for numpad enter: ESC[57414u
|
|
85
|
+
act(() => {
|
|
86
|
+
stdin.sendKittySequence(`\x1b[57414u`);
|
|
87
|
+
});
|
|
88
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
89
|
+
name: 'return',
|
|
90
|
+
kittyProtocol: true,
|
|
91
|
+
ctrl: false,
|
|
92
|
+
meta: false,
|
|
93
|
+
shift: false,
|
|
94
|
+
}));
|
|
95
|
+
});
|
|
96
|
+
it('should handle numpad enter with modifiers', async () => {
|
|
97
|
+
const keyHandler = vi.fn();
|
|
98
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
99
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
100
|
+
});
|
|
101
|
+
act(() => {
|
|
102
|
+
result.current.subscribe(keyHandler);
|
|
103
|
+
});
|
|
104
|
+
// Send kitty protocol sequence for numpad enter with Shift (modifier 2): ESC[57414;2u
|
|
105
|
+
act(() => {
|
|
106
|
+
stdin.sendKittySequence(`\x1b[57414;2u`);
|
|
107
|
+
});
|
|
108
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
109
|
+
name: 'return',
|
|
110
|
+
kittyProtocol: true,
|
|
111
|
+
ctrl: false,
|
|
112
|
+
meta: false,
|
|
113
|
+
shift: true,
|
|
114
|
+
}));
|
|
115
|
+
});
|
|
116
|
+
it('should handle numpad enter with Ctrl modifier', async () => {
|
|
117
|
+
const keyHandler = vi.fn();
|
|
118
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
119
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
120
|
+
});
|
|
121
|
+
act(() => {
|
|
122
|
+
result.current.subscribe(keyHandler);
|
|
123
|
+
});
|
|
124
|
+
// Send kitty protocol sequence for numpad enter with Ctrl (modifier 5): ESC[57414;5u
|
|
125
|
+
act(() => {
|
|
126
|
+
stdin.sendKittySequence(`\x1b[57414;5u`);
|
|
127
|
+
});
|
|
128
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
129
|
+
name: 'return',
|
|
130
|
+
kittyProtocol: true,
|
|
131
|
+
ctrl: true,
|
|
132
|
+
meta: false,
|
|
133
|
+
shift: false,
|
|
134
|
+
}));
|
|
135
|
+
});
|
|
136
|
+
it('should handle numpad enter with Alt modifier', async () => {
|
|
137
|
+
const keyHandler = vi.fn();
|
|
138
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
139
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
140
|
+
});
|
|
141
|
+
act(() => {
|
|
142
|
+
result.current.subscribe(keyHandler);
|
|
143
|
+
});
|
|
144
|
+
// Send kitty protocol sequence for numpad enter with Alt (modifier 3): ESC[57414;3u
|
|
145
|
+
act(() => {
|
|
146
|
+
stdin.sendKittySequence(`\x1b[57414;3u`);
|
|
147
|
+
});
|
|
148
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
149
|
+
name: 'return',
|
|
150
|
+
kittyProtocol: true,
|
|
151
|
+
ctrl: false,
|
|
152
|
+
meta: true,
|
|
153
|
+
shift: false,
|
|
154
|
+
}));
|
|
155
|
+
});
|
|
156
|
+
it('should not process kitty sequences when kitty protocol is disabled', async () => {
|
|
157
|
+
const keyHandler = vi.fn();
|
|
158
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
159
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: false }),
|
|
160
|
+
});
|
|
161
|
+
act(() => {
|
|
162
|
+
result.current.subscribe(keyHandler);
|
|
163
|
+
});
|
|
164
|
+
// Send kitty protocol sequence for numpad enter
|
|
165
|
+
act(() => {
|
|
166
|
+
stdin.sendKittySequence(`\x1b[57414u`);
|
|
167
|
+
});
|
|
168
|
+
// When kitty protocol is disabled, the sequence should be passed through
|
|
169
|
+
// as individual keypresses, not recognized as a single enter key
|
|
170
|
+
expect(keyHandler).not.toHaveBeenCalledWith(expect.objectContaining({
|
|
171
|
+
name: 'return',
|
|
172
|
+
kittyProtocol: true,
|
|
173
|
+
}));
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
describe('Escape key handling', () => {
|
|
177
|
+
it('should recognize escape key (keycode 27) in kitty protocol', async () => {
|
|
178
|
+
const keyHandler = vi.fn();
|
|
179
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
180
|
+
wrapper: ({ children }) => wrapper({ children, kittyProtocolEnabled: true }),
|
|
181
|
+
});
|
|
182
|
+
act(() => {
|
|
183
|
+
result.current.subscribe(keyHandler);
|
|
184
|
+
});
|
|
185
|
+
// Send kitty protocol sequence for escape: ESC[27u
|
|
186
|
+
act(() => {
|
|
187
|
+
stdin.sendKittySequence('\x1b[27u');
|
|
188
|
+
});
|
|
189
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
190
|
+
name: 'escape',
|
|
191
|
+
kittyProtocol: true,
|
|
192
|
+
}));
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
describe('Tab and Backspace handling', () => {
|
|
196
|
+
it('should recognize Tab key in kitty protocol', async () => {
|
|
197
|
+
const keyHandler = vi.fn();
|
|
198
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
199
|
+
act(() => result.current.subscribe(keyHandler));
|
|
200
|
+
act(() => {
|
|
201
|
+
stdin.sendKittySequence(`\x1b[9u`);
|
|
202
|
+
});
|
|
203
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
204
|
+
name: 'tab',
|
|
205
|
+
kittyProtocol: true,
|
|
206
|
+
shift: false,
|
|
207
|
+
}));
|
|
208
|
+
});
|
|
209
|
+
it('should recognize Shift+Tab in kitty protocol', async () => {
|
|
210
|
+
const keyHandler = vi.fn();
|
|
211
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
212
|
+
act(() => result.current.subscribe(keyHandler));
|
|
213
|
+
// Modifier 2 is Shift
|
|
214
|
+
act(() => {
|
|
215
|
+
stdin.sendKittySequence(`\x1b[9;2u`);
|
|
216
|
+
});
|
|
217
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
218
|
+
name: 'tab',
|
|
219
|
+
kittyProtocol: true,
|
|
220
|
+
shift: true,
|
|
221
|
+
}));
|
|
222
|
+
});
|
|
223
|
+
it('should recognize Backspace key in kitty protocol', async () => {
|
|
224
|
+
const keyHandler = vi.fn();
|
|
225
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
226
|
+
act(() => result.current.subscribe(keyHandler));
|
|
227
|
+
act(() => {
|
|
228
|
+
stdin.sendKittySequence(`\x1b[127u`);
|
|
229
|
+
});
|
|
230
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
231
|
+
name: 'backspace',
|
|
232
|
+
kittyProtocol: true,
|
|
233
|
+
meta: false,
|
|
234
|
+
}));
|
|
235
|
+
});
|
|
236
|
+
it('should recognize Option+Backspace in kitty protocol', async () => {
|
|
237
|
+
const keyHandler = vi.fn();
|
|
238
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
239
|
+
act(() => result.current.subscribe(keyHandler));
|
|
240
|
+
// Modifier 3 is Alt/Option
|
|
241
|
+
act(() => {
|
|
242
|
+
stdin.sendKittySequence(`\x1b[127;3u`);
|
|
243
|
+
});
|
|
244
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
245
|
+
name: 'backspace',
|
|
246
|
+
kittyProtocol: true,
|
|
247
|
+
meta: true,
|
|
248
|
+
}));
|
|
249
|
+
});
|
|
250
|
+
it('should recognize Ctrl+Backspace in kitty protocol', async () => {
|
|
251
|
+
const keyHandler = vi.fn();
|
|
252
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
253
|
+
act(() => result.current.subscribe(keyHandler));
|
|
254
|
+
// Modifier 5 is Ctrl
|
|
255
|
+
act(() => {
|
|
256
|
+
stdin.sendKittySequence(`\x1b[127;5u`);
|
|
257
|
+
});
|
|
258
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
259
|
+
name: 'backspace',
|
|
260
|
+
kittyProtocol: true,
|
|
261
|
+
ctrl: true,
|
|
262
|
+
}));
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
describe('paste mode', () => {
|
|
266
|
+
it('should handle multiline paste as a single event', async () => {
|
|
267
|
+
const keyHandler = vi.fn();
|
|
268
|
+
const pastedText = 'This \n is \n a \n multiline \n paste.';
|
|
269
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
270
|
+
wrapper,
|
|
271
|
+
});
|
|
272
|
+
act(() => {
|
|
273
|
+
result.current.subscribe(keyHandler);
|
|
274
|
+
});
|
|
275
|
+
// Simulate a bracketed paste event
|
|
276
|
+
act(() => {
|
|
277
|
+
stdin.sendPaste(pastedText);
|
|
278
|
+
});
|
|
279
|
+
await waitFor(() => {
|
|
280
|
+
// Expect the handler to be called exactly once for the entire paste
|
|
281
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
282
|
+
});
|
|
283
|
+
// Verify the single event contains the full pasted text
|
|
284
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
285
|
+
paste: true,
|
|
286
|
+
sequence: pastedText,
|
|
287
|
+
}));
|
|
288
|
+
});
|
|
289
|
+
describe('paste mode markers', () => {
|
|
290
|
+
// These tests use pasteWorkaround=true to force passthrough mode for raw keypress testing
|
|
291
|
+
it('should handle complete paste sequence with markers', async () => {
|
|
292
|
+
const keyHandler = vi.fn();
|
|
293
|
+
const pastedText = 'pasted content';
|
|
294
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
295
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
296
|
+
});
|
|
297
|
+
act(() => {
|
|
298
|
+
result.current.subscribe(keyHandler);
|
|
299
|
+
});
|
|
300
|
+
// Send complete paste sequence: prefix + content + suffix
|
|
301
|
+
act(() => {
|
|
302
|
+
stdin.emit('data', Buffer.from(`\x1b[200~${pastedText}\x1b[201~`));
|
|
303
|
+
});
|
|
304
|
+
await waitFor(() => {
|
|
305
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
306
|
+
});
|
|
307
|
+
// Should emit a single paste event with the content
|
|
308
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
309
|
+
paste: true,
|
|
310
|
+
sequence: pastedText,
|
|
311
|
+
name: '',
|
|
312
|
+
}));
|
|
313
|
+
});
|
|
314
|
+
it('should handle empty paste sequence', async () => {
|
|
315
|
+
const keyHandler = vi.fn();
|
|
316
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
317
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
318
|
+
});
|
|
319
|
+
act(() => {
|
|
320
|
+
result.current.subscribe(keyHandler);
|
|
321
|
+
});
|
|
322
|
+
// Send empty paste sequence: prefix immediately followed by suffix
|
|
323
|
+
act(() => {
|
|
324
|
+
stdin.emit('data', Buffer.from('\x1b[200~\x1b[201~'));
|
|
325
|
+
});
|
|
326
|
+
await waitFor(() => {
|
|
327
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
328
|
+
});
|
|
329
|
+
// Should emit a paste event with empty content
|
|
330
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
331
|
+
paste: true,
|
|
332
|
+
sequence: '',
|
|
333
|
+
name: '',
|
|
334
|
+
}));
|
|
335
|
+
});
|
|
336
|
+
it('should handle data before paste markers', async () => {
|
|
337
|
+
const keyHandler = vi.fn();
|
|
338
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
339
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
340
|
+
});
|
|
341
|
+
act(() => {
|
|
342
|
+
result.current.subscribe(keyHandler);
|
|
343
|
+
});
|
|
344
|
+
// Send data before paste sequence
|
|
345
|
+
act(() => {
|
|
346
|
+
stdin.emit('data', Buffer.from('before\x1b[200~pasted\x1b[201~'));
|
|
347
|
+
});
|
|
348
|
+
await waitFor(() => {
|
|
349
|
+
expect(keyHandler).toHaveBeenCalledTimes(7); // 6 chars + 1 paste event
|
|
350
|
+
});
|
|
351
|
+
// Should process 'before' as individual characters
|
|
352
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({ name: 'b' }));
|
|
353
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({ name: 'e' }));
|
|
354
|
+
expect(keyHandler).toHaveBeenNthCalledWith(3, expect.objectContaining({ name: 'f' }));
|
|
355
|
+
expect(keyHandler).toHaveBeenNthCalledWith(4, expect.objectContaining({ name: 'o' }));
|
|
356
|
+
expect(keyHandler).toHaveBeenNthCalledWith(5, expect.objectContaining({ name: 'r' }));
|
|
357
|
+
expect(keyHandler).toHaveBeenNthCalledWith(6, expect.objectContaining({ name: 'e' }));
|
|
358
|
+
// Then emit paste event
|
|
359
|
+
expect(keyHandler).toHaveBeenNthCalledWith(7, expect.objectContaining({
|
|
360
|
+
paste: true,
|
|
361
|
+
sequence: 'pasted',
|
|
362
|
+
}));
|
|
363
|
+
});
|
|
364
|
+
it('should handle data after paste markers', async () => {
|
|
365
|
+
const keyHandler = vi.fn();
|
|
366
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
367
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
368
|
+
});
|
|
369
|
+
act(() => {
|
|
370
|
+
result.current.subscribe(keyHandler);
|
|
371
|
+
});
|
|
372
|
+
// Send paste sequence followed by data
|
|
373
|
+
act(() => {
|
|
374
|
+
stdin.emit('data', Buffer.from('\x1b[200~pasted\x1b[201~after'));
|
|
375
|
+
});
|
|
376
|
+
await waitFor(() => {
|
|
377
|
+
expect(keyHandler).toHaveBeenCalledTimes(6); // 1 paste event + 5 individual chars for 'after'
|
|
378
|
+
});
|
|
379
|
+
// Should emit paste event first
|
|
380
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({
|
|
381
|
+
paste: true,
|
|
382
|
+
sequence: 'pasted',
|
|
383
|
+
}));
|
|
384
|
+
// Then process 'after' as individual characters (since it doesn't contain return)
|
|
385
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({
|
|
386
|
+
name: 'a',
|
|
387
|
+
paste: false,
|
|
388
|
+
}));
|
|
389
|
+
expect(keyHandler).toHaveBeenNthCalledWith(3, expect.objectContaining({
|
|
390
|
+
name: 'f',
|
|
391
|
+
paste: false,
|
|
392
|
+
}));
|
|
393
|
+
expect(keyHandler).toHaveBeenNthCalledWith(4, expect.objectContaining({
|
|
394
|
+
name: 't',
|
|
395
|
+
paste: false,
|
|
396
|
+
}));
|
|
397
|
+
expect(keyHandler).toHaveBeenNthCalledWith(5, expect.objectContaining({
|
|
398
|
+
name: 'e',
|
|
399
|
+
paste: false,
|
|
400
|
+
}));
|
|
401
|
+
expect(keyHandler).toHaveBeenNthCalledWith(6, expect.objectContaining({
|
|
402
|
+
name: 'r',
|
|
403
|
+
paste: false,
|
|
404
|
+
}));
|
|
405
|
+
});
|
|
406
|
+
it('should handle complex sequence with multiple paste blocks', async () => {
|
|
407
|
+
const keyHandler = vi.fn();
|
|
408
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
409
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
410
|
+
});
|
|
411
|
+
act(() => {
|
|
412
|
+
result.current.subscribe(keyHandler);
|
|
413
|
+
});
|
|
414
|
+
// Send complex sequence: data + paste1 + data + paste2 + data
|
|
415
|
+
act(() => {
|
|
416
|
+
stdin.emit('data', Buffer.from('start\x1b[200~first\x1b[201~middle\x1b[200~second\x1b[201~end'));
|
|
417
|
+
});
|
|
418
|
+
await waitFor(() => {
|
|
419
|
+
expect(keyHandler).toHaveBeenCalledTimes(16); // 5 + 1 + 6 + 1 + 3 = 16 calls
|
|
420
|
+
});
|
|
421
|
+
// Check the sequence: 'start' (5 chars) + paste1 + 'middle' (6 chars) + paste2 + 'end' (3 chars as paste)
|
|
422
|
+
let callIndex = 1;
|
|
423
|
+
// 'start'
|
|
424
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 's' }));
|
|
425
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 't' }));
|
|
426
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'a' }));
|
|
427
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'r' }));
|
|
428
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 't' }));
|
|
429
|
+
// first paste
|
|
430
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({
|
|
431
|
+
paste: true,
|
|
432
|
+
sequence: 'first',
|
|
433
|
+
}));
|
|
434
|
+
// 'middle'
|
|
435
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'm' }));
|
|
436
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'i' }));
|
|
437
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'd' }));
|
|
438
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'd' }));
|
|
439
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'l' }));
|
|
440
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'e' }));
|
|
441
|
+
// second paste
|
|
442
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({
|
|
443
|
+
paste: true,
|
|
444
|
+
sequence: 'second',
|
|
445
|
+
}));
|
|
446
|
+
// 'end' as individual characters (since it doesn't contain return)
|
|
447
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'e' }));
|
|
448
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'n' }));
|
|
449
|
+
expect(keyHandler).toHaveBeenNthCalledWith(callIndex++, expect.objectContaining({ name: 'd' }));
|
|
450
|
+
});
|
|
451
|
+
it('should handle fragmented paste markers across multiple data events', async () => {
|
|
452
|
+
const keyHandler = vi.fn();
|
|
453
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
454
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
455
|
+
});
|
|
456
|
+
act(() => {
|
|
457
|
+
result.current.subscribe(keyHandler);
|
|
458
|
+
});
|
|
459
|
+
// Send fragmented paste sequence
|
|
460
|
+
act(() => {
|
|
461
|
+
stdin.emit('data', Buffer.from('\x1b[200~partial'));
|
|
462
|
+
stdin.emit('data', Buffer.from(' content\x1b[201~'));
|
|
463
|
+
});
|
|
464
|
+
await waitFor(() => {
|
|
465
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
466
|
+
});
|
|
467
|
+
// Should combine the fragmented content into a single paste event
|
|
468
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
469
|
+
paste: true,
|
|
470
|
+
sequence: 'partial content',
|
|
471
|
+
}));
|
|
472
|
+
});
|
|
473
|
+
it('should handle multiline content within paste markers', async () => {
|
|
474
|
+
const keyHandler = vi.fn();
|
|
475
|
+
const multilineContent = 'line1\nline2\nline3';
|
|
476
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
477
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
478
|
+
});
|
|
479
|
+
act(() => {
|
|
480
|
+
result.current.subscribe(keyHandler);
|
|
481
|
+
});
|
|
482
|
+
// Send paste sequence with multiline content
|
|
483
|
+
act(() => {
|
|
484
|
+
stdin.emit('data', Buffer.from(`\x1b[200~${multilineContent}\x1b[201~`));
|
|
485
|
+
});
|
|
486
|
+
await waitFor(() => {
|
|
487
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
488
|
+
});
|
|
489
|
+
// Should emit a single paste event with the multiline content
|
|
490
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
491
|
+
paste: true,
|
|
492
|
+
sequence: multilineContent,
|
|
493
|
+
}));
|
|
494
|
+
});
|
|
495
|
+
it('should handle paste markers split across buffer boundaries', async () => {
|
|
496
|
+
const keyHandler = vi.fn();
|
|
497
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
498
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
499
|
+
});
|
|
500
|
+
act(() => {
|
|
501
|
+
result.current.subscribe(keyHandler);
|
|
502
|
+
});
|
|
503
|
+
// Send paste marker split across multiple data events
|
|
504
|
+
act(() => {
|
|
505
|
+
stdin.emit('data', Buffer.from('\x1b[20'));
|
|
506
|
+
stdin.emit('data', Buffer.from('0~content\x1b[2'));
|
|
507
|
+
stdin.emit('data', Buffer.from('01~'));
|
|
508
|
+
});
|
|
509
|
+
await waitFor(() => {
|
|
510
|
+
// With the current implementation, fragmented paste markers get reconstructed
|
|
511
|
+
// into a single paste event for 'content'
|
|
512
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
513
|
+
});
|
|
514
|
+
// Should reconstruct the fragmented paste markers into a single paste event
|
|
515
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
516
|
+
paste: true,
|
|
517
|
+
sequence: 'content',
|
|
518
|
+
}));
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
it('buffers fragmented paste chunks before emitting newlines', () => {
|
|
522
|
+
vi.useFakeTimers();
|
|
523
|
+
const keyHandler = vi.fn();
|
|
524
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
525
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
526
|
+
});
|
|
527
|
+
act(() => {
|
|
528
|
+
result.current.subscribe(keyHandler);
|
|
529
|
+
});
|
|
530
|
+
try {
|
|
531
|
+
act(() => {
|
|
532
|
+
stdin.emit('data', Buffer.from('\r'));
|
|
533
|
+
stdin.emit('data', Buffer.from('rest of paste'));
|
|
534
|
+
});
|
|
535
|
+
act(() => {
|
|
536
|
+
vi.advanceTimersByTime(8);
|
|
537
|
+
});
|
|
538
|
+
// With the current implementation, fragmented data gets combined and
|
|
539
|
+
// treated as a single paste event due to the buffering mechanism
|
|
540
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
541
|
+
// Should be treated as a paste event with the combined content
|
|
542
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
543
|
+
paste: true,
|
|
544
|
+
sequence: '\rrest of paste',
|
|
545
|
+
}));
|
|
546
|
+
}
|
|
547
|
+
finally {
|
|
548
|
+
vi.useRealTimers();
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
describe('Raw keypress pipeline', () => {
|
|
553
|
+
// These tests use pasteWorkaround=true to force passthrough mode for raw keypress testing
|
|
554
|
+
it('should buffer input data and wait for timeout', () => {
|
|
555
|
+
vi.useFakeTimers();
|
|
556
|
+
const keyHandler = vi.fn();
|
|
557
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
558
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
559
|
+
});
|
|
560
|
+
act(() => {
|
|
561
|
+
result.current.subscribe(keyHandler);
|
|
562
|
+
});
|
|
563
|
+
try {
|
|
564
|
+
// Send single character
|
|
565
|
+
act(() => {
|
|
566
|
+
stdin.emit('data', Buffer.from('a'));
|
|
567
|
+
});
|
|
568
|
+
// With the current implementation, single characters are processed immediately
|
|
569
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
570
|
+
name: 'a',
|
|
571
|
+
sequence: 'a',
|
|
572
|
+
}));
|
|
573
|
+
}
|
|
574
|
+
finally {
|
|
575
|
+
vi.useRealTimers();
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
it('should concatenate new data and reset timeout', () => {
|
|
579
|
+
vi.useFakeTimers();
|
|
580
|
+
const keyHandler = vi.fn();
|
|
581
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
582
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
583
|
+
});
|
|
584
|
+
act(() => {
|
|
585
|
+
result.current.subscribe(keyHandler);
|
|
586
|
+
});
|
|
587
|
+
try {
|
|
588
|
+
// Send first chunk
|
|
589
|
+
act(() => {
|
|
590
|
+
stdin.emit('data', Buffer.from('hel'));
|
|
591
|
+
});
|
|
592
|
+
// Advance timer partially
|
|
593
|
+
act(() => {
|
|
594
|
+
vi.advanceTimersByTime(4);
|
|
595
|
+
});
|
|
596
|
+
// Send second chunk before timeout
|
|
597
|
+
act(() => {
|
|
598
|
+
stdin.emit('data', Buffer.from('lo'));
|
|
599
|
+
});
|
|
600
|
+
// With the current implementation, data is processed as individual characters
|
|
601
|
+
// since 'hel' doesn't contain return (0x0d)
|
|
602
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({
|
|
603
|
+
name: 'h',
|
|
604
|
+
sequence: 'h',
|
|
605
|
+
paste: false,
|
|
606
|
+
}));
|
|
607
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({
|
|
608
|
+
name: 'e',
|
|
609
|
+
sequence: 'e',
|
|
610
|
+
paste: false,
|
|
611
|
+
}));
|
|
612
|
+
expect(keyHandler).toHaveBeenNthCalledWith(3, expect.objectContaining({
|
|
613
|
+
name: 'l',
|
|
614
|
+
sequence: 'l',
|
|
615
|
+
paste: false,
|
|
616
|
+
}));
|
|
617
|
+
// Second chunk 'lo' is also processed as individual characters
|
|
618
|
+
expect(keyHandler).toHaveBeenNthCalledWith(4, expect.objectContaining({
|
|
619
|
+
name: 'l',
|
|
620
|
+
sequence: 'l',
|
|
621
|
+
paste: false,
|
|
622
|
+
}));
|
|
623
|
+
expect(keyHandler).toHaveBeenNthCalledWith(5, expect.objectContaining({
|
|
624
|
+
name: 'o',
|
|
625
|
+
sequence: 'o',
|
|
626
|
+
paste: false,
|
|
627
|
+
}));
|
|
628
|
+
expect(keyHandler).toHaveBeenCalledTimes(5);
|
|
629
|
+
}
|
|
630
|
+
finally {
|
|
631
|
+
vi.useRealTimers();
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
it('should flush immediately when buffer exceeds limit', () => {
|
|
635
|
+
vi.useFakeTimers();
|
|
636
|
+
const keyHandler = vi.fn();
|
|
637
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
638
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
639
|
+
});
|
|
640
|
+
act(() => {
|
|
641
|
+
result.current.subscribe(keyHandler);
|
|
642
|
+
});
|
|
643
|
+
try {
|
|
644
|
+
// Create a large buffer that exceeds the 64 byte limit
|
|
645
|
+
const largeData = 'x'.repeat(65);
|
|
646
|
+
act(() => {
|
|
647
|
+
stdin.emit('data', Buffer.from(largeData));
|
|
648
|
+
});
|
|
649
|
+
// Should flush immediately without waiting for timeout
|
|
650
|
+
// Large data without return gets treated as individual characters
|
|
651
|
+
expect(keyHandler).toHaveBeenCalledTimes(65);
|
|
652
|
+
// Each character should be processed individually
|
|
653
|
+
for (let i = 0; i < 65; i++) {
|
|
654
|
+
expect(keyHandler).toHaveBeenNthCalledWith(i + 1, expect.objectContaining({
|
|
655
|
+
name: 'x',
|
|
656
|
+
sequence: 'x',
|
|
657
|
+
paste: false,
|
|
658
|
+
}));
|
|
659
|
+
}
|
|
660
|
+
// Advancing timer should not cause additional calls
|
|
661
|
+
const callCountBefore = keyHandler.mock.calls.length;
|
|
662
|
+
act(() => {
|
|
663
|
+
vi.advanceTimersByTime(8);
|
|
664
|
+
});
|
|
665
|
+
expect(keyHandler).toHaveBeenCalledTimes(callCountBefore);
|
|
666
|
+
}
|
|
667
|
+
finally {
|
|
668
|
+
vi.useRealTimers();
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
it('should clear timeout when new data arrives', () => {
|
|
672
|
+
vi.useFakeTimers();
|
|
673
|
+
const keyHandler = vi.fn();
|
|
674
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
675
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
676
|
+
});
|
|
677
|
+
act(() => {
|
|
678
|
+
result.current.subscribe(keyHandler);
|
|
679
|
+
});
|
|
680
|
+
try {
|
|
681
|
+
// Send first chunk
|
|
682
|
+
act(() => {
|
|
683
|
+
stdin.emit('data', Buffer.from('a'));
|
|
684
|
+
});
|
|
685
|
+
// Advance timer almost to completion
|
|
686
|
+
act(() => {
|
|
687
|
+
vi.advanceTimersByTime(7);
|
|
688
|
+
});
|
|
689
|
+
// Send second chunk (should reset timeout)
|
|
690
|
+
act(() => {
|
|
691
|
+
stdin.emit('data', Buffer.from('b'));
|
|
692
|
+
});
|
|
693
|
+
// With the current implementation, both characters are processed immediately
|
|
694
|
+
expect(keyHandler).toHaveBeenCalledTimes(2);
|
|
695
|
+
// First event should be 'a', second should be 'b'
|
|
696
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({
|
|
697
|
+
name: 'a',
|
|
698
|
+
sequence: 'a',
|
|
699
|
+
paste: false,
|
|
700
|
+
}));
|
|
701
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({
|
|
702
|
+
name: 'b',
|
|
703
|
+
sequence: 'b',
|
|
704
|
+
paste: false,
|
|
705
|
+
}));
|
|
706
|
+
}
|
|
707
|
+
finally {
|
|
708
|
+
vi.useRealTimers();
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
it('should handle multiple separate keypress events', () => {
|
|
712
|
+
vi.useFakeTimers();
|
|
713
|
+
const keyHandler = vi.fn();
|
|
714
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
715
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
716
|
+
});
|
|
717
|
+
act(() => {
|
|
718
|
+
result.current.subscribe(keyHandler);
|
|
719
|
+
});
|
|
720
|
+
try {
|
|
721
|
+
// First keypress
|
|
722
|
+
act(() => {
|
|
723
|
+
stdin.emit('data', Buffer.from('a'));
|
|
724
|
+
});
|
|
725
|
+
act(() => {
|
|
726
|
+
vi.advanceTimersByTime(8);
|
|
727
|
+
});
|
|
728
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
729
|
+
sequence: 'a',
|
|
730
|
+
}));
|
|
731
|
+
keyHandler.mockClear();
|
|
732
|
+
// Second keypress after first completed
|
|
733
|
+
act(() => {
|
|
734
|
+
stdin.emit('data', Buffer.from('b'));
|
|
735
|
+
});
|
|
736
|
+
act(() => {
|
|
737
|
+
vi.advanceTimersByTime(8);
|
|
738
|
+
});
|
|
739
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
740
|
+
sequence: 'b',
|
|
741
|
+
}));
|
|
742
|
+
}
|
|
743
|
+
finally {
|
|
744
|
+
vi.useRealTimers();
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
it('should handle rapid sequential data within buffer limit', () => {
|
|
748
|
+
vi.useFakeTimers();
|
|
749
|
+
const keyHandler = vi.fn();
|
|
750
|
+
const { result } = renderHook(() => useKeypressContext(), {
|
|
751
|
+
wrapper: ({ children }) => wrapper({ children, pasteWorkaround: true }),
|
|
752
|
+
});
|
|
753
|
+
act(() => {
|
|
754
|
+
result.current.subscribe(keyHandler);
|
|
755
|
+
});
|
|
756
|
+
try {
|
|
757
|
+
// Send multiple small chunks rapidly
|
|
758
|
+
act(() => {
|
|
759
|
+
stdin.emit('data', Buffer.from('h'));
|
|
760
|
+
stdin.emit('data', Buffer.from('e'));
|
|
761
|
+
stdin.emit('data', Buffer.from('l'));
|
|
762
|
+
stdin.emit('data', Buffer.from('l'));
|
|
763
|
+
stdin.emit('data', Buffer.from('o'));
|
|
764
|
+
});
|
|
765
|
+
// With the current implementation, each character is processed immediately
|
|
766
|
+
expect(keyHandler).toHaveBeenCalledTimes(5);
|
|
767
|
+
// Each character should be processed as individual keypress events
|
|
768
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({
|
|
769
|
+
name: 'h',
|
|
770
|
+
sequence: 'h',
|
|
771
|
+
paste: false,
|
|
772
|
+
}));
|
|
773
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({
|
|
774
|
+
name: 'e',
|
|
775
|
+
sequence: 'e',
|
|
776
|
+
paste: false,
|
|
777
|
+
}));
|
|
778
|
+
expect(keyHandler).toHaveBeenNthCalledWith(3, expect.objectContaining({
|
|
779
|
+
name: 'l',
|
|
780
|
+
sequence: 'l',
|
|
781
|
+
paste: false,
|
|
782
|
+
}));
|
|
783
|
+
expect(keyHandler).toHaveBeenNthCalledWith(4, expect.objectContaining({
|
|
784
|
+
name: 'l',
|
|
785
|
+
sequence: 'l',
|
|
786
|
+
paste: false,
|
|
787
|
+
}));
|
|
788
|
+
expect(keyHandler).toHaveBeenNthCalledWith(5, expect.objectContaining({
|
|
789
|
+
name: 'o',
|
|
790
|
+
sequence: 'o',
|
|
791
|
+
paste: false,
|
|
792
|
+
}));
|
|
793
|
+
}
|
|
794
|
+
finally {
|
|
795
|
+
vi.useRealTimers();
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
describe('debug keystroke logging', () => {
|
|
800
|
+
let consoleLogSpy;
|
|
801
|
+
let consoleWarnSpy;
|
|
802
|
+
beforeEach(() => {
|
|
803
|
+
consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
|
|
804
|
+
consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => { });
|
|
805
|
+
});
|
|
806
|
+
afterEach(() => {
|
|
807
|
+
consoleLogSpy.mockRestore();
|
|
808
|
+
consoleWarnSpy.mockRestore();
|
|
809
|
+
});
|
|
810
|
+
it('should not log keystrokes when debugKeystrokeLogging is false', async () => {
|
|
811
|
+
const keyHandler = vi.fn();
|
|
812
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, debugKeystrokeLogging: false, children: children }));
|
|
813
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
814
|
+
act(() => {
|
|
815
|
+
result.current.subscribe(keyHandler);
|
|
816
|
+
});
|
|
817
|
+
// Send a kitty sequence
|
|
818
|
+
act(() => {
|
|
819
|
+
stdin.sendKittySequence('\x1b[27u');
|
|
820
|
+
});
|
|
821
|
+
expect(keyHandler).toHaveBeenCalled();
|
|
822
|
+
expect(consoleLogSpy).not.toHaveBeenCalledWith(expect.stringContaining('[DEBUG] Kitty'));
|
|
823
|
+
});
|
|
824
|
+
it('should log kitty buffer accumulation when debugKeystrokeLogging is true', async () => {
|
|
825
|
+
const keyHandler = vi.fn();
|
|
826
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, debugKeystrokeLogging: true, children: children }));
|
|
827
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
828
|
+
act(() => {
|
|
829
|
+
result.current.subscribe(keyHandler);
|
|
830
|
+
});
|
|
831
|
+
// Send a complete kitty sequence for escape
|
|
832
|
+
act(() => {
|
|
833
|
+
stdin.sendKittySequence('\x1b[27u');
|
|
834
|
+
});
|
|
835
|
+
expect(consoleLogSpy).toHaveBeenCalledWith('[DEBUG] Kitty buffer accumulating:', expect.stringContaining('\x1b[27u'));
|
|
836
|
+
const parsedCall = consoleLogSpy.mock.calls.find((args) => typeof args[0] === 'string' &&
|
|
837
|
+
args[0].includes('[DEBUG] Kitty sequence parsed successfully'));
|
|
838
|
+
expect(parsedCall).toBeTruthy();
|
|
839
|
+
expect(parsedCall?.[1]).toEqual(expect.stringContaining('\x1b[27u'));
|
|
840
|
+
});
|
|
841
|
+
it('should log kitty buffer overflow when debugKeystrokeLogging is true', async () => {
|
|
842
|
+
const keyHandler = vi.fn();
|
|
843
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, debugKeystrokeLogging: true, children: children }));
|
|
844
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
845
|
+
act(() => {
|
|
846
|
+
result.current.subscribe(keyHandler);
|
|
847
|
+
});
|
|
848
|
+
// Send an invalid long sequence to trigger overflow
|
|
849
|
+
const longInvalidSequence = '\x1b[' + 'x'.repeat(100);
|
|
850
|
+
act(() => {
|
|
851
|
+
stdin.sendKittySequence(longInvalidSequence);
|
|
852
|
+
});
|
|
853
|
+
expect(consoleLogSpy).toHaveBeenCalledWith('[DEBUG] Kitty buffer overflow, clearing:', expect.any(String));
|
|
854
|
+
});
|
|
855
|
+
it('should log kitty buffer clear on Ctrl+C when debugKeystrokeLogging is true', async () => {
|
|
856
|
+
const keyHandler = vi.fn();
|
|
857
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, debugKeystrokeLogging: true, children: children }));
|
|
858
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
859
|
+
act(() => {
|
|
860
|
+
result.current.subscribe(keyHandler);
|
|
861
|
+
});
|
|
862
|
+
// Send incomplete kitty sequence
|
|
863
|
+
act(() => {
|
|
864
|
+
stdin.pressKey({
|
|
865
|
+
name: undefined,
|
|
866
|
+
ctrl: false,
|
|
867
|
+
meta: false,
|
|
868
|
+
shift: false,
|
|
869
|
+
sequence: '\x1b[1',
|
|
870
|
+
});
|
|
871
|
+
});
|
|
872
|
+
// Send Ctrl+C
|
|
873
|
+
act(() => {
|
|
874
|
+
stdin.pressKey({
|
|
875
|
+
name: 'c',
|
|
876
|
+
ctrl: true,
|
|
877
|
+
meta: false,
|
|
878
|
+
shift: false,
|
|
879
|
+
sequence: '\x03',
|
|
880
|
+
});
|
|
881
|
+
});
|
|
882
|
+
expect(consoleLogSpy).toHaveBeenCalledWith('[DEBUG] Kitty buffer cleared on Ctrl+C:', '\x1b[1');
|
|
883
|
+
// Verify Ctrl+C was handled
|
|
884
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
885
|
+
name: 'c',
|
|
886
|
+
ctrl: true,
|
|
887
|
+
}));
|
|
888
|
+
});
|
|
889
|
+
it('should show char codes when debugKeystrokeLogging is true even without debug mode', async () => {
|
|
890
|
+
const keyHandler = vi.fn();
|
|
891
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, debugKeystrokeLogging: true, children: children }));
|
|
892
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
893
|
+
act(() => {
|
|
894
|
+
result.current.subscribe(keyHandler);
|
|
895
|
+
});
|
|
896
|
+
// Send incomplete kitty sequence
|
|
897
|
+
const sequence = '\x1b[12';
|
|
898
|
+
act(() => {
|
|
899
|
+
stdin.pressKey({
|
|
900
|
+
name: undefined,
|
|
901
|
+
ctrl: false,
|
|
902
|
+
meta: false,
|
|
903
|
+
shift: false,
|
|
904
|
+
sequence,
|
|
905
|
+
});
|
|
906
|
+
});
|
|
907
|
+
// Verify debug logging for accumulation
|
|
908
|
+
expect(consoleLogSpy).toHaveBeenCalledWith('[DEBUG] Kitty buffer accumulating:', sequence);
|
|
909
|
+
// Verify warning for char codes
|
|
910
|
+
expect(consoleWarnSpy).toHaveBeenCalledWith('Kitty sequence buffer has char codes:', [27, 91, 49, 50]);
|
|
911
|
+
});
|
|
912
|
+
});
|
|
913
|
+
describe('Parameterized functional keys', () => {
|
|
914
|
+
it.each([
|
|
915
|
+
// Parameterized
|
|
916
|
+
{ sequence: `\x1b[1;2H`, expected: { name: 'home', shift: true } },
|
|
917
|
+
{ sequence: `\x1b[1;5F`, expected: { name: 'end', ctrl: true } },
|
|
918
|
+
{ sequence: `\x1b[1;1P`, expected: { name: 'f1' } },
|
|
919
|
+
{ sequence: `\x1b[1;3Q`, expected: { name: 'f2', meta: true } },
|
|
920
|
+
{ sequence: `\x1b[3~`, expected: { name: 'delete' } },
|
|
921
|
+
{ sequence: `\x1b[5~`, expected: { name: 'pageup' } },
|
|
922
|
+
{ sequence: `\x1b[6~`, expected: { name: 'pagedown' } },
|
|
923
|
+
{ sequence: `\x1b[1~`, expected: { name: 'home' } },
|
|
924
|
+
{ sequence: `\x1b[4~`, expected: { name: 'end' } },
|
|
925
|
+
{ sequence: `\x1b[2~`, expected: { name: 'insert' } },
|
|
926
|
+
// Legacy Arrows
|
|
927
|
+
{
|
|
928
|
+
sequence: `\x1b[A`,
|
|
929
|
+
expected: { name: 'up', ctrl: false, meta: false, shift: false },
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
sequence: `\x1b[B`,
|
|
933
|
+
expected: { name: 'down', ctrl: false, meta: false, shift: false },
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
sequence: `\x1b[C`,
|
|
937
|
+
expected: { name: 'right', ctrl: false, meta: false, shift: false },
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
sequence: `\x1b[D`,
|
|
941
|
+
expected: { name: 'left', ctrl: false, meta: false, shift: false },
|
|
942
|
+
},
|
|
943
|
+
// Legacy Home/End
|
|
944
|
+
{
|
|
945
|
+
sequence: `\x1b[H`,
|
|
946
|
+
expected: { name: 'home', ctrl: false, meta: false, shift: false },
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
sequence: `\x1b[F`,
|
|
950
|
+
expected: { name: 'end', ctrl: false, meta: false, shift: false },
|
|
951
|
+
},
|
|
952
|
+
])('should recognize sequence "$sequence" as $expected.name', ({ sequence, expected }) => {
|
|
953
|
+
const keyHandler = vi.fn();
|
|
954
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
955
|
+
act(() => result.current.subscribe(keyHandler));
|
|
956
|
+
act(() => stdin.sendKittySequence(sequence));
|
|
957
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining(expected));
|
|
958
|
+
});
|
|
959
|
+
});
|
|
960
|
+
describe('Shift+Tab forms', () => {
|
|
961
|
+
it.each([
|
|
962
|
+
{ sequence: `\x1b[Z`, description: 'legacy reverse Tab' },
|
|
963
|
+
{ sequence: `\x1b[1;2Z`, description: 'parameterized reverse Tab' },
|
|
964
|
+
])('should recognize $description "$sequence" as Shift+Tab', ({ sequence }) => {
|
|
965
|
+
const keyHandler = vi.fn();
|
|
966
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
967
|
+
act(() => result.current.subscribe(keyHandler));
|
|
968
|
+
act(() => stdin.sendKittySequence(sequence));
|
|
969
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({ name: 'tab', shift: true }));
|
|
970
|
+
});
|
|
971
|
+
});
|
|
972
|
+
describe('Double-tap and batching', () => {
|
|
973
|
+
it('should emit two delete events for double-tap CSI[3~', async () => {
|
|
974
|
+
const keyHandler = vi.fn();
|
|
975
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
976
|
+
act(() => result.current.subscribe(keyHandler));
|
|
977
|
+
act(() => stdin.sendKittySequence(`\x1b[3~`));
|
|
978
|
+
act(() => stdin.sendKittySequence(`\x1b[3~`));
|
|
979
|
+
expect(keyHandler).toHaveBeenNthCalledWith(1, expect.objectContaining({ name: 'delete' }));
|
|
980
|
+
expect(keyHandler).toHaveBeenNthCalledWith(2, expect.objectContaining({ name: 'delete' }));
|
|
981
|
+
});
|
|
982
|
+
it('should parse two concatenated tilde-coded sequences in one chunk', async () => {
|
|
983
|
+
const keyHandler = vi.fn();
|
|
984
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
985
|
+
act(() => result.current.subscribe(keyHandler));
|
|
986
|
+
act(() => stdin.sendKittySequence(`\x1b[3~\x1b[5~`));
|
|
987
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({ name: 'delete' }));
|
|
988
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({ name: 'pageup' }));
|
|
989
|
+
});
|
|
990
|
+
it('should ignore incomplete CSI then parse the next complete sequence', async () => {
|
|
991
|
+
const keyHandler = vi.fn();
|
|
992
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
993
|
+
act(() => result.current.subscribe(keyHandler));
|
|
994
|
+
// Incomplete ESC sequence then a complete Delete
|
|
995
|
+
act(() => {
|
|
996
|
+
// Provide an incomplete ESC sequence chunk with a real ESC character
|
|
997
|
+
stdin.pressKey({
|
|
998
|
+
name: undefined,
|
|
999
|
+
ctrl: false,
|
|
1000
|
+
meta: false,
|
|
1001
|
+
shift: false,
|
|
1002
|
+
sequence: '\x1b[1;',
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
act(() => stdin.sendKittySequence(`\x1b[3~`));
|
|
1006
|
+
expect(keyHandler).toHaveBeenCalledTimes(1);
|
|
1007
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({ name: 'delete' }));
|
|
1008
|
+
});
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
describe('Drag and Drop Handling', () => {
|
|
1012
|
+
let stdin;
|
|
1013
|
+
const mockSetRawMode = vi.fn();
|
|
1014
|
+
const wrapper = ({ children }) => (_jsx(KeypressProvider, { kittyProtocolEnabled: true, children: children }));
|
|
1015
|
+
beforeEach(() => {
|
|
1016
|
+
vi.clearAllMocks();
|
|
1017
|
+
vi.useFakeTimers();
|
|
1018
|
+
stdin = new MockStdin();
|
|
1019
|
+
useStdin.mockReturnValue({
|
|
1020
|
+
stdin,
|
|
1021
|
+
setRawMode: mockSetRawMode,
|
|
1022
|
+
});
|
|
1023
|
+
});
|
|
1024
|
+
afterEach(() => {
|
|
1025
|
+
vi.useRealTimers();
|
|
1026
|
+
});
|
|
1027
|
+
describe('drag start by quotes', () => {
|
|
1028
|
+
it('should start collecting when single quote arrives and not broadcast immediately', async () => {
|
|
1029
|
+
const keyHandler = vi.fn();
|
|
1030
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
1031
|
+
act(() => {
|
|
1032
|
+
result.current.subscribe(keyHandler);
|
|
1033
|
+
});
|
|
1034
|
+
act(() => {
|
|
1035
|
+
stdin.pressKey({
|
|
1036
|
+
name: undefined,
|
|
1037
|
+
ctrl: false,
|
|
1038
|
+
meta: false,
|
|
1039
|
+
shift: false,
|
|
1040
|
+
paste: false,
|
|
1041
|
+
sequence: SINGLE_QUOTE,
|
|
1042
|
+
});
|
|
1043
|
+
});
|
|
1044
|
+
expect(keyHandler).not.toHaveBeenCalled();
|
|
1045
|
+
});
|
|
1046
|
+
it('should start collecting when double quote arrives and not broadcast immediately', async () => {
|
|
1047
|
+
const keyHandler = vi.fn();
|
|
1048
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
1049
|
+
act(() => {
|
|
1050
|
+
result.current.subscribe(keyHandler);
|
|
1051
|
+
});
|
|
1052
|
+
act(() => {
|
|
1053
|
+
stdin.pressKey({
|
|
1054
|
+
name: undefined,
|
|
1055
|
+
ctrl: false,
|
|
1056
|
+
meta: false,
|
|
1057
|
+
shift: false,
|
|
1058
|
+
paste: false,
|
|
1059
|
+
sequence: DOUBLE_QUOTE,
|
|
1060
|
+
});
|
|
1061
|
+
});
|
|
1062
|
+
expect(keyHandler).not.toHaveBeenCalled();
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
describe('drag collection and completion', () => {
|
|
1066
|
+
it('should collect single character inputs during drag mode', async () => {
|
|
1067
|
+
const keyHandler = vi.fn();
|
|
1068
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
1069
|
+
act(() => {
|
|
1070
|
+
result.current.subscribe(keyHandler);
|
|
1071
|
+
});
|
|
1072
|
+
// Start by single quote
|
|
1073
|
+
act(() => {
|
|
1074
|
+
stdin.pressKey({
|
|
1075
|
+
name: undefined,
|
|
1076
|
+
ctrl: false,
|
|
1077
|
+
meta: false,
|
|
1078
|
+
shift: false,
|
|
1079
|
+
paste: false,
|
|
1080
|
+
sequence: SINGLE_QUOTE,
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
// Send single character
|
|
1084
|
+
act(() => {
|
|
1085
|
+
stdin.pressKey({
|
|
1086
|
+
name: undefined,
|
|
1087
|
+
ctrl: false,
|
|
1088
|
+
meta: false,
|
|
1089
|
+
shift: false,
|
|
1090
|
+
paste: false,
|
|
1091
|
+
sequence: 'a',
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
// Character should not be immediately broadcast
|
|
1095
|
+
expect(keyHandler).not.toHaveBeenCalled();
|
|
1096
|
+
// Fast-forward to completion timeout
|
|
1097
|
+
act(() => {
|
|
1098
|
+
vi.advanceTimersByTime(DRAG_COMPLETION_TIMEOUT_MS + 10);
|
|
1099
|
+
});
|
|
1100
|
+
// Should broadcast the collected path as paste (includes starting quote)
|
|
1101
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
1102
|
+
name: '',
|
|
1103
|
+
paste: true,
|
|
1104
|
+
sequence: `${SINGLE_QUOTE}a`,
|
|
1105
|
+
}));
|
|
1106
|
+
});
|
|
1107
|
+
it('should collect multiple characters and complete on timeout', async () => {
|
|
1108
|
+
const keyHandler = vi.fn();
|
|
1109
|
+
const { result } = renderHook(() => useKeypressContext(), { wrapper });
|
|
1110
|
+
act(() => {
|
|
1111
|
+
result.current.subscribe(keyHandler);
|
|
1112
|
+
});
|
|
1113
|
+
// Start by single quote
|
|
1114
|
+
act(() => {
|
|
1115
|
+
stdin.pressKey({
|
|
1116
|
+
name: undefined,
|
|
1117
|
+
ctrl: false,
|
|
1118
|
+
meta: false,
|
|
1119
|
+
shift: false,
|
|
1120
|
+
paste: false,
|
|
1121
|
+
sequence: SINGLE_QUOTE,
|
|
1122
|
+
});
|
|
1123
|
+
});
|
|
1124
|
+
// Send multiple characters
|
|
1125
|
+
act(() => {
|
|
1126
|
+
stdin.pressKey({
|
|
1127
|
+
name: undefined,
|
|
1128
|
+
ctrl: false,
|
|
1129
|
+
meta: false,
|
|
1130
|
+
shift: false,
|
|
1131
|
+
paste: false,
|
|
1132
|
+
sequence: 'p',
|
|
1133
|
+
});
|
|
1134
|
+
});
|
|
1135
|
+
act(() => {
|
|
1136
|
+
stdin.pressKey({
|
|
1137
|
+
name: undefined,
|
|
1138
|
+
ctrl: false,
|
|
1139
|
+
meta: false,
|
|
1140
|
+
shift: false,
|
|
1141
|
+
paste: false,
|
|
1142
|
+
sequence: 'a',
|
|
1143
|
+
});
|
|
1144
|
+
});
|
|
1145
|
+
act(() => {
|
|
1146
|
+
stdin.pressKey({
|
|
1147
|
+
name: undefined,
|
|
1148
|
+
ctrl: false,
|
|
1149
|
+
meta: false,
|
|
1150
|
+
shift: false,
|
|
1151
|
+
paste: false,
|
|
1152
|
+
sequence: 't',
|
|
1153
|
+
});
|
|
1154
|
+
});
|
|
1155
|
+
act(() => {
|
|
1156
|
+
stdin.pressKey({
|
|
1157
|
+
name: undefined,
|
|
1158
|
+
ctrl: false,
|
|
1159
|
+
meta: false,
|
|
1160
|
+
shift: false,
|
|
1161
|
+
paste: false,
|
|
1162
|
+
sequence: 'h',
|
|
1163
|
+
});
|
|
1164
|
+
});
|
|
1165
|
+
// Characters should not be immediately broadcast
|
|
1166
|
+
expect(keyHandler).not.toHaveBeenCalled();
|
|
1167
|
+
// Fast-forward to completion timeout
|
|
1168
|
+
act(() => {
|
|
1169
|
+
vi.advanceTimersByTime(DRAG_COMPLETION_TIMEOUT_MS + 10);
|
|
1170
|
+
});
|
|
1171
|
+
// Should broadcast the collected path as paste (includes starting quote)
|
|
1172
|
+
expect(keyHandler).toHaveBeenCalledWith(expect.objectContaining({
|
|
1173
|
+
name: '',
|
|
1174
|
+
paste: true,
|
|
1175
|
+
sequence: `${SINGLE_QUOTE}path`,
|
|
1176
|
+
}));
|
|
1177
|
+
});
|
|
1178
|
+
});
|
|
1179
|
+
});
|
|
1180
|
+
//# sourceMappingURL=KeypressContext.test.js.map
|