@rdmind/rdmind 0.0.15-alpha.0 → 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.d.ts +1 -0
- package/dist/src/ui/commands/directoryCommand.js +156 -4
- 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 +7 -8
- 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
package/dist/src/ui/App.js
CHANGED
|
@@ -1,845 +1,37 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2025 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { Box, measureElement, Static, Text, useStdin, useStdout, } from 'ink';
|
|
9
|
-
import { StreamingState, MessageType, ToolCallStatus, } from './types.js';
|
|
7
|
+
import { useIsScreenReaderEnabled } from 'ink';
|
|
10
8
|
import { useTerminalSize } from './hooks/useTerminalSize.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { useThemeCommand } from './hooks/useThemeCommand.js';
|
|
14
|
-
import { useAuthCommand } from './hooks/useAuthCommand.js';
|
|
15
|
-
import { useQwenAuth } from './hooks/useQwenAuth.js';
|
|
16
|
-
import { useFolderTrust } from './hooks/useFolderTrust.js';
|
|
17
|
-
import { useEditorSettings } from './hooks/useEditorSettings.js';
|
|
18
|
-
import { useQuitConfirmation } from './hooks/useQuitConfirmation.js';
|
|
19
|
-
import { useWelcomeBack } from './hooks/useWelcomeBack.js';
|
|
20
|
-
import { useDialogClose } from './hooks/useDialogClose.js';
|
|
21
|
-
import { useSlashCommandProcessor } from './hooks/slashCommandProcessor.js';
|
|
22
|
-
import { useSubagentCreateDialog } from './hooks/useSubagentCreateDialog.js';
|
|
23
|
-
import { useAgentsManagerDialog } from './hooks/useAgentsManagerDialog.js';
|
|
24
|
-
import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js';
|
|
25
|
-
import { useMessageQueue } from './hooks/useMessageQueue.js';
|
|
26
|
-
import { useConsoleMessages } from './hooks/useConsoleMessages.js';
|
|
27
|
-
import { Header } from './components/Header.js';
|
|
28
|
-
import { LoadingIndicator } from './components/LoadingIndicator.js';
|
|
29
|
-
import { AutoAcceptIndicator } from './components/AutoAcceptIndicator.js';
|
|
30
|
-
import { ShellModeIndicator } from './components/ShellModeIndicator.js';
|
|
31
|
-
import { InputPrompt } from './components/InputPrompt.js';
|
|
32
|
-
import { Footer } from './components/Footer.js';
|
|
33
|
-
import { ThemeDialog } from './components/ThemeDialog.js';
|
|
34
|
-
import { AuthDialog } from './components/AuthDialog.js';
|
|
35
|
-
import { AuthInProgress } from './components/AuthInProgress.js';
|
|
36
|
-
import { QwenOAuthProgress } from './components/QwenOAuthProgress.js';
|
|
37
|
-
import { EditorSettingsDialog } from './components/EditorSettingsDialog.js';
|
|
38
|
-
import { FolderTrustDialog } from './components/FolderTrustDialog.js';
|
|
39
|
-
import { ShellConfirmationDialog } from './components/ShellConfirmationDialog.js';
|
|
40
|
-
import { QuitConfirmationDialog } from './components/QuitConfirmationDialog.js';
|
|
41
|
-
import { RadioButtonSelect } from './components/shared/RadioButtonSelect.js';
|
|
42
|
-
import { ModelSelectionDialog } from './components/ModelSelectionDialog.js';
|
|
43
|
-
import { ModelSwitchDialog, } from './components/ModelSwitchDialog.js';
|
|
44
|
-
import { getOpenAIAvailableModelFromEnv, getFilteredQwenModels, } from './models/availableModels.js';
|
|
45
|
-
import { processVisionSwitchOutcome } from './hooks/useVisionAutoSwitch.js';
|
|
46
|
-
import { AgentCreationWizard, AgentsManagerDialog, } from './components/subagents/index.js';
|
|
47
|
-
import { Colors } from './colors.js';
|
|
48
|
-
import { loadHierarchicalGeminiMemory } from '../config/config.js';
|
|
49
|
-
import { SettingScope } from '../config/settings.js';
|
|
50
|
-
import { Tips } from './components/Tips.js';
|
|
51
|
-
import { ConsolePatcher } from './utils/ConsolePatcher.js';
|
|
52
|
-
import { registerCleanup } from '../utils/cleanup.js';
|
|
53
|
-
import { DetailedMessagesDisplay } from './components/DetailedMessagesDisplay.js';
|
|
54
|
-
import { HistoryItemDisplay } from './components/HistoryItemDisplay.js';
|
|
55
|
-
import { ContextSummaryDisplay } from './components/ContextSummaryDisplay.js';
|
|
56
|
-
import { useHistory } from './hooks/useHistoryManager.js';
|
|
57
|
-
import process from 'node:process';
|
|
58
|
-
import { ApprovalMode, getAllGeminiMdFilenames, isEditorAvailable, getErrorMessage, AuthType, logFlashFallback, FlashFallbackEvent, ideContext, isProQuotaExceededError, isGenericQuotaExceededError, UserTierId, } from '@rdmind/rdmind-core';
|
|
59
|
-
import { IdeIntegrationNudge } from './IdeIntegrationNudge.js';
|
|
60
|
-
import { validateAuthMethod } from '../config/auth.js';
|
|
61
|
-
import { useLogger } from './hooks/useLogger.js';
|
|
9
|
+
import { lerp } from '../utils/math.js';
|
|
10
|
+
import { useUIState } from './contexts/UIStateContext.js';
|
|
62
11
|
import { StreamingContext } from './contexts/StreamingContext.js';
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
import { OverflowProvider } from './contexts/OverflowContext.js';
|
|
78
|
-
import { ShowMoreLines } from './components/ShowMoreLines.js';
|
|
79
|
-
import { useSettingsCommand } from './hooks/useSettingsCommand.js';
|
|
80
|
-
import { SettingsDialog } from './components/SettingsDialog.js';
|
|
81
|
-
import { setUpdateHandler } from '../utils/handleAutoUpdate.js';
|
|
82
|
-
import { appEvents, AppEvent } from '../utils/events.js';
|
|
83
|
-
import { isNarrowWidth } from './utils/isNarrowWidth.js';
|
|
84
|
-
import { useWorkspaceMigration } from './hooks/useWorkspaceMigration.js';
|
|
85
|
-
import { WorkspaceMigrationDialog } from './components/WorkspaceMigrationDialog.js';
|
|
86
|
-
import { WelcomeBackDialog } from './components/WelcomeBackDialog.js';
|
|
87
|
-
// Maximum number of queued messages to display in UI to prevent performance issues
|
|
88
|
-
const MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
89
|
-
function isToolExecuting(pendingHistoryItems) {
|
|
90
|
-
return pendingHistoryItems.some((item) => {
|
|
91
|
-
if (item && item.type === 'tool_group') {
|
|
92
|
-
return item.tools.some((tool) => ToolCallStatus.Executing === tool.status);
|
|
93
|
-
}
|
|
94
|
-
return false;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
export const AppWrapper = (props) => {
|
|
98
|
-
const kittyProtocolStatus = useKittyKeyboardProtocol();
|
|
99
|
-
const nodeMajorVersion = parseInt(process.versions.node.split('.')[0], 10);
|
|
100
|
-
return (_jsx(KeypressProvider, { kittyProtocolEnabled: kittyProtocolStatus.enabled, pasteWorkaround: process.platform === 'win32' || nodeMajorVersion < 20, config: props.config, debugKeystrokeLogging: props.settings.merged.general?.debugKeystrokeLogging, children: _jsx(SessionStatsProvider, { children: _jsx(VimModeProvider, { settings: props.settings, children: _jsx(App, { ...props }) }) }) }));
|
|
12
|
+
import { QuittingDisplay } from './components/QuittingDisplay.js';
|
|
13
|
+
import { ScreenReaderAppLayout } from './layouts/ScreenReaderAppLayout.js';
|
|
14
|
+
import { DefaultAppLayout } from './layouts/DefaultAppLayout.js';
|
|
15
|
+
const getContainerWidth = (terminalWidth) => {
|
|
16
|
+
if (terminalWidth <= 80) {
|
|
17
|
+
return '98%';
|
|
18
|
+
}
|
|
19
|
+
if (terminalWidth >= 132) {
|
|
20
|
+
return '90%';
|
|
21
|
+
}
|
|
22
|
+
// Linearly interpolate between 80 columns (98%) and 132 columns (90%).
|
|
23
|
+
const t = (terminalWidth - 80) / (132 - 80);
|
|
24
|
+
const percentage = lerp(98, 90, t);
|
|
25
|
+
return `${Math.round(percentage)}%`;
|
|
101
26
|
};
|
|
102
|
-
const App = (
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const [idePromptAnswered, setIdePromptAnswered] = useState(false);
|
|
110
|
-
const currentIDE = config.getIdeClient().getCurrentIde();
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
registerCleanup(() => config.getIdeClient().disconnect());
|
|
113
|
-
}, [config]);
|
|
114
|
-
const shouldShowIdePrompt = currentIDE &&
|
|
115
|
-
!config.getIdeMode() &&
|
|
116
|
-
!settings.merged.ide?.hasSeenNudge &&
|
|
117
|
-
!idePromptAnswered;
|
|
118
|
-
useEffect(() => {
|
|
119
|
-
const cleanup = setUpdateHandler(addItem, setUpdateInfo);
|
|
120
|
-
return cleanup;
|
|
121
|
-
}, [addItem]);
|
|
122
|
-
const { consoleMessages, handleNewMessage, clearConsoleMessages: clearConsoleMessagesState, } = useConsoleMessages();
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
const consolePatcher = new ConsolePatcher({
|
|
125
|
-
onNewMessage: handleNewMessage,
|
|
126
|
-
debugMode: config.getDebugMode(),
|
|
127
|
-
});
|
|
128
|
-
consolePatcher.patch();
|
|
129
|
-
registerCleanup(consolePatcher.cleanup);
|
|
130
|
-
}, [handleNewMessage, config]);
|
|
131
|
-
const { stats: sessionStats } = useSessionStats();
|
|
132
|
-
const [staticNeedsRefresh, setStaticNeedsRefresh] = useState(false);
|
|
133
|
-
const [staticKey, setStaticKey] = useState(0);
|
|
134
|
-
const refreshStatic = useCallback(() => {
|
|
135
|
-
stdout.write(ansiEscapes.clearTerminal);
|
|
136
|
-
setStaticKey((prev) => prev + 1);
|
|
137
|
-
}, [setStaticKey, stdout]);
|
|
138
|
-
const [geminiMdFileCount, setGeminiMdFileCount] = useState(0);
|
|
139
|
-
const [debugMessage, setDebugMessage] = useState('');
|
|
140
|
-
const [themeError, setThemeError] = useState(null);
|
|
141
|
-
const [authError, setAuthError] = useState(null);
|
|
142
|
-
const [editorError, setEditorError] = useState(null);
|
|
143
|
-
const [footerHeight, setFooterHeight] = useState(0);
|
|
144
|
-
const [corgiMode, setCorgiMode] = useState(false);
|
|
145
|
-
const [isTrustedFolderState, setIsTrustedFolder] = useState(config.isTrustedFolder());
|
|
146
|
-
const [currentModel, setCurrentModel] = useState(config.getModel());
|
|
147
|
-
const [shellModeActive, setShellModeActive] = useState(false);
|
|
148
|
-
const [showErrorDetails, setShowErrorDetails] = useState(false);
|
|
149
|
-
const [showToolDescriptions, setShowToolDescriptions] = useState(false);
|
|
150
|
-
const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState(false);
|
|
151
|
-
const [quittingMessages, setQuittingMessages] = useState(null);
|
|
152
|
-
const ctrlCTimerRef = useRef(null);
|
|
153
|
-
const [ctrlDPressedOnce, setCtrlDPressedOnce] = useState(false);
|
|
154
|
-
const ctrlDTimerRef = useRef(null);
|
|
155
|
-
const [constrainHeight, setConstrainHeight] = useState(true);
|
|
156
|
-
const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = useState(false);
|
|
157
|
-
const [userTier, setUserTier] = useState(undefined);
|
|
158
|
-
const [ideContextState, setIdeContextState] = useState();
|
|
159
|
-
const [showEscapePrompt, setShowEscapePrompt] = useState(false);
|
|
160
|
-
const [isProcessing, setIsProcessing] = useState(false);
|
|
161
|
-
const { showWorkspaceMigrationDialog, workspaceExtensions, onWorkspaceMigrationDialogOpen, onWorkspaceMigrationDialogClose, } = useWorkspaceMigration(settings);
|
|
162
|
-
// Model selection dialog states
|
|
163
|
-
const [isModelSelectionDialogOpen, setIsModelSelectionDialogOpen] = useState(false);
|
|
164
|
-
const [isVisionSwitchDialogOpen, setIsVisionSwitchDialogOpen] = useState(false);
|
|
165
|
-
const [visionSwitchResolver, setVisionSwitchResolver] = useState(null);
|
|
166
|
-
useEffect(() => {
|
|
167
|
-
const unsubscribe = ideContext.subscribeToIdeContext(setIdeContextState);
|
|
168
|
-
// Set the initial value
|
|
169
|
-
setIdeContextState(ideContext.getIdeContext());
|
|
170
|
-
return unsubscribe;
|
|
171
|
-
}, []);
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
const openDebugConsole = () => {
|
|
174
|
-
setShowErrorDetails(true);
|
|
175
|
-
setConstrainHeight(false); // Make sure the user sees the full message.
|
|
176
|
-
};
|
|
177
|
-
appEvents.on(AppEvent.OpenDebugConsole, openDebugConsole);
|
|
178
|
-
const logErrorHandler = (errorMessage) => {
|
|
179
|
-
handleNewMessage({
|
|
180
|
-
type: 'error',
|
|
181
|
-
content: String(errorMessage),
|
|
182
|
-
count: 1,
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
appEvents.on(AppEvent.LogError, logErrorHandler);
|
|
186
|
-
return () => {
|
|
187
|
-
appEvents.off(AppEvent.OpenDebugConsole, openDebugConsole);
|
|
188
|
-
appEvents.off(AppEvent.LogError, logErrorHandler);
|
|
189
|
-
};
|
|
190
|
-
}, [handleNewMessage]);
|
|
191
|
-
const handleEscapePromptChange = useCallback((showPrompt) => {
|
|
192
|
-
setShowEscapePrompt(showPrompt);
|
|
193
|
-
}, []);
|
|
194
|
-
const initialPromptSubmitted = useRef(false);
|
|
195
|
-
const errorCount = useMemo(() => consoleMessages
|
|
196
|
-
.filter((msg) => msg.type === 'error')
|
|
197
|
-
.reduce((total, msg) => total + msg.count, 0), [consoleMessages]);
|
|
198
|
-
const { isThemeDialogOpen, openThemeDialog, handleThemeSelect, handleThemeHighlight, } = useThemeCommand(settings, setThemeError, addItem);
|
|
199
|
-
const { isSettingsDialogOpen, openSettingsDialog, closeSettingsDialog } = useSettingsCommand();
|
|
200
|
-
const { isSubagentCreateDialogOpen, openSubagentCreateDialog, closeSubagentCreateDialog, } = useSubagentCreateDialog();
|
|
201
|
-
const { isAgentsManagerDialogOpen, openAgentsManagerDialog, closeAgentsManagerDialog, } = useAgentsManagerDialog();
|
|
202
|
-
const { isFolderTrustDialogOpen, handleFolderTrustSelect, isRestarting } = useFolderTrust(settings, setIsTrustedFolder);
|
|
203
|
-
const { showQuitConfirmation, handleQuitConfirmationSelect } = useQuitConfirmation();
|
|
204
|
-
const { isAuthDialogOpen, openAuthDialog, handleAuthSelect, isAuthenticating, cancelAuthentication, } = useAuthCommand(settings, setAuthError, config);
|
|
205
|
-
const { isQwenAuthenticating, deviceAuth, isQwenAuth, cancelQwenAuth, authStatus, authMessage, } = useQwenAuth(settings, isAuthenticating);
|
|
206
|
-
useEffect(() => {
|
|
207
|
-
if (settings.merged.security?.auth?.selectedType &&
|
|
208
|
-
!settings.merged.security?.auth?.useExternal) {
|
|
209
|
-
const error = validateAuthMethod(settings.merged.security.auth.selectedType);
|
|
210
|
-
if (error) {
|
|
211
|
-
setAuthError(error);
|
|
212
|
-
openAuthDialog();
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}, [
|
|
216
|
-
settings.merged.security?.auth?.selectedType,
|
|
217
|
-
settings.merged.security?.auth?.useExternal,
|
|
218
|
-
openAuthDialog,
|
|
219
|
-
setAuthError,
|
|
220
|
-
]);
|
|
221
|
-
// Sync user tier from config when authentication changes
|
|
222
|
-
useEffect(() => {
|
|
223
|
-
// Only sync when not currently authenticating
|
|
224
|
-
if (!isAuthenticating) {
|
|
225
|
-
setUserTier(config.getGeminiClient()?.getUserTier());
|
|
226
|
-
}
|
|
227
|
-
}, [config, isAuthenticating]);
|
|
228
|
-
// Handle Qwen OAuth timeout
|
|
229
|
-
useEffect(() => {
|
|
230
|
-
if (isQwenAuth && authStatus === 'timeout') {
|
|
231
|
-
setAuthError(authMessage ||
|
|
232
|
-
'Qwen OAuth authentication timed out. Please try again or select a different authentication method.');
|
|
233
|
-
cancelQwenAuth();
|
|
234
|
-
cancelAuthentication();
|
|
235
|
-
openAuthDialog();
|
|
236
|
-
}
|
|
237
|
-
}, [
|
|
238
|
-
isQwenAuth,
|
|
239
|
-
authStatus,
|
|
240
|
-
authMessage,
|
|
241
|
-
cancelQwenAuth,
|
|
242
|
-
cancelAuthentication,
|
|
243
|
-
openAuthDialog,
|
|
244
|
-
setAuthError,
|
|
245
|
-
]);
|
|
246
|
-
const { isEditorDialogOpen, openEditorDialog, handleEditorSelect, exitEditorDialog, } = useEditorSettings(settings, setEditorError, addItem);
|
|
247
|
-
const toggleCorgiMode = useCallback(() => {
|
|
248
|
-
setCorgiMode((prev) => !prev);
|
|
249
|
-
}, []);
|
|
250
|
-
const performMemoryRefresh = useCallback(async () => {
|
|
251
|
-
addItem({
|
|
252
|
-
type: MessageType.INFO,
|
|
253
|
-
text: 'Refreshing hierarchical memory (RDMind.md or other context files)...',
|
|
254
|
-
}, Date.now());
|
|
255
|
-
try {
|
|
256
|
-
const { memoryContent, fileCount } = await loadHierarchicalGeminiMemory(process.cwd(), settings.merged.context?.loadMemoryFromIncludeDirectories
|
|
257
|
-
? config.getWorkspaceContext().getDirectories()
|
|
258
|
-
: [], config.getDebugMode(), config.getFileService(), settings.merged, config.getExtensionContextFilePaths(), settings.merged.context?.importFormat || 'tree', // Use setting or default to 'tree'
|
|
259
|
-
config.getFileFilteringOptions());
|
|
260
|
-
config.setUserMemory(memoryContent);
|
|
261
|
-
config.setGeminiMdFileCount(fileCount);
|
|
262
|
-
setGeminiMdFileCount(fileCount);
|
|
263
|
-
addItem({
|
|
264
|
-
type: MessageType.INFO,
|
|
265
|
-
text: `Memory refreshed successfully. ${memoryContent.length > 0 ? `Loaded ${memoryContent.length} characters from ${fileCount} file(s).` : 'No memory content found.'}`,
|
|
266
|
-
}, Date.now());
|
|
267
|
-
if (config.getDebugMode()) {
|
|
268
|
-
console.log(`[DEBUG] Refreshed memory content in config: ${memoryContent.substring(0, 200)}...`);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
catch (error) {
|
|
272
|
-
const errorMessage = getErrorMessage(error);
|
|
273
|
-
addItem({
|
|
274
|
-
type: MessageType.ERROR,
|
|
275
|
-
text: `Error refreshing memory: ${errorMessage}`,
|
|
276
|
-
}, Date.now());
|
|
277
|
-
console.error('Error refreshing memory:', error);
|
|
278
|
-
}
|
|
279
|
-
}, [config, addItem, settings.merged]);
|
|
280
|
-
// Watch for model changes (e.g., from Flash fallback)
|
|
281
|
-
useEffect(() => {
|
|
282
|
-
const checkModelChange = () => {
|
|
283
|
-
const configModel = config.getModel();
|
|
284
|
-
if (configModel !== currentModel) {
|
|
285
|
-
setCurrentModel(configModel);
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
// Check immediately and then periodically
|
|
289
|
-
checkModelChange();
|
|
290
|
-
const interval = setInterval(checkModelChange, 1000); // Check every second
|
|
291
|
-
return () => clearInterval(interval);
|
|
292
|
-
}, [config, currentModel]);
|
|
293
|
-
// Set up Flash fallback handler
|
|
294
|
-
useEffect(() => {
|
|
295
|
-
const flashFallbackHandler = async (currentModel, fallbackModel, error) => {
|
|
296
|
-
let message;
|
|
297
|
-
if (config.getContentGeneratorConfig().authType ===
|
|
298
|
-
AuthType.LOGIN_WITH_GOOGLE) {
|
|
299
|
-
// Use actual user tier if available; otherwise, default to FREE tier behavior (safe default)
|
|
300
|
-
const isPaidTier = userTier === UserTierId.LEGACY || userTier === UserTierId.STANDARD;
|
|
301
|
-
// Check if this is a Pro quota exceeded error
|
|
302
|
-
if (error && isProQuotaExceededError(error)) {
|
|
303
|
-
if (isPaidTier) {
|
|
304
|
-
message = `⚡ You have reached your daily ${currentModel} quota limit.
|
|
305
|
-
⚡ Automatically switching from ${currentModel} to ${fallbackModel} for the remainder of this session.
|
|
306
|
-
⚡ To continue accessing the ${currentModel} model today, consider using /auth to switch to using a paid API key from AI Studio at https://aistudio.google.com/apikey`;
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
message = `⚡ You have reached your daily ${currentModel} quota limit.
|
|
310
|
-
⚡ Automatically switching from ${currentModel} to ${fallbackModel} for the remainder of this session.
|
|
311
|
-
⚡ To increase your limits, upgrade to a Gemini Code Assist Standard or Enterprise plan with higher limits at https://goo.gle/set-up-gemini-code-assist
|
|
312
|
-
⚡ Or you can utilize a Gemini API Key. See: https://goo.gle/gemini-cli-docs-auth#gemini-api-key
|
|
313
|
-
⚡ You can switch authentication methods by typing /auth`;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
else if (error && isGenericQuotaExceededError(error)) {
|
|
317
|
-
if (isPaidTier) {
|
|
318
|
-
message = `⚡ You have reached your daily quota limit.
|
|
319
|
-
⚡ Automatically switching from ${currentModel} to ${fallbackModel} for the remainder of this session.
|
|
320
|
-
⚡ To continue accessing the ${currentModel} model today, consider using /auth to switch to using a paid API key from AI Studio at https://aistudio.google.com/apikey`;
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
message = `⚡ You have reached your daily quota limit.
|
|
324
|
-
⚡ Automatically switching from ${currentModel} to ${fallbackModel} for the remainder of this session.
|
|
325
|
-
⚡ To increase your limits, upgrade to a Gemini Code Assist Standard or Enterprise plan with higher limits at https://goo.gle/set-up-gemini-code-assist
|
|
326
|
-
⚡ Or you can utilize a Gemini API Key. See: https://goo.gle/gemini-cli-docs-auth#gemini-api-key
|
|
327
|
-
⚡ You can switch authentication methods by typing /auth`;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
if (isPaidTier) {
|
|
332
|
-
// Default fallback message for other cases (like consecutive 429s)
|
|
333
|
-
message = `⚡ Automatically switching from ${currentModel} to ${fallbackModel} for faster responses for the remainder of this session.
|
|
334
|
-
⚡ Possible reasons for this are that you have received multiple consecutive capacity errors or you have reached your daily ${currentModel} quota limit
|
|
335
|
-
⚡ To continue accessing the ${currentModel} model today, consider using /auth to switch to using a paid API key from AI Studio at https://aistudio.google.com/apikey`;
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
// Default fallback message for other cases (like consecutive 429s)
|
|
339
|
-
message = `⚡ Automatically switching from ${currentModel} to ${fallbackModel} for faster responses for the remainder of this session.
|
|
340
|
-
⚡ Possible reasons for this are that you have received multiple consecutive capacity errors or you have reached your daily ${currentModel} quota limit
|
|
341
|
-
⚡ To increase your limits, upgrade to a Gemini Code Assist Standard or Enterprise plan with higher limits at https://goo.gle/set-up-gemini-code-assist
|
|
342
|
-
⚡ Or you can utilize a Gemini API Key. See: https://goo.gle/gemini-cli-docs-auth#gemini-api-key
|
|
343
|
-
⚡ You can switch authentication methods by typing /auth`;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
// Add message to UI history
|
|
347
|
-
addItem({
|
|
348
|
-
type: MessageType.INFO,
|
|
349
|
-
text: message,
|
|
350
|
-
}, Date.now());
|
|
351
|
-
// Set the flag to prevent tool continuation
|
|
352
|
-
setModelSwitchedFromQuotaError(true);
|
|
353
|
-
// Set global quota error flag to prevent Flash model calls
|
|
354
|
-
config.setQuotaErrorOccurred(true);
|
|
355
|
-
}
|
|
356
|
-
// Switch model for future use but return false to stop current retry
|
|
357
|
-
config.setModel(fallbackModel).catch((error) => {
|
|
358
|
-
console.error('Failed to switch to fallback model:', error);
|
|
359
|
-
});
|
|
360
|
-
config.setFallbackMode(true);
|
|
361
|
-
logFlashFallback(config, new FlashFallbackEvent(config.getContentGeneratorConfig().authType));
|
|
362
|
-
return false; // Don't continue with current prompt
|
|
363
|
-
};
|
|
364
|
-
config.setFlashFallbackHandler(flashFallbackHandler);
|
|
365
|
-
}, [config, addItem, userTier]);
|
|
366
|
-
// Terminal and UI setup
|
|
367
|
-
const { rows: terminalHeight, columns: terminalWidth } = useTerminalSize();
|
|
368
|
-
const isNarrow = isNarrowWidth(terminalWidth);
|
|
369
|
-
const { stdin, setRawMode } = useStdin();
|
|
370
|
-
const isInitialMount = useRef(true);
|
|
371
|
-
const widthFraction = 0.9;
|
|
372
|
-
const inputWidth = Math.max(20, Math.floor(terminalWidth * widthFraction) - 3);
|
|
373
|
-
const suggestionsWidth = Math.max(20, Math.floor(terminalWidth * 0.8));
|
|
374
|
-
// Utility callbacks
|
|
375
|
-
const isValidPath = useCallback((filePath) => {
|
|
376
|
-
try {
|
|
377
|
-
return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
|
|
378
|
-
}
|
|
379
|
-
catch (_e) {
|
|
380
|
-
return false;
|
|
381
|
-
}
|
|
382
|
-
}, []);
|
|
383
|
-
const getPreferredEditor = useCallback(() => {
|
|
384
|
-
const editorType = settings.merged.general?.preferredEditor;
|
|
385
|
-
const isValidEditor = isEditorAvailable(editorType);
|
|
386
|
-
if (!isValidEditor) {
|
|
387
|
-
openEditorDialog();
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
return editorType;
|
|
391
|
-
}, [settings, openEditorDialog]);
|
|
392
|
-
const onAuthError = useCallback(() => {
|
|
393
|
-
setAuthError('reauth required');
|
|
394
|
-
openAuthDialog();
|
|
395
|
-
}, [openAuthDialog, setAuthError]);
|
|
396
|
-
// Vision switch handler for auto-switch functionality
|
|
397
|
-
const handleVisionSwitchRequired = useCallback(async (_query) => new Promise((resolve, reject) => {
|
|
398
|
-
setVisionSwitchResolver({ resolve, reject });
|
|
399
|
-
setIsVisionSwitchDialogOpen(true);
|
|
400
|
-
}), []);
|
|
401
|
-
const handleVisionSwitchSelect = useCallback((outcome) => {
|
|
402
|
-
setIsVisionSwitchDialogOpen(false);
|
|
403
|
-
if (visionSwitchResolver) {
|
|
404
|
-
const result = processVisionSwitchOutcome(outcome);
|
|
405
|
-
visionSwitchResolver.resolve(result);
|
|
406
|
-
setVisionSwitchResolver(null);
|
|
407
|
-
}
|
|
408
|
-
}, [visionSwitchResolver]);
|
|
409
|
-
const handleModelSelectionOpen = useCallback(() => {
|
|
410
|
-
setIsModelSelectionDialogOpen(true);
|
|
411
|
-
}, []);
|
|
412
|
-
const handleModelSelectionClose = useCallback(() => {
|
|
413
|
-
setIsModelSelectionDialogOpen(false);
|
|
414
|
-
}, []);
|
|
415
|
-
const handleModelSelect = useCallback(async (modelId) => {
|
|
416
|
-
try {
|
|
417
|
-
await config.setModel(modelId);
|
|
418
|
-
setCurrentModel(modelId);
|
|
419
|
-
setIsModelSelectionDialogOpen(false);
|
|
420
|
-
addItem({
|
|
421
|
-
type: MessageType.INFO,
|
|
422
|
-
text: `Switched model to \`${modelId}\` for this session.`,
|
|
423
|
-
}, Date.now());
|
|
424
|
-
}
|
|
425
|
-
catch (error) {
|
|
426
|
-
console.error('Failed to switch model:', error);
|
|
427
|
-
addItem({
|
|
428
|
-
type: MessageType.ERROR,
|
|
429
|
-
text: `Failed to switch to model \`${modelId}\`. Please try again.`,
|
|
430
|
-
}, Date.now());
|
|
431
|
-
}
|
|
432
|
-
}, [config, setCurrentModel, addItem]);
|
|
433
|
-
const getAvailableModelsForCurrentAuth = useCallback(() => {
|
|
434
|
-
const contentGeneratorConfig = config.getContentGeneratorConfig();
|
|
435
|
-
if (!contentGeneratorConfig)
|
|
436
|
-
return [];
|
|
437
|
-
const visionModelPreviewEnabled = settings.merged.experimental?.visionModelPreview ?? true;
|
|
438
|
-
switch (contentGeneratorConfig.authType) {
|
|
439
|
-
case AuthType.QWEN_OAUTH:
|
|
440
|
-
return getFilteredQwenModels(visionModelPreviewEnabled);
|
|
441
|
-
case AuthType.USE_OPENAI: {
|
|
442
|
-
const openAIModel = getOpenAIAvailableModelFromEnv();
|
|
443
|
-
return openAIModel ? [openAIModel] : [];
|
|
444
|
-
}
|
|
445
|
-
default:
|
|
446
|
-
return [];
|
|
447
|
-
}
|
|
448
|
-
}, [config, settings.merged.experimental?.visionModelPreview]);
|
|
449
|
-
// Core hooks and processors
|
|
450
|
-
const { vimEnabled: vimModeEnabled, vimMode, toggleVimEnabled, } = useVimMode();
|
|
451
|
-
const { handleSlashCommand, slashCommands, pendingHistoryItems: pendingSlashCommandHistoryItems, commandContext, shellConfirmationRequest, confirmationRequest, quitConfirmationRequest, } = useSlashCommandProcessor(config, settings, addItem, clearItems, loadHistory, refreshStatic, setDebugMessage, openThemeDialog, openAuthDialog, openEditorDialog, toggleCorgiMode, setQuittingMessages, openSettingsDialog, handleModelSelectionOpen, openSubagentCreateDialog, openAgentsManagerDialog, toggleVimEnabled, setIsProcessing, setGeminiMdFileCount, showQuitConfirmation);
|
|
452
|
-
const buffer = useTextBuffer({
|
|
453
|
-
initialText: '',
|
|
454
|
-
viewport: { height: 10, width: inputWidth },
|
|
455
|
-
stdin,
|
|
456
|
-
setRawMode,
|
|
457
|
-
isValidPath,
|
|
458
|
-
shellModeActive,
|
|
459
|
-
});
|
|
460
|
-
const [userMessages, setUserMessages] = useState([]);
|
|
461
|
-
// Stable reference for cancel handler to avoid circular dependency
|
|
462
|
-
const cancelHandlerRef = useRef(() => { });
|
|
463
|
-
const { streamingState, submitQuery, initError, pendingHistoryItems: pendingGeminiHistoryItems, thought, cancelOngoingRequest, } = useGeminiStream(config.getGeminiClient(), history, addItem, config, setDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, refreshStatic, () => cancelHandlerRef.current(), settings.merged.experimental?.visionModelPreview ?? true, handleVisionSwitchRequired);
|
|
464
|
-
const pendingHistoryItems = useMemo(() => [...pendingSlashCommandHistoryItems, ...pendingGeminiHistoryItems].map((item, index) => ({
|
|
465
|
-
...item,
|
|
466
|
-
id: index,
|
|
467
|
-
})), [pendingSlashCommandHistoryItems, pendingGeminiHistoryItems]);
|
|
468
|
-
// Welcome back functionality
|
|
469
|
-
const { welcomeBackInfo, showWelcomeBackDialog, welcomeBackChoice, handleWelcomeBackSelection, handleWelcomeBackClose, } = useWelcomeBack(config, submitQuery, buffer, settings.merged);
|
|
470
|
-
// Dialog close functionality
|
|
471
|
-
const { closeAnyOpenDialog } = useDialogClose({
|
|
472
|
-
isThemeDialogOpen,
|
|
473
|
-
handleThemeSelect,
|
|
474
|
-
isAuthDialogOpen,
|
|
475
|
-
handleAuthSelect,
|
|
476
|
-
selectedAuthType: settings.merged.security?.auth?.selectedType,
|
|
477
|
-
isEditorDialogOpen,
|
|
478
|
-
exitEditorDialog,
|
|
479
|
-
isSettingsDialogOpen,
|
|
480
|
-
closeSettingsDialog,
|
|
481
|
-
isFolderTrustDialogOpen,
|
|
482
|
-
showWelcomeBackDialog,
|
|
483
|
-
handleWelcomeBackClose,
|
|
484
|
-
quitConfirmationRequest,
|
|
485
|
-
});
|
|
486
|
-
// Message queue for handling input during streaming
|
|
487
|
-
const { messageQueue, addMessage, clearQueue, getQueuedMessagesText } = useMessageQueue({
|
|
488
|
-
streamingState,
|
|
489
|
-
submitQuery,
|
|
490
|
-
});
|
|
491
|
-
// Update the cancel handler with message queue support
|
|
492
|
-
cancelHandlerRef.current = useCallback(() => {
|
|
493
|
-
if (isToolExecuting(pendingHistoryItems)) {
|
|
494
|
-
buffer.setText(''); // Just clear the prompt
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
const lastUserMessage = userMessages.at(-1);
|
|
498
|
-
let textToSet = lastUserMessage || '';
|
|
499
|
-
// Append queued messages if any exist
|
|
500
|
-
const queuedText = getQueuedMessagesText();
|
|
501
|
-
if (queuedText) {
|
|
502
|
-
textToSet = textToSet ? `${textToSet}\n\n${queuedText}` : queuedText;
|
|
503
|
-
clearQueue();
|
|
504
|
-
}
|
|
505
|
-
if (textToSet) {
|
|
506
|
-
buffer.setText(textToSet);
|
|
507
|
-
}
|
|
508
|
-
}, [
|
|
509
|
-
buffer,
|
|
510
|
-
userMessages,
|
|
511
|
-
getQueuedMessagesText,
|
|
512
|
-
clearQueue,
|
|
513
|
-
pendingHistoryItems,
|
|
514
|
-
]);
|
|
515
|
-
// Input handling - queue messages for processing
|
|
516
|
-
const handleFinalSubmit = useCallback((submittedValue) => {
|
|
517
|
-
addMessage(submittedValue);
|
|
518
|
-
}, [addMessage]);
|
|
519
|
-
const handleIdePromptComplete = useCallback((result) => {
|
|
520
|
-
if (result.userSelection === 'yes') {
|
|
521
|
-
if (result.isExtensionPreInstalled) {
|
|
522
|
-
handleSlashCommand('/ide enable');
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
handleSlashCommand('/ide install');
|
|
526
|
-
}
|
|
527
|
-
settings.setValue(SettingScope.User, 'hasSeenIdeIntegrationNudge', true);
|
|
528
|
-
}
|
|
529
|
-
else if (result.userSelection === 'dismiss') {
|
|
530
|
-
settings.setValue(SettingScope.User, 'hasSeenIdeIntegrationNudge', true);
|
|
531
|
-
}
|
|
532
|
-
setIdePromptAnswered(true);
|
|
533
|
-
}, [handleSlashCommand, settings]);
|
|
534
|
-
const { handleInput: vimHandleInput } = useVim(buffer, handleFinalSubmit);
|
|
535
|
-
const { elapsedTime, currentLoadingPhrase } = useLoadingIndicator(streamingState);
|
|
536
|
-
const showAutoAcceptIndicator = useAutoAcceptIndicator({ config, addItem });
|
|
537
|
-
const handleExit = useCallback((pressedOnce, setPressedOnce, timerRef) => {
|
|
538
|
-
// Fast double-press: Direct quit (preserve user habit)
|
|
539
|
-
if (pressedOnce) {
|
|
540
|
-
if (timerRef.current) {
|
|
541
|
-
clearTimeout(timerRef.current);
|
|
542
|
-
}
|
|
543
|
-
// Exit directly without showing confirmation dialog
|
|
544
|
-
handleSlashCommand('/quit');
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
// First press: Prioritize cleanup tasks
|
|
548
|
-
// Special case: If quit-confirm dialog is open, Ctrl+C means "quit immediately"
|
|
549
|
-
if (quitConfirmationRequest) {
|
|
550
|
-
handleSlashCommand('/quit');
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* For AuthDialog it is required to complete the authentication process,
|
|
555
|
-
* otherwise user cannot proceed to the next step.
|
|
556
|
-
* So a quit on AuthDialog should go with normal two press quit
|
|
557
|
-
* and without quit-confirm dialog.
|
|
558
|
-
*/
|
|
559
|
-
if (isAuthDialogOpen) {
|
|
560
|
-
setPressedOnce(true);
|
|
561
|
-
timerRef.current = setTimeout(() => {
|
|
562
|
-
setPressedOnce(false);
|
|
563
|
-
}, 500);
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
//1. Close other dialogs (highest priority)
|
|
567
|
-
if (closeAnyOpenDialog()) {
|
|
568
|
-
return; // Dialog closed, end processing
|
|
569
|
-
}
|
|
570
|
-
// 2. Cancel ongoing requests
|
|
571
|
-
if (streamingState === StreamingState.Responding) {
|
|
572
|
-
cancelOngoingRequest?.();
|
|
573
|
-
return; // Request cancelled, end processing
|
|
574
|
-
}
|
|
575
|
-
// 3. Clear input buffer (if has content)
|
|
576
|
-
if (buffer.text.length > 0) {
|
|
577
|
-
buffer.setText('');
|
|
578
|
-
return; // Input cleared, end processing
|
|
579
|
-
}
|
|
580
|
-
// All cleanup tasks completed, show quit confirmation dialog
|
|
581
|
-
handleSlashCommand('/quit-confirm');
|
|
582
|
-
}, [
|
|
583
|
-
isAuthDialogOpen,
|
|
584
|
-
handleSlashCommand,
|
|
585
|
-
quitConfirmationRequest,
|
|
586
|
-
closeAnyOpenDialog,
|
|
587
|
-
streamingState,
|
|
588
|
-
cancelOngoingRequest,
|
|
589
|
-
buffer,
|
|
590
|
-
]);
|
|
591
|
-
const handleGlobalKeypress = useCallback((key) => {
|
|
592
|
-
// Debug log keystrokes if enabled
|
|
593
|
-
if (settings.merged.general?.debugKeystrokeLogging) {
|
|
594
|
-
console.log('[DEBUG] Keystroke:', JSON.stringify(key));
|
|
595
|
-
}
|
|
596
|
-
let enteringConstrainHeightMode = false;
|
|
597
|
-
if (!constrainHeight) {
|
|
598
|
-
enteringConstrainHeightMode = true;
|
|
599
|
-
setConstrainHeight(true);
|
|
600
|
-
}
|
|
601
|
-
if (keyMatchers[Command.SHOW_ERROR_DETAILS](key)) {
|
|
602
|
-
setShowErrorDetails((prev) => !prev);
|
|
603
|
-
}
|
|
604
|
-
else if (keyMatchers[Command.TOGGLE_TOOL_DESCRIPTIONS](key)) {
|
|
605
|
-
const newValue = !showToolDescriptions;
|
|
606
|
-
setShowToolDescriptions(newValue);
|
|
607
|
-
const mcpServers = config.getMcpServers();
|
|
608
|
-
if (Object.keys(mcpServers || {}).length > 0) {
|
|
609
|
-
handleSlashCommand(newValue ? '/mcp desc' : '/mcp nodesc');
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
else if (keyMatchers[Command.TOGGLE_IDE_CONTEXT_DETAIL](key) &&
|
|
613
|
-
config.getIdeMode() &&
|
|
614
|
-
ideContextState) {
|
|
615
|
-
// Show IDE status when in IDE mode and context is available.
|
|
616
|
-
handleSlashCommand('/ide status');
|
|
617
|
-
}
|
|
618
|
-
else if (keyMatchers[Command.QUIT](key)) {
|
|
619
|
-
// When authenticating, let AuthInProgress component handle Ctrl+C.
|
|
620
|
-
if (isAuthenticating) {
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
handleExit(ctrlCPressedOnce, setCtrlCPressedOnce, ctrlCTimerRef);
|
|
624
|
-
}
|
|
625
|
-
else if (keyMatchers[Command.EXIT](key)) {
|
|
626
|
-
if (buffer.text.length > 0) {
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
handleExit(ctrlDPressedOnce, setCtrlDPressedOnce, ctrlDTimerRef);
|
|
630
|
-
}
|
|
631
|
-
else if (keyMatchers[Command.SHOW_MORE_LINES](key) &&
|
|
632
|
-
!enteringConstrainHeightMode) {
|
|
633
|
-
setConstrainHeight(false);
|
|
634
|
-
}
|
|
635
|
-
}, [
|
|
636
|
-
constrainHeight,
|
|
637
|
-
setConstrainHeight,
|
|
638
|
-
setShowErrorDetails,
|
|
639
|
-
showToolDescriptions,
|
|
640
|
-
setShowToolDescriptions,
|
|
641
|
-
config,
|
|
642
|
-
ideContextState,
|
|
643
|
-
handleExit,
|
|
644
|
-
ctrlCPressedOnce,
|
|
645
|
-
setCtrlCPressedOnce,
|
|
646
|
-
ctrlCTimerRef,
|
|
647
|
-
buffer.text.length,
|
|
648
|
-
ctrlDPressedOnce,
|
|
649
|
-
setCtrlDPressedOnce,
|
|
650
|
-
ctrlDTimerRef,
|
|
651
|
-
handleSlashCommand,
|
|
652
|
-
isAuthenticating,
|
|
653
|
-
settings.merged.general?.debugKeystrokeLogging,
|
|
654
|
-
]);
|
|
655
|
-
useKeypress(handleGlobalKeypress, {
|
|
656
|
-
isActive: true,
|
|
657
|
-
});
|
|
658
|
-
useEffect(() => {
|
|
659
|
-
if (config) {
|
|
660
|
-
setGeminiMdFileCount(config.getGeminiMdFileCount());
|
|
661
|
-
}
|
|
662
|
-
}, [config, config.getGeminiMdFileCount]);
|
|
663
|
-
const logger = useLogger(config.storage);
|
|
664
|
-
useEffect(() => {
|
|
665
|
-
const fetchUserMessages = async () => {
|
|
666
|
-
const pastMessagesRaw = (await logger?.getPreviousUserMessages()) || []; // Newest first
|
|
667
|
-
const currentSessionUserMessages = history
|
|
668
|
-
.filter((item) => item.type === 'user' &&
|
|
669
|
-
typeof item.text === 'string' &&
|
|
670
|
-
item.text.trim() !== '')
|
|
671
|
-
.map((item) => item.text)
|
|
672
|
-
.reverse(); // Newest first, to match pastMessagesRaw sorting
|
|
673
|
-
// Combine, with current session messages being more recent
|
|
674
|
-
const combinedMessages = [
|
|
675
|
-
...currentSessionUserMessages,
|
|
676
|
-
...pastMessagesRaw,
|
|
677
|
-
];
|
|
678
|
-
// Deduplicate consecutive identical messages from the combined list (still newest first)
|
|
679
|
-
const deduplicatedMessages = [];
|
|
680
|
-
if (combinedMessages.length > 0) {
|
|
681
|
-
deduplicatedMessages.push(combinedMessages[0]); // Add the newest one unconditionally
|
|
682
|
-
for (let i = 1; i < combinedMessages.length; i++) {
|
|
683
|
-
if (combinedMessages[i] !== combinedMessages[i - 1]) {
|
|
684
|
-
deduplicatedMessages.push(combinedMessages[i]);
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
// Reverse to oldest first for useInputHistory
|
|
689
|
-
setUserMessages(deduplicatedMessages.reverse());
|
|
690
|
-
};
|
|
691
|
-
fetchUserMessages();
|
|
692
|
-
}, [history, logger]);
|
|
693
|
-
const isInputActive = (streamingState === StreamingState.Idle ||
|
|
694
|
-
streamingState === StreamingState.Responding) &&
|
|
695
|
-
!initError &&
|
|
696
|
-
!isProcessing &&
|
|
697
|
-
!showWelcomeBackDialog;
|
|
698
|
-
const handleClearScreen = useCallback(() => {
|
|
699
|
-
clearItems();
|
|
700
|
-
clearConsoleMessagesState();
|
|
701
|
-
console.clear();
|
|
702
|
-
refreshStatic();
|
|
703
|
-
}, [clearItems, clearConsoleMessagesState, refreshStatic]);
|
|
704
|
-
const mainControlsRef = useRef(null);
|
|
705
|
-
const pendingHistoryItemRef = useRef(null);
|
|
706
|
-
useEffect(() => {
|
|
707
|
-
if (mainControlsRef.current) {
|
|
708
|
-
const fullFooterMeasurement = measureElement(mainControlsRef.current);
|
|
709
|
-
setFooterHeight(fullFooterMeasurement.height);
|
|
710
|
-
}
|
|
711
|
-
}, [terminalHeight, consoleMessages, showErrorDetails]);
|
|
712
|
-
const staticExtraHeight = /* margins and padding */ 3;
|
|
713
|
-
const availableTerminalHeight = useMemo(() => terminalHeight - footerHeight - staticExtraHeight, [terminalHeight, footerHeight]);
|
|
714
|
-
useEffect(() => {
|
|
715
|
-
// skip refreshing Static during first mount
|
|
716
|
-
if (isInitialMount.current) {
|
|
717
|
-
isInitialMount.current = false;
|
|
718
|
-
return;
|
|
719
|
-
}
|
|
720
|
-
// debounce so it doesn't fire up too often during resize
|
|
721
|
-
const handler = setTimeout(() => {
|
|
722
|
-
setStaticNeedsRefresh(false);
|
|
723
|
-
refreshStatic();
|
|
724
|
-
}, 300);
|
|
725
|
-
return () => {
|
|
726
|
-
clearTimeout(handler);
|
|
727
|
-
};
|
|
728
|
-
}, [terminalWidth, terminalHeight, refreshStatic]);
|
|
729
|
-
useEffect(() => {
|
|
730
|
-
if (streamingState === StreamingState.Idle && staticNeedsRefresh) {
|
|
731
|
-
setStaticNeedsRefresh(false);
|
|
732
|
-
refreshStatic();
|
|
733
|
-
}
|
|
734
|
-
}, [streamingState, refreshStatic, staticNeedsRefresh]);
|
|
735
|
-
const filteredConsoleMessages = useMemo(() => {
|
|
736
|
-
if (config.getDebugMode()) {
|
|
737
|
-
return consoleMessages;
|
|
738
|
-
}
|
|
739
|
-
return consoleMessages.filter((msg) => msg.type !== 'debug');
|
|
740
|
-
}, [consoleMessages, config]);
|
|
741
|
-
const branchName = useGitBranchName(config.getTargetDir());
|
|
742
|
-
const contextFileNames = useMemo(() => {
|
|
743
|
-
const fromSettings = settings.merged.context?.fileName;
|
|
744
|
-
if (fromSettings) {
|
|
745
|
-
return Array.isArray(fromSettings) ? fromSettings : [fromSettings];
|
|
746
|
-
}
|
|
747
|
-
return getAllGeminiMdFilenames();
|
|
748
|
-
}, [settings.merged.context?.fileName]);
|
|
749
|
-
const initialPrompt = useMemo(() => config.getQuestion(), [config]);
|
|
750
|
-
const geminiClient = config.getGeminiClient();
|
|
751
|
-
useEffect(() => {
|
|
752
|
-
if (initialPrompt &&
|
|
753
|
-
!initialPromptSubmitted.current &&
|
|
754
|
-
!isAuthenticating &&
|
|
755
|
-
!isAuthDialogOpen &&
|
|
756
|
-
!isThemeDialogOpen &&
|
|
757
|
-
!isEditorDialogOpen &&
|
|
758
|
-
!isModelSelectionDialogOpen &&
|
|
759
|
-
!isVisionSwitchDialogOpen &&
|
|
760
|
-
!isSubagentCreateDialogOpen &&
|
|
761
|
-
!showWelcomeBackDialog &&
|
|
762
|
-
welcomeBackChoice !== 'restart' &&
|
|
763
|
-
geminiClient?.isInitialized?.()) {
|
|
764
|
-
submitQuery(initialPrompt);
|
|
765
|
-
initialPromptSubmitted.current = true;
|
|
766
|
-
}
|
|
767
|
-
}, [
|
|
768
|
-
initialPrompt,
|
|
769
|
-
submitQuery,
|
|
770
|
-
isAuthenticating,
|
|
771
|
-
isAuthDialogOpen,
|
|
772
|
-
isThemeDialogOpen,
|
|
773
|
-
isEditorDialogOpen,
|
|
774
|
-
isSubagentCreateDialogOpen,
|
|
775
|
-
showWelcomeBackDialog,
|
|
776
|
-
welcomeBackChoice,
|
|
777
|
-
geminiClient,
|
|
778
|
-
isModelSelectionDialogOpen,
|
|
779
|
-
isVisionSwitchDialogOpen,
|
|
780
|
-
]);
|
|
781
|
-
if (quittingMessages) {
|
|
782
|
-
return (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: quittingMessages.map((item) => (_jsx(HistoryItemDisplay, { availableTerminalHeight: constrainHeight ? availableTerminalHeight : undefined, terminalWidth: terminalWidth, item: item, isPending: false, config: config }, item.id))) }));
|
|
27
|
+
export const App = () => {
|
|
28
|
+
const uiState = useUIState();
|
|
29
|
+
const isScreenReaderEnabled = useIsScreenReaderEnabled();
|
|
30
|
+
const { columns } = useTerminalSize();
|
|
31
|
+
const containerWidth = getContainerWidth(columns);
|
|
32
|
+
if (uiState.quittingMessages) {
|
|
33
|
+
return _jsx(QuittingDisplay, {});
|
|
783
34
|
}
|
|
784
|
-
|
|
785
|
-
const debugConsoleMaxHeight = Math.floor(Math.max(terminalHeight * 0.2, 5));
|
|
786
|
-
// Arbitrary threshold to ensure that items in the static area are large
|
|
787
|
-
// enough but not too large to make the terminal hard to use.
|
|
788
|
-
const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
|
|
789
|
-
const placeholder = vimModeEnabled
|
|
790
|
-
? " Press 'i' for INSERT mode and 'Esc' for NORMAL mode."
|
|
791
|
-
: ' Type your message or @path/to/file';
|
|
792
|
-
return (_jsx(StreamingContext.Provider, { value: streamingState, children: _jsxs(Box, { flexDirection: "column", width: "90%", children: [_jsx(Static, { items: [
|
|
793
|
-
_jsxs(Box, { flexDirection: "column", children: [!(settings.merged.ui?.hideBanner || config.getScreenReader()) && _jsx(Header, { version: version, nightly: nightly }), !(settings.merged.ui?.hideTips || config.getScreenReader()) && (_jsx(Tips, { config: config }))] }, "header"),
|
|
794
|
-
...history.map((h) => (_jsx(HistoryItemDisplay, { terminalWidth: mainAreaWidth, availableTerminalHeight: staticAreaMaxItemHeight, item: h, isPending: false, config: config, commands: slashCommands }, h.id))),
|
|
795
|
-
], children: (item) => item }, staticKey), _jsx(OverflowProvider, { children: _jsxs(Box, { ref: pendingHistoryItemRef, flexDirection: "column", children: [pendingHistoryItems.map((item) => (_jsx(HistoryItemDisplay, { availableTerminalHeight: constrainHeight ? availableTerminalHeight : undefined, terminalWidth: mainAreaWidth, item: item, isPending: true, config: config, isFocused: !isEditorDialogOpen }, item.id))), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) }), _jsxs(Box, { flexDirection: "column", ref: mainControlsRef, children: [updateInfo && _jsx(UpdateNotification, { message: updateInfo.message }), startupWarnings.length > 0 && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentYellow, paddingX: 1, marginY: 1, flexDirection: "column", children: startupWarnings.map((warning, index) => (_jsx(Text, { color: Colors.AccentYellow, children: warning }, index))) })), showWelcomeBackDialog && welcomeBackInfo?.hasHistory && (_jsx(WelcomeBackDialog, { welcomeBackInfo: welcomeBackInfo, onSelect: handleWelcomeBackSelection, onClose: handleWelcomeBackClose })), showWorkspaceMigrationDialog ? (_jsx(WorkspaceMigrationDialog, { workspaceExtensions: workspaceExtensions, onOpen: onWorkspaceMigrationDialogOpen, onClose: onWorkspaceMigrationDialogClose })) : shouldShowIdePrompt && currentIDE ? (_jsx(IdeIntegrationNudge, { ide: currentIDE, onComplete: handleIdePromptComplete })) : isFolderTrustDialogOpen ? (_jsx(FolderTrustDialog, { onSelect: handleFolderTrustSelect, isRestarting: isRestarting })) : quitConfirmationRequest ? (_jsx(QuitConfirmationDialog, { onSelect: (choice) => {
|
|
796
|
-
const result = handleQuitConfirmationSelect(choice);
|
|
797
|
-
if (result?.shouldQuit) {
|
|
798
|
-
quitConfirmationRequest.onConfirm(true, result.action);
|
|
799
|
-
}
|
|
800
|
-
else {
|
|
801
|
-
quitConfirmationRequest.onConfirm(false);
|
|
802
|
-
}
|
|
803
|
-
} })) : shellConfirmationRequest ? (_jsx(ShellConfirmationDialog, { request: shellConfirmationRequest })) : confirmationRequest ? (_jsxs(Box, { flexDirection: "column", children: [confirmationRequest.prompt, _jsx(Box, { paddingY: 1, children: _jsx(RadioButtonSelect, { isFocused: !!confirmationRequest, items: [
|
|
804
|
-
{ label: 'Yes', value: true },
|
|
805
|
-
{ label: 'No', value: false },
|
|
806
|
-
], onSelect: (value) => {
|
|
807
|
-
confirmationRequest.onConfirm(value);
|
|
808
|
-
} }) })] })) : isThemeDialogOpen ? (_jsxs(Box, { flexDirection: "column", children: [themeError && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: Colors.AccentRed, children: themeError }) })), _jsx(ThemeDialog, { onSelect: handleThemeSelect, onHighlight: handleThemeHighlight, settings: settings, availableTerminalHeight: constrainHeight
|
|
809
|
-
? terminalHeight - staticExtraHeight
|
|
810
|
-
: undefined, terminalWidth: mainAreaWidth })] })) : isSettingsDialogOpen ? (_jsx(Box, { flexDirection: "column", children: _jsx(SettingsDialog, { settings: settings, onSelect: () => closeSettingsDialog(), onRestartRequest: () => process.exit(0) }) })) : isSubagentCreateDialogOpen ? (_jsx(Box, { flexDirection: "column", children: _jsx(AgentCreationWizard, { onClose: closeSubagentCreateDialog, config: config }) })) : isAgentsManagerDialogOpen ? (_jsx(Box, { flexDirection: "column", children: _jsx(AgentsManagerDialog, { onClose: closeAgentsManagerDialog, config: config }) })) : isAuthenticating ? (_jsxs(_Fragment, { children: [isQwenAuth && isQwenAuthenticating ? (_jsx(QwenOAuthProgress, { deviceAuth: deviceAuth || undefined, authStatus: authStatus, authMessage: authMessage, onTimeout: () => {
|
|
811
|
-
setAuthError('Qwen OAuth authentication timed out. Please try again.');
|
|
812
|
-
cancelQwenAuth();
|
|
813
|
-
cancelAuthentication();
|
|
814
|
-
openAuthDialog();
|
|
815
|
-
}, onCancel: () => {
|
|
816
|
-
setAuthError('Qwen OAuth authentication cancelled.');
|
|
817
|
-
cancelQwenAuth();
|
|
818
|
-
cancelAuthentication();
|
|
819
|
-
openAuthDialog();
|
|
820
|
-
} })) : (_jsx(AuthInProgress, { onTimeout: () => {
|
|
821
|
-
setAuthError('Authentication timed out. Please try again.');
|
|
822
|
-
cancelAuthentication();
|
|
823
|
-
openAuthDialog();
|
|
824
|
-
} })), showErrorDetails && (_jsx(OverflowProvider, { children: _jsxs(Box, { flexDirection: "column", children: [_jsx(DetailedMessagesDisplay, { messages: filteredConsoleMessages, maxHeight: constrainHeight ? debugConsoleMaxHeight : undefined, width: inputWidth }), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) }))] })) : isAuthDialogOpen ? (_jsx(Box, { flexDirection: "column", children: _jsx(AuthDialog, { onSelect: handleAuthSelect, settings: settings, initialErrorMessage: authError }) })) : isEditorDialogOpen ? (_jsxs(Box, { flexDirection: "column", children: [editorError && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: Colors.AccentRed, children: editorError }) })), _jsx(EditorSettingsDialog, { onSelect: handleEditorSelect, settings: settings, onExit: exitEditorDialog })] })) : isModelSelectionDialogOpen ? (_jsx(ModelSelectionDialog, { availableModels: getAvailableModelsForCurrentAuth(), currentModel: currentModel, onSelect: handleModelSelect, onCancel: handleModelSelectionClose })) : isVisionSwitchDialogOpen ? (_jsx(ModelSwitchDialog, { onSelect: handleVisionSwitchSelect })) : (_jsxs(_Fragment, { children: [_jsx(LoadingIndicator, { thought: streamingState === StreamingState.WaitingForConfirmation ||
|
|
825
|
-
config.getAccessibility()?.disableLoadingPhrases ||
|
|
826
|
-
config.getScreenReader()
|
|
827
|
-
? undefined
|
|
828
|
-
: thought, currentLoadingPhrase: config.getAccessibility()?.disableLoadingPhrases ||
|
|
829
|
-
config.getScreenReader()
|
|
830
|
-
? undefined
|
|
831
|
-
: currentLoadingPhrase, elapsedTime: elapsedTime }), messageQueue.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [messageQueue
|
|
832
|
-
.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES)
|
|
833
|
-
.map((message, index) => {
|
|
834
|
-
// Ensure multi-line messages are collapsed for the preview.
|
|
835
|
-
// Replace all whitespace (including newlines) with a single space.
|
|
836
|
-
const preview = message.replace(/\s+/g, ' ');
|
|
837
|
-
return (
|
|
838
|
-
// Ensure the Box takes full width so truncation calculates correctly
|
|
839
|
-
_jsx(Box, { paddingLeft: 2, width: "100%", children: _jsx(Text, { dimColor: true, wrap: "truncate", children: preview }) }, index));
|
|
840
|
-
}), messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && (_jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { dimColor: true, children: ["... (+", messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES, "more)"] }) }))] })), _jsxs(Box, { marginTop: 1, justifyContent: "space-between", width: "100%", flexDirection: isNarrow ? 'column' : 'row', alignItems: isNarrow ? 'flex-start' : 'center', children: [_jsxs(Box, { children: [process.env['GEMINI_SYSTEM_MD'] && (_jsx(Text, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " })), ctrlCPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+C again to confirm exit." })) : ctrlDPressedOnce ? (_jsx(Text, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." })) : showEscapePrompt ? (_jsx(Text, { color: Colors.Gray, children: "Press Esc again to clear." })) : (_jsx(ContextSummaryDisplay, { ideContext: ideContextState, geminiMdFileCount: geminiMdFileCount, contextFileNames: contextFileNames, mcpServers: config.getMcpServers(), blockedMcpServers: config.getBlockedMcpServers(), showToolDescriptions: showToolDescriptions }))] }), _jsxs(Box, { paddingTop: isNarrow ? 1 : 0, children: [showAutoAcceptIndicator !== ApprovalMode.DEFAULT &&
|
|
841
|
-
!shellModeActive && (_jsx(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator })), shellModeActive && _jsx(ShellModeIndicator, {})] })] }), showErrorDetails && (_jsx(OverflowProvider, { children: _jsxs(Box, { flexDirection: "column", children: [_jsx(DetailedMessagesDisplay, { messages: filteredConsoleMessages, maxHeight: constrainHeight ? debugConsoleMaxHeight : undefined, width: inputWidth }), _jsx(ShowMoreLines, { constrainHeight: constrainHeight })] }) })), isInputActive && (_jsx(InputPrompt, { buffer: buffer, inputWidth: inputWidth, suggestionsWidth: suggestionsWidth, onSubmit: handleFinalSubmit, userMessages: userMessages, onClearScreen: handleClearScreen, config: config, slashCommands: slashCommands, commandContext: commandContext, shellModeActive: shellModeActive, setShellModeActive: setShellModeActive, onEscapePromptChange: handleEscapePromptChange, focus: isFocused, vimHandleInput: vimHandleInput, placeholder: placeholder }))] })), initError && streamingState !== StreamingState.Responding && (_jsx(Box, { borderStyle: "round", borderColor: Colors.AccentRed, paddingX: 1, marginBottom: 1, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text ? (_jsx(Text, { color: Colors.AccentRed, children: history.find((item) => item.type === 'error' && item.text?.includes(initError))?.text })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { color: Colors.AccentRed, children: ["Initialization Error: ", initError] }), _jsxs(Text, { color: Colors.AccentRed, children: [' ', "Please check API key and configuration."] })] })) })), !settings.merged.ui?.hideFooter && (_jsx(Footer, { model: currentModel, targetDir: config.getTargetDir(), debugMode: config.getDebugMode(), branchName: branchName, debugMessage: debugMessage, corgiMode: corgiMode, errorCount: errorCount, showErrorDetails: showErrorDetails, showMemoryUsage: config.getDebugMode() ||
|
|
842
|
-
settings.merged.ui?.showMemoryUsage ||
|
|
843
|
-
false, promptTokenCount: sessionStats.lastPromptTokenCount, nightly: nightly, vimMode: vimModeEnabled ? vimMode : undefined, isTrustedFolder: isTrustedFolderState }))] })] }) }));
|
|
35
|
+
return (_jsx(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? (_jsx(ScreenReaderAppLayout, {})) : (_jsx(DefaultAppLayout, { width: containerWidth })) }));
|
|
844
36
|
};
|
|
845
37
|
//# sourceMappingURL=App.js.map
|