@didim365/agent-cli 0.1.0 → 0.1.2
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/package.json +6 -3
- package/dist/src/commands/extensions/configure.test.d.ts +0 -1
- package/dist/src/commands/extensions/configure.test.js +0 -197
- package/dist/src/commands/extensions/configure.test.js.map +0 -1
- package/dist/src/commands/extensions/disable.test.d.ts +0 -6
- package/dist/src/commands/extensions/disable.test.js +0 -169
- package/dist/src/commands/extensions/disable.test.js.map +0 -1
- package/dist/src/commands/extensions/enable.test.d.ts +0 -6
- package/dist/src/commands/extensions/enable.test.js +0 -199
- package/dist/src/commands/extensions/enable.test.js.map +0 -1
- package/dist/src/commands/extensions/install.test.d.ts +0 -6
- package/dist/src/commands/extensions/install.test.js +0 -140
- package/dist/src/commands/extensions/install.test.js.map +0 -1
- package/dist/src/commands/extensions/link.test.d.ts +0 -6
- package/dist/src/commands/extensions/link.test.js +0 -137
- package/dist/src/commands/extensions/link.test.js.map +0 -1
- package/dist/src/commands/extensions/list.test.d.ts +0 -6
- package/dist/src/commands/extensions/list.test.js +0 -148
- package/dist/src/commands/extensions/list.test.js.map +0 -1
- package/dist/src/commands/extensions/new.test.d.ts +0 -6
- package/dist/src/commands/extensions/new.test.js +0 -62
- package/dist/src/commands/extensions/new.test.js.map +0 -1
- package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
- package/dist/src/commands/extensions/uninstall.test.js +0 -199
- package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
- package/dist/src/commands/extensions/update.test.d.ts +0 -6
- package/dist/src/commands/extensions/update.test.js +0 -170
- package/dist/src/commands/extensions/update.test.js.map +0 -1
- package/dist/src/commands/extensions/validate.test.d.ts +0 -6
- package/dist/src/commands/extensions/validate.test.js +0 -96
- package/dist/src/commands/extensions/validate.test.js.map +0 -1
- package/dist/src/commands/extensions.test.d.ts +0 -6
- package/dist/src/commands/extensions.test.js +0 -67
- package/dist/src/commands/extensions.test.js.map +0 -1
- package/dist/src/commands/hooks/migrate.test.d.ts +0 -6
- package/dist/src/commands/hooks/migrate.test.js +0 -388
- package/dist/src/commands/hooks/migrate.test.js.map +0 -1
- package/dist/src/commands/mcp/add.test.d.ts +0 -6
- package/dist/src/commands/mcp/add.test.js +0 -274
- package/dist/src/commands/mcp/add.test.js.map +0 -1
- package/dist/src/commands/mcp/list.test.d.ts +0 -6
- package/dist/src/commands/mcp/list.test.js +0 -150
- package/dist/src/commands/mcp/list.test.js.map +0 -1
- package/dist/src/commands/mcp/remove.test.d.ts +0 -6
- package/dist/src/commands/mcp/remove.test.js +0 -189
- package/dist/src/commands/mcp/remove.test.js.map +0 -1
- package/dist/src/commands/mcp.test.d.ts +0 -6
- package/dist/src/commands/mcp.test.js +0 -65
- package/dist/src/commands/mcp.test.js.map +0 -1
- package/dist/src/commands/skills/disable.test.d.ts +0 -6
- package/dist/src/commands/skills/disable.test.js +0 -96
- package/dist/src/commands/skills/disable.test.js.map +0 -1
- package/dist/src/commands/skills/enable.test.d.ts +0 -6
- package/dist/src/commands/skills/enable.test.js +0 -107
- package/dist/src/commands/skills/enable.test.js.map +0 -1
- package/dist/src/commands/skills/install.test.d.ts +0 -6
- package/dist/src/commands/skills/install.test.js +0 -95
- package/dist/src/commands/skills/install.test.js.map +0 -1
- package/dist/src/commands/skills/list.test.d.ts +0 -6
- package/dist/src/commands/skills/list.test.js +0 -136
- package/dist/src/commands/skills/list.test.js.map +0 -1
- package/dist/src/commands/skills/uninstall.test.d.ts +0 -6
- package/dist/src/commands/skills/uninstall.test.js +0 -61
- package/dist/src/commands/skills/uninstall.test.js.map +0 -1
- package/dist/src/commands/skills.test.d.ts +0 -6
- package/dist/src/commands/skills.test.js +0 -49
- package/dist/src/commands/skills.test.js.map +0 -1
- package/dist/src/commands/utils.test.d.ts +0 -6
- package/dist/src/commands/utils.test.js +0 -35
- package/dist/src/commands/utils.test.js.map +0 -1
- package/dist/src/config/auth.test.d.ts +0 -6
- package/dist/src/config/auth.test.js +0 -89
- package/dist/src/config/auth.test.js.map +0 -1
- package/dist/src/config/config.integration.test.d.ts +0 -6
- package/dist/src/config/config.integration.test.js +0 -205
- package/dist/src/config/config.integration.test.js.map +0 -1
- package/dist/src/config/config.test.d.ts +0 -6
- package/dist/src/config/config.test.js +0 -2413
- package/dist/src/config/config.test.js.map +0 -1
- package/dist/src/config/extension-manager-agents.test.d.ts +0 -6
- package/dist/src/config/extension-manager-agents.test.js +0 -114
- package/dist/src/config/extension-manager-agents.test.js.map +0 -1
- package/dist/src/config/extension-manager-scope.test.d.ts +0 -6
- package/dist/src/config/extension-manager-scope.test.js +0 -153
- package/dist/src/config/extension-manager-scope.test.js.map +0 -1
- package/dist/src/config/extension-manager-skills.test.d.ts +0 -6
- package/dist/src/config/extension-manager-skills.test.js +0 -148
- package/dist/src/config/extension-manager-skills.test.js.map +0 -1
- package/dist/src/config/extension.test.d.ts +0 -6
- package/dist/src/config/extension.test.js +0 -1671
- package/dist/src/config/extension.test.js.map +0 -1
- package/dist/src/config/extensions/consent.test.d.ts +0 -6
- package/dist/src/config/extensions/consent.test.js +0 -280
- package/dist/src/config/extensions/consent.test.js.map +0 -1
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionEnablement.test.js +0 -404
- package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
- package/dist/src/config/extensions/extensionSettings.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionSettings.test.js +0 -493
- package/dist/src/config/extensions/extensionSettings.test.js.map +0 -1
- package/dist/src/config/extensions/extensionUpdates.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionUpdates.test.js +0 -230
- package/dist/src/config/extensions/extensionUpdates.test.js.map +0 -1
- package/dist/src/config/extensions/github.test.d.ts +0 -6
- package/dist/src/config/extensions/github.test.js +0 -441
- package/dist/src/config/extensions/github.test.js.map +0 -1
- package/dist/src/config/extensions/github_fetch.test.d.ts +0 -6
- package/dist/src/config/extensions/github_fetch.test.js +0 -169
- package/dist/src/config/extensions/github_fetch.test.js.map +0 -1
- package/dist/src/config/extensions/storage.test.d.ts +0 -6
- package/dist/src/config/extensions/storage.test.js +0 -64
- package/dist/src/config/extensions/storage.test.js.map +0 -1
- package/dist/src/config/extensions/update.test.d.ts +0 -6
- package/dist/src/config/extensions/update.test.js +0 -231
- package/dist/src/config/extensions/update.test.js.map +0 -1
- package/dist/src/config/extensions/variables.test.d.ts +0 -6
- package/dist/src/config/extensions/variables.test.js +0 -103
- package/dist/src/config/extensions/variables.test.js.map +0 -1
- package/dist/src/config/keyBindings.test.d.ts +0 -6
- package/dist/src/config/keyBindings.test.js +0 -108
- package/dist/src/config/keyBindings.test.js.map +0 -1
- package/dist/src/config/mcp/mcpServerEnablement.test.d.ts +0 -6
- package/dist/src/config/mcp/mcpServerEnablement.test.js +0 -147
- package/dist/src/config/mcp/mcpServerEnablement.test.js.map +0 -1
- package/dist/src/config/policy-engine.integration.test.d.ts +0 -6
- package/dist/src/config/policy-engine.integration.test.js +0 -353
- package/dist/src/config/policy-engine.integration.test.js.map +0 -1
- package/dist/src/config/sandboxConfig.test.d.ts +0 -6
- package/dist/src/config/sandboxConfig.test.js +0 -184
- package/dist/src/config/sandboxConfig.test.js.map +0 -1
- package/dist/src/config/settingPaths.test.d.ts +0 -6
- package/dist/src/config/settingPaths.test.js +0 -22
- package/dist/src/config/settingPaths.test.js.map +0 -1
- package/dist/src/config/settings-validation.test.d.ts +0 -6
- package/dist/src/config/settings-validation.test.js +0 -370
- package/dist/src/config/settings-validation.test.js.map +0 -1
- package/dist/src/config/settings.test.d.ts +0 -6
- package/dist/src/config/settings.test.js +0 -1822
- package/dist/src/config/settings.test.js.map +0 -1
- package/dist/src/config/settingsSchema.test.d.ts +0 -6
- package/dist/src/config/settingsSchema.test.js +0 -309
- package/dist/src/config/settingsSchema.test.js.map +0 -1
- package/dist/src/config/settings_repro.test.d.ts +0 -6
- package/dist/src/config/settings_repro.test.js +0 -166
- package/dist/src/config/settings_repro.test.js.map +0 -1
- package/dist/src/config/settings_validation_warning.test.d.ts +0 -6
- package/dist/src/config/settings_validation_warning.test.js +0 -123
- package/dist/src/config/settings_validation_warning.test.js.map +0 -1
- package/dist/src/config/skills-backward-compatibility.test.d.ts +0 -6
- package/dist/src/config/skills-backward-compatibility.test.js +0 -99
- package/dist/src/config/skills-backward-compatibility.test.js.map +0 -1
- package/dist/src/config/trustedFolders.test.d.ts +0 -6
- package/dist/src/config/trustedFolders.test.js +0 -385
- package/dist/src/config/trustedFolders.test.js.map +0 -1
- package/dist/src/core/auth.test.d.ts +0 -6
- package/dist/src/core/auth.test.js +0 -47
- package/dist/src/core/auth.test.js.map +0 -1
- package/dist/src/core/initializer.test.d.ts +0 -6
- package/dist/src/core/initializer.test.js +0 -101
- package/dist/src/core/initializer.test.js.map +0 -1
- package/dist/src/core/theme.test.d.ts +0 -6
- package/dist/src/core/theme.test.js +0 -46
- package/dist/src/core/theme.test.js.map +0 -1
- package/dist/src/deferred.test.d.ts +0 -6
- package/dist/src/deferred.test.js +0 -164
- package/dist/src/deferred.test.js.map +0 -1
- package/dist/src/gemini.test.d.ts +0 -6
- package/dist/src/gemini.test.js +0 -1334
- package/dist/src/gemini.test.js.map +0 -1
- package/dist/src/gemini_cleanup.test.d.ts +0 -6
- package/dist/src/gemini_cleanup.test.js +0 -208
- package/dist/src/gemini_cleanup.test.js.map +0 -1
- package/dist/src/nonInteractiveCli.test.d.ts +0 -6
- package/dist/src/nonInteractiveCli.test.js +0 -1687
- package/dist/src/nonInteractiveCli.test.js.map +0 -1
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
- package/dist/src/services/BuiltinCommandLoader.test.js +0 -254
- package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
- package/dist/src/services/CommandService.test.d.ts +0 -6
- package/dist/src/services/CommandService.test.js +0 -234
- package/dist/src/services/CommandService.test.js.map +0 -1
- package/dist/src/services/FileCommandLoader.test.d.ts +0 -6
- package/dist/src/services/FileCommandLoader.test.js +0 -1102
- package/dist/src/services/FileCommandLoader.test.js.map +0 -1
- package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
- package/dist/src/services/McpPromptLoader.test.js +0 -411
- package/dist/src/services/McpPromptLoader.test.js.map +0 -1
- package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/argumentProcessor.test.js +0 -40
- package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +0 -1
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -174
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/shellProcessor.test.js +0 -514
- package/dist/src/services/prompt-processors/shellProcessor.test.js.map +0 -1
- package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
- package/dist/src/test-utils/mockCommandContext.test.js +0 -51
- package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
- package/dist/src/test-utils/render.test.d.ts +0 -6
- package/dist/src/test-utils/render.test.js +0 -79
- package/dist/src/test-utils/render.test.js.map +0 -1
- package/dist/src/ui/App.test.d.ts +0 -6
- package/dist/src/ui/App.test.js +0 -218
- package/dist/src/ui/App.test.js.map +0 -1
- package/dist/src/ui/AppContainer.test.d.ts +0 -6
- package/dist/src/ui/AppContainer.test.js +0 -2072
- package/dist/src/ui/AppContainer.test.js.map +0 -1
- package/dist/src/ui/IdeIntegrationNudge.test.d.ts +0 -6
- package/dist/src/ui/IdeIntegrationNudge.test.js +0 -158
- package/dist/src/ui/IdeIntegrationNudge.test.js.map +0 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/ApiAuthDialog.test.js +0 -109
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +0 -1
- package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/AuthDialog.test.js +0 -309
- package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/auth/AuthInProgress.test.d.ts +0 -6
- package/dist/src/ui/auth/AuthInProgress.test.js +0 -81
- package/dist/src/ui/auth/AuthInProgress.test.js.map +0 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +0 -66
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +0 -1
- package/dist/src/ui/auth/useAuth.test.d.ts +0 -6
- package/dist/src/ui/auth/useAuth.test.js +0 -189
- package/dist/src/ui/auth/useAuth.test.js.map +0 -1
- package/dist/src/ui/commands/aboutCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/aboutCommand.test.js +0 -143
- package/dist/src/ui/commands/aboutCommand.test.js.map +0 -1
- package/dist/src/ui/commands/agentsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/agentsCommand.test.js +0 -344
- package/dist/src/ui/commands/agentsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/authCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/authCommand.test.js +0 -98
- package/dist/src/ui/commands/authCommand.test.js.map +0 -1
- package/dist/src/ui/commands/bugCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/bugCommand.test.js +0 -186
- package/dist/src/ui/commands/bugCommand.test.js.map +0 -1
- package/dist/src/ui/commands/chatCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/chatCommand.test.js +0 -620
- package/dist/src/ui/commands/chatCommand.test.js.map +0 -1
- package/dist/src/ui/commands/clearCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/clearCommand.test.js +0 -87
- package/dist/src/ui/commands/clearCommand.test.js.map +0 -1
- package/dist/src/ui/commands/compressCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/compressCommand.test.js +0 -98
- package/dist/src/ui/commands/compressCommand.test.js.map +0 -1
- package/dist/src/ui/commands/copyCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/copyCommand.test.js +0 -242
- package/dist/src/ui/commands/copyCommand.test.js.map +0 -1
- package/dist/src/ui/commands/corgiCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/corgiCommand.test.js +0 -28
- package/dist/src/ui/commands/corgiCommand.test.js.map +0 -1
- package/dist/src/ui/commands/directoryCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/directoryCommand.test.js +0 -353
- package/dist/src/ui/commands/directoryCommand.test.js.map +0 -1
- package/dist/src/ui/commands/docsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/docsCommand.test.js +0 -72
- package/dist/src/ui/commands/docsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/editorCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/editorCommand.test.js +0 -27
- package/dist/src/ui/commands/editorCommand.test.js.map +0 -1
- package/dist/src/ui/commands/extensionsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/extensionsCommand.test.js +0 -778
- package/dist/src/ui/commands/extensionsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/helpCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/helpCommand.test.js +0 -42
- package/dist/src/ui/commands/helpCommand.test.js.map +0 -1
- package/dist/src/ui/commands/hooksCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/hooksCommand.test.js +0 -572
- package/dist/src/ui/commands/hooksCommand.test.js.map +0 -1
- package/dist/src/ui/commands/ideCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/ideCommand.test.js +0 -203
- package/dist/src/ui/commands/ideCommand.test.js.map +0 -1
- package/dist/src/ui/commands/initCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/initCommand.test.js +0 -84
- package/dist/src/ui/commands/initCommand.test.js.map +0 -1
- package/dist/src/ui/commands/mcpCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/mcpCommand.test.js +0 -189
- package/dist/src/ui/commands/mcpCommand.test.js.map +0 -1
- package/dist/src/ui/commands/memoryCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/memoryCommand.test.js +0 -350
- package/dist/src/ui/commands/memoryCommand.test.js.map +0 -1
- package/dist/src/ui/commands/modelCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/modelCommand.test.js +0 -41
- package/dist/src/ui/commands/modelCommand.test.js.map +0 -1
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/permissionsCommand.test.js +0 -86
- package/dist/src/ui/commands/permissionsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/policiesCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/policiesCommand.test.js +0 -87
- package/dist/src/ui/commands/policiesCommand.test.js.map +0 -1
- package/dist/src/ui/commands/privacyCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/privacyCommand.test.js +0 -32
- package/dist/src/ui/commands/privacyCommand.test.js.map +0 -1
- package/dist/src/ui/commands/quitCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/quitCommand.test.js +0 -50
- package/dist/src/ui/commands/quitCommand.test.js.map +0 -1
- package/dist/src/ui/commands/restoreCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/restoreCommand.test.js +0 -190
- package/dist/src/ui/commands/restoreCommand.test.js.map +0 -1
- package/dist/src/ui/commands/rewindCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/rewindCommand.test.js +0 -242
- package/dist/src/ui/commands/rewindCommand.test.js.map +0 -1
- package/dist/src/ui/commands/settingsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/settingsCommand.test.js +0 -30
- package/dist/src/ui/commands/settingsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/setupGithubCommand.test.js +0 -238
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
- package/dist/src/ui/commands/skillsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/skillsCommand.test.js +0 -426
- package/dist/src/ui/commands/skillsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/statsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/statsCommand.test.js +0 -70
- package/dist/src/ui/commands/statsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/terminalSetupCommand.test.js +0 -66
- package/dist/src/ui/commands/terminalSetupCommand.test.js.map +0 -1
- package/dist/src/ui/commands/themeCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/themeCommand.test.js +0 -32
- package/dist/src/ui/commands/themeCommand.test.js.map +0 -1
- package/dist/src/ui/commands/toolsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/toolsCommand.test.js +0 -100
- package/dist/src/ui/commands/toolsCommand.test.js.map +0 -1
- package/dist/src/ui/components/AboutBox.test.d.ts +0 -6
- package/dist/src/ui/components/AboutBox.test.js +0 -59
- package/dist/src/ui/components/AboutBox.test.js.map +0 -1
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +0 -43
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +0 -1
- package/dist/src/ui/components/AgentConfigDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AgentConfigDialog.test.js +0 -241
- package/dist/src/ui/components/AgentConfigDialog.test.js.map +0 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +0 -190
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +0 -1
- package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
- package/dist/src/ui/components/AnsiOutput.test.js +0 -92
- package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
- package/dist/src/ui/components/AppHeader.test.d.ts +0 -6
- package/dist/src/ui/components/AppHeader.test.js +0 -225
- package/dist/src/ui/components/AppHeader.test.js.map +0 -1
- package/dist/src/ui/components/ApprovalModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/ApprovalModeIndicator.test.js +0 -37
- package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +0 -1
- package/dist/src/ui/components/AskUserDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AskUserDialog.test.js +0 -598
- package/dist/src/ui/components/AskUserDialog.test.js.map +0 -1
- package/dist/src/ui/components/Banner.test.d.ts +0 -6
- package/dist/src/ui/components/Banner.test.js +0 -24
- package/dist/src/ui/components/Banner.test.js.map +0 -1
- package/dist/src/ui/components/CliSpinner.test.d.ts +0 -6
- package/dist/src/ui/components/CliSpinner.test.js +0 -28
- package/dist/src/ui/components/CliSpinner.test.js.map +0 -1
- package/dist/src/ui/components/Composer.test.d.ts +0 -6
- package/dist/src/ui/components/Composer.test.js +0 -383
- package/dist/src/ui/components/Composer.test.js.map +0 -1
- package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ConfigInitDisplay.test.js +0 -117
- package/dist/src/ui/components/ConfigInitDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/ConsentPrompt.test.js +0 -77
- package/dist/src/ui/components/ConsentPrompt.test.js.map +0 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +0 -26
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +0 -102
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ContextUsageDisplay.test.js +0 -43
- package/dist/src/ui/components/ContextUsageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/CopyModeWarning.test.d.ts +0 -6
- package/dist/src/ui/components/CopyModeWarning.test.js +0 -33
- package/dist/src/ui/components/CopyModeWarning.test.js.map +0 -1
- package/dist/src/ui/components/DebugProfiler.test.d.ts +0 -6
- package/dist/src/ui/components/DebugProfiler.test.js +0 -229
- package/dist/src/ui/components/DebugProfiler.test.js.map +0 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js +0 -39
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +0 -1
- package/dist/src/ui/components/DialogManager.test.d.ts +0 -6
- package/dist/src/ui/components/DialogManager.test.js +0 -177
- package/dist/src/ui/components/DialogManager.test.js.map +0 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/EditorSettingsDialog.test.js +0 -119
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/ExitWarning.test.d.ts +0 -6
- package/dist/src/ui/components/ExitWarning.test.js +0 -54
- package/dist/src/ui/components/ExitWarning.test.js.map +0 -1
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/FolderTrustDialog.test.js +0 -102
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/Footer.test.d.ts +0 -6
- package/dist/src/ui/components/Footer.test.js +0 -321
- package/dist/src/ui/components/Footer.test.js.map +0 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +0 -6
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +0 -61
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +0 -1
- package/dist/src/ui/components/GradientRegression.test.d.ts +0 -6
- package/dist/src/ui/components/GradientRegression.test.js +0 -105
- package/dist/src/ui/components/GradientRegression.test.js.map +0 -1
- package/dist/src/ui/components/Header.test.d.ts +0 -6
- package/dist/src/ui/components/Header.test.js +0 -147
- package/dist/src/ui/components/Header.test.js.map +0 -1
- package/dist/src/ui/components/Help.test.d.ts +0 -6
- package/dist/src/ui/components/Help.test.js +0 -67
- package/dist/src/ui/components/Help.test.js.map +0 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -207
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
- package/dist/src/ui/components/HookStatusDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HookStatusDisplay.test.js +0 -51
- package/dist/src/ui/components/HookStatusDisplay.test.js.map +0 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +0 -6
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +0 -58
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
- package/dist/src/ui/components/InputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/InputPrompt.test.js +0 -2596
- package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/LoadingIndicator.test.js +0 -207
- package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +0 -6
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js +0 -59
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +0 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -25
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/MainContent.test.d.ts +0 -6
- package/dist/src/ui/components/MainContent.test.js +0 -83
- package/dist/src/ui/components/MainContent.test.js.map +0 -1
- package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/MemoryUsageDisplay.test.js +0 -49
- package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ModelDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ModelDialog.test.js +0 -197
- package/dist/src/ui/components/ModelDialog.test.js.map +0 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -343
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +0 -162
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/NewAgentsNotification.test.d.ts +0 -6
- package/dist/src/ui/components/NewAgentsNotification.test.js +0 -48
- package/dist/src/ui/components/NewAgentsNotification.test.js.map +0 -1
- package/dist/src/ui/components/Notifications.test.d.ts +0 -6
- package/dist/src/ui/components/Notifications.test.js +0 -164
- package/dist/src/ui/components/Notifications.test.js.map +0 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -162
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ProQuotaDialog.test.js +0 -191
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -65
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/QuittingDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/QuittingDisplay.test.js +0 -49
- package/dist/src/ui/components/QuittingDisplay.test.js.map +0 -1
- package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/RawMarkdownIndicator.test.js +0 -34
- package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +0 -1
- package/dist/src/ui/components/RewindConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/RewindConfirmation.test.js +0 -53
- package/dist/src/ui/components/RewindConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/RewindViewer.test.d.ts +0 -6
- package/dist/src/ui/components/RewindViewer.test.js +0 -241
- package/dist/src/ui/components/RewindViewer.test.js.map +0 -1
- package/dist/src/ui/components/SessionBrowser.test.d.ts +0 -6
- package/dist/src/ui/components/SessionBrowser.test.js +0 -256
- package/dist/src/ui/components/SessionBrowser.test.js.map +0 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -75
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/SettingsDialog.test.js +0 -1150
- package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/ShellInputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/ShellInputPrompt.test.js +0 -91
- package/dist/src/ui/components/ShellInputPrompt.test.js.map +0 -1
- package/dist/src/ui/components/ShellModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/ShellModeIndicator.test.js +0 -17
- package/dist/src/ui/components/ShellModeIndicator.test.js.map +0 -1
- package/dist/src/ui/components/ShowMoreLines.test.d.ts +0 -6
- package/dist/src/ui/components/ShowMoreLines.test.js +0 -40
- package/dist/src/ui/components/ShowMoreLines.test.js.map +0 -1
- package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/StatsDisplay.test.js +0 -438
- package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/StatusDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/StatusDisplay.test.js +0 -155
- package/dist/src/ui/components/StatusDisplay.test.js.map +0 -1
- package/dist/src/ui/components/StickyHeader.test.d.ts +0 -6
- package/dist/src/ui/components/StickyHeader.test.js +0 -17
- package/dist/src/ui/components/StickyHeader.test.js.map +0 -1
- package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/SuggestionsDisplay.test.js +0 -56
- package/dist/src/ui/components/SuggestionsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/Table.test.d.ts +0 -6
- package/dist/src/ui/components/Table.test.js +0 -53
- package/dist/src/ui/components/Table.test.js.map +0 -1
- package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ThemeDialog.test.js +0 -167
- package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
- package/dist/src/ui/components/ThemedGradient.test.d.ts +0 -6
- package/dist/src/ui/components/ThemedGradient.test.js +0 -30
- package/dist/src/ui/components/ThemedGradient.test.js.map +0 -1
- package/dist/src/ui/components/Tips.test.d.ts +0 -6
- package/dist/src/ui/components/Tips.test.js +0 -23
- package/dist/src/ui/components/Tips.test.js.map +0 -1
- package/dist/src/ui/components/ToolConfirmationQueue.test.d.ts +0 -6
- package/dist/src/ui/components/ToolConfirmationQueue.test.js +0 -71
- package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +0 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -227
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/UpdateNotification.test.d.ts +0 -6
- package/dist/src/ui/components/UpdateNotification.test.js +0 -16
- package/dist/src/ui/components/UpdateNotification.test.js.map +0 -1
- package/dist/src/ui/components/ValidationDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ValidationDialog.test.js +0 -153
- package/dist/src/ui/components/ValidationDialog.test.js.map +0 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -191
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
- package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -240
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
- package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ErrorMessage.test.js +0 -23
- package/dist/src/ui/components/messages/ErrorMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/GeminiMessage.test.js +0 -35
- package/dist/src/ui/components/messages/GeminiMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/InfoMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/InfoMessage.test.js +0 -28
- package/dist/src/ui/components/messages/InfoMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +0 -33
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +0 -123
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/Todo.test.d.ts +0 -6
- package/dist/src/ui/components/messages/Todo.test.js +0 -114
- package/dist/src/ui/components/messages/Todo.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -232
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -529
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessage.test.js +0 -217
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +0 -89
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +0 -62
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +0 -114
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +0 -134
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +0 -1
- package/dist/src/ui/components/messages/UserMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/UserMessage.test.js +0 -32
- package/dist/src/ui/components/messages/UserMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/WarningMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/WarningMessage.test.js +0 -23
- package/dist/src/ui/components/messages/WarningMessage.test.js.map +0 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +0 -386
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +0 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +0 -434
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +0 -6
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +0 -79
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +0 -1
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
- package/dist/src/ui/components/shared/EnumSelector.test.js +0 -70
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
- package/dist/src/ui/components/shared/ExpandableText.test.d.ts +0 -6
- package/dist/src/ui/components/shared/ExpandableText.test.js +0 -88
- package/dist/src/ui/components/shared/ExpandableText.test.js.map +0 -1
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +0 -34
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +0 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -90
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -134
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
- package/dist/src/ui/components/shared/Scrollable.test.d.ts +0 -6
- package/dist/src/ui/components/shared/Scrollable.test.js +0 -74
- package/dist/src/ui/components/shared/Scrollable.test.js.map +0 -1
- package/dist/src/ui/components/shared/ScrollableList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/ScrollableList.test.js +0 -241
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +0 -1
- package/dist/src/ui/components/shared/TabHeader.test.d.ts +0 -6
- package/dist/src/ui/components/shared/TabHeader.test.js +0 -106
- package/dist/src/ui/components/shared/TabHeader.test.js.map +0 -1
- package/dist/src/ui/components/shared/TextInput.test.d.ts +0 -6
- package/dist/src/ui/components/shared/TextInput.test.js +0 -242
- package/dist/src/ui/components/shared/TextInput.test.js.map +0 -1
- package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/VirtualizedList.test.js +0 -171
- package/dist/src/ui/components/shared/VirtualizedList.test.js.map +0 -1
- package/dist/src/ui/components/shared/performance.test.d.ts +0 -1
- package/dist/src/ui/components/shared/performance.test.js +0 -67
- package/dist/src/ui/components/shared/performance.test.js.map +0 -1
- package/dist/src/ui/components/shared/text-buffer.test.d.ts +0 -6
- package/dist/src/ui/components/shared/text-buffer.test.js +0 -2490
- package/dist/src/ui/components/shared/text-buffer.test.js.map +0 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +0 -6
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js +0 -964
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +0 -1
- package/dist/src/ui/components/views/ChatList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ChatList.test.js +0 -45
- package/dist/src/ui/components/views/ChatList.test.js.map +0 -1
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ExtensionsList.test.js +0 -148
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
- package/dist/src/ui/components/views/McpStatus.test.d.ts +0 -6
- package/dist/src/ui/components/views/McpStatus.test.js +0 -153
- package/dist/src/ui/components/views/McpStatus.test.js.map +0 -1
- package/dist/src/ui/components/views/SkillsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/SkillsList.test.js +0 -97
- package/dist/src/ui/components/views/SkillsList.test.js.map +0 -1
- package/dist/src/ui/components/views/ToolsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ToolsList.test.js +0 -45
- package/dist/src/ui/components/views/ToolsList.test.js.map +0 -1
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/KeypressContext.test.js +0 -957
- package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
- package/dist/src/ui/contexts/MouseContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/MouseContext.test.js +0 -198
- package/dist/src/ui/contexts/MouseContext.test.js.map +0 -1
- package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +0 -6
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js +0 -319
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +0 -1
- package/dist/src/ui/contexts/ScrollProvider.test.d.ts +0 -6
- package/dist/src/ui/contexts/ScrollProvider.test.js +0 -377
- package/dist/src/ui/contexts/ScrollProvider.test.js.map +0 -1
- package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/SessionContext.test.js +0 -198
- package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
- package/dist/src/ui/contexts/ToolActionsContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/ToolActionsContext.test.js +0 -166
- package/dist/src/ui/contexts/ToolActionsContext.test.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -1032
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +0 -6
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +0 -183
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +0 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -521
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +0 -796
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/toolMapping.test.d.ts +0 -6
- package/dist/src/ui/hooks/toolMapping.test.js +0 -209
- package/dist/src/ui/hooks/toolMapping.test.js.map +0 -1
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +0 -85
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +0 -1
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +0 -435
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useAtCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAtCompletion.test.js +0 -417
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js +0 -87
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +0 -1
- package/dist/src/ui/hooks/useBanner.test.d.ts +0 -6
- package/dist/src/ui/hooks/useBanner.test.js +0 -92
- package/dist/src/ui/hooks/useBanner.test.js.map +0 -1
- package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +0 -6
- package/dist/src/ui/hooks/useBatchedScroll.test.js +0 -62
- package/dist/src/ui/hooks/useBatchedScroll.test.js.map +0 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -462
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +0 -6
- package/dist/src/ui/hooks/useConsoleMessages.test.js +0 -159
- package/dist/src/ui/hooks/useConsoleMessages.test.js.map +0 -1
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/useEditorSettings.test.js +0 -179
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +0 -6
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -279
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +0 -1
- package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFlickerDetector.test.js +0 -106
- package/dist/src/ui/hooks/useFlickerDetector.test.js.map +0 -1
- package/dist/src/ui/hooks/useFocus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFocus.test.js +0 -131
- package/dist/src/ui/hooks/useFocus.test.js.map +0 -1
- package/dist/src/ui/hooks/useFolderTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFolderTrust.test.js +0 -218
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGeminiStream.test.js +0 -2149
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGitBranchName.test.js +0 -183
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
- package/dist/src/ui/hooks/useHistoryManager.test.js +0 -188
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
- package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +0 -6
- package/dist/src/ui/hooks/useHookDisplayState.test.js +0 -180
- package/dist/src/ui/hooks/useHookDisplayState.test.js.map +0 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +0 -6
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +0 -214
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +0 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +0 -172
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useInputHistory.test.js +0 -208
- package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -238
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
- package/dist/src/ui/hooks/useKeypress.test.d.ts +0 -6
- package/dist/src/ui/hooks/useKeypress.test.js +0 -205
- package/dist/src/ui/hooks/useKeypress.test.js.map +0 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -145
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useMcpStatus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMcpStatus.test.js +0 -69
- package/dist/src/ui/hooks/useMcpStatus.test.js.map +0 -1
- package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -62
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMessageQueue.test.js +0 -327
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +0 -6
- package/dist/src/ui/hooks/useModelCommand.test.js +0 -45
- package/dist/src/ui/hooks/useModelCommand.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouse.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouse.test.js +0 -57
- package/dist/src/ui/hooks/useMouse.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouseClick.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouseClick.test.js +0 -59
- package/dist/src/ui/hooks/useMouseClick.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouseDoubleClick.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouseDoubleClick.test.js +0 -125
- package/dist/src/ui/hooks/useMouseDoubleClick.test.js.map +0 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +0 -291
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePhraseCycler.test.js +0 -208
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -104
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -477
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +0 -58
- package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -169
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useRewind.test.d.ts +0 -6
- package/dist/src/ui/hooks/useRewind.test.js +0 -100
- package/dist/src/ui/hooks/useRewind.test.js.map +0 -1
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSelectionList.test.js +0 -848
- package/dist/src/ui/hooks/useSelectionList.test.js.map +0 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSessionBrowser.test.js +0 -203
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +0 -1
- package/dist/src/ui/hooks/useSessionResume.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSessionResume.test.js +0 -336
- package/dist/src/ui/hooks/useSessionResume.test.js.map +0 -1
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useShellHistory.test.js +0 -223
- package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useShellInactivityStatus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useShellInactivityStatus.test.js +0 -84
- package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +0 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -9
- package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -845
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useSnowfall.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSnowfall.test.js +0 -88
- package/dist/src/ui/hooks/useSnowfall.test.js.map +0 -1
- package/dist/src/ui/hooks/useTabbedNavigation.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTabbedNavigation.test.js +0 -187
- package/dist/src/ui/hooks/useTabbedNavigation.test.js.map +0 -1
- package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTimer.test.js +0 -119
- package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
- package/dist/src/ui/hooks/useTips.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTips.test.js +0 -33
- package/dist/src/ui/hooks/useTips.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.js +0 -376
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolScheduler.test.js +0 -881
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.js +0 -45
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.js.map +0 -1
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +0 -97
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +0 -1
- package/dist/src/ui/hooks/vim.test.d.ts +0 -6
- package/dist/src/ui/hooks/vim.test.js +0 -1384
- package/dist/src/ui/hooks/vim.test.js.map +0 -1
- package/dist/src/ui/keyMatchers.test.d.ts +0 -6
- package/dist/src/ui/keyMatchers.test.js +0 -386
- package/dist/src/ui/keyMatchers.test.js.map +0 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +0 -121
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +0 -34
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +0 -34
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/PrivacyNotice.test.js +0 -62
- package/dist/src/ui/privacy/PrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/state/extensions.test.d.ts +0 -6
- package/dist/src/ui/state/extensions.test.js +0 -219
- package/dist/src/ui/state/extensions.test.js.map +0 -1
- package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
- package/dist/src/ui/themes/color-utils.test.js +0 -245
- package/dist/src/ui/themes/color-utils.test.js.map +0 -1
- package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
- package/dist/src/ui/themes/theme-manager.test.js +0 -150
- package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
- package/dist/src/ui/themes/theme.test.d.ts +0 -6
- package/dist/src/ui/themes/theme.test.js +0 -174
- package/dist/src/ui/themes/theme.test.js.map +0 -1
- package/dist/src/ui/utils/CodeColorizer.test.d.ts +0 -6
- package/dist/src/ui/utils/CodeColorizer.test.js +0 -38
- package/dist/src/ui/utils/CodeColorizer.test.js.map +0 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +0 -6
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +0 -21
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +0 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
- package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -159
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/clipboardUtils.test.js +0 -359
- package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
- package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +0 -6
- package/dist/src/ui/utils/clipboardUtils.windows.test.js +0 -55
- package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +0 -1
- package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/commandUtils.test.js +0 -479
- package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
- package/dist/src/ui/utils/computeStats.test.d.ts +0 -6
- package/dist/src/ui/utils/computeStats.test.js +0 -271
- package/dist/src/ui/utils/computeStats.test.js.map +0 -1
- package/dist/src/ui/utils/directoryUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/directoryUtils.test.js +0 -244
- package/dist/src/ui/utils/directoryUtils.test.js.map +0 -1
- package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/displayUtils.test.js +0 -61
- package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
- package/dist/src/ui/utils/formatters.test.d.ts +0 -6
- package/dist/src/ui/utils/formatters.test.js +0 -124
- package/dist/src/ui/utils/formatters.test.js.map +0 -1
- package/dist/src/ui/utils/highlight.test.d.ts +0 -6
- package/dist/src/ui/utils/highlight.test.js +0 -198
- package/dist/src/ui/utils/highlight.test.js.map +0 -1
- package/dist/src/ui/utils/input.test.d.ts +0 -6
- package/dist/src/ui/utils/input.test.js +0 -44
- package/dist/src/ui/utils/input.test.js.map +0 -1
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
- package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
- package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
- package/dist/src/ui/utils/mouse.test.d.ts +0 -6
- package/dist/src/ui/utils/mouse.test.js +0 -136
- package/dist/src/ui/utils/mouse.test.js.map +0 -1
- package/dist/src/ui/utils/rewindFileOps.test.d.ts +0 -6
- package/dist/src/ui/utils/rewindFileOps.test.js +0 -375
- package/dist/src/ui/utils/rewindFileOps.test.js.map +0 -1
- package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalCapabilityManager.test.js +0 -220
- package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +0 -1
- package/dist/src/ui/utils/terminalSetup.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalSetup.test.js +0 -147
- package/dist/src/ui/utils/terminalSetup.test.js.map +0 -1
- package/dist/src/ui/utils/terminalUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalUtils.test.js +0 -40
- package/dist/src/ui/utils/terminalUtils.test.js.map +0 -1
- package/dist/src/ui/utils/textOutput.test.d.ts +0 -6
- package/dist/src/ui/utils/textOutput.test.js +0 -79
- package/dist/src/ui/utils/textOutput.test.js.map +0 -1
- package/dist/src/ui/utils/textUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/textUtils.test.js +0 -168
- package/dist/src/ui/utils/textUtils.test.js.map +0 -1
- package/dist/src/ui/utils/ui-sizing.test.d.ts +0 -6
- package/dist/src/ui/utils/ui-sizing.test.js +0 -38
- package/dist/src/ui/utils/ui-sizing.test.js.map +0 -1
- package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
- package/dist/src/ui/utils/updateCheck.test.js +0 -134
- package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
- package/dist/src/utils/agentUtils.test.d.ts +0 -6
- package/dist/src/utils/agentUtils.test.js +0 -121
- package/dist/src/utils/agentUtils.test.js.map +0 -1
- package/dist/src/utils/checks.test.d.ts +0 -6
- package/dist/src/utils/checks.test.js +0 -29
- package/dist/src/utils/checks.test.js.map +0 -1
- package/dist/src/utils/cleanup.test.d.ts +0 -6
- package/dist/src/utils/cleanup.test.js +0 -92
- package/dist/src/utils/cleanup.test.js.map +0 -1
- package/dist/src/utils/commands.test.d.ts +0 -6
- package/dist/src/utils/commands.test.js +0 -115
- package/dist/src/utils/commands.test.js.map +0 -1
- package/dist/src/utils/commentJson.test.d.ts +0 -6
- package/dist/src/utils/commentJson.test.js +0 -308
- package/dist/src/utils/commentJson.test.js.map +0 -1
- package/dist/src/utils/deepMerge.test.d.ts +0 -6
- package/dist/src/utils/deepMerge.test.js +0 -201
- package/dist/src/utils/deepMerge.test.js.map +0 -1
- package/dist/src/utils/dialogScopeUtils.test.d.ts +0 -6
- package/dist/src/utils/dialogScopeUtils.test.js +0 -81
- package/dist/src/utils/dialogScopeUtils.test.js.map +0 -1
- package/dist/src/utils/envVarResolver.test.d.ts +0 -6
- package/dist/src/utils/envVarResolver.test.js +0 -221
- package/dist/src/utils/envVarResolver.test.js.map +0 -1
- package/dist/src/utils/errors.test.d.ts +0 -6
- package/dist/src/utils/errors.test.js +0 -435
- package/dist/src/utils/errors.test.js.map +0 -1
- package/dist/src/utils/events.test.d.ts +0 -6
- package/dist/src/utils/events.test.js +0 -24
- package/dist/src/utils/events.test.js.map +0 -1
- package/dist/src/utils/gitUtils.test.d.ts +0 -6
- package/dist/src/utils/gitUtils.test.js +0 -113
- package/dist/src/utils/gitUtils.test.js.map +0 -1
- package/dist/src/utils/handleAutoUpdate.test.d.ts +0 -6
- package/dist/src/utils/handleAutoUpdate.test.js +0 -310
- package/dist/src/utils/handleAutoUpdate.test.js.map +0 -1
- package/dist/src/utils/installationInfo.test.d.ts +0 -6
- package/dist/src/utils/installationInfo.test.js +0 -296
- package/dist/src/utils/installationInfo.test.js.map +0 -1
- package/dist/src/utils/jsonoutput.test.d.ts +0 -6
- package/dist/src/utils/jsonoutput.test.js +0 -74
- package/dist/src/utils/jsonoutput.test.js.map +0 -1
- package/dist/src/utils/math.test.d.ts +0 -6
- package/dist/src/utils/math.test.js +0 -23
- package/dist/src/utils/math.test.js.map +0 -1
- package/dist/src/utils/persistentState.test.d.ts +0 -6
- package/dist/src/utils/persistentState.test.js +0 -68
- package/dist/src/utils/persistentState.test.js.map +0 -1
- package/dist/src/utils/processUtils.test.d.ts +0 -6
- package/dist/src/utils/processUtils.test.js +0 -20
- package/dist/src/utils/processUtils.test.js.map +0 -1
- package/dist/src/utils/readStdin.test.d.ts +0 -6
- package/dist/src/utils/readStdin.test.js +0 -117
- package/dist/src/utils/readStdin.test.js.map +0 -1
- package/dist/src/utils/readStdin_safety.test.d.ts +0 -6
- package/dist/src/utils/readStdin_safety.test.js +0 -68
- package/dist/src/utils/readStdin_safety.test.js.map +0 -1
- package/dist/src/utils/relaunch.test.d.ts +0 -6
- package/dist/src/utils/relaunch.test.js +0 -279
- package/dist/src/utils/relaunch.test.js.map +0 -1
- package/dist/src/utils/resolvePath.test.d.ts +0 -6
- package/dist/src/utils/resolvePath.test.js +0 -34
- package/dist/src/utils/resolvePath.test.js.map +0 -1
- package/dist/src/utils/sandbox.test.d.ts +0 -6
- package/dist/src/utils/sandbox.test.js +0 -314
- package/dist/src/utils/sandbox.test.js.map +0 -1
- package/dist/src/utils/sandboxUtils.test.d.ts +0 -6
- package/dist/src/utils/sandboxUtils.test.js +0 -122
- package/dist/src/utils/sandboxUtils.test.js.map +0 -1
- package/dist/src/utils/sessionCleanup.integration.test.d.ts +0 -6
- package/dist/src/utils/sessionCleanup.integration.test.js +0 -182
- package/dist/src/utils/sessionCleanup.integration.test.js.map +0 -1
- package/dist/src/utils/sessionCleanup.test.d.ts +0 -6
- package/dist/src/utils/sessionCleanup.test.js +0 -1298
- package/dist/src/utils/sessionCleanup.test.js.map +0 -1
- package/dist/src/utils/sessionUtils.test.d.ts +0 -6
- package/dist/src/utils/sessionUtils.test.js +0 -503
- package/dist/src/utils/sessionUtils.test.js.map +0 -1
- package/dist/src/utils/sessions.test.d.ts +0 -6
- package/dist/src/utils/sessions.test.js +0 -581
- package/dist/src/utils/sessions.test.js.map +0 -1
- package/dist/src/utils/settingsUtils.test.d.ts +0 -6
- package/dist/src/utils/settingsUtils.test.js +0 -808
- package/dist/src/utils/settingsUtils.test.js.map +0 -1
- package/dist/src/utils/skillUtils.test.d.ts +0 -6
- package/dist/src/utils/skillUtils.test.js +0 -70
- package/dist/src/utils/skillUtils.test.js.map +0 -1
- package/dist/src/utils/startupWarnings.test.d.ts +0 -6
- package/dist/src/utils/startupWarnings.test.js +0 -61
- package/dist/src/utils/startupWarnings.test.js.map +0 -1
- package/dist/src/utils/updateEventEmitter.test.d.ts +0 -6
- package/dist/src/utils/updateEventEmitter.test.js +0 -18
- package/dist/src/utils/updateEventEmitter.test.js.map +0 -1
- package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
- package/dist/src/utils/userStartupWarnings.test.js +0 -98
- package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
- package/dist/src/utils/windowTitle.test.d.ts +0 -6
- package/dist/src/utils/windowTitle.test.js +0 -216
- package/dist/src/utils/windowTitle.test.js.map +0 -1
- package/dist/src/validateNonInterActiveAuth.test.d.ts +0 -6
- package/dist/src/validateNonInterActiveAuth.test.js +0 -319
- package/dist/src/validateNonInterActiveAuth.test.js.map +0 -1
- package/dist/src/zed-integration/fileSystemService.test.d.ts +0 -6
- package/dist/src/zed-integration/fileSystemService.test.js +0 -88
- package/dist/src/zed-integration/fileSystemService.test.js.map +0 -1
- package/dist/src/zed-integration/zedIntegration.test.d.ts +0 -6
- package/dist/src/zed-integration/zedIntegration.test.js +0 -625
- package/dist/src/zed-integration/zedIntegration.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,1102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import * as glob from 'glob';
|
|
7
|
-
import * as path from 'node:path';
|
|
8
|
-
import { GEMINI_DIR, Storage } from '@didim365/agent-cli-core';
|
|
9
|
-
import mock from 'mock-fs';
|
|
10
|
-
import { FileCommandLoader } from './FileCommandLoader.js';
|
|
11
|
-
import { assert, vi } from 'vitest';
|
|
12
|
-
import { createMockCommandContext } from '../test-utils/mockCommandContext.js';
|
|
13
|
-
import { SHELL_INJECTION_TRIGGER, SHORTHAND_ARGS_PLACEHOLDER, } from './prompt-processors/types.js';
|
|
14
|
-
import { ConfirmationRequiredError, ShellProcessor, } from './prompt-processors/shellProcessor.js';
|
|
15
|
-
import { DefaultArgumentProcessor } from './prompt-processors/argumentProcessor.js';
|
|
16
|
-
import { AtFileProcessor } from './prompt-processors/atFileProcessor.js';
|
|
17
|
-
const mockShellProcess = vi.hoisted(() => vi.fn());
|
|
18
|
-
const mockAtFileProcess = vi.hoisted(() => vi.fn());
|
|
19
|
-
vi.mock('./prompt-processors/atFileProcessor.js', () => ({
|
|
20
|
-
AtFileProcessor: vi.fn().mockImplementation(() => ({
|
|
21
|
-
process: mockAtFileProcess,
|
|
22
|
-
})),
|
|
23
|
-
}));
|
|
24
|
-
vi.mock('./prompt-processors/shellProcessor.js', () => ({
|
|
25
|
-
ShellProcessor: vi.fn().mockImplementation(() => ({
|
|
26
|
-
process: mockShellProcess,
|
|
27
|
-
})),
|
|
28
|
-
ConfirmationRequiredError: class extends Error {
|
|
29
|
-
commandsToConfirm;
|
|
30
|
-
constructor(message, commandsToConfirm) {
|
|
31
|
-
super(message);
|
|
32
|
-
this.commandsToConfirm = commandsToConfirm;
|
|
33
|
-
this.name = 'ConfirmationRequiredError';
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
}));
|
|
37
|
-
vi.mock('./prompt-processors/argumentProcessor.js', async (importOriginal) => {
|
|
38
|
-
const original = await importOriginal();
|
|
39
|
-
return {
|
|
40
|
-
DefaultArgumentProcessor: vi
|
|
41
|
-
.fn()
|
|
42
|
-
.mockImplementation(() => new original.DefaultArgumentProcessor()),
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
vi.mock('@didim365/agent-cli-core', async (importOriginal) => {
|
|
46
|
-
const original = await importOriginal();
|
|
47
|
-
return {
|
|
48
|
-
...original,
|
|
49
|
-
Storage: original.Storage,
|
|
50
|
-
isCommandAllowed: vi.fn(),
|
|
51
|
-
ShellExecutionService: {
|
|
52
|
-
execute: vi.fn(),
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
vi.mock('glob', () => ({
|
|
57
|
-
glob: vi.fn(),
|
|
58
|
-
}));
|
|
59
|
-
describe('FileCommandLoader', () => {
|
|
60
|
-
const signal = new AbortController().signal;
|
|
61
|
-
beforeEach(async () => {
|
|
62
|
-
vi.clearAllMocks();
|
|
63
|
-
const { glob: actualGlob } = await vi.importActual('glob');
|
|
64
|
-
vi.mocked(glob.glob).mockImplementation(actualGlob);
|
|
65
|
-
mockShellProcess.mockImplementation((prompt, context) => {
|
|
66
|
-
const userArgsRaw = context?.invocation?.args || '';
|
|
67
|
-
// This is a simplified mock. A real implementation would need to iterate
|
|
68
|
-
// through all parts and process only the text parts.
|
|
69
|
-
const firstTextPart = prompt.find((p) => typeof p === 'string' || 'text' in p);
|
|
70
|
-
let textContent = '';
|
|
71
|
-
if (typeof firstTextPart === 'string') {
|
|
72
|
-
textContent = firstTextPart;
|
|
73
|
-
}
|
|
74
|
-
else if (firstTextPart && 'text' in firstTextPart) {
|
|
75
|
-
textContent = firstTextPart.text ?? '';
|
|
76
|
-
}
|
|
77
|
-
const processedText = textContent.replaceAll(SHORTHAND_ARGS_PLACEHOLDER, userArgsRaw);
|
|
78
|
-
return Promise.resolve([{ text: processedText }]);
|
|
79
|
-
});
|
|
80
|
-
mockAtFileProcess.mockImplementation(async (prompt) => prompt);
|
|
81
|
-
});
|
|
82
|
-
afterEach(() => {
|
|
83
|
-
mock.restore();
|
|
84
|
-
});
|
|
85
|
-
it('loads a single command from a file', async () => {
|
|
86
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
87
|
-
mock({
|
|
88
|
-
[userCommandsDir]: {
|
|
89
|
-
'test.toml': 'prompt = "This is a test prompt"',
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
const loader = new FileCommandLoader(null);
|
|
93
|
-
const commands = await loader.loadCommands(signal);
|
|
94
|
-
expect(commands).toHaveLength(1);
|
|
95
|
-
const command = commands[0];
|
|
96
|
-
expect(command).toBeDefined();
|
|
97
|
-
expect(command.name).toBe('test');
|
|
98
|
-
const result = await command.action?.(createMockCommandContext({
|
|
99
|
-
invocation: {
|
|
100
|
-
raw: '/test',
|
|
101
|
-
name: 'test',
|
|
102
|
-
args: '',
|
|
103
|
-
},
|
|
104
|
-
}), '');
|
|
105
|
-
if (result?.type === 'submit_prompt') {
|
|
106
|
-
expect(result.content).toEqual([{ text: 'This is a test prompt' }]);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
assert.fail('Incorrect action type');
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
// Symlink creation on Windows requires special permissions that are not
|
|
113
|
-
// available in the standard CI environment. Therefore, we skip these tests
|
|
114
|
-
// on Windows to prevent CI failures. The core functionality is still
|
|
115
|
-
// validated on Linux and macOS.
|
|
116
|
-
const itif = (condition) => (condition ? it : it.skip);
|
|
117
|
-
itif(process.platform !== 'win32')('loads commands from a symlinked directory', async () => {
|
|
118
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
119
|
-
const realCommandsDir = '/real/commands';
|
|
120
|
-
mock({
|
|
121
|
-
[realCommandsDir]: {
|
|
122
|
-
'test.toml': 'prompt = "This is a test prompt"',
|
|
123
|
-
},
|
|
124
|
-
// Symlink the user commands directory to the real one
|
|
125
|
-
[userCommandsDir]: mock.symlink({
|
|
126
|
-
path: realCommandsDir,
|
|
127
|
-
}),
|
|
128
|
-
});
|
|
129
|
-
const loader = new FileCommandLoader(null);
|
|
130
|
-
const commands = await loader.loadCommands(signal);
|
|
131
|
-
expect(commands).toHaveLength(1);
|
|
132
|
-
const command = commands[0];
|
|
133
|
-
expect(command).toBeDefined();
|
|
134
|
-
expect(command.name).toBe('test');
|
|
135
|
-
});
|
|
136
|
-
itif(process.platform !== 'win32')('loads commands from a symlinked subdirectory', async () => {
|
|
137
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
138
|
-
const realNamespacedDir = '/real/namespaced-commands';
|
|
139
|
-
mock({
|
|
140
|
-
[userCommandsDir]: {
|
|
141
|
-
namespaced: mock.symlink({
|
|
142
|
-
path: realNamespacedDir,
|
|
143
|
-
}),
|
|
144
|
-
},
|
|
145
|
-
[realNamespacedDir]: {
|
|
146
|
-
'my-test.toml': 'prompt = "This is a test prompt"',
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
const loader = new FileCommandLoader(null);
|
|
150
|
-
const commands = await loader.loadCommands(signal);
|
|
151
|
-
expect(commands).toHaveLength(1);
|
|
152
|
-
const command = commands[0];
|
|
153
|
-
expect(command).toBeDefined();
|
|
154
|
-
expect(command.name).toBe('namespaced:my-test');
|
|
155
|
-
});
|
|
156
|
-
it('loads multiple commands', async () => {
|
|
157
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
158
|
-
mock({
|
|
159
|
-
[userCommandsDir]: {
|
|
160
|
-
'test1.toml': 'prompt = "Prompt 1"',
|
|
161
|
-
'test2.toml': 'prompt = "Prompt 2"',
|
|
162
|
-
},
|
|
163
|
-
});
|
|
164
|
-
const loader = new FileCommandLoader(null);
|
|
165
|
-
const commands = await loader.loadCommands(signal);
|
|
166
|
-
expect(commands).toHaveLength(2);
|
|
167
|
-
});
|
|
168
|
-
it('creates deeply nested namespaces correctly', async () => {
|
|
169
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
170
|
-
mock({
|
|
171
|
-
[userCommandsDir]: {
|
|
172
|
-
gcp: {
|
|
173
|
-
pipelines: {
|
|
174
|
-
'run.toml': 'prompt = "run pipeline"',
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
});
|
|
179
|
-
const mockConfig = {
|
|
180
|
-
getProjectRoot: vi.fn(() => '/path/to/project'),
|
|
181
|
-
getExtensions: vi.fn(() => []),
|
|
182
|
-
getFolderTrust: vi.fn(() => false),
|
|
183
|
-
isTrustedFolder: vi.fn(() => false),
|
|
184
|
-
};
|
|
185
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
186
|
-
const commands = await loader.loadCommands(signal);
|
|
187
|
-
expect(commands).toHaveLength(1);
|
|
188
|
-
expect(commands[0].name).toBe('gcp:pipelines:run');
|
|
189
|
-
});
|
|
190
|
-
it('creates namespaces from nested directories', async () => {
|
|
191
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
192
|
-
mock({
|
|
193
|
-
[userCommandsDir]: {
|
|
194
|
-
git: {
|
|
195
|
-
'commit.toml': 'prompt = "git commit prompt"',
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
});
|
|
199
|
-
const loader = new FileCommandLoader(null);
|
|
200
|
-
const commands = await loader.loadCommands(signal);
|
|
201
|
-
expect(commands).toHaveLength(1);
|
|
202
|
-
const command = commands[0];
|
|
203
|
-
expect(command).toBeDefined();
|
|
204
|
-
expect(command.name).toBe('git:commit');
|
|
205
|
-
});
|
|
206
|
-
it('returns both user and project commands in order', async () => {
|
|
207
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
208
|
-
const projectCommandsDir = new Storage(process.cwd()).getProjectCommandsDir();
|
|
209
|
-
mock({
|
|
210
|
-
[userCommandsDir]: {
|
|
211
|
-
'test.toml': 'prompt = "User prompt"',
|
|
212
|
-
},
|
|
213
|
-
[projectCommandsDir]: {
|
|
214
|
-
'test.toml': 'prompt = "Project prompt"',
|
|
215
|
-
},
|
|
216
|
-
});
|
|
217
|
-
const mockConfig = {
|
|
218
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
219
|
-
getExtensions: vi.fn(() => []),
|
|
220
|
-
getFolderTrust: vi.fn(() => false),
|
|
221
|
-
isTrustedFolder: vi.fn(() => false),
|
|
222
|
-
};
|
|
223
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
224
|
-
const commands = await loader.loadCommands(signal);
|
|
225
|
-
expect(commands).toHaveLength(2);
|
|
226
|
-
const userResult = await commands[0].action?.(createMockCommandContext({
|
|
227
|
-
invocation: {
|
|
228
|
-
raw: '/test',
|
|
229
|
-
name: 'test',
|
|
230
|
-
args: '',
|
|
231
|
-
},
|
|
232
|
-
}), '');
|
|
233
|
-
if (userResult?.type === 'submit_prompt') {
|
|
234
|
-
expect(userResult.content).toEqual([{ text: 'User prompt' }]);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
assert.fail('Incorrect action type for user command');
|
|
238
|
-
}
|
|
239
|
-
const projectResult = await commands[1].action?.(createMockCommandContext({
|
|
240
|
-
invocation: {
|
|
241
|
-
raw: '/test',
|
|
242
|
-
name: 'test',
|
|
243
|
-
args: '',
|
|
244
|
-
},
|
|
245
|
-
}), '');
|
|
246
|
-
if (projectResult?.type === 'submit_prompt') {
|
|
247
|
-
expect(projectResult.content).toEqual([{ text: 'Project prompt' }]);
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
assert.fail('Incorrect action type for project command');
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
it('ignores files with TOML syntax errors', async () => {
|
|
254
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
255
|
-
mock({
|
|
256
|
-
[userCommandsDir]: {
|
|
257
|
-
'invalid.toml': 'this is not valid toml',
|
|
258
|
-
'good.toml': 'prompt = "This one is fine"',
|
|
259
|
-
},
|
|
260
|
-
});
|
|
261
|
-
const loader = new FileCommandLoader(null);
|
|
262
|
-
const commands = await loader.loadCommands(signal);
|
|
263
|
-
expect(commands).toHaveLength(1);
|
|
264
|
-
expect(commands[0].name).toBe('good');
|
|
265
|
-
});
|
|
266
|
-
it('ignores files that are semantically invalid (missing prompt)', async () => {
|
|
267
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
268
|
-
mock({
|
|
269
|
-
[userCommandsDir]: {
|
|
270
|
-
'no_prompt.toml': 'description = "This file is missing a prompt"',
|
|
271
|
-
'good.toml': 'prompt = "This one is fine"',
|
|
272
|
-
},
|
|
273
|
-
});
|
|
274
|
-
const loader = new FileCommandLoader(null);
|
|
275
|
-
const commands = await loader.loadCommands(signal);
|
|
276
|
-
expect(commands).toHaveLength(1);
|
|
277
|
-
expect(commands[0].name).toBe('good');
|
|
278
|
-
});
|
|
279
|
-
it('handles filename edge cases correctly', async () => {
|
|
280
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
281
|
-
mock({
|
|
282
|
-
[userCommandsDir]: {
|
|
283
|
-
'test.v1.toml': 'prompt = "Test prompt"',
|
|
284
|
-
},
|
|
285
|
-
});
|
|
286
|
-
const loader = new FileCommandLoader(null);
|
|
287
|
-
const commands = await loader.loadCommands(signal);
|
|
288
|
-
const command = commands[0];
|
|
289
|
-
expect(command).toBeDefined();
|
|
290
|
-
expect(command.name).toBe('test.v1');
|
|
291
|
-
});
|
|
292
|
-
it('handles file system errors gracefully', async () => {
|
|
293
|
-
mock({}); // Mock an empty file system
|
|
294
|
-
const loader = new FileCommandLoader(null);
|
|
295
|
-
const commands = await loader.loadCommands(signal);
|
|
296
|
-
expect(commands).toHaveLength(0);
|
|
297
|
-
});
|
|
298
|
-
it('uses a default description if not provided', async () => {
|
|
299
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
300
|
-
mock({
|
|
301
|
-
[userCommandsDir]: {
|
|
302
|
-
'test.toml': 'prompt = "Test prompt"',
|
|
303
|
-
},
|
|
304
|
-
});
|
|
305
|
-
const loader = new FileCommandLoader(null);
|
|
306
|
-
const commands = await loader.loadCommands(signal);
|
|
307
|
-
const command = commands[0];
|
|
308
|
-
expect(command).toBeDefined();
|
|
309
|
-
expect(command.description).toBe('Custom command from test.toml');
|
|
310
|
-
});
|
|
311
|
-
it('uses the provided description', async () => {
|
|
312
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
313
|
-
mock({
|
|
314
|
-
[userCommandsDir]: {
|
|
315
|
-
'test.toml': 'prompt = "Test prompt"\ndescription = "My test command"',
|
|
316
|
-
},
|
|
317
|
-
});
|
|
318
|
-
const loader = new FileCommandLoader(null);
|
|
319
|
-
const commands = await loader.loadCommands(signal);
|
|
320
|
-
const command = commands[0];
|
|
321
|
-
expect(command).toBeDefined();
|
|
322
|
-
expect(command.description).toBe('My test command');
|
|
323
|
-
});
|
|
324
|
-
it('should sanitize colons in filenames to prevent namespace conflicts', async () => {
|
|
325
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
326
|
-
mock({
|
|
327
|
-
[userCommandsDir]: {
|
|
328
|
-
'legacy:command.toml': 'prompt = "This is a legacy command"',
|
|
329
|
-
},
|
|
330
|
-
});
|
|
331
|
-
const loader = new FileCommandLoader(null);
|
|
332
|
-
const commands = await loader.loadCommands(signal);
|
|
333
|
-
expect(commands).toHaveLength(1);
|
|
334
|
-
const command = commands[0];
|
|
335
|
-
expect(command).toBeDefined();
|
|
336
|
-
// Verify that the ':' in the filename was replaced with an '_'
|
|
337
|
-
expect(command.name).toBe('legacy_command');
|
|
338
|
-
});
|
|
339
|
-
describe('Processor Instantiation Logic', () => {
|
|
340
|
-
it('instantiates only DefaultArgumentProcessor if no {{args}} or !{} are present', async () => {
|
|
341
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
342
|
-
mock({
|
|
343
|
-
[userCommandsDir]: {
|
|
344
|
-
'simple.toml': `prompt = "Just a regular prompt"`,
|
|
345
|
-
},
|
|
346
|
-
});
|
|
347
|
-
const loader = new FileCommandLoader(null);
|
|
348
|
-
await loader.loadCommands(signal);
|
|
349
|
-
expect(ShellProcessor).not.toHaveBeenCalled();
|
|
350
|
-
expect(DefaultArgumentProcessor).toHaveBeenCalledTimes(1);
|
|
351
|
-
});
|
|
352
|
-
it('instantiates only ShellProcessor if {{args}} is present (but not !{})', async () => {
|
|
353
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
354
|
-
mock({
|
|
355
|
-
[userCommandsDir]: {
|
|
356
|
-
'args.toml': `prompt = "Prompt with {{args}}"`,
|
|
357
|
-
},
|
|
358
|
-
});
|
|
359
|
-
const loader = new FileCommandLoader(null);
|
|
360
|
-
await loader.loadCommands(signal);
|
|
361
|
-
expect(ShellProcessor).toHaveBeenCalledTimes(1);
|
|
362
|
-
expect(DefaultArgumentProcessor).not.toHaveBeenCalled();
|
|
363
|
-
});
|
|
364
|
-
it('instantiates ShellProcessor and DefaultArgumentProcessor if !{} is present (but not {{args}})', async () => {
|
|
365
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
366
|
-
mock({
|
|
367
|
-
[userCommandsDir]: {
|
|
368
|
-
'shell.toml': `prompt = "Prompt with !{cmd}"`,
|
|
369
|
-
},
|
|
370
|
-
});
|
|
371
|
-
const loader = new FileCommandLoader(null);
|
|
372
|
-
await loader.loadCommands(signal);
|
|
373
|
-
expect(ShellProcessor).toHaveBeenCalledTimes(1);
|
|
374
|
-
expect(DefaultArgumentProcessor).toHaveBeenCalledTimes(1);
|
|
375
|
-
});
|
|
376
|
-
it('instantiates only ShellProcessor if both {{args}} and !{} are present', async () => {
|
|
377
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
378
|
-
mock({
|
|
379
|
-
[userCommandsDir]: {
|
|
380
|
-
'both.toml': `prompt = "Prompt with {{args}} and !{cmd}"`,
|
|
381
|
-
},
|
|
382
|
-
});
|
|
383
|
-
const loader = new FileCommandLoader(null);
|
|
384
|
-
await loader.loadCommands(signal);
|
|
385
|
-
expect(ShellProcessor).toHaveBeenCalledTimes(1);
|
|
386
|
-
expect(DefaultArgumentProcessor).not.toHaveBeenCalled();
|
|
387
|
-
});
|
|
388
|
-
it('instantiates AtFileProcessor and DefaultArgumentProcessor if @{} is present', async () => {
|
|
389
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
390
|
-
mock({
|
|
391
|
-
[userCommandsDir]: {
|
|
392
|
-
'at-file.toml': `prompt = "Context: @{./my-file.txt}"`,
|
|
393
|
-
},
|
|
394
|
-
});
|
|
395
|
-
const loader = new FileCommandLoader(null);
|
|
396
|
-
await loader.loadCommands(signal);
|
|
397
|
-
expect(AtFileProcessor).toHaveBeenCalledTimes(1);
|
|
398
|
-
expect(ShellProcessor).not.toHaveBeenCalled();
|
|
399
|
-
expect(DefaultArgumentProcessor).toHaveBeenCalledTimes(1);
|
|
400
|
-
});
|
|
401
|
-
it('instantiates ShellProcessor and AtFileProcessor if !{} and @{} are present', async () => {
|
|
402
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
403
|
-
mock({
|
|
404
|
-
[userCommandsDir]: {
|
|
405
|
-
'shell-and-at.toml': `prompt = "Run !{cmd} with @{file.txt}"`,
|
|
406
|
-
},
|
|
407
|
-
});
|
|
408
|
-
const loader = new FileCommandLoader(null);
|
|
409
|
-
await loader.loadCommands(signal);
|
|
410
|
-
expect(ShellProcessor).toHaveBeenCalledTimes(1);
|
|
411
|
-
expect(AtFileProcessor).toHaveBeenCalledTimes(1);
|
|
412
|
-
expect(DefaultArgumentProcessor).toHaveBeenCalledTimes(1); // because no {{args}}
|
|
413
|
-
});
|
|
414
|
-
it('instantiates only ShellProcessor and AtFileProcessor if {{args}} and @{} are present', async () => {
|
|
415
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
416
|
-
mock({
|
|
417
|
-
[userCommandsDir]: {
|
|
418
|
-
'args-and-at.toml': `prompt = "Run {{args}} with @{file.txt}"`,
|
|
419
|
-
},
|
|
420
|
-
});
|
|
421
|
-
const loader = new FileCommandLoader(null);
|
|
422
|
-
await loader.loadCommands(signal);
|
|
423
|
-
expect(ShellProcessor).toHaveBeenCalledTimes(1);
|
|
424
|
-
expect(AtFileProcessor).toHaveBeenCalledTimes(1);
|
|
425
|
-
expect(DefaultArgumentProcessor).not.toHaveBeenCalled();
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
describe('Extension Command Loading', () => {
|
|
429
|
-
it('loads commands from active extensions', async () => {
|
|
430
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
431
|
-
const projectCommandsDir = new Storage(process.cwd()).getProjectCommandsDir();
|
|
432
|
-
const extensionDir = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'test-ext');
|
|
433
|
-
mock({
|
|
434
|
-
[userCommandsDir]: {
|
|
435
|
-
'user.toml': 'prompt = "User command"',
|
|
436
|
-
},
|
|
437
|
-
[projectCommandsDir]: {
|
|
438
|
-
'project.toml': 'prompt = "Project command"',
|
|
439
|
-
},
|
|
440
|
-
[extensionDir]: {
|
|
441
|
-
'gemini-extension.json': JSON.stringify({
|
|
442
|
-
name: 'test-ext',
|
|
443
|
-
version: '1.0.0',
|
|
444
|
-
}),
|
|
445
|
-
commands: {
|
|
446
|
-
'ext.toml': 'prompt = "Extension command"',
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
});
|
|
450
|
-
const mockConfig = {
|
|
451
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
452
|
-
getExtensions: vi.fn(() => [
|
|
453
|
-
{
|
|
454
|
-
name: 'test-ext',
|
|
455
|
-
version: '1.0.0',
|
|
456
|
-
isActive: true,
|
|
457
|
-
path: extensionDir,
|
|
458
|
-
},
|
|
459
|
-
]),
|
|
460
|
-
getFolderTrust: vi.fn(() => false),
|
|
461
|
-
isTrustedFolder: vi.fn(() => false),
|
|
462
|
-
};
|
|
463
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
464
|
-
const commands = await loader.loadCommands(signal);
|
|
465
|
-
expect(commands).toHaveLength(3);
|
|
466
|
-
const commandNames = commands.map((cmd) => cmd.name);
|
|
467
|
-
expect(commandNames).toEqual(['user', 'project', 'ext']);
|
|
468
|
-
const extCommand = commands.find((cmd) => cmd.name === 'ext');
|
|
469
|
-
expect(extCommand?.extensionName).toBe('test-ext');
|
|
470
|
-
expect(extCommand?.description).toMatch(/^\[test-ext\]/);
|
|
471
|
-
});
|
|
472
|
-
it('extension commands have extensionName metadata for conflict resolution', async () => {
|
|
473
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
474
|
-
const projectCommandsDir = new Storage(process.cwd()).getProjectCommandsDir();
|
|
475
|
-
const extensionDir = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'test-ext');
|
|
476
|
-
mock({
|
|
477
|
-
[extensionDir]: {
|
|
478
|
-
'gemini-extension.json': JSON.stringify({
|
|
479
|
-
name: 'test-ext',
|
|
480
|
-
version: '1.0.0',
|
|
481
|
-
}),
|
|
482
|
-
commands: {
|
|
483
|
-
'deploy.toml': 'prompt = "Extension deploy command"',
|
|
484
|
-
},
|
|
485
|
-
},
|
|
486
|
-
[userCommandsDir]: {
|
|
487
|
-
'deploy.toml': 'prompt = "User deploy command"',
|
|
488
|
-
},
|
|
489
|
-
[projectCommandsDir]: {
|
|
490
|
-
'deploy.toml': 'prompt = "Project deploy command"',
|
|
491
|
-
},
|
|
492
|
-
});
|
|
493
|
-
const mockConfig = {
|
|
494
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
495
|
-
getExtensions: vi.fn(() => [
|
|
496
|
-
{
|
|
497
|
-
name: 'test-ext',
|
|
498
|
-
version: '1.0.0',
|
|
499
|
-
isActive: true,
|
|
500
|
-
path: extensionDir,
|
|
501
|
-
},
|
|
502
|
-
]),
|
|
503
|
-
getFolderTrust: vi.fn(() => false),
|
|
504
|
-
isTrustedFolder: vi.fn(() => false),
|
|
505
|
-
};
|
|
506
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
507
|
-
const commands = await loader.loadCommands(signal);
|
|
508
|
-
// Return all commands, even duplicates
|
|
509
|
-
expect(commands).toHaveLength(3);
|
|
510
|
-
expect(commands[0].name).toBe('deploy');
|
|
511
|
-
expect(commands[0].extensionName).toBeUndefined();
|
|
512
|
-
const result0 = await commands[0].action?.(createMockCommandContext({
|
|
513
|
-
invocation: {
|
|
514
|
-
raw: '/deploy',
|
|
515
|
-
name: 'deploy',
|
|
516
|
-
args: '',
|
|
517
|
-
},
|
|
518
|
-
}), '');
|
|
519
|
-
expect(result0?.type).toBe('submit_prompt');
|
|
520
|
-
if (result0?.type === 'submit_prompt') {
|
|
521
|
-
expect(result0.content).toEqual([{ text: 'User deploy command' }]);
|
|
522
|
-
}
|
|
523
|
-
expect(commands[1].name).toBe('deploy');
|
|
524
|
-
expect(commands[1].extensionName).toBeUndefined();
|
|
525
|
-
const result1 = await commands[1].action?.(createMockCommandContext({
|
|
526
|
-
invocation: {
|
|
527
|
-
raw: '/deploy',
|
|
528
|
-
name: 'deploy',
|
|
529
|
-
args: '',
|
|
530
|
-
},
|
|
531
|
-
}), '');
|
|
532
|
-
expect(result1?.type).toBe('submit_prompt');
|
|
533
|
-
if (result1?.type === 'submit_prompt') {
|
|
534
|
-
expect(result1.content).toEqual([{ text: 'Project deploy command' }]);
|
|
535
|
-
}
|
|
536
|
-
expect(commands[2].name).toBe('deploy');
|
|
537
|
-
expect(commands[2].extensionName).toBe('test-ext');
|
|
538
|
-
expect(commands[2].description).toMatch(/^\[test-ext\]/);
|
|
539
|
-
const result2 = await commands[2].action?.(createMockCommandContext({
|
|
540
|
-
invocation: {
|
|
541
|
-
raw: '/deploy',
|
|
542
|
-
name: 'deploy',
|
|
543
|
-
args: '',
|
|
544
|
-
},
|
|
545
|
-
}), '');
|
|
546
|
-
expect(result2?.type).toBe('submit_prompt');
|
|
547
|
-
if (result2?.type === 'submit_prompt') {
|
|
548
|
-
expect(result2.content).toEqual([{ text: 'Extension deploy command' }]);
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
it('only loads commands from active extensions', async () => {
|
|
552
|
-
const extensionDir1 = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'active-ext');
|
|
553
|
-
const extensionDir2 = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'inactive-ext');
|
|
554
|
-
mock({
|
|
555
|
-
[extensionDir1]: {
|
|
556
|
-
'gemini-extension.json': JSON.stringify({
|
|
557
|
-
name: 'active-ext',
|
|
558
|
-
version: '1.0.0',
|
|
559
|
-
}),
|
|
560
|
-
commands: {
|
|
561
|
-
'active.toml': 'prompt = "Active extension command"',
|
|
562
|
-
},
|
|
563
|
-
},
|
|
564
|
-
[extensionDir2]: {
|
|
565
|
-
'gemini-extension.json': JSON.stringify({
|
|
566
|
-
name: 'inactive-ext',
|
|
567
|
-
version: '1.0.0',
|
|
568
|
-
}),
|
|
569
|
-
commands: {
|
|
570
|
-
'inactive.toml': 'prompt = "Inactive extension command"',
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
});
|
|
574
|
-
const mockConfig = {
|
|
575
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
576
|
-
getExtensions: vi.fn(() => [
|
|
577
|
-
{
|
|
578
|
-
name: 'active-ext',
|
|
579
|
-
version: '1.0.0',
|
|
580
|
-
isActive: true,
|
|
581
|
-
path: extensionDir1,
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
name: 'inactive-ext',
|
|
585
|
-
version: '1.0.0',
|
|
586
|
-
isActive: false,
|
|
587
|
-
path: extensionDir2,
|
|
588
|
-
},
|
|
589
|
-
]),
|
|
590
|
-
getFolderTrust: vi.fn(() => false),
|
|
591
|
-
isTrustedFolder: vi.fn(() => false),
|
|
592
|
-
};
|
|
593
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
594
|
-
const commands = await loader.loadCommands(signal);
|
|
595
|
-
expect(commands).toHaveLength(1);
|
|
596
|
-
expect(commands[0].name).toBe('active');
|
|
597
|
-
expect(commands[0].extensionName).toBe('active-ext');
|
|
598
|
-
expect(commands[0].description).toMatch(/^\[active-ext\]/);
|
|
599
|
-
});
|
|
600
|
-
it('handles missing extension commands directory gracefully', async () => {
|
|
601
|
-
const extensionDir = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'no-commands');
|
|
602
|
-
mock({
|
|
603
|
-
[extensionDir]: {
|
|
604
|
-
'gemini-extension.json': JSON.stringify({
|
|
605
|
-
name: 'no-commands',
|
|
606
|
-
version: '1.0.0',
|
|
607
|
-
}),
|
|
608
|
-
// No commands directory
|
|
609
|
-
},
|
|
610
|
-
});
|
|
611
|
-
const mockConfig = {
|
|
612
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
613
|
-
getExtensions: vi.fn(() => [
|
|
614
|
-
{
|
|
615
|
-
name: 'no-commands',
|
|
616
|
-
version: '1.0.0',
|
|
617
|
-
isActive: true,
|
|
618
|
-
path: extensionDir,
|
|
619
|
-
},
|
|
620
|
-
]),
|
|
621
|
-
getFolderTrust: vi.fn(() => false),
|
|
622
|
-
isTrustedFolder: vi.fn(() => false),
|
|
623
|
-
};
|
|
624
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
625
|
-
const commands = await loader.loadCommands(signal);
|
|
626
|
-
expect(commands).toHaveLength(0);
|
|
627
|
-
});
|
|
628
|
-
it('handles nested command structure in extensions', async () => {
|
|
629
|
-
const extensionDir = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'a');
|
|
630
|
-
mock({
|
|
631
|
-
[extensionDir]: {
|
|
632
|
-
'gemini-extension.json': JSON.stringify({
|
|
633
|
-
name: 'a',
|
|
634
|
-
version: '1.0.0',
|
|
635
|
-
}),
|
|
636
|
-
commands: {
|
|
637
|
-
b: {
|
|
638
|
-
'c.toml': 'prompt = "Nested command from extension a"',
|
|
639
|
-
d: {
|
|
640
|
-
'e.toml': 'prompt = "Deeply nested command"',
|
|
641
|
-
},
|
|
642
|
-
},
|
|
643
|
-
'simple.toml': 'prompt = "Simple command"',
|
|
644
|
-
},
|
|
645
|
-
},
|
|
646
|
-
});
|
|
647
|
-
const mockConfig = {
|
|
648
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
649
|
-
getExtensions: vi.fn(() => [
|
|
650
|
-
{ name: 'a', version: '1.0.0', isActive: true, path: extensionDir },
|
|
651
|
-
]),
|
|
652
|
-
getFolderTrust: vi.fn(() => false),
|
|
653
|
-
isTrustedFolder: vi.fn(() => false),
|
|
654
|
-
};
|
|
655
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
656
|
-
const commands = await loader.loadCommands(signal);
|
|
657
|
-
expect(commands).toHaveLength(3);
|
|
658
|
-
const commandNames = commands.map((cmd) => cmd.name).sort();
|
|
659
|
-
expect(commandNames).toEqual(['b:c', 'b:d:e', 'simple']);
|
|
660
|
-
const nestedCmd = commands.find((cmd) => cmd.name === 'b:c');
|
|
661
|
-
expect(nestedCmd?.extensionName).toBe('a');
|
|
662
|
-
expect(nestedCmd?.description).toMatch(/^\[a\]/);
|
|
663
|
-
expect(nestedCmd).toBeDefined();
|
|
664
|
-
const result = await nestedCmd.action?.(createMockCommandContext({
|
|
665
|
-
invocation: {
|
|
666
|
-
raw: '/b:c',
|
|
667
|
-
name: 'b:c',
|
|
668
|
-
args: '',
|
|
669
|
-
},
|
|
670
|
-
}), '');
|
|
671
|
-
if (result?.type === 'submit_prompt') {
|
|
672
|
-
expect(result.content).toEqual([
|
|
673
|
-
{ text: 'Nested command from extension a' },
|
|
674
|
-
]);
|
|
675
|
-
}
|
|
676
|
-
else {
|
|
677
|
-
assert.fail('Incorrect action type');
|
|
678
|
-
}
|
|
679
|
-
});
|
|
680
|
-
it('correctly loads extensionId for extension commands', async () => {
|
|
681
|
-
const extensionId = 'my-test-ext-id-123';
|
|
682
|
-
const extensionDir = path.join(process.cwd(), GEMINI_DIR, 'extensions', 'my-test-ext');
|
|
683
|
-
mock({
|
|
684
|
-
[extensionDir]: {
|
|
685
|
-
'gemini-extension.json': JSON.stringify({
|
|
686
|
-
name: 'my-test-ext',
|
|
687
|
-
id: extensionId,
|
|
688
|
-
version: '1.0.0',
|
|
689
|
-
}),
|
|
690
|
-
commands: {
|
|
691
|
-
'my-cmd.toml': 'prompt = "My test command"',
|
|
692
|
-
},
|
|
693
|
-
},
|
|
694
|
-
});
|
|
695
|
-
const mockConfig = {
|
|
696
|
-
getProjectRoot: vi.fn(() => process.cwd()),
|
|
697
|
-
getExtensions: vi.fn(() => [
|
|
698
|
-
{
|
|
699
|
-
name: 'my-test-ext',
|
|
700
|
-
id: extensionId,
|
|
701
|
-
version: '1.0.0',
|
|
702
|
-
isActive: true,
|
|
703
|
-
path: extensionDir,
|
|
704
|
-
},
|
|
705
|
-
]),
|
|
706
|
-
getFolderTrust: vi.fn(() => false),
|
|
707
|
-
isTrustedFolder: vi.fn(() => false),
|
|
708
|
-
};
|
|
709
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
710
|
-
const commands = await loader.loadCommands(signal);
|
|
711
|
-
expect(commands).toHaveLength(1);
|
|
712
|
-
const command = commands[0];
|
|
713
|
-
expect(command.name).toBe('my-cmd');
|
|
714
|
-
expect(command.extensionName).toBe('my-test-ext');
|
|
715
|
-
expect(command.extensionId).toBe(extensionId);
|
|
716
|
-
});
|
|
717
|
-
});
|
|
718
|
-
describe('Argument Handling Integration (via ShellProcessor)', () => {
|
|
719
|
-
it('correctly processes a command with {{args}}', async () => {
|
|
720
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
721
|
-
mock({
|
|
722
|
-
[userCommandsDir]: {
|
|
723
|
-
'shorthand.toml': 'prompt = "The user wants to: {{args}}"\ndescription = "Shorthand test"',
|
|
724
|
-
},
|
|
725
|
-
});
|
|
726
|
-
const loader = new FileCommandLoader(null);
|
|
727
|
-
const commands = await loader.loadCommands(signal);
|
|
728
|
-
const command = commands.find((c) => c.name === 'shorthand');
|
|
729
|
-
expect(command).toBeDefined();
|
|
730
|
-
const result = await command.action?.(createMockCommandContext({
|
|
731
|
-
invocation: {
|
|
732
|
-
raw: '/shorthand do something cool',
|
|
733
|
-
name: 'shorthand',
|
|
734
|
-
args: 'do something cool',
|
|
735
|
-
},
|
|
736
|
-
}), 'do something cool');
|
|
737
|
-
expect(result?.type).toBe('submit_prompt');
|
|
738
|
-
if (result?.type === 'submit_prompt') {
|
|
739
|
-
expect(result.content).toEqual([
|
|
740
|
-
{ text: 'The user wants to: do something cool' },
|
|
741
|
-
]);
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
});
|
|
745
|
-
describe('Default Argument Processor Integration', () => {
|
|
746
|
-
it('correctly processes a command without {{args}}', async () => {
|
|
747
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
748
|
-
mock({
|
|
749
|
-
[userCommandsDir]: {
|
|
750
|
-
'model_led.toml': 'prompt = "This is the instruction."\ndescription = "Default processor test"',
|
|
751
|
-
},
|
|
752
|
-
});
|
|
753
|
-
const loader = new FileCommandLoader(null);
|
|
754
|
-
const commands = await loader.loadCommands(signal);
|
|
755
|
-
const command = commands.find((c) => c.name === 'model_led');
|
|
756
|
-
expect(command).toBeDefined();
|
|
757
|
-
const result = await command.action?.(createMockCommandContext({
|
|
758
|
-
invocation: {
|
|
759
|
-
raw: '/model_led 1.2.0 added "a feature"',
|
|
760
|
-
name: 'model_led',
|
|
761
|
-
args: '1.2.0 added "a feature"',
|
|
762
|
-
},
|
|
763
|
-
}), '1.2.0 added "a feature"');
|
|
764
|
-
expect(result?.type).toBe('submit_prompt');
|
|
765
|
-
if (result?.type === 'submit_prompt') {
|
|
766
|
-
const expectedContent = 'This is the instruction.\n\n/model_led 1.2.0 added "a feature"';
|
|
767
|
-
expect(result.content).toEqual([{ text: expectedContent }]);
|
|
768
|
-
}
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
describe('Shell Processor Integration', () => {
|
|
772
|
-
it('instantiates ShellProcessor if {{args}} is present (even without shell trigger)', async () => {
|
|
773
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
774
|
-
mock({
|
|
775
|
-
[userCommandsDir]: {
|
|
776
|
-
'args_only.toml': `prompt = "Hello {{args}}"`,
|
|
777
|
-
},
|
|
778
|
-
});
|
|
779
|
-
const loader = new FileCommandLoader(null);
|
|
780
|
-
await loader.loadCommands(signal);
|
|
781
|
-
expect(ShellProcessor).toHaveBeenCalledWith('args_only');
|
|
782
|
-
});
|
|
783
|
-
it('instantiates ShellProcessor if the trigger is present', async () => {
|
|
784
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
785
|
-
mock({
|
|
786
|
-
[userCommandsDir]: {
|
|
787
|
-
'shell.toml': `prompt = "Run this: ${SHELL_INJECTION_TRIGGER}echo hello}"`,
|
|
788
|
-
},
|
|
789
|
-
});
|
|
790
|
-
const loader = new FileCommandLoader(null);
|
|
791
|
-
await loader.loadCommands(signal);
|
|
792
|
-
expect(ShellProcessor).toHaveBeenCalledWith('shell');
|
|
793
|
-
});
|
|
794
|
-
it('does not instantiate ShellProcessor if no triggers ({{args}} or !{}) are present', async () => {
|
|
795
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
796
|
-
mock({
|
|
797
|
-
[userCommandsDir]: {
|
|
798
|
-
'regular.toml': `prompt = "Just a regular prompt"`,
|
|
799
|
-
},
|
|
800
|
-
});
|
|
801
|
-
const loader = new FileCommandLoader(null);
|
|
802
|
-
await loader.loadCommands(signal);
|
|
803
|
-
expect(ShellProcessor).not.toHaveBeenCalled();
|
|
804
|
-
});
|
|
805
|
-
it('returns a "submit_prompt" action if shell processing succeeds', async () => {
|
|
806
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
807
|
-
mock({
|
|
808
|
-
[userCommandsDir]: {
|
|
809
|
-
'shell.toml': `prompt = "Run !{echo 'hello'}"`,
|
|
810
|
-
},
|
|
811
|
-
});
|
|
812
|
-
mockShellProcess.mockResolvedValue([{ text: 'Run hello' }]);
|
|
813
|
-
const loader = new FileCommandLoader(null);
|
|
814
|
-
const commands = await loader.loadCommands(signal);
|
|
815
|
-
const command = commands.find((c) => c.name === 'shell');
|
|
816
|
-
expect(command).toBeDefined();
|
|
817
|
-
const result = await command.action(createMockCommandContext({
|
|
818
|
-
invocation: { raw: '/shell', name: 'shell', args: '' },
|
|
819
|
-
}), '');
|
|
820
|
-
expect(result?.type).toBe('submit_prompt');
|
|
821
|
-
if (result?.type === 'submit_prompt') {
|
|
822
|
-
expect(result.content).toEqual([{ text: 'Run hello' }]);
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
it('returns a "confirm_shell_commands" action if shell processing requires it', async () => {
|
|
826
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
827
|
-
const rawInvocation = '/shell rm -rf /';
|
|
828
|
-
mock({
|
|
829
|
-
[userCommandsDir]: {
|
|
830
|
-
'shell.toml': `prompt = "Run !{rm -rf /}"`,
|
|
831
|
-
},
|
|
832
|
-
});
|
|
833
|
-
// Mock the processor to throw the specific error
|
|
834
|
-
const error = new ConfirmationRequiredError('Confirmation needed', [
|
|
835
|
-
'rm -rf /',
|
|
836
|
-
]);
|
|
837
|
-
mockShellProcess.mockRejectedValue(error);
|
|
838
|
-
const loader = new FileCommandLoader(null);
|
|
839
|
-
const commands = await loader.loadCommands(signal);
|
|
840
|
-
const command = commands.find((c) => c.name === 'shell');
|
|
841
|
-
expect(command).toBeDefined();
|
|
842
|
-
const result = await command.action(createMockCommandContext({
|
|
843
|
-
invocation: { raw: rawInvocation, name: 'shell', args: 'rm -rf /' },
|
|
844
|
-
}), 'rm -rf /');
|
|
845
|
-
expect(result?.type).toBe('confirm_shell_commands');
|
|
846
|
-
if (result?.type === 'confirm_shell_commands') {
|
|
847
|
-
expect(result.commandsToConfirm).toEqual(['rm -rf /']);
|
|
848
|
-
expect(result.originalInvocation.raw).toBe(rawInvocation);
|
|
849
|
-
}
|
|
850
|
-
});
|
|
851
|
-
it('re-throws other errors from the processor', async () => {
|
|
852
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
853
|
-
mock({
|
|
854
|
-
[userCommandsDir]: {
|
|
855
|
-
'shell.toml': `prompt = "Run !{something}"`,
|
|
856
|
-
},
|
|
857
|
-
});
|
|
858
|
-
const genericError = new Error('Something else went wrong');
|
|
859
|
-
mockShellProcess.mockRejectedValue(genericError);
|
|
860
|
-
const loader = new FileCommandLoader(null);
|
|
861
|
-
const commands = await loader.loadCommands(signal);
|
|
862
|
-
const command = commands.find((c) => c.name === 'shell');
|
|
863
|
-
expect(command).toBeDefined();
|
|
864
|
-
await expect(command.action(createMockCommandContext({
|
|
865
|
-
invocation: { raw: '/shell', name: 'shell', args: '' },
|
|
866
|
-
}), '')).rejects.toThrow('Something else went wrong');
|
|
867
|
-
});
|
|
868
|
-
it('assembles the processor pipeline in the correct order (AtFile -> Shell -> Default)', async () => {
|
|
869
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
870
|
-
mock({
|
|
871
|
-
[userCommandsDir]: {
|
|
872
|
-
// This prompt uses !{}, @{}, but NOT {{args}}, so all processors should be active.
|
|
873
|
-
'pipeline.toml': `
|
|
874
|
-
prompt = "Shell says: !{echo foo}. File says: @{./bar.txt}"
|
|
875
|
-
`,
|
|
876
|
-
},
|
|
877
|
-
'./bar.txt': 'bar content',
|
|
878
|
-
});
|
|
879
|
-
const defaultProcessMock = vi
|
|
880
|
-
.fn()
|
|
881
|
-
.mockImplementation((p) => Promise.resolve([
|
|
882
|
-
{ text: `${p[0].text}-default-processed` },
|
|
883
|
-
]));
|
|
884
|
-
mockShellProcess.mockImplementation((p) => Promise.resolve([
|
|
885
|
-
{ text: `${p[0].text}-shell-processed` },
|
|
886
|
-
]));
|
|
887
|
-
mockAtFileProcess.mockImplementation((p) => Promise.resolve([
|
|
888
|
-
{ text: `${p[0].text}-at-file-processed` },
|
|
889
|
-
]));
|
|
890
|
-
vi.mocked(DefaultArgumentProcessor).mockImplementation(() => ({
|
|
891
|
-
process: defaultProcessMock,
|
|
892
|
-
}));
|
|
893
|
-
const loader = new FileCommandLoader(null);
|
|
894
|
-
const commands = await loader.loadCommands(signal);
|
|
895
|
-
const command = commands.find((c) => c.name === 'pipeline');
|
|
896
|
-
expect(command).toBeDefined();
|
|
897
|
-
const result = await command.action(createMockCommandContext({
|
|
898
|
-
invocation: {
|
|
899
|
-
raw: '/pipeline baz',
|
|
900
|
-
name: 'pipeline',
|
|
901
|
-
args: 'baz',
|
|
902
|
-
},
|
|
903
|
-
}), 'baz');
|
|
904
|
-
expect(mockAtFileProcess.mock.invocationCallOrder[0]).toBeLessThan(mockShellProcess.mock.invocationCallOrder[0]);
|
|
905
|
-
expect(mockShellProcess.mock.invocationCallOrder[0]).toBeLessThan(defaultProcessMock.mock.invocationCallOrder[0]);
|
|
906
|
-
// Verify the flow of the prompt through the processors
|
|
907
|
-
// 1. AtFile processor runs first
|
|
908
|
-
expect(mockAtFileProcess).toHaveBeenCalledWith([{ text: expect.stringContaining('@{./bar.txt}') }], expect.any(Object));
|
|
909
|
-
// 2. Shell processor runs second
|
|
910
|
-
expect(mockShellProcess).toHaveBeenCalledWith([{ text: expect.stringContaining('-at-file-processed') }], expect.any(Object));
|
|
911
|
-
// 3. Default processor runs third
|
|
912
|
-
expect(defaultProcessMock).toHaveBeenCalledWith([{ text: expect.stringContaining('-shell-processed') }], expect.any(Object));
|
|
913
|
-
if (result?.type === 'submit_prompt') {
|
|
914
|
-
const contentAsArray = Array.isArray(result.content)
|
|
915
|
-
? result.content
|
|
916
|
-
: [result.content];
|
|
917
|
-
expect(contentAsArray.length).toBeGreaterThan(0);
|
|
918
|
-
const firstPart = contentAsArray[0];
|
|
919
|
-
if (typeof firstPart === 'object' && firstPart && 'text' in firstPart) {
|
|
920
|
-
expect(firstPart.text).toContain('-at-file-processed-shell-processed-default-processed');
|
|
921
|
-
}
|
|
922
|
-
else {
|
|
923
|
-
assert.fail('First part of content is not a text part or is a string');
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
else {
|
|
927
|
-
assert.fail('Incorrect action type');
|
|
928
|
-
}
|
|
929
|
-
});
|
|
930
|
-
});
|
|
931
|
-
describe('@-file Processor Integration', () => {
|
|
932
|
-
it('correctly processes a command with @{file}', async () => {
|
|
933
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
934
|
-
mock({
|
|
935
|
-
[userCommandsDir]: {
|
|
936
|
-
'at-file.toml': 'prompt = "Context from file: @{./test.txt}"\ndescription = "@-file test"',
|
|
937
|
-
},
|
|
938
|
-
'./test.txt': 'file content',
|
|
939
|
-
});
|
|
940
|
-
mockAtFileProcess.mockImplementation(async (prompt) => {
|
|
941
|
-
// A simplified mock of AtFileProcessor's behavior
|
|
942
|
-
const textContent = prompt[0].text;
|
|
943
|
-
if (textContent.includes('@{./test.txt}')) {
|
|
944
|
-
return [
|
|
945
|
-
{
|
|
946
|
-
text: textContent.replace('@{./test.txt}', 'file content'),
|
|
947
|
-
},
|
|
948
|
-
];
|
|
949
|
-
}
|
|
950
|
-
return prompt;
|
|
951
|
-
});
|
|
952
|
-
// Prevent default processor from interfering
|
|
953
|
-
vi.mocked(DefaultArgumentProcessor).mockImplementation(() => ({
|
|
954
|
-
process: (p) => Promise.resolve(p),
|
|
955
|
-
}));
|
|
956
|
-
const loader = new FileCommandLoader(null);
|
|
957
|
-
const commands = await loader.loadCommands(signal);
|
|
958
|
-
const command = commands.find((c) => c.name === 'at-file');
|
|
959
|
-
expect(command).toBeDefined();
|
|
960
|
-
const result = await command.action?.(createMockCommandContext({
|
|
961
|
-
invocation: {
|
|
962
|
-
raw: '/at-file',
|
|
963
|
-
name: 'at-file',
|
|
964
|
-
args: '',
|
|
965
|
-
},
|
|
966
|
-
}), '');
|
|
967
|
-
expect(result?.type).toBe('submit_prompt');
|
|
968
|
-
if (result?.type === 'submit_prompt') {
|
|
969
|
-
expect(result.content).toEqual([
|
|
970
|
-
{ text: 'Context from file: file content' },
|
|
971
|
-
]);
|
|
972
|
-
}
|
|
973
|
-
});
|
|
974
|
-
});
|
|
975
|
-
describe('with folder trust enabled', () => {
|
|
976
|
-
it('loads multiple commands', async () => {
|
|
977
|
-
const mockConfig = {
|
|
978
|
-
getProjectRoot: vi.fn(() => '/path/to/project'),
|
|
979
|
-
getExtensions: vi.fn(() => []),
|
|
980
|
-
getFolderTrust: vi.fn(() => true),
|
|
981
|
-
isTrustedFolder: vi.fn(() => true),
|
|
982
|
-
};
|
|
983
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
984
|
-
mock({
|
|
985
|
-
[userCommandsDir]: {
|
|
986
|
-
'test1.toml': 'prompt = "Prompt 1"',
|
|
987
|
-
'test2.toml': 'prompt = "Prompt 2"',
|
|
988
|
-
},
|
|
989
|
-
});
|
|
990
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
991
|
-
const commands = await loader.loadCommands(signal);
|
|
992
|
-
expect(commands).toHaveLength(2);
|
|
993
|
-
});
|
|
994
|
-
it('does not load when folder is not trusted', async () => {
|
|
995
|
-
const mockConfig = {
|
|
996
|
-
getProjectRoot: vi.fn(() => '/path/to/project'),
|
|
997
|
-
getExtensions: vi.fn(() => []),
|
|
998
|
-
getFolderTrust: vi.fn(() => true),
|
|
999
|
-
isTrustedFolder: vi.fn(() => false),
|
|
1000
|
-
};
|
|
1001
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1002
|
-
mock({
|
|
1003
|
-
[userCommandsDir]: {
|
|
1004
|
-
'test1.toml': 'prompt = "Prompt 1"',
|
|
1005
|
-
'test2.toml': 'prompt = "Prompt 2"',
|
|
1006
|
-
},
|
|
1007
|
-
});
|
|
1008
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
1009
|
-
const commands = await loader.loadCommands(signal);
|
|
1010
|
-
expect(commands).toHaveLength(0);
|
|
1011
|
-
});
|
|
1012
|
-
});
|
|
1013
|
-
describe('Aborted signal', () => {
|
|
1014
|
-
it('does not log errors if the signal is aborted', async () => {
|
|
1015
|
-
const controller = new AbortController();
|
|
1016
|
-
const abortSignal = controller.signal;
|
|
1017
|
-
const consoleErrorSpy = vi
|
|
1018
|
-
.spyOn(console, 'error')
|
|
1019
|
-
.mockImplementation(() => { });
|
|
1020
|
-
const mockConfig = {
|
|
1021
|
-
getProjectRoot: vi.fn(() => '/path/to/project'),
|
|
1022
|
-
getExtensions: vi.fn(() => []),
|
|
1023
|
-
getFolderTrust: vi.fn(() => false),
|
|
1024
|
-
isTrustedFolder: vi.fn(() => false),
|
|
1025
|
-
};
|
|
1026
|
-
// Set up mock-fs so that the loader attempts to read a directory.
|
|
1027
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1028
|
-
mock({
|
|
1029
|
-
[userCommandsDir]: {
|
|
1030
|
-
'test1.toml': 'prompt = "Prompt 1"',
|
|
1031
|
-
},
|
|
1032
|
-
});
|
|
1033
|
-
const loader = new FileCommandLoader(mockConfig);
|
|
1034
|
-
// Mock glob to throw an AbortError
|
|
1035
|
-
const abortError = new DOMException('Aborted', 'AbortError');
|
|
1036
|
-
vi.mocked(glob.glob).mockImplementation(async () => {
|
|
1037
|
-
controller.abort(); // Ensure the signal is aborted when the service checks
|
|
1038
|
-
throw abortError;
|
|
1039
|
-
});
|
|
1040
|
-
await loader.loadCommands(abortSignal);
|
|
1041
|
-
expect(consoleErrorSpy).not.toHaveBeenCalled();
|
|
1042
|
-
consoleErrorSpy.mockRestore();
|
|
1043
|
-
});
|
|
1044
|
-
});
|
|
1045
|
-
describe('Sanitization', () => {
|
|
1046
|
-
it('sanitizes command names from filenames containing control characters', async () => {
|
|
1047
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1048
|
-
mock({
|
|
1049
|
-
[userCommandsDir]: {
|
|
1050
|
-
'test\twith\nnewlines.toml': 'prompt = "Test prompt"',
|
|
1051
|
-
},
|
|
1052
|
-
});
|
|
1053
|
-
const loader = new FileCommandLoader(null);
|
|
1054
|
-
const commands = await loader.loadCommands(signal);
|
|
1055
|
-
expect(commands).toHaveLength(1);
|
|
1056
|
-
// Non-alphanumeric characters (except - and .) become underscores
|
|
1057
|
-
expect(commands[0].name).toBe('test_with_newlines');
|
|
1058
|
-
});
|
|
1059
|
-
it('truncates excessively long filenames', async () => {
|
|
1060
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1061
|
-
const longName = 'a'.repeat(60) + '.toml';
|
|
1062
|
-
mock({
|
|
1063
|
-
[userCommandsDir]: {
|
|
1064
|
-
[longName]: 'prompt = "Test prompt"',
|
|
1065
|
-
},
|
|
1066
|
-
});
|
|
1067
|
-
const loader = new FileCommandLoader(null);
|
|
1068
|
-
const commands = await loader.loadCommands(signal);
|
|
1069
|
-
expect(commands).toHaveLength(1);
|
|
1070
|
-
expect(commands[0].name.length).toBe(50);
|
|
1071
|
-
expect(commands[0].name).toBe('a'.repeat(47) + '...');
|
|
1072
|
-
});
|
|
1073
|
-
it('sanitizes descriptions containing newlines and ANSI codes', async () => {
|
|
1074
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1075
|
-
mock({
|
|
1076
|
-
[userCommandsDir]: {
|
|
1077
|
-
'test.toml': 'prompt = "Test"\ndescription = "Line 1\\nLine 2\\tTabbed\\r\\n\\u001B[31mRed text\\u001B[0m"',
|
|
1078
|
-
},
|
|
1079
|
-
});
|
|
1080
|
-
const loader = new FileCommandLoader(null);
|
|
1081
|
-
const commands = await loader.loadCommands(signal);
|
|
1082
|
-
expect(commands).toHaveLength(1);
|
|
1083
|
-
// Newlines and tabs become spaces, ANSI is stripped
|
|
1084
|
-
expect(commands[0].description).toBe('Line 1 Line 2 Tabbed Red text');
|
|
1085
|
-
});
|
|
1086
|
-
it('truncates long descriptions', async () => {
|
|
1087
|
-
const userCommandsDir = Storage.getUserCommandsDir();
|
|
1088
|
-
const longDesc = 'd'.repeat(150);
|
|
1089
|
-
mock({
|
|
1090
|
-
[userCommandsDir]: {
|
|
1091
|
-
'test.toml': `prompt = "Test"\ndescription = "${longDesc}"`,
|
|
1092
|
-
},
|
|
1093
|
-
});
|
|
1094
|
-
const loader = new FileCommandLoader(null);
|
|
1095
|
-
const commands = await loader.loadCommands(signal);
|
|
1096
|
-
expect(commands).toHaveLength(1);
|
|
1097
|
-
expect(commands[0].description.length).toBe(100);
|
|
1098
|
-
expect(commands[0].description).toBe('d'.repeat(97) + '...');
|
|
1099
|
-
});
|
|
1100
|
-
});
|
|
1101
|
-
});
|
|
1102
|
-
//# sourceMappingURL=FileCommandLoader.test.js.map
|