@vybestack/llxprt-code 0.5.0 → 0.6.0-nightly.251128.1049d5f2b
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 +15 -6
- package/dist/src/auth/gemini-oauth-provider.d.ts +18 -0
- package/dist/src/auth/gemini-oauth-provider.js +140 -78
- package/dist/src/auth/gemini-oauth-provider.js.map +1 -1
- package/dist/src/auth/local-oauth-callback.spec.js +29 -2
- package/dist/src/auth/local-oauth-callback.spec.js.map +1 -1
- package/dist/src/commands/extensions/disable.d.ts +1 -2
- package/dist/src/commands/extensions/disable.js +15 -3
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/enable.d.ts +1 -2
- package/dist/src/commands/extensions/enable.js +17 -6
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/install.d.ts +3 -1
- package/dist/src/commands/extensions/install.js +63 -12
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +166 -13
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.js +2 -2
- package/dist/src/commands/extensions/link.js.map +1 -1
- package/dist/src/commands/extensions/list.d.ts +1 -1
- package/dist/src/commands/extensions/list.js +3 -2
- package/dist/src/commands/extensions/list.js.map +1 -1
- package/dist/src/commands/extensions/new.test.js +2 -2
- package/dist/src/commands/extensions/new.test.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.js +1 -1
- package/dist/src/commands/extensions/uninstall.js.map +1 -1
- package/dist/src/commands/extensions/uninstall.test.js +4 -1
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/update.d.ts +2 -2
- package/dist/src/commands/extensions/update.js +68 -19
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/mcp/add.js +6 -1
- package/dist/src/commands/mcp/add.js.map +1 -1
- package/dist/src/commands/mcp/list.js +3 -2
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/config/__tests__/profileBootstrap.test.js +1351 -1
- package/dist/src/config/__tests__/profileBootstrap.test.js.map +1 -1
- package/dist/src/config/config.d.ts +4 -1
- package/dist/src/config/config.js +172 -69
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.loadMemory.test.js +6 -3
- package/dist/src/config/config.loadMemory.test.js.map +1 -1
- package/dist/src/config/extension.d.ts +48 -14
- package/dist/src/config/extension.js +263 -142
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +188 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +37 -0
- package/dist/src/config/extensions/github.js +348 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +340 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +118 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +340 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +8 -0
- package/dist/src/config/extensions/variableSchema.js +4 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -1
- package/dist/src/config/keyBindings.d.ts +1 -0
- package/dist/src/config/keyBindings.js +3 -1
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/paths.d.ts +8 -0
- package/dist/src/config/paths.js +11 -0
- package/dist/src/config/paths.js.map +1 -0
- package/dist/src/config/profileBootstrap.d.ts +13 -0
- package/dist/src/config/profileBootstrap.js +369 -15
- package/dist/src/config/profileBootstrap.js.map +1 -1
- package/dist/src/config/settings.d.ts +14 -4
- package/dist/src/config/settings.js +161 -99
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +510 -216
- package/dist/src/config/settingsSchema.js +468 -214
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +18 -31
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +6 -3
- package/dist/src/config/trustedFolders.js +35 -13
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +83 -9
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/coreToolToggle.test.d.ts +6 -0
- package/dist/src/coreToolToggle.test.js +427 -0
- package/dist/src/coreToolToggle.test.js.map +1 -0
- package/dist/src/extensions/extensionAutoUpdater.d.ts +76 -0
- package/dist/src/extensions/extensionAutoUpdater.js +279 -0
- package/dist/src/extensions/extensionAutoUpdater.js.map +1 -0
- package/dist/src/extensions/extensionAutoUpdater.test.d.ts +6 -0
- package/dist/src/extensions/extensionAutoUpdater.test.js +146 -0
- package/dist/src/extensions/extensionAutoUpdater.test.js.map +1 -0
- package/dist/src/gemini.js +93 -63
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +121 -1
- package/dist/src/gemini.test.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/generated/git-commit.js.map +1 -1
- package/dist/src/integration-tests/cli-args.integration.test.js +299 -0
- package/dist/src/integration-tests/cli-args.integration.test.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +2 -1
- package/dist/src/nonInteractiveCli.js +29 -16
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCliCommands.d.ts +17 -0
- package/dist/src/nonInteractiveCliCommands.js +81 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/runtime/runtimeSettings.test.js +2 -0
- package/dist/src/runtime/runtimeSettings.test.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +3 -3
- package/dist/src/services/BuiltinCommandLoader.js +7 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +37 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +39 -34
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/settings/ephemeralSettings.js +56 -0
- package/dist/src/settings/ephemeralSettings.js.map +1 -1
- package/dist/src/test-utils/createExtension.d.ts +15 -0
- package/dist/src/test-utils/createExtension.js +24 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.js +4 -2
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +3 -1
- package/dist/src/test-utils/render.js +4 -1
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.d.ts +18 -3
- package/dist/src/ui/App.js +32 -873
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/AppContainer.d.ts +19 -0
- package/dist/src/ui/AppContainer.js +1187 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +2 -2
- package/dist/src/ui/IdeIntegrationNudge.js +4 -7
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +214 -58
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -2
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/diagnosticsCommand.js +2 -2
- package/dist/src/ui/commands/diagnosticsCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +3 -2
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/docsCommand.js +1 -1
- package/dist/src/ui/commands/docsCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.d.ts +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +92 -17
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/helpCommand.js +6 -5
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.js +7 -7
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/loggingCommand.js +1 -1
- package/dist/src/ui/commands/loggingCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +11 -3
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +21 -3
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +16 -0
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/permissionsCommand.test.js +55 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.d.ts +10 -0
- package/dist/src/ui/commands/policiesCommand.js +112 -0
- package/dist/src/ui/commands/policiesCommand.js.map +1 -0
- package/dist/src/ui/commands/policiesCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/policiesCommand.test.js +224 -0
- package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
- package/dist/src/ui/commands/setCommand.js +105 -30
- package/dist/src/ui/commands/setCommand.js.map +1 -1
- package/dist/src/ui/commands/setCommand.test.js +1 -1
- package/dist/src/ui/commands/setCommand.test.js.map +1 -1
- package/dist/src/ui/commands/statsCommand.js +11 -1
- package/dist/src/ui/commands/statsCommand.js.map +1 -1
- package/dist/src/ui/commands/test/subagentCommand.test.js +6 -1
- package/dist/src/ui/commands/test/subagentCommand.test.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +19 -23
- package/dist/src/ui/commands/types.js +1 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/uiprofileCommand.d.ts +7 -0
- package/dist/src/ui/commands/uiprofileCommand.js +23 -0
- package/dist/src/ui/commands/uiprofileCommand.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.js +4 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.test.js +32 -32
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/components/CacheStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/CacheStatsDisplay.js +35 -0
- package/dist/src/ui/components/CacheStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/CacheStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/CacheStatsDisplay.test.js +118 -0
- package/dist/src/ui/components/CacheStatsDisplay.test.js.map +1 -0
- package/dist/src/ui/components/CliSpinner.d.ts +10 -0
- package/dist/src/ui/components/CliSpinner.js +20 -0
- package/dist/src/ui/components/CliSpinner.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +17 -0
- package/dist/src/ui/components/Composer.js +16 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +18 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +15 -0
- package/dist/src/ui/components/DebugProfiler.js +137 -13
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.test.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.test.js +131 -0
- package/dist/src/ui/components/DebugProfiler.test.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +16 -0
- package/dist/src/ui/components/DialogManager.js +131 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +18 -8
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +4 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +2 -2
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +6 -2
- package/dist/src/ui/components/HistoryItemDisplay.js +10 -2
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +90 -10
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +6 -0
- package/dist/src/ui/components/InputPrompt.js +52 -18
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadProfileDialog.js +13 -9
- package/dist/src/ui/components/LoadProfileDialog.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +1 -1
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/components/LoggingDialog.js +14 -10
- package/dist/src/ui/components/LoggingDialog.js.map +1 -1
- package/dist/src/ui/components/Notifications.d.ts +14 -0
- package/dist/src/ui/components/Notifications.js +34 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/OAuthCodeDialog.js +2 -1
- package/dist/src/ui/components/OAuthCodeDialog.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +14 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +115 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +98 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/ProviderDialog.js +23 -18
- package/dist/src/ui/components/ProviderDialog.js.map +1 -1
- package/dist/src/ui/components/ProviderModelDialog.js +24 -18
- package/dist/src/ui/components/ProviderModelDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +12 -2
- package/dist/src/ui/components/SettingsDialog.js +253 -23
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +90 -8
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +3 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +6 -4
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ToolsDialog.js +6 -4
- package/dist/src/ui/components/ToolsDialog.js.map +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +5 -3
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +37 -6
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +9 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +7 -3
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +7 -3
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/WarningMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/WarningMessage.js +10 -0
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
- package/dist/src/ui/components/messages/WarningMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/WarningMessage.test.js +15 -0
- package/dist/src/ui/components/messages/WarningMessage.test.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +76 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +376 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +4 -5
- package/dist/src/ui/components/shared/RadioButtonSelect.js +11 -117
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +116 -95
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +6 -0
- package/dist/src/ui/components/shared/text-buffer.js +71 -4
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/views/ChatList.d.ts +12 -0
- package/dist/src/ui/components/views/ChatList.js +17 -0
- package/dist/src/ui/components/views/ChatList.js.map +1 -0
- package/dist/src/ui/components/views/ChatList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ChatList.test.js +42 -0
- package/dist/src/ui/components/views/ChatList.test.js.map +1 -0
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/FocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/FocusContext.js +9 -0
- package/dist/src/ui/contexts/FocusContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +63 -4
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +156 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +6 -0
- package/dist/src/ui/contexts/SessionContext.js +107 -5
- package/dist/src/ui/contexts/SessionContext.js.map +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +82 -0
- package/dist/src/ui/contexts/UIActionsContext.js +20 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +121 -0
- package/dist/src/ui/contexts/UIStateContext.js +20 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.js +4 -4
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +29 -6
- package/dist/src/ui/hooks/slashCommandProcessor.js +150 -155
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useBracketedPaste.js +3 -4
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionAutoUpdate.d.ts +13 -0
- package/dist/src/ui/hooks/useExtensionAutoUpdate.js +40 -0
- package/dist/src/ui/hooks/useExtensionAutoUpdate.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +168 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFlickerDetector.d.ts +22 -0
- package/dist/src/ui/hooks/useFlickerDetector.js +38 -0
- package/dist/src/ui/hooks/useFlickerDetector.js.map +1 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.d.ts +6 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.js +142 -0
- package/dist/src/ui/hooks/useFlickerDetector.test.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +1 -1
- package/dist/src/ui/hooks/useGeminiStream.integration.test.js +1 -1
- package/dist/src/ui/hooks/useGeminiStream.integration.test.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +41 -18
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useMemoryMonitor.d.ts +13 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js +28 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +34 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +90 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +60 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +5 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +292 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +726 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -1
- package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
- package/dist/src/ui/hooks/useStateAndRef.js +2 -2
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -1
- package/dist/src/ui/hooks/useStaticHistoryRefresh.d.ts +13 -0
- package/dist/src/ui/hooks/useStaticHistoryRefresh.js +35 -0
- package/dist/src/ui/hooks/useStaticHistoryRefresh.js.map +1 -0
- package/dist/src/ui/hooks/useStaticHistoryRefresh.test.d.ts +6 -0
- package/dist/src/ui/hooks/useStaticHistoryRefresh.test.js +42 -0
- package/dist/src/ui/hooks/useStaticHistoryRefresh.test.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.js +7 -7
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +17 -20
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +6 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +23 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +76 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +31 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +2 -2
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.d.ts +11 -0
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.js +92 -0
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.test.d.ts +6 -0
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.test.js +106 -0
- package/dist/src/ui/privacy/MultiProviderPrivacyNotice.test.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +4 -9
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -1
- package/dist/src/ui/state/extensions.d.ts +61 -0
- package/dist/src/ui/state/extensions.js +84 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/themes/theme.js +2 -2
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/types.d.ts +58 -2
- package/dist/src/ui/types.js +6 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +1 -2
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +94 -104
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/bracketedPaste.d.ts +9 -0
- package/dist/src/ui/utils/bracketedPaste.js +14 -0
- package/dist/src/ui/utils/bracketedPaste.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +1 -0
- package/dist/src/ui/utils/displayUtils.js +4 -1
- package/dist/src/ui/utils/displayUtils.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.test.js +36 -17
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.d.ts +2 -1
- package/dist/src/ui/utils/highlight.js +52 -8
- package/dist/src/ui/utils/highlight.js.map +1 -1
- package/dist/src/ui/utils/highlight.test.js +15 -14
- package/dist/src/ui/utils/highlight.test.js.map +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +11 -3
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/terminalSequences.d.ts +22 -0
- package/dist/src/ui/utils/terminalSequences.js +23 -0
- package/dist/src/ui/utils/terminalSequences.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +10 -0
- package/dist/src/ui/utils/textUtils.js +82 -1
- package/dist/src/ui/utils/textUtils.js.map +1 -1
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +132 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/utils/bootstrap.d.ts +24 -0
- package/dist/src/utils/bootstrap.js +55 -0
- package/dist/src/utils/bootstrap.js.map +1 -0
- package/dist/src/utils/bootstrap.test.d.ts +6 -0
- package/dist/src/utils/bootstrap.test.js +103 -0
- package/dist/src/utils/bootstrap.test.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +6 -0
- package/dist/src/utils/cleanup.js +14 -0
- package/dist/src/utils/cleanup.js.map +1 -1
- package/dist/src/utils/commands.d.ts +17 -0
- package/dist/src/utils/commands.js +60 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +3 -0
- package/dist/src/utils/dialogScopeUtils.js +11 -2
- package/dist/src/utils/dialogScopeUtils.js.map +1 -1
- package/dist/src/utils/dynamicSettings.d.ts +20 -0
- package/dist/src/utils/dynamicSettings.js +110 -0
- package/dist/src/utils/dynamicSettings.js.map +1 -0
- package/dist/src/utils/dynamicSettings.test.d.ts +6 -0
- package/dist/src/utils/dynamicSettings.test.js +329 -0
- package/dist/src/utils/dynamicSettings.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +3 -1
- package/dist/src/utils/events.js +2 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.js +4 -1
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/installationInfo.d.ts +1 -0
- package/dist/src/utils/installationInfo.js +5 -3
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/relaunch.d.ts +16 -0
- package/dist/src/utils/relaunch.js +34 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +96 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/sessionCleanup.d.ts +22 -0
- package/dist/src/utils/sessionCleanup.integration.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.integration.test.js +174 -0
- package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -0
- package/dist/src/utils/sessionCleanup.js +213 -0
- package/dist/src/utils/sessionCleanup.js.map +1 -0
- package/dist/src/utils/sessionCleanup.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.test.js +1144 -0
- package/dist/src/utils/sessionCleanup.test.js.map +1 -0
- package/dist/src/utils/sessionUtils.d.ts +37 -0
- package/dist/src/utils/sessionUtils.js +71 -0
- package/dist/src/utils/sessionUtils.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +6 -3
- package/dist/src/utils/settingsUtils.js +39 -11
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/settingsUtils.test.js +96 -96
- package/dist/src/utils/settingsUtils.test.js.map +1 -1
- package/dist/src/utils/singleSettingSaver.js +5 -0
- package/dist/src/utils/singleSettingSaver.js.map +1 -1
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/zed-integration/acp.js +1 -2
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -0
- package/dist/src/zed-integration/fileSystemService.js +3 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +212 -212
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +15 -6
- package/dist/src/ui/App.quittingMessages.test.d.ts +0 -1
- package/dist/src/ui/App.quittingMessages.test.js +0 -14
- package/dist/src/ui/App.quittingMessages.test.js.map +0 -1
|
@@ -1,112 +1,133 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
|
-
* Copyright 2025
|
|
4
|
+
* Copyright 2025 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
8
8
|
import { renderWithProviders } from '../../../test-utils/render.js';
|
|
9
|
-
import { waitFor } from '@testing-library/react';
|
|
10
9
|
import { RadioButtonSelect, } from './RadioButtonSelect.js';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
import { BaseSelectionList, } from './BaseSelectionList.js';
|
|
11
|
+
vi.mock('./BaseSelectionList.js', () => ({
|
|
12
|
+
BaseSelectionList: vi.fn(() => null),
|
|
13
|
+
}));
|
|
14
|
+
vi.mock('../../semantic-colors.js', () => ({
|
|
15
|
+
theme: {
|
|
16
|
+
text: { secondary: 'COLOR_SECONDARY' },
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
const MockedBaseSelectionList = vi.mocked(BaseSelectionList);
|
|
20
|
+
const extractRenderItem = () => {
|
|
21
|
+
const mockCalls = MockedBaseSelectionList.mock.calls;
|
|
22
|
+
if (mockCalls.length === 0) {
|
|
23
|
+
throw new Error('BaseSelectionList was not called. Ensure RadioButtonSelect is rendered before calling extractRenderItem.');
|
|
24
|
+
}
|
|
25
|
+
const props = mockCalls[0][0];
|
|
26
|
+
if (typeof props.renderItem !== 'function') {
|
|
27
|
+
throw new Error('renderItem prop was not found on BaseSelectionList call.');
|
|
28
|
+
}
|
|
29
|
+
return props.renderItem;
|
|
30
|
+
};
|
|
31
|
+
describe('RadioButtonSelect', () => {
|
|
32
|
+
const mockOnSelect = vi.fn();
|
|
33
|
+
const mockOnHighlight = vi.fn();
|
|
34
|
+
const ITEMS = [
|
|
35
|
+
{ label: 'Option 1', value: 'one', key: 'one' },
|
|
36
|
+
{ label: 'Option 2', value: 'two', key: 'two' },
|
|
37
|
+
{ label: 'Option 3', value: 'three', disabled: true, key: 'three' },
|
|
38
|
+
];
|
|
39
|
+
const renderComponent = (props = {}) => {
|
|
40
|
+
const defaultProps = {
|
|
41
|
+
items: ITEMS,
|
|
42
|
+
onSelect: mockOnSelect,
|
|
43
|
+
...props,
|
|
44
|
+
};
|
|
45
|
+
return renderWithProviders(_jsx(RadioButtonSelect, { ...defaultProps }));
|
|
46
|
+
};
|
|
47
|
+
beforeEach(() => {
|
|
48
|
+
vi.clearAllMocks();
|
|
22
49
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
describe('Prop forwarding to BaseSelectionList', () => {
|
|
51
|
+
it('should forward all props correctly when provided', () => {
|
|
52
|
+
const props = {
|
|
53
|
+
items: ITEMS,
|
|
54
|
+
initialIndex: 1,
|
|
55
|
+
onSelect: mockOnSelect,
|
|
56
|
+
onHighlight: mockOnHighlight,
|
|
57
|
+
isFocused: false,
|
|
58
|
+
showScrollArrows: true,
|
|
59
|
+
maxItemsToShow: 5,
|
|
60
|
+
showNumbers: false,
|
|
61
|
+
};
|
|
62
|
+
renderComponent(props);
|
|
63
|
+
expect(BaseSelectionList).toHaveBeenCalledTimes(1);
|
|
64
|
+
expect(BaseSelectionList).toHaveBeenCalledWith(expect.objectContaining({
|
|
65
|
+
...props,
|
|
66
|
+
renderItem: expect.any(Function),
|
|
67
|
+
}), undefined);
|
|
68
|
+
});
|
|
69
|
+
it('should use default props if not provided', () => {
|
|
70
|
+
renderComponent({
|
|
71
|
+
items: ITEMS,
|
|
72
|
+
onSelect: mockOnSelect,
|
|
73
|
+
});
|
|
74
|
+
expect(BaseSelectionList).toHaveBeenCalledWith(expect.objectContaining({
|
|
75
|
+
initialIndex: 0,
|
|
76
|
+
isFocused: true,
|
|
77
|
+
showScrollArrows: false,
|
|
78
|
+
maxItemsToShow: 10,
|
|
79
|
+
showNumbers: true,
|
|
80
|
+
}), undefined);
|
|
81
|
+
});
|
|
38
82
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
83
|
+
describe('renderItem implementation', () => {
|
|
84
|
+
let renderItem;
|
|
85
|
+
const mockContext = {
|
|
86
|
+
isSelected: false,
|
|
87
|
+
titleColor: 'MOCK_TITLE_COLOR',
|
|
88
|
+
numberColor: 'MOCK_NUMBER_COLOR',
|
|
89
|
+
};
|
|
90
|
+
beforeEach(() => {
|
|
91
|
+
renderComponent();
|
|
92
|
+
renderItem = extractRenderItem();
|
|
93
|
+
});
|
|
94
|
+
it('should render the standard label display with correct color and truncation', () => {
|
|
95
|
+
const item = ITEMS[0];
|
|
96
|
+
const result = renderItem(item, mockContext);
|
|
97
|
+
expect(result?.props?.color).toBe(mockContext.titleColor);
|
|
98
|
+
expect(result?.props?.children).toBe('Option 1');
|
|
99
|
+
expect(result?.props?.wrap).toBe('truncate');
|
|
100
|
+
});
|
|
101
|
+
it('should render the special theme display when theme props are present', () => {
|
|
102
|
+
const themeItem = {
|
|
42
103
|
label: 'Theme A (Light)',
|
|
43
104
|
value: 'a-light',
|
|
44
105
|
themeNameDisplay: 'Theme A',
|
|
45
106
|
themeTypeDisplay: '(Light)',
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
value: `item-${i + 1}`,
|
|
61
|
-
}));
|
|
62
|
-
const { lastFrame } = renderWithProviders(_jsx(RadioButtonSelect, { items: manyItems, onSelect: noop }));
|
|
63
|
-
expect(lastFrame()).toMatchSnapshot();
|
|
64
|
-
});
|
|
65
|
-
it('renders nothing when no items are provided', () => {
|
|
66
|
-
const { lastFrame } = renderWithProviders(_jsx(RadioButtonSelect, { items: [], onSelect: noop, isFocused: true }));
|
|
67
|
-
expect(lastFrame()).toBe('');
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('keyboard navigation', () => {
|
|
71
|
-
it('should call onSelect when "enter" is pressed', () => {
|
|
72
|
-
const onSelect = vi.fn();
|
|
73
|
-
const { stdin } = renderWithProviders(_jsx(RadioButtonSelect, { items: ITEMS, onSelect: onSelect }));
|
|
74
|
-
stdin.write('\r');
|
|
75
|
-
expect(onSelect).toHaveBeenCalledWith('one');
|
|
76
|
-
});
|
|
77
|
-
describe('when isFocused is false', () => {
|
|
78
|
-
it('should not handle any keyboard input', () => {
|
|
79
|
-
const onSelect = vi.fn();
|
|
80
|
-
const { stdin } = renderWithProviders(_jsx(RadioButtonSelect, { items: ITEMS, onSelect: onSelect, isFocused: false }));
|
|
81
|
-
stdin.write('\u001B[B'); // Down arrow
|
|
82
|
-
stdin.write('\u001B[A'); // Up arrow
|
|
83
|
-
stdin.write('\r'); // Enter
|
|
84
|
-
expect(onSelect).not.toHaveBeenCalled();
|
|
107
|
+
key: 'a-light',
|
|
108
|
+
};
|
|
109
|
+
const result = renderItem(themeItem, mockContext);
|
|
110
|
+
expect(result?.props?.color).toBe(mockContext.titleColor);
|
|
111
|
+
expect(result?.props?.wrap).toBe('truncate');
|
|
112
|
+
const children = result?.props?.children;
|
|
113
|
+
if (!Array.isArray(children) || children.length < 3) {
|
|
114
|
+
throw new Error('Expected children to be an array with at least 3 elements for theme display');
|
|
115
|
+
}
|
|
116
|
+
expect(children[0]).toBe('Theme A');
|
|
117
|
+
expect(children[1]).toBe(' ');
|
|
118
|
+
const nestedTextElement = children[2];
|
|
119
|
+
expect(nestedTextElement?.props?.color).toBe('COLOR_SECONDARY');
|
|
120
|
+
expect(nestedTextElement?.props?.children).toBe('(Light)');
|
|
85
121
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
await waitFor(() => {
|
|
96
|
-
expect(lastFrame()).toContain('● 2. Option 2');
|
|
97
|
-
});
|
|
98
|
-
stdin.write('\r');
|
|
99
|
-
expect(onSelect).toHaveBeenCalledWith('two');
|
|
100
|
-
});
|
|
101
|
-
it('should navigate up with arrow key and select with enter', async () => {
|
|
102
|
-
const onSelect = vi.fn();
|
|
103
|
-
const { stdin, lastFrame } = renderWithProviders(_jsx(RadioButtonSelect, { items: ITEMS, onSelect: onSelect, initialIndex: 1, isFocused: isFocused }));
|
|
104
|
-
stdin.write('\u001B[A'); // Up arrow
|
|
105
|
-
await waitFor(() => {
|
|
106
|
-
expect(lastFrame()).toContain('● 1. Option 1');
|
|
107
|
-
});
|
|
108
|
-
stdin.write('\r');
|
|
109
|
-
expect(onSelect).toHaveBeenCalledWith('one');
|
|
122
|
+
it('should fall back to standard display if only one theme prop is present', () => {
|
|
123
|
+
const partialThemeItem = {
|
|
124
|
+
label: 'Incomplete Theme',
|
|
125
|
+
value: 'incomplete',
|
|
126
|
+
themeNameDisplay: 'Only Name',
|
|
127
|
+
key: 'incomplete',
|
|
128
|
+
};
|
|
129
|
+
const result = renderItem(partialThemeItem, mockContext);
|
|
130
|
+
expect(result?.props?.children).toBe('Incomplete Theme');
|
|
110
131
|
});
|
|
111
132
|
});
|
|
112
133
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonSelect.test.js","sourceRoot":"","sources":["../../../../../src/ui/components/shared/RadioButtonSelect.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"RadioButtonSelect.test.js","sourceRoot":"","sources":["../../../../../src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E,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;YAChF,MAAM,gBAAgB,GAA4B;gBAChD,KAAK,EAAE,kBAAkB;gBACzB,KAAK,EAAE,YAAY;gBACnB,gBAAgB,EAAE,WAAW;gBAC7B,GAAG,EAAE,YAAY;aAClB,CAAC;YAEF,MAAM,MAAM,GAAG,UAAU,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;YAEzD,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -274,6 +274,12 @@ export interface TextBuffer {
|
|
|
274
274
|
viewportVisualLines: string[];
|
|
275
275
|
visualCursor: [number, number];
|
|
276
276
|
visualScrollRow: number;
|
|
277
|
+
/**
|
|
278
|
+
* For each visual line (by absolute index in allVisualLines) provides a tuple
|
|
279
|
+
* [logicalLineIndex, startColInLogical] that maps where that visual line
|
|
280
|
+
* begins within the logical buffer. Indices are code-point based.
|
|
281
|
+
*/
|
|
282
|
+
visualToLogicalMap: Array<[number, number]>;
|
|
277
283
|
/**
|
|
278
284
|
* Replaces the entire buffer content with the provided text.
|
|
279
285
|
* The operation is undoable.
|
|
@@ -1123,7 +1123,7 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1123
1123
|
const { lines, cursorRow, cursorCol, preferredCol, selectionAnchor } = state;
|
|
1124
1124
|
const text = useMemo(() => lines.join('\n'), [lines]);
|
|
1125
1125
|
const visualLayout = useMemo(() => calculateVisualLayout(lines, [cursorRow, cursorCol], state.viewportWidth), [lines, cursorRow, cursorCol, state.viewportWidth]);
|
|
1126
|
-
const { visualLines, visualCursor } = visualLayout;
|
|
1126
|
+
const { visualLines, visualCursor, visualToLogicalMap } = visualLayout;
|
|
1127
1127
|
const [visualScrollRow, setVisualScrollRow] = useState(0);
|
|
1128
1128
|
useEffect(() => {
|
|
1129
1129
|
if (onChange) {
|
|
@@ -1136,6 +1136,8 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1136
1136
|
// Update visual scroll (vertical)
|
|
1137
1137
|
useEffect(() => {
|
|
1138
1138
|
const { height } = viewport;
|
|
1139
|
+
const totalVisualLines = visualLines.length;
|
|
1140
|
+
const maxScrollStart = Math.max(0, totalVisualLines - height);
|
|
1139
1141
|
let newVisualScrollRow = visualScrollRow;
|
|
1140
1142
|
if (visualCursor[0] < visualScrollRow) {
|
|
1141
1143
|
newVisualScrollRow = visualCursor[0];
|
|
@@ -1143,10 +1145,13 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1143
1145
|
else if (visualCursor[0] >= visualScrollRow + height) {
|
|
1144
1146
|
newVisualScrollRow = visualCursor[0] - height + 1;
|
|
1145
1147
|
}
|
|
1148
|
+
// When the number of visual lines shrinks (e.g., after widening the viewport),
|
|
1149
|
+
// ensure scroll never starts beyond the last valid start so we can render a full window.
|
|
1150
|
+
newVisualScrollRow = clamp(newVisualScrollRow, 0, maxScrollStart);
|
|
1146
1151
|
if (newVisualScrollRow !== visualScrollRow) {
|
|
1147
1152
|
setVisualScrollRow(newVisualScrollRow);
|
|
1148
1153
|
}
|
|
1149
|
-
}, [visualCursor, visualScrollRow, viewport]);
|
|
1154
|
+
}, [visualCursor, visualScrollRow, viewport, visualLines.length]);
|
|
1150
1155
|
const insert = useCallback((ch, { paste = false } = {}) => {
|
|
1151
1156
|
if (/[\n\r]/.test(ch)) {
|
|
1152
1157
|
dispatch({ type: 'insert', payload: ch });
|
|
@@ -1434,7 +1439,7 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1434
1439
|
const moveToOffset = useCallback((offset) => {
|
|
1435
1440
|
dispatch({ type: 'move_to_offset', payload: { offset } });
|
|
1436
1441
|
}, []);
|
|
1437
|
-
const returnValue = {
|
|
1442
|
+
const returnValue = useMemo(() => ({
|
|
1438
1443
|
lines,
|
|
1439
1444
|
text,
|
|
1440
1445
|
cursor: [cursorRow, cursorCol],
|
|
@@ -1444,6 +1449,7 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1444
1449
|
viewportVisualLines: renderedVisualLines,
|
|
1445
1450
|
visualCursor,
|
|
1446
1451
|
visualScrollRow,
|
|
1452
|
+
visualToLogicalMap,
|
|
1447
1453
|
setText,
|
|
1448
1454
|
insert,
|
|
1449
1455
|
newline,
|
|
@@ -1494,7 +1500,68 @@ export function useTextBuffer({ initialText = '', initialCursorOffset = 0, viewp
|
|
|
1494
1500
|
vimMoveToLastLine,
|
|
1495
1501
|
vimMoveToLine,
|
|
1496
1502
|
vimEscapeInsertMode,
|
|
1497
|
-
}
|
|
1503
|
+
}), [
|
|
1504
|
+
lines,
|
|
1505
|
+
text,
|
|
1506
|
+
cursorRow,
|
|
1507
|
+
cursorCol,
|
|
1508
|
+
preferredCol,
|
|
1509
|
+
selectionAnchor,
|
|
1510
|
+
visualLines,
|
|
1511
|
+
renderedVisualLines,
|
|
1512
|
+
visualCursor,
|
|
1513
|
+
visualScrollRow,
|
|
1514
|
+
setText,
|
|
1515
|
+
insert,
|
|
1516
|
+
newline,
|
|
1517
|
+
backspace,
|
|
1518
|
+
del,
|
|
1519
|
+
move,
|
|
1520
|
+
undo,
|
|
1521
|
+
redo,
|
|
1522
|
+
replaceRange,
|
|
1523
|
+
replaceRangeByOffset,
|
|
1524
|
+
moveToOffset,
|
|
1525
|
+
deleteWordLeft,
|
|
1526
|
+
deleteWordRight,
|
|
1527
|
+
killLineRight,
|
|
1528
|
+
killLineLeft,
|
|
1529
|
+
handleInput,
|
|
1530
|
+
openInExternalEditor,
|
|
1531
|
+
vimDeleteWordForward,
|
|
1532
|
+
vimDeleteWordBackward,
|
|
1533
|
+
vimDeleteWordEnd,
|
|
1534
|
+
vimChangeWordForward,
|
|
1535
|
+
vimChangeWordBackward,
|
|
1536
|
+
vimChangeWordEnd,
|
|
1537
|
+
vimDeleteLine,
|
|
1538
|
+
vimChangeLine,
|
|
1539
|
+
vimDeleteToEndOfLine,
|
|
1540
|
+
vimChangeToEndOfLine,
|
|
1541
|
+
vimChangeMovement,
|
|
1542
|
+
vimMoveLeft,
|
|
1543
|
+
vimMoveRight,
|
|
1544
|
+
vimMoveUp,
|
|
1545
|
+
vimMoveDown,
|
|
1546
|
+
vimMoveWordForward,
|
|
1547
|
+
vimMoveWordBackward,
|
|
1548
|
+
vimMoveWordEnd,
|
|
1549
|
+
vimDeleteChar,
|
|
1550
|
+
vimInsertAtCursor,
|
|
1551
|
+
vimAppendAtCursor,
|
|
1552
|
+
vimOpenLineBelow,
|
|
1553
|
+
vimOpenLineAbove,
|
|
1554
|
+
vimAppendAtLineEnd,
|
|
1555
|
+
vimInsertAtLineStart,
|
|
1556
|
+
vimMoveToLineStart,
|
|
1557
|
+
vimMoveToLineEnd,
|
|
1558
|
+
vimMoveToFirstNonWhitespace,
|
|
1559
|
+
vimMoveToFirstLine,
|
|
1560
|
+
vimMoveToLastLine,
|
|
1561
|
+
vimMoveToLine,
|
|
1562
|
+
vimEscapeInsertMode,
|
|
1563
|
+
visualToLogicalMap,
|
|
1564
|
+
]);
|
|
1498
1565
|
return returnValue;
|
|
1499
1566
|
}
|
|
1500
1567
|
//# sourceMappingURL=text-buffer.js.map
|