@google/gemini-cli 0.3.0-nightly.20250823.1a89d185 → 0.3.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +7 -7
- package/dist/src/commands/extensions/disable.d.ts +14 -0
- package/dist/src/commands/extensions/disable.js +42 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +14 -0
- package/dist/src/commands/extensions/enable.js +48 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/install.d.ts +13 -0
- package/dist/src/commands/extensions/install.js +48 -0
- package/dist/src/commands/extensions/install.js.map +1 -0
- package/dist/src/commands/extensions/install.test.js +19 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +32 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +38 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
- package/dist/src/commands/extensions/uninstall.test.js +15 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +12 -0
- package/dist/src/commands/extensions/update.js +38 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +29 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/mcp/list.js +1 -1
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/config/auth.js +0 -9
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/config.d.ts +6 -6
- package/dist/src/config/config.js +65 -59
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +40 -2
- package/dist/src/config/extension.js +267 -14
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extensions/variableSchema.d.ts +28 -0
- package/dist/src/config/extensions/variableSchema.js +18 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -0
- package/dist/src/config/extensions/variables.d.ts +17 -0
- package/dist/src/config/extensions/variables.js +40 -0
- package/dist/src/config/extensions/variables.js.map +1 -0
- package/dist/src/config/extensions/variables.test.d.ts +6 -0
- package/dist/src/config/extensions/variables.test.js +17 -0
- package/dist/src/config/extensions/variables.test.js.map +1 -0
- package/dist/src/config/keyBindings.test.js +1 -1
- package/dist/src/config/keyBindings.test.js.map +1 -1
- package/dist/src/config/sandboxConfig.d.ts +2 -2
- package/dist/src/config/sandboxConfig.js +5 -7
- package/dist/src/config/sandboxConfig.js.map +1 -1
- package/dist/src/config/settings.d.ts +9 -4
- package/dist/src/config/settings.js +342 -80
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +630 -440
- package/dist/src/config/settingsSchema.js +626 -436
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +85 -98
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +1 -1
- package/dist/src/config/trustedFolders.js +5 -5
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +9 -5
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/gemini.d.ts +3 -1
- package/dist/src/gemini.js +51 -44
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +78 -24
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +1 -1
- package/dist/src/nonInteractiveCli.js +4 -6
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +3 -3
- package/dist/src/services/CommandService.d.ts +2 -2
- package/dist/src/services/CommandService.test.js +1 -0
- package/dist/src/services/CommandService.test.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +3 -3
- package/dist/src/services/FileCommandLoader.js +22 -13
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.d.ts +4 -4
- package/dist/src/services/McpPromptLoader.js +2 -2
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +3 -3
- package/dist/src/services/prompt-processors/argumentProcessor.js +3 -2
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +62 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +174 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.d.ts +29 -0
- package/dist/src/services/prompt-processors/injectionParser.js +60 -0
- package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js +189 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +4 -12
- package/dist/src/services/prompt-processors/shellProcessor.js +17 -58
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/services/prompt-processors/types.d.ts +13 -8
- package/dist/src/services/prompt-processors/types.js +4 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -1
- package/dist/src/services/types.d.ts +1 -1
- package/dist/src/test-utils/customMatchers.js +0 -6
- package/dist/src/test-utils/customMatchers.js.map +1 -1
- package/dist/src/test-utils/mockCommandContext.d.ts +1 -1
- package/dist/src/test-utils/render.d.ts +1 -1
- package/dist/src/ui/App.d.ts +2 -2
- package/dist/src/ui/App.js +47 -28
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
- package/dist/src/ui/IdeIntegrationNudge.js +2 -7
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/colors.d.ts +1 -1
- package/dist/src/ui/commands/aboutCommand.d.ts +1 -1
- package/dist/src/ui/commands/aboutCommand.js +2 -9
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/authCommand.d.ts +1 -1
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +1 -1
- package/dist/src/ui/commands/chatCommand.js +3 -3
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.d.ts +1 -1
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.d.ts +1 -1
- package/dist/src/ui/commands/compressCommand.js +2 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -1
- package/dist/src/ui/commands/copyCommand.d.ts +1 -1
- package/dist/src/ui/commands/copyCommand.js +1 -1
- package/dist/src/ui/commands/copyCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.d.ts +1 -1
- package/dist/src/ui/commands/directoryCommand.js +5 -4
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.d.ts +1 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +2 -2
- package/dist/src/ui/commands/ideCommand.js +6 -8
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/initCommand.d.ts +1 -1
- package/dist/src/ui/commands/initCommand.js +3 -3
- package/dist/src/ui/commands/initCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.d.ts +1 -1
- package/dist/src/ui/commands/mcpCommand.js +1 -1
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.d.ts +1 -1
- package/dist/src/ui/commands/memoryCommand.js +4 -3
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/privacyCommand.d.ts +1 -1
- package/dist/src/ui/commands/privacyCommand.js.map +1 -1
- package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
- package/dist/src/ui/commands/restoreCommand.js +2 -2
- package/dist/src/ui/commands/restoreCommand.js.map +1 -1
- package/dist/src/ui/commands/settingsCommand.d.ts +1 -1
- package/dist/src/ui/commands/settingsCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.d.ts +2 -1
- package/dist/src/ui/commands/setupGithubCommand.js +10 -9
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js +2 -7
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
- package/dist/src/ui/commands/themeCommand.d.ts +1 -1
- package/dist/src/ui/commands/themeCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +1 -1
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +7 -8
- package/dist/src/ui/commands/types.js +1 -0
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/vimCommand.d.ts +1 -1
- package/dist/src/ui/commands/vimCommand.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +1 -3
- package/dist/src/ui/components/AboutBox.js +1 -2
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.d.ts +3 -2
- package/dist/src/ui/components/AuthDialog.js +4 -13
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.test.js +83 -49
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/components/AuthInProgress.d.ts +1 -1
- package/dist/src/ui/components/AuthInProgress.js +0 -5
- package/dist/src/ui/components/AuthInProgress.js.map +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +2 -2
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +4 -3
- package/dist/src/ui/components/EditorSettingsDialog.js +8 -11
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.d.ts +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +2 -2
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +1 -1
- package/dist/src/ui/components/Header.d.ts +1 -1
- package/dist/src/ui/components/Help.d.ts +2 -2
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +4 -4
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +2 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +5 -5
- package/dist/src/ui/components/InputPrompt.js +1 -6
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.d.ts +2 -2
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +1 -1
- package/dist/src/ui/components/MemoryUsageDisplay.js +0 -5
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/PrepareLabel.d.ts +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +2 -1
- package/dist/src/ui/components/SettingsDialog.js +2 -2
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +32 -14
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ShellModeIndicator.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +2 -1
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.d.ts +3 -2
- package/dist/src/ui/components/ThemeDialog.js +5 -10
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/Tips.d.ts +1 -1
- package/dist/src/ui/components/Tips.js +1 -0
- package/dist/src/ui/components/Tips.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +42 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +2 -2
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +2 -3
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +10 -11
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +1 -1
- package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +3 -3
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +41 -24
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +87 -2
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +4 -4
- package/dist/src/ui/components/messages/ToolGroupMessage.js +1 -6
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +259 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +2 -1
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +6 -6
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +2 -1
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -5
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +4 -4
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -1
- package/dist/src/ui/constants.d.ts +8 -0
- package/dist/src/ui/constants.js +9 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +2 -2
- package/dist/src/ui/contexts/KeypressContext.js +12 -22
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +66 -11
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/OverflowContext.d.ts +1 -1
- package/dist/src/ui/contexts/OverflowContext.js +0 -5
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +2 -2
- package/dist/src/ui/contexts/SessionContext.js +1 -6
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/contexts/SettingsContext.d.ts +1 -1
- package/dist/src/ui/contexts/StreamingContext.d.ts +1 -1
- package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
- package/dist/src/ui/contexts/VimModeContext.js +4 -4
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +3 -3
- package/dist/src/ui/hooks/atCommandProcessor.js +3 -3
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +11 -4
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +3 -3
- package/dist/src/ui/hooks/shellCommandProcessor.js +7 -6
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +5 -4
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +5 -4
- package/dist/src/ui/hooks/slashCommandProcessor.js +3 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.d.ts +2 -2
- package/dist/src/ui/hooks/useAtCompletion.js +2 -2
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.d.ts +2 -2
- package/dist/src/ui/hooks/useAuthCommand.js +5 -4
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +3 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +13 -4
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +122 -2
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +5 -5
- package/dist/src/ui/hooks/useCommandCompletion.js +2 -2
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useCompletion.js +1 -1
- package/dist/src/ui/hooks/useCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +1 -1
- package/dist/src/ui/hooks/useEditorSettings.d.ts +2 -2
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +3 -2
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +4 -3
- package/dist/src/ui/hooks/useGeminiStream.js +18 -6
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useKeypress.d.ts +2 -2
- package/dist/src/ui/hooks/useKeypress.js +1 -1
- package/dist/src/ui/hooks/useKeypress.js.map +1 -1
- package/dist/src/ui/hooks/useLogger.d.ts +2 -1
- package/dist/src/ui/hooks/useLogger.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +2 -2
- package/dist/src/ui/hooks/usePromptCompletion.js +3 -2
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +2 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js +2 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +2 -2
- package/dist/src/ui/hooks/useShellHistory.js +2 -2
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.js +4 -4
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +3 -3
- package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +2 -2
- package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +8 -8
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +9 -6
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js +53 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
- package/dist/src/ui/keyMatchers.d.ts +2 -1
- package/dist/src/ui/keyMatchers.js +1 -1
- package/dist/src/ui/keyMatchers.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
- package/dist/src/ui/semantic-colors.d.ts +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +1 -2
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
- package/dist/src/ui/themes/ayu-light.js +1 -2
- package/dist/src/ui/themes/ayu-light.js.map +1 -1
- package/dist/src/ui/themes/ayu.js +1 -2
- package/dist/src/ui/themes/ayu.js.map +1 -1
- package/dist/src/ui/themes/default-light.js +1 -2
- package/dist/src/ui/themes/default-light.js.map +1 -1
- package/dist/src/ui/themes/default.js +1 -2
- package/dist/src/ui/themes/default.js.map +1 -1
- package/dist/src/ui/themes/dracula.js +1 -2
- package/dist/src/ui/themes/dracula.js.map +1 -1
- package/dist/src/ui/themes/github-dark.js +1 -2
- package/dist/src/ui/themes/github-dark.js.map +1 -1
- package/dist/src/ui/themes/github-light.js +1 -2
- package/dist/src/ui/themes/github-light.js.map +1 -1
- package/dist/src/ui/themes/googlecode.js +2 -3
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +1 -2
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +2 -2
- package/dist/src/ui/themes/theme-manager.js +1 -1
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +3 -3
- package/dist/src/ui/themes/theme.js +30 -2
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/xcode.js +1 -2
- package/dist/src/ui/themes/xcode.js.map +1 -1
- package/dist/src/ui/types.d.ts +4 -3
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +2 -2
- package/dist/src/ui/utils/CodeColorizer.js +1 -1
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js +1 -1
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +3 -3
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +4 -4
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +1 -1
- package/dist/src/ui/utils/commandUtils.js +16 -3
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.test.js +12 -2
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
- package/dist/src/ui/utils/computeStats.d.ts +1 -1
- package/dist/src/ui/utils/platformConstants.d.ts +2 -0
- package/dist/src/ui/utils/platformConstants.js +2 -0
- package/dist/src/ui/utils/platformConstants.js.map +1 -1
- package/dist/src/ui/utils/terminalSetup.js +5 -5
- package/dist/src/ui/utils/terminalSetup.js.map +1 -1
- package/dist/src/ui/utils/textUtils.js +1 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/updateCheck.d.ts +1 -1
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/utils/cleanup.js +2 -2
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/dialogScopeUtils.d.ts +2 -1
- package/dist/src/utils/dialogScopeUtils.js.map +1 -1
- package/dist/src/utils/errors.d.ts +6 -0
- package/dist/src/utils/errors.js +12 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/events.d.ts +1 -1
- package/dist/src/utils/events.js +1 -1
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/gitUtils.js +1 -1
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/gitUtils.test.js +4 -4
- package/dist/src/utils/gitUtils.test.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.d.ts +4 -4
- package/dist/src/utils/handleAutoUpdate.js +4 -3
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/installationInfo.js +3 -3
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/installationInfo.test.js +3 -3
- package/dist/src/utils/installationInfo.test.js.map +1 -1
- package/dist/src/utils/package.js +2 -2
- package/dist/src/utils/package.js.map +1 -1
- package/dist/src/utils/readStdin.js +32 -56
- package/dist/src/utils/readStdin.js.map +1 -1
- package/dist/src/utils/readStdin.test.d.ts +6 -0
- package/dist/src/utils/readStdin.test.js +88 -0
- package/dist/src/utils/readStdin.test.js.map +1 -0
- package/dist/src/utils/resolvePath.js +2 -2
- package/dist/src/utils/resolvePath.js.map +1 -1
- package/dist/src/utils/sandbox.d.ts +1 -1
- package/dist/src/utils/sandbox.js +11 -19
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.d.ts +2 -2
- package/dist/src/utils/settingsUtils.js +2 -8
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/settingsUtils.test.js +145 -148
- package/dist/src/utils/settingsUtils.test.js.map +1 -1
- package/dist/src/utils/spawnWrapper.d.ts +1 -1
- package/dist/src/utils/spawnWrapper.js +1 -1
- package/dist/src/utils/spawnWrapper.js.map +1 -1
- package/dist/src/utils/startupWarnings.js +2 -2
- package/dist/src/utils/startupWarnings.js.map +1 -1
- package/dist/src/utils/updateEventEmitter.d.ts +1 -1
- package/dist/src/utils/updateEventEmitter.js +1 -1
- package/dist/src/utils/updateEventEmitter.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.js +3 -3
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.test.js +3 -3
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +2 -1
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/acp.d.ts +1 -1
- package/dist/src/zed-integration/acp.js +1 -1
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +2 -2
- package/dist/src/zed-integration/schema.d.ts +306 -306
- package/dist/src/zed-integration/zedIntegration.d.ts +4 -4
- package/dist/src/zed-integration/zedIntegration.js +58 -58
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist/src/utils/license.d.ts +0 -13
- package/dist/src/utils/license.js +0 -35
- package/dist/src/utils/license.js.map +0 -1
- package/dist/src/utils/license.test.js +0 -77
- package/dist/src/utils/license.test.js.map +0 -1
- /package/dist/src/{utils/license.test.d.ts → commands/extensions/install.test.d.ts} +0 -0
|
@@ -15,12 +15,7 @@ describe('SettingsUtils', () => {
|
|
|
15
15
|
it('should group settings by category', () => {
|
|
16
16
|
const categories = getSettingsByCategory();
|
|
17
17
|
expect(categories).toHaveProperty('General');
|
|
18
|
-
expect(categories).toHaveProperty('Accessibility');
|
|
19
|
-
expect(categories).toHaveProperty('Checkpointing');
|
|
20
|
-
expect(categories).toHaveProperty('File Filtering');
|
|
21
18
|
expect(categories).toHaveProperty('UI');
|
|
22
|
-
expect(categories).toHaveProperty('Mode');
|
|
23
|
-
expect(categories).toHaveProperty('Updates');
|
|
24
19
|
});
|
|
25
20
|
it('should include key property in grouped settings', () => {
|
|
26
21
|
const categories = getSettingsByCategory();
|
|
@@ -33,7 +28,7 @@ describe('SettingsUtils', () => {
|
|
|
33
28
|
});
|
|
34
29
|
describe('getSettingDefinition', () => {
|
|
35
30
|
it('should return definition for valid setting', () => {
|
|
36
|
-
const definition = getSettingDefinition('showMemoryUsage');
|
|
31
|
+
const definition = getSettingDefinition('ui.showMemoryUsage');
|
|
37
32
|
expect(definition).toBeDefined();
|
|
38
33
|
expect(definition?.label).toBe('Show Memory Usage');
|
|
39
34
|
});
|
|
@@ -44,12 +39,12 @@ describe('SettingsUtils', () => {
|
|
|
44
39
|
});
|
|
45
40
|
describe('requiresRestart', () => {
|
|
46
41
|
it('should return true for settings that require restart', () => {
|
|
47
|
-
expect(requiresRestart('
|
|
48
|
-
expect(requiresRestart('checkpointing.enabled')).toBe(true);
|
|
42
|
+
expect(requiresRestart('advanced.autoConfigureMemory')).toBe(true);
|
|
43
|
+
expect(requiresRestart('general.checkpointing.enabled')).toBe(true);
|
|
49
44
|
});
|
|
50
45
|
it('should return false for settings that do not require restart', () => {
|
|
51
|
-
expect(requiresRestart('showMemoryUsage')).toBe(false);
|
|
52
|
-
expect(requiresRestart('hideTips')).toBe(false);
|
|
46
|
+
expect(requiresRestart('ui.showMemoryUsage')).toBe(false);
|
|
47
|
+
expect(requiresRestart('ui.hideTips')).toBe(false);
|
|
53
48
|
});
|
|
54
49
|
it('should return false for invalid settings', () => {
|
|
55
50
|
expect(requiresRestart('invalidSetting')).toBe(false);
|
|
@@ -57,8 +52,8 @@ describe('SettingsUtils', () => {
|
|
|
57
52
|
});
|
|
58
53
|
describe('getDefaultValue', () => {
|
|
59
54
|
it('should return correct default values', () => {
|
|
60
|
-
expect(getDefaultValue('showMemoryUsage')).toBe(false);
|
|
61
|
-
expect(getDefaultValue('fileFiltering.enableRecursiveFileSearch')).toBe(true);
|
|
55
|
+
expect(getDefaultValue('ui.showMemoryUsage')).toBe(false);
|
|
56
|
+
expect(getDefaultValue('context.fileFiltering.enableRecursiveFileSearch')).toBe(true);
|
|
62
57
|
});
|
|
63
58
|
it('should return undefined for invalid settings', () => {
|
|
64
59
|
expect(getDefaultValue('invalidSetting')).toBeUndefined();
|
|
@@ -67,38 +62,38 @@ describe('SettingsUtils', () => {
|
|
|
67
62
|
describe('getRestartRequiredSettings', () => {
|
|
68
63
|
it('should return all settings that require restart', () => {
|
|
69
64
|
const restartSettings = getRestartRequiredSettings();
|
|
70
|
-
expect(restartSettings).toContain('
|
|
71
|
-
expect(restartSettings).toContain('checkpointing.enabled');
|
|
72
|
-
expect(restartSettings).not.toContain('showMemoryUsage');
|
|
65
|
+
expect(restartSettings).toContain('advanced.autoConfigureMemory');
|
|
66
|
+
expect(restartSettings).toContain('general.checkpointing.enabled');
|
|
67
|
+
expect(restartSettings).not.toContain('ui.showMemoryUsage');
|
|
73
68
|
});
|
|
74
69
|
});
|
|
75
70
|
describe('getEffectiveValue', () => {
|
|
76
71
|
it('should return value from settings when set', () => {
|
|
77
|
-
const settings = { showMemoryUsage: true };
|
|
78
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
79
|
-
const value = getEffectiveValue('showMemoryUsage', settings, mergedSettings);
|
|
72
|
+
const settings = { ui: { showMemoryUsage: true } };
|
|
73
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
74
|
+
const value = getEffectiveValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
80
75
|
expect(value).toBe(true);
|
|
81
76
|
});
|
|
82
77
|
it('should return value from merged settings when not set in current scope', () => {
|
|
83
78
|
const settings = {};
|
|
84
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
85
|
-
const value = getEffectiveValue('showMemoryUsage', settings, mergedSettings);
|
|
79
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
80
|
+
const value = getEffectiveValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
86
81
|
expect(value).toBe(true);
|
|
87
82
|
});
|
|
88
83
|
it('should return default value when not set anywhere', () => {
|
|
89
84
|
const settings = {};
|
|
90
85
|
const mergedSettings = {};
|
|
91
|
-
const value = getEffectiveValue('showMemoryUsage', settings, mergedSettings);
|
|
86
|
+
const value = getEffectiveValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
92
87
|
expect(value).toBe(false); // default value
|
|
93
88
|
});
|
|
94
89
|
it('should handle nested settings correctly', () => {
|
|
95
90
|
const settings = {
|
|
96
|
-
accessibility: { disableLoadingPhrases: true },
|
|
91
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
97
92
|
};
|
|
98
93
|
const mergedSettings = {
|
|
99
|
-
accessibility: { disableLoadingPhrases: false },
|
|
94
|
+
ui: { accessibility: { disableLoadingPhrases: false } },
|
|
100
95
|
};
|
|
101
|
-
const value = getEffectiveValue('accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
96
|
+
const value = getEffectiveValue('ui.accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
102
97
|
expect(value).toBe(true);
|
|
103
98
|
});
|
|
104
99
|
it('should return undefined for invalid settings', () => {
|
|
@@ -111,9 +106,9 @@ describe('SettingsUtils', () => {
|
|
|
111
106
|
describe('getAllSettingKeys', () => {
|
|
112
107
|
it('should return all setting keys', () => {
|
|
113
108
|
const keys = getAllSettingKeys();
|
|
114
|
-
expect(keys).toContain('showMemoryUsage');
|
|
115
|
-
expect(keys).toContain('accessibility.disableLoadingPhrases');
|
|
116
|
-
expect(keys).toContain('checkpointing.enabled');
|
|
109
|
+
expect(keys).toContain('ui.showMemoryUsage');
|
|
110
|
+
expect(keys).toContain('ui.accessibility.disableLoadingPhrases');
|
|
111
|
+
expect(keys).toContain('general.checkpointing.enabled');
|
|
117
112
|
});
|
|
118
113
|
});
|
|
119
114
|
describe('getSettingsByType', () => {
|
|
@@ -136,8 +131,8 @@ describe('SettingsUtils', () => {
|
|
|
136
131
|
});
|
|
137
132
|
describe('isValidSettingKey', () => {
|
|
138
133
|
it('should return true for valid setting keys', () => {
|
|
139
|
-
expect(isValidSettingKey('showMemoryUsage')).toBe(true);
|
|
140
|
-
expect(isValidSettingKey('accessibility.disableLoadingPhrases')).toBe(true);
|
|
134
|
+
expect(isValidSettingKey('ui.showMemoryUsage')).toBe(true);
|
|
135
|
+
expect(isValidSettingKey('ui.accessibility.disableLoadingPhrases')).toBe(true);
|
|
141
136
|
});
|
|
142
137
|
it('should return false for invalid setting keys', () => {
|
|
143
138
|
expect(isValidSettingKey('invalidSetting')).toBe(false);
|
|
@@ -146,8 +141,8 @@ describe('SettingsUtils', () => {
|
|
|
146
141
|
});
|
|
147
142
|
describe('getSettingCategory', () => {
|
|
148
143
|
it('should return correct category for valid settings', () => {
|
|
149
|
-
expect(getSettingCategory('showMemoryUsage')).toBe('UI');
|
|
150
|
-
expect(getSettingCategory('accessibility.disableLoadingPhrases')).toBe('
|
|
144
|
+
expect(getSettingCategory('ui.showMemoryUsage')).toBe('UI');
|
|
145
|
+
expect(getSettingCategory('ui.accessibility.disableLoadingPhrases')).toBe('UI');
|
|
151
146
|
});
|
|
152
147
|
it('should return undefined for invalid settings', () => {
|
|
153
148
|
expect(getSettingCategory('invalidSetting')).toBeUndefined();
|
|
@@ -155,17 +150,17 @@ describe('SettingsUtils', () => {
|
|
|
155
150
|
});
|
|
156
151
|
describe('shouldShowInDialog', () => {
|
|
157
152
|
it('should return true for settings marked to show in dialog', () => {
|
|
158
|
-
expect(shouldShowInDialog('showMemoryUsage')).toBe(true);
|
|
159
|
-
expect(shouldShowInDialog('vimMode')).toBe(true);
|
|
160
|
-
expect(shouldShowInDialog('hideWindowTitle')).toBe(true);
|
|
161
|
-
expect(shouldShowInDialog('usageStatisticsEnabled')).toBe(false);
|
|
153
|
+
expect(shouldShowInDialog('ui.showMemoryUsage')).toBe(true);
|
|
154
|
+
expect(shouldShowInDialog('general.vimMode')).toBe(true);
|
|
155
|
+
expect(shouldShowInDialog('ui.hideWindowTitle')).toBe(true);
|
|
156
|
+
expect(shouldShowInDialog('privacy.usageStatisticsEnabled')).toBe(false);
|
|
162
157
|
});
|
|
163
158
|
it('should return false for settings marked to hide from dialog', () => {
|
|
164
|
-
expect(shouldShowInDialog('
|
|
165
|
-
expect(shouldShowInDialog('
|
|
166
|
-
expect(shouldShowInDialog('customThemes')).toBe(false);
|
|
167
|
-
expect(shouldShowInDialog('theme')).toBe(false); // Changed to false
|
|
168
|
-
expect(shouldShowInDialog('preferredEditor')).toBe(false); // Changed to false
|
|
159
|
+
expect(shouldShowInDialog('security.auth.selectedType')).toBe(false);
|
|
160
|
+
expect(shouldShowInDialog('tools.core')).toBe(false);
|
|
161
|
+
expect(shouldShowInDialog('ui.customThemes')).toBe(false);
|
|
162
|
+
expect(shouldShowInDialog('ui.theme')).toBe(false); // Changed to false
|
|
163
|
+
expect(shouldShowInDialog('general.preferredEditor')).toBe(false); // Changed to false
|
|
169
164
|
});
|
|
170
165
|
it('should return true for invalid settings (default behavior)', () => {
|
|
171
166
|
expect(shouldShowInDialog('invalidSetting')).toBe(true);
|
|
@@ -178,10 +173,10 @@ describe('SettingsUtils', () => {
|
|
|
178
173
|
expect(categories['UI']).toBeDefined();
|
|
179
174
|
const uiSettings = categories['UI'];
|
|
180
175
|
const uiKeys = uiSettings.map((s) => s.key);
|
|
181
|
-
expect(uiKeys).toContain('showMemoryUsage');
|
|
182
|
-
expect(uiKeys).toContain('hideWindowTitle');
|
|
183
|
-
expect(uiKeys).not.toContain('customThemes'); // This is marked false
|
|
184
|
-
expect(uiKeys).not.toContain('theme'); // This is now marked false
|
|
176
|
+
expect(uiKeys).toContain('ui.showMemoryUsage');
|
|
177
|
+
expect(uiKeys).toContain('ui.hideWindowTitle');
|
|
178
|
+
expect(uiKeys).not.toContain('ui.customThemes'); // This is marked false
|
|
179
|
+
expect(uiKeys).not.toContain('ui.theme'); // This is now marked false
|
|
185
180
|
});
|
|
186
181
|
it('should not include Advanced category settings', () => {
|
|
187
182
|
const categories = getDialogSettingsByCategory();
|
|
@@ -192,35 +187,35 @@ describe('SettingsUtils', () => {
|
|
|
192
187
|
const categories = getDialogSettingsByCategory();
|
|
193
188
|
const allSettings = Object.values(categories).flat();
|
|
194
189
|
const allKeys = allSettings.map((s) => s.key);
|
|
195
|
-
expect(allKeys).toContain('vimMode');
|
|
196
|
-
expect(allKeys).toContain('
|
|
197
|
-
expect(allKeys).toContain('disableAutoUpdate');
|
|
198
|
-
expect(allKeys).toContain('showMemoryUsage');
|
|
199
|
-
expect(allKeys).not.toContain('usageStatisticsEnabled');
|
|
200
|
-
expect(allKeys).not.toContain('
|
|
201
|
-
expect(allKeys).not.toContain('
|
|
202
|
-
expect(allKeys).not.toContain('theme'); // Now hidden
|
|
203
|
-
expect(allKeys).not.toContain('preferredEditor'); // Now hidden
|
|
190
|
+
expect(allKeys).toContain('general.vimMode');
|
|
191
|
+
expect(allKeys).toContain('ide.enabled');
|
|
192
|
+
expect(allKeys).toContain('general.disableAutoUpdate');
|
|
193
|
+
expect(allKeys).toContain('ui.showMemoryUsage');
|
|
194
|
+
expect(allKeys).not.toContain('privacy.usageStatisticsEnabled');
|
|
195
|
+
expect(allKeys).not.toContain('security.auth.selectedType');
|
|
196
|
+
expect(allKeys).not.toContain('tools.core');
|
|
197
|
+
expect(allKeys).not.toContain('ui.theme'); // Now hidden
|
|
198
|
+
expect(allKeys).not.toContain('general.preferredEditor'); // Now hidden
|
|
204
199
|
});
|
|
205
200
|
});
|
|
206
201
|
describe('getDialogSettingsByType', () => {
|
|
207
202
|
it('should return only boolean dialog settings', () => {
|
|
208
203
|
const booleanSettings = getDialogSettingsByType('boolean');
|
|
209
204
|
const keys = booleanSettings.map((s) => s.key);
|
|
210
|
-
expect(keys).toContain('showMemoryUsage');
|
|
211
|
-
expect(keys).toContain('vimMode');
|
|
212
|
-
expect(keys).toContain('hideWindowTitle');
|
|
213
|
-
expect(keys).not.toContain('usageStatisticsEnabled');
|
|
214
|
-
expect(keys).not.toContain('
|
|
215
|
-
expect(keys).not.toContain('
|
|
205
|
+
expect(keys).toContain('ui.showMemoryUsage');
|
|
206
|
+
expect(keys).toContain('general.vimMode');
|
|
207
|
+
expect(keys).toContain('ui.hideWindowTitle');
|
|
208
|
+
expect(keys).not.toContain('privacy.usageStatisticsEnabled');
|
|
209
|
+
expect(keys).not.toContain('security.auth.selectedType'); // Advanced setting
|
|
210
|
+
expect(keys).not.toContain('security.auth.useExternal'); // Advanced setting
|
|
216
211
|
});
|
|
217
212
|
it('should return only string dialog settings', () => {
|
|
218
213
|
const stringSettings = getDialogSettingsByType('string');
|
|
219
214
|
const keys = stringSettings.map((s) => s.key);
|
|
220
215
|
// Note: theme and preferredEditor are now hidden from dialog
|
|
221
|
-
expect(keys).not.toContain('theme'); // Now marked false
|
|
222
|
-
expect(keys).not.toContain('preferredEditor'); // Now marked false
|
|
223
|
-
expect(keys).not.toContain('
|
|
216
|
+
expect(keys).not.toContain('ui.theme'); // Now marked false
|
|
217
|
+
expect(keys).not.toContain('general.preferredEditor'); // Now marked false
|
|
218
|
+
expect(keys).not.toContain('security.auth.selectedType'); // Advanced setting
|
|
224
219
|
// Most string settings are now hidden, so let's just check they exclude advanced ones
|
|
225
220
|
expect(keys.every((key) => !key.startsWith('tool'))).toBe(true); // No tool-related settings
|
|
226
221
|
});
|
|
@@ -229,22 +224,22 @@ describe('SettingsUtils', () => {
|
|
|
229
224
|
it('should return only settings marked for dialog display', () => {
|
|
230
225
|
const dialogKeys = getDialogSettingKeys();
|
|
231
226
|
// Should include settings marked for dialog
|
|
232
|
-
expect(dialogKeys).toContain('showMemoryUsage');
|
|
233
|
-
expect(dialogKeys).toContain('vimMode');
|
|
234
|
-
expect(dialogKeys).toContain('hideWindowTitle');
|
|
235
|
-
expect(dialogKeys).not.toContain('usageStatisticsEnabled');
|
|
236
|
-
expect(dialogKeys).toContain('
|
|
237
|
-
expect(dialogKeys).toContain('disableAutoUpdate');
|
|
227
|
+
expect(dialogKeys).toContain('ui.showMemoryUsage');
|
|
228
|
+
expect(dialogKeys).toContain('general.vimMode');
|
|
229
|
+
expect(dialogKeys).toContain('ui.hideWindowTitle');
|
|
230
|
+
expect(dialogKeys).not.toContain('privacy.usageStatisticsEnabled');
|
|
231
|
+
expect(dialogKeys).toContain('ide.enabled');
|
|
232
|
+
expect(dialogKeys).toContain('general.disableAutoUpdate');
|
|
238
233
|
// Should include nested settings marked for dialog
|
|
239
|
-
expect(dialogKeys).toContain('fileFiltering.respectGitIgnore');
|
|
240
|
-
expect(dialogKeys).toContain('fileFiltering.respectGeminiIgnore');
|
|
241
|
-
expect(dialogKeys).toContain('fileFiltering.enableRecursiveFileSearch');
|
|
234
|
+
expect(dialogKeys).toContain('context.fileFiltering.respectGitIgnore');
|
|
235
|
+
expect(dialogKeys).toContain('context.fileFiltering.respectGeminiIgnore');
|
|
236
|
+
expect(dialogKeys).toContain('context.fileFiltering.enableRecursiveFileSearch');
|
|
242
237
|
// Should NOT include settings marked as hidden
|
|
243
|
-
expect(dialogKeys).not.toContain('theme'); // Hidden
|
|
244
|
-
expect(dialogKeys).not.toContain('customThemes'); // Hidden
|
|
245
|
-
expect(dialogKeys).not.toContain('preferredEditor'); // Hidden
|
|
246
|
-
expect(dialogKeys).not.toContain('
|
|
247
|
-
expect(dialogKeys).not.toContain('
|
|
238
|
+
expect(dialogKeys).not.toContain('ui.theme'); // Hidden
|
|
239
|
+
expect(dialogKeys).not.toContain('ui.customThemes'); // Hidden
|
|
240
|
+
expect(dialogKeys).not.toContain('general.preferredEditor'); // Hidden
|
|
241
|
+
expect(dialogKeys).not.toContain('security.auth.selectedType'); // Advanced
|
|
242
|
+
expect(dialogKeys).not.toContain('tools.core'); // Advanced
|
|
248
243
|
expect(dialogKeys).not.toContain('mcpServers'); // Advanced
|
|
249
244
|
expect(dialogKeys).not.toContain('telemetry'); // Advanced
|
|
250
245
|
});
|
|
@@ -256,7 +251,7 @@ describe('SettingsUtils', () => {
|
|
|
256
251
|
});
|
|
257
252
|
it('should handle nested settings display correctly', () => {
|
|
258
253
|
// Test the specific issue with fileFiltering.respectGitIgnore
|
|
259
|
-
const key = 'fileFiltering.respectGitIgnore';
|
|
254
|
+
const key = 'context.fileFiltering.respectGitIgnore';
|
|
260
255
|
const initialSettings = {};
|
|
261
256
|
const pendingSettings = {};
|
|
262
257
|
// Set the nested setting to true
|
|
@@ -280,15 +275,15 @@ describe('SettingsUtils', () => {
|
|
|
280
275
|
describe('Business Logic Utilities', () => {
|
|
281
276
|
describe('getSettingValue', () => {
|
|
282
277
|
it('should return value from settings when set', () => {
|
|
283
|
-
const settings = { showMemoryUsage: true };
|
|
284
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
285
|
-
const value = getSettingValue('showMemoryUsage', settings, mergedSettings);
|
|
278
|
+
const settings = { ui: { showMemoryUsage: true } };
|
|
279
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
280
|
+
const value = getSettingValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
286
281
|
expect(value).toBe(true);
|
|
287
282
|
});
|
|
288
283
|
it('should return value from merged settings when not set in current scope', () => {
|
|
289
284
|
const settings = {};
|
|
290
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
291
|
-
const value = getSettingValue('showMemoryUsage', settings, mergedSettings);
|
|
285
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
286
|
+
const value = getSettingValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
292
287
|
expect(value).toBe(true);
|
|
293
288
|
});
|
|
294
289
|
it('should return default value for invalid setting', () => {
|
|
@@ -300,74 +295,74 @@ describe('SettingsUtils', () => {
|
|
|
300
295
|
});
|
|
301
296
|
describe('isSettingModified', () => {
|
|
302
297
|
it('should return true when value differs from default', () => {
|
|
303
|
-
expect(isSettingModified('showMemoryUsage', true)).toBe(true);
|
|
304
|
-
expect(isSettingModified('fileFiltering.enableRecursiveFileSearch', false)).toBe(true);
|
|
298
|
+
expect(isSettingModified('ui.showMemoryUsage', true)).toBe(true);
|
|
299
|
+
expect(isSettingModified('context.fileFiltering.enableRecursiveFileSearch', false)).toBe(true);
|
|
305
300
|
});
|
|
306
301
|
it('should return false when value matches default', () => {
|
|
307
|
-
expect(isSettingModified('showMemoryUsage', false)).toBe(false);
|
|
308
|
-
expect(isSettingModified('fileFiltering.enableRecursiveFileSearch', true)).toBe(false);
|
|
302
|
+
expect(isSettingModified('ui.showMemoryUsage', false)).toBe(false);
|
|
303
|
+
expect(isSettingModified('context.fileFiltering.enableRecursiveFileSearch', true)).toBe(false);
|
|
309
304
|
});
|
|
310
305
|
});
|
|
311
306
|
describe('settingExistsInScope', () => {
|
|
312
307
|
it('should return true for top-level settings that exist', () => {
|
|
313
|
-
const settings = { showMemoryUsage: true };
|
|
314
|
-
expect(settingExistsInScope('showMemoryUsage', settings)).toBe(true);
|
|
308
|
+
const settings = { ui: { showMemoryUsage: true } };
|
|
309
|
+
expect(settingExistsInScope('ui.showMemoryUsage', settings)).toBe(true);
|
|
315
310
|
});
|
|
316
311
|
it('should return false for top-level settings that do not exist', () => {
|
|
317
312
|
const settings = {};
|
|
318
|
-
expect(settingExistsInScope('showMemoryUsage', settings)).toBe(false);
|
|
313
|
+
expect(settingExistsInScope('ui.showMemoryUsage', settings)).toBe(false);
|
|
319
314
|
});
|
|
320
315
|
it('should return true for nested settings that exist', () => {
|
|
321
316
|
const settings = {
|
|
322
|
-
accessibility: { disableLoadingPhrases: true },
|
|
317
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
323
318
|
};
|
|
324
|
-
expect(settingExistsInScope('accessibility.disableLoadingPhrases', settings)).toBe(true);
|
|
319
|
+
expect(settingExistsInScope('ui.accessibility.disableLoadingPhrases', settings)).toBe(true);
|
|
325
320
|
});
|
|
326
321
|
it('should return false for nested settings that do not exist', () => {
|
|
327
322
|
const settings = {};
|
|
328
|
-
expect(settingExistsInScope('accessibility.disableLoadingPhrases', settings)).toBe(false);
|
|
323
|
+
expect(settingExistsInScope('ui.accessibility.disableLoadingPhrases', settings)).toBe(false);
|
|
329
324
|
});
|
|
330
325
|
it('should return false when parent exists but child does not', () => {
|
|
331
|
-
const settings = { accessibility: {} };
|
|
332
|
-
expect(settingExistsInScope('accessibility.disableLoadingPhrases', settings)).toBe(false);
|
|
326
|
+
const settings = { ui: { accessibility: {} } };
|
|
327
|
+
expect(settingExistsInScope('ui.accessibility.disableLoadingPhrases', settings)).toBe(false);
|
|
333
328
|
});
|
|
334
329
|
});
|
|
335
330
|
describe('setPendingSettingValue', () => {
|
|
336
331
|
it('should set top-level setting value', () => {
|
|
337
332
|
const pendingSettings = {};
|
|
338
|
-
const result = setPendingSettingValue('showMemoryUsage', true, pendingSettings);
|
|
339
|
-
expect(result.showMemoryUsage).toBe(true);
|
|
333
|
+
const result = setPendingSettingValue('ui.showMemoryUsage', true, pendingSettings);
|
|
334
|
+
expect(result.ui?.showMemoryUsage).toBe(true);
|
|
340
335
|
});
|
|
341
336
|
it('should set nested setting value', () => {
|
|
342
337
|
const pendingSettings = {};
|
|
343
|
-
const result = setPendingSettingValue('accessibility.disableLoadingPhrases', true, pendingSettings);
|
|
344
|
-
expect(result.accessibility?.disableLoadingPhrases).toBe(true);
|
|
338
|
+
const result = setPendingSettingValue('ui.accessibility.disableLoadingPhrases', true, pendingSettings);
|
|
339
|
+
expect(result.ui?.accessibility?.disableLoadingPhrases).toBe(true);
|
|
345
340
|
});
|
|
346
341
|
it('should preserve existing nested settings', () => {
|
|
347
342
|
const pendingSettings = {
|
|
348
|
-
accessibility: { disableLoadingPhrases: false },
|
|
343
|
+
ui: { accessibility: { disableLoadingPhrases: false } },
|
|
349
344
|
};
|
|
350
|
-
const result = setPendingSettingValue('accessibility.disableLoadingPhrases', true, pendingSettings);
|
|
351
|
-
expect(result.accessibility?.disableLoadingPhrases).toBe(true);
|
|
345
|
+
const result = setPendingSettingValue('ui.accessibility.disableLoadingPhrases', true, pendingSettings);
|
|
346
|
+
expect(result.ui?.accessibility?.disableLoadingPhrases).toBe(true);
|
|
352
347
|
});
|
|
353
348
|
it('should not mutate original settings', () => {
|
|
354
349
|
const pendingSettings = {};
|
|
355
|
-
setPendingSettingValue('showMemoryUsage', true, pendingSettings);
|
|
350
|
+
setPendingSettingValue('ui.showMemoryUsage', true, pendingSettings);
|
|
356
351
|
expect(pendingSettings).toEqual({});
|
|
357
352
|
});
|
|
358
353
|
});
|
|
359
354
|
describe('hasRestartRequiredSettings', () => {
|
|
360
355
|
it('should return true when modified settings require restart', () => {
|
|
361
356
|
const modifiedSettings = new Set([
|
|
362
|
-
'
|
|
363
|
-
'showMemoryUsage',
|
|
357
|
+
'advanced.autoConfigureMemory',
|
|
358
|
+
'ui.showMemoryUsage',
|
|
364
359
|
]);
|
|
365
360
|
expect(hasRestartRequiredSettings(modifiedSettings)).toBe(true);
|
|
366
361
|
});
|
|
367
362
|
it('should return false when no modified settings require restart', () => {
|
|
368
363
|
const modifiedSettings = new Set([
|
|
369
|
-
'showMemoryUsage',
|
|
370
|
-
'hideTips',
|
|
364
|
+
'ui.showMemoryUsage',
|
|
365
|
+
'ui.hideTips',
|
|
371
366
|
]);
|
|
372
367
|
expect(hasRestartRequiredSettings(modifiedSettings)).toBe(false);
|
|
373
368
|
});
|
|
@@ -379,14 +374,14 @@ describe('SettingsUtils', () => {
|
|
|
379
374
|
describe('getRestartRequiredFromModified', () => {
|
|
380
375
|
it('should return only settings that require restart', () => {
|
|
381
376
|
const modifiedSettings = new Set([
|
|
382
|
-
'
|
|
383
|
-
'showMemoryUsage',
|
|
384
|
-
'checkpointing.enabled',
|
|
377
|
+
'advanced.autoConfigureMemory',
|
|
378
|
+
'ui.showMemoryUsage',
|
|
379
|
+
'general.checkpointing.enabled',
|
|
385
380
|
]);
|
|
386
381
|
const result = getRestartRequiredFromModified(modifiedSettings);
|
|
387
|
-
expect(result).toContain('
|
|
388
|
-
expect(result).toContain('checkpointing.enabled');
|
|
389
|
-
expect(result).not.toContain('showMemoryUsage');
|
|
382
|
+
expect(result).toContain('advanced.autoConfigureMemory');
|
|
383
|
+
expect(result).toContain('general.checkpointing.enabled');
|
|
384
|
+
expect(result).not.toContain('ui.showMemoryUsage');
|
|
390
385
|
});
|
|
391
386
|
it('should return empty array when no settings require restart', () => {
|
|
392
387
|
const modifiedSettings = new Set([
|
|
@@ -399,113 +394,115 @@ describe('SettingsUtils', () => {
|
|
|
399
394
|
});
|
|
400
395
|
describe('getDisplayValue', () => {
|
|
401
396
|
it('should show value without * when setting matches default', () => {
|
|
402
|
-
const settings = { showMemoryUsage: false }; // false matches default, so no *
|
|
403
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
397
|
+
const settings = { ui: { showMemoryUsage: false } }; // false matches default, so no *
|
|
398
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
404
399
|
const modifiedSettings = new Set();
|
|
405
|
-
const result = getDisplayValue('showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
400
|
+
const result = getDisplayValue('ui.showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
406
401
|
expect(result).toBe('false*');
|
|
407
402
|
});
|
|
408
403
|
it('should show default value when setting is not in scope', () => {
|
|
409
404
|
const settings = {}; // no setting in scope
|
|
410
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
405
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
411
406
|
const modifiedSettings = new Set();
|
|
412
|
-
const result = getDisplayValue('showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
407
|
+
const result = getDisplayValue('ui.showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
413
408
|
expect(result).toBe('false'); // shows default value
|
|
414
409
|
});
|
|
415
410
|
it('should show value with * when changed from default', () => {
|
|
416
|
-
const settings = { showMemoryUsage: true }; // true is different from default (false)
|
|
417
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
411
|
+
const settings = { ui: { showMemoryUsage: true } }; // true is different from default (false)
|
|
412
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
418
413
|
const modifiedSettings = new Set();
|
|
419
|
-
const result = getDisplayValue('showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
414
|
+
const result = getDisplayValue('ui.showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
420
415
|
expect(result).toBe('true*');
|
|
421
416
|
});
|
|
422
417
|
it('should show default value without * when setting does not exist in scope', () => {
|
|
423
418
|
const settings = {}; // setting doesn't exist in scope, show default
|
|
424
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
419
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
425
420
|
const modifiedSettings = new Set();
|
|
426
|
-
const result = getDisplayValue('showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
421
|
+
const result = getDisplayValue('ui.showMemoryUsage', settings, mergedSettings, modifiedSettings);
|
|
427
422
|
expect(result).toBe('false'); // default value (false) without *
|
|
428
423
|
});
|
|
429
424
|
it('should show value with * when user changes from default', () => {
|
|
430
425
|
const settings = {}; // setting doesn't exist in scope originally
|
|
431
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
432
|
-
const modifiedSettings = new Set(['showMemoryUsage']);
|
|
433
|
-
const pendingSettings = { showMemoryUsage: true }; // user changed to true
|
|
434
|
-
const result = getDisplayValue('showMemoryUsage', settings, mergedSettings, modifiedSettings, pendingSettings);
|
|
426
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
427
|
+
const modifiedSettings = new Set(['ui.showMemoryUsage']);
|
|
428
|
+
const pendingSettings = { ui: { showMemoryUsage: true } }; // user changed to true
|
|
429
|
+
const result = getDisplayValue('ui.showMemoryUsage', settings, mergedSettings, modifiedSettings, pendingSettings);
|
|
435
430
|
expect(result).toBe('true*'); // changed from default (false) to true
|
|
436
431
|
});
|
|
437
432
|
});
|
|
438
433
|
describe('isDefaultValue', () => {
|
|
439
434
|
it('should return true when setting does not exist in scope', () => {
|
|
440
435
|
const settings = {}; // setting doesn't exist
|
|
441
|
-
const result = isDefaultValue('showMemoryUsage', settings);
|
|
436
|
+
const result = isDefaultValue('ui.showMemoryUsage', settings);
|
|
442
437
|
expect(result).toBe(true);
|
|
443
438
|
});
|
|
444
439
|
it('should return false when setting exists in scope', () => {
|
|
445
|
-
const settings = { showMemoryUsage: true }; // setting exists
|
|
446
|
-
const result = isDefaultValue('showMemoryUsage', settings);
|
|
440
|
+
const settings = { ui: { showMemoryUsage: true } }; // setting exists
|
|
441
|
+
const result = isDefaultValue('ui.showMemoryUsage', settings);
|
|
447
442
|
expect(result).toBe(false);
|
|
448
443
|
});
|
|
449
444
|
it('should return true when nested setting does not exist in scope', () => {
|
|
450
445
|
const settings = {}; // nested setting doesn't exist
|
|
451
|
-
const result = isDefaultValue('accessibility.disableLoadingPhrases', settings);
|
|
446
|
+
const result = isDefaultValue('ui.accessibility.disableLoadingPhrases', settings);
|
|
452
447
|
expect(result).toBe(true);
|
|
453
448
|
});
|
|
454
449
|
it('should return false when nested setting exists in scope', () => {
|
|
455
|
-
const settings = {
|
|
456
|
-
|
|
450
|
+
const settings = {
|
|
451
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
452
|
+
}; // nested setting exists
|
|
453
|
+
const result = isDefaultValue('ui.accessibility.disableLoadingPhrases', settings);
|
|
457
454
|
expect(result).toBe(false);
|
|
458
455
|
});
|
|
459
456
|
});
|
|
460
457
|
describe('isValueInherited', () => {
|
|
461
458
|
it('should return false for top-level settings that exist in scope', () => {
|
|
462
|
-
const settings = { showMemoryUsage: true };
|
|
463
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
464
|
-
const result = isValueInherited('showMemoryUsage', settings, mergedSettings);
|
|
459
|
+
const settings = { ui: { showMemoryUsage: true } };
|
|
460
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
461
|
+
const result = isValueInherited('ui.showMemoryUsage', settings, mergedSettings);
|
|
465
462
|
expect(result).toBe(false);
|
|
466
463
|
});
|
|
467
464
|
it('should return true for top-level settings that do not exist in scope', () => {
|
|
468
465
|
const settings = {};
|
|
469
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
470
|
-
const result = isValueInherited('showMemoryUsage', settings, mergedSettings);
|
|
466
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
467
|
+
const result = isValueInherited('ui.showMemoryUsage', settings, mergedSettings);
|
|
471
468
|
expect(result).toBe(true);
|
|
472
469
|
});
|
|
473
470
|
it('should return false for nested settings that exist in scope', () => {
|
|
474
471
|
const settings = {
|
|
475
|
-
accessibility: { disableLoadingPhrases: true },
|
|
472
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
476
473
|
};
|
|
477
474
|
const mergedSettings = {
|
|
478
|
-
accessibility: { disableLoadingPhrases: true },
|
|
475
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
479
476
|
};
|
|
480
|
-
const result = isValueInherited('accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
477
|
+
const result = isValueInherited('ui.accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
481
478
|
expect(result).toBe(false);
|
|
482
479
|
});
|
|
483
480
|
it('should return true for nested settings that do not exist in scope', () => {
|
|
484
481
|
const settings = {};
|
|
485
482
|
const mergedSettings = {
|
|
486
|
-
accessibility: { disableLoadingPhrases: true },
|
|
483
|
+
ui: { accessibility: { disableLoadingPhrases: true } },
|
|
487
484
|
};
|
|
488
|
-
const result = isValueInherited('accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
485
|
+
const result = isValueInherited('ui.accessibility.disableLoadingPhrases', settings, mergedSettings);
|
|
489
486
|
expect(result).toBe(true);
|
|
490
487
|
});
|
|
491
488
|
});
|
|
492
489
|
describe('getEffectiveDisplayValue', () => {
|
|
493
490
|
it('should return value from settings when available', () => {
|
|
494
|
-
const settings = { showMemoryUsage: true };
|
|
495
|
-
const mergedSettings = { showMemoryUsage: false };
|
|
496
|
-
const result = getEffectiveDisplayValue('showMemoryUsage', settings, mergedSettings);
|
|
491
|
+
const settings = { ui: { showMemoryUsage: true } };
|
|
492
|
+
const mergedSettings = { ui: { showMemoryUsage: false } };
|
|
493
|
+
const result = getEffectiveDisplayValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
497
494
|
expect(result).toBe(true);
|
|
498
495
|
});
|
|
499
496
|
it('should return value from merged settings when not in scope', () => {
|
|
500
497
|
const settings = {};
|
|
501
|
-
const mergedSettings = { showMemoryUsage: true };
|
|
502
|
-
const result = getEffectiveDisplayValue('showMemoryUsage', settings, mergedSettings);
|
|
498
|
+
const mergedSettings = { ui: { showMemoryUsage: true } };
|
|
499
|
+
const result = getEffectiveDisplayValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
503
500
|
expect(result).toBe(true);
|
|
504
501
|
});
|
|
505
502
|
it('should return default value for undefined values', () => {
|
|
506
503
|
const settings = {};
|
|
507
504
|
const mergedSettings = {};
|
|
508
|
-
const result = getEffectiveDisplayValue('showMemoryUsage', settings, mergedSettings);
|
|
505
|
+
const result = getEffectiveDisplayValue('ui.showMemoryUsage', settings, mergedSettings);
|
|
509
506
|
expect(result).toBe(false); // Default value
|
|
510
507
|
});
|
|
511
508
|
});
|