@google/gemini-cli 0.1.0-development.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/LICENSE +202 -0
- package/README.md +156 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +80 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +33 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +13 -0
- package/dist/src/config/config.js +211 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +20 -0
- package/dist/src/config/extension.js +81 -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 +72 -0
- package/dist/src/config/settings.js +227 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +216 -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 +115 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +13 -0
- package/dist/src/services/CommandService.js +30 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/ui/App.d.ts +14 -0
- package/dist/src/ui/App.js +391 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +48 -0
- package/dist/src/ui/colors.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/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 +26 -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 +66 -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/ConsolePatcher.d.ts +12 -0
- package/dist/src/ui/components/ConsolePatcher.js +40 -0
- package/dist/src/ui/components/ConsolePatcher.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/Footer.d.ts +20 -0
- package/dist/src/ui/components/Footer.js +13 -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 +12 -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 +280 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +19 -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/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 +126 -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 +14 -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 +111 -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 +41 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +52 -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 +1010 -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/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 +33 -0
- package/dist/src/ui/contexts/SessionContext.js +49 -0
- package/dist/src/ui/contexts/SessionContext.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/shellCommandProcessor.d.ts +16 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +261 -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 +1050 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAuthCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useAuthCommand.js +54 -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 +372 -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 +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -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 +518 -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 +72 -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 +86 -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/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +189 -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/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/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 +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.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 +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +78 -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 +40 -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/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/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 +109 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +67 -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 +172 -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/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 +197 -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/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 +15 -0
- package/dist/src/ui/utils/errorParsing.js +79 -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/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 +36 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +6 -0
- package/dist/src/utils/cleanup.js +19 -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 +33 -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/package.json +80 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ToolCallConfirmationDetails, ToolResultDisplay } from '@google/gemini-cli-core';
|
|
7
|
+
export declare enum StreamingState {
|
|
8
|
+
Idle = "idle",
|
|
9
|
+
Responding = "responding",
|
|
10
|
+
WaitingForConfirmation = "waiting_for_confirmation"
|
|
11
|
+
}
|
|
12
|
+
export declare enum GeminiEventType {
|
|
13
|
+
Content = "content",
|
|
14
|
+
ToolCallRequest = "tool_call_request"
|
|
15
|
+
}
|
|
16
|
+
export declare enum ToolCallStatus {
|
|
17
|
+
Pending = "Pending",
|
|
18
|
+
Canceled = "Canceled",
|
|
19
|
+
Confirming = "Confirming",
|
|
20
|
+
Executing = "Executing",
|
|
21
|
+
Success = "Success",
|
|
22
|
+
Error = "Error"
|
|
23
|
+
}
|
|
24
|
+
export interface ToolCallEvent {
|
|
25
|
+
type: 'tool_call';
|
|
26
|
+
status: ToolCallStatus;
|
|
27
|
+
callId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
args: Record<string, never>;
|
|
30
|
+
resultDisplay: ToolResultDisplay | undefined;
|
|
31
|
+
confirmationDetails: ToolCallConfirmationDetails | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface IndividualToolCallDisplay {
|
|
34
|
+
callId: string;
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
resultDisplay: ToolResultDisplay | undefined;
|
|
38
|
+
status: ToolCallStatus;
|
|
39
|
+
confirmationDetails: ToolCallConfirmationDetails | undefined;
|
|
40
|
+
renderOutputAsMarkdown?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface CompressionProps {
|
|
43
|
+
isPending: boolean;
|
|
44
|
+
originalTokenCount: number | null;
|
|
45
|
+
newTokenCount: number | null;
|
|
46
|
+
}
|
|
47
|
+
export interface HistoryItemBase {
|
|
48
|
+
text?: string;
|
|
49
|
+
}
|
|
50
|
+
export type HistoryItemUser = HistoryItemBase & {
|
|
51
|
+
type: 'user';
|
|
52
|
+
text: string;
|
|
53
|
+
};
|
|
54
|
+
export type HistoryItemGemini = HistoryItemBase & {
|
|
55
|
+
type: 'gemini';
|
|
56
|
+
text: string;
|
|
57
|
+
};
|
|
58
|
+
export type HistoryItemGeminiContent = HistoryItemBase & {
|
|
59
|
+
type: 'gemini_content';
|
|
60
|
+
text: string;
|
|
61
|
+
};
|
|
62
|
+
export type HistoryItemInfo = HistoryItemBase & {
|
|
63
|
+
type: 'info';
|
|
64
|
+
text: string;
|
|
65
|
+
};
|
|
66
|
+
export type HistoryItemError = HistoryItemBase & {
|
|
67
|
+
type: 'error';
|
|
68
|
+
text: string;
|
|
69
|
+
};
|
|
70
|
+
export type HistoryItemAbout = HistoryItemBase & {
|
|
71
|
+
type: 'about';
|
|
72
|
+
cliVersion: string;
|
|
73
|
+
osVersion: string;
|
|
74
|
+
sandboxEnv: string;
|
|
75
|
+
modelVersion: string;
|
|
76
|
+
selectedAuthType: string;
|
|
77
|
+
gcpProject: string;
|
|
78
|
+
};
|
|
79
|
+
export type HistoryItemStats = HistoryItemBase & {
|
|
80
|
+
type: 'stats';
|
|
81
|
+
duration: string;
|
|
82
|
+
};
|
|
83
|
+
export type HistoryItemModelStats = HistoryItemBase & {
|
|
84
|
+
type: 'model_stats';
|
|
85
|
+
};
|
|
86
|
+
export type HistoryItemToolStats = HistoryItemBase & {
|
|
87
|
+
type: 'tool_stats';
|
|
88
|
+
};
|
|
89
|
+
export type HistoryItemQuit = HistoryItemBase & {
|
|
90
|
+
type: 'quit';
|
|
91
|
+
duration: string;
|
|
92
|
+
};
|
|
93
|
+
export type HistoryItemToolGroup = HistoryItemBase & {
|
|
94
|
+
type: 'tool_group';
|
|
95
|
+
tools: IndividualToolCallDisplay[];
|
|
96
|
+
};
|
|
97
|
+
export type HistoryItemUserShell = HistoryItemBase & {
|
|
98
|
+
type: 'user_shell';
|
|
99
|
+
text: string;
|
|
100
|
+
};
|
|
101
|
+
export type HistoryItemCompression = HistoryItemBase & {
|
|
102
|
+
type: 'compression';
|
|
103
|
+
compression: CompressionProps;
|
|
104
|
+
};
|
|
105
|
+
export type HistoryItemWithoutId = HistoryItemUser | HistoryItemUserShell | HistoryItemGemini | HistoryItemGeminiContent | HistoryItemInfo | HistoryItemError | HistoryItemAbout | HistoryItemToolGroup | HistoryItemStats | HistoryItemModelStats | HistoryItemToolStats | HistoryItemQuit | HistoryItemCompression;
|
|
106
|
+
export type HistoryItem = HistoryItemWithoutId & {
|
|
107
|
+
id: number;
|
|
108
|
+
};
|
|
109
|
+
export declare enum MessageType {
|
|
110
|
+
INFO = "info",
|
|
111
|
+
ERROR = "error",
|
|
112
|
+
USER = "user",
|
|
113
|
+
ABOUT = "about",
|
|
114
|
+
STATS = "stats",
|
|
115
|
+
MODEL_STATS = "model_stats",
|
|
116
|
+
TOOL_STATS = "tool_stats",
|
|
117
|
+
QUIT = "quit",
|
|
118
|
+
GEMINI = "gemini",
|
|
119
|
+
COMPRESSION = "compression"
|
|
120
|
+
}
|
|
121
|
+
export type Message = {
|
|
122
|
+
type: MessageType.INFO | MessageType.ERROR | MessageType.USER;
|
|
123
|
+
content: string;
|
|
124
|
+
timestamp: Date;
|
|
125
|
+
} | {
|
|
126
|
+
type: MessageType.ABOUT;
|
|
127
|
+
timestamp: Date;
|
|
128
|
+
cliVersion: string;
|
|
129
|
+
osVersion: string;
|
|
130
|
+
sandboxEnv: string;
|
|
131
|
+
modelVersion: string;
|
|
132
|
+
selectedAuthType: string;
|
|
133
|
+
gcpProject: string;
|
|
134
|
+
content?: string;
|
|
135
|
+
} | {
|
|
136
|
+
type: MessageType.STATS;
|
|
137
|
+
timestamp: Date;
|
|
138
|
+
duration: string;
|
|
139
|
+
content?: string;
|
|
140
|
+
} | {
|
|
141
|
+
type: MessageType.MODEL_STATS;
|
|
142
|
+
timestamp: Date;
|
|
143
|
+
content?: string;
|
|
144
|
+
} | {
|
|
145
|
+
type: MessageType.TOOL_STATS;
|
|
146
|
+
timestamp: Date;
|
|
147
|
+
content?: string;
|
|
148
|
+
} | {
|
|
149
|
+
type: MessageType.QUIT;
|
|
150
|
+
timestamp: Date;
|
|
151
|
+
duration: string;
|
|
152
|
+
content?: string;
|
|
153
|
+
} | {
|
|
154
|
+
type: MessageType.COMPRESSION;
|
|
155
|
+
compression: CompressionProps;
|
|
156
|
+
timestamp: Date;
|
|
157
|
+
};
|
|
158
|
+
export interface ConsoleMessageItem {
|
|
159
|
+
type: 'log' | 'warn' | 'error' | 'debug';
|
|
160
|
+
content: string;
|
|
161
|
+
count: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Defines the result of the slash command processor for its consumer (useGeminiStream).
|
|
165
|
+
*/
|
|
166
|
+
export type SlashCommandProcessorResult = {
|
|
167
|
+
type: 'schedule_tool';
|
|
168
|
+
toolName: string;
|
|
169
|
+
toolArgs: Record<string, unknown>;
|
|
170
|
+
} | {
|
|
171
|
+
type: 'handled';
|
|
172
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// Only defining the state enum needed by the UI
|
|
7
|
+
export var StreamingState;
|
|
8
|
+
(function (StreamingState) {
|
|
9
|
+
StreamingState["Idle"] = "idle";
|
|
10
|
+
StreamingState["Responding"] = "responding";
|
|
11
|
+
StreamingState["WaitingForConfirmation"] = "waiting_for_confirmation";
|
|
12
|
+
})(StreamingState || (StreamingState = {}));
|
|
13
|
+
// Copied from server/src/core/turn.ts for CLI usage
|
|
14
|
+
export var GeminiEventType;
|
|
15
|
+
(function (GeminiEventType) {
|
|
16
|
+
GeminiEventType["Content"] = "content";
|
|
17
|
+
GeminiEventType["ToolCallRequest"] = "tool_call_request";
|
|
18
|
+
// Add other event types if the UI hook needs to handle them
|
|
19
|
+
})(GeminiEventType || (GeminiEventType = {}));
|
|
20
|
+
export var ToolCallStatus;
|
|
21
|
+
(function (ToolCallStatus) {
|
|
22
|
+
ToolCallStatus["Pending"] = "Pending";
|
|
23
|
+
ToolCallStatus["Canceled"] = "Canceled";
|
|
24
|
+
ToolCallStatus["Confirming"] = "Confirming";
|
|
25
|
+
ToolCallStatus["Executing"] = "Executing";
|
|
26
|
+
ToolCallStatus["Success"] = "Success";
|
|
27
|
+
ToolCallStatus["Error"] = "Error";
|
|
28
|
+
})(ToolCallStatus || (ToolCallStatus = {}));
|
|
29
|
+
// Message types used by internal command feedback (subset of HistoryItem types)
|
|
30
|
+
export var MessageType;
|
|
31
|
+
(function (MessageType) {
|
|
32
|
+
MessageType["INFO"] = "info";
|
|
33
|
+
MessageType["ERROR"] = "error";
|
|
34
|
+
MessageType["USER"] = "user";
|
|
35
|
+
MessageType["ABOUT"] = "about";
|
|
36
|
+
MessageType["STATS"] = "stats";
|
|
37
|
+
MessageType["MODEL_STATS"] = "model_stats";
|
|
38
|
+
MessageType["TOOL_STATS"] = "tool_stats";
|
|
39
|
+
MessageType["QUIT"] = "quit";
|
|
40
|
+
MessageType["GEMINI"] = "gemini";
|
|
41
|
+
MessageType["COMPRESSION"] = "compression";
|
|
42
|
+
})(MessageType || (MessageType = {}));
|
|
43
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ui/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,gDAAgD;AAChD,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,2CAAyB,CAAA;IACzB,qEAAmD,CAAA;AACrD,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,oDAAoD;AACpD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wDAAqC,CAAA;IACrC,4DAA4D;AAC9D,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;IACzB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;AACjB,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAyHD,gFAAgF;AAChF,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,0CAA2B,CAAA;IAC3B,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;AAC7B,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB"}
|
|
@@ -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
|
+
/**
|
|
8
|
+
* Renders syntax-highlighted code for Ink applications using a selected theme.
|
|
9
|
+
*
|
|
10
|
+
* @param code The code string to highlight.
|
|
11
|
+
* @param language The language identifier (e.g., 'javascript', 'css', 'html')
|
|
12
|
+
* @returns A React.ReactNode containing Ink <Text> elements for the highlighted code.
|
|
13
|
+
*/
|
|
14
|
+
export declare function colorizeCode(code: string, language: string | null, availableHeight?: number, maxWidth?: number): React.ReactNode;
|
|
@@ -0,0 +1,97 @@
|
|
|
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 { Text, Box } from 'ink';
|
|
9
|
+
import { common, createLowlight } from 'lowlight';
|
|
10
|
+
import { themeManager } from '../themes/theme-manager.js';
|
|
11
|
+
import { MaxSizedBox, MINIMUM_MAX_HEIGHT, } from '../components/shared/MaxSizedBox.js';
|
|
12
|
+
// Configure theming and parsing utilities.
|
|
13
|
+
const lowlight = createLowlight(common);
|
|
14
|
+
function renderHastNode(node, theme, inheritedColor) {
|
|
15
|
+
if (node.type === 'text') {
|
|
16
|
+
// Use the color passed down from parent element, if any
|
|
17
|
+
return _jsx(Text, { color: inheritedColor, children: node.value });
|
|
18
|
+
}
|
|
19
|
+
// Handle Element Nodes: Determine color and pass it down, don't wrap
|
|
20
|
+
if (node.type === 'element') {
|
|
21
|
+
const nodeClasses = node.properties?.className || [];
|
|
22
|
+
let elementColor = undefined;
|
|
23
|
+
// Find color defined specifically for this element's class
|
|
24
|
+
for (let i = nodeClasses.length - 1; i >= 0; i--) {
|
|
25
|
+
const color = theme.getInkColor(nodeClasses[i]);
|
|
26
|
+
if (color) {
|
|
27
|
+
elementColor = color;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// Determine the color to pass down: Use this element's specific color
|
|
32
|
+
// if found, otherwise, continue passing down the already inherited color.
|
|
33
|
+
const colorToPassDown = elementColor || inheritedColor;
|
|
34
|
+
// Recursively render children, passing the determined color down
|
|
35
|
+
// Ensure child type matches expected HAST structure (ElementContent is common)
|
|
36
|
+
const children = node.children?.map((child, index) => (_jsx(React.Fragment, { children: renderHastNode(child, theme, colorToPassDown) }, index)));
|
|
37
|
+
// Element nodes now only group children; color is applied by Text nodes.
|
|
38
|
+
// Use a React Fragment to avoid adding unnecessary elements.
|
|
39
|
+
return _jsx(React.Fragment, { children: children });
|
|
40
|
+
}
|
|
41
|
+
// Handle Root Node: Start recursion with initial inherited color
|
|
42
|
+
if (node.type === 'root') {
|
|
43
|
+
// Check if children array is empty - this happens when lowlight can't detect language – fallback to plain text
|
|
44
|
+
if (!node.children || node.children.length === 0) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
// Pass down the initial inheritedColor (likely undefined from the top call)
|
|
48
|
+
// Ensure child type matches expected HAST structure (RootContent is common)
|
|
49
|
+
return node.children?.map((child, index) => (_jsx(React.Fragment, { children: renderHastNode(child, theme, inheritedColor) }, index)));
|
|
50
|
+
}
|
|
51
|
+
// Handle unknown or unsupported node types
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Renders syntax-highlighted code for Ink applications using a selected theme.
|
|
56
|
+
*
|
|
57
|
+
* @param code The code string to highlight.
|
|
58
|
+
* @param language The language identifier (e.g., 'javascript', 'css', 'html')
|
|
59
|
+
* @returns A React.ReactNode containing Ink <Text> elements for the highlighted code.
|
|
60
|
+
*/
|
|
61
|
+
export function colorizeCode(code, language, availableHeight, maxWidth) {
|
|
62
|
+
const codeToHighlight = code.replace(/\n$/, '');
|
|
63
|
+
const activeTheme = themeManager.getActiveTheme();
|
|
64
|
+
try {
|
|
65
|
+
// Render the HAST tree using the adapted theme
|
|
66
|
+
// Apply the theme's default foreground color to the top-level Text element
|
|
67
|
+
let lines = codeToHighlight.split('\n');
|
|
68
|
+
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines
|
|
69
|
+
let hiddenLinesCount = 0;
|
|
70
|
+
// Optimization to avoid highlighting lines that cannot possibly be displayed.
|
|
71
|
+
if (availableHeight !== undefined) {
|
|
72
|
+
availableHeight = Math.max(availableHeight, MINIMUM_MAX_HEIGHT);
|
|
73
|
+
if (lines.length > availableHeight) {
|
|
74
|
+
const sliceIndex = lines.length - availableHeight;
|
|
75
|
+
hiddenLinesCount = sliceIndex;
|
|
76
|
+
lines = lines.slice(sliceIndex);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const getHighlightedLines = (line) => !language || !lowlight.registered(language)
|
|
80
|
+
? lowlight.highlightAuto(line)
|
|
81
|
+
: lowlight.highlight(language, line);
|
|
82
|
+
return (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: maxWidth, additionalHiddenLinesCount: hiddenLinesCount, overflowDirection: "top", children: lines.map((line, index) => {
|
|
83
|
+
const renderedNode = renderHastNode(getHighlightedLines(line), activeTheme, undefined);
|
|
84
|
+
const contentToRender = renderedNode !== null ? renderedNode : line;
|
|
85
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: activeTheme.colors.Gray, children: `${String(index + 1 + hiddenLinesCount).padStart(padWidth, ' ')} ` }), _jsx(Text, { color: activeTheme.defaultColor, wrap: "wrap", children: contentToRender })] }, index));
|
|
86
|
+
}) }));
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
console.error(`[colorizeCode] Error highlighting code for language "${language}":`, error);
|
|
90
|
+
// Fallback to plain text with default color on error
|
|
91
|
+
// Also display line numbers in fallback
|
|
92
|
+
const lines = codeToHighlight.split('\n');
|
|
93
|
+
const padWidth = String(lines.length).length; // Calculate padding width based on number of lines
|
|
94
|
+
return (_jsx(MaxSizedBox, { maxHeight: availableHeight, maxWidth: maxWidth, overflowDirection: "top", children: lines.map((line, index) => (_jsxs(Box, { children: [_jsx(Text, { color: activeTheme.defaultColor, children: `${String(index + 1).padStart(padWidth, ' ')} ` }), _jsx(Text, { color: activeTheme.colors.Gray, children: line })] }, index))) }));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=CodeColorizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeColorizer.js","sourceRoot":"","sources":["../../../../src/ui/utils/CodeColorizer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQlD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EACL,WAAW,EACX,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAE7C,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAExC,SAAS,cAAc,CACrB,IAA6C,EAC7C,KAAY,EACZ,cAAkC;IAElC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACzB,wDAAwD;QACxD,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,cAAc,YAAG,IAAI,CAAC,KAAK,GAAQ,CAAC;IAC1D,CAAC;IAED,qEAAqE;IACrE,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,WAAW,G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E,EAAE,CAAC,CAC1B,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,YAAY,YAClC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,GAC3C,EACP,KAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,YAAG,IAAI,GAAQ,KAJ3C,KAAK,CAKT,CACP,CAAC,GACU,CACf,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
interface RenderInlineProps {
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const RenderInline: React.NamedExoticComponent<RenderInlineProps>;
|
|
11
|
+
/**
|
|
12
|
+
* Utility function to get the plain text length of a string with markdown formatting
|
|
13
|
+
* This is useful for calculating column widths in tables
|
|
14
|
+
*/
|
|
15
|
+
export declare const getPlainTextLength: (text: string) => number;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { Text } from 'ink';
|
|
9
|
+
import { Colors } from '../colors.js';
|
|
10
|
+
import stringWidth from 'string-width';
|
|
11
|
+
// Constants for Markdown parsing
|
|
12
|
+
const BOLD_MARKER_LENGTH = 2; // For "**"
|
|
13
|
+
const ITALIC_MARKER_LENGTH = 1; // For "*" or "_"
|
|
14
|
+
const STRIKETHROUGH_MARKER_LENGTH = 2; // For "~~"
|
|
15
|
+
const INLINE_CODE_MARKER_LENGTH = 1; // For "`"
|
|
16
|
+
const UNDERLINE_TAG_START_LENGTH = 3; // For "<u>"
|
|
17
|
+
const UNDERLINE_TAG_END_LENGTH = 4; // For "</u>"
|
|
18
|
+
const RenderInlineInternal = ({ text }) => {
|
|
19
|
+
const nodes = [];
|
|
20
|
+
let lastIndex = 0;
|
|
21
|
+
const inlineRegex = /(\*\*.*?\*\*|\*.*?\*|_.*?_|~~.*?~~|\[.*?\]\(.*?\)|`+.+?`+|<u>.*?<\/u>)/g;
|
|
22
|
+
let match;
|
|
23
|
+
while ((match = inlineRegex.exec(text)) !== null) {
|
|
24
|
+
if (match.index > lastIndex) {
|
|
25
|
+
nodes.push(_jsx(Text, { children: text.slice(lastIndex, match.index) }, `t-${lastIndex}`));
|
|
26
|
+
}
|
|
27
|
+
const fullMatch = match[0];
|
|
28
|
+
let renderedNode = null;
|
|
29
|
+
const key = `m-${match.index}`;
|
|
30
|
+
try {
|
|
31
|
+
if (fullMatch.startsWith('**') &&
|
|
32
|
+
fullMatch.endsWith('**') &&
|
|
33
|
+
fullMatch.length > BOLD_MARKER_LENGTH * 2) {
|
|
34
|
+
renderedNode = (_jsx(Text, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key));
|
|
35
|
+
}
|
|
36
|
+
else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 &&
|
|
37
|
+
((fullMatch.startsWith('*') && fullMatch.endsWith('*')) ||
|
|
38
|
+
(fullMatch.startsWith('_') && fullMatch.endsWith('_'))) &&
|
|
39
|
+
!/\w/.test(text.substring(match.index - 1, match.index)) &&
|
|
40
|
+
!/\w/.test(text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)) &&
|
|
41
|
+
!/\S[./\\]/.test(text.substring(match.index - 2, match.index)) &&
|
|
42
|
+
!/[./\\]\S/.test(text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2))) {
|
|
43
|
+
renderedNode = (_jsx(Text, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key));
|
|
44
|
+
}
|
|
45
|
+
else if (fullMatch.startsWith('~~') &&
|
|
46
|
+
fullMatch.endsWith('~~') &&
|
|
47
|
+
fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
|
|
48
|
+
renderedNode = (_jsx(Text, { strikethrough: true, children: fullMatch.slice(STRIKETHROUGH_MARKER_LENGTH, -STRIKETHROUGH_MARKER_LENGTH) }, key));
|
|
49
|
+
}
|
|
50
|
+
else if (fullMatch.startsWith('`') &&
|
|
51
|
+
fullMatch.endsWith('`') &&
|
|
52
|
+
fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
|
|
53
|
+
const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
|
|
54
|
+
if (codeMatch && codeMatch[2]) {
|
|
55
|
+
renderedNode = (_jsx(Text, { color: Colors.AccentPurple, children: codeMatch[2] }, key));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if (fullMatch.startsWith('[') &&
|
|
59
|
+
fullMatch.includes('](') &&
|
|
60
|
+
fullMatch.endsWith(')')) {
|
|
61
|
+
const linkMatch = fullMatch.match(/\[(.*?)\]\((.*?)\)/);
|
|
62
|
+
if (linkMatch) {
|
|
63
|
+
const linkText = linkMatch[1];
|
|
64
|
+
const url = linkMatch[2];
|
|
65
|
+
renderedNode = (_jsxs(Text, { children: [linkText, _jsxs(Text, { color: Colors.AccentBlue, children: [" (", url, ")"] })] }, key));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (fullMatch.startsWith('<u>') &&
|
|
69
|
+
fullMatch.endsWith('</u>') &&
|
|
70
|
+
fullMatch.length >
|
|
71
|
+
UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1 // -1 because length is compared to combined length of start and end tags
|
|
72
|
+
) {
|
|
73
|
+
renderedNode = (_jsx(Text, { underline: true, children: fullMatch.slice(UNDERLINE_TAG_START_LENGTH, -UNDERLINE_TAG_END_LENGTH) }, key));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
console.error('Error parsing inline markdown part:', fullMatch, e);
|
|
78
|
+
renderedNode = null;
|
|
79
|
+
}
|
|
80
|
+
nodes.push(renderedNode ?? _jsx(Text, { children: fullMatch }, key));
|
|
81
|
+
lastIndex = inlineRegex.lastIndex;
|
|
82
|
+
}
|
|
83
|
+
if (lastIndex < text.length) {
|
|
84
|
+
nodes.push(_jsx(Text, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
|
|
85
|
+
}
|
|
86
|
+
return _jsx(_Fragment, { children: nodes.filter((node) => node !== null) });
|
|
87
|
+
};
|
|
88
|
+
export const RenderInline = React.memo(RenderInlineInternal);
|
|
89
|
+
/**
|
|
90
|
+
* Utility function to get the plain text length of a string with markdown formatting
|
|
91
|
+
* This is useful for calculating column widths in tables
|
|
92
|
+
*/
|
|
93
|
+
export const getPlainTextLength = (text) => {
|
|
94
|
+
const cleanText = text
|
|
95
|
+
.replace(/\*\*(.*?)\*\*/g, '$1')
|
|
96
|
+
.replace(/\*(.*?)\*/g, '$1')
|
|
97
|
+
.replace(/_(.*?)_/g, '$1')
|
|
98
|
+
.replace(/~~(.*?)~~/g, '$1')
|
|
99
|
+
.replace(/`(.*?)`/g, '$1')
|
|
100
|
+
.replace(/<u>(.*?)<\/u>/g, '$1')
|
|
101
|
+
.replace(/\[(.*?)\]\(.*?\)/g, '$1');
|
|
102
|
+
return stringWidth(cleanText);
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=InlineMarkdownRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineMarkdownRenderer.js","sourceRoot":"","sources":["../../../../src/ui/utils/InlineMarkdownRenderer.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;A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,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;SACzB,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;SACzB,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;SAC/B,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;IACtC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;AAChC,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 MarkdownDisplayProps {
|
|
8
|
+
text: string;
|
|
9
|
+
isPending: boolean;
|
|
10
|
+
availableTerminalHeight?: number;
|
|
11
|
+
terminalWidth: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const MarkdownDisplay: React.NamedExoticComponent<MarkdownDisplayProps>;
|
|
14
|
+
export {};
|