@didim365/agent-cli 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +5 -2
- package/dist/src/config/settingsSchema.d.ts +85 -0
- package/dist/src/config/settingsSchema.js +85 -0
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/core/initializer.js +42 -3
- package/dist/src/core/initializer.js.map +1 -1
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +79 -5
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/test-utils/render.js +9 -0
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/AppContainer.js +182 -9
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.d.ts +3 -1
- package/dist/src/ui/auth/ApiAuthDialog.js +7 -5
- package/dist/src/ui/auth/ApiAuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.d.ts +3 -1
- package/dist/src/ui/auth/AuthDialog.js +6 -6
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/ProviderSelectDialog.d.ts +15 -0
- package/dist/src/ui/auth/ProviderSelectDialog.js +39 -0
- package/dist/src/ui/auth/ProviderSelectDialog.js.map +1 -0
- package/dist/src/ui/auth/SlmConfigDialog.d.ts +21 -0
- package/dist/src/ui/auth/SlmConfigDialog.js +170 -0
- package/dist/src/ui/auth/SlmConfigDialog.js.map +1 -0
- package/dist/src/ui/auth/VertexConfigDialog.d.ts +18 -0
- package/dist/src/ui/auth/VertexConfigDialog.js +97 -0
- package/dist/src/ui/auth/VertexConfigDialog.js.map +1 -0
- package/dist/src/ui/auth/providerMetadata.d.ts +38 -0
- package/dist/src/ui/auth/providerMetadata.js +71 -0
- package/dist/src/ui/auth/providerMetadata.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +3 -0
- package/dist/src/ui/auth/useAuth.js +243 -39
- package/dist/src/ui/auth/useAuth.js.map +1 -1
- package/dist/src/ui/commands/authCommand.js +18 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.js +1 -1
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/rewindCommand.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/DialogManager.js +27 -2
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +1 -1
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +14 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +4 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/useRewind.js.map +1 -1
- package/dist/src/ui/types.d.ts +4 -1
- package/dist/src/ui/types.js +6 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/mouse.js +1 -1
- package/dist/src/ui/utils/mouse.js.map +1 -1
- package/dist/src/ui/utils/rewindFileOps.js.map +1 -1
- package/package.json +6 -3
- package/dist/src/commands/extensions/configure.test.d.ts +0 -1
- package/dist/src/commands/extensions/configure.test.js +0 -197
- package/dist/src/commands/extensions/configure.test.js.map +0 -1
- package/dist/src/commands/extensions/disable.test.d.ts +0 -6
- package/dist/src/commands/extensions/disable.test.js +0 -169
- package/dist/src/commands/extensions/disable.test.js.map +0 -1
- package/dist/src/commands/extensions/enable.test.d.ts +0 -6
- package/dist/src/commands/extensions/enable.test.js +0 -199
- package/dist/src/commands/extensions/enable.test.js.map +0 -1
- package/dist/src/commands/extensions/install.test.d.ts +0 -6
- package/dist/src/commands/extensions/install.test.js +0 -140
- package/dist/src/commands/extensions/install.test.js.map +0 -1
- package/dist/src/commands/extensions/link.test.d.ts +0 -6
- package/dist/src/commands/extensions/link.test.js +0 -137
- package/dist/src/commands/extensions/link.test.js.map +0 -1
- package/dist/src/commands/extensions/list.test.d.ts +0 -6
- package/dist/src/commands/extensions/list.test.js +0 -148
- package/dist/src/commands/extensions/list.test.js.map +0 -1
- package/dist/src/commands/extensions/new.test.d.ts +0 -6
- package/dist/src/commands/extensions/new.test.js +0 -62
- package/dist/src/commands/extensions/new.test.js.map +0 -1
- package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
- package/dist/src/commands/extensions/uninstall.test.js +0 -199
- package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
- package/dist/src/commands/extensions/update.test.d.ts +0 -6
- package/dist/src/commands/extensions/update.test.js +0 -170
- package/dist/src/commands/extensions/update.test.js.map +0 -1
- package/dist/src/commands/extensions/validate.test.d.ts +0 -6
- package/dist/src/commands/extensions/validate.test.js +0 -96
- package/dist/src/commands/extensions/validate.test.js.map +0 -1
- package/dist/src/commands/extensions.test.d.ts +0 -6
- package/dist/src/commands/extensions.test.js +0 -67
- package/dist/src/commands/extensions.test.js.map +0 -1
- package/dist/src/commands/hooks/migrate.test.d.ts +0 -6
- package/dist/src/commands/hooks/migrate.test.js +0 -388
- package/dist/src/commands/hooks/migrate.test.js.map +0 -1
- package/dist/src/commands/mcp/add.test.d.ts +0 -6
- package/dist/src/commands/mcp/add.test.js +0 -274
- package/dist/src/commands/mcp/add.test.js.map +0 -1
- package/dist/src/commands/mcp/list.test.d.ts +0 -6
- package/dist/src/commands/mcp/list.test.js +0 -150
- package/dist/src/commands/mcp/list.test.js.map +0 -1
- package/dist/src/commands/mcp/remove.test.d.ts +0 -6
- package/dist/src/commands/mcp/remove.test.js +0 -189
- package/dist/src/commands/mcp/remove.test.js.map +0 -1
- package/dist/src/commands/mcp.test.d.ts +0 -6
- package/dist/src/commands/mcp.test.js +0 -65
- package/dist/src/commands/mcp.test.js.map +0 -1
- package/dist/src/commands/skills/disable.test.d.ts +0 -6
- package/dist/src/commands/skills/disable.test.js +0 -96
- package/dist/src/commands/skills/disable.test.js.map +0 -1
- package/dist/src/commands/skills/enable.test.d.ts +0 -6
- package/dist/src/commands/skills/enable.test.js +0 -107
- package/dist/src/commands/skills/enable.test.js.map +0 -1
- package/dist/src/commands/skills/install.test.d.ts +0 -6
- package/dist/src/commands/skills/install.test.js +0 -95
- package/dist/src/commands/skills/install.test.js.map +0 -1
- package/dist/src/commands/skills/list.test.d.ts +0 -6
- package/dist/src/commands/skills/list.test.js +0 -136
- package/dist/src/commands/skills/list.test.js.map +0 -1
- package/dist/src/commands/skills/uninstall.test.d.ts +0 -6
- package/dist/src/commands/skills/uninstall.test.js +0 -61
- package/dist/src/commands/skills/uninstall.test.js.map +0 -1
- package/dist/src/commands/skills.test.d.ts +0 -6
- package/dist/src/commands/skills.test.js +0 -49
- package/dist/src/commands/skills.test.js.map +0 -1
- package/dist/src/commands/utils.test.d.ts +0 -6
- package/dist/src/commands/utils.test.js +0 -35
- package/dist/src/commands/utils.test.js.map +0 -1
- package/dist/src/config/auth.test.d.ts +0 -6
- package/dist/src/config/auth.test.js +0 -89
- package/dist/src/config/auth.test.js.map +0 -1
- package/dist/src/config/config.integration.test.d.ts +0 -6
- package/dist/src/config/config.integration.test.js +0 -205
- package/dist/src/config/config.integration.test.js.map +0 -1
- package/dist/src/config/config.test.d.ts +0 -6
- package/dist/src/config/config.test.js +0 -2413
- package/dist/src/config/config.test.js.map +0 -1
- package/dist/src/config/extension-manager-agents.test.d.ts +0 -6
- package/dist/src/config/extension-manager-agents.test.js +0 -114
- package/dist/src/config/extension-manager-agents.test.js.map +0 -1
- package/dist/src/config/extension-manager-scope.test.d.ts +0 -6
- package/dist/src/config/extension-manager-scope.test.js +0 -153
- package/dist/src/config/extension-manager-scope.test.js.map +0 -1
- package/dist/src/config/extension-manager-skills.test.d.ts +0 -6
- package/dist/src/config/extension-manager-skills.test.js +0 -148
- package/dist/src/config/extension-manager-skills.test.js.map +0 -1
- package/dist/src/config/extension.test.d.ts +0 -6
- package/dist/src/config/extension.test.js +0 -1671
- package/dist/src/config/extension.test.js.map +0 -1
- package/dist/src/config/extensions/consent.test.d.ts +0 -6
- package/dist/src/config/extensions/consent.test.js +0 -280
- package/dist/src/config/extensions/consent.test.js.map +0 -1
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionEnablement.test.js +0 -404
- package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
- package/dist/src/config/extensions/extensionSettings.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionSettings.test.js +0 -493
- package/dist/src/config/extensions/extensionSettings.test.js.map +0 -1
- package/dist/src/config/extensions/extensionUpdates.test.d.ts +0 -6
- package/dist/src/config/extensions/extensionUpdates.test.js +0 -230
- package/dist/src/config/extensions/extensionUpdates.test.js.map +0 -1
- package/dist/src/config/extensions/github.test.d.ts +0 -6
- package/dist/src/config/extensions/github.test.js +0 -441
- package/dist/src/config/extensions/github.test.js.map +0 -1
- package/dist/src/config/extensions/github_fetch.test.d.ts +0 -6
- package/dist/src/config/extensions/github_fetch.test.js +0 -169
- package/dist/src/config/extensions/github_fetch.test.js.map +0 -1
- package/dist/src/config/extensions/storage.test.d.ts +0 -6
- package/dist/src/config/extensions/storage.test.js +0 -64
- package/dist/src/config/extensions/storage.test.js.map +0 -1
- package/dist/src/config/extensions/update.test.d.ts +0 -6
- package/dist/src/config/extensions/update.test.js +0 -231
- package/dist/src/config/extensions/update.test.js.map +0 -1
- package/dist/src/config/extensions/variables.test.d.ts +0 -6
- package/dist/src/config/extensions/variables.test.js +0 -103
- package/dist/src/config/extensions/variables.test.js.map +0 -1
- package/dist/src/config/keyBindings.test.d.ts +0 -6
- package/dist/src/config/keyBindings.test.js +0 -108
- package/dist/src/config/keyBindings.test.js.map +0 -1
- package/dist/src/config/mcp/mcpServerEnablement.test.d.ts +0 -6
- package/dist/src/config/mcp/mcpServerEnablement.test.js +0 -147
- package/dist/src/config/mcp/mcpServerEnablement.test.js.map +0 -1
- package/dist/src/config/policy-engine.integration.test.d.ts +0 -6
- package/dist/src/config/policy-engine.integration.test.js +0 -353
- package/dist/src/config/policy-engine.integration.test.js.map +0 -1
- package/dist/src/config/sandboxConfig.test.d.ts +0 -6
- package/dist/src/config/sandboxConfig.test.js +0 -184
- package/dist/src/config/sandboxConfig.test.js.map +0 -1
- package/dist/src/config/settingPaths.test.d.ts +0 -6
- package/dist/src/config/settingPaths.test.js +0 -22
- package/dist/src/config/settingPaths.test.js.map +0 -1
- package/dist/src/config/settings-validation.test.d.ts +0 -6
- package/dist/src/config/settings-validation.test.js +0 -370
- package/dist/src/config/settings-validation.test.js.map +0 -1
- package/dist/src/config/settings.test.d.ts +0 -6
- package/dist/src/config/settings.test.js +0 -1822
- package/dist/src/config/settings.test.js.map +0 -1
- package/dist/src/config/settingsSchema.test.d.ts +0 -6
- package/dist/src/config/settingsSchema.test.js +0 -309
- package/dist/src/config/settingsSchema.test.js.map +0 -1
- package/dist/src/config/settings_repro.test.d.ts +0 -6
- package/dist/src/config/settings_repro.test.js +0 -166
- package/dist/src/config/settings_repro.test.js.map +0 -1
- package/dist/src/config/settings_validation_warning.test.d.ts +0 -6
- package/dist/src/config/settings_validation_warning.test.js +0 -123
- package/dist/src/config/settings_validation_warning.test.js.map +0 -1
- package/dist/src/config/skills-backward-compatibility.test.d.ts +0 -6
- package/dist/src/config/skills-backward-compatibility.test.js +0 -99
- package/dist/src/config/skills-backward-compatibility.test.js.map +0 -1
- package/dist/src/config/trustedFolders.test.d.ts +0 -6
- package/dist/src/config/trustedFolders.test.js +0 -385
- package/dist/src/config/trustedFolders.test.js.map +0 -1
- package/dist/src/core/auth.test.d.ts +0 -6
- package/dist/src/core/auth.test.js +0 -47
- package/dist/src/core/auth.test.js.map +0 -1
- package/dist/src/core/initializer.test.d.ts +0 -6
- package/dist/src/core/initializer.test.js +0 -101
- package/dist/src/core/initializer.test.js.map +0 -1
- package/dist/src/core/theme.test.d.ts +0 -6
- package/dist/src/core/theme.test.js +0 -46
- package/dist/src/core/theme.test.js.map +0 -1
- package/dist/src/deferred.test.d.ts +0 -6
- package/dist/src/deferred.test.js +0 -164
- package/dist/src/deferred.test.js.map +0 -1
- package/dist/src/gemini.test.d.ts +0 -6
- package/dist/src/gemini.test.js +0 -1334
- package/dist/src/gemini.test.js.map +0 -1
- package/dist/src/gemini_cleanup.test.d.ts +0 -6
- package/dist/src/gemini_cleanup.test.js +0 -208
- package/dist/src/gemini_cleanup.test.js.map +0 -1
- package/dist/src/nonInteractiveCli.test.d.ts +0 -6
- package/dist/src/nonInteractiveCli.test.js +0 -1687
- package/dist/src/nonInteractiveCli.test.js.map +0 -1
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
- package/dist/src/services/BuiltinCommandLoader.test.js +0 -254
- package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
- package/dist/src/services/CommandService.test.d.ts +0 -6
- package/dist/src/services/CommandService.test.js +0 -234
- package/dist/src/services/CommandService.test.js.map +0 -1
- package/dist/src/services/FileCommandLoader.test.d.ts +0 -6
- package/dist/src/services/FileCommandLoader.test.js +0 -1102
- package/dist/src/services/FileCommandLoader.test.js.map +0 -1
- package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
- package/dist/src/services/McpPromptLoader.test.js +0 -411
- package/dist/src/services/McpPromptLoader.test.js.map +0 -1
- package/dist/src/services/prompt-processors/argumentProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/argumentProcessor.test.js +0 -40
- package/dist/src/services/prompt-processors/argumentProcessor.test.js.map +0 -1
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -174
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.d.ts +0 -6
- package/dist/src/services/prompt-processors/shellProcessor.test.js +0 -514
- package/dist/src/services/prompt-processors/shellProcessor.test.js.map +0 -1
- package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
- package/dist/src/test-utils/mockCommandContext.test.js +0 -51
- package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
- package/dist/src/test-utils/render.test.d.ts +0 -6
- package/dist/src/test-utils/render.test.js +0 -79
- package/dist/src/test-utils/render.test.js.map +0 -1
- package/dist/src/ui/App.test.d.ts +0 -6
- package/dist/src/ui/App.test.js +0 -218
- package/dist/src/ui/App.test.js.map +0 -1
- package/dist/src/ui/AppContainer.test.d.ts +0 -6
- package/dist/src/ui/AppContainer.test.js +0 -2072
- package/dist/src/ui/AppContainer.test.js.map +0 -1
- package/dist/src/ui/IdeIntegrationNudge.test.d.ts +0 -6
- package/dist/src/ui/IdeIntegrationNudge.test.js +0 -158
- package/dist/src/ui/IdeIntegrationNudge.test.js.map +0 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/ApiAuthDialog.test.js +0 -109
- package/dist/src/ui/auth/ApiAuthDialog.test.js.map +0 -1
- package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/AuthDialog.test.js +0 -309
- package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/auth/AuthInProgress.test.d.ts +0 -6
- package/dist/src/ui/auth/AuthInProgress.test.js +0 -81
- package/dist/src/ui/auth/AuthInProgress.test.js.map +0 -1
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.d.ts +0 -6
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js +0 -66
- package/dist/src/ui/auth/LoginWithGoogleRestartDialog.test.js.map +0 -1
- package/dist/src/ui/auth/useAuth.test.d.ts +0 -6
- package/dist/src/ui/auth/useAuth.test.js +0 -189
- package/dist/src/ui/auth/useAuth.test.js.map +0 -1
- package/dist/src/ui/commands/aboutCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/aboutCommand.test.js +0 -143
- package/dist/src/ui/commands/aboutCommand.test.js.map +0 -1
- package/dist/src/ui/commands/agentsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/agentsCommand.test.js +0 -344
- package/dist/src/ui/commands/agentsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/authCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/authCommand.test.js +0 -98
- package/dist/src/ui/commands/authCommand.test.js.map +0 -1
- package/dist/src/ui/commands/bugCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/bugCommand.test.js +0 -186
- package/dist/src/ui/commands/bugCommand.test.js.map +0 -1
- package/dist/src/ui/commands/chatCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/chatCommand.test.js +0 -620
- package/dist/src/ui/commands/chatCommand.test.js.map +0 -1
- package/dist/src/ui/commands/clearCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/clearCommand.test.js +0 -87
- package/dist/src/ui/commands/clearCommand.test.js.map +0 -1
- package/dist/src/ui/commands/compressCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/compressCommand.test.js +0 -98
- package/dist/src/ui/commands/compressCommand.test.js.map +0 -1
- package/dist/src/ui/commands/copyCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/copyCommand.test.js +0 -242
- package/dist/src/ui/commands/copyCommand.test.js.map +0 -1
- package/dist/src/ui/commands/corgiCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/corgiCommand.test.js +0 -28
- package/dist/src/ui/commands/corgiCommand.test.js.map +0 -1
- package/dist/src/ui/commands/directoryCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/directoryCommand.test.js +0 -353
- package/dist/src/ui/commands/directoryCommand.test.js.map +0 -1
- package/dist/src/ui/commands/docsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/docsCommand.test.js +0 -72
- package/dist/src/ui/commands/docsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/editorCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/editorCommand.test.js +0 -27
- package/dist/src/ui/commands/editorCommand.test.js.map +0 -1
- package/dist/src/ui/commands/extensionsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/extensionsCommand.test.js +0 -778
- package/dist/src/ui/commands/extensionsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/helpCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/helpCommand.test.js +0 -42
- package/dist/src/ui/commands/helpCommand.test.js.map +0 -1
- package/dist/src/ui/commands/hooksCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/hooksCommand.test.js +0 -572
- package/dist/src/ui/commands/hooksCommand.test.js.map +0 -1
- package/dist/src/ui/commands/ideCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/ideCommand.test.js +0 -203
- package/dist/src/ui/commands/ideCommand.test.js.map +0 -1
- package/dist/src/ui/commands/initCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/initCommand.test.js +0 -84
- package/dist/src/ui/commands/initCommand.test.js.map +0 -1
- package/dist/src/ui/commands/mcpCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/mcpCommand.test.js +0 -189
- package/dist/src/ui/commands/mcpCommand.test.js.map +0 -1
- package/dist/src/ui/commands/memoryCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/memoryCommand.test.js +0 -350
- package/dist/src/ui/commands/memoryCommand.test.js.map +0 -1
- package/dist/src/ui/commands/modelCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/modelCommand.test.js +0 -41
- package/dist/src/ui/commands/modelCommand.test.js.map +0 -1
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/permissionsCommand.test.js +0 -86
- package/dist/src/ui/commands/permissionsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/policiesCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/policiesCommand.test.js +0 -87
- package/dist/src/ui/commands/policiesCommand.test.js.map +0 -1
- package/dist/src/ui/commands/privacyCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/privacyCommand.test.js +0 -32
- package/dist/src/ui/commands/privacyCommand.test.js.map +0 -1
- package/dist/src/ui/commands/quitCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/quitCommand.test.js +0 -50
- package/dist/src/ui/commands/quitCommand.test.js.map +0 -1
- package/dist/src/ui/commands/restoreCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/restoreCommand.test.js +0 -190
- package/dist/src/ui/commands/restoreCommand.test.js.map +0 -1
- package/dist/src/ui/commands/rewindCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/rewindCommand.test.js +0 -242
- package/dist/src/ui/commands/rewindCommand.test.js.map +0 -1
- package/dist/src/ui/commands/settingsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/settingsCommand.test.js +0 -30
- package/dist/src/ui/commands/settingsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/setupGithubCommand.test.js +0 -238
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
- package/dist/src/ui/commands/skillsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/skillsCommand.test.js +0 -426
- package/dist/src/ui/commands/skillsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/statsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/statsCommand.test.js +0 -70
- package/dist/src/ui/commands/statsCommand.test.js.map +0 -1
- package/dist/src/ui/commands/terminalSetupCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/terminalSetupCommand.test.js +0 -66
- package/dist/src/ui/commands/terminalSetupCommand.test.js.map +0 -1
- package/dist/src/ui/commands/themeCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/themeCommand.test.js +0 -32
- package/dist/src/ui/commands/themeCommand.test.js.map +0 -1
- package/dist/src/ui/commands/toolsCommand.test.d.ts +0 -6
- package/dist/src/ui/commands/toolsCommand.test.js +0 -100
- package/dist/src/ui/commands/toolsCommand.test.js.map +0 -1
- package/dist/src/ui/components/AboutBox.test.d.ts +0 -6
- package/dist/src/ui/components/AboutBox.test.js +0 -59
- package/dist/src/ui/components/AboutBox.test.js.map +0 -1
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js +0 -43
- package/dist/src/ui/components/AdminSettingsChangedDialog.test.js.map +0 -1
- package/dist/src/ui/components/AgentConfigDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AgentConfigDialog.test.js +0 -241
- package/dist/src/ui/components/AgentConfigDialog.test.js.map +0 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +0 -190
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +0 -1
- package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
- package/dist/src/ui/components/AnsiOutput.test.js +0 -92
- package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
- package/dist/src/ui/components/AppHeader.test.d.ts +0 -6
- package/dist/src/ui/components/AppHeader.test.js +0 -225
- package/dist/src/ui/components/AppHeader.test.js.map +0 -1
- package/dist/src/ui/components/ApprovalModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/ApprovalModeIndicator.test.js +0 -37
- package/dist/src/ui/components/ApprovalModeIndicator.test.js.map +0 -1
- package/dist/src/ui/components/AskUserDialog.test.d.ts +0 -6
- package/dist/src/ui/components/AskUserDialog.test.js +0 -598
- package/dist/src/ui/components/AskUserDialog.test.js.map +0 -1
- package/dist/src/ui/components/Banner.test.d.ts +0 -6
- package/dist/src/ui/components/Banner.test.js +0 -24
- package/dist/src/ui/components/Banner.test.js.map +0 -1
- package/dist/src/ui/components/CliSpinner.test.d.ts +0 -6
- package/dist/src/ui/components/CliSpinner.test.js +0 -28
- package/dist/src/ui/components/CliSpinner.test.js.map +0 -1
- package/dist/src/ui/components/Composer.test.d.ts +0 -6
- package/dist/src/ui/components/Composer.test.js +0 -383
- package/dist/src/ui/components/Composer.test.js.map +0 -1
- package/dist/src/ui/components/ConfigInitDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ConfigInitDisplay.test.js +0 -117
- package/dist/src/ui/components/ConfigInitDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/ConsentPrompt.test.js +0 -77
- package/dist/src/ui/components/ConsentPrompt.test.js.map +0 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js +0 -26
- package/dist/src/ui/components/ConsoleSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ContextSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ContextSummaryDisplay.test.js +0 -102
- package/dist/src/ui/components/ContextSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ContextUsageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ContextUsageDisplay.test.js +0 -43
- package/dist/src/ui/components/ContextUsageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/CopyModeWarning.test.d.ts +0 -6
- package/dist/src/ui/components/CopyModeWarning.test.js +0 -33
- package/dist/src/ui/components/CopyModeWarning.test.js.map +0 -1
- package/dist/src/ui/components/DebugProfiler.test.d.ts +0 -6
- package/dist/src/ui/components/DebugProfiler.test.js +0 -229
- package/dist/src/ui/components/DebugProfiler.test.js.map +0 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js +0 -39
- package/dist/src/ui/components/DetailedMessagesDisplay.test.js.map +0 -1
- package/dist/src/ui/components/DialogManager.test.d.ts +0 -6
- package/dist/src/ui/components/DialogManager.test.js +0 -177
- package/dist/src/ui/components/DialogManager.test.js.map +0 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/EditorSettingsDialog.test.js +0 -119
- package/dist/src/ui/components/EditorSettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/ExitWarning.test.d.ts +0 -6
- package/dist/src/ui/components/ExitWarning.test.js +0 -54
- package/dist/src/ui/components/ExitWarning.test.js.map +0 -1
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/FolderTrustDialog.test.js +0 -102
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/Footer.test.d.ts +0 -6
- package/dist/src/ui/components/Footer.test.js +0 -321
- package/dist/src/ui/components/Footer.test.js.map +0 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.test.d.ts +0 -6
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js +0 -61
- package/dist/src/ui/components/GeminiRespondingSpinner.test.js.map +0 -1
- package/dist/src/ui/components/GradientRegression.test.d.ts +0 -6
- package/dist/src/ui/components/GradientRegression.test.js +0 -105
- package/dist/src/ui/components/GradientRegression.test.js.map +0 -1
- package/dist/src/ui/components/Header.test.d.ts +0 -6
- package/dist/src/ui/components/Header.test.js +0 -147
- package/dist/src/ui/components/Header.test.js.map +0 -1
- package/dist/src/ui/components/Help.test.d.ts +0 -6
- package/dist/src/ui/components/Help.test.js +0 -67
- package/dist/src/ui/components/Help.test.js.map +0 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -207
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
- package/dist/src/ui/components/HookStatusDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/HookStatusDisplay.test.js +0 -51
- package/dist/src/ui/components/HookStatusDisplay.test.js.map +0 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +0 -6
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +0 -58
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
- package/dist/src/ui/components/InputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/InputPrompt.test.js +0 -2596
- package/dist/src/ui/components/InputPrompt.test.js.map +0 -1
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/LoadingIndicator.test.js +0 -207
- package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/components/LogoutConfirmationDialog.test.d.ts +0 -6
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js +0 -59
- package/dist/src/ui/components/LogoutConfirmationDialog.test.js.map +0 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -25
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/MainContent.test.d.ts +0 -6
- package/dist/src/ui/components/MainContent.test.js +0 -83
- package/dist/src/ui/components/MainContent.test.js.map +0 -1
- package/dist/src/ui/components/MemoryUsageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/MemoryUsageDisplay.test.js +0 -49
- package/dist/src/ui/components/MemoryUsageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/ModelDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ModelDialog.test.js +0 -197
- package/dist/src/ui/components/ModelDialog.test.js.map +0 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ModelStatsDisplay.test.js +0 -343
- package/dist/src/ui/components/ModelStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js +0 -162
- package/dist/src/ui/components/MultiFolderTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/NewAgentsNotification.test.d.ts +0 -6
- package/dist/src/ui/components/NewAgentsNotification.test.js +0 -48
- package/dist/src/ui/components/NewAgentsNotification.test.js.map +0 -1
- package/dist/src/ui/components/Notifications.test.d.ts +0 -6
- package/dist/src/ui/components/Notifications.test.js +0 -164
- package/dist/src/ui/components/Notifications.test.js.map +0 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +0 -6
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -162
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +0 -1
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ProQuotaDialog.test.js +0 -191
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -65
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
- package/dist/src/ui/components/QuittingDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/QuittingDisplay.test.js +0 -49
- package/dist/src/ui/components/QuittingDisplay.test.js.map +0 -1
- package/dist/src/ui/components/RawMarkdownIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/RawMarkdownIndicator.test.js +0 -34
- package/dist/src/ui/components/RawMarkdownIndicator.test.js.map +0 -1
- package/dist/src/ui/components/RewindConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/RewindConfirmation.test.js +0 -53
- package/dist/src/ui/components/RewindConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/RewindViewer.test.d.ts +0 -6
- package/dist/src/ui/components/RewindViewer.test.js +0 -241
- package/dist/src/ui/components/RewindViewer.test.js.map +0 -1
- package/dist/src/ui/components/SessionBrowser.test.d.ts +0 -6
- package/dist/src/ui/components/SessionBrowser.test.js +0 -256
- package/dist/src/ui/components/SessionBrowser.test.js.map +0 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +0 -75
- package/dist/src/ui/components/SessionSummaryDisplay.test.js.map +0 -1
- package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/SettingsDialog.test.js +0 -1150
- package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/ShellInputPrompt.test.d.ts +0 -6
- package/dist/src/ui/components/ShellInputPrompt.test.js +0 -91
- package/dist/src/ui/components/ShellInputPrompt.test.js.map +0 -1
- package/dist/src/ui/components/ShellModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/components/ShellModeIndicator.test.js +0 -17
- package/dist/src/ui/components/ShellModeIndicator.test.js.map +0 -1
- package/dist/src/ui/components/ShowMoreLines.test.d.ts +0 -6
- package/dist/src/ui/components/ShowMoreLines.test.js +0 -40
- package/dist/src/ui/components/ShowMoreLines.test.js.map +0 -1
- package/dist/src/ui/components/StatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/StatsDisplay.test.js +0 -438
- package/dist/src/ui/components/StatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/StatusDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/StatusDisplay.test.js +0 -155
- package/dist/src/ui/components/StatusDisplay.test.js.map +0 -1
- package/dist/src/ui/components/StickyHeader.test.d.ts +0 -6
- package/dist/src/ui/components/StickyHeader.test.js +0 -17
- package/dist/src/ui/components/StickyHeader.test.js.map +0 -1
- package/dist/src/ui/components/SuggestionsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/SuggestionsDisplay.test.js +0 -56
- package/dist/src/ui/components/SuggestionsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/Table.test.d.ts +0 -6
- package/dist/src/ui/components/Table.test.js +0 -53
- package/dist/src/ui/components/Table.test.js.map +0 -1
- package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ThemeDialog.test.js +0 -167
- package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
- package/dist/src/ui/components/ThemedGradient.test.d.ts +0 -6
- package/dist/src/ui/components/ThemedGradient.test.js +0 -30
- package/dist/src/ui/components/ThemedGradient.test.js.map +0 -1
- package/dist/src/ui/components/Tips.test.d.ts +0 -6
- package/dist/src/ui/components/Tips.test.js +0 -23
- package/dist/src/ui/components/Tips.test.js.map +0 -1
- package/dist/src/ui/components/ToolConfirmationQueue.test.d.ts +0 -6
- package/dist/src/ui/components/ToolConfirmationQueue.test.js +0 -71
- package/dist/src/ui/components/ToolConfirmationQueue.test.js.map +0 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/ToolStatsDisplay.test.js +0 -227
- package/dist/src/ui/components/ToolStatsDisplay.test.js.map +0 -1
- package/dist/src/ui/components/UpdateNotification.test.d.ts +0 -6
- package/dist/src/ui/components/UpdateNotification.test.js +0 -16
- package/dist/src/ui/components/UpdateNotification.test.js.map +0 -1
- package/dist/src/ui/components/ValidationDialog.test.d.ts +0 -6
- package/dist/src/ui/components/ValidationDialog.test.js +0 -153
- package/dist/src/ui/components/ValidationDialog.test.js.map +0 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -191
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
- package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -240
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
- package/dist/src/ui/components/messages/ErrorMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ErrorMessage.test.js +0 -23
- package/dist/src/ui/components/messages/ErrorMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/GeminiMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/GeminiMessage.test.js +0 -35
- package/dist/src/ui/components/messages/GeminiMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/InfoMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/InfoMessage.test.js +0 -28
- package/dist/src/ui/components/messages/InfoMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.d.ts +0 -6
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js +0 -33
- package/dist/src/ui/components/messages/RedirectionConfirmation.test.js.map +0 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +0 -123
- package/dist/src/ui/components/messages/ShellToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/Todo.test.d.ts +0 -6
- package/dist/src/ui/components/messages/Todo.test.js +0 -114
- package/dist/src/ui/components/messages/Todo.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -232
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -529
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessage.test.js +0 -217
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js +0 -89
- package/dist/src/ui/components/messages/ToolMessageFocusHint.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +0 -62
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolResultDisplay.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js +0 -114
- package/dist/src/ui/components/messages/ToolResultDisplay.test.js.map +0 -1
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.d.ts +0 -6
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js +0 -134
- package/dist/src/ui/components/messages/ToolStickyHeaderRegression.test.js.map +0 -1
- package/dist/src/ui/components/messages/UserMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/UserMessage.test.js +0 -32
- package/dist/src/ui/components/messages/UserMessage.test.js.map +0 -1
- package/dist/src/ui/components/messages/WarningMessage.test.d.ts +0 -6
- package/dist/src/ui/components/messages/WarningMessage.test.js +0 -23
- package/dist/src/ui/components/messages/WarningMessage.test.js.map +0 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +0 -386
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +0 -1
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.d.ts +0 -6
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js +0 -434
- package/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +0 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +0 -6
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +0 -79
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +0 -1
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
- package/dist/src/ui/components/shared/EnumSelector.test.js +0 -70
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
- package/dist/src/ui/components/shared/ExpandableText.test.d.ts +0 -6
- package/dist/src/ui/components/shared/ExpandableText.test.js +0 -88
- package/dist/src/ui/components/shared/ExpandableText.test.js.map +0 -1
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js +0 -34
- package/dist/src/ui/components/shared/HalfLinePaddedBox.test.js.map +0 -1
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -90
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -134
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
- package/dist/src/ui/components/shared/Scrollable.test.d.ts +0 -6
- package/dist/src/ui/components/shared/Scrollable.test.js +0 -74
- package/dist/src/ui/components/shared/Scrollable.test.js.map +0 -1
- package/dist/src/ui/components/shared/ScrollableList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/ScrollableList.test.js +0 -241
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +0 -1
- package/dist/src/ui/components/shared/TabHeader.test.d.ts +0 -6
- package/dist/src/ui/components/shared/TabHeader.test.js +0 -106
- package/dist/src/ui/components/shared/TabHeader.test.js.map +0 -1
- package/dist/src/ui/components/shared/TextInput.test.d.ts +0 -6
- package/dist/src/ui/components/shared/TextInput.test.js +0 -242
- package/dist/src/ui/components/shared/TextInput.test.js.map +0 -1
- package/dist/src/ui/components/shared/VirtualizedList.test.d.ts +0 -6
- package/dist/src/ui/components/shared/VirtualizedList.test.js +0 -171
- package/dist/src/ui/components/shared/VirtualizedList.test.js.map +0 -1
- package/dist/src/ui/components/shared/performance.test.d.ts +0 -1
- package/dist/src/ui/components/shared/performance.test.js +0 -67
- package/dist/src/ui/components/shared/performance.test.js.map +0 -1
- package/dist/src/ui/components/shared/text-buffer.test.d.ts +0 -6
- package/dist/src/ui/components/shared/text-buffer.test.js +0 -2490
- package/dist/src/ui/components/shared/text-buffer.test.js.map +0 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.test.d.ts +0 -6
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js +0 -964
- package/dist/src/ui/components/shared/vim-buffer-actions.test.js.map +0 -1
- package/dist/src/ui/components/views/ChatList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ChatList.test.js +0 -45
- package/dist/src/ui/components/views/ChatList.test.js.map +0 -1
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ExtensionsList.test.js +0 -148
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
- package/dist/src/ui/components/views/McpStatus.test.d.ts +0 -6
- package/dist/src/ui/components/views/McpStatus.test.js +0 -153
- package/dist/src/ui/components/views/McpStatus.test.js.map +0 -1
- package/dist/src/ui/components/views/SkillsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/SkillsList.test.js +0 -97
- package/dist/src/ui/components/views/SkillsList.test.js.map +0 -1
- package/dist/src/ui/components/views/ToolsList.test.d.ts +0 -6
- package/dist/src/ui/components/views/ToolsList.test.js +0 -45
- package/dist/src/ui/components/views/ToolsList.test.js.map +0 -1
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/KeypressContext.test.js +0 -957
- package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
- package/dist/src/ui/contexts/MouseContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/MouseContext.test.js +0 -198
- package/dist/src/ui/contexts/MouseContext.test.js.map +0 -1
- package/dist/src/ui/contexts/ScrollProvider.drag.test.d.ts +0 -6
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js +0 -319
- package/dist/src/ui/contexts/ScrollProvider.drag.test.js.map +0 -1
- package/dist/src/ui/contexts/ScrollProvider.test.d.ts +0 -6
- package/dist/src/ui/contexts/ScrollProvider.test.js +0 -377
- package/dist/src/ui/contexts/ScrollProvider.test.js.map +0 -1
- package/dist/src/ui/contexts/SessionContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/SessionContext.test.js +0 -198
- package/dist/src/ui/contexts/SessionContext.test.js.map +0 -1
- package/dist/src/ui/contexts/ToolActionsContext.test.d.ts +0 -6
- package/dist/src/ui/contexts/ToolActionsContext.test.js +0 -166
- package/dist/src/ui/contexts/ToolActionsContext.test.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -1032
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.d.ts +0 -6
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js +0 -183
- package/dist/src/ui/hooks/atCommandProcessor_agents.test.js.map +0 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -521
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.d.ts +0 -6
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +0 -796
- package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +0 -1
- package/dist/src/ui/hooks/toolMapping.test.d.ts +0 -6
- package/dist/src/ui/hooks/toolMapping.test.js +0 -209
- package/dist/src/ui/hooks/toolMapping.test.js.map +0 -1
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js +0 -85
- package/dist/src/ui/hooks/useAnimatedScrollbar.test.js.map +0 -1
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.js +0 -435
- package/dist/src/ui/hooks/useApprovalModeIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useAtCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAtCompletion.test.js +0 -417
- package/dist/src/ui/hooks/useAtCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useAtCompletion_agents.test.d.ts +0 -6
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js +0 -87
- package/dist/src/ui/hooks/useAtCompletion_agents.test.js.map +0 -1
- package/dist/src/ui/hooks/useBanner.test.d.ts +0 -6
- package/dist/src/ui/hooks/useBanner.test.js +0 -92
- package/dist/src/ui/hooks/useBanner.test.js.map +0 -1
- package/dist/src/ui/hooks/useBatchedScroll.test.d.ts +0 -6
- package/dist/src/ui/hooks/useBatchedScroll.test.js +0 -62
- package/dist/src/ui/hooks/useBatchedScroll.test.js.map +0 -1
- package/dist/src/ui/hooks/useCommandCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useCommandCompletion.test.js +0 -462
- package/dist/src/ui/hooks/useCommandCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.d.ts +0 -6
- package/dist/src/ui/hooks/useConsoleMessages.test.js +0 -159
- package/dist/src/ui/hooks/useConsoleMessages.test.js.map +0 -1
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/useEditorSettings.test.js +0 -179
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +0 -6
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -279
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +0 -1
- package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFlickerDetector.test.js +0 -106
- package/dist/src/ui/hooks/useFlickerDetector.test.js.map +0 -1
- package/dist/src/ui/hooks/useFocus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFocus.test.js +0 -131
- package/dist/src/ui/hooks/useFocus.test.js.map +0 -1
- package/dist/src/ui/hooks/useFolderTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/useFolderTrust.test.js +0 -218
- package/dist/src/ui/hooks/useFolderTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGeminiStream.test.js +0 -2149
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
- package/dist/src/ui/hooks/useGitBranchName.test.js +0 -183
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
- package/dist/src/ui/hooks/useHistoryManager.test.js +0 -188
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
- package/dist/src/ui/hooks/useHookDisplayState.test.d.ts +0 -6
- package/dist/src/ui/hooks/useHookDisplayState.test.js +0 -180
- package/dist/src/ui/hooks/useHookDisplayState.test.js.map +0 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +0 -6
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +0 -214
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +0 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js +0 -172
- package/dist/src/ui/hooks/useIncludeDirsTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useInputHistory.test.js +0 -208
- package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -238
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
- package/dist/src/ui/hooks/useKeypress.test.d.ts +0 -6
- package/dist/src/ui/hooks/useKeypress.test.js +0 -205
- package/dist/src/ui/hooks/useKeypress.test.js.map +0 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -145
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
- package/dist/src/ui/hooks/useMcpStatus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMcpStatus.test.js +0 -69
- package/dist/src/ui/hooks/useMcpStatus.test.js.map +0 -1
- package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -62
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMessageQueue.test.js +0 -327
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +0 -6
- package/dist/src/ui/hooks/useModelCommand.test.js +0 -45
- package/dist/src/ui/hooks/useModelCommand.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouse.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouse.test.js +0 -57
- package/dist/src/ui/hooks/useMouse.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouseClick.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouseClick.test.js +0 -59
- package/dist/src/ui/hooks/useMouseClick.test.js.map +0 -1
- package/dist/src/ui/hooks/useMouseDoubleClick.test.d.ts +0 -6
- package/dist/src/ui/hooks/useMouseDoubleClick.test.js +0 -125
- package/dist/src/ui/hooks/useMouseDoubleClick.test.js.map +0 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +0 -291
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +0 -1
- package/dist/src/ui/hooks/usePhraseCycler.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePhraseCycler.test.js +0 -208
- package/dist/src/ui/hooks/usePhraseCycler.test.js.map +0 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +0 -6
- package/dist/src/ui/hooks/usePrivacySettings.test.js +0 -104
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +0 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -477
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +0 -58
- package/dist/src/ui/hooks/useReactToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -169
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useRewind.test.d.ts +0 -6
- package/dist/src/ui/hooks/useRewind.test.js +0 -100
- package/dist/src/ui/hooks/useRewind.test.js.map +0 -1
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSelectionList.test.js +0 -848
- package/dist/src/ui/hooks/useSelectionList.test.js.map +0 -1
- package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSessionBrowser.test.js +0 -203
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +0 -1
- package/dist/src/ui/hooks/useSessionResume.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSessionResume.test.js +0 -336
- package/dist/src/ui/hooks/useSessionResume.test.js.map +0 -1
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
- package/dist/src/ui/hooks/useShellHistory.test.js +0 -223
- package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
- package/dist/src/ui/hooks/useShellInactivityStatus.test.d.ts +0 -6
- package/dist/src/ui/hooks/useShellInactivityStatus.test.js +0 -84
- package/dist/src/ui/hooks/useShellInactivityStatus.test.js.map +0 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -9
- package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -845
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
- package/dist/src/ui/hooks/useSnowfall.test.d.ts +0 -6
- package/dist/src/ui/hooks/useSnowfall.test.js +0 -88
- package/dist/src/ui/hooks/useSnowfall.test.js.map +0 -1
- package/dist/src/ui/hooks/useTabbedNavigation.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTabbedNavigation.test.js +0 -187
- package/dist/src/ui/hooks/useTabbedNavigation.test.js.map +0 -1
- package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTimer.test.js +0 -119
- package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
- package/dist/src/ui/hooks/useTips.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTips.test.js +0 -33
- package/dist/src/ui/hooks/useTips.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.js +0 -376
- package/dist/src/ui/hooks/useToolExecutionScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolScheduler.test.js +0 -881
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.d.ts +0 -6
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.js +0 -45
- package/dist/src/ui/hooks/useToolSchedulerFacade.test.js.map +0 -1
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.d.ts +0 -6
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.js +0 -97
- package/dist/src/ui/hooks/useTurnActivityMonitor.test.js.map +0 -1
- package/dist/src/ui/hooks/vim.test.d.ts +0 -6
- package/dist/src/ui/hooks/vim.test.js +0 -1384
- package/dist/src/ui/hooks/vim.test.js.map +0 -1
- package/dist/src/ui/keyMatchers.test.d.ts +0 -6
- package/dist/src/ui/keyMatchers.test.js +0 -386
- package/dist/src/ui/keyMatchers.test.js.map +0 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js +0 -121
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js +0 -34
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js +0 -34
- package/dist/src/ui/privacy/GeminiPrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/privacy/PrivacyNotice.test.d.ts +0 -6
- package/dist/src/ui/privacy/PrivacyNotice.test.js +0 -62
- package/dist/src/ui/privacy/PrivacyNotice.test.js.map +0 -1
- package/dist/src/ui/state/extensions.test.d.ts +0 -6
- package/dist/src/ui/state/extensions.test.js +0 -219
- package/dist/src/ui/state/extensions.test.js.map +0 -1
- package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
- package/dist/src/ui/themes/color-utils.test.js +0 -245
- package/dist/src/ui/themes/color-utils.test.js.map +0 -1
- package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
- package/dist/src/ui/themes/theme-manager.test.js +0 -150
- package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
- package/dist/src/ui/themes/theme.test.d.ts +0 -6
- package/dist/src/ui/themes/theme.test.js +0 -174
- package/dist/src/ui/themes/theme.test.js.map +0 -1
- package/dist/src/ui/utils/CodeColorizer.test.d.ts +0 -6
- package/dist/src/ui/utils/CodeColorizer.test.js +0 -38
- package/dist/src/ui/utils/CodeColorizer.test.js.map +0 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +0 -6
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js +0 -21
- package/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +0 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
- package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -159
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/clipboardUtils.test.js +0 -359
- package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
- package/dist/src/ui/utils/clipboardUtils.windows.test.d.ts +0 -6
- package/dist/src/ui/utils/clipboardUtils.windows.test.js +0 -55
- package/dist/src/ui/utils/clipboardUtils.windows.test.js.map +0 -1
- package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/commandUtils.test.js +0 -479
- package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
- package/dist/src/ui/utils/computeStats.test.d.ts +0 -6
- package/dist/src/ui/utils/computeStats.test.js +0 -271
- package/dist/src/ui/utils/computeStats.test.js.map +0 -1
- package/dist/src/ui/utils/directoryUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/directoryUtils.test.js +0 -244
- package/dist/src/ui/utils/directoryUtils.test.js.map +0 -1
- package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/displayUtils.test.js +0 -61
- package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
- package/dist/src/ui/utils/formatters.test.d.ts +0 -6
- package/dist/src/ui/utils/formatters.test.js +0 -124
- package/dist/src/ui/utils/formatters.test.js.map +0 -1
- package/dist/src/ui/utils/highlight.test.d.ts +0 -6
- package/dist/src/ui/utils/highlight.test.js +0 -198
- package/dist/src/ui/utils/highlight.test.js.map +0 -1
- package/dist/src/ui/utils/input.test.d.ts +0 -6
- package/dist/src/ui/utils/input.test.js +0 -44
- package/dist/src/ui/utils/input.test.js.map +0 -1
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
- package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
- package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
- package/dist/src/ui/utils/mouse.test.d.ts +0 -6
- package/dist/src/ui/utils/mouse.test.js +0 -136
- package/dist/src/ui/utils/mouse.test.js.map +0 -1
- package/dist/src/ui/utils/rewindFileOps.test.d.ts +0 -6
- package/dist/src/ui/utils/rewindFileOps.test.js +0 -375
- package/dist/src/ui/utils/rewindFileOps.test.js.map +0 -1
- package/dist/src/ui/utils/terminalCapabilityManager.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalCapabilityManager.test.js +0 -220
- package/dist/src/ui/utils/terminalCapabilityManager.test.js.map +0 -1
- package/dist/src/ui/utils/terminalSetup.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalSetup.test.js +0 -147
- package/dist/src/ui/utils/terminalSetup.test.js.map +0 -1
- package/dist/src/ui/utils/terminalUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/terminalUtils.test.js +0 -40
- package/dist/src/ui/utils/terminalUtils.test.js.map +0 -1
- package/dist/src/ui/utils/textOutput.test.d.ts +0 -6
- package/dist/src/ui/utils/textOutput.test.js +0 -79
- package/dist/src/ui/utils/textOutput.test.js.map +0 -1
- package/dist/src/ui/utils/textUtils.test.d.ts +0 -6
- package/dist/src/ui/utils/textUtils.test.js +0 -168
- package/dist/src/ui/utils/textUtils.test.js.map +0 -1
- package/dist/src/ui/utils/ui-sizing.test.d.ts +0 -6
- package/dist/src/ui/utils/ui-sizing.test.js +0 -38
- package/dist/src/ui/utils/ui-sizing.test.js.map +0 -1
- package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
- package/dist/src/ui/utils/updateCheck.test.js +0 -134
- package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
- package/dist/src/utils/agentUtils.test.d.ts +0 -6
- package/dist/src/utils/agentUtils.test.js +0 -121
- package/dist/src/utils/agentUtils.test.js.map +0 -1
- package/dist/src/utils/checks.test.d.ts +0 -6
- package/dist/src/utils/checks.test.js +0 -29
- package/dist/src/utils/checks.test.js.map +0 -1
- package/dist/src/utils/cleanup.test.d.ts +0 -6
- package/dist/src/utils/cleanup.test.js +0 -92
- package/dist/src/utils/cleanup.test.js.map +0 -1
- package/dist/src/utils/commands.test.d.ts +0 -6
- package/dist/src/utils/commands.test.js +0 -115
- package/dist/src/utils/commands.test.js.map +0 -1
- package/dist/src/utils/commentJson.test.d.ts +0 -6
- package/dist/src/utils/commentJson.test.js +0 -308
- package/dist/src/utils/commentJson.test.js.map +0 -1
- package/dist/src/utils/deepMerge.test.d.ts +0 -6
- package/dist/src/utils/deepMerge.test.js +0 -201
- package/dist/src/utils/deepMerge.test.js.map +0 -1
- package/dist/src/utils/dialogScopeUtils.test.d.ts +0 -6
- package/dist/src/utils/dialogScopeUtils.test.js +0 -81
- package/dist/src/utils/dialogScopeUtils.test.js.map +0 -1
- package/dist/src/utils/envVarResolver.test.d.ts +0 -6
- package/dist/src/utils/envVarResolver.test.js +0 -221
- package/dist/src/utils/envVarResolver.test.js.map +0 -1
- package/dist/src/utils/errors.test.d.ts +0 -6
- package/dist/src/utils/errors.test.js +0 -435
- package/dist/src/utils/errors.test.js.map +0 -1
- package/dist/src/utils/events.test.d.ts +0 -6
- package/dist/src/utils/events.test.js +0 -24
- package/dist/src/utils/events.test.js.map +0 -1
- package/dist/src/utils/gitUtils.test.d.ts +0 -6
- package/dist/src/utils/gitUtils.test.js +0 -113
- package/dist/src/utils/gitUtils.test.js.map +0 -1
- package/dist/src/utils/handleAutoUpdate.test.d.ts +0 -6
- package/dist/src/utils/handleAutoUpdate.test.js +0 -310
- package/dist/src/utils/handleAutoUpdate.test.js.map +0 -1
- package/dist/src/utils/installationInfo.test.d.ts +0 -6
- package/dist/src/utils/installationInfo.test.js +0 -296
- package/dist/src/utils/installationInfo.test.js.map +0 -1
- package/dist/src/utils/jsonoutput.test.d.ts +0 -6
- package/dist/src/utils/jsonoutput.test.js +0 -74
- package/dist/src/utils/jsonoutput.test.js.map +0 -1
- package/dist/src/utils/math.test.d.ts +0 -6
- package/dist/src/utils/math.test.js +0 -23
- package/dist/src/utils/math.test.js.map +0 -1
- package/dist/src/utils/persistentState.test.d.ts +0 -6
- package/dist/src/utils/persistentState.test.js +0 -68
- package/dist/src/utils/persistentState.test.js.map +0 -1
- package/dist/src/utils/processUtils.test.d.ts +0 -6
- package/dist/src/utils/processUtils.test.js +0 -20
- package/dist/src/utils/processUtils.test.js.map +0 -1
- package/dist/src/utils/readStdin.test.d.ts +0 -6
- package/dist/src/utils/readStdin.test.js +0 -117
- package/dist/src/utils/readStdin.test.js.map +0 -1
- package/dist/src/utils/readStdin_safety.test.d.ts +0 -6
- package/dist/src/utils/readStdin_safety.test.js +0 -68
- package/dist/src/utils/readStdin_safety.test.js.map +0 -1
- package/dist/src/utils/relaunch.test.d.ts +0 -6
- package/dist/src/utils/relaunch.test.js +0 -279
- package/dist/src/utils/relaunch.test.js.map +0 -1
- package/dist/src/utils/resolvePath.test.d.ts +0 -6
- package/dist/src/utils/resolvePath.test.js +0 -34
- package/dist/src/utils/resolvePath.test.js.map +0 -1
- package/dist/src/utils/sandbox.test.d.ts +0 -6
- package/dist/src/utils/sandbox.test.js +0 -314
- package/dist/src/utils/sandbox.test.js.map +0 -1
- package/dist/src/utils/sandboxUtils.test.d.ts +0 -6
- package/dist/src/utils/sandboxUtils.test.js +0 -122
- package/dist/src/utils/sandboxUtils.test.js.map +0 -1
- package/dist/src/utils/sessionCleanup.integration.test.d.ts +0 -6
- package/dist/src/utils/sessionCleanup.integration.test.js +0 -182
- package/dist/src/utils/sessionCleanup.integration.test.js.map +0 -1
- package/dist/src/utils/sessionCleanup.test.d.ts +0 -6
- package/dist/src/utils/sessionCleanup.test.js +0 -1298
- package/dist/src/utils/sessionCleanup.test.js.map +0 -1
- package/dist/src/utils/sessionUtils.test.d.ts +0 -6
- package/dist/src/utils/sessionUtils.test.js +0 -503
- package/dist/src/utils/sessionUtils.test.js.map +0 -1
- package/dist/src/utils/sessions.test.d.ts +0 -6
- package/dist/src/utils/sessions.test.js +0 -581
- package/dist/src/utils/sessions.test.js.map +0 -1
- package/dist/src/utils/settingsUtils.test.d.ts +0 -6
- package/dist/src/utils/settingsUtils.test.js +0 -808
- package/dist/src/utils/settingsUtils.test.js.map +0 -1
- package/dist/src/utils/skillUtils.test.d.ts +0 -6
- package/dist/src/utils/skillUtils.test.js +0 -70
- package/dist/src/utils/skillUtils.test.js.map +0 -1
- package/dist/src/utils/startupWarnings.test.d.ts +0 -6
- package/dist/src/utils/startupWarnings.test.js +0 -61
- package/dist/src/utils/startupWarnings.test.js.map +0 -1
- package/dist/src/utils/updateEventEmitter.test.d.ts +0 -6
- package/dist/src/utils/updateEventEmitter.test.js +0 -18
- package/dist/src/utils/updateEventEmitter.test.js.map +0 -1
- package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
- package/dist/src/utils/userStartupWarnings.test.js +0 -98
- package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
- package/dist/src/utils/windowTitle.test.d.ts +0 -6
- package/dist/src/utils/windowTitle.test.js +0 -216
- package/dist/src/utils/windowTitle.test.js.map +0 -1
- package/dist/src/validateNonInterActiveAuth.test.d.ts +0 -6
- package/dist/src/validateNonInterActiveAuth.test.js +0 -319
- package/dist/src/validateNonInterActiveAuth.test.js.map +0 -1
- package/dist/src/zed-integration/fileSystemService.test.d.ts +0 -6
- package/dist/src/zed-integration/fileSystemService.test.js +0 -88
- package/dist/src/zed-integration/fileSystemService.test.js.map +0 -1
- package/dist/src/zed-integration/zedIntegration.test.d.ts +0 -6
- package/dist/src/zed-integration/zedIntegration.test.js +0 -625
- package/dist/src/zed-integration/zedIntegration.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/src/gemini.test.js
DELETED
|
@@ -1,1334 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
7
|
-
import { main, setupUnhandledRejectionHandler, validateDnsResolutionOrder, startInteractiveUI, getNodeMemoryArgs, } from './gemini.js';
|
|
8
|
-
import os from 'node:os';
|
|
9
|
-
import v8 from 'node:v8';
|
|
10
|
-
import {} from './config/config.js';
|
|
11
|
-
import { createTestMergedSettings, } from './config/settings.js';
|
|
12
|
-
import { appEvents, AppEvent } from './utils/events.js';
|
|
13
|
-
function createMockSettings(overrides = {}) {
|
|
14
|
-
const merged = createTestMergedSettings(overrides['merged'] || {});
|
|
15
|
-
return {
|
|
16
|
-
system: { settings: {} },
|
|
17
|
-
systemDefaults: { settings: {} },
|
|
18
|
-
user: { settings: {} },
|
|
19
|
-
workspace: { settings: {} },
|
|
20
|
-
errors: [],
|
|
21
|
-
...overrides,
|
|
22
|
-
merged,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
import { debugLogger, coreEvents, } from '@didim365/agent-cli-core';
|
|
26
|
-
import { act } from 'react';
|
|
27
|
-
import {} from './core/initializer.js';
|
|
28
|
-
const performance = vi.hoisted(() => ({
|
|
29
|
-
now: vi.fn(),
|
|
30
|
-
}));
|
|
31
|
-
vi.stubGlobal('performance', performance);
|
|
32
|
-
vi.mock('@didim365/agent-cli-core', async (importOriginal) => {
|
|
33
|
-
const actual = await importOriginal();
|
|
34
|
-
return {
|
|
35
|
-
...actual,
|
|
36
|
-
recordSlowRender: vi.fn(),
|
|
37
|
-
writeToStdout: vi.fn((...args) => process.stdout.write(...args)),
|
|
38
|
-
patchStdio: vi.fn(() => () => { }),
|
|
39
|
-
createWorkingStdio: vi.fn(() => ({
|
|
40
|
-
stdout: {
|
|
41
|
-
write: vi.fn((...args) => process.stdout.write(...args)),
|
|
42
|
-
columns: 80,
|
|
43
|
-
rows: 24,
|
|
44
|
-
on: vi.fn(),
|
|
45
|
-
removeListener: vi.fn(),
|
|
46
|
-
},
|
|
47
|
-
stderr: {
|
|
48
|
-
write: vi.fn(),
|
|
49
|
-
},
|
|
50
|
-
})),
|
|
51
|
-
enableMouseEvents: vi.fn(),
|
|
52
|
-
disableMouseEvents: vi.fn(),
|
|
53
|
-
enterAlternateScreen: vi.fn(),
|
|
54
|
-
disableLineWrapping: vi.fn(),
|
|
55
|
-
getVersion: vi.fn(() => Promise.resolve('1.0.0')),
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
vi.mock('ink', async (importOriginal) => {
|
|
59
|
-
const actual = await importOriginal();
|
|
60
|
-
return {
|
|
61
|
-
...actual,
|
|
62
|
-
render: vi.fn((_node, options) => {
|
|
63
|
-
if (options.alternateBuffer) {
|
|
64
|
-
options.stdout.write('\x1b[?7l');
|
|
65
|
-
}
|
|
66
|
-
// Simulate rendering time for recordSlowRender test
|
|
67
|
-
const start = performance.now();
|
|
68
|
-
const end = performance.now();
|
|
69
|
-
if (options.onRender) {
|
|
70
|
-
options.onRender({ renderTime: end - start });
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
unmount: vi.fn(),
|
|
74
|
-
rerender: vi.fn(),
|
|
75
|
-
cleanup: vi.fn(),
|
|
76
|
-
waitUntilExit: vi.fn(),
|
|
77
|
-
};
|
|
78
|
-
}),
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
// Custom error to identify mock process.exit calls
|
|
82
|
-
class MockProcessExitError extends Error {
|
|
83
|
-
code;
|
|
84
|
-
constructor(code) {
|
|
85
|
-
super('PROCESS_EXIT_MOCKED');
|
|
86
|
-
this.code = code;
|
|
87
|
-
this.name = 'MockProcessExitError';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// Mock dependencies
|
|
91
|
-
vi.mock('./config/settings.js', async (importOriginal) => {
|
|
92
|
-
const actual = await importOriginal();
|
|
93
|
-
return {
|
|
94
|
-
...actual,
|
|
95
|
-
loadSettings: vi.fn().mockImplementation(() => ({
|
|
96
|
-
merged: actual.getDefaultsFromSchema(),
|
|
97
|
-
workspace: { settings: {} },
|
|
98
|
-
errors: [],
|
|
99
|
-
})),
|
|
100
|
-
saveModelChange: vi.fn(),
|
|
101
|
-
getDefaultsFromSchema: actual.getDefaultsFromSchema,
|
|
102
|
-
};
|
|
103
|
-
});
|
|
104
|
-
vi.mock('./ui/utils/terminalCapabilityManager.js', () => ({
|
|
105
|
-
terminalCapabilityManager: {
|
|
106
|
-
detectCapabilities: vi.fn(),
|
|
107
|
-
getTerminalBackgroundColor: vi.fn(),
|
|
108
|
-
},
|
|
109
|
-
}));
|
|
110
|
-
vi.mock('./config/config.js', () => ({
|
|
111
|
-
loadCliConfig: vi.fn().mockResolvedValue({
|
|
112
|
-
getSandbox: vi.fn(() => false),
|
|
113
|
-
getQuestion: vi.fn(() => ''),
|
|
114
|
-
isInteractive: () => false,
|
|
115
|
-
setTerminalBackground: vi.fn(),
|
|
116
|
-
storage: {
|
|
117
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
118
|
-
},
|
|
119
|
-
}),
|
|
120
|
-
parseArguments: vi.fn().mockResolvedValue({}),
|
|
121
|
-
isDebugMode: vi.fn(() => false),
|
|
122
|
-
}));
|
|
123
|
-
vi.mock('read-package-up', () => ({
|
|
124
|
-
readPackageUp: vi.fn().mockResolvedValue({
|
|
125
|
-
packageJson: { name: 'test-pkg', version: 'test-version' },
|
|
126
|
-
path: '/fake/path/package.json',
|
|
127
|
-
}),
|
|
128
|
-
}));
|
|
129
|
-
vi.mock('update-notifier', () => ({
|
|
130
|
-
default: vi.fn(() => ({
|
|
131
|
-
notify: vi.fn(),
|
|
132
|
-
})),
|
|
133
|
-
}));
|
|
134
|
-
vi.mock('./utils/events.js', async (importOriginal) => {
|
|
135
|
-
const actual = await importOriginal();
|
|
136
|
-
return {
|
|
137
|
-
...actual,
|
|
138
|
-
appEvents: {
|
|
139
|
-
emit: vi.fn(),
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
});
|
|
143
|
-
vi.mock('./utils/sandbox.js', () => ({
|
|
144
|
-
sandbox_command: vi.fn(() => ''), // Default to no sandbox command
|
|
145
|
-
start_sandbox: vi.fn(() => Promise.resolve()), // Mock as an async function that resolves
|
|
146
|
-
}));
|
|
147
|
-
vi.mock('./utils/relaunch.js', () => ({
|
|
148
|
-
relaunchAppInChildProcess: vi.fn(),
|
|
149
|
-
relaunchOnExitCode: vi.fn(),
|
|
150
|
-
}));
|
|
151
|
-
vi.mock('./config/sandboxConfig.js', () => ({
|
|
152
|
-
loadSandboxConfig: vi.fn(),
|
|
153
|
-
}));
|
|
154
|
-
vi.mock('./ui/utils/mouse.js', () => ({
|
|
155
|
-
enableMouseEvents: vi.fn(),
|
|
156
|
-
disableMouseEvents: vi.fn(),
|
|
157
|
-
isIncompleteMouseSequence: vi.fn(),
|
|
158
|
-
}));
|
|
159
|
-
const runNonInteractiveSpy = vi.hoisted(() => vi.fn());
|
|
160
|
-
vi.mock('./nonInteractiveCli.js', () => ({
|
|
161
|
-
runNonInteractive: runNonInteractiveSpy,
|
|
162
|
-
}));
|
|
163
|
-
describe('gemini.tsx main function', () => {
|
|
164
|
-
let originalEnvGeminiSandbox;
|
|
165
|
-
let originalEnvSandbox;
|
|
166
|
-
let initialUnhandledRejectionListeners = [];
|
|
167
|
-
beforeEach(() => {
|
|
168
|
-
// Store and clear sandbox-related env variables to ensure a consistent test environment
|
|
169
|
-
originalEnvGeminiSandbox = process.env['GEMINI_SANDBOX'];
|
|
170
|
-
originalEnvSandbox = process.env['SANDBOX'];
|
|
171
|
-
delete process.env['GEMINI_SANDBOX'];
|
|
172
|
-
delete process.env['SANDBOX'];
|
|
173
|
-
initialUnhandledRejectionListeners =
|
|
174
|
-
process.listeners('unhandledRejection');
|
|
175
|
-
});
|
|
176
|
-
afterEach(() => {
|
|
177
|
-
// Restore original env variables
|
|
178
|
-
if (originalEnvGeminiSandbox !== undefined) {
|
|
179
|
-
process.env['GEMINI_SANDBOX'] = originalEnvGeminiSandbox;
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
delete process.env['GEMINI_SANDBOX'];
|
|
183
|
-
}
|
|
184
|
-
if (originalEnvSandbox !== undefined) {
|
|
185
|
-
process.env['SANDBOX'] = originalEnvSandbox;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
delete process.env['SANDBOX'];
|
|
189
|
-
}
|
|
190
|
-
const currentListeners = process.listeners('unhandledRejection');
|
|
191
|
-
currentListeners.forEach((listener) => {
|
|
192
|
-
if (!initialUnhandledRejectionListeners.includes(listener)) {
|
|
193
|
-
process.removeListener('unhandledRejection', listener);
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
vi.restoreAllMocks();
|
|
197
|
-
});
|
|
198
|
-
it('should log unhandled promise rejections and open debug console on first error', async () => {
|
|
199
|
-
const processExitSpy = vi
|
|
200
|
-
.spyOn(process, 'exit')
|
|
201
|
-
.mockImplementation((code) => {
|
|
202
|
-
throw new MockProcessExitError(code);
|
|
203
|
-
});
|
|
204
|
-
const appEventsMock = vi.mocked(appEvents);
|
|
205
|
-
const debugLoggerErrorSpy = vi.spyOn(debugLogger, 'error');
|
|
206
|
-
const rejectionError = new Error('Test unhandled rejection');
|
|
207
|
-
setupUnhandledRejectionHandler();
|
|
208
|
-
// Simulate an unhandled rejection.
|
|
209
|
-
// We are not using Promise.reject here as vitest will catch it.
|
|
210
|
-
// Instead we will dispatch the event manually.
|
|
211
|
-
process.emit('unhandledRejection', rejectionError, Promise.resolve());
|
|
212
|
-
// We need to wait for the rejection handler to be called.
|
|
213
|
-
await new Promise(process.nextTick);
|
|
214
|
-
expect(appEventsMock.emit).toHaveBeenCalledWith(AppEvent.OpenDebugConsole);
|
|
215
|
-
expect(debugLoggerErrorSpy).toHaveBeenCalledWith(expect.stringContaining('Unhandled Promise Rejection'));
|
|
216
|
-
expect(debugLoggerErrorSpy).toHaveBeenCalledWith(expect.stringContaining('Please file a bug report using the /bug tool.'));
|
|
217
|
-
// Simulate a second rejection
|
|
218
|
-
const secondRejectionError = new Error('Second test unhandled rejection');
|
|
219
|
-
process.emit('unhandledRejection', secondRejectionError, Promise.resolve());
|
|
220
|
-
await new Promise(process.nextTick);
|
|
221
|
-
// Ensure emit was only called once for OpenDebugConsole
|
|
222
|
-
const openDebugConsoleCalls = appEventsMock.emit.mock.calls.filter((call) => call[0] === AppEvent.OpenDebugConsole);
|
|
223
|
-
expect(openDebugConsoleCalls.length).toBe(1);
|
|
224
|
-
// Avoid the process.exit error from being thrown.
|
|
225
|
-
processExitSpy.mockRestore();
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
describe('setWindowTitle', () => {
|
|
229
|
-
it('should set window title when hideWindowTitle is false', async () => {
|
|
230
|
-
// setWindowTitle is not exported, but we can test its effect if we had a way to call it.
|
|
231
|
-
// Since we can't easily call it directly without exporting it, we skip direct testing
|
|
232
|
-
// and rely on startInteractiveUI tests which call it.
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
describe('initializeOutputListenersAndFlush', () => {
|
|
236
|
-
afterEach(() => {
|
|
237
|
-
vi.restoreAllMocks();
|
|
238
|
-
});
|
|
239
|
-
it('should flush backlogs and setup listeners if no listeners exist', async () => {
|
|
240
|
-
const { coreEvents } = await import('@didim365/agent-cli-core');
|
|
241
|
-
const { initializeOutputListenersAndFlush } = await import('./gemini.js');
|
|
242
|
-
// Mock listenerCount to return 0
|
|
243
|
-
vi.spyOn(coreEvents, 'listenerCount').mockReturnValue(0);
|
|
244
|
-
const drainSpy = vi.spyOn(coreEvents, 'drainBacklogs');
|
|
245
|
-
initializeOutputListenersAndFlush();
|
|
246
|
-
expect(drainSpy).toHaveBeenCalled();
|
|
247
|
-
// We can't easily check if listeners were added without access to the internal state of coreEvents,
|
|
248
|
-
// but we can verify that drainBacklogs was called.
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
describe('getNodeMemoryArgs', () => {
|
|
252
|
-
let osTotalMemSpy;
|
|
253
|
-
let v8GetHeapStatisticsSpy;
|
|
254
|
-
beforeEach(() => {
|
|
255
|
-
osTotalMemSpy = vi.spyOn(os, 'totalmem');
|
|
256
|
-
v8GetHeapStatisticsSpy = vi.spyOn(v8, 'getHeapStatistics');
|
|
257
|
-
delete process.env['GEMINI_CLI_NO_RELAUNCH'];
|
|
258
|
-
});
|
|
259
|
-
afterEach(() => {
|
|
260
|
-
vi.restoreAllMocks();
|
|
261
|
-
});
|
|
262
|
-
it('should return empty array if GEMINI_CLI_NO_RELAUNCH is set', () => {
|
|
263
|
-
process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true';
|
|
264
|
-
expect(getNodeMemoryArgs(false)).toEqual([]);
|
|
265
|
-
});
|
|
266
|
-
it('should return empty array if current heap limit is sufficient', () => {
|
|
267
|
-
osTotalMemSpy.mockReturnValue(16 * 1024 * 1024 * 1024); // 16GB
|
|
268
|
-
v8GetHeapStatisticsSpy.mockReturnValue({
|
|
269
|
-
heap_size_limit: 8 * 1024 * 1024 * 1024, // 8GB
|
|
270
|
-
});
|
|
271
|
-
// Target is 50% of 16GB = 8GB. Current is 8GB. No relaunch needed.
|
|
272
|
-
expect(getNodeMemoryArgs(false)).toEqual([]);
|
|
273
|
-
});
|
|
274
|
-
it('should return memory args if current heap limit is insufficient', () => {
|
|
275
|
-
osTotalMemSpy.mockReturnValue(16 * 1024 * 1024 * 1024); // 16GB
|
|
276
|
-
v8GetHeapStatisticsSpy.mockReturnValue({
|
|
277
|
-
heap_size_limit: 4 * 1024 * 1024 * 1024, // 4GB
|
|
278
|
-
});
|
|
279
|
-
// Target is 50% of 16GB = 8GB. Current is 4GB. Relaunch needed.
|
|
280
|
-
expect(getNodeMemoryArgs(false)).toEqual(['--max-old-space-size=8192']);
|
|
281
|
-
});
|
|
282
|
-
it('should log debug info when isDebugMode is true', () => {
|
|
283
|
-
const debugSpy = vi.spyOn(debugLogger, 'debug');
|
|
284
|
-
osTotalMemSpy.mockReturnValue(16 * 1024 * 1024 * 1024);
|
|
285
|
-
v8GetHeapStatisticsSpy.mockReturnValue({
|
|
286
|
-
heap_size_limit: 4 * 1024 * 1024 * 1024,
|
|
287
|
-
});
|
|
288
|
-
getNodeMemoryArgs(true);
|
|
289
|
-
expect(debugSpy).toHaveBeenCalledWith(expect.stringContaining('Current heap size'));
|
|
290
|
-
expect(debugSpy).toHaveBeenCalledWith(expect.stringContaining('Need to relaunch with more memory'));
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
describe('gemini.tsx main function kitty protocol', () => {
|
|
294
|
-
let originalEnvNoRelaunch;
|
|
295
|
-
let setRawModeSpy;
|
|
296
|
-
beforeEach(() => {
|
|
297
|
-
// Set no relaunch in tests since process spawning causing issues in tests
|
|
298
|
-
originalEnvNoRelaunch = process.env['GEMINI_CLI_NO_RELAUNCH'];
|
|
299
|
-
process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true';
|
|
300
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
301
|
-
if (!process.stdin.setRawMode) {
|
|
302
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
303
|
-
process.stdin.setRawMode = vi.fn();
|
|
304
|
-
}
|
|
305
|
-
setRawModeSpy = vi.spyOn(process.stdin, 'setRawMode');
|
|
306
|
-
Object.defineProperty(process.stdin, 'isTTY', {
|
|
307
|
-
value: true,
|
|
308
|
-
configurable: true,
|
|
309
|
-
});
|
|
310
|
-
Object.defineProperty(process.stdin, 'isRaw', {
|
|
311
|
-
value: false,
|
|
312
|
-
configurable: true,
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
afterEach(() => {
|
|
316
|
-
// Restore original env variables
|
|
317
|
-
if (originalEnvNoRelaunch !== undefined) {
|
|
318
|
-
process.env['GEMINI_CLI_NO_RELAUNCH'] = originalEnvNoRelaunch;
|
|
319
|
-
}
|
|
320
|
-
else {
|
|
321
|
-
delete process.env['GEMINI_CLI_NO_RELAUNCH'];
|
|
322
|
-
}
|
|
323
|
-
vi.restoreAllMocks();
|
|
324
|
-
});
|
|
325
|
-
it('should call setRawMode and detectCapabilities when isInteractive is true', async () => {
|
|
326
|
-
const { terminalCapabilityManager } = await import('./ui/utils/terminalCapabilityManager.js');
|
|
327
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
328
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
329
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
330
|
-
isInteractive: () => true,
|
|
331
|
-
getQuestion: () => '',
|
|
332
|
-
getSandbox: () => false,
|
|
333
|
-
getDebugMode: () => false,
|
|
334
|
-
getListExtensions: () => false,
|
|
335
|
-
getListSessions: () => false,
|
|
336
|
-
getDeleteSession: () => undefined,
|
|
337
|
-
getMcpServers: () => ({}),
|
|
338
|
-
getMcpClientManager: vi.fn(),
|
|
339
|
-
initialize: vi.fn(),
|
|
340
|
-
getIdeMode: () => false,
|
|
341
|
-
getExperimentalZedIntegration: () => false,
|
|
342
|
-
getScreenReader: () => false,
|
|
343
|
-
getGeminiMdFileCount: () => 0,
|
|
344
|
-
getPolicyEngine: vi.fn(),
|
|
345
|
-
getMessageBus: () => ({
|
|
346
|
-
subscribe: vi.fn(),
|
|
347
|
-
}),
|
|
348
|
-
getEnableHooks: () => false,
|
|
349
|
-
getHookSystem: () => undefined,
|
|
350
|
-
getToolRegistry: vi.fn(),
|
|
351
|
-
getContentGeneratorConfig: vi.fn(),
|
|
352
|
-
getModel: () => 'gemini-pro',
|
|
353
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
354
|
-
getApprovalMode: () => 'default',
|
|
355
|
-
getCoreTools: () => [],
|
|
356
|
-
getTelemetryEnabled: () => false,
|
|
357
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
358
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
359
|
-
getOutputFormat: () => 'text',
|
|
360
|
-
getExtensions: () => [],
|
|
361
|
-
getUsageStatisticsEnabled: () => false,
|
|
362
|
-
getRemoteAdminSettings: () => undefined,
|
|
363
|
-
setTerminalBackground: vi.fn(),
|
|
364
|
-
storage: {
|
|
365
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
366
|
-
},
|
|
367
|
-
});
|
|
368
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
369
|
-
merged: {
|
|
370
|
-
advanced: {},
|
|
371
|
-
security: { auth: {} },
|
|
372
|
-
ui: {},
|
|
373
|
-
},
|
|
374
|
-
}));
|
|
375
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
376
|
-
model: undefined,
|
|
377
|
-
sandbox: undefined,
|
|
378
|
-
debug: undefined,
|
|
379
|
-
prompt: undefined,
|
|
380
|
-
promptInteractive: undefined,
|
|
381
|
-
query: undefined,
|
|
382
|
-
yolo: undefined,
|
|
383
|
-
approvalMode: undefined,
|
|
384
|
-
allowedMcpServerNames: undefined,
|
|
385
|
-
allowedTools: undefined,
|
|
386
|
-
experimentalAcp: undefined,
|
|
387
|
-
extensions: undefined,
|
|
388
|
-
listExtensions: undefined,
|
|
389
|
-
includeDirectories: undefined,
|
|
390
|
-
screenReader: undefined,
|
|
391
|
-
useWriteTodos: undefined,
|
|
392
|
-
resume: undefined,
|
|
393
|
-
listSessions: undefined,
|
|
394
|
-
deleteSession: undefined,
|
|
395
|
-
outputFormat: undefined,
|
|
396
|
-
fakeResponses: undefined,
|
|
397
|
-
recordResponses: undefined,
|
|
398
|
-
rawOutput: undefined,
|
|
399
|
-
acceptRawOutputRisk: undefined,
|
|
400
|
-
isCommand: undefined,
|
|
401
|
-
});
|
|
402
|
-
await act(async () => {
|
|
403
|
-
await main();
|
|
404
|
-
});
|
|
405
|
-
expect(setRawModeSpy).toHaveBeenCalledWith(true);
|
|
406
|
-
expect(terminalCapabilityManager.detectCapabilities).toHaveBeenCalledTimes(1);
|
|
407
|
-
});
|
|
408
|
-
it.each([
|
|
409
|
-
{ flag: 'listExtensions' },
|
|
410
|
-
{ flag: 'listSessions' },
|
|
411
|
-
{ flag: 'deleteSession', value: 'session-id' },
|
|
412
|
-
])('should handle --$flag flag', async ({ flag, value }) => {
|
|
413
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
414
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
415
|
-
const { listSessions, deleteSession } = await import('./utils/sessions.js');
|
|
416
|
-
const processExitSpy = vi
|
|
417
|
-
.spyOn(process, 'exit')
|
|
418
|
-
.mockImplementation((code) => {
|
|
419
|
-
throw new MockProcessExitError(code);
|
|
420
|
-
});
|
|
421
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
422
|
-
merged: {
|
|
423
|
-
advanced: {},
|
|
424
|
-
security: { auth: {} },
|
|
425
|
-
ui: {},
|
|
426
|
-
},
|
|
427
|
-
workspace: { settings: {} },
|
|
428
|
-
setValue: vi.fn(),
|
|
429
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
430
|
-
}));
|
|
431
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
432
|
-
promptInteractive: false,
|
|
433
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
434
|
-
const mockConfig = {
|
|
435
|
-
isInteractive: () => false,
|
|
436
|
-
getQuestion: () => '',
|
|
437
|
-
getSandbox: () => false,
|
|
438
|
-
getDebugMode: () => false,
|
|
439
|
-
getListExtensions: () => flag === 'listExtensions',
|
|
440
|
-
getListSessions: () => flag === 'listSessions',
|
|
441
|
-
getDeleteSession: () => (flag === 'deleteSession' ? value : undefined),
|
|
442
|
-
getExtensions: () => [{ name: 'ext1' }],
|
|
443
|
-
getPolicyEngine: vi.fn(),
|
|
444
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
445
|
-
getEnableHooks: () => false,
|
|
446
|
-
getHookSystem: () => undefined,
|
|
447
|
-
initialize: vi.fn(),
|
|
448
|
-
getContentGeneratorConfig: vi.fn(),
|
|
449
|
-
getMcpServers: () => ({}),
|
|
450
|
-
getMcpClientManager: vi.fn(),
|
|
451
|
-
getIdeMode: () => false,
|
|
452
|
-
getExperimentalZedIntegration: () => false,
|
|
453
|
-
getScreenReader: () => false,
|
|
454
|
-
getGeminiMdFileCount: () => 0,
|
|
455
|
-
getProjectRoot: () => '/',
|
|
456
|
-
getRemoteAdminSettings: () => undefined,
|
|
457
|
-
setTerminalBackground: vi.fn(),
|
|
458
|
-
refreshAuth: vi.fn(),
|
|
459
|
-
};
|
|
460
|
-
vi.mocked(loadCliConfig).mockResolvedValue(mockConfig);
|
|
461
|
-
vi.mock('./utils/sessions.js', () => ({
|
|
462
|
-
listSessions: vi.fn(),
|
|
463
|
-
deleteSession: vi.fn(),
|
|
464
|
-
}));
|
|
465
|
-
const debugLoggerLogSpy = vi
|
|
466
|
-
.spyOn(debugLogger, 'log')
|
|
467
|
-
.mockImplementation(() => { });
|
|
468
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
469
|
-
try {
|
|
470
|
-
await main();
|
|
471
|
-
}
|
|
472
|
-
catch (e) {
|
|
473
|
-
if (!(e instanceof MockProcessExitError))
|
|
474
|
-
throw e;
|
|
475
|
-
}
|
|
476
|
-
finally {
|
|
477
|
-
delete process.env['GEMINI_API_KEY'];
|
|
478
|
-
}
|
|
479
|
-
if (flag === 'listExtensions') {
|
|
480
|
-
expect(debugLoggerLogSpy).toHaveBeenCalledWith(expect.stringContaining('ext1'));
|
|
481
|
-
}
|
|
482
|
-
else if (flag === 'listSessions') {
|
|
483
|
-
expect(listSessions).toHaveBeenCalledWith(mockConfig);
|
|
484
|
-
}
|
|
485
|
-
else if (flag === 'deleteSession') {
|
|
486
|
-
expect(deleteSession).toHaveBeenCalledWith(mockConfig, value);
|
|
487
|
-
}
|
|
488
|
-
expect(processExitSpy).toHaveBeenCalledWith(0);
|
|
489
|
-
processExitSpy.mockRestore();
|
|
490
|
-
});
|
|
491
|
-
it('should handle sandbox activation', async () => {
|
|
492
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
493
|
-
const { loadSandboxConfig } = await import('./config/sandboxConfig.js');
|
|
494
|
-
const { start_sandbox } = await import('./utils/sandbox.js');
|
|
495
|
-
const { relaunchOnExitCode } = await import('./utils/relaunch.js');
|
|
496
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
497
|
-
const processExitSpy = vi
|
|
498
|
-
.spyOn(process, 'exit')
|
|
499
|
-
.mockImplementation((code) => {
|
|
500
|
-
throw new MockProcessExitError(code);
|
|
501
|
-
});
|
|
502
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
503
|
-
promptInteractive: false,
|
|
504
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
505
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
506
|
-
merged: {
|
|
507
|
-
advanced: {},
|
|
508
|
-
security: { auth: {} },
|
|
509
|
-
ui: {},
|
|
510
|
-
},
|
|
511
|
-
workspace: { settings: {} },
|
|
512
|
-
setValue: vi.fn(),
|
|
513
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
514
|
-
}));
|
|
515
|
-
const mockConfig = {
|
|
516
|
-
isInteractive: () => false,
|
|
517
|
-
getQuestion: () => '',
|
|
518
|
-
getSandbox: () => true,
|
|
519
|
-
getDebugMode: () => false,
|
|
520
|
-
getListExtensions: () => false,
|
|
521
|
-
getListSessions: () => false,
|
|
522
|
-
getDeleteSession: () => undefined,
|
|
523
|
-
getExtensions: () => [],
|
|
524
|
-
getPolicyEngine: vi.fn(),
|
|
525
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
526
|
-
getEnableHooks: () => false,
|
|
527
|
-
getHookSystem: () => undefined,
|
|
528
|
-
initialize: vi.fn(),
|
|
529
|
-
getContentGeneratorConfig: vi.fn(),
|
|
530
|
-
getMcpServers: () => ({}),
|
|
531
|
-
getMcpClientManager: vi.fn(),
|
|
532
|
-
getIdeMode: () => false,
|
|
533
|
-
getExperimentalZedIntegration: () => false,
|
|
534
|
-
getScreenReader: () => false,
|
|
535
|
-
getGeminiMdFileCount: () => 0,
|
|
536
|
-
getProjectRoot: () => '/',
|
|
537
|
-
refreshAuth: vi.fn(),
|
|
538
|
-
getRemoteAdminSettings: () => undefined,
|
|
539
|
-
setTerminalBackground: vi.fn(),
|
|
540
|
-
getToolRegistry: () => ({ getAllTools: () => [] }),
|
|
541
|
-
getModel: () => 'gemini-pro',
|
|
542
|
-
getEmbeddingModel: () => 'embedding-model',
|
|
543
|
-
getCoreTools: () => [],
|
|
544
|
-
getApprovalMode: () => 'default',
|
|
545
|
-
getPreviewFeatures: () => false,
|
|
546
|
-
getTargetDir: () => '/',
|
|
547
|
-
getUsageStatisticsEnabled: () => false,
|
|
548
|
-
getTelemetryEnabled: () => false,
|
|
549
|
-
getTelemetryTarget: () => 'none',
|
|
550
|
-
getTelemetryOtlpEndpoint: () => '',
|
|
551
|
-
getTelemetryOtlpProtocol: () => 'grpc',
|
|
552
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
553
|
-
getContinueOnFailedApiCall: () => false,
|
|
554
|
-
getShellToolInactivityTimeout: () => 0,
|
|
555
|
-
getTruncateToolOutputThreshold: () => 0,
|
|
556
|
-
getUseRipgrep: () => false,
|
|
557
|
-
getUseWriteTodos: () => false,
|
|
558
|
-
getHooks: () => undefined,
|
|
559
|
-
getExperiments: () => undefined,
|
|
560
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
561
|
-
getOutputFormat: () => 'text',
|
|
562
|
-
getFolderTrust: () => false,
|
|
563
|
-
getPendingIncludeDirectories: () => [],
|
|
564
|
-
getWorkspaceContext: () => ({ getDirectories: () => ['/'] }),
|
|
565
|
-
getModelAvailabilityService: () => ({
|
|
566
|
-
reset: vi.fn(),
|
|
567
|
-
resetTurn: vi.fn(),
|
|
568
|
-
}),
|
|
569
|
-
getBaseLlmClient: () => ({}),
|
|
570
|
-
getGeminiClient: () => ({}),
|
|
571
|
-
getContentGenerator: () => ({}),
|
|
572
|
-
isTrustedFolder: () => true,
|
|
573
|
-
isYoloModeDisabled: () => true,
|
|
574
|
-
isPlanEnabled: () => false,
|
|
575
|
-
isEventDrivenSchedulerEnabled: () => false,
|
|
576
|
-
};
|
|
577
|
-
vi.mocked(loadCliConfig).mockResolvedValue(mockConfig);
|
|
578
|
-
vi.mocked(loadSandboxConfig).mockResolvedValue({
|
|
579
|
-
command: 'docker',
|
|
580
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
581
|
-
vi.mocked(relaunchOnExitCode).mockImplementation(async (fn) => {
|
|
582
|
-
await fn();
|
|
583
|
-
});
|
|
584
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
585
|
-
try {
|
|
586
|
-
await main();
|
|
587
|
-
}
|
|
588
|
-
catch (e) {
|
|
589
|
-
if (!(e instanceof MockProcessExitError))
|
|
590
|
-
throw e;
|
|
591
|
-
}
|
|
592
|
-
finally {
|
|
593
|
-
delete process.env['GEMINI_API_KEY'];
|
|
594
|
-
}
|
|
595
|
-
expect(start_sandbox).toHaveBeenCalled();
|
|
596
|
-
expect(processExitSpy).toHaveBeenCalledWith(0);
|
|
597
|
-
processExitSpy.mockRestore();
|
|
598
|
-
});
|
|
599
|
-
it('should log warning when theme is not found', async () => {
|
|
600
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
601
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
602
|
-
const { themeManager } = await import('./ui/themes/theme-manager.js');
|
|
603
|
-
const debugLoggerWarnSpy = vi
|
|
604
|
-
.spyOn(debugLogger, 'warn')
|
|
605
|
-
.mockImplementation(() => { });
|
|
606
|
-
const processExitSpy = vi
|
|
607
|
-
.spyOn(process, 'exit')
|
|
608
|
-
.mockImplementation((code) => {
|
|
609
|
-
throw new MockProcessExitError(code);
|
|
610
|
-
});
|
|
611
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
612
|
-
merged: {
|
|
613
|
-
advanced: {},
|
|
614
|
-
security: { auth: {} },
|
|
615
|
-
ui: { theme: 'non-existent-theme' },
|
|
616
|
-
},
|
|
617
|
-
workspace: { settings: {} },
|
|
618
|
-
setValue: vi.fn(),
|
|
619
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
620
|
-
}));
|
|
621
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
622
|
-
promptInteractive: false,
|
|
623
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
624
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
625
|
-
isInteractive: () => false,
|
|
626
|
-
getQuestion: () => 'test',
|
|
627
|
-
getSandbox: () => false,
|
|
628
|
-
getDebugMode: () => false,
|
|
629
|
-
getPolicyEngine: vi.fn(),
|
|
630
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
631
|
-
getEnableHooks: () => false,
|
|
632
|
-
getHookSystem: () => undefined,
|
|
633
|
-
initialize: vi.fn(),
|
|
634
|
-
getContentGeneratorConfig: vi.fn(),
|
|
635
|
-
getMcpServers: () => ({}),
|
|
636
|
-
getMcpClientManager: vi.fn(),
|
|
637
|
-
getIdeMode: () => false,
|
|
638
|
-
getExperimentalZedIntegration: () => false,
|
|
639
|
-
getScreenReader: () => false,
|
|
640
|
-
getGeminiMdFileCount: () => 0,
|
|
641
|
-
getProjectRoot: () => '/',
|
|
642
|
-
getListExtensions: () => false,
|
|
643
|
-
getListSessions: () => false,
|
|
644
|
-
getDeleteSession: () => undefined,
|
|
645
|
-
getToolRegistry: vi.fn(),
|
|
646
|
-
getExtensions: () => [],
|
|
647
|
-
getModel: () => 'gemini-pro',
|
|
648
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
649
|
-
getApprovalMode: () => 'default',
|
|
650
|
-
getCoreTools: () => [],
|
|
651
|
-
getTelemetryEnabled: () => false,
|
|
652
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
653
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
654
|
-
getOutputFormat: () => 'text',
|
|
655
|
-
getUsageStatisticsEnabled: () => false,
|
|
656
|
-
refreshAuth: vi.fn(),
|
|
657
|
-
setTerminalBackground: vi.fn(),
|
|
658
|
-
getRemoteAdminSettings: () => undefined,
|
|
659
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
660
|
-
vi.spyOn(themeManager, 'setActiveTheme').mockReturnValue(false);
|
|
661
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
662
|
-
try {
|
|
663
|
-
await main();
|
|
664
|
-
}
|
|
665
|
-
catch (e) {
|
|
666
|
-
if (!(e instanceof MockProcessExitError))
|
|
667
|
-
throw e;
|
|
668
|
-
}
|
|
669
|
-
finally {
|
|
670
|
-
delete process.env['GEMINI_API_KEY'];
|
|
671
|
-
}
|
|
672
|
-
expect(debugLoggerWarnSpy).toHaveBeenCalledWith(expect.stringContaining('Warning: Theme "non-existent-theme" not found.'));
|
|
673
|
-
processExitSpy.mockRestore();
|
|
674
|
-
});
|
|
675
|
-
it('should handle session selector error', async () => {
|
|
676
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
677
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
678
|
-
const { SessionSelector } = await import('./utils/sessionUtils.js');
|
|
679
|
-
vi.mocked(SessionSelector).mockImplementation(() => ({
|
|
680
|
-
resolveSession: vi
|
|
681
|
-
.fn()
|
|
682
|
-
.mockRejectedValue(new Error('Session not found')),
|
|
683
|
-
}));
|
|
684
|
-
const processExitSpy = vi
|
|
685
|
-
.spyOn(process, 'exit')
|
|
686
|
-
.mockImplementation((code) => {
|
|
687
|
-
throw new MockProcessExitError(code);
|
|
688
|
-
});
|
|
689
|
-
const emitFeedbackSpy = vi.spyOn(coreEvents, 'emitFeedback');
|
|
690
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
691
|
-
merged: { advanced: {}, security: { auth: {} }, ui: { theme: 'test' } },
|
|
692
|
-
workspace: { settings: {} },
|
|
693
|
-
setValue: vi.fn(),
|
|
694
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
695
|
-
}));
|
|
696
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
697
|
-
promptInteractive: false,
|
|
698
|
-
resume: 'session-id',
|
|
699
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
700
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
701
|
-
isInteractive: () => true,
|
|
702
|
-
getQuestion: () => '',
|
|
703
|
-
getSandbox: () => false,
|
|
704
|
-
getDebugMode: () => false,
|
|
705
|
-
getPolicyEngine: vi.fn(),
|
|
706
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
707
|
-
getEnableHooks: () => false,
|
|
708
|
-
getHookSystem: () => undefined,
|
|
709
|
-
initialize: vi.fn(),
|
|
710
|
-
getContentGeneratorConfig: vi.fn(),
|
|
711
|
-
getMcpServers: () => ({}),
|
|
712
|
-
getMcpClientManager: vi.fn(),
|
|
713
|
-
getIdeMode: () => false,
|
|
714
|
-
getExperimentalZedIntegration: () => false,
|
|
715
|
-
getScreenReader: () => false,
|
|
716
|
-
getGeminiMdFileCount: () => 0,
|
|
717
|
-
getProjectRoot: () => '/',
|
|
718
|
-
getListExtensions: () => false,
|
|
719
|
-
getListSessions: () => false,
|
|
720
|
-
getDeleteSession: () => undefined,
|
|
721
|
-
getToolRegistry: vi.fn(),
|
|
722
|
-
getExtensions: () => [],
|
|
723
|
-
getModel: () => 'gemini-pro',
|
|
724
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
725
|
-
getApprovalMode: () => 'default',
|
|
726
|
-
getCoreTools: () => [],
|
|
727
|
-
getTelemetryEnabled: () => false,
|
|
728
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
729
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
730
|
-
getOutputFormat: () => 'text',
|
|
731
|
-
getUsageStatisticsEnabled: () => false,
|
|
732
|
-
getRemoteAdminSettings: () => undefined,
|
|
733
|
-
setTerminalBackground: vi.fn(),
|
|
734
|
-
storage: {
|
|
735
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
736
|
-
},
|
|
737
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
738
|
-
try {
|
|
739
|
-
await main();
|
|
740
|
-
}
|
|
741
|
-
catch (e) {
|
|
742
|
-
if (!(e instanceof MockProcessExitError))
|
|
743
|
-
throw e;
|
|
744
|
-
}
|
|
745
|
-
expect(emitFeedbackSpy).toHaveBeenCalledWith('error', expect.stringContaining('Error resuming session: Session not found'));
|
|
746
|
-
expect(processExitSpy).toHaveBeenCalledWith(42);
|
|
747
|
-
processExitSpy.mockRestore();
|
|
748
|
-
emitFeedbackSpy.mockRestore();
|
|
749
|
-
});
|
|
750
|
-
it.skip('should log error when cleanupExpiredSessions fails', async () => {
|
|
751
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
752
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
753
|
-
const { cleanupExpiredSessions } = await import('./utils/sessionCleanup.js');
|
|
754
|
-
vi.mocked(cleanupExpiredSessions).mockRejectedValue(new Error('Cleanup failed'));
|
|
755
|
-
const debugLoggerErrorSpy = vi
|
|
756
|
-
.spyOn(debugLogger, 'error')
|
|
757
|
-
.mockImplementation(() => { });
|
|
758
|
-
const processExitSpy = vi
|
|
759
|
-
.spyOn(process, 'exit')
|
|
760
|
-
.mockImplementation((code) => {
|
|
761
|
-
throw new MockProcessExitError(code);
|
|
762
|
-
});
|
|
763
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
764
|
-
merged: { advanced: {}, security: { auth: {} }, ui: {} },
|
|
765
|
-
workspace: { settings: {} },
|
|
766
|
-
setValue: vi.fn(),
|
|
767
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
768
|
-
}));
|
|
769
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
770
|
-
promptInteractive: false,
|
|
771
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
772
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
773
|
-
isInteractive: () => false,
|
|
774
|
-
getQuestion: () => 'test',
|
|
775
|
-
getSandbox: () => false,
|
|
776
|
-
getDebugMode: () => false,
|
|
777
|
-
getPolicyEngine: vi.fn(),
|
|
778
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
779
|
-
getEnableHooks: () => false,
|
|
780
|
-
getHookSystem: () => undefined,
|
|
781
|
-
initialize: vi.fn(),
|
|
782
|
-
getContentGeneratorConfig: vi.fn(),
|
|
783
|
-
getMcpServers: () => ({}),
|
|
784
|
-
getMcpClientManager: vi.fn(),
|
|
785
|
-
getIdeMode: () => false,
|
|
786
|
-
getExperimentalZedIntegration: () => false,
|
|
787
|
-
getScreenReader: () => false,
|
|
788
|
-
getGeminiMdFileCount: () => 0,
|
|
789
|
-
getProjectRoot: () => '/',
|
|
790
|
-
getListExtensions: () => false,
|
|
791
|
-
getListSessions: () => false,
|
|
792
|
-
getDeleteSession: () => undefined,
|
|
793
|
-
getToolRegistry: vi.fn(),
|
|
794
|
-
getExtensions: () => [],
|
|
795
|
-
getModel: () => 'gemini-pro',
|
|
796
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
797
|
-
getApprovalMode: () => 'default',
|
|
798
|
-
getCoreTools: () => [],
|
|
799
|
-
getTelemetryEnabled: () => false,
|
|
800
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
801
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
802
|
-
getOutputFormat: () => 'text',
|
|
803
|
-
getUsageStatisticsEnabled: () => false,
|
|
804
|
-
getRemoteAdminSettings: () => undefined,
|
|
805
|
-
setTerminalBackground: vi.fn(),
|
|
806
|
-
storage: {
|
|
807
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
808
|
-
},
|
|
809
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
810
|
-
// The mock is already set up at the top of the test
|
|
811
|
-
try {
|
|
812
|
-
await main();
|
|
813
|
-
}
|
|
814
|
-
catch (e) {
|
|
815
|
-
if (!(e instanceof MockProcessExitError))
|
|
816
|
-
throw e;
|
|
817
|
-
}
|
|
818
|
-
expect(debugLoggerErrorSpy).toHaveBeenCalledWith(expect.stringContaining('Failed to cleanup expired sessions: Cleanup failed'));
|
|
819
|
-
expect(processExitSpy).toHaveBeenCalledWith(0); // Should not exit on cleanup failure
|
|
820
|
-
processExitSpy.mockRestore();
|
|
821
|
-
});
|
|
822
|
-
it('should read from stdin in non-interactive mode', async () => {
|
|
823
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
824
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
825
|
-
const { readStdin } = await import('./utils/readStdin.js');
|
|
826
|
-
const processExitSpy = vi
|
|
827
|
-
.spyOn(process, 'exit')
|
|
828
|
-
.mockImplementation((code) => {
|
|
829
|
-
throw new MockProcessExitError(code);
|
|
830
|
-
});
|
|
831
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
832
|
-
merged: { advanced: {}, security: { auth: {} }, ui: {} },
|
|
833
|
-
workspace: { settings: {} },
|
|
834
|
-
setValue: vi.fn(),
|
|
835
|
-
forScope: () => ({ settings: {}, originalSettings: {}, path: '' }),
|
|
836
|
-
}));
|
|
837
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
838
|
-
promptInteractive: false,
|
|
839
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
840
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
841
|
-
isInteractive: () => false,
|
|
842
|
-
getQuestion: () => 'test-question',
|
|
843
|
-
getSandbox: () => false,
|
|
844
|
-
getDebugMode: () => false,
|
|
845
|
-
getPolicyEngine: vi.fn(),
|
|
846
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
847
|
-
getEnableHooks: () => false,
|
|
848
|
-
getHookSystem: () => undefined,
|
|
849
|
-
initialize: vi.fn(),
|
|
850
|
-
getContentGeneratorConfig: vi.fn(),
|
|
851
|
-
getMcpServers: () => ({}),
|
|
852
|
-
getMcpClientManager: vi.fn(),
|
|
853
|
-
getIdeMode: () => false,
|
|
854
|
-
getExperimentalZedIntegration: () => false,
|
|
855
|
-
getScreenReader: () => false,
|
|
856
|
-
getGeminiMdFileCount: () => 0,
|
|
857
|
-
getProjectRoot: () => '/',
|
|
858
|
-
getListExtensions: () => false,
|
|
859
|
-
getListSessions: () => false,
|
|
860
|
-
getDeleteSession: () => undefined,
|
|
861
|
-
getToolRegistry: vi.fn(),
|
|
862
|
-
getExtensions: () => [],
|
|
863
|
-
getModel: () => 'gemini-pro',
|
|
864
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
865
|
-
getApprovalMode: () => 'default',
|
|
866
|
-
getCoreTools: () => [],
|
|
867
|
-
getTelemetryEnabled: () => false,
|
|
868
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
869
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
870
|
-
getOutputFormat: () => 'text',
|
|
871
|
-
getUsageStatisticsEnabled: () => false,
|
|
872
|
-
refreshAuth: vi.fn(),
|
|
873
|
-
setTerminalBackground: vi.fn(),
|
|
874
|
-
getRemoteAdminSettings: () => undefined,
|
|
875
|
-
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
876
|
-
vi.mock('./utils/readStdin.js', () => ({
|
|
877
|
-
readStdin: vi.fn().mockResolvedValue('stdin-data'),
|
|
878
|
-
}));
|
|
879
|
-
// Mock stdin to be non-TTY
|
|
880
|
-
Object.defineProperty(process.stdin, 'isTTY', {
|
|
881
|
-
value: false,
|
|
882
|
-
configurable: true,
|
|
883
|
-
});
|
|
884
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
885
|
-
try {
|
|
886
|
-
await main();
|
|
887
|
-
}
|
|
888
|
-
catch (e) {
|
|
889
|
-
if (!(e instanceof MockProcessExitError))
|
|
890
|
-
throw e;
|
|
891
|
-
}
|
|
892
|
-
finally {
|
|
893
|
-
delete process.env['GEMINI_API_KEY'];
|
|
894
|
-
}
|
|
895
|
-
expect(readStdin).toHaveBeenCalled();
|
|
896
|
-
// In this test setup, runNonInteractive might be called on the mocked module,
|
|
897
|
-
// but we need to ensure we are checking the correct spy instance.
|
|
898
|
-
// Since vi.mock is hoisted, runNonInteractiveSpy is defined early.
|
|
899
|
-
expect(runNonInteractiveSpy).toHaveBeenCalled();
|
|
900
|
-
const callArgs = runNonInteractiveSpy.mock.calls[0][0];
|
|
901
|
-
expect(callArgs.input).toBe('test-question');
|
|
902
|
-
expect(processExitSpy).toHaveBeenCalledWith(0);
|
|
903
|
-
processExitSpy.mockRestore();
|
|
904
|
-
Object.defineProperty(process.stdin, 'isTTY', {
|
|
905
|
-
value: true,
|
|
906
|
-
configurable: true,
|
|
907
|
-
});
|
|
908
|
-
});
|
|
909
|
-
});
|
|
910
|
-
describe('gemini.tsx main function exit codes', () => {
|
|
911
|
-
let originalEnvNoRelaunch;
|
|
912
|
-
beforeEach(() => {
|
|
913
|
-
originalEnvNoRelaunch = process.env['GEMINI_CLI_NO_RELAUNCH'];
|
|
914
|
-
process.env['GEMINI_CLI_NO_RELAUNCH'] = 'true';
|
|
915
|
-
vi.spyOn(process, 'exit').mockImplementation((code) => {
|
|
916
|
-
throw new MockProcessExitError(code);
|
|
917
|
-
});
|
|
918
|
-
// Mock stderr to avoid cluttering output
|
|
919
|
-
vi.spyOn(process.stderr, 'write').mockImplementation(() => true);
|
|
920
|
-
});
|
|
921
|
-
afterEach(() => {
|
|
922
|
-
if (originalEnvNoRelaunch !== undefined) {
|
|
923
|
-
process.env['GEMINI_CLI_NO_RELAUNCH'] = originalEnvNoRelaunch;
|
|
924
|
-
}
|
|
925
|
-
else {
|
|
926
|
-
delete process.env['GEMINI_CLI_NO_RELAUNCH'];
|
|
927
|
-
}
|
|
928
|
-
vi.restoreAllMocks();
|
|
929
|
-
});
|
|
930
|
-
it('should exit with 42 for invalid input combination (prompt-interactive with non-TTY)', async () => {
|
|
931
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
932
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
933
|
-
vi.mocked(loadCliConfig).mockResolvedValue({});
|
|
934
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
935
|
-
merged: { security: { auth: {} }, ui: {} },
|
|
936
|
-
}));
|
|
937
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
938
|
-
promptInteractive: true,
|
|
939
|
-
});
|
|
940
|
-
Object.defineProperty(process.stdin, 'isTTY', {
|
|
941
|
-
value: false,
|
|
942
|
-
configurable: true,
|
|
943
|
-
});
|
|
944
|
-
try {
|
|
945
|
-
await main();
|
|
946
|
-
expect.fail('Should have thrown MockProcessExitError');
|
|
947
|
-
}
|
|
948
|
-
catch (e) {
|
|
949
|
-
expect(e).toBeInstanceOf(MockProcessExitError);
|
|
950
|
-
expect(e.code).toBe(42);
|
|
951
|
-
}
|
|
952
|
-
});
|
|
953
|
-
it('should exit with 41 for auth failure during sandbox setup', async () => {
|
|
954
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
955
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
956
|
-
const { loadSandboxConfig } = await import('./config/sandboxConfig.js');
|
|
957
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
958
|
-
vi.mocked(loadSandboxConfig).mockResolvedValue({});
|
|
959
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
960
|
-
refreshAuth: vi.fn().mockRejectedValue(new Error('Auth failed')),
|
|
961
|
-
getRemoteAdminSettings: vi.fn().mockReturnValue(undefined),
|
|
962
|
-
isInteractive: vi.fn().mockReturnValue(true),
|
|
963
|
-
});
|
|
964
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
965
|
-
merged: {
|
|
966
|
-
security: { auth: { selectedType: 'google', useExternal: false } },
|
|
967
|
-
},
|
|
968
|
-
}));
|
|
969
|
-
vi.mocked(parseArguments).mockResolvedValue({});
|
|
970
|
-
vi.mock('./config/auth.js', () => ({
|
|
971
|
-
validateAuthMethod: vi.fn().mockReturnValue(null),
|
|
972
|
-
}));
|
|
973
|
-
try {
|
|
974
|
-
await main();
|
|
975
|
-
expect.fail('Should have thrown MockProcessExitError');
|
|
976
|
-
}
|
|
977
|
-
catch (e) {
|
|
978
|
-
expect(e).toBeInstanceOf(MockProcessExitError);
|
|
979
|
-
expect(e.code).toBe(41);
|
|
980
|
-
}
|
|
981
|
-
});
|
|
982
|
-
it('should exit with 42 for session resume failure', async () => {
|
|
983
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
984
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
985
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
986
|
-
isInteractive: () => false,
|
|
987
|
-
getQuestion: () => 'test',
|
|
988
|
-
getSandbox: () => false,
|
|
989
|
-
getDebugMode: () => false,
|
|
990
|
-
getListExtensions: () => false,
|
|
991
|
-
getListSessions: () => false,
|
|
992
|
-
getDeleteSession: () => undefined,
|
|
993
|
-
getMcpServers: () => ({}),
|
|
994
|
-
getMcpClientManager: vi.fn(),
|
|
995
|
-
initialize: vi.fn(),
|
|
996
|
-
getIdeMode: () => false,
|
|
997
|
-
getExperimentalZedIntegration: () => false,
|
|
998
|
-
getScreenReader: () => false,
|
|
999
|
-
getGeminiMdFileCount: () => 0,
|
|
1000
|
-
getPolicyEngine: vi.fn(),
|
|
1001
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
1002
|
-
getEnableHooks: () => false,
|
|
1003
|
-
getHookSystem: () => undefined,
|
|
1004
|
-
getToolRegistry: vi.fn(),
|
|
1005
|
-
getContentGeneratorConfig: vi.fn(),
|
|
1006
|
-
getModel: () => 'gemini-pro',
|
|
1007
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
1008
|
-
getApprovalMode: () => 'default',
|
|
1009
|
-
getCoreTools: () => [],
|
|
1010
|
-
getTelemetryEnabled: () => false,
|
|
1011
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
1012
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
1013
|
-
getOutputFormat: () => 'text',
|
|
1014
|
-
getExtensions: () => [],
|
|
1015
|
-
getUsageStatisticsEnabled: () => false,
|
|
1016
|
-
getRemoteAdminSettings: () => undefined,
|
|
1017
|
-
setTerminalBackground: vi.fn(),
|
|
1018
|
-
storage: {
|
|
1019
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
1020
|
-
},
|
|
1021
|
-
refreshAuth: vi.fn(),
|
|
1022
|
-
});
|
|
1023
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
1024
|
-
merged: { security: { auth: {} }, ui: {} },
|
|
1025
|
-
}));
|
|
1026
|
-
vi.mocked(parseArguments).mockResolvedValue({
|
|
1027
|
-
resume: 'invalid-session',
|
|
1028
|
-
});
|
|
1029
|
-
vi.mock('./utils/sessionUtils.js', () => ({
|
|
1030
|
-
SessionSelector: vi.fn().mockImplementation(() => ({
|
|
1031
|
-
resolveSession: vi
|
|
1032
|
-
.fn()
|
|
1033
|
-
.mockRejectedValue(new Error('Session not found')),
|
|
1034
|
-
})),
|
|
1035
|
-
}));
|
|
1036
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
1037
|
-
try {
|
|
1038
|
-
await main();
|
|
1039
|
-
expect.fail('Should have thrown MockProcessExitError');
|
|
1040
|
-
}
|
|
1041
|
-
catch (e) {
|
|
1042
|
-
expect(e).toBeInstanceOf(MockProcessExitError);
|
|
1043
|
-
expect(e.code).toBe(42);
|
|
1044
|
-
}
|
|
1045
|
-
finally {
|
|
1046
|
-
delete process.env['GEMINI_API_KEY'];
|
|
1047
|
-
}
|
|
1048
|
-
});
|
|
1049
|
-
it('should exit with 42 for no input provided', async () => {
|
|
1050
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
1051
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
1052
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
1053
|
-
isInteractive: () => false,
|
|
1054
|
-
getQuestion: () => '',
|
|
1055
|
-
getSandbox: () => false,
|
|
1056
|
-
getDebugMode: () => false,
|
|
1057
|
-
getListExtensions: () => false,
|
|
1058
|
-
getListSessions: () => false,
|
|
1059
|
-
getDeleteSession: () => undefined,
|
|
1060
|
-
getMcpServers: () => ({}),
|
|
1061
|
-
getMcpClientManager: vi.fn(),
|
|
1062
|
-
initialize: vi.fn(),
|
|
1063
|
-
getIdeMode: () => false,
|
|
1064
|
-
getExperimentalZedIntegration: () => false,
|
|
1065
|
-
getScreenReader: () => false,
|
|
1066
|
-
getGeminiMdFileCount: () => 0,
|
|
1067
|
-
getPolicyEngine: vi.fn(),
|
|
1068
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
1069
|
-
getEnableHooks: () => false,
|
|
1070
|
-
getHookSystem: () => undefined,
|
|
1071
|
-
getToolRegistry: vi.fn(),
|
|
1072
|
-
getContentGeneratorConfig: vi.fn(),
|
|
1073
|
-
getModel: () => 'gemini-pro',
|
|
1074
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
1075
|
-
getApprovalMode: () => 'default',
|
|
1076
|
-
getCoreTools: () => [],
|
|
1077
|
-
getTelemetryEnabled: () => false,
|
|
1078
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
1079
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
1080
|
-
getOutputFormat: () => 'text',
|
|
1081
|
-
getExtensions: () => [],
|
|
1082
|
-
getUsageStatisticsEnabled: () => false,
|
|
1083
|
-
setTerminalBackground: vi.fn(),
|
|
1084
|
-
storage: {
|
|
1085
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
1086
|
-
},
|
|
1087
|
-
refreshAuth: vi.fn(),
|
|
1088
|
-
getRemoteAdminSettings: () => undefined,
|
|
1089
|
-
});
|
|
1090
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
1091
|
-
merged: { security: { auth: {} }, ui: {} },
|
|
1092
|
-
}));
|
|
1093
|
-
vi.mocked(parseArguments).mockResolvedValue({});
|
|
1094
|
-
Object.defineProperty(process.stdin, 'isTTY', {
|
|
1095
|
-
value: true, // Simulate TTY so it doesn't try to read stdin
|
|
1096
|
-
configurable: true,
|
|
1097
|
-
});
|
|
1098
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
1099
|
-
try {
|
|
1100
|
-
await main();
|
|
1101
|
-
expect.fail('Should have thrown MockProcessExitError');
|
|
1102
|
-
}
|
|
1103
|
-
catch (e) {
|
|
1104
|
-
expect(e).toBeInstanceOf(MockProcessExitError);
|
|
1105
|
-
expect(e.code).toBe(42);
|
|
1106
|
-
}
|
|
1107
|
-
finally {
|
|
1108
|
-
delete process.env['GEMINI_API_KEY'];
|
|
1109
|
-
}
|
|
1110
|
-
});
|
|
1111
|
-
it('should validate and refresh auth in non-interactive mode when no auth type is selected but env var is present', async () => {
|
|
1112
|
-
const { loadCliConfig, parseArguments } = await import('./config/config.js');
|
|
1113
|
-
const { loadSettings } = await import('./config/settings.js');
|
|
1114
|
-
const { AuthType } = await import('@didim365/agent-cli-core');
|
|
1115
|
-
const refreshAuthSpy = vi.fn();
|
|
1116
|
-
vi.mocked(loadCliConfig).mockResolvedValue({
|
|
1117
|
-
isInteractive: () => false,
|
|
1118
|
-
getQuestion: () => 'test prompt',
|
|
1119
|
-
getSandbox: () => false,
|
|
1120
|
-
getDebugMode: () => false,
|
|
1121
|
-
getListExtensions: () => false,
|
|
1122
|
-
getListSessions: () => false,
|
|
1123
|
-
getDeleteSession: () => undefined,
|
|
1124
|
-
getMcpServers: () => ({}),
|
|
1125
|
-
getMcpClientManager: vi.fn(),
|
|
1126
|
-
initialize: vi.fn(),
|
|
1127
|
-
getIdeMode: () => false,
|
|
1128
|
-
getExperimentalZedIntegration: () => false,
|
|
1129
|
-
getScreenReader: () => false,
|
|
1130
|
-
getGeminiMdFileCount: () => 0,
|
|
1131
|
-
getPolicyEngine: vi.fn(),
|
|
1132
|
-
getMessageBus: () => ({ subscribe: vi.fn() }),
|
|
1133
|
-
getEnableHooks: () => false,
|
|
1134
|
-
getHookSystem: () => undefined,
|
|
1135
|
-
getToolRegistry: vi.fn(),
|
|
1136
|
-
getContentGeneratorConfig: vi.fn(),
|
|
1137
|
-
getModel: () => 'gemini-pro',
|
|
1138
|
-
getEmbeddingModel: () => 'embedding-001',
|
|
1139
|
-
getApprovalMode: () => 'default',
|
|
1140
|
-
getCoreTools: () => [],
|
|
1141
|
-
getTelemetryEnabled: () => false,
|
|
1142
|
-
getTelemetryLogPromptsEnabled: () => false,
|
|
1143
|
-
getFileFilteringRespectGitIgnore: () => true,
|
|
1144
|
-
getOutputFormat: () => 'text',
|
|
1145
|
-
getExtensions: () => [],
|
|
1146
|
-
getUsageStatisticsEnabled: () => false,
|
|
1147
|
-
setTerminalBackground: vi.fn(),
|
|
1148
|
-
storage: {
|
|
1149
|
-
getProjectTempDir: vi.fn().mockReturnValue('/tmp/gemini-test'),
|
|
1150
|
-
},
|
|
1151
|
-
refreshAuth: refreshAuthSpy,
|
|
1152
|
-
getRemoteAdminSettings: () => undefined,
|
|
1153
|
-
});
|
|
1154
|
-
vi.mocked(loadSettings).mockReturnValue(createMockSettings({
|
|
1155
|
-
merged: { security: { auth: { selectedType: undefined } }, ui: {} },
|
|
1156
|
-
}));
|
|
1157
|
-
vi.mocked(parseArguments).mockResolvedValue({});
|
|
1158
|
-
runNonInteractiveSpy.mockImplementation(() => Promise.resolve());
|
|
1159
|
-
const processExitSpy = vi
|
|
1160
|
-
.spyOn(process, 'exit')
|
|
1161
|
-
.mockImplementation((code) => {
|
|
1162
|
-
throw new MockProcessExitError(code);
|
|
1163
|
-
});
|
|
1164
|
-
process.env['GEMINI_API_KEY'] = 'test-key';
|
|
1165
|
-
try {
|
|
1166
|
-
await main();
|
|
1167
|
-
}
|
|
1168
|
-
catch (e) {
|
|
1169
|
-
if (!(e instanceof MockProcessExitError))
|
|
1170
|
-
throw e;
|
|
1171
|
-
}
|
|
1172
|
-
finally {
|
|
1173
|
-
delete process.env['GEMINI_API_KEY'];
|
|
1174
|
-
processExitSpy.mockRestore();
|
|
1175
|
-
}
|
|
1176
|
-
expect(refreshAuthSpy).toHaveBeenCalledWith(AuthType.USE_GEMINI);
|
|
1177
|
-
});
|
|
1178
|
-
});
|
|
1179
|
-
describe('validateDnsResolutionOrder', () => {
|
|
1180
|
-
let debugLoggerWarnSpy;
|
|
1181
|
-
beforeEach(() => {
|
|
1182
|
-
debugLoggerWarnSpy = vi
|
|
1183
|
-
.spyOn(debugLogger, 'warn')
|
|
1184
|
-
.mockImplementation(() => { });
|
|
1185
|
-
});
|
|
1186
|
-
afterEach(() => {
|
|
1187
|
-
vi.restoreAllMocks();
|
|
1188
|
-
});
|
|
1189
|
-
it('should return "ipv4first" when the input is "ipv4first"', () => {
|
|
1190
|
-
expect(validateDnsResolutionOrder('ipv4first')).toBe('ipv4first');
|
|
1191
|
-
expect(debugLoggerWarnSpy).not.toHaveBeenCalled();
|
|
1192
|
-
});
|
|
1193
|
-
it('should return "verbatim" when the input is "verbatim"', () => {
|
|
1194
|
-
expect(validateDnsResolutionOrder('verbatim')).toBe('verbatim');
|
|
1195
|
-
expect(debugLoggerWarnSpy).not.toHaveBeenCalled();
|
|
1196
|
-
});
|
|
1197
|
-
it('should return the default "ipv4first" when the input is undefined', () => {
|
|
1198
|
-
expect(validateDnsResolutionOrder(undefined)).toBe('ipv4first');
|
|
1199
|
-
expect(debugLoggerWarnSpy).not.toHaveBeenCalled();
|
|
1200
|
-
});
|
|
1201
|
-
it('should return the default "ipv4first" and log a warning for an invalid string', () => {
|
|
1202
|
-
expect(validateDnsResolutionOrder('invalid-value')).toBe('ipv4first');
|
|
1203
|
-
expect(debugLoggerWarnSpy).toHaveBeenCalledExactlyOnceWith('Invalid value for dnsResolutionOrder in settings: "invalid-value". Using default "ipv4first".');
|
|
1204
|
-
});
|
|
1205
|
-
});
|
|
1206
|
-
describe('startInteractiveUI', () => {
|
|
1207
|
-
// Mock dependencies
|
|
1208
|
-
const mockConfig = {
|
|
1209
|
-
getProjectRoot: () => '/root',
|
|
1210
|
-
getScreenReader: () => false,
|
|
1211
|
-
getDebugMode: () => false,
|
|
1212
|
-
};
|
|
1213
|
-
const mockSettings = {
|
|
1214
|
-
merged: {
|
|
1215
|
-
ui: {
|
|
1216
|
-
hideWindowTitle: false,
|
|
1217
|
-
useAlternateBuffer: true,
|
|
1218
|
-
},
|
|
1219
|
-
},
|
|
1220
|
-
};
|
|
1221
|
-
const mockStartupWarnings = ['warning1'];
|
|
1222
|
-
const mockWorkspaceRoot = '/root';
|
|
1223
|
-
const mockInitializationResult = {
|
|
1224
|
-
authError: null,
|
|
1225
|
-
themeError: null,
|
|
1226
|
-
shouldOpenAuthDialog: false,
|
|
1227
|
-
geminiMdFileCount: 0,
|
|
1228
|
-
};
|
|
1229
|
-
vi.mock('./ui/utils/updateCheck.js', () => ({
|
|
1230
|
-
checkForUpdates: vi.fn(() => Promise.resolve(null)),
|
|
1231
|
-
}));
|
|
1232
|
-
vi.mock('./utils/cleanup.js', () => ({
|
|
1233
|
-
cleanupCheckpoints: vi.fn(() => Promise.resolve()),
|
|
1234
|
-
registerCleanup: vi.fn(),
|
|
1235
|
-
runExitCleanup: vi.fn(),
|
|
1236
|
-
registerSyncCleanup: vi.fn(),
|
|
1237
|
-
registerTelemetryConfig: vi.fn(),
|
|
1238
|
-
}));
|
|
1239
|
-
afterEach(() => {
|
|
1240
|
-
vi.restoreAllMocks();
|
|
1241
|
-
});
|
|
1242
|
-
async function startTestInteractiveUI(config, settings, startupWarnings, workspaceRoot, resumedSessionData, initializationResult) {
|
|
1243
|
-
await act(async () => {
|
|
1244
|
-
await startInteractiveUI(config, settings, startupWarnings, workspaceRoot, resumedSessionData, initializationResult);
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
it('should render the UI with proper React context and exitOnCtrlC disabled', async () => {
|
|
1248
|
-
const { render } = await import('ink');
|
|
1249
|
-
const renderSpy = vi.mocked(render);
|
|
1250
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1251
|
-
// Verify render was called with correct options
|
|
1252
|
-
const [reactElement, options] = renderSpy.mock.calls[0];
|
|
1253
|
-
// Verify render options
|
|
1254
|
-
expect(options).toEqual(expect.objectContaining({
|
|
1255
|
-
alternateBuffer: true,
|
|
1256
|
-
exitOnCtrlC: false,
|
|
1257
|
-
incrementalRendering: true,
|
|
1258
|
-
isScreenReaderEnabled: false,
|
|
1259
|
-
onRender: expect.any(Function),
|
|
1260
|
-
patchConsole: false,
|
|
1261
|
-
}));
|
|
1262
|
-
// Verify React element structure is valid (but don't deep dive into JSX internals)
|
|
1263
|
-
expect(reactElement).toBeDefined();
|
|
1264
|
-
});
|
|
1265
|
-
it('should enable mouse events when alternate buffer is enabled', async () => {
|
|
1266
|
-
const { enableMouseEvents } = await import('@didim365/agent-cli-core');
|
|
1267
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1268
|
-
expect(enableMouseEvents).toHaveBeenCalled();
|
|
1269
|
-
});
|
|
1270
|
-
it('should patch console', async () => {
|
|
1271
|
-
const { ConsolePatcher } = await import('./ui/utils/ConsolePatcher.js');
|
|
1272
|
-
const patchSpy = vi.spyOn(ConsolePatcher.prototype, 'patch');
|
|
1273
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1274
|
-
expect(patchSpy).toHaveBeenCalled();
|
|
1275
|
-
});
|
|
1276
|
-
it('should perform all startup tasks in correct order', async () => {
|
|
1277
|
-
const { getVersion } = await import('@didim365/agent-cli-core');
|
|
1278
|
-
const { checkForUpdates } = await import('./ui/utils/updateCheck.js');
|
|
1279
|
-
const { registerCleanup } = await import('./utils/cleanup.js');
|
|
1280
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1281
|
-
// Verify all startup tasks were called
|
|
1282
|
-
expect(getVersion).toHaveBeenCalledTimes(1);
|
|
1283
|
-
expect(registerCleanup).toHaveBeenCalledTimes(3);
|
|
1284
|
-
// Verify cleanup handler is registered with unmount function
|
|
1285
|
-
const cleanupFn = vi.mocked(registerCleanup).mock.calls[0][0];
|
|
1286
|
-
expect(typeof cleanupFn).toBe('function');
|
|
1287
|
-
// checkForUpdates should be called asynchronously (not waited for)
|
|
1288
|
-
// We need a small delay to let it execute
|
|
1289
|
-
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
1290
|
-
expect(checkForUpdates).toHaveBeenCalledTimes(1);
|
|
1291
|
-
});
|
|
1292
|
-
it('should not recordSlowRender when less than threshold', async () => {
|
|
1293
|
-
const { recordSlowRender } = await import('@didim365/agent-cli-core');
|
|
1294
|
-
performance.now.mockReturnValueOnce(0);
|
|
1295
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1296
|
-
expect(recordSlowRender).not.toHaveBeenCalled();
|
|
1297
|
-
});
|
|
1298
|
-
it('should call recordSlowRender when more than threshold', async () => {
|
|
1299
|
-
const { recordSlowRender } = await import('@didim365/agent-cli-core');
|
|
1300
|
-
performance.now.mockReturnValueOnce(0);
|
|
1301
|
-
performance.now.mockReturnValueOnce(300);
|
|
1302
|
-
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1303
|
-
expect(recordSlowRender).toHaveBeenCalledWith(mockConfig, 300);
|
|
1304
|
-
});
|
|
1305
|
-
it.each([
|
|
1306
|
-
{
|
|
1307
|
-
screenReader: true,
|
|
1308
|
-
expectedCalls: [],
|
|
1309
|
-
name: 'should not disable line wrapping in screen reader mode',
|
|
1310
|
-
},
|
|
1311
|
-
{
|
|
1312
|
-
screenReader: false,
|
|
1313
|
-
expectedCalls: [['\x1b[?7l']],
|
|
1314
|
-
name: 'should disable line wrapping when not in screen reader mode',
|
|
1315
|
-
},
|
|
1316
|
-
])('$name', async ({ screenReader, expectedCalls }) => {
|
|
1317
|
-
const writeSpy = vi
|
|
1318
|
-
.spyOn(process.stdout, 'write')
|
|
1319
|
-
.mockImplementation(() => true);
|
|
1320
|
-
const mockConfigWithScreenReader = {
|
|
1321
|
-
...mockConfig,
|
|
1322
|
-
getScreenReader: () => screenReader,
|
|
1323
|
-
};
|
|
1324
|
-
await startTestInteractiveUI(mockConfigWithScreenReader, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1325
|
-
if (expectedCalls.length > 0) {
|
|
1326
|
-
expect(writeSpy).toHaveBeenCalledWith(expectedCalls[0][0]);
|
|
1327
|
-
}
|
|
1328
|
-
else {
|
|
1329
|
-
expect(writeSpy).not.toHaveBeenCalledWith('\x1b[?7l');
|
|
1330
|
-
}
|
|
1331
|
-
writeSpy.mockRestore();
|
|
1332
|
-
});
|
|
1333
|
-
});
|
|
1334
|
-
//# sourceMappingURL=gemini.test.js.map
|