@rdmind/rdmind 0.0.15-alpha.1 → 0.0.15-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +15 -10
- package/dist/src/commands/extensions/disable.d.ts +2 -3
- package/dist/src/commands/extensions/disable.js +20 -6
- package/dist/src/commands/extensions/disable.js.map +1 -1
- package/dist/src/commands/extensions/enable.d.ts +2 -3
- package/dist/src/commands/extensions/enable.js +21 -10
- package/dist/src/commands/extensions/enable.js.map +1 -1
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +3 -2
- package/dist/src/commands/extensions/install.js +47 -17
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +86 -9
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +37 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/list.js +1 -1
- package/dist/src/commands/extensions/list.js.map +1 -1
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +90 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.js +59 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- 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 +2 -2
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -1
- package/dist/src/commands/extensions/update.d.ts +2 -1
- package/dist/src/commands/extensions/update.js +80 -14
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/extensions.js +4 -0
- package/dist/src/commands/extensions.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 +4 -3
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/commands/mcp/remove.js +1 -1
- package/dist/src/commands/mcp/remove.js.map +1 -1
- package/dist/src/config/auth.d.ts +1 -1
- package/dist/src/config/auth.js +4 -4
- package/dist/src/config/auth.js.map +1 -1
- package/dist/src/config/auth.test.js +15 -7
- package/dist/src/config/auth.test.js.map +1 -1
- package/dist/src/config/config.d.ts +7 -2
- package/dist/src/config/config.js +178 -122
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +39 -16
- package/dist/src/config/extension.js +349 -192
- 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 +189 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/{ui/components/ModelSelectionDialog.test.d.ts → config/extensions/extensionEnablement.test.d.ts} +1 -1
- package/dist/src/config/extensions/extensionEnablement.test.js +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +30 -0
- package/dist/src/config/extensions/github.js +322 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +334 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +113 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +342 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +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 +5 -1
- package/dist/src/config/keyBindings.js +14 -25
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/settings.d.ts +8 -5
- package/dist/src/config/settings.js +178 -275
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +332 -141
- package/dist/src/config/settingsSchema.js +321 -153
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +64 -57
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/config/trustedFolders.d.ts +23 -4
- package/dist/src/config/trustedFolders.js +97 -47
- package/dist/src/config/trustedFolders.js.map +1 -1
- package/dist/src/config/trustedFolders.test.js +196 -20
- package/dist/src/config/trustedFolders.test.js.map +1 -1
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +27 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +33 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +20 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +3 -2
- package/dist/src/gemini.js +156 -128
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +190 -47
- 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/nonInteractiveCli.d.ts +2 -1
- package/dist/src/nonInteractiveCli.js +101 -72
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCliCommands.d.ts +17 -0
- package/dist/src/nonInteractiveCliCommands.js +79 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.js +1 -1
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +30 -18
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +2 -0
- package/dist/src/services/FileCommandLoader.js +7 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +43 -8
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.test.js +228 -1
- package/dist/src/services/McpPromptLoader.test.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +8 -1
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/test-utils/createExtension.d.ts +15 -0
- package/dist/src/test-utils/createExtension.js +25 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.js +2 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +5 -1
- package/dist/src/test-utils/render.js +5 -1
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.d.ts +1 -10
- package/dist/src/ui/App.js +26 -834
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/AppContainer.d.ts +17 -0
- package/dist/src/ui/AppContainer.js +1062 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/AppContainer.test.d.ts +6 -0
- package/dist/src/ui/AppContainer.test.js +831 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +2 -2
- package/dist/src/ui/IdeIntegrationNudge.js +6 -8
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/{components → auth}/AuthDialog.js +8 -4
- package/dist/src/ui/auth/AuthDialog.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/{components → auth}/AuthDialog.test.js +92 -10
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/{components → auth}/AuthInProgress.js +2 -2
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/{hooks/useAuthCommand.d.ts → auth/useAuth.d.ts} +9 -3
- package/dist/src/ui/{hooks/useAuthCommand.js → auth/useAuth.js} +49 -14
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.js +9 -3
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.d.ts +2 -0
- package/dist/src/ui/commands/chatCommand.js +93 -3
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -1
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/corgiCommand.js +1 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -1
- package/dist/src/ui/commands/directoryCommand.js +2 -2
- package/dist/src/ui/commands/directoryCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +92 -15
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +1 -2
- package/dist/src/ui/commands/ideCommand.js +19 -10
- package/dist/src/ui/commands/ideCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +88 -261
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +1 -1
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.js +1 -16
- package/dist/src/ui/commands/modelCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.test.js +10 -11
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -1
- package/dist/src/ui/commands/summaryCommand.js +1 -1
- package/dist/src/ui/commands/summaryCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +10 -24
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +7 -2
- package/dist/src/ui/commands/types.js +0 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AboutBox.js +2 -2
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AnsiOutput.d.ts +13 -0
- package/dist/src/ui/components/AnsiOutput.js +12 -0
- package/dist/src/ui/components/AnsiOutput.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.d.ts +6 -0
- package/dist/src/ui/components/AnsiOutput.test.js +97 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +19 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +5 -5
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +54 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Composer.test.d.ts +6 -0
- package/dist/src/ui/components/Composer.test.js +337 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.js +38 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +2 -2
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +3 -3
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +2 -1
- package/dist/src/ui/components/ContextUsageDisplay.js +5 -3
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.js +2 -2
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/DetailedMessagesDisplay.js +7 -7
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -1
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +129 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +16 -7
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.js +22 -9
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +37 -12
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -17
- package/dist/src/ui/components/Footer.js +33 -11
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +5 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +7 -2
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
- package/dist/src/ui/components/Header.js +2 -2
- package/dist/src/ui/components/Header.js.map +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/Help.js +9 -6
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +57 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +5 -4
- package/dist/src/ui/components/HistoryItemDisplay.js +13 -4
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +90 -9
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +32 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +9 -0
- package/dist/src/ui/components/InputPrompt.js +192 -45
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.js +2 -2
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/src/ui/components/LoadingIndicator.test.js +4 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +28 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.d.ts +6 -0
- package/dist/src/ui/components/MainContent.js +28 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +6 -4
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +42 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelDialog.test.js +158 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +7 -7
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/ModelSwitchDialog.js +3 -0
- package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -1
- package/dist/src/ui/components/ModelSwitchDialog.test.js +3 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js.map +1 -1
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +23 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js +63 -39
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +8 -1
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +13 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +48 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +154 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +5 -5
- package/dist/src/ui/components/PrepareLabel.js +67 -11
- package/dist/src/ui/components/PrepareLabel.js.map +1 -1
- package/dist/src/ui/components/PrepareLabel.test.d.ts +6 -0
- package/dist/src/ui/components/PrepareLabel.test.js +71 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.d.ts +13 -0
- package/dist/src/ui/components/ProQuotaDialog.js +23 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js +58 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +20 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +56 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js +4 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.js +20 -0
- package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.js +5 -4
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -1
- package/dist/src/ui/components/QwenOAuthProgress.test.js +82 -11
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +2 -1
- package/dist/src/ui/components/SettingsDialog.js +97 -23
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.test.js +474 -84
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +5 -2
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +36 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.js +2 -2
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -1
- package/dist/src/ui/components/ShowMoreLines.js +2 -2
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +6 -6
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +7 -2
- package/dist/src/ui/components/SuggestionsDisplay.js +17 -17
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +14 -29
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ThemeDialog.test.js +75 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/Tips.js +2 -2
- package/dist/src/ui/components/Tips.js.map +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.js +4 -4
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
- package/dist/src/ui/components/UpdateNotification.js +2 -2
- package/dist/src/ui/components/UpdateNotification.js.map +1 -1
- package/dist/src/ui/components/WelcomeBackDialog.js +2 -0
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +14 -11
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -2
- package/dist/src/ui/components/messages/CompressionMessage.js +37 -8
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +160 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +2 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +14 -22
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/ErrorMessage.js +2 -2
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.js +2 -2
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
- package/dist/src/ui/components/messages/InfoMessage.js +2 -2
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +53 -21
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -8
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +3 -2
- package/dist/src/ui/components/messages/ToolGroupMessage.js +18 -10
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +17 -15
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +3 -1
- package/dist/src/ui/components/messages/ToolMessage.js +53 -11
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js +34 -1
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +3 -4
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserShellMessage.js +2 -2
- package/dist/src/ui/components/messages/UserShellMessage.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/shared/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +72 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +376 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +35 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +2 -2
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +2 -3
- package/dist/src/ui/components/shared/RadioButtonSelect.js +10 -105
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +115 -92
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -1
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +14 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +25 -2
- package/dist/src/ui/components/shared/text-buffer.js +296 -187
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +2 -3
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -1
- package/dist/src/ui/components/subagents/create/ColorSelector.js +3 -2
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/CreationSummary.js +6 -5
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +2 -3
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -1
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +1 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/LocationSelector.js +1 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +2 -2
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -1
- package/dist/src/ui/components/subagents/create/ToolSelector.js +4 -3
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +4 -4
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +1 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +1 -2
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -1
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +1 -2
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -1
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +9 -10
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -1
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +47 -0
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +97 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +77 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +117 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +7 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/AppContext.d.ts +11 -0
- package/dist/src/ui/contexts/AppContext.js +15 -0
- package/dist/src/ui/contexts/AppContext.js.map +1 -0
- package/dist/src/ui/contexts/ConfigContext.d.ts +9 -0
- package/dist/src/ui/contexts/ConfigContext.js +16 -0
- package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +3 -0
- package/dist/src/ui/contexts/KeypressContext.js +309 -44
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +288 -2
- 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/ShellFocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
- package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +45 -0
- package/dist/src/ui/contexts/UIActionsContext.js +21 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +117 -0
- package/dist/src/ui/contexts/UIStateContext.js +17 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +12 -12
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +21 -19
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
- package/dist/src/ui/hooks/keyToAnsi.js +67 -0
- package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +2 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +65 -15
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +196 -17
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +20 -2
- package/dist/src/ui/hooks/slashCommandProcessor.js +41 -82
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +3 -2
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +20 -18
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +43 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +116 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.js +10 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.js +6 -10
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +14 -3
- package/dist/src/ui/hooks/useGeminiStream.js +173 -79
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.js +15 -18
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +49 -53
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +16 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +65 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +81 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +234 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -1
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +2 -2
- package/dist/src/ui/hooks/useLoadingIndicator.test.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/useMemoryMonitor.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +57 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +2 -1
- package/dist/src/ui/hooks/useMessageQueue.js +5 -3
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -1
- package/dist/src/ui/hooks/useMessageQueue.test.js +9 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -1
- package/dist/src/ui/hooks/useModelCommand.d.ts +12 -0
- package/dist/src/ui/hooks/useModelCommand.js +21 -0
- package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useModelCommand.test.js +35 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +78 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +182 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
- package/dist/src/ui/hooks/usePhraseCycler.js +11 -8
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +21 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +122 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +269 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -2
- package/dist/src/ui/hooks/useReactToolScheduler.js +23 -17
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +67 -20
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +245 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +701 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +281 -67
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +4 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +390 -65
- package/dist/src/ui/hooks/useSlashCompletion.test.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/useThemeCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +3 -14
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +64 -291
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useWelcomeBack.js +2 -2
- package/dist/src/ui/hooks/useWelcomeBack.js.map +1 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.js +2 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -1
- package/dist/src/ui/keyMatchers.test.js +17 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +9 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +3 -0
- package/dist/src/ui/models/availableModels.js +27 -3
- package/dist/src/ui/models/availableModels.js.map +1 -1
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +28 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +42 -0
- package/dist/src/ui/state/extensions.js +62 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/themes/ayu.js +1 -1
- package/dist/src/ui/themes/dracula.js +2 -2
- package/dist/src/ui/themes/github-dark.js +1 -1
- package/dist/src/ui/themes/theme.js +19 -19
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/types.d.ts +79 -3
- package/dist/src/ui/types.js +14 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +3 -2
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +7 -7
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +11 -11
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +95 -87
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +4 -4
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +5 -6
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.d.ts +1 -0
- package/dist/src/ui/utils/displayUtils.js +7 -4
- package/dist/src/ui/utils/displayUtils.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.test.js +37 -18
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -1
- package/dist/src/ui/utils/highlight.d.ts +11 -0
- package/dist/src/ui/utils/highlight.js +78 -0
- package/dist/src/ui/utils/highlight.js.map +1 -0
- package/dist/src/ui/utils/highlight.test.d.ts +6 -0
- package/dist/src/ui/utils/highlight.test.js +120 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +39 -29
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
- package/dist/src/ui/utils/platformConstants.d.ts +24 -1
- package/dist/src/ui/utils/platformConstants.js +26 -1
- package/dist/src/ui/utils/platformConstants.js.map +1 -1
- package/dist/src/ui/utils/textUtils.d.ts +10 -0
- package/dist/src/ui/utils/textUtils.js +108 -3
- 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/commands.d.ts +20 -0
- package/dist/src/utils/commands.js +53 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/commands.test.d.ts +6 -0
- package/dist/src/utils/commands.test.js +115 -0
- package/dist/src/utils/commands.test.js.map +1 -0
- package/dist/src/utils/commentJson.d.ts +9 -0
- package/dist/src/utils/commentJson.js +48 -0
- package/dist/src/utils/commentJson.js.map +1 -0
- package/dist/src/utils/commentJson.test.d.ts +6 -0
- package/dist/src/utils/commentJson.test.js +146 -0
- package/dist/src/utils/commentJson.test.js.map +1 -0
- package/dist/src/utils/deepMerge.d.ts +9 -0
- package/dist/src/utils/deepMerge.js +58 -0
- package/dist/src/utils/deepMerge.js.map +1 -0
- package/dist/src/utils/deepMerge.test.d.ts +6 -0
- package/dist/src/utils/deepMerge.test.js +143 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +97 -0
- package/dist/src/utils/envVarResolver.js.map +1 -0
- package/dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/dist/src/utils/envVarResolver.test.js +221 -0
- package/dist/src/utils/envVarResolver.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +21 -0
- package/dist/src/utils/errors.js +93 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +303 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +2 -1
- package/dist/src/utils/events.js +1 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/math.d.ts +13 -0
- package/dist/src/utils/math.js +14 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/processUtils.d.ts +13 -0
- package/dist/src/utils/processUtils.js +18 -0
- package/dist/src/utils/processUtils.js.map +1 -0
- package/dist/src/utils/processUtils.test.d.ts +6 -0
- package/dist/src/utils/processUtils.test.js +20 -0
- package/dist/src/utils/processUtils.test.js.map +1 -0
- package/dist/src/utils/relaunch.d.ts +7 -0
- package/dist/src/utils/relaunch.js +57 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +273 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/sandbox.d.ts +1 -1
- package/dist/src/utils/sandbox.js +42 -17
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/settingsUtils.d.ts +16 -6
- package/dist/src/utils/settingsUtils.js +35 -25
- package/dist/src/utils/settingsUtils.js.map +1 -1
- package/dist/src/utils/settingsUtils.test.js +455 -158
- package/dist/src/utils/settingsUtils.test.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.d.ts +1 -1
- package/dist/src/utils/userStartupWarnings.js +1 -1
- package/dist/src/utils/userStartupWarnings.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/validateNonInterActiveAuth.d.ts +4 -2
- package/dist/src/validateNonInterActiveAuth.js +33 -12
- package/dist/src/validateNonInterActiveAuth.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 +310 -310
- package/dist/src/zed-integration/zedIntegration.d.ts +8 -1
- package/dist/src/zed-integration/zedIntegration.js +32 -15
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -10
- package/dist/src/ui/components/AuthDialog.js.map +0 -1
- package/dist/src/ui/components/AuthDialog.test.js.map +0 -1
- package/dist/src/ui/components/AuthInProgress.js.map +0 -1
- package/dist/src/ui/components/ModelSelectionDialog.d.ts +0 -14
- package/dist/src/ui/components/ModelSelectionDialog.js +0 -26
- package/dist/src/ui/components/ModelSelectionDialog.js.map +0 -1
- package/dist/src/ui/components/ModelSelectionDialog.test.js +0 -124
- package/dist/src/ui/components/ModelSelectionDialog.test.js.map +0 -1
- package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
- /package/dist/src/{ui/components/AuthDialog.test.d.ts → commands/extensions/new.test.d.ts} +0 -0
- /package/dist/src/ui/{components → auth}/AuthDialog.d.ts +0 -0
- /package/dist/src/ui/{components → auth}/AuthInProgress.d.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type RestartReason } from '../hooks/useIdeTrustListener.js';
|
|
7
|
+
interface IdeTrustChangeDialogProps {
|
|
8
|
+
reason: RestartReason;
|
|
9
|
+
}
|
|
10
|
+
export declare const IdeTrustChangeDialog: ({ reason }: IdeTrustChangeDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { Box, Text } from 'ink';
|
|
8
|
+
import { theme } from '../semantic-colors.js';
|
|
9
|
+
import { useKeypress } from '../hooks/useKeypress.js';
|
|
10
|
+
import { relaunchApp } from '../../utils/processUtils.js';
|
|
11
|
+
import {} from '../hooks/useIdeTrustListener.js';
|
|
12
|
+
export const IdeTrustChangeDialog = ({ reason }) => {
|
|
13
|
+
useKeypress((key) => {
|
|
14
|
+
if (key.name === 'r' || key.name === 'R') {
|
|
15
|
+
relaunchApp();
|
|
16
|
+
}
|
|
17
|
+
}, { isActive: true });
|
|
18
|
+
let message = 'Workspace trust has changed.';
|
|
19
|
+
if (reason === 'NONE') {
|
|
20
|
+
// This should not happen, but provides a fallback and a debug log.
|
|
21
|
+
console.error('IdeTrustChangeDialog rendered with unexpected reason "NONE"');
|
|
22
|
+
}
|
|
23
|
+
else if (reason === 'CONNECTION_CHANGE') {
|
|
24
|
+
message =
|
|
25
|
+
'Workspace trust has changed due to a change in the IDE connection.';
|
|
26
|
+
}
|
|
27
|
+
else if (reason === 'TRUST_CHANGE') {
|
|
28
|
+
message = 'Workspace trust has changed due to a change in the IDE trust.';
|
|
29
|
+
}
|
|
30
|
+
return (_jsx(Box, { borderStyle: "round", borderColor: theme.status.warning, paddingX: 1, children: _jsxs(Text, { color: theme.status.warning, children: [message, " Press 'r' to restart Gemini to apply the changes."] }) }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=IdeTrustChangeDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdeTrustChangeDialog.js","sourceRoot":"","sources":["../../../../src/ui/components/IdeTrustChangeDialog.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAsB,MAAM,iCAAiC,CAAC;AAMrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,MAAM,EAA6B,EAAE,EAAE;IAC5E,WAAW,CACT,CAAC,GAAG,EAAE,EAAE;QACN,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;YACzC,WAAW,EAAE,CAAC;QAChB,CAAC;IACH,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAC;IAEF,IAAI,OAAO,GAAG,8BAA8B,CAAC;IAC7C,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,mEAAmE;QACnE,OAAO,CAAC,KAAK,CACX,6DAA6D,CAC9D,CAAC;IACJ,CAAC;SAAM,IAAI,MAAM,KAAK,mBAAmB,EAAE,CAAC;QAC1C,OAAO;YACL,oEAAoE,CAAC;IACzE,CAAC;SAAM,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;QACrC,OAAO,GAAG,+DAA+D,CAAC;IAC5E,CAAC;IAED,OAAO,CACL,KAAC,GAAG,IAAC,WAAW,EAAC,OAAO,EAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,YACrE,MAAC,IAAI,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,aAC9B,OAAO,0DACH,GACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
8
|
+
import * as processUtils from '../../utils/processUtils.js';
|
|
9
|
+
import { renderWithProviders } from '../../test-utils/render.js';
|
|
10
|
+
import { IdeTrustChangeDialog } from './IdeTrustChangeDialog.js';
|
|
11
|
+
describe('IdeTrustChangeDialog', () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
vi.clearAllMocks();
|
|
14
|
+
});
|
|
15
|
+
it('renders the correct message for CONNECTION_CHANGE', () => {
|
|
16
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
17
|
+
const frameText = lastFrame();
|
|
18
|
+
expect(frameText).toContain('Workspace trust has changed due to a change in the IDE connection.');
|
|
19
|
+
expect(frameText).toContain("Press 'r' to restart Gemini");
|
|
20
|
+
});
|
|
21
|
+
it('renders the correct message for TRUST_CHANGE', () => {
|
|
22
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "TRUST_CHANGE" }));
|
|
23
|
+
const frameText = lastFrame();
|
|
24
|
+
expect(frameText).toContain('Workspace trust has changed due to a change in the IDE trust.');
|
|
25
|
+
expect(frameText).toContain("Press 'r' to restart Gemini");
|
|
26
|
+
});
|
|
27
|
+
it('renders a generic message and logs an error for NONE reason', () => {
|
|
28
|
+
const consoleErrorSpy = vi
|
|
29
|
+
.spyOn(console, 'error')
|
|
30
|
+
.mockImplementation(() => { });
|
|
31
|
+
const { lastFrame } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "NONE" }));
|
|
32
|
+
const frameText = lastFrame();
|
|
33
|
+
expect(frameText).toContain('Workspace trust has changed.');
|
|
34
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('IdeTrustChangeDialog rendered with unexpected reason "NONE"');
|
|
35
|
+
});
|
|
36
|
+
it('calls relaunchApp when "r" is pressed', () => {
|
|
37
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
38
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "NONE" }));
|
|
39
|
+
stdin.write('r');
|
|
40
|
+
expect(relaunchAppSpy).toHaveBeenCalledTimes(1);
|
|
41
|
+
});
|
|
42
|
+
it('calls relaunchApp when "R" is pressed', () => {
|
|
43
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
44
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
45
|
+
stdin.write('R');
|
|
46
|
+
expect(relaunchAppSpy).toHaveBeenCalledTimes(1);
|
|
47
|
+
});
|
|
48
|
+
it('does not call relaunchApp when another key is pressed', async () => {
|
|
49
|
+
const relaunchAppSpy = vi.spyOn(processUtils, 'relaunchApp');
|
|
50
|
+
const { stdin } = renderWithProviders(_jsx(IdeTrustChangeDialog, { reason: "CONNECTION_CHANGE" }));
|
|
51
|
+
stdin.write('a');
|
|
52
|
+
// Give it a moment to ensure no async actions are triggered
|
|
53
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
54
|
+
expect(relaunchAppSpy).not.toHaveBeenCalled();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=IdeTrustChangeDialog.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdeTrustChangeDialog.test.js","sourceRoot":"","sources":["../../../../src/ui/components/IdeTrustChangeDialog.test.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,YAAY,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CACzB,oEAAoE,CACrE,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,cAAc,GAAG,CAC/C,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CACzB,+DAA+D,CAChE,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,MAAM,eAAe,GAAG,EAAE;aACvB,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC;aACvB,kBAAkB,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,mBAAmB,CACvC,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,GAAG,CACvC,CAAC;QAEF,MAAM,SAAS,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;QAC5D,MAAM,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAC1C,6DAA6D,CAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,MAAM,GAAG,CACvC,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,MAAM,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,MAAM,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACrE,MAAM,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,mBAAmB,CACnC,KAAC,oBAAoB,IAAC,MAAM,EAAC,mBAAmB,GAAG,CACpD,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEjB,4DAA4D;QAC5D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAExD,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ import type { TextBuffer } from './shared/text-buffer.js';
|
|
|
8
8
|
import type { Key } from '../hooks/useKeypress.js';
|
|
9
9
|
import type { CommandContext, SlashCommand } from '../commands/types.js';
|
|
10
10
|
import type { Config } from '@rdmind/rdmind-core';
|
|
11
|
+
import { ApprovalMode } from '@rdmind/rdmind-core';
|
|
11
12
|
export interface InputPromptProps {
|
|
12
13
|
buffer: TextBuffer;
|
|
13
14
|
onSubmit: (value: string) => void;
|
|
@@ -22,7 +23,15 @@ export interface InputPromptProps {
|
|
|
22
23
|
suggestionsWidth: number;
|
|
23
24
|
shellModeActive: boolean;
|
|
24
25
|
setShellModeActive: (value: boolean) => void;
|
|
26
|
+
approvalMode: ApprovalMode;
|
|
25
27
|
onEscapePromptChange?: (showPrompt: boolean) => void;
|
|
26
28
|
vimHandleInput?: (key: Key) => boolean;
|
|
29
|
+
isEmbeddedShellFocused?: boolean;
|
|
27
30
|
}
|
|
31
|
+
export declare const calculatePromptWidths: (terminalWidth: number) => {
|
|
32
|
+
readonly inputWidth: number;
|
|
33
|
+
readonly containerWidth: number;
|
|
34
|
+
readonly suggestionsWidth: number;
|
|
35
|
+
readonly frameOverhead: number;
|
|
36
|
+
};
|
|
28
37
|
export declare const InputPrompt: React.FC<InputPromptProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useState, useRef } from 'react';
|
|
3
3
|
import { Box, Text } from 'ink';
|
|
4
|
+
import { SuggestionsDisplay, MAX_WIDTH } from './SuggestionsDisplay.js';
|
|
4
5
|
import { theme } from '../semantic-colors.js';
|
|
5
|
-
import { SuggestionsDisplay } from './SuggestionsDisplay.js';
|
|
6
6
|
import { useInputHistory } from '../hooks/useInputHistory.js';
|
|
7
7
|
import { logicalPosToOffset } from './shared/text-buffer.js';
|
|
8
8
|
import { cpSlice, cpLen, toCodePoints } from '../utils/textUtils.js';
|
|
@@ -13,14 +13,40 @@ import { useReverseSearchCompletion } from '../hooks/useReverseSearchCompletion.
|
|
|
13
13
|
import { useCommandCompletion } from '../hooks/useCommandCompletion.js';
|
|
14
14
|
import { useKeypress } from '../hooks/useKeypress.js';
|
|
15
15
|
import { keyMatchers, Command } from '../keyMatchers.js';
|
|
16
|
+
import { ApprovalMode } from '@rdmind/rdmind-core';
|
|
17
|
+
import { parseInputForHighlighting, buildSegmentsForVisualSlice, } from '../utils/highlight.js';
|
|
16
18
|
import { clipboardHasImage, saveClipboardImage, cleanupOldClipboardImages, } from '../utils/clipboardUtils.js';
|
|
17
19
|
import * as path from 'node:path';
|
|
18
20
|
import { SCREEN_READER_USER_PREFIX } from '../textConstants.js';
|
|
19
|
-
|
|
21
|
+
import { useShellFocusState } from '../contexts/ShellFocusContext.js';
|
|
22
|
+
// The input content, input container, and input suggestions list may have different widths
|
|
23
|
+
export const calculatePromptWidths = (terminalWidth) => {
|
|
24
|
+
const widthFraction = 0.9;
|
|
25
|
+
const FRAME_PADDING_AND_BORDER = 4; // Border (2) + padding (2)
|
|
26
|
+
const PROMPT_PREFIX_WIDTH = 2; // '> ' or '! '
|
|
27
|
+
const MIN_CONTENT_WIDTH = 2;
|
|
28
|
+
const innerContentWidth = Math.floor(terminalWidth * widthFraction) -
|
|
29
|
+
FRAME_PADDING_AND_BORDER -
|
|
30
|
+
PROMPT_PREFIX_WIDTH;
|
|
31
|
+
const inputWidth = Math.max(MIN_CONTENT_WIDTH, innerContentWidth);
|
|
32
|
+
const FRAME_OVERHEAD = FRAME_PADDING_AND_BORDER + PROMPT_PREFIX_WIDTH;
|
|
33
|
+
const containerWidth = inputWidth + FRAME_OVERHEAD;
|
|
34
|
+
const suggestionsWidth = Math.max(20, Math.floor(terminalWidth * 1.0));
|
|
35
|
+
return {
|
|
36
|
+
inputWidth,
|
|
37
|
+
containerWidth,
|
|
38
|
+
suggestionsWidth,
|
|
39
|
+
frameOverhead: FRAME_OVERHEAD,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, config, slashCommands, commandContext, placeholder = ' Type your message or @path/to/file', focus = true, inputWidth, suggestionsWidth, shellModeActive, setShellModeActive, approvalMode, onEscapePromptChange, vimHandleInput, isEmbeddedShellFocused, }) => {
|
|
43
|
+
const isShellFocused = useShellFocusState();
|
|
20
44
|
const [justNavigatedHistory, setJustNavigatedHistory] = useState(false);
|
|
21
45
|
const [escPressCount, setEscPressCount] = useState(0);
|
|
22
46
|
const [showEscapePrompt, setShowEscapePrompt] = useState(false);
|
|
23
47
|
const escapeTimerRef = useRef(null);
|
|
48
|
+
const [recentPasteTime, setRecentPasteTime] = useState(null);
|
|
49
|
+
const pasteTimeoutRef = useRef(null);
|
|
24
50
|
const [dirs, setDirs] = useState(config.getWorkspaceContext().getDirectories());
|
|
25
51
|
const dirsChanged = config.getWorkspaceContext().getDirectories();
|
|
26
52
|
useEffect(() => {
|
|
@@ -29,16 +55,21 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
29
55
|
}
|
|
30
56
|
}, [dirs.length, dirsChanged]);
|
|
31
57
|
const [reverseSearchActive, setReverseSearchActive] = useState(false);
|
|
58
|
+
const [commandSearchActive, setCommandSearchActive] = useState(false);
|
|
32
59
|
const [textBeforeReverseSearch, setTextBeforeReverseSearch] = useState('');
|
|
33
60
|
const [cursorPosition, setCursorPosition] = useState([
|
|
34
61
|
0, 0,
|
|
35
62
|
]);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
63
|
+
const [expandedSuggestionIndex, setExpandedSuggestionIndex] = useState(-1);
|
|
64
|
+
const shellHistory = useShellHistory(config.getProjectRoot());
|
|
65
|
+
const shellHistoryData = shellHistory.history;
|
|
38
66
|
const completion = useCommandCompletion(buffer, dirs, config.getTargetDir(), slashCommands, commandContext, reverseSearchActive, config);
|
|
39
|
-
const reverseSearchCompletion = useReverseSearchCompletion(buffer,
|
|
67
|
+
const reverseSearchCompletion = useReverseSearchCompletion(buffer, shellHistoryData, reverseSearchActive);
|
|
68
|
+
const commandSearchCompletion = useReverseSearchCompletion(buffer, userMessages, commandSearchActive);
|
|
40
69
|
const resetCompletionState = completion.resetCompletionState;
|
|
41
70
|
const resetReverseSearchCompletionState = reverseSearchCompletion.resetCompletionState;
|
|
71
|
+
const resetCommandSearchCompletionState = commandSearchCompletion.resetCompletionState;
|
|
72
|
+
const showCursor = focus && isShellFocused && !isEmbeddedShellFocused;
|
|
42
73
|
const resetEscapeState = useCallback(() => {
|
|
43
74
|
if (escapeTimerRef.current) {
|
|
44
75
|
clearTimeout(escapeTimerRef.current);
|
|
@@ -58,6 +89,9 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
58
89
|
if (escapeTimerRef.current) {
|
|
59
90
|
clearTimeout(escapeTimerRef.current);
|
|
60
91
|
}
|
|
92
|
+
if (pasteTimeoutRef.current) {
|
|
93
|
+
clearTimeout(pasteTimeoutRef.current);
|
|
94
|
+
}
|
|
61
95
|
}, []);
|
|
62
96
|
const handleSubmitAndClear = useCallback((submittedValue) => {
|
|
63
97
|
if (shellModeActive) {
|
|
@@ -94,6 +128,8 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
94
128
|
if (justNavigatedHistory) {
|
|
95
129
|
resetCompletionState();
|
|
96
130
|
resetReverseSearchCompletionState();
|
|
131
|
+
resetCommandSearchCompletionState();
|
|
132
|
+
setExpandedSuggestionIndex(-1);
|
|
97
133
|
setJustNavigatedHistory(false);
|
|
98
134
|
}
|
|
99
135
|
}, [
|
|
@@ -102,6 +138,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
102
138
|
resetCompletionState,
|
|
103
139
|
setJustNavigatedHistory,
|
|
104
140
|
resetReverseSearchCompletionState,
|
|
141
|
+
resetCommandSearchCompletionState,
|
|
105
142
|
]);
|
|
106
143
|
// Handle clipboard image pasting with Ctrl+V
|
|
107
144
|
const handleClipboardImage = useCallback(async () => {
|
|
@@ -145,11 +182,25 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
145
182
|
}
|
|
146
183
|
}, [buffer, config]);
|
|
147
184
|
const handleInput = useCallback((key) => {
|
|
185
|
+
// TODO(jacobr): this special case is likely not needed anymore.
|
|
186
|
+
// We should probably stop supporting paste if the InputPrompt is not
|
|
187
|
+
// focused.
|
|
148
188
|
/// We want to handle paste even when not focused to support drag and drop.
|
|
149
189
|
if (!focus && !key.paste) {
|
|
150
190
|
return;
|
|
151
191
|
}
|
|
152
192
|
if (key.paste) {
|
|
193
|
+
// Record paste time to prevent accidental auto-submission
|
|
194
|
+
setRecentPasteTime(Date.now());
|
|
195
|
+
// Clear any existing paste timeout
|
|
196
|
+
if (pasteTimeoutRef.current) {
|
|
197
|
+
clearTimeout(pasteTimeoutRef.current);
|
|
198
|
+
}
|
|
199
|
+
// Clear the paste protection after a safe delay
|
|
200
|
+
pasteTimeoutRef.current = setTimeout(() => {
|
|
201
|
+
setRecentPasteTime(null);
|
|
202
|
+
pasteTimeoutRef.current = null;
|
|
203
|
+
}, 500);
|
|
153
204
|
// Ensure we never accidentally interpret paste as regular input.
|
|
154
205
|
buffer.handleInput(key);
|
|
155
206
|
return;
|
|
@@ -171,12 +222,20 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
171
222
|
return;
|
|
172
223
|
}
|
|
173
224
|
if (keyMatchers[Command.ESCAPE](key)) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
225
|
+
const cancelSearch = (setActive, resetCompletion) => {
|
|
226
|
+
setActive(false);
|
|
227
|
+
resetCompletion();
|
|
177
228
|
buffer.setText(textBeforeReverseSearch);
|
|
178
229
|
const offset = logicalPosToOffset(buffer.lines, cursorPosition[0], cursorPosition[1]);
|
|
179
230
|
buffer.moveToOffset(offset);
|
|
231
|
+
setExpandedSuggestionIndex(-1);
|
|
232
|
+
};
|
|
233
|
+
if (reverseSearchActive) {
|
|
234
|
+
cancelSearch(setReverseSearchActive, reverseSearchCompletion.resetCompletionState);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (commandSearchActive) {
|
|
238
|
+
cancelSearch(setCommandSearchActive, commandSearchCompletion.resetCompletionState);
|
|
180
239
|
return;
|
|
181
240
|
}
|
|
182
241
|
if (shellModeActive) {
|
|
@@ -186,6 +245,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
186
245
|
}
|
|
187
246
|
if (completion.showSuggestions) {
|
|
188
247
|
completion.resetCompletionState();
|
|
248
|
+
setExpandedSuggestionIndex(-1);
|
|
189
249
|
resetEscapeState();
|
|
190
250
|
return;
|
|
191
251
|
}
|
|
@@ -221,8 +281,16 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
221
281
|
onClearScreen();
|
|
222
282
|
return;
|
|
223
283
|
}
|
|
224
|
-
if (reverseSearchActive) {
|
|
225
|
-
const
|
|
284
|
+
if (reverseSearchActive || commandSearchActive) {
|
|
285
|
+
const isCommandSearch = commandSearchActive;
|
|
286
|
+
const sc = isCommandSearch
|
|
287
|
+
? commandSearchCompletion
|
|
288
|
+
: reverseSearchCompletion;
|
|
289
|
+
const { activeSuggestionIndex, navigateUp, navigateDown, showSuggestions, suggestions, } = sc;
|
|
290
|
+
const setActive = isCommandSearch
|
|
291
|
+
? setCommandSearchActive
|
|
292
|
+
: setReverseSearchActive;
|
|
293
|
+
const resetState = sc.resetCompletionState;
|
|
226
294
|
if (showSuggestions) {
|
|
227
295
|
if (keyMatchers[Command.NAVIGATION_UP](key)) {
|
|
228
296
|
navigateUp();
|
|
@@ -232,10 +300,22 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
232
300
|
navigateDown();
|
|
233
301
|
return;
|
|
234
302
|
}
|
|
303
|
+
if (keyMatchers[Command.COLLAPSE_SUGGESTION](key)) {
|
|
304
|
+
if (suggestions[activeSuggestionIndex].value.length >= MAX_WIDTH) {
|
|
305
|
+
setExpandedSuggestionIndex(-1);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (keyMatchers[Command.EXPAND_SUGGESTION](key)) {
|
|
310
|
+
if (suggestions[activeSuggestionIndex].value.length >= MAX_WIDTH) {
|
|
311
|
+
setExpandedSuggestionIndex(activeSuggestionIndex);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
235
315
|
if (keyMatchers[Command.ACCEPT_SUGGESTION_REVERSE_SEARCH](key)) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
316
|
+
sc.handleAutocomplete(activeSuggestionIndex);
|
|
317
|
+
resetState();
|
|
318
|
+
setActive(false);
|
|
239
319
|
return;
|
|
240
320
|
}
|
|
241
321
|
}
|
|
@@ -244,8 +324,8 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
244
324
|
? suggestions[activeSuggestionIndex].value
|
|
245
325
|
: buffer.text;
|
|
246
326
|
handleSubmitAndClear(textToSubmit);
|
|
247
|
-
|
|
248
|
-
|
|
327
|
+
resetState();
|
|
328
|
+
setActive(false);
|
|
249
329
|
return;
|
|
250
330
|
}
|
|
251
331
|
// Prevent up/down from falling through to regular history navigation
|
|
@@ -263,10 +343,12 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
263
343
|
if (completion.suggestions.length > 1) {
|
|
264
344
|
if (keyMatchers[Command.COMPLETION_UP](key)) {
|
|
265
345
|
completion.navigateUp();
|
|
346
|
+
setExpandedSuggestionIndex(-1); // Reset expansion when navigating
|
|
266
347
|
return;
|
|
267
348
|
}
|
|
268
349
|
if (keyMatchers[Command.COMPLETION_DOWN](key)) {
|
|
269
350
|
completion.navigateDown();
|
|
351
|
+
setExpandedSuggestionIndex(-1); // Reset expansion when navigating
|
|
270
352
|
return;
|
|
271
353
|
}
|
|
272
354
|
}
|
|
@@ -277,6 +359,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
277
359
|
: completion.activeSuggestionIndex;
|
|
278
360
|
if (targetIndex < completion.suggestions.length) {
|
|
279
361
|
completion.handleAutocomplete(targetIndex);
|
|
362
|
+
setExpandedSuggestionIndex(-1); // Reset expansion after selection
|
|
280
363
|
}
|
|
281
364
|
}
|
|
282
365
|
return;
|
|
@@ -290,6 +373,12 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
290
373
|
return;
|
|
291
374
|
}
|
|
292
375
|
if (!shellModeActive) {
|
|
376
|
+
if (keyMatchers[Command.REVERSE_SEARCH](key)) {
|
|
377
|
+
setCommandSearchActive(true);
|
|
378
|
+
setTextBeforeReverseSearch(buffer.text);
|
|
379
|
+
setCursorPosition(buffer.cursor);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
293
382
|
if (keyMatchers[Command.HISTORY_UP](key)) {
|
|
294
383
|
inputHistory.navigateUp();
|
|
295
384
|
return;
|
|
@@ -329,6 +418,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
329
418
|
}
|
|
330
419
|
if (keyMatchers[Command.SUBMIT](key)) {
|
|
331
420
|
if (buffer.text.trim()) {
|
|
421
|
+
// Check if a paste operation occurred recently to prevent accidental auto-submission
|
|
422
|
+
if (recentPasteTime !== null) {
|
|
423
|
+
// Paste occurred recently, ignore this submit to prevent auto-execution
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
332
426
|
const [row, col] = buffer.cursor;
|
|
333
427
|
const line = buffer.lines[row];
|
|
334
428
|
const charBefore = col > 0 ? cpSlice(line, col - 1, col) : '';
|
|
@@ -373,6 +467,10 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
373
467
|
buffer.killLineLeft();
|
|
374
468
|
return;
|
|
375
469
|
}
|
|
470
|
+
if (keyMatchers[Command.DELETE_WORD_BACKWARD](key)) {
|
|
471
|
+
buffer.deleteWordLeft();
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
376
474
|
// External editor
|
|
377
475
|
if (keyMatchers[Command.OPEN_EXTERNAL_EDITOR](key)) {
|
|
378
476
|
buffer.openInExternalEditor();
|
|
@@ -392,6 +490,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
392
490
|
!key.ctrl &&
|
|
393
491
|
!key.meta) {
|
|
394
492
|
completion.promptCompletion.clear();
|
|
493
|
+
setExpandedSuggestionIndex(-1);
|
|
395
494
|
}
|
|
396
495
|
}, [
|
|
397
496
|
focus,
|
|
@@ -413,10 +512,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
413
512
|
reverseSearchActive,
|
|
414
513
|
textBeforeReverseSearch,
|
|
415
514
|
cursorPosition,
|
|
515
|
+
recentPasteTime,
|
|
516
|
+
commandSearchActive,
|
|
517
|
+
commandSearchCompletion,
|
|
416
518
|
]);
|
|
417
|
-
useKeypress(handleInput, {
|
|
418
|
-
isActive: true,
|
|
419
|
-
});
|
|
519
|
+
useKeypress(handleInput, { isActive: !isEmbeddedShellFocused });
|
|
420
520
|
const linesToRender = buffer.viewportVisualLines;
|
|
421
521
|
const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = buffer.visualCursor;
|
|
422
522
|
const scrollVisualRow = buffer.visualScrollRow;
|
|
@@ -517,46 +617,93 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
|
|
|
517
617
|
inputWidth,
|
|
518
618
|
]);
|
|
519
619
|
const { inlineGhost, additionalLines } = getGhostTextLines();
|
|
520
|
-
|
|
620
|
+
const getActiveCompletion = () => {
|
|
621
|
+
if (commandSearchActive)
|
|
622
|
+
return commandSearchCompletion;
|
|
623
|
+
if (reverseSearchActive)
|
|
624
|
+
return reverseSearchCompletion;
|
|
625
|
+
return completion;
|
|
626
|
+
};
|
|
627
|
+
const activeCompletion = getActiveCompletion();
|
|
628
|
+
const shouldShowSuggestions = activeCompletion.showSuggestions;
|
|
629
|
+
const showAutoAcceptStyling = !shellModeActive && approvalMode === ApprovalMode.AUTO_EDIT;
|
|
630
|
+
const showYoloStyling = !shellModeActive && approvalMode === ApprovalMode.YOLO;
|
|
631
|
+
let statusColor;
|
|
632
|
+
let statusText = '';
|
|
633
|
+
if (shellModeActive) {
|
|
634
|
+
statusColor = theme.ui.symbol;
|
|
635
|
+
statusText = 'Shell mode';
|
|
636
|
+
}
|
|
637
|
+
else if (showYoloStyling) {
|
|
638
|
+
statusColor = theme.status.error;
|
|
639
|
+
statusText = 'YOLO mode';
|
|
640
|
+
}
|
|
641
|
+
else if (showAutoAcceptStyling) {
|
|
642
|
+
statusColor = theme.status.warning;
|
|
643
|
+
statusText = 'Accepting edits';
|
|
644
|
+
}
|
|
645
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { borderStyle: "round", borderColor: isShellFocused && !isEmbeddedShellFocused
|
|
646
|
+
? (statusColor ?? theme.border.focused)
|
|
647
|
+
: theme.border.default, paddingX: 1, children: [_jsxs(Text, { color: statusColor ?? theme.text.accent, "aria-label": statusText || undefined, children: [shellModeActive ? (reverseSearchActive ? (_jsxs(Text, { color: theme.text.link, "aria-label": SCREEN_READER_USER_PREFIX, children: ["(r:)", ' '] })) : ('!')) : commandSearchActive ? (_jsx(Text, { color: theme.text.accent, children: "(r:) " })) : showYoloStyling ? ('*') : ('>'), ' '] }), _jsx(Box, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? (showCursor ? (_jsxs(Text, { children: [chalk.inverse(placeholder.slice(0, 1)), _jsx(Text, { color: theme.text.secondary, children: placeholder.slice(1) })] })) : (_jsx(Text, { color: theme.text.secondary, children: placeholder }))) : (linesToRender
|
|
521
648
|
.map((lineText, visualIdxInRenderedSet) => {
|
|
649
|
+
const absoluteVisualIdx = scrollVisualRow + visualIdxInRenderedSet;
|
|
650
|
+
const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
|
|
522
651
|
const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
|
|
523
|
-
let display = cpSlice(lineText, 0, inputWidth);
|
|
524
652
|
const isOnCursorLine = focus && visualIdxInRenderedSet === cursorVisualRow;
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
653
|
+
const renderedLine = [];
|
|
654
|
+
const [logicalLineIdx, logicalStartCol] = mapEntry;
|
|
655
|
+
const logicalLine = buffer.lines[logicalLineIdx] || '';
|
|
656
|
+
const tokens = parseInputForHighlighting(logicalLine, logicalLineIdx);
|
|
657
|
+
const visualStart = logicalStartCol;
|
|
658
|
+
const visualEnd = logicalStartCol + cpLen(lineText);
|
|
659
|
+
const segments = buildSegmentsForVisualSlice(tokens, visualStart, visualEnd);
|
|
660
|
+
let charCount = 0;
|
|
661
|
+
segments.forEach((seg, segIdx) => {
|
|
662
|
+
const segLen = cpLen(seg.text);
|
|
663
|
+
let display = seg.text;
|
|
664
|
+
if (isOnCursorLine) {
|
|
665
|
+
const relativeVisualColForHighlight = cursorVisualColAbsolute;
|
|
666
|
+
const segStart = charCount;
|
|
667
|
+
const segEnd = segStart + segLen;
|
|
668
|
+
if (relativeVisualColForHighlight >= segStart &&
|
|
669
|
+
relativeVisualColForHighlight < segEnd) {
|
|
670
|
+
const charToHighlight = cpSlice(seg.text, relativeVisualColForHighlight - segStart, relativeVisualColForHighlight - segStart + 1);
|
|
671
|
+
const highlighted = showCursor
|
|
672
|
+
? chalk.inverse(charToHighlight)
|
|
673
|
+
: charToHighlight;
|
|
533
674
|
display =
|
|
534
|
-
cpSlice(
|
|
675
|
+
cpSlice(seg.text, 0, relativeVisualColForHighlight - segStart) +
|
|
535
676
|
highlighted +
|
|
536
|
-
cpSlice(
|
|
537
|
-
}
|
|
538
|
-
else if (relativeVisualColForHighlight === cpLen(display)) {
|
|
539
|
-
if (!currentLineGhost) {
|
|
540
|
-
display = display + chalk.inverse(' ');
|
|
541
|
-
}
|
|
677
|
+
cpSlice(seg.text, relativeVisualColForHighlight - segStart + 1);
|
|
542
678
|
}
|
|
679
|
+
charCount = segEnd;
|
|
680
|
+
}
|
|
681
|
+
const color = seg.type === 'command' || seg.type === 'file'
|
|
682
|
+
? theme.text.accent
|
|
683
|
+
: theme.text.primary;
|
|
684
|
+
renderedLine.push(_jsx(Text, { color: color, children: display }, `token-${segIdx}`));
|
|
685
|
+
});
|
|
686
|
+
const currentLineGhost = isOnCursorLine ? inlineGhost : '';
|
|
687
|
+
if (isOnCursorLine &&
|
|
688
|
+
cursorVisualColAbsolute === cpLen(lineText)) {
|
|
689
|
+
if (!currentLineGhost) {
|
|
690
|
+
renderedLine.push(_jsx(Text, { children: showCursor ? chalk.inverse(' ') : ' ' }, `cursor-end-${cursorVisualColAbsolute}`));
|
|
543
691
|
}
|
|
544
692
|
}
|
|
545
693
|
const showCursorBeforeGhost = focus &&
|
|
546
|
-
|
|
547
|
-
cursorVisualColAbsolute ===
|
|
548
|
-
// eslint-disable-next-line no-control-regex
|
|
549
|
-
cpLen(display.replace(/\x1b\[[0-9;]*m/g, '')) &&
|
|
694
|
+
isOnCursorLine &&
|
|
695
|
+
cursorVisualColAbsolute === cpLen(lineText) &&
|
|
550
696
|
currentLineGhost;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
const totalContentWidth = actualDisplayWidth + cursorWidth + ghostWidth;
|
|
554
|
-
const trailingPadding = Math.max(0, inputWidth - totalContentWidth);
|
|
555
|
-
return (_jsxs(Text, { children: [display, showCursorBeforeGhost && chalk.inverse(' '), currentLineGhost && (_jsx(Text, { color: theme.text.secondary, children: currentLineGhost })), trailingPadding > 0 && ' '.repeat(trailingPadding)] }, `line-${visualIdxInRenderedSet}`));
|
|
697
|
+
return (_jsx(Box, { height: 1, children: _jsxs(Text, { children: [renderedLine, showCursorBeforeGhost &&
|
|
698
|
+
(showCursor ? chalk.inverse(' ') : ' '), currentLineGhost && (_jsx(Text, { color: theme.text.secondary, children: currentLineGhost }))] }) }, `line-${visualIdxInRenderedSet}`));
|
|
556
699
|
})
|
|
557
700
|
.concat(additionalLines.map((ghostLine, index) => {
|
|
558
701
|
const padding = Math.max(0, inputWidth - stringWidth(ghostLine));
|
|
559
702
|
return (_jsxs(Text, { color: theme.text.secondary, children: [ghostLine, ' '.repeat(padding)] }, `ghost-line-${index}`));
|
|
560
|
-
}))) })] }),
|
|
703
|
+
}))) })] }), shouldShowSuggestions && (_jsx(Box, { paddingRight: 2, children: _jsx(SuggestionsDisplay, { suggestions: activeCompletion.suggestions, activeIndex: activeCompletion.activeSuggestionIndex, isLoading: activeCompletion.isLoadingSuggestions, width: suggestionsWidth, scrollOffset: activeCompletion.visibleStartIndex, userInput: buffer.text, mode: buffer.text.startsWith('/') &&
|
|
704
|
+
!reverseSearchActive &&
|
|
705
|
+
!commandSearchActive
|
|
706
|
+
? 'slash'
|
|
707
|
+
: 'reverse', expandedIndex: expandedSuggestionIndex }) }))] }));
|
|
561
708
|
};
|
|
562
709
|
//# sourceMappingURL=InputPrompt.js.map
|