@vybestack/llxprt-code 0.1.12
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/LICENSE +202 -0
- package/README.md +256 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +95 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +42 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +41 -0
- package/dist/src/config/config.js +345 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +21 -0
- package/dist/src/config/extension.js +109 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +75 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +88 -0
- package/dist/src/config/settings.js +263 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +420 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +6 -0
- package/dist/src/generated/git-commit.js +9 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +7 -0
- package/dist/src/nonInteractiveCli.js +131 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/providers/IMessage.d.ts +38 -0
- package/dist/src/providers/IMessage.js +17 -0
- package/dist/src/providers/IMessage.js.map +1 -0
- package/dist/src/providers/IModel.d.ts +23 -0
- package/dist/src/providers/IModel.js +17 -0
- package/dist/src/providers/IModel.js.map +1 -0
- package/dist/src/providers/IProvider.d.ts +32 -0
- package/dist/src/providers/IProvider.js +17 -0
- package/dist/src/providers/IProvider.js.map +1 -0
- package/dist/src/providers/ITool.d.ts +23 -0
- package/dist/src/providers/ITool.js +17 -0
- package/dist/src/providers/ITool.js.map +1 -0
- package/dist/src/providers/ProviderAwareContentGenerator.d.ts +6 -0
- package/dist/src/providers/ProviderAwareContentGenerator.js +9 -0
- package/dist/src/providers/ProviderAwareContentGenerator.js.map +1 -0
- package/dist/src/providers/ProviderManager.d.ts +19 -0
- package/dist/src/providers/ProviderManager.js +63 -0
- package/dist/src/providers/ProviderManager.js.map +1 -0
- package/dist/src/providers/ProviderManagerAdapter.d.ts +17 -0
- package/dist/src/providers/ProviderManagerAdapter.js +113 -0
- package/dist/src/providers/ProviderManagerAdapter.js.map +1 -0
- package/dist/src/providers/README-qwen3.md +60 -0
- package/dist/src/providers/README.md +203 -0
- package/dist/src/providers/adapters/IStreamAdapter.d.ts +18 -0
- package/dist/src/providers/adapters/IStreamAdapter.js +7 -0
- package/dist/src/providers/adapters/IStreamAdapter.js.map +1 -0
- package/dist/src/providers/anthropic/AnthropicProvider.d.ts +46 -0
- package/dist/src/providers/anthropic/AnthropicProvider.js +478 -0
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -0
- package/dist/src/providers/contentGeneratorProvider.d.ts +13 -0
- package/dist/src/providers/contentGeneratorProvider.js +17 -0
- package/dist/src/providers/contentGeneratorProvider.js.map +1 -0
- package/dist/src/providers/enhanceConfigWithProviders.d.ts +12 -0
- package/dist/src/providers/enhanceConfigWithProviders.js +16 -0
- package/dist/src/providers/enhanceConfigWithProviders.js.map +1 -0
- package/dist/src/providers/gemini/GeminiProvider.d.ts +72 -0
- package/dist/src/providers/gemini/GeminiProvider.js +454 -0
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -0
- package/dist/src/providers/index.d.ts +13 -0
- package/dist/src/providers/index.js +18 -0
- package/dist/src/providers/index.js.map +1 -0
- package/dist/src/providers/integration/TEST_INSTRUCTIONS.md +197 -0
- package/dist/src/providers/openai/ConversationCache.d.ts +20 -0
- package/dist/src/providers/openai/ConversationCache.js +109 -0
- package/dist/src/providers/openai/ConversationCache.js.map +1 -0
- package/dist/src/providers/openai/IChatGenerateParams.d.ts +11 -0
- package/dist/src/providers/openai/IChatGenerateParams.js +2 -0
- package/dist/src/providers/openai/IChatGenerateParams.js.map +1 -0
- package/dist/src/providers/openai/OpenAIProvider.d.ts +71 -0
- package/dist/src/providers/openai/OpenAIProvider.js +486 -0
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -0
- package/dist/src/providers/openai/Qwen3FireworksProvider.d.ts +39 -0
- package/dist/src/providers/openai/Qwen3FireworksProvider.js +209 -0
- package/dist/src/providers/openai/Qwen3FireworksProvider.js.map +1 -0
- package/dist/src/providers/openai/RESPONSES_API_MODELS.d.ts +2 -0
- package/dist/src/providers/openai/RESPONSES_API_MODELS.js +14 -0
- package/dist/src/providers/openai/RESPONSES_API_MODELS.js.map +1 -0
- package/dist/src/providers/openai/buildResponsesRequest.d.ts +67 -0
- package/dist/src/providers/openai/buildResponsesRequest.js +144 -0
- package/dist/src/providers/openai/buildResponsesRequest.js.map +1 -0
- package/dist/src/providers/openai/docs/accessing-provider-info.md +172 -0
- package/dist/src/providers/openai/docs/params-mapping.md +91 -0
- package/dist/src/providers/openai/docs/qwen3-fireworks.md +47 -0
- package/dist/src/providers/openai/docs/responses-api-tool-calls.md +96 -0
- package/dist/src/providers/openai/estimateRemoteTokens.d.ts +26 -0
- package/dist/src/providers/openai/estimateRemoteTokens.js +75 -0
- package/dist/src/providers/openai/estimateRemoteTokens.js.map +1 -0
- package/dist/src/providers/openai/getOpenAIProviderInfo.d.ts +46 -0
- package/dist/src/providers/openai/getOpenAIProviderInfo.js +74 -0
- package/dist/src/providers/openai/getOpenAIProviderInfo.js.map +1 -0
- package/dist/src/providers/openai/parseResponsesStream.d.ts +3 -0
- package/dist/src/providers/openai/parseResponsesStream.js +444 -0
- package/dist/src/providers/openai/parseResponsesStream.js.map +1 -0
- package/dist/src/providers/parsers/TextToolCallParser.d.ts +35 -0
- package/dist/src/providers/parsers/TextToolCallParser.js +248 -0
- package/dist/src/providers/parsers/TextToolCallParser.js.map +1 -0
- package/dist/src/providers/providerConfigUtils.d.ts +26 -0
- package/dist/src/providers/providerConfigUtils.js +173 -0
- package/dist/src/providers/providerConfigUtils.js.map +1 -0
- package/dist/src/providers/providerManagerInstance.d.ts +9 -0
- package/dist/src/providers/providerManagerInstance.js +109 -0
- package/dist/src/providers/providerManagerInstance.js.map +1 -0
- package/dist/src/providers/tokenizers/AnthropicTokenizer.d.ts +19 -0
- package/dist/src/providers/tokenizers/AnthropicTokenizer.js +37 -0
- package/dist/src/providers/tokenizers/AnthropicTokenizer.js.map +1 -0
- package/dist/src/providers/tokenizers/ITokenizer.d.ts +18 -0
- package/dist/src/providers/tokenizers/ITokenizer.js +17 -0
- package/dist/src/providers/tokenizers/ITokenizer.js.map +1 -0
- package/dist/src/providers/tokenizers/OpenAITokenizer.d.ts +24 -0
- package/dist/src/providers/tokenizers/OpenAITokenizer.js +56 -0
- package/dist/src/providers/tokenizers/OpenAITokenizer.js.map +1 -0
- package/dist/src/providers/types.d.ts +14 -0
- package/dist/src/providers/types.js +16 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +13 -0
- package/dist/src/services/CommandService.js +38 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/tools/IToolFormatter.d.ts +40 -0
- package/dist/src/tools/IToolFormatter.js +17 -0
- package/dist/src/tools/IToolFormatter.js.map +1 -0
- package/dist/src/tools/ToolFormatter.d.ts +45 -0
- package/dist/src/tools/ToolFormatter.js +216 -0
- package/dist/src/tools/ToolFormatter.js.map +1 -0
- package/dist/src/ui/App.d.ts +15 -0
- package/dist/src/ui/App.js +468 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/colors.d.ts +25 -0
- package/dist/src/ui/colors.js +126 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +61 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +14 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +15 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +18 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +81 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +14 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +14 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +63 -0
- package/dist/src/ui/commands/types.js +7 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +16 -0
- package/dist/src/ui/components/AboutBox.js +6 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +7 -0
- package/dist/src/ui/components/AsciiArt.js +24 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.d.ts +15 -0
- package/dist/src/ui/components/AuthDialog.js +102 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -0
- package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/components/AuthInProgress.js +27 -0
- package/dist/src/ui/components/AuthInProgress.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +15 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +41 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/ErrorBoundary.d.ts +46 -0
- package/dist/src/ui/components/ErrorBoundary.js +115 -0
- package/dist/src/ui/components/ErrorBoundary.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +22 -0
- package/dist/src/ui/components/Footer.js +32 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +14 -0
- package/dist/src/ui/components/Header.js +20 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +10 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +17 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +25 -0
- package/dist/src/ui/components/InputPrompt.js +350 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LayoutManager.d.ts +24 -0
- package/dist/src/ui/components/LayoutManager.js +58 -0
- package/dist/src/ui/components/LayoutManager.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +20 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ProviderDialog.d.ts +9 -0
- package/dist/src/ui/components/ProviderDialog.js +54 -0
- package/dist/src/ui/components/ProviderDialog.js.map +1 -0
- package/dist/src/ui/components/ProviderModelDialog.d.ts +15 -0
- package/dist/src/ui/components/ProviderModelDialog.js +54 -0
- package/dist/src/ui/components/ProviderModelDialog.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +42 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
- package/dist/src/ui/components/ThemeDialog.js +127 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +8 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +15 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +9 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +117 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +53 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
- package/dist/src/ui/components/messages/ToolMessage.js +61 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +9 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +384 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +44 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +77 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +184 -0
- package/dist/src/ui/components/shared/text-buffer.js +1021 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/constants.d.ts +8 -0
- package/dist/src/ui/constants.js +12 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/containers/SessionController.d.ts +26 -0
- package/dist/src/ui/containers/SessionController.js +314 -0
- package/dist/src/ui/containers/SessionController.js.map +1 -0
- package/dist/src/ui/containers/UIStateShell.d.ts +6 -0
- package/dist/src/ui/containers/UIStateShell.js +4 -0
- package/dist/src/ui/containers/UIStateShell.js.map +1 -0
- package/dist/src/ui/contexts/AppDispatchContext.d.ts +12 -0
- package/dist/src/ui/contexts/AppDispatchContext.js +17 -0
- package/dist/src/ui/contexts/AppDispatchContext.js.map +1 -0
- package/dist/src/ui/contexts/OpenAIProviderContext.d.ts +29 -0
- package/dist/src/ui/contexts/OpenAIProviderContext.js +63 -0
- package/dist/src/ui/contexts/OpenAIProviderContext.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +43 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +36 -0
- package/dist/src/ui/contexts/SessionContext.js +66 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionStateContext.d.ts +15 -0
- package/dist/src/ui/contexts/SessionStateContext.js +26 -0
- package/dist/src/ui/contexts/SessionStateContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +54 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +310 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/index.d.ts +2 -0
- package/dist/src/ui/hooks/index.js +3 -0
- package/dist/src/ui/hooks/index.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +263 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +27 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +1413 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useAuthCommand.js +76 -0
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +21 -0
- package/dist/src/ui/hooks/useCompletion.js +375 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +60 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +17 -0
- package/dist/src/ui/hooks/useEditorSettings.js +48 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
- package/dist/src/ui/hooks/useGeminiStream.js +607 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +74 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +29 -0
- package/dist/src/ui/hooks/useKeypress.js +162 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +10 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/useOpenAIProviderInfo.d.ts +17 -0
- package/dist/src/ui/hooks/useOpenAIProviderInfo.js +43 -0
- package/dist/src/ui/hooks/useOpenAIProviderInfo.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +197 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
- package/dist/src/ui/hooks/usePrivacySettings.js +115 -0
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
- package/dist/src/ui/hooks/useProviderDialog.d.ts +25 -0
- package/dist/src/ui/hooks/useProviderDialog.js +61 -0
- package/dist/src/ui/hooks/useProviderDialog.js.map +1 -0
- package/dist/src/ui/hooks/useProviderModelDialog.d.ts +26 -0
- package/dist/src/ui/hooks/useProviderModelDialog.js +62 -0
- package/dist/src/ui/hooks/useProviderModelDialog.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSession.d.ts +11 -0
- package/dist/src/ui/hooks/useSession.js +19 -0
- package/dist/src/ui/hooks/useSession.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
- package/dist/src/ui/hooks/useShellHistory.js +89 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +50 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useStableCallback.d.ts +40 -0
- package/dist/src/ui/hooks/useStableCallback.js +58 -0
- package/dist/src/ui/hooks/useStableCallback.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +16 -0
- package/dist/src/ui/hooks/useThemeCommand.js +94 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +42 -0
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js +17 -0
- package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
- package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
- package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
- package/dist/src/ui/reducers/appReducer.d.ts +59 -0
- package/dist/src/ui/reducers/appReducer.js +91 -0
- package/dist/src/ui/reducers/appReducer.js.map +1 -0
- package/dist/src/ui/reducers/sessionReducer.d.ts +36 -0
- package/dist/src/ui/reducers/sessionReducer.js +30 -0
- package/dist/src/ui/reducers/sessionReducer.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +139 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +149 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +136 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +128 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +102 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +113 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +136 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +138 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +135 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/green-screen.d.ts +7 -0
- package/dist/src/ui/themes/green-screen.js +113 -0
- package/dist/src/ui/themes/green-screen.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +84 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +302 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +33 -0
- package/dist/src/ui/themes/theme-manager.js +111 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +83 -0
- package/dist/src/ui/themes/theme.js +304 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +143 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +174 -0
- package/dist/src/ui/types.js +43 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +14 -0
- package/dist/src/ui/utils/CodeColorizer.js +97 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +23 -0
- package/dist/src/ui/utils/ConsolePatcher.js +42 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +205 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
- package/dist/src/ui/utils/clipboardUtils.js +127 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +22 -0
- package/dist/src/ui/utils/commandUtils.js +25 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +55 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +17 -0
- package/dist/src/ui/utils/displayUtils.js +24 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/errorParsing.d.ts +7 -0
- package/dist/src/ui/utils/errorParsing.js +106 -0
- package/dist/src/ui/utils/errorParsing.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/renderLoopDetector.d.ts +52 -0
- package/dist/src/ui/utils/renderLoopDetector.js +146 -0
- package/dist/src/ui/utils/renderLoopDetector.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +22 -0
- package/dist/src/ui/utils/textUtils.js +58 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.js +50 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/utils/ConversationContext.d.ts +55 -0
- package/dist/src/utils/ConversationContext.js +85 -0
- package/dist/src/utils/ConversationContext.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +8 -0
- package/dist/src/utils/cleanup.js +34 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +34 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +26 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +19 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +31 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +87 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +90 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +92 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +680 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.js +48 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vybestack-llxprt-code-0.1.12.tgz +0 -0
- package/package.json +95 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Text, Box } from 'ink';
|
3
|
+
import { Colors } from '../../colors.js';
|
4
|
+
export const ErrorMessage = ({ text }) => {
|
5
|
+
const prefix = '✕ ';
|
6
|
+
const prefixWidth = prefix.length;
|
7
|
+
return (_jsxs(Box, { flexDirection: "row", marginBottom: 1, children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentRed, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.AccentRed, children: text }) })] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=ErrorMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ErrorMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ErrorMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,YAAY,EAAE,CAAC,aACtC,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,MAAM,GAAQ,GAC1C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YACtC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
interface GeminiMessageProps {
|
8
|
+
text: string;
|
9
|
+
isPending: boolean;
|
10
|
+
availableTerminalHeight?: number;
|
11
|
+
terminalWidth: number;
|
12
|
+
model?: string;
|
13
|
+
}
|
14
|
+
export declare const GeminiMessage: React.FC<GeminiMessageProps>;
|
15
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Text, Box } from 'ink';
|
3
|
+
import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
|
4
|
+
import { Colors } from '../../colors.js';
|
5
|
+
export const GeminiMessage = ({ text, isPending, availableTerminalHeight, terminalWidth, model, }) => {
|
6
|
+
const prefix = '✦ ';
|
7
|
+
const prefixWidth = prefix.length;
|
8
|
+
return (_jsxs(Box, { flexDirection: "column", children: [model && (_jsx(Box, { marginBottom: 0, children: _jsx(Text, { color: Colors.Gray, dimColor: true, children: model }) })), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentPurple, children: prefix }) }), _jsx(Box, { flexGrow: 1, flexDirection: "column", children: _jsx(MarkdownDisplay, { text: text, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }) })] })] }));
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=GeminiMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GeminiMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/GeminiMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAUzC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,aAAa,EACb,KAAK,GACN,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACxB,KAAK,IAAI,CACR,KAAC,GAAG,IAAC,YAAY,EAAE,CAAC,YAClB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,kBAC/B,KAAK,GACD,GACH,CACP,EACD,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YAAG,MAAM,GAAQ,GAC7C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YACtC,KAAC,eAAe,IACd,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,aAAa,GAC5B,GACE,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
interface GeminiMessageContentProps {
|
8
|
+
text: string;
|
9
|
+
isPending: boolean;
|
10
|
+
availableTerminalHeight?: number;
|
11
|
+
terminalWidth: number;
|
12
|
+
}
|
13
|
+
export declare const GeminiMessageContent: React.FC<GeminiMessageContentProps>;
|
14
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Box } from 'ink';
|
3
|
+
import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
|
4
|
+
/*
|
5
|
+
* Gemini message content is a semi-hacked component. The intention is to represent a partial
|
6
|
+
* of GeminiMessage and is only used when a response gets too long. In that instance messages
|
7
|
+
* are split into multiple GeminiMessageContent's to enable the root <Static> component in
|
8
|
+
* App.tsx to be as performant as humanly possible.
|
9
|
+
*/
|
10
|
+
export const GeminiMessageContent = ({ text, isPending, availableTerminalHeight, terminalWidth, }) => {
|
11
|
+
const originalPrefix = '✦ ';
|
12
|
+
const prefixWidth = originalPrefix.length;
|
13
|
+
return (_jsx(Box, { flexDirection: "column", paddingLeft: prefixWidth, children: _jsx(MarkdownDisplay, { text: text, isPending: isPending, availableTerminalHeight: availableTerminalHeight, terminalWidth: terminalWidth }) }));
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=GeminiMessageContent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"GeminiMessageContent.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/GeminiMessageContent.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AASjE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EACxE,IAAI,EACJ,SAAS,EACT,uBAAuB,EACvB,aAAa,GACd,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,IAAI,CAAC;IAC5B,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC;IAE1C,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,WAAW,YAClD,KAAC,eAAe,IACd,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,aAAa,GAC5B,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Text, Box } from 'ink';
|
3
|
+
import { Colors } from '../../colors.js';
|
4
|
+
export const InfoMessage = ({ text }) => {
|
5
|
+
const prefix = 'ℹ ';
|
6
|
+
const prefixWidth = prefix.length;
|
7
|
+
return (_jsxs(Box, { flexDirection: "row", marginTop: 1, children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.AccentYellow, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.AccentYellow, children: text }) })] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=InfoMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"InfoMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/InfoMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,SAAS,EAAE,CAAC,aACnC,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YAAG,MAAM,GAAQ,GAC7C,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,YAAY,YACzC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
import { ToolCallConfirmationDetails, Config } from '@vybestack/llxprt-code-core';
|
8
|
+
export interface ToolConfirmationMessageProps {
|
9
|
+
confirmationDetails: ToolCallConfirmationDetails;
|
10
|
+
config?: Config;
|
11
|
+
isFocused?: boolean;
|
12
|
+
availableTerminalHeight?: number;
|
13
|
+
terminalWidth: number;
|
14
|
+
}
|
15
|
+
export declare const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps>;
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* @license
|
4
|
+
* Copyright 2025 Google LLC
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
6
|
+
*/
|
7
|
+
import { useCallback } from 'react';
|
8
|
+
import { Box, Text, useInput } from 'ink';
|
9
|
+
import { DiffRenderer } from './DiffRenderer.js';
|
10
|
+
import { Colors } from '../../colors.js';
|
11
|
+
import { ToolConfirmationOutcome, } from '@vybestack/llxprt-code-core';
|
12
|
+
import { RadioButtonSelect, } from '../shared/RadioButtonSelect.js';
|
13
|
+
import { MaxSizedBox } from '../shared/MaxSizedBox.js';
|
14
|
+
export const ToolConfirmationMessage = ({ confirmationDetails, isFocused = true, availableTerminalHeight, terminalWidth, }) => {
|
15
|
+
const { onConfirm } = confirmationDetails;
|
16
|
+
const childWidth = terminalWidth - 2; // 2 for padding
|
17
|
+
useInput((_, key) => {
|
18
|
+
if (!isFocused)
|
19
|
+
return;
|
20
|
+
if (key.escape) {
|
21
|
+
onConfirm(ToolConfirmationOutcome.Cancel);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
const handleSelect = useCallback((item) => onConfirm(item), [onConfirm]);
|
25
|
+
let bodyContent = null; // Removed contextDisplay here
|
26
|
+
let question;
|
27
|
+
const options = new Array();
|
28
|
+
// Body content is now the DiffRenderer, passing filename to it
|
29
|
+
// The bordered box is removed from here and handled within DiffRenderer
|
30
|
+
function availableBodyContentHeight() {
|
31
|
+
if (options.length === 0) {
|
32
|
+
// This should not happen in practice as options are always added before this is called.
|
33
|
+
throw new Error('Options not provided for confirmation message');
|
34
|
+
}
|
35
|
+
if (availableTerminalHeight === undefined) {
|
36
|
+
return undefined;
|
37
|
+
}
|
38
|
+
// Calculate the vertical space (in lines) consumed by UI elements
|
39
|
+
// surrounding the main body content.
|
40
|
+
const PADDING_OUTER_Y = 2; // Main container has `padding={1}` (top & bottom).
|
41
|
+
const MARGIN_BODY_BOTTOM = 1; // margin on the body container.
|
42
|
+
const HEIGHT_QUESTION = 1; // The question text is one line.
|
43
|
+
const MARGIN_QUESTION_BOTTOM = 1; // Margin on the question container.
|
44
|
+
const HEIGHT_OPTIONS = options.length; // Each option in the radio select takes one line.
|
45
|
+
const surroundingElementsHeight = PADDING_OUTER_Y +
|
46
|
+
MARGIN_BODY_BOTTOM +
|
47
|
+
HEIGHT_QUESTION +
|
48
|
+
MARGIN_QUESTION_BOTTOM +
|
49
|
+
HEIGHT_OPTIONS;
|
50
|
+
return Math.max(availableTerminalHeight - surroundingElementsHeight, 1);
|
51
|
+
}
|
52
|
+
if (confirmationDetails.type === 'edit') {
|
53
|
+
if (confirmationDetails.isModifying) {
|
54
|
+
return (_jsxs(Box, { minWidth: "90%", borderStyle: "round", borderColor: Colors.Gray, justifyContent: "space-around", padding: 1, overflow: "hidden", children: [_jsx(Text, { children: "Modify in progress: " }), _jsx(Text, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })] }));
|
55
|
+
}
|
56
|
+
question = `Apply this change?`;
|
57
|
+
options.push({
|
58
|
+
label: 'Yes, allow once',
|
59
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
60
|
+
}, {
|
61
|
+
label: 'Yes, allow always',
|
62
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
63
|
+
}, {
|
64
|
+
label: 'Modify with external editor',
|
65
|
+
value: ToolConfirmationOutcome.ModifyWithEditor,
|
66
|
+
}, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
|
67
|
+
bodyContent = (_jsx(DiffRenderer, { diffContent: confirmationDetails.fileDiff, filename: confirmationDetails.fileName, availableTerminalHeight: availableBodyContentHeight(), terminalWidth: childWidth }));
|
68
|
+
}
|
69
|
+
else if (confirmationDetails.type === 'exec') {
|
70
|
+
const executionProps = confirmationDetails;
|
71
|
+
question = `Allow execution?`;
|
72
|
+
options.push({
|
73
|
+
label: 'Yes, allow once',
|
74
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
75
|
+
}, {
|
76
|
+
label: `Yes, allow always "${executionProps.rootCommand} ..."`,
|
77
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
78
|
+
}, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
|
79
|
+
let bodyContentHeight = availableBodyContentHeight();
|
80
|
+
if (bodyContentHeight !== undefined) {
|
81
|
+
bodyContentHeight -= 2; // Account for padding;
|
82
|
+
}
|
83
|
+
bodyContent = (_jsx(Box, { flexDirection: "column", children: _jsx(Box, { paddingX: 1, marginLeft: 1, children: _jsx(MaxSizedBox, { maxHeight: bodyContentHeight, maxWidth: Math.max(childWidth - 4, 1), children: _jsx(Box, { children: _jsx(Text, { color: Colors.AccentCyan, children: executionProps.command }) }) }) }) }));
|
84
|
+
}
|
85
|
+
else if (confirmationDetails.type === 'info') {
|
86
|
+
const infoProps = confirmationDetails;
|
87
|
+
const displayUrls = infoProps.urls &&
|
88
|
+
!(infoProps.urls.length === 1 && infoProps.urls[0] === infoProps.prompt);
|
89
|
+
question = `Do you want to proceed?`;
|
90
|
+
options.push({
|
91
|
+
label: 'Yes, allow once',
|
92
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
93
|
+
}, {
|
94
|
+
label: 'Yes, allow always',
|
95
|
+
value: ToolConfirmationOutcome.ProceedAlways,
|
96
|
+
}, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
|
97
|
+
bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsx(Text, { color: Colors.AccentCyan, children: infoProps.prompt }), displayUrls && infoProps.urls && infoProps.urls.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { children: "URLs to fetch:" }), infoProps.urls.map((url) => (_jsxs(Text, { children: [" - ", url] }, url)))] }))] }));
|
98
|
+
}
|
99
|
+
else {
|
100
|
+
// mcp tool confirmation
|
101
|
+
const mcpProps = confirmationDetails;
|
102
|
+
bodyContent = (_jsxs(Box, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [_jsxs(Text, { color: Colors.AccentCyan, children: ["MCP Server: ", mcpProps.serverName] }), _jsxs(Text, { color: Colors.AccentCyan, children: ["Tool: ", mcpProps.toolName] })] }));
|
103
|
+
question = `Allow execution of MCP tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"?`;
|
104
|
+
options.push({
|
105
|
+
label: 'Yes, allow once',
|
106
|
+
value: ToolConfirmationOutcome.ProceedOnce,
|
107
|
+
}, {
|
108
|
+
label: `Yes, always allow tool "${mcpProps.toolName}" from server "${mcpProps.serverName}"`,
|
109
|
+
value: ToolConfirmationOutcome.ProceedAlwaysTool, // Cast until types are updated
|
110
|
+
}, {
|
111
|
+
label: `Yes, always allow all tools from server "${mcpProps.serverName}"`,
|
112
|
+
value: ToolConfirmationOutcome.ProceedAlwaysServer,
|
113
|
+
}, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel });
|
114
|
+
}
|
115
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, width: childWidth, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }), _jsx(Box, { marginBottom: 1, flexShrink: 0, children: _jsx(Text, { wrap: "truncate", children: question }) }), _jsx(Box, { flexShrink: 0, children: _jsx(RadioButtonSelect, { items: options, onSelect: handleSelect, isFocused: isFocused }) })] }));
|
116
|
+
};
|
117
|
+
//# sourceMappingURL=ToolConfirmationMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ToolConfirmationMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolConfirmationMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;A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C,IAAI,EAAC,UAAU,YAAE,QAAQ,GAAQ,GACnC,EAGN,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YAChB,KAAC,iBAAiB,IAChB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,SAAS,GACpB,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
import { IndividualToolCallDisplay } from '../../types.js';
|
8
|
+
import { Config } from '@vybestack/llxprt-code-core';
|
9
|
+
interface ToolGroupMessageProps {
|
10
|
+
groupId: number;
|
11
|
+
toolCalls: IndividualToolCallDisplay[];
|
12
|
+
availableTerminalHeight?: number;
|
13
|
+
terminalWidth: number;
|
14
|
+
config?: Config;
|
15
|
+
isFocused?: boolean;
|
16
|
+
}
|
17
|
+
export declare const ToolGroupMessage: React.FC<ToolGroupMessageProps>;
|
18
|
+
export {};
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* @license
|
4
|
+
* Copyright 2025 Google LLC
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
6
|
+
*/
|
7
|
+
import { useMemo } from 'react';
|
8
|
+
import { Box } from 'ink';
|
9
|
+
import { ToolCallStatus } from '../../types.js';
|
10
|
+
import { ToolMessage } from './ToolMessage.js';
|
11
|
+
import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
|
12
|
+
import { Colors } from '../../colors.js';
|
13
|
+
// Main component renders the border and maps the tools using ToolMessage
|
14
|
+
export const ToolGroupMessage = ({ toolCalls, availableTerminalHeight, terminalWidth, config, isFocused = true, }) => {
|
15
|
+
const hasPending = !toolCalls.every((t) => t.status === ToolCallStatus.Success);
|
16
|
+
const borderColor = hasPending ? Colors.AccentYellow : Colors.Gray;
|
17
|
+
const staticHeight = /* border */ 2 + /* marginBottom */ 1;
|
18
|
+
// This is a bit of a magic number, but it accounts for the border and
|
19
|
+
// marginLeft.
|
20
|
+
const innerWidth = terminalWidth - 4;
|
21
|
+
// only prompt for tool approval on the first 'confirming' tool in the list
|
22
|
+
// note, after the CTA, this automatically moves over to the next 'confirming' tool
|
23
|
+
const toolAwaitingApproval = useMemo(() => toolCalls.find((tc) => tc.status === ToolCallStatus.Confirming), [toolCalls]);
|
24
|
+
let countToolCallsWithResults = 0;
|
25
|
+
for (const tool of toolCalls) {
|
26
|
+
if (tool.resultDisplay !== undefined && tool.resultDisplay !== '') {
|
27
|
+
countToolCallsWithResults++;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
const countOneLineToolCalls = toolCalls.length - countToolCallsWithResults;
|
31
|
+
const availableTerminalHeightPerToolMessage = availableTerminalHeight
|
32
|
+
? Math.max(Math.floor((availableTerminalHeight - staticHeight - countOneLineToolCalls) /
|
33
|
+
Math.max(1, countToolCallsWithResults)), 1)
|
34
|
+
: undefined;
|
35
|
+
return (_jsx(Box, { flexDirection: "column", borderStyle: "round",
|
36
|
+
/*
|
37
|
+
This width constraint is highly important and protects us from an Ink rendering bug.
|
38
|
+
Since the ToolGroup can typically change rendering states frequently, it can cause
|
39
|
+
Ink to render the border of the box incorrectly and span multiple lines and even
|
40
|
+
cause tearing.
|
41
|
+
*/
|
42
|
+
width: "100%", marginLeft: 1, borderDimColor: hasPending, borderColor: borderColor, children: toolCalls.map((tool) => {
|
43
|
+
const isConfirming = toolAwaitingApproval?.callId === tool.callId;
|
44
|
+
return (_jsxs(Box, { flexDirection: "column", minHeight: 1, children: [_jsx(Box, { flexDirection: "row", alignItems: "center", children: _jsx(ToolMessage, { callId: tool.callId, name: tool.name, description: tool.description, resultDisplay: tool.resultDisplay, status: tool.status, confirmationDetails: tool.confirmationDetails, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth, emphasis: isConfirming
|
45
|
+
? 'high'
|
46
|
+
: toolAwaitingApproval
|
47
|
+
? 'low'
|
48
|
+
: 'medium', renderOutputAsMarkdown: tool.renderOutputAsMarkdown }) }), tool.status === ToolCallStatus.Confirming &&
|
49
|
+
isConfirming &&
|
50
|
+
tool.confirmationDetails && (_jsx(ToolConfirmationMessage, { confirmationDetails: tool.confirmationDetails, config: config, isFocused: isFocused, availableTerminalHeight: availableTerminalHeightPerToolMessage, terminalWidth: innerWidth }))] }, tool.callId));
|
51
|
+
}) }));
|
52
|
+
};
|
53
|
+
//# sourceMappingURL=ToolGroupMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ToolGroupMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolGroupMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAA6B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAYzC,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,SAAS,EACT,uBAAuB,EACvB,aAAa,EACb,MAAM,EACN,SAAS,GAAG,IAAI,GACjB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CACjC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,OAAO,CAC3C,CAAC;IACF,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,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AI,CAAC,MAAM,CAAC;YAClE,OAAO,CACL,MAAC,GAAG,IAAmB,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aACxD,KAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,YAC1C,KAAC,WAAW,IACV,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,uBAAuB,EAAE,qCAAqC,EAC9D,aAAa,EAAE,UAAU,EACzB,QAAQ,EACN,YAAY;gCACV,CAAC,CAAC,MAAM;gCACR,CAAC,CAAC,oBAAoB;oCACpB,CAAC,CAAC,KAAK;oCACP,CAAC,CAAC,QAAQ,EAEhB,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,GACE,EACL,IAAI,CAAC,MAAM,KAAK,cAAc,CAAC,UAAU;wBACxC,YAAY;wBACZ,IAAI,CAAC,mBAAmB,IAAI,CAC1B,KAAC,uBAAuB,IACtB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,uBAAuB,EACrB,qCAAqC,EAEvC,aAAa,EAAE,UAAU,GACzB,CACH,KAjCK,IAAI,CAAC,MAAM,CAkCf,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
import { IndividualToolCallDisplay } from '../../types.js';
|
8
|
+
export type TextEmphasis = 'high' | 'medium' | 'low';
|
9
|
+
export interface ToolMessageProps extends IndividualToolCallDisplay {
|
10
|
+
availableTerminalHeight?: number;
|
11
|
+
terminalWidth: number;
|
12
|
+
emphasis?: TextEmphasis;
|
13
|
+
renderOutputAsMarkdown?: boolean;
|
14
|
+
}
|
15
|
+
export declare const ToolMessage: React.FC<ToolMessageProps>;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* @license
|
4
|
+
* Copyright 2025 Google LLC
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
6
|
+
*/
|
7
|
+
import React from 'react';
|
8
|
+
import { Box, Text } from 'ink';
|
9
|
+
import { ToolCallStatus } from '../../types.js';
|
10
|
+
import { DiffRenderer } from './DiffRenderer.js';
|
11
|
+
import { Colors } from '../../colors.js';
|
12
|
+
import { MarkdownDisplay } from '../../utils/MarkdownDisplay.js';
|
13
|
+
import { GeminiRespondingSpinner } from '../GeminiRespondingSpinner.js';
|
14
|
+
import { MaxSizedBox } from '../shared/MaxSizedBox.js';
|
15
|
+
const STATIC_HEIGHT = 1;
|
16
|
+
const RESERVED_LINE_COUNT = 5; // for tool name, status, padding etc.
|
17
|
+
const STATUS_INDICATOR_WIDTH = 3;
|
18
|
+
const MIN_LINES_SHOWN = 2; // show at least this many lines
|
19
|
+
// Large threshold to ensure we don't cause performance issues for very large
|
20
|
+
// outputs that will get truncated further MaxSizedBox anyway.
|
21
|
+
const MAXIMUM_RESULT_DISPLAY_CHARACTERS = 1000000;
|
22
|
+
export const ToolMessage = ({ name, description, resultDisplay, status, availableTerminalHeight, terminalWidth, emphasis = 'medium', renderOutputAsMarkdown = true, }) => {
|
23
|
+
const availableHeight = availableTerminalHeight
|
24
|
+
? Math.max(availableTerminalHeight - STATIC_HEIGHT - RESERVED_LINE_COUNT, MIN_LINES_SHOWN + 1)
|
25
|
+
: undefined;
|
26
|
+
// Long tool call response in MarkdownDisplay doesn't respect availableTerminalHeight properly,
|
27
|
+
// we're forcing it to not render as markdown when the response is too long, it will fallback
|
28
|
+
// to render as plain text, which is contained within the terminal using MaxSizedBox
|
29
|
+
if (availableHeight) {
|
30
|
+
renderOutputAsMarkdown = false;
|
31
|
+
}
|
32
|
+
const childWidth = terminalWidth - 3; // account for padding.
|
33
|
+
if (typeof resultDisplay === 'string') {
|
34
|
+
if (resultDisplay.length > MAXIMUM_RESULT_DISPLAY_CHARACTERS) {
|
35
|
+
// Truncate the result display to fit within the available width.
|
36
|
+
resultDisplay =
|
37
|
+
'...' + resultDisplay.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return (_jsxs(Box, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [_jsxs(Box, { minHeight: 1, children: [_jsx(ToolStatusIndicator, { status: status }), _jsx(ToolInfo, { name: name, status: status, description: description, emphasis: emphasis }), emphasis === 'high' && _jsx(TrailingIndicator, {})] }), resultDisplay && (_jsx(Box, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: _jsxs(Box, { flexDirection: "column", children: [typeof resultDisplay === 'string' && renderOutputAsMarkdown && (_jsx(Box, { flexDirection: "column", children: _jsx(MarkdownDisplay, { text: resultDisplay, isPending: false, availableTerminalHeight: availableHeight, terminalWidth: childWidth }) })), typeof resultDisplay === 'string' && !renderOutputAsMarkdown && (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: _jsx(Box, { children: _jsx(Text, { color: Colors.Foreground, wrap: "wrap", children: resultDisplay }) }) })), typeof resultDisplay !== 'string' && (_jsx(DiffRenderer, { diffContent: resultDisplay.fileDiff, filename: resultDisplay.fileName, availableTerminalHeight: availableHeight, terminalWidth: childWidth }))] }) }))] }));
|
41
|
+
};
|
42
|
+
const ToolStatusIndicator = ({ status, }) => (_jsxs(Box, { minWidth: STATUS_INDICATOR_WIDTH, children: [status === ToolCallStatus.Pending && (_jsx(Text, { color: Colors.AccentGreen, children: "o" })), status === ToolCallStatus.Executing && (_jsx(GeminiRespondingSpinner, { spinnerType: "toggle", nonRespondingDisplay: '⊷' })), status === ToolCallStatus.Success && (_jsx(Text, { color: Colors.AccentGreen, children: "\u2714" })), status === ToolCallStatus.Confirming && (_jsx(Text, { color: Colors.AccentYellow, children: "?" })), status === ToolCallStatus.Canceled && (_jsx(Text, { color: Colors.AccentYellow, bold: true, children: "-" })), status === ToolCallStatus.Error && (_jsx(Text, { color: Colors.AccentRed, bold: true, children: "x" }))] }));
|
43
|
+
const ToolInfo = ({ name, description, status, emphasis, }) => {
|
44
|
+
const nameColor = React.useMemo(() => {
|
45
|
+
switch (emphasis) {
|
46
|
+
case 'high':
|
47
|
+
return Colors.Foreground;
|
48
|
+
case 'medium':
|
49
|
+
return Colors.Foreground;
|
50
|
+
case 'low':
|
51
|
+
return Colors.Gray;
|
52
|
+
default: {
|
53
|
+
const exhaustiveCheck = emphasis;
|
54
|
+
return exhaustiveCheck;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}, [emphasis]);
|
58
|
+
return (_jsx(Box, { children: _jsxs(Text, { wrap: "truncate-end", strikethrough: status === ToolCallStatus.Canceled, children: [_jsx(Text, { color: nameColor, bold: true, children: name }), ' ', _jsx(Text, { color: Colors.Gray, children: description })] }) }));
|
59
|
+
};
|
60
|
+
const TrailingIndicator = () => (_jsxs(Text, { color: Colors.Foreground, wrap: "truncate", children: [' ', "\u2190"] }));
|
61
|
+
//# sourceMappingURL=ToolMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ToolMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/ToolMessage.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAA6B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAA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AAC,CAAC,CAAC;gBACR,MAAM,eAAe,GAAU,QAAQ,CAAC;gBACxC,OAAO,eAAe,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,CACL,KAAC,GAAG,cACF,MAAC,IAAI,IACH,IAAI,EAAC,cAAc,EACnB,aAAa,EAAE,MAAM,KAAK,cAAc,CAAC,QAAQ,aAEjD,KAAC,IAAI,IAAC,KAAK,EAAE,SAAS,EAAE,IAAI,kBACzB,IAAI,GACA,EAAC,GAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,WAAW,GAAQ,IACzC,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAa,GAAG,EAAE,CAAC,CACxC,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAC,UAAU,aAC5C,GAAG,cAEC,CACR,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Text, Box } from 'ink';
|
3
|
+
import { Colors } from '../../colors.js';
|
4
|
+
export const UserMessage = ({ text }) => {
|
5
|
+
const prefix = '> ';
|
6
|
+
const prefixWidth = prefix.length;
|
7
|
+
return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "row", paddingX: 2, paddingY: 0, marginY: 1, alignSelf: "flex-start", children: [_jsx(Box, { width: prefixWidth, children: _jsx(Text, { color: Colors.Gray, children: prefix }) }), _jsx(Box, { flexGrow: 1, children: _jsx(Text, { wrap: "wrap", color: Colors.Gray, children: text }) })] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=UserMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UserMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAElC,OAAO,CACL,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,IAAI,EACxB,aAAa,EAAC,KAAK,EACnB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,CAAC,EACV,SAAS,EAAC,YAAY,aAEtB,KAAC,GAAG,IAAC,KAAK,EAAE,WAAW,YACrB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,MAAM,GAAQ,GACrC,EACN,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,YACd,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YACjC,IAAI,GACA,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
interface UserShellMessageProps {
|
8
|
+
text: string;
|
9
|
+
}
|
10
|
+
export declare const UserShellMessage: React.FC<UserShellMessageProps>;
|
11
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Box, Text } from 'ink';
|
3
|
+
import { Colors } from '../../colors.js';
|
4
|
+
export const UserShellMessage = ({ text }) => {
|
5
|
+
// Remove leading '!' if present, as App.tsx adds it for the processor.
|
6
|
+
const commandToDisplay = text.startsWith('!') ? text.substring(1) : text;
|
7
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: Colors.AccentCyan, children: "$ " }), _jsx(Text, { children: commandToDisplay })] }));
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=UserShellMessage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"UserShellMessage.js","sourceRoot":"","sources":["../../../../../src/ui/components/messages/UserShellMessage.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAMzC,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5E,uEAAuE;IACvE,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEzE,OAAO,CACL,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,mBAAW,EACzC,KAAC,IAAI,cAAE,gBAAgB,GAAQ,IAC3B,CACP,CAAC;AACJ,CAAC,CAAC"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2025 Google LLC
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
5
|
+
*/
|
6
|
+
import React from 'react';
|
7
|
+
/**
|
8
|
+
* Minimum height for the MaxSizedBox component.
|
9
|
+
* This ensures there is room for at least one line of content as well as the
|
10
|
+
* message that content was truncated.
|
11
|
+
*/
|
12
|
+
export declare const MINIMUM_MAX_HEIGHT = 2;
|
13
|
+
export declare function setMaxSizedBoxDebugging(value: boolean): void;
|
14
|
+
interface MaxSizedBoxProps {
|
15
|
+
children?: React.ReactNode;
|
16
|
+
maxWidth?: number;
|
17
|
+
maxHeight: number | undefined;
|
18
|
+
overflowDirection?: 'top' | 'bottom';
|
19
|
+
additionalHiddenLinesCount?: number;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* A React component that constrains the size of its children and provides
|
23
|
+
* content-aware truncation when the content exceeds the specified `maxHeight`.
|
24
|
+
*
|
25
|
+
* `MaxSizedBox` requires a specific structure for its children to correctly
|
26
|
+
* measure and render the content:
|
27
|
+
*
|
28
|
+
* 1. **Direct children must be `<Box>` elements.** Each `<Box>` represents a
|
29
|
+
* single row of content.
|
30
|
+
* 2. **Row `<Box>` elements must contain only `<Text>` elements.** These
|
31
|
+
* `<Text>` elements can be nested and there are no restrictions to Text
|
32
|
+
* element styling other than that non-wrapping text elements must be
|
33
|
+
* before wrapping text elements.
|
34
|
+
*
|
35
|
+
* **Constraints:**
|
36
|
+
* - **Box Properties:** Custom properties on the child `<Box>` elements are
|
37
|
+
* ignored. In debug mode, runtime checks will report errors for any
|
38
|
+
* unsupported properties.
|
39
|
+
* - **Text Wrapping:** Within a single row, `<Text>` elements with no wrapping
|
40
|
+
* (e.g., headers, labels) must appear before any `<Text>` elements that wrap.
|
41
|
+
* - **Element Types:** Runtime checks will warn if unsupported element types
|
42
|
+
* are used as children.
|
43
|
+
*
|
44
|
+
* @example
|
45
|
+
* <MaxSizedBox maxWidth={80} maxHeight={10}>
|
46
|
+
* <Box>
|
47
|
+
* <Text>This is the first line.</Text>
|
48
|
+
* </Box>
|
49
|
+
* <Box>
|
50
|
+
* <Text color="cyan" wrap="truncate">Non-wrapping Header: </Text>
|
51
|
+
* <Text>This is the rest of the line which will wrap if it's too long.</Text>
|
52
|
+
* </Box>
|
53
|
+
* <Box>
|
54
|
+
* <Text>
|
55
|
+
* Line 3 with <Text color="yellow">nested styled text</Text> inside of it.
|
56
|
+
* </Text>
|
57
|
+
* </Box>
|
58
|
+
* </MaxSizedBox>
|
59
|
+
*/
|
60
|
+
export declare const MaxSizedBox: React.FC<MaxSizedBoxProps>;
|
61
|
+
export {};
|