@google/gemini-cli 0.1.10-dev.0 → 0.1.10-dev.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 +142 -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 +32 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/config.d.ts +14 -0
- package/dist/src/config/config.js +235 -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 +70 -0
- package/dist/src/config/settings.js +165 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/gemini.d.ts +6 -0
- package/dist/src/gemini.js +217 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +122 -0
- package/dist/src/gemini.test.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/ui/App.d.ts +14 -0
- package/dist/src/ui/App.js +387 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/App.test.d.ts +6 -0
- package/dist/src/ui/App.test.js +299 -0
- package/dist/src/ui/App.test.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/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 +47 -0
- package/dist/src/ui/components/AuthDialog.js.map +1 -0
- package/dist/src/ui/components/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/components/AuthDialog.test.js +69 -0
- package/dist/src/ui/components/AuthDialog.test.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 +9 -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/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +81 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +24 -0
- package/dist/src/ui/components/InputPrompt.js +331 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/InputPrompt.test.js +154 -0
- package/dist/src/ui/components/InputPrompt.test.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/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +141 -0
- package/dist/src/ui/components/LoadingIndicator.test.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/ModelStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.js +217 -0
- package/dist/src/ui/components/ModelStatsDisplay.test.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/SessionSummaryDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +60 -0
- package/dist/src/ui/components/SessionSummaryDisplay.test.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/StatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/StatsDisplay.test.js +275 -0
- package/dist/src/ui/components/StatsDisplay.test.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/ToolStatsDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.js +160 -0
- package/dist/src/ui/components/ToolStatsDisplay.test.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/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +239 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.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/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +37 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.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/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +116 -0
- package/dist/src/ui/components/messages/ToolMessage.test.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/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +134 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.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 +128 -0
- package/dist/src/ui/components/shared/text-buffer.js +1122 -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/SessionContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/SessionContext.test.js +96 -0
- package/dist/src/ui/contexts/SessionContext.test.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 +312 -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 +31 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +981 -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 +322 -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 +524 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js +775 -0
- package/dist/src/ui/hooks/useGeminiStream.test.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 +162 -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/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +276 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +176 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +66 -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/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 +6 -3
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export const lightTheme = {
|
|
7
|
+
type: 'light',
|
|
8
|
+
Background: '#FAFAFA',
|
|
9
|
+
Foreground: '#3C3C43',
|
|
10
|
+
LightBlue: '#89BDCD',
|
|
11
|
+
AccentBlue: '#3B82F6',
|
|
12
|
+
AccentPurple: '#8B5CF6',
|
|
13
|
+
AccentCyan: '#06B6D4',
|
|
14
|
+
AccentGreen: '#3CA84B',
|
|
15
|
+
AccentYellow: '#D5A40A',
|
|
16
|
+
AccentRed: '#DD4C4C',
|
|
17
|
+
Comment: '#008000',
|
|
18
|
+
Gray: '#B7BECC',
|
|
19
|
+
GradientColors: ['#4796E4', '#847ACE', '#C3677F'],
|
|
20
|
+
};
|
|
21
|
+
export const darkTheme = {
|
|
22
|
+
type: 'dark',
|
|
23
|
+
Background: '#1E1E2E',
|
|
24
|
+
Foreground: '#CDD6F4',
|
|
25
|
+
LightBlue: '#ADD8E6',
|
|
26
|
+
AccentBlue: '#89B4FA',
|
|
27
|
+
AccentPurple: '#CBA6F7',
|
|
28
|
+
AccentCyan: '#89DCEB',
|
|
29
|
+
AccentGreen: '#A6E3A1',
|
|
30
|
+
AccentYellow: '#F9E2AF',
|
|
31
|
+
AccentRed: '#F38BA8',
|
|
32
|
+
Comment: '#6C7086',
|
|
33
|
+
Gray: '#6C7086',
|
|
34
|
+
GradientColors: ['#4796E4', '#847ACE', '#C3677F'],
|
|
35
|
+
};
|
|
36
|
+
export const ansiTheme = {
|
|
37
|
+
type: 'ansi',
|
|
38
|
+
Background: 'black',
|
|
39
|
+
Foreground: 'white',
|
|
40
|
+
LightBlue: 'blue',
|
|
41
|
+
AccentBlue: 'blue',
|
|
42
|
+
AccentPurple: 'magenta',
|
|
43
|
+
AccentCyan: 'cyan',
|
|
44
|
+
AccentGreen: 'green',
|
|
45
|
+
AccentYellow: 'yellow',
|
|
46
|
+
AccentRed: 'red',
|
|
47
|
+
Comment: 'gray',
|
|
48
|
+
Gray: 'gray',
|
|
49
|
+
};
|
|
50
|
+
export class Theme {
|
|
51
|
+
name;
|
|
52
|
+
type;
|
|
53
|
+
colors;
|
|
54
|
+
/**
|
|
55
|
+
* The default foreground color for text when no specific highlight rule applies.
|
|
56
|
+
* This is an Ink-compatible color string (hex or name).
|
|
57
|
+
*/
|
|
58
|
+
defaultColor;
|
|
59
|
+
/**
|
|
60
|
+
* Stores the mapping from highlight.js class names (e.g., 'hljs-keyword')
|
|
61
|
+
* to Ink-compatible color strings (hex or name).
|
|
62
|
+
*/
|
|
63
|
+
_colorMap;
|
|
64
|
+
// --- Static Helper Data ---
|
|
65
|
+
// Mapping from common CSS color names (lowercase) to hex codes (lowercase)
|
|
66
|
+
// Excludes names directly supported by Ink
|
|
67
|
+
static cssNameToHexMap = {
|
|
68
|
+
aliceblue: '#f0f8ff',
|
|
69
|
+
antiquewhite: '#faebd7',
|
|
70
|
+
aqua: '#00ffff',
|
|
71
|
+
aquamarine: '#7fffd4',
|
|
72
|
+
azure: '#f0ffff',
|
|
73
|
+
beige: '#f5f5dc',
|
|
74
|
+
bisque: '#ffe4c4',
|
|
75
|
+
blanchedalmond: '#ffebcd',
|
|
76
|
+
blueviolet: '#8a2be2',
|
|
77
|
+
brown: '#a52a2a',
|
|
78
|
+
burlywood: '#deb887',
|
|
79
|
+
cadetblue: '#5f9ea0',
|
|
80
|
+
chartreuse: '#7fff00',
|
|
81
|
+
chocolate: '#d2691e',
|
|
82
|
+
coral: '#ff7f50',
|
|
83
|
+
cornflowerblue: '#6495ed',
|
|
84
|
+
cornsilk: '#fff8dc',
|
|
85
|
+
crimson: '#dc143c',
|
|
86
|
+
darkblue: '#00008b',
|
|
87
|
+
darkcyan: '#008b8b',
|
|
88
|
+
darkgoldenrod: '#b8860b',
|
|
89
|
+
darkgray: '#a9a9a9',
|
|
90
|
+
darkgrey: '#a9a9a9',
|
|
91
|
+
darkgreen: '#006400',
|
|
92
|
+
darkkhaki: '#bdb76b',
|
|
93
|
+
darkmagenta: '#8b008b',
|
|
94
|
+
darkolivegreen: '#556b2f',
|
|
95
|
+
darkorange: '#ff8c00',
|
|
96
|
+
darkorchid: '#9932cc',
|
|
97
|
+
darkred: '#8b0000',
|
|
98
|
+
darksalmon: '#e9967a',
|
|
99
|
+
darkseagreen: '#8fbc8f',
|
|
100
|
+
darkslateblue: '#483d8b',
|
|
101
|
+
darkslategray: '#2f4f4f',
|
|
102
|
+
darkslategrey: '#2f4f4f',
|
|
103
|
+
darkturquoise: '#00ced1',
|
|
104
|
+
darkviolet: '#9400d3',
|
|
105
|
+
deeppink: '#ff1493',
|
|
106
|
+
deepskyblue: '#00bfff',
|
|
107
|
+
dimgray: '#696969',
|
|
108
|
+
dimgrey: '#696969',
|
|
109
|
+
dodgerblue: '#1e90ff',
|
|
110
|
+
firebrick: '#b22222',
|
|
111
|
+
floralwhite: '#fffaf0',
|
|
112
|
+
forestgreen: '#228b22',
|
|
113
|
+
fuchsia: '#ff00ff',
|
|
114
|
+
gainsboro: '#dcdcdc',
|
|
115
|
+
ghostwhite: '#f8f8ff',
|
|
116
|
+
gold: '#ffd700',
|
|
117
|
+
goldenrod: '#daa520',
|
|
118
|
+
greenyellow: '#adff2f',
|
|
119
|
+
honeydew: '#f0fff0',
|
|
120
|
+
hotpink: '#ff69b4',
|
|
121
|
+
indianred: '#cd5c5c',
|
|
122
|
+
indigo: '#4b0082',
|
|
123
|
+
ivory: '#fffff0',
|
|
124
|
+
khaki: '#f0e68c',
|
|
125
|
+
lavender: '#e6e6fa',
|
|
126
|
+
lavenderblush: '#fff0f5',
|
|
127
|
+
lawngreen: '#7cfc00',
|
|
128
|
+
lemonchiffon: '#fffacd',
|
|
129
|
+
lightblue: '#add8e6',
|
|
130
|
+
lightcoral: '#f08080',
|
|
131
|
+
lightcyan: '#e0ffff',
|
|
132
|
+
lightgoldenrodyellow: '#fafad2',
|
|
133
|
+
lightgray: '#d3d3d3',
|
|
134
|
+
lightgrey: '#d3d3d3',
|
|
135
|
+
lightgreen: '#90ee90',
|
|
136
|
+
lightpink: '#ffb6c1',
|
|
137
|
+
lightsalmon: '#ffa07a',
|
|
138
|
+
lightseagreen: '#20b2aa',
|
|
139
|
+
lightskyblue: '#87cefa',
|
|
140
|
+
lightslategray: '#778899',
|
|
141
|
+
lightslategrey: '#778899',
|
|
142
|
+
lightsteelblue: '#b0c4de',
|
|
143
|
+
lightyellow: '#ffffe0',
|
|
144
|
+
lime: '#00ff00',
|
|
145
|
+
limegreen: '#32cd32',
|
|
146
|
+
linen: '#faf0e6',
|
|
147
|
+
maroon: '#800000',
|
|
148
|
+
mediumaquamarine: '#66cdaa',
|
|
149
|
+
mediumblue: '#0000cd',
|
|
150
|
+
mediumorchid: '#ba55d3',
|
|
151
|
+
mediumpurple: '#9370db',
|
|
152
|
+
mediumseagreen: '#3cb371',
|
|
153
|
+
mediumslateblue: '#7b68ee',
|
|
154
|
+
mediumspringgreen: '#00fa9a',
|
|
155
|
+
mediumturquoise: '#48d1cc',
|
|
156
|
+
mediumvioletred: '#c71585',
|
|
157
|
+
midnightblue: '#191970',
|
|
158
|
+
mintcream: '#f5fffa',
|
|
159
|
+
mistyrose: '#ffe4e1',
|
|
160
|
+
moccasin: '#ffe4b5',
|
|
161
|
+
navajowhite: '#ffdead',
|
|
162
|
+
navy: '#000080',
|
|
163
|
+
oldlace: '#fdf5e6',
|
|
164
|
+
olive: '#808000',
|
|
165
|
+
olivedrab: '#6b8e23',
|
|
166
|
+
orange: '#ffa500',
|
|
167
|
+
orangered: '#ff4500',
|
|
168
|
+
orchid: '#da70d6',
|
|
169
|
+
palegoldenrod: '#eee8aa',
|
|
170
|
+
palegreen: '#98fb98',
|
|
171
|
+
paleturquoise: '#afeeee',
|
|
172
|
+
palevioletred: '#db7093',
|
|
173
|
+
papayawhip: '#ffefd5',
|
|
174
|
+
peachpuff: '#ffdab9',
|
|
175
|
+
peru: '#cd853f',
|
|
176
|
+
pink: '#ffc0cb',
|
|
177
|
+
plum: '#dda0dd',
|
|
178
|
+
powderblue: '#b0e0e6',
|
|
179
|
+
purple: '#800080',
|
|
180
|
+
rebeccapurple: '#663399',
|
|
181
|
+
rosybrown: '#bc8f8f',
|
|
182
|
+
royalblue: '#4169e1',
|
|
183
|
+
saddlebrown: '#8b4513',
|
|
184
|
+
salmon: '#fa8072',
|
|
185
|
+
sandybrown: '#f4a460',
|
|
186
|
+
seagreen: '#2e8b57',
|
|
187
|
+
seashell: '#fff5ee',
|
|
188
|
+
sienna: '#a0522d',
|
|
189
|
+
silver: '#c0c0c0',
|
|
190
|
+
skyblue: '#87ceeb',
|
|
191
|
+
slateblue: '#6a5acd',
|
|
192
|
+
slategray: '#708090',
|
|
193
|
+
slategrey: '#708090',
|
|
194
|
+
snow: '#fffafa',
|
|
195
|
+
springgreen: '#00ff7f',
|
|
196
|
+
steelblue: '#4682b4',
|
|
197
|
+
tan: '#d2b48c',
|
|
198
|
+
teal: '#008080',
|
|
199
|
+
thistle: '#d8bfd8',
|
|
200
|
+
tomato: '#ff6347',
|
|
201
|
+
turquoise: '#40e0d0',
|
|
202
|
+
violet: '#ee82ee',
|
|
203
|
+
wheat: '#f5deb3',
|
|
204
|
+
whitesmoke: '#f5f5f5',
|
|
205
|
+
yellowgreen: '#9acd32',
|
|
206
|
+
};
|
|
207
|
+
// Define the set of Ink's named colors for quick lookup
|
|
208
|
+
static inkSupportedNames = new Set([
|
|
209
|
+
'black',
|
|
210
|
+
'red',
|
|
211
|
+
'green',
|
|
212
|
+
'yellow',
|
|
213
|
+
'blue',
|
|
214
|
+
'cyan',
|
|
215
|
+
'magenta',
|
|
216
|
+
'white',
|
|
217
|
+
'gray',
|
|
218
|
+
'grey',
|
|
219
|
+
'blackbright',
|
|
220
|
+
'redbright',
|
|
221
|
+
'greenbright',
|
|
222
|
+
'yellowbright',
|
|
223
|
+
'bluebright',
|
|
224
|
+
'cyanbright',
|
|
225
|
+
'magentabright',
|
|
226
|
+
'whitebright',
|
|
227
|
+
]);
|
|
228
|
+
/**
|
|
229
|
+
* Creates a new Theme instance.
|
|
230
|
+
* @param name The name of the theme.
|
|
231
|
+
* @param rawMappings The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
232
|
+
*/
|
|
233
|
+
constructor(name, type, rawMappings, colors) {
|
|
234
|
+
this.name = name;
|
|
235
|
+
this.type = type;
|
|
236
|
+
this.colors = colors;
|
|
237
|
+
this._colorMap = Object.freeze(this._buildColorMap(rawMappings)); // Build and freeze the map
|
|
238
|
+
// Determine the default foreground color
|
|
239
|
+
const rawDefaultColor = rawMappings['hljs']?.color;
|
|
240
|
+
this.defaultColor =
|
|
241
|
+
(rawDefaultColor ? Theme._resolveColor(rawDefaultColor) : undefined) ??
|
|
242
|
+
''; // Default to empty string if not found or resolvable
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Gets the Ink-compatible color string for a given highlight.js class name.
|
|
246
|
+
* @param hljsClass The highlight.js class name (e.g., 'hljs-keyword', 'hljs-string').
|
|
247
|
+
* @returns The corresponding Ink color string (hex or name) if it exists.
|
|
248
|
+
*/
|
|
249
|
+
getInkColor(hljsClass) {
|
|
250
|
+
return this._colorMap[hljsClass];
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Resolves a CSS color value (name or hex) into an Ink-compatible color string.
|
|
254
|
+
* @param colorValue The raw color string (e.g., 'blue', '#ff0000', 'darkkhaki').
|
|
255
|
+
* @returns An Ink-compatible color string (hex or name), or undefined if not resolvable.
|
|
256
|
+
*/
|
|
257
|
+
static _resolveColor(colorValue) {
|
|
258
|
+
const lowerColor = colorValue.toLowerCase();
|
|
259
|
+
// 1. Check if it's already a hex code
|
|
260
|
+
if (lowerColor.startsWith('#')) {
|
|
261
|
+
return lowerColor; // Use hex directly
|
|
262
|
+
}
|
|
263
|
+
// 2. Check if it's an Ink supported name (lowercase)
|
|
264
|
+
else if (Theme.inkSupportedNames.has(lowerColor)) {
|
|
265
|
+
return lowerColor; // Use Ink name directly
|
|
266
|
+
}
|
|
267
|
+
// 3. Check if it's a known CSS name we can map to hex
|
|
268
|
+
else if (Theme.cssNameToHexMap[lowerColor]) {
|
|
269
|
+
return Theme.cssNameToHexMap[lowerColor]; // Use mapped hex
|
|
270
|
+
}
|
|
271
|
+
// 4. Could not resolve
|
|
272
|
+
console.warn(`[Theme] Could not resolve color "${colorValue}" to an Ink-compatible format.`);
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Builds the internal map from highlight.js class names to Ink-compatible color strings.
|
|
277
|
+
* This method is protected and primarily intended for use by the constructor.
|
|
278
|
+
* @param hljsTheme The raw CSSProperties mappings from a react-syntax-highlighter theme object.
|
|
279
|
+
* @returns An Ink-compatible theme map (Record<string, string>).
|
|
280
|
+
*/
|
|
281
|
+
_buildColorMap(hljsTheme) {
|
|
282
|
+
const inkTheme = {};
|
|
283
|
+
for (const key in hljsTheme) {
|
|
284
|
+
// Ensure the key starts with 'hljs-' or is 'hljs' for the base style
|
|
285
|
+
if (!key.startsWith('hljs-') && key !== 'hljs') {
|
|
286
|
+
continue; // Skip keys not related to highlighting classes
|
|
287
|
+
}
|
|
288
|
+
const style = hljsTheme[key];
|
|
289
|
+
if (style?.color) {
|
|
290
|
+
const resolvedColor = Theme._resolveColor(style.color);
|
|
291
|
+
if (resolvedColor !== undefined) {
|
|
292
|
+
// Use the original key from the hljsTheme (e.g., 'hljs-keyword')
|
|
293
|
+
inkTheme[key] = resolvedColor;
|
|
294
|
+
}
|
|
295
|
+
// If color is not resolvable, it's omitted from the map,
|
|
296
|
+
// allowing fallback to the default foreground color.
|
|
297
|
+
}
|
|
298
|
+
// We currently only care about the 'color' property for Ink rendering.
|
|
299
|
+
// Other properties like background, fontStyle, etc., are ignored.
|
|
300
|
+
}
|
|
301
|
+
return inkTheme;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/ui/themes/theme.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH,MAAM,CAAC,MAAM,UAAU,GAAgB;IACrC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,OAAO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,MAAM,EAAE,CAAC;gBAC/C,SAAS,CAAC,gDAAgD;YAC5D,CAAC;YAED,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,KAAK,EAAE,KAAK,EAAE,CAAC;gBACjB,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACvD,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;oBAChC,iEAAiE;oBACjE,QAAQ,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC;gBAChC,CAAC;gBACD,yDAAyD;gBACzD,qDAAqD;YACvD,CAAC;YACD,uEAAuE;YACvE,kEAAkE;QACpE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Theme } from './theme.js';
|
|
7
|
+
const xcodeColors = {
|
|
8
|
+
type: 'light',
|
|
9
|
+
Background: '#fff',
|
|
10
|
+
Foreground: 'black',
|
|
11
|
+
LightBlue: '#0E0EFF',
|
|
12
|
+
AccentBlue: '#1c00cf',
|
|
13
|
+
AccentPurple: '#aa0d91',
|
|
14
|
+
AccentCyan: '#3F6E74',
|
|
15
|
+
AccentGreen: '#007400',
|
|
16
|
+
AccentYellow: '#836C28',
|
|
17
|
+
AccentRed: '#c41a16',
|
|
18
|
+
Comment: '#007400',
|
|
19
|
+
Gray: '#c0c0c0',
|
|
20
|
+
GradientColors: ['#1c00cf', '#007400'],
|
|
21
|
+
};
|
|
22
|
+
export const XCode = new Theme('Xcode', 'light', {
|
|
23
|
+
hljs: {
|
|
24
|
+
display: 'block',
|
|
25
|
+
overflowX: 'auto',
|
|
26
|
+
padding: '0.5em',
|
|
27
|
+
background: xcodeColors.Background,
|
|
28
|
+
color: xcodeColors.Foreground,
|
|
29
|
+
},
|
|
30
|
+
'xml .hljs-meta': {
|
|
31
|
+
color: xcodeColors.Gray,
|
|
32
|
+
},
|
|
33
|
+
'hljs-comment': {
|
|
34
|
+
color: xcodeColors.Comment,
|
|
35
|
+
},
|
|
36
|
+
'hljs-quote': {
|
|
37
|
+
color: xcodeColors.Comment,
|
|
38
|
+
},
|
|
39
|
+
'hljs-tag': {
|
|
40
|
+
color: xcodeColors.AccentPurple,
|
|
41
|
+
},
|
|
42
|
+
'hljs-attribute': {
|
|
43
|
+
color: xcodeColors.AccentPurple,
|
|
44
|
+
},
|
|
45
|
+
'hljs-keyword': {
|
|
46
|
+
color: xcodeColors.AccentPurple,
|
|
47
|
+
},
|
|
48
|
+
'hljs-selector-tag': {
|
|
49
|
+
color: xcodeColors.AccentPurple,
|
|
50
|
+
},
|
|
51
|
+
'hljs-literal': {
|
|
52
|
+
color: xcodeColors.AccentPurple,
|
|
53
|
+
},
|
|
54
|
+
'hljs-name': {
|
|
55
|
+
color: xcodeColors.AccentPurple,
|
|
56
|
+
},
|
|
57
|
+
'hljs-variable': {
|
|
58
|
+
color: xcodeColors.AccentCyan,
|
|
59
|
+
},
|
|
60
|
+
'hljs-template-variable': {
|
|
61
|
+
color: xcodeColors.AccentCyan,
|
|
62
|
+
},
|
|
63
|
+
'hljs-code': {
|
|
64
|
+
color: xcodeColors.AccentRed,
|
|
65
|
+
},
|
|
66
|
+
'hljs-string': {
|
|
67
|
+
color: xcodeColors.AccentRed,
|
|
68
|
+
},
|
|
69
|
+
'hljs-meta-string': {
|
|
70
|
+
color: xcodeColors.AccentRed,
|
|
71
|
+
},
|
|
72
|
+
'hljs-regexp': {
|
|
73
|
+
color: xcodeColors.LightBlue,
|
|
74
|
+
},
|
|
75
|
+
'hljs-link': {
|
|
76
|
+
color: xcodeColors.LightBlue,
|
|
77
|
+
},
|
|
78
|
+
'hljs-title': {
|
|
79
|
+
color: xcodeColors.AccentBlue,
|
|
80
|
+
},
|
|
81
|
+
'hljs-symbol': {
|
|
82
|
+
color: xcodeColors.AccentBlue,
|
|
83
|
+
},
|
|
84
|
+
'hljs-bullet': {
|
|
85
|
+
color: xcodeColors.AccentBlue,
|
|
86
|
+
},
|
|
87
|
+
'hljs-number': {
|
|
88
|
+
color: xcodeColors.AccentBlue,
|
|
89
|
+
},
|
|
90
|
+
'hljs-section': {
|
|
91
|
+
color: xcodeColors.AccentYellow,
|
|
92
|
+
},
|
|
93
|
+
'hljs-meta': {
|
|
94
|
+
color: xcodeColors.AccentYellow,
|
|
95
|
+
},
|
|
96
|
+
'hljs-class .hljs-title': {
|
|
97
|
+
color: xcodeColors.AccentPurple,
|
|
98
|
+
},
|
|
99
|
+
'hljs-type': {
|
|
100
|
+
color: xcodeColors.AccentPurple,
|
|
101
|
+
},
|
|
102
|
+
'hljs-built_in': {
|
|
103
|
+
color: xcodeColors.AccentPurple,
|
|
104
|
+
},
|
|
105
|
+
'hljs-builtin-name': {
|
|
106
|
+
color: xcodeColors.AccentPurple,
|
|
107
|
+
},
|
|
108
|
+
'hljs-params': {
|
|
109
|
+
color: xcodeColors.AccentPurple,
|
|
110
|
+
},
|
|
111
|
+
'hljs-attr': {
|
|
112
|
+
color: xcodeColors.AccentYellow,
|
|
113
|
+
},
|
|
114
|
+
'hljs-subst': {
|
|
115
|
+
color: xcodeColors.Foreground,
|
|
116
|
+
},
|
|
117
|
+
'hljs-formula': {
|
|
118
|
+
backgroundColor: '#eee',
|
|
119
|
+
fontStyle: 'italic',
|
|
120
|
+
},
|
|
121
|
+
'hljs-addition': {
|
|
122
|
+
backgroundColor: '#baeeba',
|
|
123
|
+
},
|
|
124
|
+
'hljs-deletion': {
|
|
125
|
+
backgroundColor: '#ffc8bd',
|
|
126
|
+
},
|
|
127
|
+
'hljs-selector-id': {
|
|
128
|
+
color: xcodeColors.AccentYellow,
|
|
129
|
+
},
|
|
130
|
+
'hljs-selector-class': {
|
|
131
|
+
color: xcodeColors.AccentYellow,
|
|
132
|
+
},
|
|
133
|
+
'hljs-doctag': {
|
|
134
|
+
fontWeight: 'bold',
|
|
135
|
+
},
|
|
136
|
+
'hljs-strong': {
|
|
137
|
+
fontWeight: 'bold',
|
|
138
|
+
},
|
|
139
|
+
'hljs-emphasis': {
|
|
140
|
+
fontStyle: 'italic',
|
|
141
|
+
},
|
|
142
|
+
}, xcodeColors);
|
|
143
|
+
//# sourceMappingURL=xcode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xcode.js","sourceRoot":"","sources":["../../../../src/ui/themes/xcode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,WAAW,GAAgB;IAC/B,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,SAAS;IACrB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU,IAAI,KAAK,CACnC,OAAO,EACP,OAAO,EACP;IACE,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,MAAM;QACjB,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,WAAW,CAAC,UAAU;QAClC,KAAK,EAAE,WAAW,CAAC,UAAU;KAC9B;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,WAAW,CAAC,IAAI;KACxB;IACD,cAAc,EAAE;QACd,KAAK,EAAE,WAAW,CAAC,OAAO;KAC3B;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,WAAW,CAAC,OAAO;KAC3B;IACD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AY;KAChC;IACD,eAAe,EAAE;QACf,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,aAAa,EAAE;QACb,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,WAAW,CAAC,UAAU;KAC9B;IACD,cAAc,EAAE;QACd,eAAe,EAAE,MAAM;QACvB,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,eAAe,EAAE,SAAS;KAC3B;IACD,eAAe,EAAE;QACf,eAAe,EAAE,SAAS;KAC3B;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,qBAAqB,EAAE;QACrB,KAAK,EAAE,WAAW,CAAC,YAAY;KAChC;IACD,aAAa,EAAE;QACb,UAAU,EAAE,MAAM;KACnB;IACD,aAAa,EAAE;QACb,UAAU,EAAE,MAAM;KACnB;IACD,eAAe,EAAE;QACf,SAAS,EAAE,QAAQ;KACpB;CACF,EACD,WAAW,CACZ,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
}
|
|
@@ -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"}
|